/* Page layer: header, footer, page heads, mobile bar, photo slots, style guide. Loaded last. */
.inner { max-width: var(--container); }
.i { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.22em; flex: none; }
.i.lg { width: 28px; height: 28px; }
.icon-chip { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--b-l); color: var(--blue-d); border: 2px solid var(--line); border-bottom-width: 4px; }
.icon-chip.g { background: var(--g-l); color: var(--accent); } .icon-chip.y { background: var(--y-l); color: var(--warn); } .icon-chip.p { background: var(--p-l); color: var(--p-d); } .icon-chip.r { background: var(--r-l); color: var(--bad); }
/* header */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 14px; border: 2px solid var(--line); border-bottom-width: 4px; background: var(--solid); color: var(--ink); cursor: pointer; }
.links a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav-cta { padding: 9px 18px; font-size: 14px; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav-cta { display: none; }
  .topnav .inner { position: relative; }
  .links { display: none; position: absolute; top: calc(100% + 10px); left: 0; right: 0; flex-direction: column; gap: 2px; background: var(--solid); border: 2px solid var(--line); border-radius: 20px; padding: 10px; box-shadow: 0 8px 0 var(--line); z-index: 30; }
  .links.open { display: flex; }
  .links a { padding: 12px 14px; font-size: 16px; }
}
/* mobile order bar, as in the playbook: slides in after the hero */
.mobile-bar { position: fixed; z-index: 25; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: auto; transform: translateY(160%); transition: transform 0.35s var(--ease); display: none; }
.mobile-bar.show { transform: none; }
@media (max-width: 700px) { .mobile-bar { display: block; } body { padding-bottom: 76px; } }
/* page heads on inner pages */
.page-head { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--sky1), var(--sky2) 80%); padding: 56px max(var(--gutter), env(safe-area-inset-left, 0px)) 130px; }
.page-head .inner { position: relative; z-index: 2; gap: 14px; }
.page-head h1 { font-size: var(--fs-600); line-height: 1.04; }
.page-head .lede { font-size: var(--fs-300); color: var(--muted); max-width: 56ch; }
.page-head .trees { position: absolute; left: 0; right: 0; bottom: -2px; height: 100px; z-index: 1; }
.page-head .sun { right: 6%; top: 22px; width: 64px; height: 64px; }
.page-head .cloud.c1 { top: 70px; }
/* hero */
.hero { gap: 34px; }
.hero h1 { font-size: var(--fs-600); }
.lede { font-size: var(--fs-300); }
.scene svg { width: 100%; height: 100%; }
.tracer { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 3 9; animation: trace 3.6s linear infinite; opacity: 0.9; }
@keyframes trace { to { stroke-dashoffset: -96; } }
.pond-ripple { transform-box: fill-box; transform-origin: center; animation: pond 4s ease-out infinite; }
@keyframes pond { 0% { transform: scale(0.4); opacity: 0.8; } 100% { transform: scale(1.1); opacity: 0; } }
.flagwave { transform-box: fill-box; transform-origin: 0 50%; animation: wave 1.8s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .tracer, .pond-ripple, .ball { animation: none !important; display: none; } }
/* sections */
.band > .inner > .rev:first-child h2, .band > .inner > h2 { max-width: 20ch; }
.section-icons { display: flex; gap: 10px; flex-wrap: wrap; }
.kicker-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.kicker-list li { display: flex; gap: 10px; align-items: flex-start; }
.kicker-list .i { color: var(--accent); margin-top: 3px; }
/* photo slots: placeholders that swap to a real photo when the file exists */
.photo-slot { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: hidden; border: 2px solid var(--line); background: linear-gradient(180deg, var(--sky1), var(--g-l)); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-slot.is-missing img { visibility: hidden; }
.photo-slot.is-missing::before { content: ""; position: absolute; inset: auto 0 0 0; height: 42%; background: var(--t1); border-radius: 60% 60% 0 0 / 40% 40% 0 0; }
.photo-slot.is-missing::after { content: attr(data-label); position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-weight: 900; color: var(--ink); padding: 0 12px; }
/* footer */
footer.site-footer { position: relative; z-index: 1; padding: 44px max(var(--gutter), env(safe-area-inset-left, 0px)) calc(40px + env(safe-area-inset-bottom, 0px)); }
footer.site-footer .inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
footer.site-footer h2, footer.site-footer h3, footer.site-footer p, footer.site-footer a { color: #143300; }
footer.site-footer a { font-weight: 800; }
footer.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
@media (max-width: 800px) { footer.site-footer .inner { grid-template-columns: 1fr; } }
/* style guide */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.swatch { border: 2px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--solid); font-size: 13px; }
.swatch i { display: block; height: 56px; }
.swatch span { display: block; padding: 8px 10px; color: var(--muted); }
.swatch b { color: var(--ink); display: block; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.icon-cell { border: 2px solid var(--line); border-radius: 14px; padding: 12px 6px; display: grid; justify-items: center; gap: 6px; font-size: 12px; color: var(--muted); background: var(--solid); }
.icon-cell .i { width: 26px; height: 26px; color: var(--ink); }
.specimen { display: grid; gap: 14px; }
.code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; background: var(--solid); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; overflow-x: auto; color: var(--ink); white-space: pre; }
.note-box { background: var(--y-l); border: 2px solid var(--yellow); border-radius: 16px; padding: 12px 16px; color: var(--ink); }
/* carried over from the pitch page */
.skyhero .inner { position: relative; z-index: 1; }
.sun { right: 2.5%; top: 26px; width: 78px; height: 78px; }
.sticker { right: 12%; top: 5%; }
.fchip.c3 { left: -6px; bottom: 1%; } .fchip.c4 { left: 38%; bottom: -1%; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--solid); border: 2px solid var(--line); border-radius: 16px; padding: 8px 4px; text-align: center; font-size: 12px; color: var(--muted); }
.stat b { display: block; font-size: 22px; color: var(--ink); font-family: var(--font-display); font-weight: 900; }
.steps3.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.minis { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (max-width: 900px) { .steps3.three, .trio { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps3.three, .trio { grid-template-columns: 1fr; } }
.page-head .sun { right: 6%; top: 22px; width: 64px; height: 64px; }
.page-head .cloud.c1 { top: 70px; }

/* performance: trees and scenery only animate while on screen (ui.js toggles .in-view) */
.trees .tree, .scene .tree { animation-play-state: paused; }
.trees.in-view .tree, .scene.in-view .tree { animation-play-state: running; }
.scene:not(.in-view) .drive, .scene:not(.in-view) .flagwave, .scene:not(.in-view) .tracer, .scene:not(.in-view) .pond-ripple { animation-play-state: paused; }

.as-h1 { font-family: var(--font-display); font-weight: 900; font-size: var(--fs-600); line-height: 1.04; color: var(--ink); margin: 0; }

/* hero scene sits below the copy, never behind the buttons */
.scene { height: 240px; }
.skyhero.tall { padding-bottom: 250px !important; }
@media (max-width: 700px) { .skyhero.tall { padding-bottom: 210px !important; } .scene { height: 200px; } }

/* never force a column wider than the screen */
.routes { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.route { min-width: 0; flex-wrap: wrap; }
.route .from { white-space: normal; }
.route .arrow { min-width: 20px; }
.packs { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.steps3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.steps3.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .steps3.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps3.three { grid-template-columns: 1fr; } }
.timeline { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.minis { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
