/* ==========================================================================
   HERO: "The Digital Aroma"
   A pinned, scroll-scrubbed hero (js/aroma.js, GSAP ScrollTrigger + a canvas particle stream).
   Stage 1 logo + headline · 2 steam dissolves into a particle ribbon · 3 glass UI pieces crystallise
   · 4 they snap into one browser mockup.

   Geometry is PHYSICAL on purpose (cup on the left, mockup on the right) in both languages so the
   stream always flows left → right; only the text alignment follows the writing direction.
   Without JS / GSAP / with reduced motion the section is a normal stacked block (.aroma--static).
   ========================================================================== */

.aroma {
  --ar-bg0: #0A0D0E;
  --ar-bg1: #111618;
  --ar-teal: #2C5E68;
  --ar-teal2: #3B7A85;
  --ar-gold: #C8A96E;
  --ar-gold2: #E2C285;
  --ar-ink: #F4F6F6;
  --ar-mute: #8E9CA0;
  --ar-glass: rgba(255, 255, 255, .03);
  --ar-edge: rgba(200, 169, 110, .18);

  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  color: var(--ar-ink);
  background: radial-gradient(120% 90% at 30% 45%, var(--ar-bg1), var(--ar-bg0) 70%);
  isolation: isolate;
}

/* ------------------------------------------------------------ background */
.aroma__bg, .aroma__bg i { position: absolute; inset: 0; pointer-events: none; }
.aroma__glow {
  background:
    radial-gradient(38% 46% at 20% 50%, rgba(59, 122, 133, .30), transparent 70%),
    radial-gradient(26% 30% at 21% 24%, rgba(200, 169, 110, .20), transparent 70%);
}
.aroma__grid {
  background-image:
    linear-gradient(rgba(244, 246, 246, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 246, 246, .035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(90% 80% at 50% 50%, #000 30%, transparent 80%);
          mask-image: radial-gradient(90% 80% at 50% 50%, #000 30%, transparent 80%);
}

/* ------------------------------------------------------------------ logo */
.aroma__logo {
  position: absolute;
  z-index: 1;
  left: clamp(24px, 7vw, 130px);
  top: 50%;
  height: min(78svh, 720px);
  aspect-ratio: 813 / 1312;
  transform: translateY(-50%);
}
/* faint warm halo so the photo's own glow carries into the page background */
.aroma__logo::before { content: ""; position: absolute; inset: -10% -50%; background: radial-gradient(closest-side, rgba(196, 132, 40, .10), transparent); pointer-events: none; }
/* TEA = a photographic render (assets/tea-hero.*) in two stacked copies: the cup layer shows the
   letters, the steam layer shows only the top and sways gently. The masks overlap (the cup is
   already opaque where the steam fades out) so the seam is invisible; both are feathered at the
   edges so the photo's dark backdrop melts into the hero background. */
.aroma__logo picture, .aroma__img { display: block; width: 100%; height: 100%; }
.aroma__img { object-fit: cover; pointer-events: none; user-select: none; }
.aroma__img--cup, .aroma__steam {
  position: absolute; inset: 0;
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
}
.aroma__img--cup {
  -webkit-mask-image: linear-gradient(to bottom, transparent 28%, #000 38%), radial-gradient(50% 50% at 50% 50%, #000 72%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 28%, #000 38%), radial-gradient(50% 50% at 50% 50%, #000 72%, transparent 100%);
}
.aroma__steam {
  -webkit-mask-image: linear-gradient(to bottom, #000 38%, transparent 48%), radial-gradient(50% 50% at 50% 50%, #000 72%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 38%, transparent 48%), radial-gradient(50% 50% at 50% 50%, #000 72%, transparent 100%);
  transform-origin: 50% 46%;
}
.motion-ok .aroma__steam { animation: ar-steam 6s ease-in-out infinite alternate; }
/* WebGL version (js/tea-glass.js): draws the same photo, drains the tea with the scroll and moves
   the steam itself. The <img> layers stay for their alt text and as the fallback. */
.aroma__gl { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
.aroma__logo--gl picture { opacity: 0; }
.aroma__logo--gl .aroma__steam { animation: none; }
@keyframes ar-steam {
  0%   { transform: skewX(-1.6deg) scaleY(.985); }
  50%  { transform: skewX(.8deg) scaleY(1.02) translateX(2px); }
  100% { transform: skewX(1.8deg) scaleY(1.005) translateX(-2px); }
}

.aroma__canvas { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }

/* ------------------------------------------------------------------ copy */
.aroma__copy {
  position: absolute;
  z-index: 4;
  right: clamp(24px, 6vw, 110px);
  top: 50%;
  width: min(46vw, 640px);
  transform: translateY(-50%);
  will-change: transform, opacity;
}
.aroma__eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 22px;
  padding: 7px 14px;
  font: 500 12px/1 var(--mono, 'JetBrains Mono', monospace);
  letter-spacing: .16em;
  color: var(--ar-gold2);
  border: 1px solid var(--ar-edge);
  border-radius: 999px;
  background: var(--ar-glass);
}
[lang="he"] .aroma__eyebrow { letter-spacing: .04em; font-family: var(--font-he); font-size: 13px; }
.aroma__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ar-gold); box-shadow: 0 0 12px var(--ar-gold); }

.aroma__title {
  margin: 0 0 22px;
  font-family: 'Space Grotesk', var(--font-en);
  font-size: clamp(38px, 4.9vw, 84px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--ar-ink);
}
[lang="he"] .aroma__title {
  font-family: var(--font-he);
  font-size: clamp(42px, 5.6vw, 92px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.01em;
  text-transform: none;
}
.aroma__sub {
  max-width: 34em;
  margin: 0 0 32px;
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.65;
  color: var(--ar-mute);
}
.aroma__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; }
.aroma__cta {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 26px;
  font-weight: 700; font-size: 15px;
  color: var(--ar-gold2);
  background: rgba(200, 169, 110, .06);
  border: 1px solid rgba(200, 169, 110, .55);
  border-radius: 12px;
  text-decoration: none;
  transition: background-color .25s, color .25s, box-shadow .25s, border-color .25s;
  will-change: transform;
}
.aroma__cta .icon { width: 18px; height: 18px; }
.aroma__cta:hover { background: var(--ar-gold); color: #0A0D0E; border-color: var(--ar-gold); box-shadow: 0 8px 36px -8px rgba(200, 169, 110, .6); }
.aroma__cta:focus-visible, .aroma__link:focus-visible, .aroma__scroll:focus-visible { outline: 2px solid var(--ar-gold2); outline-offset: 4px; }
.aroma__link { color: var(--ar-ink); font-weight: 500; text-decoration: none; border-bottom: 1px solid rgba(244, 246, 246, .3); padding-bottom: 2px; }
.aroma__link:hover { border-color: var(--ar-gold2); color: var(--ar-gold2); }

/* Entrance after the intro (the H1 itself is never hidden). */
html.js.motion-ok:not(.intro-done):not(.lang-arrive):not(.lang-arrived) .aroma [data-rise],
html.js.motion-ok:not(.intro-done):not(.lang-arrive):not(.lang-arrived) .aroma__logo { opacity: 0; }
html.intro-done .aroma [data-rise] { animation: ar-rise .9s var(--ease, ease-out) both; animation-delay: calc(var(--i, 0) * 110ms + 150ms); }
html.intro-done:not(.lang-arrive) .aroma__logo { animation: ar-fade 1.2s var(--ease, ease-out) both; }
@keyframes ar-rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes ar-fade { from { opacity: 0; } }

/* ------------------------------------------------------------ scroll pill */
.aroma__scroll {
  position: absolute; z-index: 5;
  left: clamp(24px, 4vw, 64px); bottom: 28px;
  display: inline-flex; align-items: center; gap: 12px;
  font: 500 11px/1 var(--mono, monospace); letter-spacing: .18em; text-transform: uppercase;
  color: var(--ar-mute); text-decoration: none;
}
[lang="he"] .aroma__scroll { font-family: var(--font-he); letter-spacing: .06em; font-size: 12px; }
.aroma__pill { position: relative; width: 22px; height: 36px; border: 1px solid rgba(244, 246, 246, .3); border-radius: 12px; }
.aroma__pill i { position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--ar-gold2); }
.motion-ok .aroma__pill i { animation: ar-wheel 1.8s ease-in-out infinite; }
@keyframes ar-wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ------------------------------------------------------------ UI mockup */
.aroma__ui {
  position: absolute; z-index: 3;
  right: clamp(24px, 6vw, 110px);
  top: 50%;
  width: min(46vw, 640px);
  aspect-ratio: 16 / 11;
  transform: translateY(-50%);
  pointer-events: none;
}
.aroma__stage { position: absolute; inset: 0; container-type: inline-size; }
.aroma__stage > * { position: absolute; }
.aroma__stage i, .aroma__stage b, .aroma__stage span, .aroma__stage em, .aroma__stage u, .aroma__stage mark { font-style: normal; font-weight: inherit; text-decoration: none; }

/* Glass surfaces */
.u-browser, .u-code, .u-tokens {
  background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)), #0E1517;
  contain: paint;
  border: 1px solid var(--ar-edge);
  border-radius: 1.6cqw;
  box-shadow: 0 3cqw 8cqw -2cqw rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 255, 255, .02);
  overflow: hidden;
}

/* --- browser (final product) */
.u-browser { inset: 0; font-family: 'Space Grotesk', var(--font-en); }
.ub__bar { position: absolute; inset: 0 0 auto 0; height: 7.5%; display: flex; align-items: center; gap: 1cqw; padding-inline: 2cqw; background: rgba(255, 255, 255, .04); border-bottom: 1px solid var(--ar-edge); }
.ub__bar i { width: 1.1cqw; height: 1.1cqw; border-radius: 50%; background: rgba(244, 246, 246, .25); }
.ub__bar span { margin-inline: auto; padding: .5cqw 6cqw; font: 500 1.35cqw/1.2 var(--mono, monospace); color: var(--ar-mute); background: rgba(0, 0, 0, .3); border-radius: 99px; }
.ub__nav { position: absolute; left: 4%; right: 4%; top: 12%; height: 8%; display: flex; align-items: center; gap: 3cqw; font-size: 1.5cqw; color: var(--ar-mute); }
.ub__logo { width: 2.6cqw; height: 2.6cqw; border-radius: 50%; background: linear-gradient(135deg, var(--ar-gold2), var(--ar-teal2)); margin-inline-end: auto; }
.ub__nav em { padding: .8cqw 2cqw; border-radius: 99px; background: var(--ar-teal2); color: #fff; font-size: 1.4cqw; }
.ub__txt { position: absolute; left: 4%; top: 26%; width: 50%; height: 36%; }
.ub__txt h3 { margin: 0 0 1.6cqw; font-size: 4.3cqw; line-height: 1.04; font-weight: 700; color: var(--ar-ink); letter-spacing: -.01em; }
.ub__txt mark { background: none; color: var(--ar-gold2); }
.ub__txt p { margin: 0 0 2cqw; font-size: 1.55cqw; line-height: 1.5; color: var(--ar-mute); }
.ub__txt u { display: inline-block; padding: 1cqw 2.2cqw; font-size: 1.5cqw; font-weight: 700; color: var(--ar-gold2); border: 1px solid rgba(200, 169, 110, .55); border-radius: 1cqw; }
.ub__img { position: absolute; left: 58%; top: 26%; width: 38%; height: 36%; border-radius: 1.2cqw; overflow: hidden; border: 1px solid var(--ar-edge); }
.ub__img svg { width: 100%; height: 100%; display: block; }
.ub__c { position: absolute; top: 68%; height: 26%; width: 29%; padding: 1.8cqw; border: 1px solid var(--ar-edge); border-radius: 1.2cqw; background: rgba(255, 255, 255, .03); font-size: 1.5cqw; font-weight: 700; color: var(--ar-ink); }
.ub__c b { display: block; width: 3cqw; height: 3cqw; margin-bottom: 1.4cqw; border-radius: .8cqw; background: linear-gradient(135deg, var(--ar-teal2), var(--ar-teal)); }
.ub__c--1 { left: 4%; } .ub__c--2 { left: 35.5%; } .ub__c--2 b { background: linear-gradient(135deg, var(--ar-gold2), var(--ar-gold)); } .ub__c--3 { left: 67%; }

/* --- wireframe skeleton */
.u-wire { inset: 0; border: 1px solid rgba(59, 122, 133, .55); border-radius: 1.6cqw; background:
  linear-gradient(rgba(59, 122, 133, .12) 1px, transparent 1px) 0 0 / 5cqw 5cqw,
  linear-gradient(90deg, rgba(59, 122, 133, .12) 1px, transparent 1px) 0 0 / 5cqw 5cqw,
  rgba(14, 21, 23, .55);
  box-shadow: 0 0 6cqw rgba(59, 122, 133, .25), inset 0 0 6cqw rgba(59, 122, 133, .08); }
.wb { position: absolute; border: 1px dashed rgba(200, 169, 110, .75); background: rgba(200, 169, 110, .05); }
.wb::before, .wb::after { content: ""; position: absolute; width: 1cqw; height: 1cqw; background: var(--ar-gold); }
.wb::before { left: -.5cqw; top: -.5cqw; } .wb::after { right: -.5cqw; bottom: -.5cqw; }
.wb--nav { left: 4%; top: 12%; width: 92%; height: 8%; }
.wb--txt { left: 4%; top: 26%; width: 50%; height: 36%; }
.wb--img { left: 58%; top: 26%; width: 38%; height: 36%; }
.wb--c1 { left: 4%; top: 68%; width: 29%; height: 26%; } .wb--c2 { left: 35.5%; top: 68%; width: 29%; height: 26%; } .wb--c3 { left: 67%; top: 68%; width: 29%; height: 26%; }
.wr { background: rgba(200, 169, 110, .5); }
.wr--x { left: 0; right: 0; top: 64.5%; height: 1px; }
.wr--y { top: 0; bottom: 0; left: 56%; width: 1px; }
.wl { font: 500 1.2cqw/1 var(--mono, monospace); color: var(--ar-gold2); background: #0E1517; padding: .4cqw .8cqw; border: 1px solid var(--ar-edge); border-radius: .5cqw; }
.wl--w { left: 38%; top: 3%; } .wl--g { left: 57.5%; top: 64.9%; }

/* --- code card */
.u-code { left: -9%; bottom: -5%; width: 46%; font-family: var(--mono, monospace); }
.uc__bar { display: flex; align-items: center; gap: .9cqw; padding: 1.2cqw 1.6cqw; border-bottom: 1px solid var(--ar-edge); }
.uc__bar i { width: 1cqw; height: 1cqw; border-radius: 50%; background: rgba(244, 246, 246, .25); }
.uc__bar span { margin-inline-start: auto; font-size: 1.2cqw; color: var(--ar-mute); }
.uc__pre { margin: 0; padding: 1.8cqw; font-size: 1.45cqw; line-height: 1.75; color: #C9D3D5; white-space: pre; }
.uc__pre code { display: block; }
.uc__pre .ln { display: block; }
.uc__pre .k { color: var(--ar-teal2); filter: brightness(1.5); } .uc__pre .s { color: var(--ar-gold2); } .uc__pre .f { color: #fff; } .uc__pre .a { color: #9CC8CF; }

/* --- design tokens */
.u-tokens { right: -6%; top: -15%; width: 34%; padding: 2cqw; font-family: 'Space Grotesk', var(--font-en); }
.ut__sw { display: flex; gap: 1cqw; margin-bottom: 2cqw; }
.ut__sw i { flex: 1; aspect-ratio: 1; border-radius: .9cqw; background: var(--c); border: 1px solid rgba(255, 255, 255, .15); }
.ut__ty { display: flex; align-items: baseline; gap: 1.6cqw; margin-bottom: 2cqw; color: var(--ar-ink); }
.ut__ty .t1 { font-size: 5cqw; font-weight: 700; } .ut__ty .t2 { font-size: 3.4cqw; color: var(--ar-gold2); } .ut__ty .t3 { font-size: 2.2cqw; color: var(--ar-mute); }
.ut__row { display: flex; align-items: center; justify-content: space-between; }
.ut__tg { position: relative; width: 5cqw; height: 2.6cqw; border-radius: 99px; background: var(--ar-teal2); }
.ut__tg i { position: absolute; top: .3cqw; right: .3cqw; width: 2cqw; height: 2cqw; border-radius: 50%; background: #fff; }
.ut__btn { padding: .9cqw 2cqw; font-size: 1.5cqw; font-weight: 700; color: #0A0D0E; background: var(--ar-gold); border-radius: .9cqw; }

/* ------------------------------------------------------------- value line */
.aroma__value {
  position: absolute; z-index: 5;
  right: clamp(24px, 6vw, 110px);
  top: calc(50% + min(46vw, 640px) * 11 / 32 + 52px);
  width: min(46vw, 640px);
  margin: 0;
  text-align: center;
  font: 500 clamp(12px, 1.05vw, 15px)/1.4 var(--mono, monospace);
  letter-spacing: .12em;
  color: var(--ar-gold2);
  opacity: 0;
}
[lang="he"] .aroma__value { font-family: var(--font-he); letter-spacing: .03em; font-size: clamp(14px, 1.15vw, 17px); }

/* ---------------------------------------------------- pre-states (JS on) */
html.js:not(.aroma-static) .aroma__ui .u-wire,
html.js:not(.aroma-static) .aroma__ui .u-browser,
html.js:not(.aroma-static) .aroma__ui .u-code,
html.js:not(.aroma-static) .aroma__ui .u-tokens { opacity: 0; }

/* ------------------------------------------------------------ mobile */
@media (max-width: 899px) {
  .aroma__logo { left: 50%; top: calc(var(--island-h-top, 64px) + 24px); height: 25svh; transform: translateX(-50%); }
  .aroma__copy { left: 24px; right: 24px; width: auto; top: calc(var(--island-h-top, 64px) + 24px + 25svh + 14px); transform: none; text-align: start; }
  .aroma__eyebrow { margin-bottom: 14px; padding: 6px 12px; font-size: 10.5px; }
  .aroma__title { font-size: clamp(30px, 9vw, 46px); margin-bottom: 14px; }
  [lang="he"] .aroma__title { font-size: clamp(34px, 10vw, 52px); }
  .aroma__sub { font-size: 14.5px; margin-bottom: 20px; }
  .aroma__cta { padding: 13px 20px; }
  .aroma__ui { left: 50%; right: auto; top: calc(var(--island-h-top, 64px) + 24px + 25svh + 36px); width: min(88vw, 440px); transform: translateX(-50%); }
  .aroma__value { left: 24px; right: 24px; width: auto; top: auto; bottom: 22px; font-size: 11px; }
  .aroma__scroll { display: none; }
  .u-code { left: -4%; bottom: -14%; width: 56%; } .u-tokens { right: 0; top: -14%; width: 40%; }
}

/* ----------------------------------------------------------- static fallback */
.aroma--static { height: auto; min-height: 0; overflow: hidden; display: grid; gap: 40px; padding: calc(var(--island-h-top, 64px) + 40px) 24px 80px; }
.aroma--static .aroma__logo, .aroma--static .aroma__copy, .aroma--static .aroma__ui, .aroma--static .aroma__value, .aroma--static .aroma__scroll { position: relative; inset: auto; left: auto; right: auto; top: auto; bottom: auto; transform: none; width: auto; }
.aroma--static .aroma__logo { height: 320px; justify-self: center; }
.aroma--static .aroma__copy { max-width: 640px; justify-self: center; }
.aroma--static .aroma__ui { width: min(100%, 560px); justify-self: center; margin: 24px 0; }
.aroma--static .aroma__value { opacity: 1; }
.aroma--static .aroma__canvas, .aroma--static .aroma__scroll { display: none; }
.aroma--static .u-wire { display: none; }
.aroma--static .u-browser, .aroma--static .u-code, .aroma--static .u-tokens { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .aroma__steam, .aroma__glow, .aroma__pill i, .aroma [data-rise], .aroma__logo { animation: none !important; opacity: 1 !important; }
}
