@layer reset, base, layout, components, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body, h1, h2, h3, p, dl, dd, blockquote { margin: 0; }
  img, svg { display: block; max-width: 100%; }
  a { color: inherit; }
}

@layer base {
  :root {
    --paper: #f3efe4;
    --paper-soft: #faf8f1;
    --ink: #172724;
    --muted: #66716c;
    --line: #c9c6b9;
    --green: #087f68;
    --green-deep: #075e50;
    --green-pale: #d8e9df;
    --orange: #e06b35;
    --navy: #0d2c32;
    --white: #fffef9;
    --shadow: 0 22px 70px rgb(27 45 40 / .12);
    --route-progress: .86;
  }

  html { background: var(--paper); overflow-x: clip; }
  body {
    min-width: 320px;
    color: var(--ink);
    background:
      linear-gradient(rgb(23 39 36 / .027) 1px, transparent 1px),
      linear-gradient(90deg, rgb(23 39 36 / .027) 1px, transparent 1px),
      var(--paper);
    background-size: 34px 34px;
    font-family: "Segoe UI Variable", "Aptos", "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: clip;
  }

  body::before {
    position: fixed;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    content: "";
    opacity: .17;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
    mix-blend-mode: multiply;
  }

  ::selection { color: var(--white); background: var(--green); }
  :focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
  h1, h2, h3 { text-wrap: balance; }
  p { text-wrap: pretty; }
}

@layer layout {
  .site-header,
  .hero,
  .route-section,
  .evidence-section,
  .principle,
  footer {
    width: min(1180px, calc(100% - 64px));
    margin-inline: auto;
  }

  .site-header {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 104px;
    border-bottom: 1px solid rgb(23 39 36 / .18);
  }

  .site-header nav { display: flex; align-items: center; gap: 32px; }
  .site-header nav a {
    color: #41504c;
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .08em;
    text-decoration: none;
    text-transform: uppercase;
  }
  .site-header nav a:hover { color: var(--green); }

  .hero {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(420px, .98fr);
    align-items: center;
    gap: clamp(48px, 8vw, 112px);
    min-height: 720px;
    padding-block: 90px 110px;
  }

  .route-section { padding-block: 120px 150px; }
  .section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: 80px;
    align-items: end;
    padding-bottom: 74px;
    border-bottom: 1px solid rgb(23 39 36 / .2);
  }
  .section-heading > p { max-width: 470px; color: var(--muted); font-size: 1.05rem; }

  .journey { position: relative; padding-block: 74px 20px; }
  .route-line {
    position: absolute;
    inset: 68px auto 0 50%;
    width: 82px;
    height: calc(100% - 50px);
    overflow: visible;
    transform: translateX(-50%);
  }
  .route-line path { fill: none; vector-effect: non-scaling-stroke; }
  .route-shadow { stroke: #b9b8ad; stroke-width: 2; stroke-dasharray: 4 9; }
  .route-progress {
    stroke: var(--green);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: var(--route-progress) 1;
    transition: stroke-dasharray .15s linear;
  }

  .stop {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 100px minmax(0, 1fr);
    align-items: center;
    min-height: 182px;
    margin-bottom: 18px;
  }
  .stop-card { position: relative; }
  .stop--left .stop-card { grid-column: 1; margin-right: 56px; }
  .stop--right .stop-card { grid-column: 3; margin-left: 56px; }
  .stop-marker { grid-column: 2; grid-row: 1; place-self: center; }
  .stop-note { grid-row: 1; align-self: center; }
  .stop--left .stop-note { grid-column: 3; padding-left: 56px; }
  .stop--right .stop-note { grid-column: 1; padding-right: 56px; text-align: right; }

  .evidence-section {
    position: relative;
    width: 100%;
    max-width: none;
    padding: 120px max(32px, calc((100% - 1180px) / 2)) 130px;
    color: var(--white);
    background: var(--navy);
    overflow: hidden;
  }
  .evidence-section::before,
  .evidence-section::after {
    position: absolute;
    width: 500px;
    height: 500px;
    border: 1px solid rgb(216 233 223 / .11);
    border-radius: 43% 57% 61% 39% / 52% 40% 60% 48%;
    content: "";
  }
  .evidence-section::before { top: -220px; right: -80px; transform: rotate(22deg); }
  .evidence-section::after { bottom: -360px; left: -90px; transform: rotate(-18deg); }
  .evidence-section > * { position: relative; z-index: 1; max-width: 1180px; margin-inline: auto; }

  .ledger { display: grid; grid-template-columns: 1.08fr .92fr; gap: 90px; padding-top: 80px; }

  .principle {
    display: grid;
    grid-template-columns: 120px minmax(0, 1.25fr) minmax(280px, .75fr);
    gap: 54px;
    align-items: center;
    padding-block: 110px;
  }

  footer {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 30px;
    min-height: 144px;
    border-top: 1px solid rgb(23 39 36 / .18);
  }
  footer > p { color: var(--muted); font-size: .8rem; letter-spacing: .04em; }
  footer > a { justify-self: end; font-size: .8rem; font-weight: 800; text-decoration: none; text-transform: uppercase; }
}

