/* Pizza Bite — the landing deck.
   ==========================================================================
   Eight slides, one frame, one swipe each.

   Two earlier versions taught this file what it is:

   * v1 was scrolling sections — each slide arrived like a separate window.
   * v2 scrubbed everything off the scrollbar — smooth, but a reader had to
     keep scrolling *through* a transition, and the brand's warm colour was
     gone from most of the page.

   So this version is a **controlled deck**. The page does not scroll at all:
   one wheel tick, one swipe or one arrow key advances exactly one slide, and
   the transition is a choreographed animation the reader never sits inside.
   Everything on screen lives in one fixed stage — the background washes, the
   pizzas drift behind the content, the outgoing copy lifts away and the
   incoming copy assembles — so there is never a cut and never a second
   window.

   The rules that keep it smooth:
   * Only `transform` and `opacity` are ever animated. Both run on the
     compositor — the graphics card — so a mid-transition frame costs the
     main thread nothing.
   * Heights are `svh`: the viewport that does not jump when a phone hides
     its address bar.
   * Positions are logical (`inset-inline-*`), because the page flips to
     left-to-right when the language does.
   ========================================================================== */

/* ── Kurdish ─────────────────────────────────────────────────────────────
   Rabar 013 — what Kurdish is actually read in. Subset from 316 KB to 54 KB;
   `swap` keeps the words visible while it downloads. */
@font-face {
  font-family: 'Rabar';
  src: url('/fonts/rabar013.woff2') format('woff2');
  font-weight: 400 900;
  font-display: swap;
}

:root {
  /* The app's own palette, exactly — `app_colors.dart`. The brand gradient
     below is the same three stops the customer app paints its hero with. */
  --accent: #ffa724;
  --brand: #ff4b2b;
  --brand-dark: #d62b12;
  --ink: #1c1210;          /* only for tinting glass and shadows now */
  --deep: #58150a;         /* the dark that type is set in */

  --on: #ffffff;
  --muted: rgba(255, 255, 255, 0.78);
  --faint: rgba(255, 255, 255, 0.5);
  --glass: linear-gradient(155deg, rgba(255, 255, 255, 0.24) 0%,
                                   rgba(255, 255, 255, 0.09) 100%);
  --glass-line: rgba(255, 255, 255, 0.4);
  --glass-lift: inset 0 1px 0 rgba(255, 255, 255, 0.42),
                0 18px 40px rgba(88, 21, 10, 0.22);

  --ease: cubic-bezier(0.22, 0.68, 0.32, 1);
  --pad: clamp(20px, 5vw, 76px);

  /* One transition everywhere, so leaving and arriving read as one motion. */
  --t: 0.9s;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }

html, body {
  height: 100%;
  overflow: hidden;               /* the deck is driven, never scrolled */
  overscroll-behavior: none;
  background: var(--brand);
  color: var(--on);
  font-family: 'Rabar', 'Segoe UI', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Latin lines — COMING SOON, the counter — in a Latin face. */
.lat { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }

/* While `.boot` is on the root nothing transitions: the first slide must
   simply be there, not arrive. Removed one frame after load. */
.boot *, .boot *::before, .boot *::after { transition: none !important; }

/* ── The stage ───────────────────────────────────────────────────────────*/
.stage {
  position: fixed;
  inset: 0;
  height: 100svh;
  overflow: hidden;
  touch-action: none;             /* swipes belong to the deck, not the page */
  isolation: isolate;
}

/* ── Background ──────────────────────────────────────────────────────────
   Two layers crossfading. Each slide has its own warm gradient — all of them
   inside the brand's family, which is the thing v2 lost. */
.bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  opacity: 0;
  transition: opacity calc(var(--t) * 1.2) var(--ease);
}
.bg.show { opacity: 1; }

/* A soft dark vignette at the foot so white type always has ground. */
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(28, 18, 16, 0.34), transparent 34%);
}

/* ── The background pizzas ───────────────────────────────────────────────
   Three cut-outs, low opacity, behind everything. They are texture, not
   content: the menu is big and no single dish gets the poster. Their
   positions change per slide through the variables home.js writes, and the
   CSS transition — not a frame loop — carries them there. */
