@font-face { font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin-var.woff2") format("woff2"); }
@font-face { font-family: Onest; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/onest-latin-700.woff2") format("woff2"); }
@font-face { font-family: Iosevka; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/iosevka-latin-400.woff2") format("woff2"); }
@font-face { font-family: Iosevka; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/iosevka-latin-500.woff2") format("woff2"); }

html { scroll-behavior: smooth; }
body { margin: 0; background: #e4e6e8; color: #0d0d0d; }
a { color: #0d0d0d; text-decoration: none; transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease; }
a:hover { color: #d42b20; }
button { font: inherit; color: inherit; cursor: pointer; }
* { box-sizing: border-box; }
:focus-visible { outline: 2px solid #a3231c; outline-offset: 4px; }

#top {
  --gutter: clamp(20px, 4vw, 48px);
  --measure: 1200px;
  /* The page runs edge to edge so the hero map can bleed; --edge is the side inset that keeps
     everything else on the --measure column. Its percentage resolves against the full-width box. */
  --edge: max(var(--gutter), calc((100% - var(--measure)) / 2 + var(--gutter)));
  --ink: #0d0d0d;
  --paper: #e4e6e8;
  --accent: #a3231c;
  position: relative;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, sans-serif;
}
#top > header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--edge);
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  font-size: 15px;
  font-weight: 700;
}
.desktop-nav { display: flex; gap: 28px; font-weight: 400; }
#top header a { display: inline-flex; align-items: center; min-height: 44px; }
#top .nav-cta {
  font-weight: 700;
  background: var(--ink);
  color: #fff;
  padding: 0 12px;
}
#top .nav-cta:hover { background: var(--accent); color: #fff; }

.hero { position: relative; height: clamp(530px, 76svh, 760px) !important; }
.hero-map { position: absolute; inset: 0; }
.hero-map canvas, .demo-map-stage canvas { display: block; width: 100%; height: 100%; }
.hero-copy {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  width: min(calc(620px + var(--edge) - var(--gutter)), 62%);
  background: var(--paper);
  padding: 28px 32px 12px var(--edge);
}
.hero-category {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.hero-copy h1 {
  font-family: Onest, sans-serif;
  margin: 12px 0 0;
  font-size: clamp(64px, 7vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 700;
  text-wrap: balance;
}
.map-credit {
  position: absolute;
  right: var(--edge);
  bottom: 14px;
  margin: 0;
  padding: 8px 10px;
  background: var(--paper);
  font-family: Iosevka, monospace;
  font-size: 12px;
  line-height: 1.35;
}

.page-content { padding: 0 var(--edge); }
#demo, #applications, #performance, #about, #contact { scroll-margin-top: 72px; }
#top h2 {
  font-family: Onest, sans-serif;
  margin: 0 0 16px;
  font-size: 36px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 28px 40px;
  align-items: end;
  padding: 28px 0 36px;
}
.intro-lead {
  margin: 0;
  font-family: Onest, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.intro-support {
  margin: 0;
  max-width: 38rem;
  font-size: 15px;
  line-height: 1.55;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 18px; }
.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.btn-primary { background: var(--ink); color: #fff; padding: 0 16px; }
.btn-primary:hover { background: var(--accent); color: #fff; }
.btn-quiet { border-bottom: 2px solid var(--ink); padding: 0 2px; }
.btn-quiet:hover { color: #d42b20; border-bottom-color: #d42b20; }

.metrics { display: grid; grid-template-columns: 1fr; border-top: 2px solid var(--ink); }
.metric {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "kicker" "value" "note";
  gap: 6px;
  padding: 16px 0;
  border-top: 1px solid var(--ink);
}
.metrics .metric:first-child { border-top: 0; }
.metric-kicker { grid-area: kicker; font-size: 12px; font-weight: 500; letter-spacing: 0.02em; line-height: 1.3; }
.metric-value {
  grid-area: value;
  font-family: Onest, sans-serif;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  text-align: left;
}
.metric-note { grid-area: note; margin: 0; font-size: 15px; line-height: 1.45; }

#applications { border-top: 2px solid var(--ink); padding: 18px 0 28px; }
.applications-grid { display: grid; }
.app {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--ink);
}
.app-art { width: 72px; height: 56px; object-fit: contain; object-position: left bottom; display: block; }
.app-index { margin: 0 0 4px; font-size: 12px; font-weight: 700; }
.app h3 { margin: 0 0 6px; font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.app p { margin: 0; font-size: 15px; line-height: 1.5; }

#demo { border-top: 2px solid var(--ink); padding: 18px 0 36px; }
.section-intro { display: grid; gap: 8px; margin-bottom: 18px; }
.kicker { font-size: 15px; font-weight: 700; }
.section-intro p { margin: 0; font-size: 15px; line-height: 1.55; }
.cadence { margin-top: 8px; font-family: Iosevka, monospace; font-size: 15px; }
.feeds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.feeds figure { margin: 0; }
.frame {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--ink);
  display: flex;
  align-items: flex-end;
  padding: 12px;
  font-family: Iosevka, monospace;
  font-size: 15px;
  line-height: 1.35;
}
.frame-orig { background: repeating-linear-gradient(45deg, transparent 0 8px, rgba(13, 13, 13, 0.1) 8px 9px); }
.frame-bv { background: repeating-linear-gradient(45deg, #0d0d0d 0 8px, #2c2c2e 8px 9px); color: var(--paper); }
.feeds figcaption { margin-top: 8px; font-size: 15px; font-weight: 700; }
.demo-map {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--ink);
  background: var(--paper);
}
.demo-map-stage { position: relative; aspect-ratio: 16 / 9; }
.demo-map-stage > div { position: absolute; inset: 0; }
.map-label {
  margin: 10px 0 0;
  font-family: Iosevka, monospace;
  font-size: 12px;
  line-height: 1.4;
}
.map-caption { margin: 8px 0 0; font-size: 15px; }

#performance { border-top: 2px solid var(--ink); padding: 18px 0 36px; }
.perf-lead { margin: 0; max-width: 40rem; font-size: 15px; line-height: 1.55; }
.conditions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--ink);
}
.conditions li {
  padding: 14px 12px 16px;
  border-left: 1px solid var(--ink);
  font-family: Onest, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
}
.conditions li:first-child { border-left: 0; padding-left: 0; }
.outputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 8px 0 0;
  border-top: 1px solid var(--ink);
}
.outputs div { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--ink); }
.outputs dt { font-size: 12px; font-weight: 500; letter-spacing: 0.02em; }
.outputs dd { margin: 4px 0 0; font-family: Onest, sans-serif; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.35; }
.perf-note { margin: 14px 0 0; max-width: 42rem; font-size: 15px; line-height: 1.5; }

/* About, Contact: label, side note, body */
.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 40px;
  border-top: 2px solid var(--ink);
  padding: 14px 0 70px;
}
#contact.section-grid { padding-bottom: 60px; }
.section-grid > .kicker, .side-note { font-size: 17px; }
#top #about-title { margin-bottom: 14px; font-size: 30px; line-height: 1.05; }
:where(.section-grid) p { margin: 14px 0 0; font-size: 15px; line-height: 1.5; }
:where(.section-grid) h2 + p { margin-top: 0; }
.contact-next { margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--ink); font-weight: 700; font-size: 15px; line-height: 1.45; }

#top > footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 var(--edge);
  border-top: 2px solid var(--ink);
  padding: 14px 0 24px;
  font-size: 13px;
}
.footer-links { display: flex; gap: 24px; align-items: center; }
.footer-mark { width: 10px; height: 10px; background: var(--ink); }
.mobile-menu { display: none; }
.mobile-menu summary { cursor: pointer; }

@media (min-width: 761px) {
  .metric-note { max-width: 16rem; }
  .demo-map-stage { aspect-ratio: 8 / 3; }
  .feeds { gap: 16px; }
  .frame { padding: 12px; font-size: 15px; }
}

@media (min-width: 900px) {
  .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 28px 0 48px; }
  .metric {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 210px;
    padding: 16px 16px 16px 14px;
    border-top: 0;
    border-left: 1px solid var(--ink);
  }
  .metric-value { margin-top: auto; text-align: left; font-size: 36px; }
  .metric-note { margin-top: 14px; }
  .applications-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 32px; }
  .app { display: flex; flex-direction: column; gap: 12px; border-top: 0; padding: 0; }
  .app-art { width: auto; height: 104px; max-width: 100%; }
  #applications, #demo, #performance { padding-bottom: 56px; }
  .outputs { grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--ink); }
  .outputs div { border-bottom: 0; padding-right: 16px; }
  .section-intro { grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: start; }
}

