/* ============================================================
   ФГ "Бланш" — Cinematic Hero
   Growing mushroom + drifting spores + parallax + aurora
   ============================================================ */

.hxhero {
  position: relative;
  overflow: hidden;
  padding: clamp(130px, 17vw, 200px) 0 clamp(70px, 9vw, 120px);
  isolation: isolate;
}

/* ---------- Background layers ---------- */
.hx-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }

.hx-aurora {
  position: absolute; inset: -20%;
  background:
    radial-gradient(45% 45% at 18% 22%, rgba(34,197,94,.30), transparent 60%),
    radial-gradient(40% 40% at 82% 18%, rgba(234,179,8,.22), transparent 60%),
    radial-gradient(50% 50% at 70% 80%, rgba(22,163,74,.22), transparent 62%),
    radial-gradient(40% 40% at 25% 85%, rgba(202,138,4,.16), transparent 60%);
  filter: blur(40px);
  background-size: 200% 200%;
  animation: hx-aurora 18s ease-in-out infinite alternate;
  opacity: .9;
}
@keyframes hx-aurora {
  0%   { background-position: 0% 0%, 100% 0%, 100% 100%, 0% 100%; }
  100% { background-position: 30% 20%, 70% 30%, 60% 70%, 30% 80%; }
}

.hx-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(21,128,61,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21,128,61,.06) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 65% 42%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 65% 42%, #000, transparent 72%);
}

/* ---------- Spores ---------- */
.hx-spores { position: absolute; inset: 0; }
.hx-spore {
  position: absolute; bottom: -10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--green-500));
  opacity: 0;
  will-change: transform, opacity;
  animation-name: hx-drift;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes hx-drift {
  0%   { transform: translate(0, 0) scale(.6); opacity: 0; }
  10%  { opacity: var(--op, .6); }
  90%  { opacity: var(--op, .6); }
  100% { transform: translate(var(--dx, 20px), calc(-1 * var(--rise, 90vh))) scale(1); opacity: 0; }
}

/* ---------- Copy column ---------- */
.hx-copy { position: relative; z-index: 2; }