.orb {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  width: clamp(260px, 44vmin, 560px);
  aspect-ratio: 1;
  z-index: -2;
  pointer-events: none;
  transform:
    translate3d(calc(var(--x, 0) * 1vw - 50%), calc(var(--y, 0) * 1vh - 50%), 0)
    rotate(calc(var(--r, 0) * 1deg))
    scale(var(--s, 1));
  opacity: var(--o, 0.16);
  transition: transform calc(var(--t) * 1.5) var(--ease),
              opacity calc(var(--t) * 1.5) var(--ease);
  will-change: transform, opacity;
}
.orb img {
  width: 100%;
  /* Slow drift on top of the travel, so the background is never dead still. */
  animation: orbspin 90s linear infinite;
}
.orb:nth-child(odd) img { animation-direction: reverse; animation-duration: 70s; }
@keyframes orbspin { to { transform: rotate(360deg); } }

/* ── A slide ─────────────────────────────────────────────────────────────
   All eight are stacked in the same place; classes say where each one is.
   `is-prev` sits lifted above, `is-next` waits below, `is-active` is the one
   on stage — and moving a class is the whole transition. */
.slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(84px, 12vh, 126px) var(--pad) clamp(56px, 8vh, 92px);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 9vh, 0) scale(0.97);
  pointer-events: none;
  transition: transform var(--t) var(--ease),
              opacity var(--t) var(--ease),
              visibility 0s var(--t);
  will-change: transform, opacity;
}
.slide.is-prev { transform: translate3d(0, -9vh, 0) scale(0.97); }
.slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition: transform var(--t) var(--ease),
              opacity var(--t) var(--ease),
              visibility 0s 0s;
}

.wrap { width: min(1100px, 100%); margin-inline: auto; }

/* ── The copy's entrance ─────────────────────────────────────────────────
   Anything marked `data-a` assembles: on an inactive slide it waits low and
   transparent with no delay, so it leaves with its slide as one piece; on the
   active slide each element rises on its own beat, `--i` apart. */
[data-a] {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 0.55s var(--ease),
              transform 0.55s var(--ease);
}
.is-active [data-a] {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s var(--ease) calc(var(--i, 0) * 95ms + 180ms),
              transform 0.8s var(--ease) calc(var(--i, 0) * 95ms + 180ms);
}

/* ── Type ────────────────────────────────────────────────────────────────*/
.eyebrow {
  font-size: clamp(11px, 1.5vw, 14px);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--deep);
  font-weight: 700;
  opacity: 0.85;
}

h1, h2 { font-weight: 700; line-height: 1.24; text-wrap: balance;
         overflow-wrap: break-word; }
h1 { font-size: clamp(30px, 5.8vw, 68px); }
h2 { font-size: clamp(25px, 4.4vw, 52px); }
h1 b, h2 b { color: var(--deep); font-weight: 700; }

.lede {
  font-size: clamp(15px, 2vw, 20px);
  line-height: 1.8;
  color: var(--muted);
  max-width: min(46ch, 100%);
}

/* ── Slide 1: the mark ───────────────────────────────────────────────────
   The logo breathes, and two rings leave it on a slow beat — the same pulse
   the app's busy card uses, which makes it read as the brand's heartbeat
   rather than an effect. */
.heartbeat {
  position: relative;
  display: inline-block;
}
.heartbeat img {
  width: clamp(250px, 42vw, 520px);
  filter: drop-shadow(0 14px 34px rgba(28, 18, 16, 0.4));
  animation: breath 3.4s var(--ease) infinite;
}
@keyframes breath {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.045); }
}
.heartbeat i {
  position: absolute;
  inset: -14% -8%;
  border: 3px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  animation: ring 3.4s var(--ease) infinite;
}
.heartbeat i + i { animation-delay: 1.7s; }
@keyframes ring {
  0%   { transform: scale(0.82); opacity: 0; }
  18%  { opacity: 0.6; }
  100% { transform: scale(1.34); opacity: 0; }
}

.soon {
  font-size: clamp(38px, 8.6vw, 118px);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on);
  text-shadow: 0 6px 26px rgba(28, 18, 16, 0.35);
}
.soon-ku { font-size: clamp(24px, 4.2vw, 52px); font-weight: 700;
           color: var(--deep); }

/* ── Slide 2: the iPhone ─────────────────────────────────────────────────
   Built, not photographed: rail, hairline highlight, screen, island. Enough
   to be read as an iPhone at a glance, which is all a poster frame is for.
   It floats — a slow bob that never stops while the slide is up. */
.duo {
  display: grid;
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
  justify-items: center;
}
@media (min-width: 880px) {
  .duo { grid-template-columns: 1.05fr 0.95fr; }
  .duo > .copy { justify-self: start; text-align: start; }
}

