/* =============================================================================
   ZIKRAYATI — BRAND LAYER (brand guidelines v1.0, Oct 2026)
   Shared by every page: palette and type tokens, the logo pieces, Zizo and the
   brand motion. Page stylesheets map their own tokens onto these.

   Colour: Cream paper and Memory Ink do most of the work. Lavender is ours.
           Coral is precious: the dot and one main moment per layout.
   Type:   Fredoka / Baloo Bhaijaan 2 (display), Readex Pro (text and UI),
           Caveat / Aref Ruqaa (handwriting, short phrases only).
   Motion: 250–400 ms; only photos and the dot bounce. "The develop" (2 s) for
           app launch and order confirmation. Loading: the coral dot breathes.
   ============================================================================= */
:root {
  /* Core palette */
  --zk-lavender: #B9AEF0;
  --zk-cream: #FBF5E5;
  --zk-ink: #383336;
  --zk-mist: #DAD5F7;
  --zk-coral: #FF6A64;
  --zk-paper: #FFFCF5;
  /* Occasion pastels */
  --zk-peach: #FFD3C2;
  --zk-blush: #F8CFDA;
  --zk-sky: #C7DEF5;
  --zk-butter: #FBE7A1;
  --zk-mint: #C6EAD6;
  /* Campaign brights + support */
  --zk-cobalt: #4352F2;
  --zk-zest: #D6F36B;
  --zk-deep: #5B4BC4;     /* links, focus, Arabic tint */
  --zk-slate: #6B6470;    /* secondary text */
  --zk-cream-2: #F3EBD3;  /* cream edges and wells */
  --zk-line: rgba(56, 51, 54, .12);
  --zk-line-2: rgba(56, 51, 54, .2);

  /* Type */
  --zk-display: "Fredoka", "Baloo Bhaijaan 2", ui-rounded, system-ui, sans-serif;
  --zk-display-ar: "Baloo Bhaijaan 2", "Fredoka", system-ui, sans-serif;
  --zk-text: "Readex Pro", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --zk-hand: "Caveat", "Aref Ruqaa", cursive;
  --zk-hand-ar: "Aref Ruqaa", "Caveat", serif;

  /* Interface tokens */
  --zk-r-input: 12px;
  --zk-r-card: 22px;
  --zk-press: 0 4px 0 var(--zk-ink);
  --zk-press-lav: 0 4px 0 var(--zk-lavender);
  --zk-focus: 0 0 0 3px var(--zk-paper), 0 0 0 6px var(--zk-deep);
  --zk-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ---------------------------------------------------------------------------
   Logo pieces
   --------------------------------------------------------------------------- */
.zk-logo { display: inline-flex; align-items: center; line-height: 0; }
.zk-logo img { display: block; height: 100%; width: auto; }
.zk-mark, .zizo { display: block; width: 100%; height: auto; overflow: visible; }
[data-zk-mark], [data-zizo] { display: inline-block; line-height: 0; }

/* ---------------------------------------------------------------------------
   The develop: 0 s blank print · 0.6 s colour seeps · 1.2 s z sharpens · 2 s dot pops
   --------------------------------------------------------------------------- */
.zk-dev .zk-m-dark { animation: zkSeep 1.25s cubic-bezier(.4, 0, .3, 1) .15s both; }
.zk-dev .zk-m-z { animation: zkSharpen 1.2s cubic-bezier(.3, .7, .3, 1) .2s both; }
.zk-dev .zk-m-dot, .zk-wait .zk-m-dot { transform-box: fill-box; transform-origin: center; }
.zk-dev .zk-m-dot { animation: zkDotPop .45s var(--zk-spring) 1.6s both; }
.zk-dev.zk-wait .zk-m-dot { animation: zkDotPop .45s var(--zk-spring) 1.6s both, zkBreathe .9s ease-in-out 2.15s infinite; }
.zk-wait:not(.zk-dev) .zk-m-dot { animation: zkBreathe .9s ease-in-out infinite; }
@keyframes zkSeep { 0% { opacity: 1; } 45% { opacity: .55; } 100% { opacity: 0; } }
@keyframes zkSharpen { 0% { opacity: 0; filter: blur(5px); } 45% { opacity: .35; filter: blur(3px); } 100% { opacity: 1; filter: blur(0); } }
@keyframes zkDotPop { 0% { transform: scale(0); } 70% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes zkBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.4); } }