.hx-title { margin: 18px 0 0; }
.hx-word {
  display: inline-block;
  white-space: pre;
  opacity: 0;
  transform: translateY(28px) rotate(2deg);
  will-change: transform, opacity;
}
.hx-grad {
  background: linear-gradient(100deg, var(--green-600), var(--green-700));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hx-grad--gold {
  background: linear-gradient(100deg, var(--gold-500), var(--gold-700));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* preset hidden state for JS-driven entrance */
.hx-fade { opacity: 0; transform: translateY(22px); will-change: transform, opacity; }

/* ---------- Stage (art) ---------- */
.hx-stage {
  position: relative; z-index: 1;
  aspect-ratio: 1/1;
  display: grid; place-items: center;
  perspective: 1000px;
}
.hx-stage__inner {
  position: relative; width: 100%; height: 100%;
  display: grid; place-items: center;
  transform-style: preserve-3d;
}

/* circular backdrop */
.hx-disc {
  position: absolute; width: 78%; aspect-ratio: 1/1; border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(255,255,255,.85), rgba(240,253,244,.5) 45%, rgba(220,252,231,.25) 70%, transparent 72%);
  box-shadow: inset 0 0 60px rgba(21,128,61,.10), 0 40px 80px -30px rgba(20,83,45,.35);
}
.hx-glow {
  position: absolute; width: 72%; aspect-ratio: 1/1; border-radius: 50%;
  background: radial-gradient(circle at 42% 38%, rgba(255,245,214,.55), rgba(234,179,8,.18) 45%, transparent 68%);
  filter: blur(26px);
}

/* rotating rings (subtle) */
.hx-ring { position: absolute; border-radius: 50%; }
.hx-ring--1 {
  width: 86%; aspect-ratio: 1/1;
  border: 1px dashed rgba(21,128,61,.16);
  animation: hx-spin 38s linear infinite;
}
.hx-ring--2 {
  width: 67%; aspect-ratio: 1/1;
  border: 1px solid rgba(202,138,4,.13);
  animation: hx-spin 28s linear infinite reverse;
}
.hx-ring--2::before {
  content: ""; position: absolute; top: -4px; left: 50%; width: 7px; height: 7px;
  margin-left: -3.5px; border-radius: 50%;
  background: var(--gold-500); box-shadow: 0 0 10px rgba(202,138,4,.6); opacity: .7;
}
@keyframes hx-spin { to { transform: rotate(360deg); } }

/* orbit dots (faint drifting spores) */
.hx-orbit { position: absolute; width: 92%; aspect-ratio: 1/1; animation: hx-spin 50s linear infinite; opacity: .6; }
.hx-orbit span {
  position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--green-500));
  box-shadow: 0 0 8px rgba(34,197,94,.5);
}
.hx-orbit span:nth-child(1){ top: 4%; left: 50%; }
.hx-orbit span:nth-child(2){ top: 50%; right: 2%; width: 5px; height: 5px; background: radial-gradient(circle at 35% 30%, #fff, var(--gold-500)); }
.hx-orbit span:nth-child(3){ bottom: 8%; left: 22%; width: 5px; height: 5px; }

/* the mushroom */
.hx-mushroom { position: relative; width: 56%; max-width: 320px; will-change: transform; }
.hx-mushroom svg { width: 100%; height: auto; overflow: visible; display: block; filter: drop-shadow(0 22px 28px rgba(20,83,45,.28)); }

#mh-cap   { transform-box: fill-box; transform-origin: 50% 100%; }
#mh-stem  { transform-box: fill-box; transform-origin: 50% 100%; }
#mh-gills { transform-box: fill-box; transform-origin: 50% 0%; }
.mh-spot  { transform-box: fill-box; transform-origin: 50% 50%; }

/* floating glass cards */
.hx-card {
  position: absolute; z-index: 3;
  background: rgba(255,255,255,.78); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 18px; padding: 14px 16px; width: 196px;
  box-shadow: 0 18px 40px -14px rgba(20,83,45,.4);
  will-change: transform;
}
.hx-card__row { display: flex; align-items: center; gap: 10px; }
.hx-card__ic { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; flex: none; }
.hx-card__ic svg { width: 20px; height: 20px; }
.hx-card strong { font-family: 'Rubik', sans-serif; font-size: 14.5px; color: var(--green-900); display: block; line-height: 1.1; }
.hx-card span.sub { font-size: 12px; color: var(--ink-soft); }
.hx-card--dried { left: -6%; bottom: 12%; }
.hx-card--dried .hx-card__ic { background: var(--gold-100); color: var(--gold-700); }
.hx-card--alu   { right: -8%; top: 14%; }
.hx-card--alu .hx-card__ic { background: var(--steel-200); color: var(--steel-700); }

/* small chip */
.hx-chip {
  position: absolute; z-index: 3; top: 6%; left: 6%;
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--green-700); color: #fff;
  font-family: 'Rubik', sans-serif; font-weight: 600; font-size: 12.5px;
  padding: 8px 14px; border-radius: 99px; box-shadow: 0 12px 26px -8px rgba(21,128,61,.6);
  will-change: transform;
}
.hx-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #86efac; box-shadow: 0 0 0 0 rgba(134,239,172,.7); animation: hx-pulse 2s ease-out infinite; }
@keyframes hx-pulse { 0%{box-shadow:0 0 0 0 rgba(134,239,172,.7);} 70%{box-shadow:0 0 0 10px rgba(134,239,172,0);} 100%{box-shadow:0 0 0 0 rgba(134,239,172,0);} }

/* scroll hint */
.hx-scroll-hint {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: 'Rubik', sans-serif; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-soft); opacity: .7;
}
.hx-scroll-hint .mouse { width: 24px; height: 38px; border: 2px solid var(--green-700); border-radius: 14px; position: relative; }
.hx-scroll-hint .mouse::before { content:""; position:absolute; top:7px; left:50%; width:4px; height:8px; margin-left:-2px; border-radius:3px; background: var(--green-700); animation: hx-wheel 1.6s ease-in-out infinite; }
@keyframes hx-wheel { 0%{ transform: translateY(0); opacity:1;} 60%{ transform: translateY(10px); opacity:0;} 100%{opacity:0;} }

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .hx-stage { max-width: 460px; margin: 0 auto 8px; }
  .hx-card { width: 168px; }
  .hx-scroll-hint { display: none; }
}
@media (max-width: 680px){
  .hx-card--dried { left: -2%; bottom: 6%; }
  .hx-card--alu { right: -2%; top: 4%; }
  .hx-card { width: 150px; padding: 11px 13px; }
  .hx-chip { display: none; }
}