.iphone {
  position: relative;
  width: clamp(190px, 46vmin, 292px);
  border-radius: clamp(40px, 8vmin, 54px);
  padding: 10px;
  background: linear-gradient(140deg, #d9d9de 0%, #5a5a5f 16%, #232326 48%,
                              #3d3d41 76%, #c9c9ce 100%);
  box-shadow: 0 60px 100px rgba(28, 18, 16, 0.45),
              0 0 0 1px rgba(255, 255, 255, 0.14);
  animation: bob 6s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: rotate(-5deg) translateY(0); }
  50%      { transform: rotate(-5deg) translateY(-16px); }
}
.iphone .screen {
  position: relative;
  border-radius: clamp(32px, 6.6vmin, 45px);
  overflow: hidden;
  background: #000;
  max-height: min(56svh, 560px);
}
.iphone .screen img { width: 100%; object-fit: cover; object-position: top; }
.iphone .island {
  position: absolute;
  top: 13px; left: 50%;
  transform: translateX(-50%);
  width: 34%; height: 26px;
  border-radius: 999px;
  background: #000;
}

/* ── Slide 3: features ───────────────────────────────────────────────────*/
.feats {
  display: grid;
  gap: clamp(11px, 1.8vw, 20px);
  grid-template-columns: repeat(2, 1fr);
  margin-top: clamp(24px, 4.4vh, 54px);
}
@media (min-width: 880px) { .feats { grid-template-columns: repeat(4, 1fr); } }

.feat {
  padding: clamp(20px, 2.6vw, 36px) clamp(16px, 2vw, 26px);
  border-radius: 24px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-lift);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
}
.feat .ico {
  width: clamp(50px, 6.6vw, 74px);
  aspect-ratio: 1;
  margin-inline: auto;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  font-size: clamp(21px, 3vw, 30px);
  box-shadow: 0 10px 24px rgba(28, 18, 16, 0.28);
}
.feat h3 { font-size: clamp(15.5px, 2vw, 23px); font-weight: 700;
           margin-block: 14px 7px; }
.feat p { font-size: clamp(12px, 1.5vw, 16px); color: var(--muted);
          line-height: 1.7; }

/* ── Slide 4: the steps ──────────────────────────────────────────────────*/
.steps { display: grid; gap: clamp(12px, 2vw, 24px);
         margin-top: clamp(24px, 4.4vh, 52px); }
@media (min-width: 840px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.step {
  position: relative;
  padding: clamp(24px, 3vw, 42px);
  border-radius: 28px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-lift);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
}
/* A warm bloom in the corner each numeral sits in, so the card has a light
   source rather than being a flat panel. */
.step::before {
  content: "";
  position: absolute;
  inset-block-start: -40%;
  inset-inline-start: -20%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 150, 0.34), transparent 70%);
  pointer-events: none;
}
.step > * { position: relative; }
/* In the flow, above the heading. Absolutely positioned in the card's corner
   it landed on the body copy, which is the one place a 96px numeral must
   never be. */
.step .n {
  font-size: clamp(46px, 5.4vw, 78px);
  font-weight: 900;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.62);
  margin-block-end: clamp(10px, 1.6vh, 18px);
}
.step h3 { font-size: clamp(20px, 2.6vw, 30px); font-weight: 700; }
.step p { font-size: clamp(13px, 1.7vw, 17px); color: var(--muted);
          line-height: 1.75; margin-top: 9px; }

/* ── Slide 5: speed ──────────────────────────────────────────────────────*/
.big {
  font-size: clamp(46px, 10vw, 148px);
  font-weight: 700;
  line-height: 1.12;
  color: var(--on);
  text-shadow: 0 8px 30px rgba(28, 18, 16, 0.3);
}
.big b { color: var(--deep); font-weight: 700; }

.figures { display: flex; gap: clamp(18px, 4.4vw, 66px); justify-content: center;
           flex-wrap: wrap; margin-top: clamp(20px, 3.4vh, 44px); }
.figure b { display: block; font-size: clamp(36px, 6.4vw, 76px); font-weight: 700;
            line-height: 1; color: var(--deep);
            text-shadow: 0 3px 14px rgba(88, 21, 10, .22); }
.figure span { display: block; margin-top: 7px;
               font-size: clamp(12px, 1.5vw, 15.5px); color: var(--muted); }