/* ---------- Tablet and small laptop ---------- */
.intro-lead { font-size: clamp(28px, 3.4vw, 40px); }
.map-credit { max-width: min(21rem, calc(38% - var(--gutter))); }

@media (max-width: 1050px) {
  #top .desktop-nav { gap: 16px !important; }
  #top .section-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) !important; grid-template-rows: auto 1fr; gap: 12px 24px !important; }
  .section-grid > div:nth-child(2) { grid-column: 1; grid-row: 2; }
  .section-grid > div:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }
}

@media (min-width: 761px) and (max-width: 1023px) {
  .hero { height: clamp(460px, 56svh, 580px) !important; }
}

@media (min-width: 480px) and (max-width: 899px) {
  .metrics { grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .metrics .metric:nth-child(2) { border-top: 0; }
}

/* ---------- Phone: the map becomes a band, the headline stands on its own, the first action sits in the first screen ---------- */
@media (max-width: 760px) {
  /* Header stays with the reader */
  #top > header { position: sticky !important; top: 0; z-index: 5; padding-block: 6px !important; min-height: 56px; }
  #top .desktop-nav { display: none !important; }
  .skip-link { z-index: 6; }
  .mobile-menu { display: block; }
  .mobile-menu summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-height: 44px;
    min-width: 88px;
    padding: 0 2px;
    list-style: none;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .mobile-menu summary::after {
    content: "";
    width: 18px;
    height: 8px;
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    transition: height 160ms ease;
  }
  .mobile-menu[open] summary::after { height: 0; border-bottom: 0; }
  .mobile-menu:not([open]) nav { display: none; }
  .mobile-menu nav {
    position: absolute;
    inset: 100% 0 auto;
    display: grid;
    max-height: calc(100svh - 58px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--paper);
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
    padding: 4px var(--gutter) 20px;
    z-index: 3;
  }
  #top .mobile-menu nav a { display: flex; align-items: center; min-height: 52px; border-bottom: 1px solid var(--ink); font-size: 18px; font-weight: 500; }
  #top .mobile-menu nav .nav-cta { border-bottom: 0; margin-top: 16px; justify-content: center; min-height: 52px; font-weight: 700; }

  /* Hero: map band, caption, headline */
  #top .hero { display: flex; flex-direction: column; height: auto !important; }
  .hero-map { position: relative; inset: auto; order: 1; height: clamp(140px, calc(100svh - 500px), 360px); border-bottom: 1px solid var(--ink); }
  .map-credit { position: static; order: 2; max-width: none; padding: 8px var(--gutter) 0; background: none; line-height: 1.3; }
  .map-source { margin-top: 0; }
  .hero-copy { position: static; order: 3; width: auto; padding: 18px var(--gutter) 0; background: none; }
  .hero-category { font-size: 13px; }
  .hero-copy h1 { margin-top: 10px; font-size: clamp(44px, 14.4vw, 72px); line-height: 0.95; }

  /* Intro: lead, then the actions, then the supporting line */
  .intro { display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding: 14px 0 28px; }
  .intro > div { display: contents; }
  .intro-lead { order: 1; font-size: clamp(22px, 6.2vw, 28px); line-height: 1.15; }
  .hero-actions { order: 2; margin-top: 0; gap: 8px 20px; }
  .intro-support { order: 3; }
  .btn { min-height: 48px; font-size: 16px; }
  .btn-primary { padding: 0 20px; }

  /* Reading sizes */
  .intro-support, .metric-note, .app p, .section-intro p, .perf-lead, .perf-note, .map-caption, .contact-next,
  #top .section-grid p { font-size: 16px !important; line-height: 1.5 !important; }
  #top .cadence { font-size: 14px !important; }
  .metric-kicker, .outputs dt, #top .app .app-index { font-size: 13px !important; line-height: 1.3 !important; }
  #top h2 { font-size: clamp(28px, 8vw, 36px) !important; }

  /* Demo */
  .frame { padding: 8px; font-size: 12px; }
  .demo-map { padding: 8px; }

  /* Performance */
  .conditions li { padding: 12px 6px 14px 10px; font-size: clamp(14px, 4.4vw, 22px); letter-spacing: -0.02em; }
  .app:first-child { grid-template-columns: max-content minmax(0, 1fr); }
  .app:first-child .app-art { width: auto; height: 112px; }
  .outputs { grid-template-columns: 1fr; }
  .outputs div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 12px 0; }
  .outputs dd { margin: 0; font-size: 19px; }

  /* About, Contact: headline first, the side note after it */
  #top .section-grid { grid-template-columns: 1fr !important; grid-template-rows: none; gap: 12px !important; padding-bottom: 44px !important; }
  .section-grid > div:nth-child(n) { grid-column: auto; grid-row: auto; }
  .section-grid > div:nth-child(2) { order: 3; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--ink); }
  .section-grid > div:nth-child(3) { order: 2; }

  #top > footer { flex-wrap: wrap; gap: 8px 20px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  #top > footer a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Narrow phone: metrics read as a spec sheet, value beside its label */
