/* Landing page, 2 Dec 2026 rework. Loads after landing.css and overrides it where the two meet.
   1. Hero: a sticky split stage (CSS position: sticky, never a script pin).
   2. Section 02: 2 soil drawings side by side.
   3. Section 03: an amber timeline over the 6 steps (no pinning).
   4. Verify: the batch panel drawn as the corner of a woven bag, and the lab report preview.
   Nothing here may put overflow: hidden on an ancestor of .story__stage, or the stage stops sticking. */

/* ---- 1. Hero ---- */
.story { display: flex; flex-direction: column; }
.story__track { display: contents; }
.story__intro { order: 1; }
.story__stage { order: 2; }
.story__pills { order: 3; }
.story__chapters { order: 4; }

.story__frame { position: relative; grid-area: 1 / 1; height: 38vh; min-height: 260px; max-height: 360px; border-radius: 20px; overflow: hidden; background: #B08F66; box-shadow: inset 0 0 0 1px var(--hair), 0 30px 60px -40px rgba(23, 26, 22, 0.5); }
.story__svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.story__frame .scene-label { z-index: 2; opacity: 0; transition: none; margin: 0; }
.story__frame .scene-label::before { left: -15px; width: 14px; }
.story__frame .scene-label::after { content: ""; position: absolute; left: -20px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--ink); }
.story__frame .scene-label.is-left::before { left: auto; right: -15px; }
.story__frame .scene-label.is-left::after { left: auto; right: -20px; }
.story__rail { position: absolute; right: 14px; top: 18px; bottom: 18px; width: 2px; background: rgba(247, 244, 238, 0.45); border-radius: 2px; z-index: 2; display: none; }
.story__rail i { position: absolute; inset: 0; background: var(--amber); transform: scaleY(0); transform-origin: top; border-radius: 2px; }
.story__rail b { position: absolute; right: 8px; font-family: var(--mono); font-size: 11px; font-weight: 600; line-height: 1; color: rgba(247, 244, 238, 0.95); text-shadow: 0 1px 2px rgba(23, 26, 22, 0.5); transform: translateY(-50%); }
.story__rail b:nth-of-type(1) { top: 0; transform: none; }
.story__rail b:nth-of-type(2) { top: 50%; }
.story__rail b:nth-of-type(3) { top: 100%; transform: translateY(-100%); }

.story__pills { display: flex; gap: 8px; margin: 14px 0 6px; }
.story__pills[hidden] { display: none; }
.story__pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; background: transparent; border: 1px solid var(--hair); font-weight: 600; font-size: 14.5px; cursor: pointer; transition: background-color 0.3s, color 0.3s, border-color 0.3s; }
.story__pill .fig { font-size: 12px; opacity: 0.7; }
.story__pill.is-on { background: var(--deep); color: var(--on-deep); border-color: var(--deep); }

.chapter__n { display: none; }

/* Laptops and wider: the split stage. */
@media (min-width: 1024px) {
  .hero { padding-top: 96px; }
  .story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 4.4vw, 64px); align-items: start; }
  .story__track { display: block; }
  .story__intro { min-height: calc(100vh - 96px - 128px); display: flex; flex-direction: column; justify-content: center; padding-bottom: 4vh; }
  .story__pills, .story__pills[hidden] { display: none; }
  .story__stage { position: sticky; top: 96px; height: calc(100vh - 128px); min-height: 440px; display: flex; flex-direction: column; margin: 0; }
  .story__frame { flex: 1 1 auto; height: auto; min-height: 0; max-height: none; }
  .story__stage .hero__cap { flex: none; }
  .story__rail { display: block; }

  .story__chapters { display: block; max-width: none; margin-top: 0; border-top: 0; }
  .story__chapters > .chapter { display: flex; flex-direction: column; justify-content: center; gap: 14px; min-height: 75vh; padding: 0; border-bottom: 0; border-top: 1px solid var(--hair); }
  .chapter__n { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; color: var(--amber-deep); }
  .story__chapters dt { font-family: var(--serif); font-size: clamp(40px, 4.4vw, 72px); line-height: 1.02; letter-spacing: -0.02em; color: var(--ink); padding: 0; }
  .story__chapters dd { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.5; color: var(--ink-soft); max-width: 34ch; margin: 0; }
  .story--live .chapter { opacity: 0.28; transition: opacity 0.4s ease; }
  .story--live .chapter.is-on { opacity: 1; }
  .calm .story--live .chapter { opacity: 1; }
}

