/* ==========================================================================
   Rashtions
   Their Instagram's own look: clean cream, bold chocolate headlines, real
   photographs. The label pattern lives on the jars only.
   ========================================================================== */

:root{
  /* paper + ink */
  --paper:#F7F2EA;
  --paper-2:#EFE6D8;
  --ink:#3A2418;
  --ink-60:rgba(58,36,24,.68);
  --ink-30:rgba(58,36,24,.36);
  --ink-12:rgba(58,36,24,.13);
  --rust:#9A6A45;

  /* flavour zones, pulled off the labels */
  --cocoa:#7A5240;
  --coffee:#48685A;
  --truffle:#6B4A78;
  --original:#3F5C84;
  --dark:#1B1410;

  /* live zone tokens — GSAP drives these */
  --zone-bg:var(--paper);
  --zone-ink:var(--ink);

  --runway:330vh;   /* 0.86 of it is film, see FILM_END in js/site.js */
  --gut:clamp(20px,5vw,96px);
  /* one scale for every section: headline size and vertical rhythm */
  --h2:clamp(38px,4.8vw,72px);
  --pad:clamp(80px,12vh,120px);

  --display:"Archivo","Helvetica Neue",sans-serif;
  --ui:"Archivo","Helvetica Neue",sans-serif;
  --arabic:"Noto Kufi Arabic",var(--ui);
}

*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;padding:0}
html{-webkit-text-size-adjust:100%;scroll-behavior:auto}
body{
  background:var(--zone-bg);
  color:var(--zone-ink);
  font-family:var(--ui);
  font-size:16px;
  overflow-x:hidden;
  transition:background-color .55s ease,color .55s ease;
}
img{max-width:100%;display:block}
::selection{background:var(--rust);color:var(--paper)}


/* ---------- shared type ---------- */
.label{
  margin:0 0 16px;
  font-family:var(--ui);font-size:.68rem;font-weight:600;
  letter-spacing:.22em;text-transform:uppercase;
  color:var(--rust);
}
/* the headline voice of their posts: heavy, slightly condensed, upper case */
.display{
  font-family:var(--display);
  font-weight:800;font-stretch:84%;
  text-transform:uppercase;
  line-height:.94;letter-spacing:-.01em;
  margin:0;color:var(--ink);
  text-wrap:balance;
}
.lede{
  font-size:clamp(15px,1.15vw,18px);line-height:1.66;
  color:var(--ink-60);max-width:46ch;margin:0;
}

/* geometric rule, drawn from the label tiles */
.rule{
  height:26px;width:100%;border:0;margin:0;
  background:
    repeating-linear-gradient(90deg,
      transparent 0 14px, currentColor 14px 15px, transparent 15px 30px);
  opacity:.22;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent);
          mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent);
}


/* ---------- topbar ---------- */
.topbar{
  position:fixed;top:0;left:0;right:0;z-index:100;
  display:flex;align-items:center;justify-content:space-between;
  padding:16px var(--gut);
  color:var(--ink);
  background:color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter:blur(18px) saturate(160%);
  -webkit-backdrop-filter:blur(18px) saturate(160%);
  border-bottom:1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  transition:background-color .45s ease, border-color .45s ease;
}
.topbar__logo{height:24px;width:auto}
.topbar__nav{display:flex;gap:clamp(16px,2.2vw,32px)}
.topbar__nav a{
  color:currentColor;text-decoration:none;
  font-size:.66rem;font-weight:600;letter-spacing:.2em;text-transform:uppercase;
  opacity:.8;transition:opacity .3s ease;
}
.topbar__nav a:hover{opacity:1}

/* ==========================================================================
   HERO
   ========================================================================== */
/* nothing an element does off the right edge may ever scroll the page */
html,body{overflow-x:clip}

.hero{position:relative;height:var(--runway)}
.hero__stage{
  position:sticky;top:0;height:100svh;width:100%;
  overflow:hidden;background:var(--paper);
  display:grid;grid-template-rows:auto minmax(0,1fr);
}
/* The copy's own cream band, clear of the header and above the film, so no
   line is ever set on top of a jar label. */