@media (prefers-reduced-motion: reduce){
  .hx-aurora, .hx-ring--1, .hx-ring--2, .hx-orbit, .hx-chip .dot, .hx-scroll-hint .mouse::before { animation: none !important; }
  .hx-word, .hx-fade { opacity: 1 !important; transform: none !important; }
  .hx-spore { display: none !important; }
}

/* ============================================================
   INTRO OVERLAY (cinematic load reveal)
   ============================================================ */
.intro {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 38%, #1c7040, #0f4727 68%, #093a1f);
  overflow: hidden; will-change: clip-path, opacity;
  clip-path: inset(0 0 0 0);
}
.intro.is-done { pointer-events: none; }
.intro::before {
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(40% 40% at 30% 30%, rgba(234,179,8,.18), transparent 60%),
    radial-gradient(40% 40% at 72% 68%, rgba(134,239,172,.18), transparent 60%);
  filter: blur(30px);
}
.intro__inner { position: relative; z-index: 2; text-align: center; }
.intro__mark { width: 132px; height: 132px; margin: 0 auto; opacity: 0; }
.intro__mark svg { width: 100%; height: 100%; filter: drop-shadow(0 14px 34px rgba(0,0,0,.45)); }
.intro__name { font-family: 'Rubik', sans-serif; font-weight: 600; color: #fff; font-size: clamp(30px, 6vw, 44px); letter-spacing: .05em; margin-top: 20px; opacity: 0; }
.intro__tag { font-family: 'Rubik', sans-serif; color: var(--gold-400); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; margin-top: 10px; opacity: 0; }
.intro__spores { position: absolute; inset: 0; pointer-events: none; }
.intro__spore { position: absolute; left: 50%; top: 42%; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #86efac); opacity: 0; }
.intro__skip {
  position: absolute; bottom: 26px; right: 28px; z-index: 3;
  color: rgba(255,255,255,.75); font-family: 'Rubik', sans-serif; font-size: 13px; letter-spacing: .08em;
  cursor: pointer; border: 1px solid rgba(255,255,255,.28); padding: 8px 18px; border-radius: 99px;
  transition: all .2s var(--ease);
}
.intro__skip:hover { background: rgba(255,255,255,.12); color: #fff; }
.intro-hidden .intro { display: none !important; }

/* ============================================================
   SCROLL JOURNEY (sticky scrub — mushroom life cycle)
   ============================================================ */
.journey { position: relative; height: 300vh; background: var(--green-50); }
.journey__sticky {
  position: sticky; top: 0; height: 100vh; display: flex; align-items: center; overflow: hidden;
}
.journey__sticky::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 40%, rgba(202,138,4,.14));
  opacity: var(--jp, 0); transition: opacity .1s linear;
}
.journey__layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px,5vw,64px); align-items: center; width: 100%; position: relative; z-index: 1; }

.journey__copy { position: relative; z-index: 2; }
.journey__steps { display: flex; flex-direction: column; gap: 12px; margin: 26px 0 30px; }
.jstep {
  display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 16px;
  border: 1px solid transparent; opacity: .42; transform: translateX(0);
  transition: all .45s var(--ease);
}
.jstep.active { opacity: 1; background: #fff; border-color: var(--green-200, #bbf7d0); box-shadow: var(--shadow-md); transform: translateX(8px); }
.jstep__ic { width: 46px; height: 46px; border-radius: 13px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--green-100); color: var(--green-700); transition: all .45s var(--ease); }
.jstep.active .jstep__ic { background: var(--gold-100); color: var(--gold-700); transform: scale(1.06); }
.jstep__ic svg { width: 24px; height: 24px; }
.jstep__t strong { display: block; font-family: 'Rubik', sans-serif; font-weight: 600; color: var(--green-900); line-height: 1.1; }
.jstep__t span { font-size: 14px; color: var(--ink-soft); }

