:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #000000;
  --muted: rgb(0 0 0 / 0.66);
  --soft: rgb(0 0 0 / 0.05);
  --line: rgb(0 0 0 / 0.16);
  --line-strong: rgb(0 0 0 / 0.34);
  --shadow: 0 18px 60px rgb(0 0 0 / 0.08);
  --shadow-hover: 0 24px 80px rgb(0 0 0 / 0.14);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --content: 1320px;
  --header: 76px;
  --ease: cubic-bezier(.2,.8,.2,1);
  --font-sans: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --fg: #ffffff;
    --muted: rgb(255 255 255 / 0.70);
    --soft: rgb(255 255 255 / 0.07);
    --line: rgb(255 255 255 / 0.18);
    --line-strong: rgb(255 255 255 / 0.38);
    --shadow: 0 18px 60px rgb(255 255 255 / 0.03);
    --shadow-hover: 0 24px 80px rgb(255 255 255 / 0.06);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--fg); font-family: var(--font-sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body, button, input { transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
svg { display: block; }
::selection { background: var(--fg); color: var(--bg); }
:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 1000; transform: translateY(-160%); padding: 10px 14px; border: 2px solid var(--fg); border-radius: 10px; background: var(--bg); color: var(--fg); font-weight: 800; text-decoration: none; }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; top: 0; z-index: 100; height: var(--header); border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header__inner { display: grid; grid-template-columns: minmax(220px,1fr) auto minmax(220px,1fr); align-items: center; gap: 28px; width: min(100% - 40px, 1560px); height: 100%; margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; width: fit-content; color: var(--fg); text-decoration: none; }
.brand-mark { width: 42px; height: 42px; flex: 0 0 auto; }
.brand > span { display: grid; line-height: 1.05; }
.brand strong { font-size: 1rem; letter-spacing: -0.035em; }
.brand small { margin-top: 4px; color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.top-nav { display: flex; align-items: center; justify-content: center; gap: 4px; }
.top-nav a, .header-link { padding: 10px 12px; border-radius: 9px; color: var(--muted); font-size: .88rem; font-weight: 720; text-decoration: none; }
.top-nav a:hover, .header-link:hover { background: var(--soft); color: var(--fg); }
.top-nav__mobile-cta { display: none; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.icon-button { display: none; }

.main-content { min-width: 0; }
.hero, .section, .cta-band, .site-footer { width: min(100% - 64px, var(--content)); margin-inline: auto; }
.hero { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,.7fr); gap: 64px; align-items: end; min-height: min(760px, calc(100vh - var(--header))); padding: 96px 0 72px; border-bottom: 1px solid var(--line); }
.hero-copy { max-width: 900px; }
.eyebrow { margin: 0 0 14px; color: var(--muted); font-size: .72rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { margin-top: 0; color: var(--fg); font-weight: 780; letter-spacing: -0.052em; }
h1 { max-width: 1040px; margin-bottom: 24px; font-size: clamp(3.4rem, 7vw, 7.2rem); line-height: .94; }
h2 { margin-bottom: 18px; font-size: clamp(2.2rem, 4.6vw, 4.8rem); line-height: .98; }
h3 { margin-bottom: 12px; font-size: clamp(1.25rem, 2vw, 1.7rem); line-height: 1.08; }
.hero-lead, .section-heading > p:last-child { max-width: 800px; margin: 0; color: var(--muted); font-size: clamp(1rem,1.6vw,1.2rem); }

.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 20px; border: 1px solid var(--fg); border-radius: 12px; font-weight: 780; text-decoration: none; transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), background-color 160ms ease, color 160ms ease; }
.button:hover { transform: translateY(-2px); }
.button--primary, .button--header { background: var(--fg); color: var(--bg); }
.button--secondary { background: var(--bg); color: var(--fg); }
.button--compact { min-height: 40px; padding: 8px 13px; border-radius: 10px; font-size: .82rem; }
.button--header { min-height: 42px; padding: 8px 15px; }
.button--inverse { border-color: var(--bg); background: var(--bg); color: var(--fg); }

.hero-metrics { display: grid; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.hero-metrics > div { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 16px; min-height: 112px; padding: 18px 22px; }
.hero-metrics > div + div { border-top: 1px solid var(--line); }
.hero-metrics strong { font-size: 2.2rem; letter-spacing: -0.06em; }
.hero-metrics span { color: var(--muted); font-size: .82rem; font-weight: 700; }

.section { padding: 104px 0; border-bottom: 1px solid var(--line); }
.section-heading { max-width: 900px; }
.search-field { display: grid; gap: 8px; margin: 44px 0 24px; color: var(--muted); font-size: .78rem; font-weight: 750; }
.search-control { display: flex; align-items: center; gap: 10px; max-width: 760px; min-height: 54px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); }
.search-control:focus-within { box-shadow: 0 0 0 3px var(--soft); }
.search-control svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.search-control input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--fg); }
.search-control input::placeholder { color: var(--muted); }

.card-grid, .product-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.route-card, .product-card, .system-panel { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--bg); }
.route-card { display: flex; flex-direction: column; min-height: 330px; padding: 26px; box-shadow: var(--shadow); transition: transform 180ms var(--ease), border-color 180ms ease, box-shadow 180ms var(--ease); }
.route-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-hover); }
.card-index, .product-meta, .panel-label { margin: 0 0 28px; color: var(--muted); font-size: .7rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.route-card p:not(.card-index), .product-body > p, .panel-note, .type-specimen > p:last-child { color: var(--muted); }
.route-card > a { margin-top: auto; padding-top: 26px; font-weight: 800; text-decoration: none; }
.route-card > a:hover { text-decoration: underline; text-underline-offset: .2em; }
.empty-state { margin-top: 18px; padding: 18px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); }