.hero__band{
  position:relative;z-index:4;
  padding:calc(var(--utility-h) + 66px + clamp(12px,2.2vh,24px)) var(--gut) clamp(16px,2.6vh,28px);
  display:flex;flex-direction:column;align-items:center;gap:clamp(10px,1.8vh,18px);
}
.hero__film{position:relative;min-height:0}
.hero__canvas{position:absolute;inset:0;width:100%;height:100%;will-change:opacity}

/* The handoff flyer: a real element, not part of the canvas, that
 * js/site.js (paintFlyer) drives from a rect projected out of the film's own
 * coordinates to #storyDates — see the comment on the <img> in index.html.
 * It is laid out at the cutout's own pixel size and moved by transform alone,
 * so a frame of the flight costs a matrix and never a layout. It is pinned
 * exactly to scroll position with zero lag in either direction. */
.hero__flyer{
  position:fixed;top:0;left:0;
  width:603px;height:382px;   /* FLYER_SRC_BOX's own pixels, scaled by transform */
  opacity:0;z-index:20;pointer-events:none;
  transform-origin:50% 50%;will-change:transform,opacity;
  /* matches .story__ings-item img's shadow, so the flyer doesn't read as a
     flat cutout next to its five already-shadowed, already-landed siblings */
  filter:drop-shadow(0 20px 26px rgba(27,20,16,.16));
}

/* every beat shares one box sized for the longest of them, so swapping
   lines never moves the button below */
.hero{--beat-fs:clamp(28px,min(3.9vw,6.4vh),58px)}
.beats{position:relative;width:100%;height:calc(var(--beat-fs) * .95 + 74px)}
.beat{
  position:absolute;inset:0;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;opacity:0;will-change:opacity,transform;
}
.beat__k{
  margin:0 0 12px;font-size:.66rem;font-weight:700;
  letter-spacing:.24em;text-transform:uppercase;color:var(--rust);
}
.beat__h{
  font-family:var(--display);font-weight:800;font-stretch:84%;
  text-transform:uppercase;color:var(--ink);
  font-size:var(--beat-fs);line-height:.95;letter-spacing:-.01em;
  margin:0 0 12px;white-space:nowrap;
}
.beat__p{margin:0;font-size:clamp(14px,1.15vw,17px);line-height:1.5;color:var(--ink-60)}
.btn{
  display:inline-block;background:var(--ink);color:var(--paper);
  text-decoration:none;font-size:.68rem;font-weight:700;border-radius:999px;
  letter-spacing:.2em;text-transform:uppercase;padding:18px 34px;
  transition:background-color .3s ease,transform .3s ease;
}
.btn:hover{background:var(--rust);transform:translateY(-2px)}
.btn--ghost{background:transparent;color:currentColor;border:1px solid currentColor}
.btn--ghost:hover{background:currentColor;color:var(--zone-bg)}
/* the buy button: solid paper on the flavour stage's coloured ground, so the
   one action that earns money is also the heaviest mark on the screen */