.journey__stage { position: relative; display: flex; justify-content: center; align-items: center; min-height: 60vh; }
.jscene { position: relative; width: min(460px, 86%); aspect-ratio: 1/1; }
.jscene__disc {
  position: absolute; inset: 8%; border-radius: 50%;
  background: radial-gradient(circle at 40% 32%, rgba(255,255,255,.85), rgba(240,253,244,.45) 50%, transparent 72%);
  box-shadow: inset 0 0 60px rgba(21,128,61,.10), 0 40px 80px -34px rgba(20,83,45,.3);
}
.jscene__warm { position: absolute; inset: 4%; border-radius: 50%; background: radial-gradient(circle at 50% 46%, rgba(234,179,8,.5), rgba(202,138,4,.18) 45%, transparent 68%); opacity: 0; filter: blur(8px); pointer-events: none; }
.jscene__soil { position: absolute; left: 14%; right: 14%; bottom: 12%; height: 12%; border-radius: 50%; background: radial-gradient(circle at 50% 20%, #4a3622, #231708); box-shadow: 0 10px 22px -8px rgba(0,0,0,.5); opacity: 0; }
.jscene__soil::before, .jscene__soil::after { content: ""; position: absolute; border-radius: 50%; background: #6b5132; opacity: .55; }
.jscene__soil::before { width: 12%; height: 22%; left: 22%; top: 30%; }
.jscene__soil::after { width: 9%; height: 18%; right: 26%; top: 40%; background: #5c4628; }
.jscene__spores { position: absolute; inset: 0; pointer-events: none; }
.jspore { position: absolute; bottom: 16%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--green-500)); opacity: 0; animation: hx-drift linear infinite; --dx: 14px; --rise: 60vh; --op: .5; }
.jscene__fresh { position: absolute; left: 12%; right: 12%; bottom: 12%; transform-origin: 50% 100%; will-change: transform, opacity; }
.jscene__dried { position: absolute; inset: 14%; opacity: 0; transform-origin: 50% 50%; will-change: transform, opacity; display: grid; place-items: center; }
.jscene__fresh svg, .jscene__dried svg { width: 100%; height: auto; overflow: visible; }
.jscene__fresh svg { filter: drop-shadow(0 18px 24px rgba(20,83,45,.26)); }

/* vertical progress rail */
.jrail { position: absolute; left: -2px; top: 12%; bottom: 12%; width: 4px; border-radius: 4px; background: rgba(20,83,45,.12); z-index: 3; }
.jrail__fill { position: absolute; top: 0; left: 0; width: 100%; height: 0; border-radius: 4px; background: linear-gradient(var(--green-500), var(--gold-500)); transition: height .1s linear; }
.jrail__dot { position: absolute; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; border: 2px solid var(--green-200, #bbf7d0); transform: translateY(-50%); transition: all .3s var(--ease); }
.jrail__dot.active { border-color: var(--gold-500); background: var(--gold-500); box-shadow: 0 0 0 5px rgba(202,138,4,.18); }
.jrail__dot:nth-child(1){ top: 0%; } .jrail__dot:nth-child(2){ top: 33%; }
.jrail__dot:nth-child(3){ top: 66%; } .jrail__dot:nth-child(4){ top: 100%; }

@media (max-width: 900px){
  .journey { height: 300vh; }
  .journey__layout { grid-template-columns: 1fr; gap: 8px; }
  .journey__stage { order: -1; min-height: 42vh; }
  .jscene { width: min(320px, 70%); }
  .jrail { left: auto; right: 4px; }
}
@media (prefers-reduced-motion: reduce){
  .journey { height: auto; }
  .journey__sticky { position: static; height: auto; padding: 64px 0; }
  .jspore { display: none; }
}