/* Speed lines behind the headline — the one drawn thing on the slide, and
   the only one that says "fast" without being read. */
.dashes { position: absolute; inset: 0; z-index: -1; overflow: hidden;
          pointer-events: none; }
.dashes i {
  position: absolute;
  height: 3px; width: 46%;
  border-radius: 3px;
  inset-inline-start: -50%;
  background: linear-gradient(90deg, transparent,
                              rgba(255, 255, 255, 0.65), transparent);
  opacity: 0;
  animation: dash 3.2s var(--ease) infinite;
  animation-delay: var(--dd, 0s);
}
@keyframes dash {
  0%   { transform: translate3d(0, 0, 0); opacity: 0; }
  12%  { opacity: 0.8; }
  100% { transform: translate3d(260%, 0, 0); opacity: 0; }
}

/* ── Slide 6: offers ─────────────────────────────────────────────────────*/
.tags { display: flex; flex-wrap: wrap; justify-content: center;
        gap: clamp(9px, 1.5vw, 16px); margin-top: clamp(20px, 3.4vh, 40px); }
.tag {
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: clamp(13px, 1.9vw, 19px);
  background: var(--glass);
  border: 2px solid var(--glass-line);
  box-shadow: var(--glass-lift);
}
.tag--solid { background: var(--deep); border-color: var(--deep);
              color: #ffd79a; box-shadow: 0 12px 28px rgba(88,21,10,.28); }

/* ── Slide 7: tracking ───────────────────────────────────────────────────
   The four states light one after another when the slide arrives — a clock,
   not the scroll, because a snapped deck never lingers between slides. */
.track-grid { display: grid; gap: clamp(18px, 3.6vw, 48px); align-items: center; }
@media (min-width: 900px) { .track-grid { grid-template-columns: 1.1fr 0.9fr; } }

.track { position: relative; display: grid; gap: clamp(8px, 1.4vh, 14px);
         margin-top: clamp(16px, 2.6vh, 30px);
         padding-inline-start: clamp(32px, 4.4vw, 52px); }
.track::before, .track::after {
  content: ""; position: absolute; inset-block: 14px;
  inset-inline-start: clamp(10px, 1.5vw, 17px); width: 2px;
}
.track::before { background: rgba(255, 255, 255, 0.24); }
.track::after {
  background: linear-gradient(to bottom, #fff, #ffd79a);
  transform: scaleY(var(--fill, 0));
  transform-origin: top;
  transition: transform 0.5s var(--ease);
}

.state {
  position: relative; display: flex; align-items: center;
  gap: clamp(10px, 1.6vw, 17px);
  padding: clamp(9px, 1.3vw, 15px) clamp(12px, 1.7vw, 19px);
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  opacity: 0.38;
  transform: scale(0.985);
  transition: opacity .45s var(--ease), transform .45s var(--ease),
              background .45s var(--ease);
}
.state.on { opacity: 1; transform: none;
            background: linear-gradient(155deg, rgba(255,255,255,.34),
                                                 rgba(255,255,255,.16)); }
.state::before {
  content: ""; position: absolute;
  inset-inline-start: calc(clamp(32px, 4.4vw, 52px) * -1 + clamp(3px, .8vw, 10px));
  width: 15px; aspect-ratio: 1; border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}
.state.on::before { background: #fff;
                    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.28); }
.state .ico { flex: none; width: clamp(30px, 3.8vw, 40px); aspect-ratio: 1;
              display: grid; place-items: center; border-radius: 11px;
              background: rgba(255, 255, 255, 0.92);
              font-size: clamp(14px, 2vw, 19px); }
.state b { font-weight: 700; font-size: clamp(12.5px, 1.8vw, 17px); }
.state small { display: block; color: var(--muted);
               font-size: clamp(11px, 1.4vw, 13.5px); }

.phone-shot { display: none; }
@media (min-width: 900px) {
  .phone-shot {
    display: block; justify-self: center; width: min(260px, 100%);
    border-radius: 36px; padding: 9px;
    background: linear-gradient(140deg, #d9d9de, #35353a 40%, #1d1d20 70%, #c9c9ce);
    box-shadow: 0 46px 76px rgba(28, 18, 16, 0.45);
  }
  .phone-shot img { border-radius: 28px; }
}

/* ── Slide 8: closing ────────────────────────────────────────────────────*/
.stores { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center;
          margin-top: clamp(22px, 3.6vh, 42px); }
.stores img { height: clamp(46px, 6.4vw, 60px); width: auto;
              filter: drop-shadow(0 10px 22px rgba(28, 18, 16, 0.3)); }

.legal { display: flex; flex-wrap: wrap; justify-content: center;
         gap: 7px 24px; margin-top: clamp(20px, 3vh, 34px); font-size: 13.5px; }
.legal a { color: var(--muted); text-decoration: none;
           border-bottom: 1px solid transparent; transition: .2s; }
.legal a:hover { color: #fff; border-bottom-color: #fff; }
.contact { margin-top: 15px; font-size: 13px; color: var(--faint);
           line-height: 1.9; }
.contact a { color: #ffe0b0; text-decoration: none; font-weight: 700; }

/* ── Furniture ───────────────────────────────────────────────────────────*/
.bar {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: clamp(11px, 2vh, 19px) var(--pad);
}
.bar .brand img { width: clamp(94px, 12vw, 126px);
                  filter: drop-shadow(0 3px 10px rgba(28, 18, 16, 0.35)); }

.lang { display: flex; gap: 2px; padding: 4px; border-radius: 999px;
        background: rgba(88, 21, 10, 0.24); border: 1px solid var(--glass-line);
        backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lang button { border: 0; background: none; cursor: pointer; color: var(--muted);
               font: inherit; font-size: clamp(11px, 1.4vw, 13px);
               font-weight: 700; padding: 6px clamp(8px, 1.5vw, 14px);
               border-radius: 999px; transition: color .24s, background .24s; }
.lang button[aria-pressed="true"] { background: #fff; color: var(--deep); }

.dots { position: fixed; inset-inline-end: clamp(11px, 1.8vw, 24px);
        inset-block-start: 50%; transform: translateY(-50%);
        display: flex; flex-direction: column; gap: 12px; z-index: 40; }
.dots button { width: 9px; aspect-ratio: 1; border-radius: 50%; border: 0;
               cursor: pointer; padding: 0;
               background: rgba(255, 255, 255, 0.4);
               transition: transform .35s var(--ease), background .35s var(--ease); }
.dots button.on { background: #fff; transform: scale(1.7); }
@media (max-width: 600px) { .dots { gap: 9px; }
  .dots button { width: 7px; } }

/* Where you are, said as a number. */
.count {
  position: fixed; inset-block-end: clamp(14px, 2.6vh, 26px);
  inset-inline-start: var(--pad); z-index: 40;
  font-size: 12px; font-weight: 700; letter-spacing: .28em;
  color: rgba(255, 255, 255, 0.66);
  direction: ltr;
}

.cue { position: fixed; inset-block-end: clamp(14px, 2.6vh, 26px);
       inset-inline: 0; display: grid; justify-items: center; gap: 7px;
       z-index: 30; color: rgba(255, 255, 255, 0.72); font-size: 11px;
       letter-spacing: .3em; text-transform: uppercase; pointer-events: none;
       opacity: 1; transition: opacity .5s var(--ease); }
.cue.gone { opacity: 0; }
.cue i { width: 2px; height: 28px; border-radius: 2px; display: block;
         background: linear-gradient(to bottom, #fff, transparent);
         animation: cue 1.9s ease-in-out infinite; transform-origin: top; }
@keyframes cue {
  0%   { transform: scaleY(0); opacity: 0; }
  42%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(26px); opacity: 0; }
}

.i18n { transition: opacity .19s, transform .19s; }
.i18n.is-swapping { opacity: 0; transform: translateY(5px); }

/* ── The flat fallback ───────────────────────────────────────────────────
   Switched on by home.js for readers who asked their system for less motion,
   and for screens too short to hold a slide. The same eight slides become an
   ordinary page: everything visible, nothing animated, scrolling native. */
html.flat, html.flat body { overflow: auto; height: auto; }
html.flat .stage { position: static; height: auto; touch-action: auto; }
html.flat .bg { position: fixed; inset: 0; opacity: 1; }
html.flat .orb, html.flat .cue, html.flat .count { display: none; }
html.flat .slide { position: relative; min-height: 100svh; opacity: 1;
                   visibility: visible; transform: none; pointer-events: auto; }
html.flat [data-a] { opacity: 1; transform: none; }
html.flat .state { opacity: 1; transform: none; }
html.flat .track::after { transform: scaleY(1); }
html.flat .heartbeat img, html.flat .heartbeat i, html.flat .iphone,
html.flat .dashes i, html.flat .orb img { animation: none; }