.btn--buy{background:var(--paper);color:#1B1410}
.btn--buy:hover{background:var(--rust);color:var(--paper)}

/* The jump to the flavours, dead centre at the foot of the film. It is the
   only way past the hero for someone who does not want to scroll the whole
   reel, so it is a solid fill rather than a ghost: over footage this bright,
   a bordered transparent button would disappear. js/site.js fades it on the
   same curve as the film itself, so it leaves when the footage does instead
   of hanging over the blank paper the dates fly across. */
.herocta{
  position:relative;z-index:6;
  background:var(--ink);color:var(--paper);text-decoration:none;
  font-size:.66rem;font-weight:700;letter-spacing:.2em;text-transform:uppercase;
  padding:15px 30px;white-space:nowrap;border-radius:999px;
  transition:background-color .3s ease,transform .3s ease;
}
.herocta:hover{background:var(--rust);transform:translateY(-2px)}
.herocta:focus-visible{outline:2px solid var(--rust);outline-offset:3px}


/* ==========================================================================
   INGREDIENTS — pinned chapter
   ========================================================================== */

.flavour__body{max-width:40ch}
.flavour__idx{font-size:.72rem;font-weight:700;letter-spacing:.2em;opacity:.7;margin:0 0 16px}
.flavour__h{font-size:clamp(34px,4.3vw,70px);margin:0 0 18px;color:inherit}
.flavour__p{font-size:clamp(14px,1.1vw,17px);line-height:1.65;opacity:.88;margin:0 0 26px;max-width:38ch}
.flavour__meta{
  display:flex;gap:clamp(20px,3vw,44px);margin:0 0 30px;
  padding-top:20px;border-top:1px solid rgba(246,241,231,.26);
}
.flavour__meta div{font-size:.62rem;font-weight:600;letter-spacing:.18em;text-transform:uppercase;opacity:.85}
.flavour__meta b{display:block;font-size:1.6rem;font-weight:800;font-stretch:84%;letter-spacing:0;opacity:1;margin-top:6px}

/* Gifting styles live in components.css (two-act reveal + carousel); the old
   grid block here was silently turning the acts into side-by-side columns. */

/* ==========================================================================
   FOLLOW ON INSTAGRAM
   The one section that borrows a colour that isn't the brand's own — the
   platform's, not a flavour's, because the point here is Instagram itself.
   ========================================================================== */
.social{
  position:relative;isolation:isolate;overflow:hidden;
  /* the copy column carries a 44px headline beside a 130px button, so it gets
     the wider share; the card is capped at 460px anyway, so on wide screens
     this changes nothing and only buys the headline room at mid widths */
  display:grid;grid-template-columns:minmax(0,.34fr) minmax(0,.66fr);
  align-items:center;gap:clamp(28px,4vw,80px);
  padding:var(--social-pad) var(--gut);
  color:var(--ink);
  /* named because .social__copy has to discount it: the copy sits in the grid's
     content box while the button is absolute against the section's padding box,
     and the two only sit on one line once the copy subtracts the padding */
  --social-pad:var(--pad);
  background:var(--paper-2);
  /* single source of truth for the video's own box, so .social__follow can
     find the fingertip in the pointing pose without duplicating the maths */
  --jar-w:clamp(220px,26vw,460px);
  --jar-right:clamp(10px,4vw,60px);
  --jar-h:calc(var(--jar-w) * 720 / 624);
  /* the button is given this width rather than left to size itself, so the
     copy above it can be placed off the same edge and actually line up */
  --follow-w:130px;
  /* the fingertip's own distance in from the section's right edge — the one
     number the button and the copy above it are both hung from */
  --finger-x:calc(var(--jar-right) + var(--jar-w) * .968);
}
.social > *{position:relative;z-index:1}
/* Dropped out of the grid's centre onto the same floor line the figure stands
   on: he's pinned to the section's bottom edge, which sits a --social-pad below
   the grid's own content box, so the card gives that padding back as negative
   margin. His soles aren't on that edge either — the video keeps 2.9% of its
   height as clear frame under them — so the card is lifted by the same share
   and the two sit on one line. It keeps its full size; the section simply ends
   where both of them do, which also brings its top back down into view. */
.social__widget{
  background:#FDFBF6;border-radius:14px;aspect-ratio:5/6;max-width:460px;
  width:100%;overflow:hidden;box-shadow:0 26px 60px rgba(58,36,24,.18);
  align-self:end;margin-bottom:calc(var(--jar-h) * .029 - var(--social-pad));
  /* the card's own margin, so the widget's avatar and captions aren't run up
     against the edge. It's a border rather than padding because the iframe is
     deliberately taller than the card (see below) and overflow:hidden clips at
     the padding edge — padding would sit *inside* the clip and the frame would
     simply bleed through it at the bottom. A border is outside that region, so
     the same figure holds on all four sides. box-sizing:border-box keeps the
     outer 5:6 box, and with it the figure's floor line, exactly where it was. */
  border:var(--widget-inset) solid #FDFBF6;
  --widget-inset:16px;
}
/* the iframe is cross-origin — can't reach in and remove Elfsight's own
   "free widget" badge from its DOM, so instead it's run taller than the
   visible card and pinned to the top; the badge, which sits at the bottom
   of the iframe's own page, ends up past the card's edge and .social__widget's
   overflow:hidden crops it off along with some of the trailing post image.
   scrolling="no" in the markup goes with this: the card's inset takes 32px off
   the frame's width, Elfsight's own layout reflows a little taller for it, and
   without it the frame answers by showing its own scrollbar down the crop. */
.social__widget-frame{
  display:block;position:absolute;top:0;left:0;
  width:100%;height:calc(100% + 110px);border:0;
}
.social__handle{
  display:flex;align-items:center;gap:8px;margin:0 0 18px;
  font-family:var(--ui);font-size:.78rem;font-weight:600;letter-spacing:.04em;
  opacity:.92;
}
/* no more .social__follow sitting under it holding the block down, so the
   headline can drop straight to the widget's own optical centre instead of
   the old middle-of-three-lines position */
.social__h{font-size:clamp(22px,3vw,44px);margin:0}
/* The copy sits immediately left of the button and on its line, so the two
   read as one phrase the hand is pointing at.
   padding-right clears the button, its 20px fingertip gap and the 28px the
   text keeps off it, less the section's own gutter (the grid's box already
   stops a gutter short of the edge).
   padding-bottom lands the copy's last line flush with the button's bottom
   edge — the button's own .678 - 25px, less the section padding the grid box
   sits inside. The text itself reads left to right, so it starts at the
   column's left edge and the padding is only there to stop it running into
   the button. */
.social__copy{
  align-self:end;
  padding-right:calc(var(--finger-x) + 20px + var(--follow-w) + 20px - var(--gut));
  padding-bottom:calc(var(--jar-h) * .678 - 25px - var(--social-pad));
}
.social__jar{
  display:block;position:absolute;z-index:1;right:var(--jar-right);bottom:0;
  width:var(--jar-w);height:auto;aspect-ratio:624/720;object-fit:contain;
  filter:drop-shadow(0 30px 40px rgba(58,36,24,.25));
}
/* Pinned to the pointing hand's own fingertip, measured off the frames the
   loop actually holds: 3.21% in from the video box's left edge, 32.18% down
   from its top, so 1 - those for the offsets below. The finger runs level
   (it rises ~3° over its length), so the ray leaves the fingertip sideways
   and enters the button through the middle of its right edge — hence the
   two flat px terms, both real button geometry rather than fudge: 25px is
   half its fixed 50px height, 20px the gap that keeps the fingertip off
   the border. The fractions carry the tracking at any viewport width. */
.social__follow{
  position:absolute;z-index:2;
  width:var(--follow-w);text-align:center;
  right:calc(var(--finger-x) + 20px);
  bottom:calc(var(--jar-h) * .678 - 25px);
}
.social .btn--ghost:hover{background:var(--ink);border-color:var(--ink);color:var(--paper)}
/* stacks earlier than the page's usual 860: the figure takes 26vw and the
   button another 130px out of the copy's column, so below about a thousand
   the headline is left breaking into orphans beside them */
@media (max-width:1000px){
  .social{grid-template-columns:1fr;justify-items:center;text-align:center}
  .social__handle{justify-content:center}
  /* nothing to sit level with once the figure is in flow below the card */
  .social__widget{align-self:auto;margin-bottom:0}
  /* the fingertip offsets don't apply once the video drops into normal flow */
  .social__copy{padding-right:0;padding-bottom:0}
  .social__jar{position:relative;right:auto;bottom:auto;margin-top:24px;width:clamp(180px,58vw,300px)}
  /* the pointing hand isn't reliably positioned once the jar drops into
     normal flow below the copy, so the button rejoins the text stack here */
  .social__follow{position:relative;right:auto;bottom:auto;margin-top:8px}
}

/* ==========================================================================
   FAQ — editorial rules, no boxes
   ========================================================================== */
.faq{
  position:relative;overflow:clip;isolation:isolate;
  padding:var(--pad) var(--gut);
  background:var(--paper);
}
.faq__head{display:flex;justify-content:space-between;align-items:flex-end;gap:30px;flex-wrap:wrap;margin-bottom:clamp(36px,6vh,70px)}
.faq__h{font-size:var(--h2);margin:0}
/* the questions sit on a cream card, the same paper the label card uses */
.faq__list{
  background:#FFFDF9;border-radius:18px;
  box-shadow:0 20px 44px rgba(58,36,24,.08);
  padding:0 clamp(24px,3vw,46px);
}
.faq__item{border-bottom:1px solid var(--ink-12)}
.faq__item:last-child{border-bottom:0}
.faq__q{
  width:100%;background:none;border:0;cursor:pointer;text-align:left;
  padding:clamp(22px,3.2vh,34px) 0;
  display:flex;align-items:center;justify-content:space-between;gap:28px;
  font-family:var(--ui);font-weight:600;
  font-size:clamp(17px,1.6vw,23px);line-height:1.3;letter-spacing:-.005em;
  color:var(--zone-ink);
  transition:color .3s ease;
}
.faq__q:hover{color:var(--rust)}
.faq__q i{
  flex:none;width:16px;height:16px;position:relative;opacity:.5;
  transition:transform .45s cubic-bezier(.4,0,.2,1);
}
.faq__q i::before,.faq__q i::after{
  content:"";position:absolute;background:currentColor;
  left:0;top:50%;width:100%;height:1px;transform:translateY(-50%);
}
.faq__q i::after{transform:translateY(-50%) rotate(90deg);transition:opacity .35s ease}
.faq__item.is-open .faq__q i{transform:rotate(135deg)}
.faq__a{overflow:hidden;height:0}
.faq__a p{margin:0 0 clamp(22px,3.2vh,34px);max-width:60ch;line-height:1.72;color:var(--ink-60)}

.foot{
  padding:clamp(40px,6vh,70px) var(--gut);
  border-top:1px solid var(--ink-12);
  display:flex;justify-content:space-between;align-items:center;gap:24px;flex-wrap:wrap;
  font-size:.64rem;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-30);
  background:var(--paper);
}
.foot__ar{font-family:var(--arabic);letter-spacing:0;text-transform:none;font-size:.8rem}