/* ---------------------------------------------------------------------------
   The Zizo loader (brand.js zizoLoader): four poses in turn, 0.85 s each, every swap
   a hop with a squash on landing, a soft flash burst behind, a shadow that breathes
   with the hop. Pages hide their wordmark meanwhile (Zizo never sits beside the logo).
   --------------------------------------------------------------------------- */
.zk-zl { position: relative; display: block; width: 100%; aspect-ratio: 1; }
.zk-zl-pose { position: absolute; inset: 0; opacity: 0; transform-origin: 50% 92%; animation: zkBooth 3.4s cubic-bezier(.3, .7, .4, 1) calc(var(--k) * .85s) infinite both; }
.zk-zl-pose .zizo { animation: none; }
@keyframes zkBooth {
  0% { opacity: 0; transform: translateY(6%) scale(.92); }
  4% { opacity: 1; transform: translateY(-9%) scale(1.03, .97); }
  10% { transform: translateY(0) scale(1.06, .93); }
  14% { transform: none; }
  22% { opacity: 1; transform: none; }
  25%, 100% { opacity: 0; transform: translateY(2%) scale(.97); }
}
.zk-zl-flash { position: absolute; left: 50%; top: 46%; width: 86%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%) scale(.5); opacity: 0;
  background: radial-gradient(closest-side, #fff, rgba(255, 255, 255, .6) 45%, rgba(255, 255, 255, 0)); animation: zkBurst .85s ease-out infinite; }
@keyframes zkBurst { 0% { opacity: .9; transform: translate(-50%, -50%) scale(.45); } 40%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.15); } }
.zk-zl-shadow { position: absolute; left: 50%; bottom: 3%; width: 46%; height: 6%; border-radius: 50%; transform: translateX(-50%); background: rgba(56, 51, 54, .16); animation: zkShadow .85s ease-in-out infinite; }
@keyframes zkShadow { 0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 1; } 8% { transform: translateX(-50%) scaleX(.7); opacity: .6; } 18% { transform: translateX(-50%) scaleX(1.12); opacity: 1; } }

/* Breathing coral dot loader (inline, e.g. inside a button or status line) */
.zk-breathe { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--zk-coral); flex: none; animation: zkBreathe .9s ease-in-out infinite; }
.zk-dots { display: inline-flex; gap: 7px; align-items: center; }
.zk-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--zk-lavender); animation: zkBreathe .9s ease-in-out infinite; }
.zk-dots i:nth-child(2) { animation-delay: .15s; background: var(--zk-mist); }
.zk-dots i:nth-child(3) { animation-delay: .3s; background: var(--zk-coral); }

/* ---------------------------------------------------------------------------
   Zizo
   --------------------------------------------------------------------------- */