.product-grid { margin-top: 44px; }
.product-card { overflow: hidden; box-shadow: var(--shadow); }
.product-media { display: grid; place-items: center; aspect-ratio: 4/3; border-bottom: 1px solid var(--line); background: var(--fg); color: var(--bg); }
.product-media span { font-size: clamp(3rem,8vw,7rem); font-weight: 900; letter-spacing: -0.09em; }
.product-media--inverse { background: var(--bg); color: var(--fg); }
.product-media--inverse span { padding: .06em .18em; border: .04em solid currentColor; }
.product-media--pattern { background: repeating-linear-gradient(45deg,var(--fg) 0 16px,var(--bg) 16px 32px); }
.product-media--pattern span { padding: .04em .16em; background: var(--bg); color: var(--fg); }
.product-body { padding: 22px; }
.product-body .product-meta { margin-bottom: 12px; }
.product-body > p { min-height: 76px; }
.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }

.system-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 44px; }
.system-panel { padding: 26px; }
.system-panel--wide { grid-column: 1/-1; }
.swatch-list, .control-stack { display: grid; gap: 14px; }
.swatch-row { display: flex; align-items: center; gap: 14px; }
.swatch-row > div { display: grid; }
.swatch { display: block; width: 72px; height: 72px; border: 1px solid var(--line-strong); border-radius: 14px; }
.swatch--background { background: var(--bg); }
.swatch--foreground { background: var(--fg); }
code { color: var(--muted); font-size: .76rem; }
.panel-note { margin: 24px 0 0; }
.field-demo { display: grid; gap: 7px; color: var(--muted); font-size: .78rem; font-weight: 750; }
.field-demo input { min-height: 50px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--bg); color: var(--fg); }
.field-demo input::placeholder { color: var(--muted); }
.type-specimen { max-width: 980px; }
.type-display { margin: 0 0 26px; font-size: clamp(2.4rem,6vw,5.8rem); font-weight: 850; letter-spacing: -0.065em; line-height: .94; }
.type-specimen h3 { max-width: 820px; font-size: clamp(1.5rem,3vw,2.4rem); }

.cta-band { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-top: 88px; padding: 56px; border-radius: var(--radius-lg); background: var(--fg); color: var(--bg); }
.cta-band .eyebrow { color: currentColor; opacity: .68; }
.cta-band h2 { max-width: 800px; margin-bottom: 0; color: currentColor; }

.site-footer { margin-top: 88px; padding: 0; border-top: 1px solid var(--line-strong); }
.footer-main { display: grid; grid-template-columns: minmax(280px,1.6fr) repeat(3,minmax(150px,1fr)); gap: 52px; padding: 60px 0 48px; }
.footer-brand p { max-width: 420px; margin: 20px 0 0; color: var(--muted); }
.footer-column { display: grid; align-content: start; gap: 10px; }
.footer-column strong { margin-bottom: 8px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.footer-column a { width: fit-content; color: var(--muted); text-decoration: none; }
.footer-column a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: .2em; }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; padding: 22px 0 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }

@media (max-width: 1180px) {
  .site-header__inner { grid-template-columns: auto 1fr auto; }
  .top-nav { justify-content: flex-end; }
  .top-nav a:nth-last-child(-n+2) { display: none; }
  .header-link { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-metrics { grid-template-columns: repeat(3,1fr); }
  .hero-metrics > div { grid-template-columns: 1fr; min-height: 120px; }
  .hero-metrics > div + div { border-top: 0; border-left: 1px solid var(--line); }
  .card-grid, .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-main { grid-template-columns: 1.4fr repeat(2,1fr); }
  .footer-column:last-child { grid-column: 2/-1; }
}

@media (max-width: 820px) {
  :root { --header: 68px; }
  body.menu-open { overflow: hidden; }
  .site-header__inner { display: flex; justify-content: space-between; width: min(100% - 32px,1560px); }
  .brand-mark { width: 36px; height: 36px; }
  .header-link, .button--header { display: none; }
  .icon-button { display: grid; gap: 5px; width: 44px; height: 44px; place-content: center; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); color: var(--fg); }
  .icon-button > span:not(.sr-only) { width: 18px; height: 2px; background: currentColor; }
  .top-nav { position: fixed; inset: var(--header) 0 0; z-index: 90; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 4px; padding: 24px 18px; background: var(--bg); transform: translateX(104%); transition: transform 220ms var(--ease); }
  .top-nav.is-open { transform: translateX(0); }
  .top-nav a, .top-nav a:nth-last-child(-n+2) { display: block; padding: 14px 12px; color: var(--fg); font-size: 1rem; }
  .top-nav__mobile-cta { margin-top: 12px; border: 1px solid var(--fg); background: var(--fg); color: var(--bg) !important; text-align: center; }
  .hero, .section, .cta-band, .site-footer { width: min(100% - 36px,var(--content)); }
  .hero { padding: 70px 0 56px; }
  h1 { font-size: clamp(3rem,15vw,5.7rem); }
  .section { padding: 76px 0; }
  .cta-band { margin-top: 58px; padding: 34px; }
  .footer-main { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 36px; }
  .footer-brand { grid-column: 1/-1; }
  .footer-column:last-child { grid-column: auto; }
}

@media (max-width: 620px) {
  .hero-metrics, .card-grid, .product-grid, .system-grid, .footer-main { grid-template-columns: 1fr; }
  .hero-metrics > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .system-panel--wide, .footer-brand, .footer-column:last-child { grid-column: auto; }
  .route-card { min-height: 290px; }
  .product-body > p { min-height: 0; }
  .product-footer { align-items: flex-start; flex-direction: column; }
  .cta-band, .footer-bottom { align-items: flex-start; flex-direction: column; }
  .button-row .button { width: 100%; }
}

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