@media (max-width: 479px) {
  .demo-map-stage { aspect-ratio: 4 / 3; }
  .metric { grid-template-columns: 9.25rem minmax(0, 1fr); grid-template-areas: "value kicker" "value note"; gap: 2px 12px; padding: 14px 0; }
  .metric-value { font-size: 28px; line-height: 1.05; }
}
@media (max-width: 359px) {
  .metric { grid-template-columns: 1fr; grid-template-areas: "kicker" "value" "note"; gap: 6px; }
}

/* Short landscape between phone and tablet widths */
@media (761px <= width <= 950px) and (max-height: 500px) and (orientation: landscape) {
  #top .hero { height: max(300px, 92svh) !important; }
  .hero-copy { width: 52%; padding: 20px var(--gutter) 0; }
  .hero-copy h1 { font-size: clamp(64px, 7.4vw, 80px); }
}

/* Touch: no sticky hover colour, a pressed state instead */
@media (hover: none) {
  a:hover { color: var(--ink); }
  #top .nav-cta:hover, .btn-primary:hover { background: var(--ink); color: #fff; }
  .btn-quiet:hover { color: var(--ink); border-bottom-color: var(--ink); }
  #top .nav-cta:active, .btn-primary:active { background: var(--accent); }
  a:active { color: var(--accent); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a, button { transition: none; }
}

/* Hardening: skip link, map source credit */
.skip-link {
  position: absolute;
  left: var(--edge);
  top: 8px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  transform: translateY(-200%);
}
.skip-link:hover { color: #fff; }
.skip-link:focus-visible { transform: none; color: #fff; }
#main:focus { outline: none; }
.map-source { display: block; margin-top: 4px; }
.map-source[hidden] { display: none; }