.zizo .zz-cap { font-family: var(--zk-hand); font-weight: 700; fill: var(--zk-ink); }
.zizo .zz-eyes, .zizo .zz-dot, .zizo .zz-confetti circle, .zizo .zz-z text, .zizo .zz-drop { transform-box: fill-box; transform-origin: center; }
.zizo .zz-wave { transform-box: view-box; transform-origin: 35px 63px; }
.zizo .zz-frame { transform-box: view-box; transform-origin: 120px 58px; }
.zizo-almost .zz-frame { animation: zzLift .55s var(--zk-spring) .15s both; }
.is-live .zizo-almost .zz-frame, .zizo-almost.is-live .zz-frame { animation: zzWiggle 2.4s ease-in-out infinite; }
@keyframes zzWiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-6deg); } 40% { transform: rotate(5deg); } 55% { transform: rotate(0); } }
/* Entrances play once */
.zizo { animation: zzIn .5s var(--zk-spring) both; }
.zizo-hi .zz-wave { animation: zzWave 1.1s ease-in-out .35s 2; }
.zizo-yay .zz-confetti circle { animation: zzConfetti .6s var(--zk-spring) both; }
.zizo-yay .zz-confetti circle:nth-child(2) { animation-delay: .08s; } .zizo-yay .zz-confetti circle:nth-child(3) { animation-delay: .16s; }
.zizo-yay .zz-confetti circle:nth-child(4) { animation-delay: .24s; } .zizo-yay .zz-confetti circle:nth-child(5) { animation-delay: .32s; }
.zizo-yay .zz-body { animation: zzJump .7s var(--zk-spring) .1s; }
.zizo-oops .zz-drop { animation: zzDrop .6s ease-out .3s both; }
.zizo-kept .zz-album { animation: zzLift .55s var(--zk-spring) .15s both; }
/* Idle life, only while .is-live (loaders and live states) */
.is-live .zizo .zz-eyes, .zizo.is-live .zz-eyes { animation: zzBlink 4.2s ease-in-out 1s infinite; }
.is-live .zizo-hi .zz-wave, .zizo-hi.is-live .zz-wave { animation: zzWave 1.1s ease-in-out .35s infinite; }
.is-live .zizo-brb .zz-body, .zizo-brb.is-live .zz-body { animation: zzBreath 2.6s ease-in-out infinite; }
.is-live .zizo-brb .zz-z text, .zizo-brb.is-live .zz-z text { animation: zzFloat 2.6s ease-in-out infinite; }
.is-live .zizo-brb .zz-z .zz-z2 { animation-delay: .5s; }
.is-live .zizo .zz-dot { animation: zkBreathe .9s ease-in-out infinite; }
.is-live .zizo-onmyway .zz-body, .is-live .zizo-onmyway .zz-parcel { animation: zzWalk .8s ease-in-out infinite; }

@keyframes zzIn { from { opacity: 0; transform: translateY(10px) scale(.94); } }
@keyframes zzWave { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-16deg); } 60% { transform: rotate(10deg); } }
@keyframes zzBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes zzBreath { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(1.5px); } }
@keyframes zzFloat { 0% { opacity: 0; transform: translate(0, 4px); } 30%, 70% { opacity: 1; } 100% { opacity: 0; transform: translate(3px, -6px); } }
@keyframes zzConfetti { from { opacity: 0; transform: scale(0) translateY(8px); } }
@keyframes zzJump { 40% { transform: translateY(-6px); } }
@keyframes zzDrop { from { opacity: 0; transform: translateY(-6px); } }
@keyframes zzLift { from { transform: translateY(10px); opacity: 0; } }
@keyframes zzWalk { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-2px) rotate(1.5deg); } }

/* Touch / hover: a little hop (any Zizo). Live ones also wave and blink while on screen. */
.is-hop > .zizo, .is-hop .zizo { animation: zzHop .6s var(--zk-spring); }
@keyframes zzHop { 0%, 100% { transform: none; } 35% { transform: translateY(-9%) rotate(-5deg); } 65% { transform: translateY(1%) rotate(3deg); } }
[data-live].is-live .zizo-yay .zz-confetti circle { animation: zzConfettiFloat 2.4s ease-in-out infinite; }
@keyframes zzConfettiFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
[data-live].is-live .zizo-kept .zz-album { animation: zzHug 3.2s ease-in-out infinite; }
@keyframes zzHug { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(-3deg) translateY(-1px); } }
/* Peek: rises into view the first time it is scrolled to */
[data-peek] { opacity: 0; transform: translateY(24%) rotate(-4deg); transition: opacity .5s ease, transform .7s var(--zk-spring); }
[data-peek].is-seen { opacity: 1; transform: none; }

/* ---------------------------------------------------------------------------
   Brand shapes (use one or two per layout)
   --------------------------------------------------------------------------- */
/* Sticker pill: short words, ±8° tilt */
.zk-sticker { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--zk-ink); background: var(--zk-cream); color: var(--zk-ink);
  font: 600 13px/1 var(--zk-display); box-shadow: 0 3px 0 var(--zk-ink); transform: rotate(var(--tilt, -6deg)); white-space: nowrap; }
html[lang="ar"] .zk-sticker { font-family: var(--zk-display-ar); }
/* Crop marks around a word or block ("selected") */
.zk-crop { position: relative; display: inline-block; padding: .08em .22em; }
.zk-crop::before, .zk-crop::after { content: ""; position: absolute; inset: -.06em -.04em; pointer-events: none;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / .32em .07em no-repeat, linear-gradient(currentColor, currentColor) 0 0 / .07em .32em no-repeat,
    linear-gradient(currentColor, currentColor) 100% 0 / .32em .07em no-repeat, linear-gradient(currentColor, currentColor) 100% 0 / .07em .32em no-repeat; }