@layer components {
  .skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 30;
    padding: 10px 16px;
    color: white;
    background: var(--ink);
    transform: translateY(-150%);
  }
  .skip-link:focus { transform: none; }

  .topo { position: absolute; z-index: 0; color: rgb(8 127 104 / .16); pointer-events: none; }
  .topo--one { top: 130px; right: 0; width: min(58vw, 820px); }

  .brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
  .brand svg { width: 38px; height: 38px; overflow: visible; }
  .brand svg > path:first-child { fill: var(--green); }
  .brand svg circle { fill: var(--paper); }
  .brand .brand-route { fill: none !important; stroke: var(--paper); stroke-width: 2; stroke-linecap: round; }
  .brand span { display: grid; line-height: 1.05; }
  .brand strong { font-size: .92rem; letter-spacing: .05em; text-transform: uppercase; }
  .brand small { margin-top: 5px; color: var(--muted); font-family: ui-monospace, "Cascadia Code", monospace; font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; }

  .nav-status { display: inline-flex; align-items: center; gap: 9px; padding: 10px 14px; border: 1px solid rgb(8 127 104 / .23); border-radius: 99px; background: rgb(255 255 255 / .35); }
  .nav-status i, .status-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgb(8 127 104 / .12); }

  .kicker { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 26px; color: var(--green-deep); font-family: ui-monospace, "Cascadia Code", monospace; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  .kicker span + span::before { margin-right: 24px; color: #9ca49f; content: "/"; }

  h1 {
    max-width: 690px;
    font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    font-size: clamp(4rem, 7.4vw, 7.1rem);
    font-weight: 500;
    letter-spacing: -.065em;
    line-height: .86;
  }
  h1 em { color: var(--green); font-weight: 500; }
  .hero-lead { max-width: 590px; margin-top: 34px; color: #4e5d58; font-size: clamp(1.05rem, 1.4vw, 1.22rem); line-height: 1.75; }

  .route-link { display: inline-flex; align-items: center; gap: 14px; margin-top: 38px; font-size: .78rem; font-weight: 800; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; }
  .route-link-icon { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--ink); border-radius: 50%; transition: color .2s, background .2s, transform .2s; }
  .route-link:hover .route-link-icon { color: white; background: var(--green); border-color: var(--green); transform: translate(2px, 2px); }

  .position-card { position: relative; border: 1px solid rgb(23 39 36 / .2); border-radius: 3px; background: rgb(250 248 241 / .82); box-shadow: var(--shadow); backdrop-filter: blur(10px); transform: rotate(1.3deg); }
  .position-card::before { position: absolute; inset: 8px -9px -9px 8px; z-index: -1; border: 1px solid rgb(23 39 36 / .15); content: ""; transform: rotate(-1deg); }
  .position-map { position: relative; height: 282px; border-bottom: 1px solid rgb(23 39 36 / .15); background: #dce7dd; overflow: hidden; }
  .position-map::after { position: absolute; inset: 0; background: radial-gradient(circle at 68% 34%, transparent 0 38px, rgb(8 127 104 / .05) 39px 40px, transparent 41px); content: ""; }
  .position-map svg { width: 100%; height: 100%; }
  .contours { stroke: rgb(7 94 80 / .22); stroke-width: 1.3; }
  .mini-route { fill: none; stroke: var(--green); stroke-width: 4; stroke-dasharray: .86 1; stroke-linecap: round; }
  .pin path { fill: var(--orange); filter: drop-shadow(0 5px 4px rgb(23 39 36 / .2)); }
  .pin circle { fill: var(--white); }
  .map-label { position: absolute; z-index: 2; padding: 4px 8px; border: 1px solid rgb(23 39 36 / .16); background: var(--paper-soft); font-family: ui-monospace, monospace; font-size: .59rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
  .map-label--start { bottom: 24px; left: 29px; }
  .map-label--here { top: 48px; right: 31px; color: white; border-color: var(--orange); background: var(--orange); }
  .position-content { display: grid; grid-template-columns: 1fr auto; gap: 18px 20px; padding: 28px 30px 30px; }
  .eyebrow { margin-bottom: 5px; color: var(--green); font-family: ui-monospace, "Cascadia Code", monospace; font-size: .65rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
  .position-content h2 { font-family: "Iowan Old Style", Georgia, serif; font-size: 1.75rem; line-height: 1.05; }
  .status-chip { display: inline-flex; align-items: center; align-self: start; gap: 8px; padding: 7px 11px; color: var(--green-deep); border: 1px solid rgb(8 127 104 / .2); border-radius: 99px; font-size: .66rem; font-weight: 800; text-transform: uppercase; }
  .position-content > p { grid-column: 1 / -1; color: var(--muted); font-size: .9rem; }
  .position-content dl { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 20px; border-top: 1px solid var(--line); }
  .position-content dl div + div { padding-left: 17px; border-left: 1px solid var(--line); }
  .position-content dt { color: var(--muted); font-size: .59rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
  .position-content dd { margin-top: 3px; font-family: "Iowan Old Style", Georgia, serif; font-size: 1.18rem; font-weight: 700; }

  .section-number { margin-bottom: 18px; color: var(--green); font-family: ui-monospace, monospace; font-size: .68rem; font-weight: 800; letter-spacing: .12em; }
  .section-heading h2 { max-width: 720px; font-family: "Iowan Old Style", Georgia, serif; font-size: clamp(2.8rem, 5vw, 5rem); font-weight: 500; letter-spacing: -.045em; line-height: .95; }

  .stop-card { padding: 27px 30px 28px; border: 1px solid rgb(23 39 36 / .2); border-radius: 2px; background: var(--paper-soft); box-shadow: 0 14px 40px rgb(23 39 36 / .06); }
  .stop-card::after { position: absolute; right: 14px; bottom: 11px; width: 26px; height: 7px; border-bottom: 2px solid rgb(23 39 36 / .18); content: ""; transform: rotate(-8deg); }
  .stop-meta { display: flex; justify-content: space-between; margin-bottom: 17px; color: var(--muted); font-family: ui-monospace, monospace; font-size: .59rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
  .stop-card h3 { max-width: 420px; font-family: "Iowan Old Style", Georgia, serif; font-size: clamp(1.55rem, 2.1vw, 2rem); font-weight: 600; line-height: 1.08; }
  .stop-card > p { margin-top: 13px; color: var(--muted); font-size: .9rem; line-height: 1.65; }
  .receipts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
  .receipts code, .proof, .next-label { padding: 6px 9px; border-radius: 2px; font-family: ui-monospace, "Cascadia Code", monospace; font-size: .61rem; font-weight: 750; }
  .receipts code { color: var(--green-deep); border: 1px solid rgb(8 127 104 / .18); background: var(--green-pale); }
  .proof { color: #72512d; border: 1px dashed #c49a69; background: #f5e6cf; text-transform: uppercase; transform: rotate(-1deg); }
  .next-label { color: #7b3d22; border: 1px solid rgb(224 107 53 / .25); background: #f6dfd5; text-transform: uppercase; }
  .stop-marker { position: relative; z-index: 2; display: grid; width: 42px; height: 42px; place-items: center; color: white; border: 6px solid var(--paper); border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px var(--green); font-size: .75rem; font-weight: 900; }
  .stop-note { color: var(--muted); font-family: ui-monospace, monospace; font-size: .68rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
  .stop-note::before { display: inline-block; width: 26px; margin-right: 10px; border-top: 1px solid var(--line); vertical-align: middle; content: ""; }
  .stop--right .stop-note::before { display: none; }
  .stop--right .stop-note::after { display: inline-block; width: 26px; margin-left: 10px; border-top: 1px solid var(--line); vertical-align: middle; content: ""; }
  .is-current .stop-card { border: 2px solid var(--green); background: #f7fbf6; box-shadow: 0 18px 50px rgb(8 127 104 / .13); }
  .stop-marker--current { background: var(--orange); box-shadow: 0 0 0 1px var(--orange), 0 0 0 9px rgb(224 107 53 / .14); }
  .stop-marker--current span { width: 9px; height: 9px; border: 2px solid white; border-radius: 50%; }
  .is-current .stop-note { color: var(--orange); }
  .is-next .stop-card { border-style: dashed; background: rgb(250 248 241 / .45); box-shadow: none; }
  .is-next .stop-marker { color: var(--orange); border-color: var(--paper); background: var(--paper); box-shadow: 0 0 0 1px var(--orange); }

  .section-heading--light { border-color: rgb(255 255 255 / .16); }
  .section-heading--light .section-number { color: #77c8ae; }
  .section-heading--light > p { color: #adc0ba; }
  .ledger-main { position: relative; padding-right: 120px; }
  .ledger-main .eyebrow { color: #77c8ae; }
  .ledger-main h3 { font-family: "Iowan Old Style", Georgia, serif; font-size: clamp(2rem, 3.8vw, 3.6rem); font-weight: 500; letter-spacing: -.035em; line-height: 1.05; }
  .ledger-main > p:last-child { max-width: 620px; margin-top: 23px; color: #adc0ba; }
  .stamp { position: absolute; top: -18px; right: 0; display: grid; width: 102px; height: 102px; place-content: center; color: #e5b284; border: 2px solid #e5b284; border-radius: 50%; font-family: ui-monospace, monospace; font-size: .56rem; font-weight: 800; letter-spacing: .08em; text-align: center; transform: rotate(11deg); }
  .stamp::before, .stamp::after { position: absolute; inset: 6px; border: 1px dashed #e5b284; border-radius: 50%; content: ""; }
  .stamp::after { inset: 12px; border-style: solid; opacity: .5; }
  .stamp span { display: block; font-family: "Iowan Old Style", Georgia, serif; font-size: 2.2rem; line-height: 1; }
  .ledger-list { border-top: 1px solid rgb(255 255 255 / .17); }
  .ledger-list div { display: grid; grid-template-columns: 1fr auto; gap: 0 24px; padding: 17px 0 19px; border-bottom: 1px solid rgb(255 255 255 / .17); }
  .ledger-list dt { color: #adc0ba; font-size: .68rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
  .ledger-list dd { font-family: ui-monospace, monospace; font-size: .75rem; font-weight: 800; }
  .ledger-list span { grid-column: 1 / -1; margin-top: 3px; color: white; font-family: "Iowan Old Style", Georgia, serif; font-size: 1.2rem; }
  .ledger-list .green { color: #77c8ae; }

  .principle svg { width: 110px; overflow: visible; }
  .principle svg path:first-child { fill: none; stroke: var(--green); stroke-width: 2; stroke-dasharray: 5 5; }
  .principle svg circle { fill: var(--green); }
  .principle-pin { fill: var(--orange); }
  .principle blockquote { font-family: "Iowan Old Style", Georgia, serif; font-size: clamp(2.3rem, 4vw, 4rem); font-style: italic; letter-spacing: -.04em; line-height: 1.05; }
  .principle > p { color: var(--muted); }
  .brand--footer svg { width: 30px; height: 30px; }
  .brand--footer small { display: none; }

  .reveal { opacity: 1; transform: none; }
}

@layer responsive {
  @media (max-width: 980px) {
    .site-header, .hero, .route-section, .principle, footer { width: min(100% - 40px, 760px); }
    .site-header nav a:not(.nav-status) { display: none; }
    .hero { grid-template-columns: 1fr; min-height: 0; padding-block: 80px 100px; }
    .hero-copy { max-width: 760px; }
    .position-card { width: min(100%, 620px); justify-self: end; }
    .section-heading { grid-template-columns: 1fr; gap: 28px; }
    .route-section { padding-block: 100px 120px; }
    .journey { --rail: 38px; padding-left: 0; }
    .route-line { left: var(--rail); width: 55px; transform: translateX(-50%); }
    .stop { grid-template-columns: 76px minmax(0, 1fr); min-height: 0; margin-bottom: 40px; }
    .stop-card, .stop--left .stop-card, .stop--right .stop-card { grid-column: 2; grid-row: 1; margin: 0; }
    .stop-marker { grid-column: 1; grid-row: 1; place-self: center; }
    .stop-note { display: none; }
    .ledger { grid-template-columns: 1fr; gap: 64px; }
    .principle { grid-template-columns: 100px 1fr; }
    .principle > p { grid-column: 2; }
    footer { grid-template-columns: 1fr auto; }
    footer > p { grid-column: 1 / -1; grid-row: 2; padding-bottom: 25px; }
  }

  @media (max-width: 640px) {
    body { background-size: 28px 28px; }
    .site-header, .hero, .route-section, .principle, footer { width: calc(100% - 32px); }
    .site-header { min-height: 82px; }
    .site-header nav { gap: 0; }
    .nav-status { padding: 8px 10px; font-size: .6rem !important; }
    .brand svg { width: 32px; height: 32px; }
    .brand small { display: none; }
    .hero { gap: 62px; padding-block: 64px 86px; }
    h1 { font-size: clamp(3.3rem, 16vw, 5.1rem); line-height: .9; }
    .hero-lead { margin-top: 27px; font-size: 1rem; }
    .kicker { gap: 5px 13px; }
    .kicker span + span::before { margin-right: 13px; }
    .position-card { transform: none; }
    .position-map { height: 218px; }
    .position-content { grid-template-columns: 1fr; padding: 24px 20px; }
    .status-chip { grid-row: 1; justify-self: end; }
    .position-content > div:first-child { grid-row: 1; }
    .position-content h2 { max-width: 220px; font-size: 1.45rem; }
    .position-content dl { grid-template-columns: 1fr; gap: 13px; }
    .position-content dl div { display: flex; align-items: baseline; justify-content: space-between; }
    .position-content dl div + div { padding: 13px 0 0; border-top: 1px solid var(--line); border-left: 0; }
    .section-heading { padding-bottom: 46px; }
    .section-heading h2 { font-size: 2.8rem; }
    .route-section { padding-block: 85px 95px; }
    .journey { --rail: 23px; padding-top: 54px; }
    .route-line { inset-block-start: 48px; width: 40px; }
    .stop { grid-template-columns: 54px minmax(0, 1fr); margin-bottom: 30px; }
    .stop-marker { width: 34px; height: 34px; border-width: 5px; }
    .stop-card { padding: 22px 20px 23px; }
    .stop-meta { gap: 12px; }
    .stop-card h3 { font-size: 1.55rem; }
    .evidence-section { padding: 84px 16px 94px; }
    .ledger { padding-top: 58px; }
    .ledger-main { padding: 0; }
    .stamp { position: relative; top: auto; right: auto; width: 86px; height: 86px; margin-bottom: 30px; }
    .principle { grid-template-columns: 1fr; gap: 30px; padding-block: 80px; }
    .principle svg { width: 90px; }
    .principle > p { grid-column: 1; }
    footer { min-height: 130px; }
    footer > p { font-size: .7rem; }
  }

  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
  }
}