/* ==========================================================================
   reveal primitives
   ========================================================================== */
.r-up{opacity:0;transform:translateY(26px);will-change:transform,opacity}
.r-left{opacity:0;transform:translateX(-38px);will-change:transform,opacity}
.r-right{opacity:0;transform:translateX(38px);will-change:transform,opacity}
.r-scale{opacity:0;transform:scale(.93);will-change:transform,opacity}

/* ==========================================================================
   responsive
   ========================================================================== */
@media (max-width:980px){
  .flavour{grid-template-columns:1fr;text-align:left;min-height:auto;gap:34px}
  .flavour:nth-child(even) .flavour__media{order:0}
  .gift{grid-template-columns:1fr}
}
@media (max-width:860px){
  :root{--runway:290vh}
  .hero__band{padding-top:calc(var(--utility-h) + 62px + 14px);padding-bottom:18px}
  .hero{--beat-fs:clamp(28px,8vw,36px)}
  .beats{height:calc(var(--beat-fs) * .95 * 2 + 78px)}
  .beat__h{white-space:normal;max-width:16ch;text-wrap:balance}
  .herocta{padding:13px 24px;font-size:.62rem}
  .topbar__nav a{font-size:.6rem;letter-spacing:.12em}
  .topbar__actions{gap:12px}
  .topbar__logo{height:21px}
  .foot{flex-direction:column;align-items:flex-start;gap:14px}
}

@media (prefers-reduced-motion:reduce){
  .r-up,.r-left,.r-right,.r-scale{opacity:1;transform:none}
}