/* ---- 2. Section 02: the 2 soil drawings ---- */
.cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.cmp__side { margin: 0; display: grid; gap: 10px; align-content: start; }
.cmp__k { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber-deep); }
.cmp__side--van .cmp__k { color: var(--emerald); }
.cmp__svg { width: 100%; height: auto; display: block; border-radius: 16px; overflow: hidden; background: #C3A680; box-shadow: inset 0 0 0 1px var(--hair); }
.cmp__side--van .cmp__svg { box-shadow: inset 0 0 0 2px var(--emerald); }
.cmp .c-sky { fill: #F5EFE1; }
.cmp .c-ground { fill: #BFA07A; }
.cmp .c-top { fill: #77593A; }
.cmp .c-strata { fill: none; stroke: #8C6D47; stroke-width: 1.5; opacity: 0.55; }
.cmp .c-root { fill: none; stroke: #F3E9D2; stroke-width: 3; stroke-linecap: round; }
.cmp .c-leaf { fill: none; stroke: #3F7F4E; stroke-width: 7; stroke-linecap: round; }
.cmp text { font-family: var(--sans); font-size: 13px; font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: rgba(247, 244, 238, 0.9); stroke-width: 3.5px; stroke-linejoin: round; }
.cmp__svg .ov { opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease), visibility 0s 0.5s; }
.cmp[data-problem="1"] .cmp__svg .ov-1, .cmp[data-problem="2"] .cmp__svg .ov-2, .cmp[data-problem="3"] .cmp__svg .ov-3 { opacity: 1; visibility: visible; transition: opacity 0.5s var(--ease); }
.cmp .c-urea circle { fill: #FBF9F2; stroke: #9A8E78; stroke-width: 1.5; }
.cmp .c-loss path, .cmp .c-bind path { fill: none; stroke: #9C3F2C; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 6 7; animation: flow 1.6s linear infinite; }
.cmp .c-loss .head { stroke-dasharray: none; animation: none; }
.cmp .c-pgran circle { fill: #A9815A; stroke: #6B4B2C; stroke-width: 2; }
.cmp .c-bind circle { fill: #F4EEDF; stroke: #9C3F2C; stroke-width: 2; }
.cmp .c-kdots circle { fill: var(--amber); stroke: #6B4B2C; stroke-width: 1.5; }
.cmp .c-pull path { fill: none; stroke: var(--emerald); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 6 7; animation: flow 1.6s linear infinite; }
.cmp .c-vu circle { fill: #E6BE3C; stroke: #A9821C; stroke-width: 1.5; }
.cmp .c-gp circle { fill: #3A2C1E; stroke: #231A11; stroke-width: 1.5; }
.cmp .c-vp circle { fill: #F1DDC9; stroke: #5F7F96; stroke-width: 2.5; }
.cmp .c-inset { fill: #F7F4EE; stroke: var(--ink); stroke-width: 1.5; }
.cmp .c-lens { fill: none; stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 3 4; }
.cmp .c-lead { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.cmp__key { display: grid; gap: 4px; font-size: 14.5px; line-height: 1.4; color: var(--ink-soft); min-height: 3.2em; }
.cmp__key li { display: none; padding-left: 16px; position: relative; }
.cmp__key li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 8px; height: 2px; background: #9C3F2C; }
.cmp__side--van .cmp__key li { padding-left: 0; }
.cmp__side--van .cmp__key li::before { display: none; }
.cmp__key b { display: block; font-family: var(--serif); font-weight: 400; font-size: 21px; line-height: 1.15; color: var(--ink); }
.cmp[data-problem="1"] .cmp__key .ov-1, .cmp[data-problem="2"] .cmp__key .ov-2, .cmp[data-problem="3"] .cmp__key .ov-3 { display: block; }
.cmp__note { grid-column: 1 / -1; margin-top: 2px; }
@media (max-width: 560px) { .cmp { grid-template-columns: 1fr; gap: 22px; } .cmp__key { min-height: 0; } }

/* The section 02 headline lights up word by word as it is read (full motion only; the script adds .is-lit). */
.h-lit .w { overflow: visible; }

/* ---- 3. Section 03: the amber timeline ---- */
.step { position: relative; }
.step__beam { position: absolute; left: 0; right: 0; top: -1px; height: 2px; pointer-events: none; }
.step__beam i { position: absolute; inset: 0; background: var(--amber); transform: scaleX(var(--f, 0)); transform-origin: left; }
.step__beam::before { content: ""; position: absolute; left: 0; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--canvas); border: 2px solid var(--hair); transition: border-color 0.3s, background-color 0.3s; }
.step.is-lit .step__beam::before { border-color: var(--amber); background: var(--amber); }
.step + .step .step__beam { left: -1px; }
.step .step__n { margin-top: 6px; }

/* ---- 4. Verify: the corner of a woven bag ---- */
.stamp { background-color: #F3EEE2; background-image:
    repeating-linear-gradient(0deg, rgba(23, 26, 22, 0.075) 0 1px, transparent 1px 3px, rgba(255, 255, 255, 0.5) 3px 4px, transparent 4px 6px),
    repeating-linear-gradient(90deg, rgba(23, 26, 22, 0.06) 0 1px, transparent 1px 3px, rgba(255, 255, 255, 0.45) 3px 4px, transparent 4px 6px),
    linear-gradient(135deg, #FBF8F1 0%, #EDE5D4 60%, #E2D8C3 100%);
  border-radius: 6px 22px 22px 22px; padding-top: clamp(40px, 4.4vw, 56px); padding-left: clamp(40px, 4.4vw, 56px); }
/* The stitched hem along the top and the left edge. */
.stamp::before { inset: 0; opacity: 1; background:
    repeating-linear-gradient(90deg, #8A7A5C 0 9px, transparent 9px 15px) 0 17px / 100% 2px no-repeat,
    repeating-linear-gradient(0deg, #8A7A5C 0 9px, transparent 9px 15px) 17px 0 / 2px 100% no-repeat,
    linear-gradient(180deg, rgba(23, 26, 22, 0.1), transparent) 0 0 / 100% 26px no-repeat,
    linear-gradient(90deg, rgba(23, 26, 22, 0.1), transparent) 0 0 / 26px 100% no-repeat; }
/* The batch number as an inkjet print: dotted characters, slightly uneven, straight on the weave. */
.stamp .stamp__batch { border: 0; padding: 6px 0 2px; gap: 6px; }
.stamp .stamp__k, .stamp .stamp__code i { font-family: ui-monospace, "Cascadia Mono", "Consolas", "Courier New", monospace; color: #1B1D1A; background: transparent;
  -webkit-mask-image: radial-gradient(circle, #000 1.05px, transparent 1.3px); mask-image: radial-gradient(circle, #000 1.05px, transparent 1.3px);
  -webkit-mask-size: 3px 3px; mask-size: 3px 3px; }
.stamp .stamp__k { font-size: 17px; font-weight: 700; letter-spacing: 0.2em; }
.stamp .stamp__code { display: flex; flex-wrap: nowrap; gap: 2px; }
.stamp .stamp__code i { display: block; width: auto; height: auto; padding: 0 3px; border-radius: 0; font-size: clamp(40px, 4.4vw, 62px); font-weight: 700; line-height: 1.05; letter-spacing: 0.04em; -webkit-mask-size: 4px 4px; mask-size: 4px 4px; }
.stamp .stamp__code i:nth-child(odd) { transform: translateY(1px); }
.stamp .stamp__bars { display: none; }
.stamp__preview { display: grid; gap: 14px; }
.stamp__preview[hidden], .stamp__report[hidden] { display: none; }
.stamp__toggle { justify-self: start; }
.stamp__report { display: grid; gap: 12px; padding: 16px; border-radius: 12px; background: #FBF8F1; box-shadow: inset 0 0 0 1px rgba(23, 26, 22, 0.14); }
.full .stamp__report { animation: reportIn 0.5s var(--ease) both; }
@keyframes reportIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.stamp__report h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.2; }
.stamp__report iframe { width: 100%; height: 520px; border: 0; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px rgba(23, 26, 22, 0.14); }
@media (max-width: 640px) { .stamp__report iframe { display: none; } .stamp__toggle { width: 100%; } }

/* ---- 5. Hero, 3 Dec 2026 (Tahir chose Concept B): 1 screen, a drawn Punjab field. ----
   3 slides change the season of the field: bare ridged soil, green wheat, ripe wheat with the bags.
   This replaces the sticky split stage in section 1 above, which the page no longer uses. */
.hero.hero--field { padding: 0; background: none; }
.hero--field .doors { margin: 0 var(--gutter) clamp(40px, 6vh, 72px); border-top: 0; }
.field { position: relative; height: 100vh; min-height: 620px; overflow: hidden; background: #F6DDA6; }
.field__svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.field__copy { position: relative; z-index: 2; text-align: center; padding: clamp(84px, 11vh, 108px) var(--gutter) 0; pointer-events: none; text-shadow: 0 0 18px rgba(251, 245, 230, 0.9), 0 0 6px rgba(251, 245, 230, 0.8); }
.field__copy .hero__title { font-size: clamp(38px, 5.1vw, 88px); line-height: 1; letter-spacing: -0.03em; margin: 10px auto 10px; max-width: 20ch; }
.field__copy .hero__title .w { overflow: visible; }
.field__copy .hero__origin { font-size: clamp(19px, 1.9vw, 28px); }
.field__copy .hero__urdu { font-size: clamp(19px, 1.8vw, 26px); text-align: center; margin-top: 4px; }

.field .fg { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 1.1s var(--ease); }
.field[data-slide="0"] .fg-0, .field[data-slide="1"] .fg-1, .field[data-slide="2"] .fg-2 { opacity: 1; transform: none; }
#sun { transition: transform 1.6s var(--ease); }
.field[data-slide="1"] #sun { transform: translate(-150px, -90px); }
.field[data-slide="2"] #sun { transform: translate(-330px, 20px); }
#far { transition: transform 1.6s var(--ease); }
.field[data-slide="1"] #far { transform: translateX(-18px); }
.field[data-slide="2"] #far { transform: translateX(-36px); }
#dusk { opacity: 0; transition: opacity 1.4s var(--ease); }
.field[data-slide="2"] #dusk { opacity: 1; }
.field .packs { position: absolute; right: 7vw; bottom: clamp(170px, 24vh, 210px); z-index: 2; display: flex; align-items: flex-end; opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--ease) 0.2s, transform 1s var(--ease) 0.2s; pointer-events: none; }
.field[data-slide="2"] .packs { opacity: 1; transform: none; }
.field .packs img { width: clamp(84px, 10vw, 170px); height: auto; margin-left: -2.4vw; filter: drop-shadow(0 22px 22px rgba(60, 40, 10, 0.5)); }
.field .packs img:nth-child(2) { width: clamp(96px, 11.4vw, 194px); z-index: 2; }

.field .tabs { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(16px, 3.4vh, 30px); z-index: 3; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-radius: 20px; overflow: hidden; background: rgba(23, 26, 22, 0.84); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6); }
.field .tab { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 16px; row-gap: 4px; align-content: start; text-align: left; padding: 18px 22px 20px; background: transparent; border: 0; color: var(--on-deep); cursor: pointer; font: inherit; opacity: 0.6; transition: opacity 0.4s, background-color 0.4s; }
.field .tab + .tab { border-left: 1px solid var(--hair-light); }
.field .tab:hover, .field .tab:focus-visible { opacity: 0.9; }
.field .tab:focus-visible { outline: 2px solid var(--amber-lit); outline-offset: -4px; }
.field .tab.is-on { opacity: 1; background: rgba(247, 244, 238, 0.07); }
.tab__n { grid-row: 1 / 3; font-family: var(--serif); font-size: clamp(34px, 3.4vw, 54px); line-height: 0.9; color: var(--amber-lit); }
.tab__t { font-family: var(--serif); font-size: clamp(21px, 2vw, 30px); line-height: 1.1; }
.tab__d { font-size: 14.5px; line-height: 1.45; color: var(--on-deep-soft); }
.tab__bar { position: absolute; left: 0; right: 0; top: 0; height: 3px; }
.tab__bar i { display: block; height: 100%; background: var(--amber-lit); transform: scaleX(0); transform-origin: left; }
.tab.is-on .tab__bar i { transform: scaleX(1); }
.full .field.is-auto .tab.is-on .tab__bar i { animation: fillbar 7s linear both; }
.full .field.is-auto.is-paused .tab.is-on .tab__bar i { animation-play-state: paused; }
@keyframes fillbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

@media (max-width: 860px) {
  .field { min-height: 700px; }
  .field .tabs { overflow: visible; border-radius: 0 0 16px 16px; }
  .field .tab { grid-template-columns: 1fr; padding: 12px 12px 14px; }
  .tab__n { grid-row: auto; font-size: 24px; }
  .tab__t { font-size: 16px; }
  .tab__d { display: none; }
  .tab.is-on .tab__d { display: block; position: absolute; left: 0; bottom: 100%; width: calc(100vw - 2 * var(--gutter)); padding: 14px 16px; border-radius: 16px 16px 0 0; background: rgba(23, 26, 22, 0.92); color: var(--on-deep); }
  .tab:nth-child(2).is-on .tab__d { left: -100%; }
  .tab:nth-child(3).is-on .tab__d { left: -200%; }
  .field .packs { bottom: 210px; right: 4vw; }
}

/* ---- 6. 3 Dec 2026 (Tahir's rulings on the page below the hero) ---- */
/* The crop wheel band: no photograph. A deep loam surface with warm light from the wheel's side and a fine paper grain. */
.crops { background:
    radial-gradient(52% 78% at 76% 48%, rgba(200, 138, 46, 0.26), transparent 70%),
    radial-gradient(40% 60% at 6% 0%, rgba(231, 184, 102, 0.1), transparent 70%),
    #141915; }
.crops::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 0.96  0 0 0 0 0.9  0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E"); opacity: 0.11; pointer-events: none; }
.crops__wheel svg { filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.55)); }
.wheel__seg path { stroke: #141915; }

/* Section 02: larger, heavier callouts with a clear halo, so the formulae read at once on a laptop and on a phone. */
.cmp text { font-size: 14.5px; stroke-width: 4.5px; stroke: rgba(247, 244, 238, 0.95); }
.cmp .c-inset + circle + circle + path + text, .cmp .c-lead ~ text { font-size: 13.5px; }
.cmp__key { font-size: 15px; }
@media (max-width: 560px) { .cmp text { font-size: 15px; } }

/* Verify: the batch check in the page. */
.stamp__form { display: grid; gap: 8px; }
.stamp .stamp__label { font-size: 14px; font-weight: 600; color: var(--deep); }
.stamp__row { display: flex; gap: 8px; }
.stamp .stamp__input { flex: 1 1 auto; min-width: 0; min-height: 54px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--deep); background: #FBF8F1; color: var(--deep); font-size: 18px; letter-spacing: 0.04em; text-transform: uppercase; }
.stamp .stamp__input::placeholder { color: rgba(23, 26, 22, 0.45); text-transform: none; letter-spacing: 0; }
.stamp .stamp__input:focus-visible { outline: 2px solid var(--emerald); outline-offset: 2px; }
.stamp .stamp__go { flex: none; }
.stamp .stamp__go:disabled { opacity: 0.45; cursor: default; }


.stamp__result:empty { display: none; }
.stamp__report--rust { box-shadow: inset 0 0 0 1.5px #9C3F2C; }
.stamp__report--gold { box-shadow: inset 0 0 0 1.5px var(--amber-deep); }
.stamp__report--found { box-shadow: inset 0 0 0 1.5px var(--emerald); }
.stamp__report--wait { background: transparent; box-shadow: none; padding: 0; }
@media (max-width: 640px) { .stamp__row { flex-direction: column; } .stamp .stamp__go { width: 100%; } }
