/* ASH about, proposal B: dispersed light. Cream page, eased into a dark field where the light lives. */
:root { --on: #f3f4f1; --on-soft: rgba(243,244,241,.74); }
html { scroll-behavior: auto; }
body { overflow-x: hidden; }
#light { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; pointer-events: none; display: block; }
main { position: relative; z-index: 1; }
h1, h2, p, figure, dl, dd { margin: 0; }

/* hero: same axis and tone as the landing page */
.hero { padding: calc(50px + clamp(48px, 7.5vh, 76px)) 24px 0; text-align: center; }
.hero h1 { text-wrap: balance; font-size: clamp(34px, 4vw, 54px); line-height: 1.08; }
.hero .sub { text-wrap: balance; max-width: 36em; margin: 16px auto 0; color: var(--muted); font-size: 17px; line-height: 1.5; }
.tiles { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: clamp(10px, 1.7vw, 26px); max-width: 1120px; margin: clamp(30px, 5vh, 46px) auto 0; }
.app { min-width: 0; }
.tile { display: block; width: 100%; aspect-ratio: 1; border-radius: 10px; background: var(--c); overflow: hidden; border: 0; padding: 0; }
.tile svg { display: block; width: 100%; height: 100%; }
.app figcaption { margin-top: 10px; font-size: 13px; line-height: 1.3; }
.app .name { display: block; font-weight: 500; }
.app .price, .app .min { display: block; color: var(--muted); font-variant-numeric: tabular-nums; }
.fine { margin-top: 20px; font-size: 12px; color: var(--muted); }
.sweep { height: clamp(300px, 50vh, 470px); }

/* sections inside the dark field: text left, light right */
.sec { max-width: 1120px; margin: 0 auto; padding: 13vh 40px; min-height: 84vh; display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 40px; align-items: center; }
.eyebrow { font-size: 12px; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 18px; color: var(--muted); }
h2 { text-wrap: balance; font-size: clamp(30px, 3.1vw, 42px); line-height: 1.12; margin-bottom: 22px; }
.txt p { font-size: 16.5px; line-height: 1.62; }
.txt p + p { margin-top: 14px; }
.dark .txt { color: var(--on); }
.dark .eyebrow { color: rgba(243,244,241,.55); }
.dark .txt p:not(.eyebrow) { color: var(--on-soft); }
.dark .txt p.hint { margin-top: 26px; font-size: 13.5px; color: rgba(243,244,241,.55); }
.fig { justify-self: center; position: relative; left: var(--dx, 0); }
.fig-empty, .fig-pool { width: 8px; height: 8px; }
#net { display: block; width: 440px; max-width: 100%; height: auto; overflow: visible; }
#net text { font-family: var(--sans); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; fill: rgba(243,244,241,.6); }
#net .ln { fill: none; stroke-width: 1; stroke-dasharray: 1; transition: stroke-dashoffset .9s cubic-bezier(.3,.1,.2,1), opacity .9s; }
#net .nd { transition: opacity .9s; }

.keycard { width: 300px; max-width: 78vw; background: #fbfbf9; color: var(--ink); border-radius: 16px; padding: 20px 22px 22px; text-align: left;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 40px 70px -34px rgba(0,0,0,.65); }
.kc-top { display: flex; justify-content: space-between; align-items: center; }
.kc-logo { font-weight: 600; font-size: 14px; letter-spacing: .02em; }
.kc-chip { width: 26px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #e8553f, #f582a7, #f6c945, #6fd3c2, #3d6fb6, #1f2547); opacity: .9; }
.kc-name { font-size: 34px; margin-top: 46px; line-height: 1; }
.kc-row { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; gap: 10px; }
.kc-price { font-size: 15px; font-weight: 500; } .kc-price small { font-weight: 400; color: var(--muted); font-size: 13px; }
.kc-btn { background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 500; padding: 8px 14px; border-radius: 999px; white-space: nowrap; }
.pool { position: absolute; left: 30px; top: -14px; white-space: nowrap; font-size: 12.5px; line-height: 1.45; color: rgba(243,244,241,.62); }
.pool b { display: block; font-weight: 500; color: var(--on); font-size: 15px; font-variant-numeric: tabular-nums; }

/* the split: light opens again and lands on the makers' tiles, back on cream */
.split { padding: 0 24px; text-align: center; }
.fan { height: clamp(320px, 54vh, 500px); }
.split .tiles { margin-top: 0; }
#dst .tile { cursor: pointer; touch-action: pan-y; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; transition: box-shadow .25s; }
#dst .tile:focus-visible, #dst .app.on .tile { box-shadow: 0 0 0 2px var(--cream), 0 0 0 3.5px var(--ink); outline: none; }
#dst .amt { display: block; font-weight: 500; font-variant-numeric: tabular-nums; margin-top: 2px; }
.linkbtn { font: inherit; color: var(--muted); background: none; border: 0; padding: 4px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.linkbtn:hover { color: var(--ink); }
#payNote { max-width: 40em; margin-left: auto; margin-right: auto; }

/* closing sections: plain cream, centred like the landing page */
.plain { max-width: 600px; margin: 0 auto; padding: 17vh 24px 0; text-align: center; }
.plain .txt p:not(.eyebrow) { color: #4a4a47; }
.record { display: grid; grid-template-columns: repeat(4, 1fr); margin: 38px auto 0; max-width: 520px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.record > div { padding: 14px 16px 13px; border-left: 1px solid var(--line); }
.record > div:first-child { border-left: 0; }
.record dt { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.record dd { margin-top: 5px; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.foot { margin-top: 0; padding: 26px 28px 30px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--muted); }
.foot .logo { font-weight: 600; font-size: 15px; color: var(--ink); }

@media (max-width: 900px) {
  /* two staggered rows, so the light of the back row passes between the tiles of the front row */
  .tiles { grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: clamp(5px, 1.4vw, 12px); row-gap: 18px; max-width: 600px; }
  .tiles .app { grid-column: span 2; }
  .tiles .app:nth-child(5) { grid-column: 2 / span 2; }
  .sec { padding-left: 28px; padding-right: 28px; gap: 24px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
  .fig { left: calc(var(--dx, 0px) * .3); }
}
@media (max-width: 640px) {
  .hero { padding-left: 18px; padding-right: 18px; }
  .hero .sub { font-size: 15.5px; }
  .app figcaption { font-size: 11px; margin-top: 7px; }
  .tile { border-radius: 8px; }
  .sec { display: block; min-height: 0; padding: 11vh 22px; }
  .sec .txt { padding-right: 46px; }
  .txt p { font-size: 16px; }
  .sec .fig { left: 0; margin: 56px auto 0; width: fit-content; }
  .fig-empty { display: none; }
  .sec .fig-pool { margin-top: 200px; }
  #net { width: 320px; }
  .split { padding: 0 18px; }
  .record { grid-template-columns: repeat(2, 1fr); }
  .record > div:nth-child(3) { border-left: 0; }
  .record > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .foot { padding: 22px 18px 26px; }
}

/* fallback without WebGL */
.nogl .sec.dark { max-width: none; background: #0b0b0d; padding-left: max(40px, calc(50vw - 520px)); padding-right: max(40px, calc(50vw - 520px)); }

/* round 4: the dark ground carries through to the end and eases back to cream below "Who" */
.split.dark .app figcaption { color: var(--on); }
.split.dark .app .min, .split.dark .fine { color: rgba(243,244,241,.55); }
.split.dark .linkbtn { color: rgba(243,244,241,.6); border-bottom-color: rgba(243,244,241,.25); }
.split.dark .linkbtn:hover { color: var(--on); }

.plain.dark .txt p:not(.eyebrow) { color: var(--on-soft); }
.dark .record { background: rgba(243,244,241,.04); border-color: rgba(243,244,241,.2); color: var(--on); }
.dark .record > div { border-color: rgba(243,244,241,.2); }
.dark .record dt { color: rgba(243,244,241,.55); }
.who-fig { height: max(300px, 42vh); }

#measure { padding-bottom: 0; }
@media (max-width: 640px) {
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 8px; }
  .tiles .app, .tiles .app:nth-child(5) { grid-column: auto; }
}

/* ---------- dark variant: warm near-black from the first pixel to the last ---------- */
html, body { background: #0d0b09; color: var(--on); }
.hero .sub { color: rgba(243,244,241,.66); }
.fine { color: rgba(243,244,241,.5); }
.app .price, .app .min { color: rgba(243,244,241,.6); }
/* hairline on the three sides that do not touch the light, so there is no line where tile and light meet */
#src .tile { box-shadow: inset 0 1px 0 rgba(243,244,241,.13), inset 1px 0 0 rgba(243,244,241,.13), inset -1px 0 0 rgba(243,244,241,.13); }
#dst .tile { box-shadow: inset 0 0 0 1px rgba(243,244,241,.13); }
/* hero: label and price sit above each tile, so the light can leave the tile's lower edge directly */
.who-fig { height: max(300px, 44vh); }
.foot { border-top-color: rgba(243,244,241,.12); color: rgba(243,244,241,.5); }
.foot .logo { color: var(--on); }
/* v2: cream top that scrolls away. Hero in the landing page's colours; everything below as in the dark variant. */
.hero { color: var(--ink); }
.hero .sub { color: var(--muted); }
.hero .fine { color: var(--muted); }
#src .app .price { color: var(--muted); }
#src .tile { box-shadow: none; }
.nogl .hero { background: var(--cream); }
/* header: colours follow the ground behind it (set from main.js); ?nav=light keeps the original from base.css */
body:not(.nav-light) .ash-nav { background: var(--nav-bg, #fdfdfd); border-bottom-color: var(--nav-line, #e6e6e2); }
body:not(.nav-light) .ash-nav .logo, body:not(.nav-light) .ash-nav nav a { color: var(--nav-fg, #21211f); }
body:not(.nav-light) .ash-nav nav a.pill { background: var(--nav-pill-bg, #21211f); color: var(--nav-pill-fg, #fff); }