.zk-crop::after { background:
    linear-gradient(currentColor, currentColor) 0 100% / .32em .07em no-repeat, linear-gradient(currentColor, currentColor) 0 100% / .07em .32em no-repeat,
    linear-gradient(currentColor, currentColor) 100% 100% / .32em .07em no-repeat, linear-gradient(currentColor, currentColor) 100% 100% / .07em .32em no-repeat; }
/* Print frame: cream instant print with a deep caption strip */
.zk-print { display: inline-block; padding: 7% 7% 24%; background: var(--zk-cream); border-radius: 6px; box-shadow: 0 14px 28px -14px rgba(56, 51, 54, .45), 0 0 0 1px rgba(56, 51, 54, .06); }

/* ---------------------------------------------------------------------------
   Memory Book: the loyalty card's five photo slots (markup: loyalty.js slots())
   Empty slots are dashed outlines, stamped ones a cream print with a Lavender
   window, albums on their way are striped. The 3rd slot carries a van (free
   delivery), the 5th 20%.
   --------------------------------------------------------------------------- */
.mb-slots { display: inline-flex; gap: 8px; }   /* fills from the right in Arabic */
.mb-slot { position: relative; display: block; width: 38px; height: 44px; padding: 4px 4px 11px; border-radius: 5px; border: 2px dashed rgba(56, 51, 54, .28); transform: rotate(var(--r, 0deg)); }
.mb-slot i { display: block; height: 100%; border-radius: 2px; }
.mb-slot.is-on { border: 0; padding: 5px 5px 13px; background: var(--zk-cream); box-shadow: 0 0 0 2px var(--zk-ink), 0 3px 0 2px var(--zk-ink); }
.mb-slot.is-on i { background: var(--zk-lavender); }
.mb-slot.is-coming { border-style: solid; border-color: var(--zk-lavender); background: repeating-linear-gradient(135deg, var(--zk-mist) 0 4px, var(--zk-paper) 4px 8px); }
.mb-slot em { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%) rotate(calc(var(--r, 0deg) * -1)); display: grid; place-items: center; min-width: 22px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--zk-butter); color: var(--zk-ink); box-shadow: 0 0 0 1.5px var(--zk-ink); font: 700 10px/1 var(--zk-display); font-style: normal; white-space: nowrap; }
.mb-slot em svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mb-slot:last-child em { background: var(--zk-ink); color: var(--zk-cream); }
.mb-slot.is-on.is-new { animation: mbLand .5s var(--zk-spring) both; }
@keyframes mbLand { 0% { transform: rotate(-12deg) translateY(-10px); opacity: 0; } 70% { transform: rotate(calc(var(--r, 0deg) + 2deg)); opacity: 1; } 100% { transform: rotate(var(--r, 0deg)); } }

/* Splash shell used by the editor and checkout */
.zk-splash { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; align-content: center; gap: 22px; background: var(--zk-paper); color: var(--zk-ink); transition: opacity .6s ease, visibility .6s; }
.zk-splash .zk-splash-mark { width: 116px; filter: drop-shadow(0 18px 24px rgba(56, 51, 54, .16)); }
.zk-splash-msg { display: inline-flex; align-items: center; gap: 10px; font: 500 15px/1.4 var(--zk-text); color: var(--zk-slate); text-align: center; animation: zkFadeUp .5s ease 1.4s both; }
@keyframes zkFadeUp { from { opacity: 0; transform: translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  .zk-dev .zk-m-dark { animation: none; opacity: 0; }
  .zk-dev .zk-m-z, .zk-dev .zk-m-dot, .zizo, .zizo * { animation: none !important; }
  .zk-wait .zk-m-dot, .zk-breathe, .zk-dots i { animation: none !important; }
  [data-peek] { opacity: 1; transform: none; transition: none; }
  .zk-zl *, .zk-zl-pose { animation: none !important; }
  .zk-zl-pose:first-of-type { opacity: 1; }
}
