/* ARV3XA — V06 dynamic layer: scroll story (home), biomass calculator (home),
   world map (about), animated process flows (technology sheets). Uses style.css + v5.css tokens. */

/* ---------- 1. scroll story (home) ---------- */
.story6 { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); margin-top: 1rem; }
.story-visual { position: sticky; top: calc(50vh - min(19vw, 230px)); align-self: start; width: min(38vw, 460px); aspect-ratio: 1; justify-self: center; }
.sv-frame { position: absolute; inset: 9%; border-radius: 50%; overflow: hidden; background: var(--navy); box-shadow: 0 0 0 1px rgba(201,162,85,.35), 0 40px 80px -40px rgba(0,0,0,.6); }
.sv-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.12); transition: opacity 1s ease, transform 6s ease-out; }
.sv-frame img.on { opacity: 1; transform: scale(1.02); }
.sv-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sv-ring .track { fill: none; stroke: var(--line); stroke-width: 1; }
.sv-ring .prog { fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 100px 100px; }
.sv-ring .node { fill: var(--ground, #F6F3EC); stroke: var(--line); stroke-width: 1; transition: fill .5s, stroke .5s; }
.sv-ring .node.on { fill: var(--gold); stroke: var(--gold); }
.sv-ring text { font: 600 6px var(--mono); fill: var(--muted); text-anchor: middle; dominant-baseline: central; transition: fill .5s; }
.sv-ring text.on { fill: #0E1B30; }
.sv-cap { position: absolute; left: 50%; bottom: 13%; transform: translateX(-50%); background: rgba(8,17,31,.78); color: var(--gold); font: 600 .72rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; padding: .5rem .85rem; border-radius: 99px; white-space: nowrap; }
.story-steps { display: grid; }
.story-step { min-height: 32vh; display: flex; flex-direction: column; justify-content: center; gap: .6rem; padding-block: 2rem; opacity: .28; transition: opacity .6s ease; }
.story-step:first-child { min-height: 32vh; justify-content: flex-start; padding-top: 10vh; }
.story-step:last-child { min-height: 45vh; }
.story-step.on { opacity: 1; }
.story-step .step { color: var(--gold-ink); font-size: .85rem; letter-spacing: .1em; }
.story-step h3 { font: 300 clamp(1.6rem, 3vw, 2.3rem)/1.15 var(--display); margin: 0; }
.story-step p { color: var(--muted); max-width: 44ch; font-size: 1.05rem; margin: 0; }
.story-step .step-img { display: none; }
@media (max-width: 860px) {
  .story { grid-template-columns: 1fr; }
  .story-visual { display: none; }
  .story-step, .story-step:first-child, .story-step:last-child { min-height: 0; padding: 1.2rem 0; opacity: 1; justify-content: flex-start; }
  .story-step .step-img { display: block; width: min(260px, 72%); aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin: 0 auto 1rem; box-shadow: 0 0 0 1px rgba(201,162,85,.35); }
}

/* ---------- 2. biomass calculator (home) ---------- */
.calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.6rem, 4vw, 3.4rem); align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: clamp(1.4rem, 3.5vw, 2.6rem); box-shadow: 0 30px 60px -45px rgba(14,27,48,.45); }
.calc-in { display: grid; gap: 1.8rem; }
.calc-field { display: grid; gap: .55rem; }
.calc-field .lab { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font: 500 .95rem var(--display); }
.calc-field output { font: 600 1.25rem var(--mono); color: var(--gold-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-field input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; padding: 0; margin: 0; border: 0; box-shadow: none; border-radius: 99px; background: linear-gradient(90deg, var(--gold) var(--p, 10%), var(--line) var(--p, 10%)); outline-offset: 6px; cursor: pointer; }
.calc-field input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); border: 3px solid var(--gold); box-shadow: 0 0 0 5px var(--gold-soft); }
.calc-field input[type=range]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--navy); border: 3px solid var(--gold); box-shadow: 0 0 0 5px var(--gold-soft); }
.calc-field .scale { display: flex; justify-content: space-between; font: .72rem var(--mono); color: var(--muted); }
.calc-split { display: grid; gap: .45rem; }
.calc-split .bar { display: flex; height: 34px; border-radius: 6px; overflow: hidden; font: 600 .72rem/34px var(--mono); letter-spacing: .04em; }
.calc-split .bar span { padding-inline: .7rem; white-space: nowrap; overflow: hidden; background-size: 28px 28px; animation: flow6 1.6s linear infinite; }
.calc-split .char { width: 33%; background-color: var(--gold); color: #0E1B30; background-image: linear-gradient(135deg, rgba(255,255,255,.18) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.18) 75%, transparent 75%); }
.calc-split .gas { flex: 1; background-color: var(--navy); color: var(--gold); background-image: linear-gradient(135deg, rgba(201,162,85,.14) 25%, transparent 25%, transparent 50%, rgba(201,162,85,.14) 50%, rgba(201,162,85,.14) 75%, transparent 75%); }
.calc-split small { color: var(--muted); font-size: .8rem; }
@keyframes flow6 { to { background-position: 28px 0; } }
.calc-out { display: grid; gap: .9rem; }
.res { display: grid; grid-template-columns: 2.6rem 1fr; column-gap: 1rem; align-items: center; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 8px; background: var(--ground, #F6F3EC); }
.res .ic { grid-row: span 3; width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1.5px solid var(--gold); display: grid; place-items: center; color: var(--gold-ink); }
.res .ic svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.res .k { font: 600 .72rem var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.res b { font: 500 clamp(1.6rem, 3.2vw, 2.2rem)/1.15 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.res .u { font-size: .85rem; color: var(--muted); }
.calc-out .btn { justify-self: start; margin-top: .4rem; }
.calc6 .form-note { margin-top: 1.2rem; max-width: 80ch; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }

/* ---------- 3. world map (about) ---------- */
.map { position: relative; margin-top: 1.4rem; }
.map svg { display: block; width: 100%; height: auto; overflow: visible; }
.map .land { fill: none; stroke: rgba(238,241,246,.2); stroke-width: 4.6; stroke-linecap: round; }
.map .link { fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-dasharray: 3 7; opacity: .75; animation: dash6 1.4s linear infinite; }
@keyframes dash6 { to { stroke-dashoffset: -20; } }
.map .pin .dot { fill: var(--gold); }
.map .pin .halo { fill: var(--gold); opacity: .35; transform-box: fill-box; transform-origin: center; animation: pulse6 2.6s ease-out infinite; }
.map .pin:nth-of-type(2) .halo { animation-delay: .6s; } .map .pin:nth-of-type(3) .halo { animation-delay: 1.2s; } .map .pin:nth-of-type(4) .halo { animation-delay: 1.8s; }
@keyframes pulse6 { 0% { transform: scale(.6); opacity: .55; } 100% { transform: scale(3.2); opacity: 0; } }
.map .lbl { position: absolute; transform: translate(14px, -50%); color: var(--on-navy); font: 500 .95rem/1.2 var(--display); white-space: nowrap; pointer-events: none; text-shadow: 0 1px 8px rgba(7,16,31,.9); }
.map .lbl small { display: block; color: var(--gold); font: 600 .66rem var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.map .lbl.left { transform: translate(calc(-100% - 14px), -50%); text-align: right; }
.map-legend { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.map-legend li { border-top: 1px solid rgba(201,162,85,.4); padding-top: .8rem; color: var(--on-navy-muted); font-size: .92rem; }
.map-legend b { display: block; color: var(--on-navy); font: 500 1.05rem var(--display); }
@media (max-width: 760px) { .map .lbl { display: none; } .map-legend { grid-template-columns: 1fr 1fr; } }

/* ---------- 4. animated process flow (technology sheets) ---------- */
.flow.flow6 { grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr) 52px minmax(0, 1fr); gap: 0; }
.flow6 .pipe6 { position: relative; align-self: center; height: 10px; margin-inline: -1px; }
.flow6 .pipe6::before { content: ""; position: absolute; left: 0; right: 0; top: 4px; height: 2px; background: linear-gradient(90deg, var(--line), var(--gold), var(--line)); }
.flow6 .pipe6::after { content: ""; position: absolute; right: -2px; top: 0; border: 5px solid transparent; border-left: 7px solid var(--gold); border-right: 0; }
.flow6 .pipe6 i { position: absolute; top: 1px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px 2px rgba(201,162,85,.65); opacity: 0; animation: travel6 2.4s linear infinite; }
.flow6 .pipe6 i:nth-child(2) { animation-delay: .8s; } .flow6 .pipe6 i:nth-child(3) { animation-delay: 1.6s; }
@keyframes travel6 { 0% { left: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
.flow6 .box { position: relative; transition: border-color .6s, box-shadow .6s; }
.flow6 .box li { opacity: 0; transform: translateX(-8px); transition: opacity .5s ease, transform .5s ease; transition-delay: var(--ld, 0s); }
.flow6.in .box li { opacity: 1; transform: none; }
.flow6 .box.mid { display: flex; flex-direction: column; }
.flow6 .box.mid .gear6 { position: absolute; right: -18px; bottom: -18px; width: 86px; height: 86px; opacity: .55; pointer-events: none; }
.flow6 .box.mid .gear6 g { transform-origin: 100px 100px; animation: spin 14s linear infinite; }
.flow6 .box.mid .gear6 path { fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round; }
.flow6 .box.mid .gear6 circle { fill: var(--gold); }
.flow6.in .box.out6 { border-color: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
@media (max-width: 620px) {
  .flow.flow6 { grid-template-columns: 1fr; }
  .flow6 .pipe6 { justify-self: center; width: 10px; height: 52px; margin: -1px 0; }
  .flow6 .pipe6::before { left: 4px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; background: linear-gradient(180deg, var(--line), var(--gold), var(--line)); }
  .flow6 .pipe6::after { right: auto; left: 0; top: auto; bottom: -2px; border: 5px solid transparent; border-top: 7px solid var(--gold); border-bottom: 0; }
  .flow6 .pipe6 i { left: 1px; animation-name: drop6; }
  @keyframes drop6 { 0% { top: 0; opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { top: calc(100% - 8px); opacity: 0; } }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .calc-split .bar span, .map .link, .map .pin .halo, .flow6 .pipe6 i, .flow6 .box.mid .gear6 g { animation: none; }
  .flow6 .pipe6 i { opacity: 0; }
  .flow6 .box li { opacity: 1; transform: none; }
  .sv-frame img { transition: none; }
  .story-step { opacity: 1; }
}
