/* Able Innovation Sweden AB — ableinnovation.com */

@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../fonts/sora.woff2') format('woff2');
}

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 500 900;
  font-stretch: 125%;
  font-display: swap;
  src: url('../fonts/archivo-expanded.woff2') format('woff2');
}

:root {
  color-scheme: dark;
  --bg: #0a0d0b;
  --surface: #10140f;
  --surface-2: #161c14;
  --line: #1f261e;
  --line-bright: #2c3628;
  --text: #eef1ec;
  --text-dim: #9ba69a;
  --green: #4e9732;
  --green-dark: #2f8432;
  --green-bright: #7dc142;
  --lime: #a5d34a;
  --display: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --body: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --max-w: 1200px;
  --gutter: 32px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

@view-transition { navigation: auto; }

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

/* film grain */
body::after {
  content: '';
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.05;
  pointer-events: none;
  z-index: 2147483000;
}

/* faint engineering grid */
.grid-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(125, 193, 66, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 193, 66, 0.022) 1px, transparent 1px);
  background-size: 88px 88px;
  pointer-events: none;
  z-index: 0;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}

::selection { background: var(--green-dark); color: #fff; }

a { color: var(--green-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--green-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--lime);
  color: #0a0d0b;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 999px;
  transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

/* ================= header ================= */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 26px 0;
  transition: padding 0.35s var(--ease-out);
}

.js .site-header { position: fixed; }

/* the glass lives on a pseudo-element so the header itself never becomes a
   containing block for the fixed mobile menu */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 13, 11, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.site-header.scrolled { padding: 14px 0; }
.site-header.scrolled::before { opacity: 1; }

.site-header .progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--green-dark), var(--lime));
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--text);
  position: relative;
  z-index: 2;
}

.brand:hover { text-decoration: none; }

.brand img { height: 34px; width: auto; display: block; }

.brand .wordmark {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 760;
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  line-height: 1.05;
  text-transform: uppercase;
}

.brand .wordmark small {
  display: block;
  font-family: var(--body);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: 3px;
}

.site-nav { display: flex; gap: 36px; }

.site-nav a {
  color: var(--text-dim);
  font-family: var(--body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.25s ease;
  position: relative;
  padding: 6px 0;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--green-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.site-nav a:hover,
.site-nav a.active,
.site-nav a[aria-current] { color: var(--text); text-decoration: none; }

.site-nav a:hover::after,
.site-nav a.active::after,
.site-nav a[aria-current]::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  background: none;
  border: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out);
}

.nav-open .nav-toggle span:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav-open .nav-toggle span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

/* ================= hero ================= */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

.hero::before {
  width: 70vmax;
  height: 70vmax;
  top: -32vmax;
  right: -22vmax;
  background: radial-gradient(closest-side, rgba(78, 151, 50, 0.22), transparent);
  animation: drift 26s ease-in-out infinite alternate;
}

.hero::after {
  width: 56vmax;
  height: 56vmax;
  bottom: -30vmax;
  left: -20vmax;
  background: radial-gradient(closest-side, rgba(125, 193, 66, 0.09), transparent);
  animation: drift 32s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-6vmax, 5vmax, 0) scale(1.12); }
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 16%, #000 68%, transparent 96%);
  mask-image: linear-gradient(180deg, transparent, #000 16%, #000 68%, transparent 96%);
}

.hero > .wrap {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 140px;
  padding-bottom: 72px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--green-bright);
  margin-bottom: 36px;
}

.eyebrow::before {
  content: '';
  width: 44px;
  height: 1px;
  background: var(--green-bright);
}

.hero h1 {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 820;
  /* capped so the longest authored line ("with technology." = 13em) stays
     on one line down to ~560px; below that the mobile rule takes over */
  font-size: clamp(2.25rem, 6.8vw, 5.375rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  text-wrap: nowrap;
}

.hero h1 .accent {
  background: linear-gradient(97deg, var(--lime), var(--green-dark) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.06em;
}

/* masked line reveal */
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span { display: inline-block; }

.hero .sub {
  margin-top: 40px;
  max-width: 46ch;
  color: var(--text-dim);
  font-size: clamp(1rem, 1.4vw, 1.1875rem);
  line-height: 1.8;
}

.hero .sub strong { color: var(--text); font-weight: 600; }

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 48px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 34px;
  font-family: var(--body);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0a0d0b;
  background: linear-gradient(100deg, var(--lime), var(--green));
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transform: translate(var(--tx, 0), var(--ty, 0));
  transition: transform 0.35s var(--ease-out), box-shadow 0.3s ease;
}

.cta::after { content: '→'; font-size: 1rem; transition: transform 0.25s var(--ease-out); }

.cta:hover { text-decoration: none; box-shadow: 0 10px 40px rgba(125, 193, 66, 0.35); }
.cta:hover::after { transform: translateX(4px); }

.cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  font-family: var(--body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  background: none;
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease, background-color 0.25s ease;
}

.cta-ghost:hover {
  color: var(--lime);
  border-color: rgba(125, 193, 66, 0.6);
  background: rgba(125, 193, 66, 0.06);
  text-decoration: none;
}

/* marquee band */
.marquee {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 60s linear infinite;
}

.marquee-group {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  list-style: none;
}

.marquee-group li {
  display: flex;
  align-items: center;
  font-family: var(--display);
  font-stretch: 125%;
  font-size: 0.9375rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  white-space: nowrap;
}

.marquee-group li::after {
  content: '';
  width: 7px;
  height: 7px;
  margin: 0 36px;
  background: var(--green);
  transform: rotate(45deg);
}

@keyframes marquee { to { transform: translateX(-33.3333%); } }

/* load choreography */
.boot {
  opacity: 0;
  transform: translateY(24px);
  animation: bootIn 0.9s var(--ease-out) forwards;
}

.fade { opacity: 0; animation: fadeIn 0.9s ease forwards; }

.hero h1 .line > span {
  transform: translateY(112%);
  animation: lineUp 0.95s var(--ease-out) forwards;
}

@keyframes bootIn { to { opacity: 1; transform: none; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes lineUp { to { transform: none; } }

.d1 { animation-delay: 0.10s; }
.d2 { animation-delay: 0.22s; }
.d3 { animation-delay: 0.34s; }
.d4 { animation-delay: 0.46s; }
.d5 { animation-delay: 0.62s; }
.d6 { animation-delay: 0.80s; }
.d7 { animation-delay: 1.00s; }

/* ================= sections ================= */

section { padding: 104px 0; position: relative; }

.section-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

.section-grid > div { min-width: 0; }

.section-label {
  position: sticky;
  top: 104px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.section-label .num {
  font-family: var(--display);
  font-stretch: 125%;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--green-bright);
}

.section-label h2 {
  font-family: var(--body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.section-rule {
  height: 1px;
  background: linear-gradient(90deg, var(--line-bright), transparent);
  margin-bottom: 56px;
}

.js .section-rule {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s var(--ease-out);
}

.js .in-view .section-rule { transform: scaleX(1); }

/* ---------- about ---------- */

.lede {
  font-family: var(--display);
  font-stretch: 125%;
  font-size: clamp(1.5rem, 3.2vw, 2.375rem);
  font-weight: 560;
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 27ch;
}

.lede strong { font-weight: 750; color: var(--green-bright); }

/* words light up as the paragraph scrolls through the viewport */
.lede .w { transition: opacity 0.45s ease; }
.js .lede.split .w { opacity: 0.16; }
.js .lede.split .w.lit { opacity: 1; }

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 32px;
  margin-top: 72px;
}

.facts > div {
  border-top: 1px solid var(--line-bright);
  padding-top: 18px;
}

.facts dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.facts dd {
  font-family: var(--display);
  font-stretch: 125%;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
}

/* ---------- cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  position: relative;
  background: linear-gradient(160deg, var(--surface-2), var(--surface) 55%);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 30px 38px;
  overflow: hidden;
  transition: border-color 0.35s ease, transform 0.45s var(--ease-out), opacity 0.7s var(--ease-out);
}

/* pointer-following light */
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(125, 193, 66, 0.16), transparent 62%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card > * { position: relative; z-index: 1; }

.card:hover { border-color: rgba(125, 193, 66, 0.45); transform: translateY(-4px); }
.card:hover::after { opacity: 1; }

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.card-icon {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: var(--green-bright);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-index {
  font-family: var(--display);
  font-stretch: 125%;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.card h3 {
  font-family: var(--display);
  font-stretch: 125%;
  font-size: 1.25rem;
  font-weight: 720;
  line-height: 1.3;
  margin: 56px 0 12px;
}

.card p { color: var(--text-dim); font-size: 0.9375rem; line-height: 1.7; }

/* scroll reveals — only hidden once JS is confirmed running */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out), border-color 0.35s ease;
}

.js .reveal.visible { opacity: 1; transform: none; }
.js .card.reveal.visible:hover { transform: translateY(-4px); }

.js .cards .card:nth-child(2) { transition-delay: 0.08s; }
.js .cards .card:nth-child(3) { transition-delay: 0.16s; }
.js .cards .card.visible { transition-delay: 0s; }

/* ---------- lab / teaser ---------- */

.lab-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(900px 420px at 85% 20%, rgba(78, 151, 50, 0.14), transparent 65%),
    linear-gradient(160deg, var(--surface-2), var(--surface) 60%);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 440px;
}

.lab-copy { padding: 56px 24px 56px 52px; align-self: center; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 16px 7px 14px;
  margin-bottom: 28px;
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(165, 211, 74, 0.6);
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(165, 211, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(165, 211, 74, 0); }
}

.lab-copy h3,
.contact-panel h3 {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.lab-copy h3 { font-size: clamp(1.75rem, 3.4vw, 2.75rem); max-width: 14ch; }

.lab-copy h3 em,
.contact-panel h3 em {
  font-style: normal;
  background: linear-gradient(97deg, var(--lime), var(--green-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lab-copy p {
  margin-top: 24px;
  color: var(--text-dim);
  max-width: 44ch;
  font-size: 1rem;
}

.lab-copy .lab-note { margin-top: 28px; font-size: 0.875rem; }

#lab-canvas {
  width: 100%;
  height: 100%;
  min-height: 380px;
  display: block;
}

/* ---------- contact ---------- */

.contact-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 72px 52px 60px;
  overflow: hidden;
  background:
    radial-gradient(700px 380px at 12% 118%, rgba(125, 193, 66, 0.2), transparent 70%),
    radial-gradient(520px 300px at 96% -10%, rgba(78, 151, 50, 0.12), transparent 70%),
    linear-gradient(160deg, var(--surface-2), var(--surface) 60%);
}

.contact-panel { container-type: inline-size; }
.contact-panel h3 { font-size: clamp(1.5rem, 4.4vw, 3.5rem); }
.contact-panel h3 em { display: block; }

@supports (font-size: 1cqw) {
  /* sized from the panel so each authored line stays whole */
  .contact-panel h3 { font-size: clamp(1.5rem, 7.2cqw, 3.5rem); }
}

.contact-panel .contact-sub {
  margin-top: 22px;
  color: var(--text-dim);
  font-size: 1.0625rem;
  max-width: 44ch;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}

.contact-actions .cta {
  text-transform: none;
  letter-spacing: 0;
  font-size: 1rem;
  padding: 18px 30px;
}

.copy-btn { display: none; }
.js .copy-btn { display: inline-flex; }
.copy-btn.done { color: var(--lime); border-color: rgba(125, 193, 66, 0.6); }

.contact-panel .legal-line {
  margin-top: 56px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 0.875rem;
}

/* ================= footer ================= */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 72px 0 40px;
  margin-top: 40px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 48px 64px;
}

.footer-brand { display: flex; align-items: flex-start; gap: 18px; }
.footer-brand img { height: 52px; width: auto; }

.footer-brand p {
  font-family: var(--display);
  font-stretch: 125%;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  max-width: 16ch;
}

.footer-nav { display: flex; flex-wrap: wrap; gap: 32px 72px; }

.footer-nav h2 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.footer-nav ul { list-style: none; }
.footer-nav li + li { margin-top: 6px; }
.footer-nav a { color: var(--text); font-size: 0.9375rem; }
.footer-nav a:hover { color: var(--lime); text-decoration: none; }

.footer-wordmark {
  display: block;
  width: 100%;
  height: auto;
  margin: 64px 0 28px;
  overflow: visible;
}

.footer-wordmark text {
  font-family: var(--display);
  font-stretch: 125%;
  font-weight: 850;
  font-size: 100px;
  fill: none;
  stroke: rgba(125, 193, 66, 0.3);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
  transition: stroke 0.6s ease;
}

.site-footer:hover .footer-wordmark text { stroke: rgba(165, 211, 74, 0.75); }

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.8125rem;
}

.footer-meta a { color: var(--text-dim); }
.footer-meta a:hover { color: var(--lime); text-decoration: none; }

/* ================= subpages ================= */

.page { padding: 176px 0 72px; min-height: 70vh; }

.page-head {
  padding-bottom: 56px;
  margin-bottom: 56px;
  border-bottom: 1px solid var(--line);
}

.page-head .eyebrow { margin-bottom: 24px; }

.page h1 {
  font-family: var(--display);
  font-stretch: 125%;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 820;
  line-height: 1.04;
  text-transform: uppercase;
  letter-spacing: -0.015em;
}

.page .updated { color: var(--text-dim); font-size: 0.9375rem; margin-top: 18px; }

.page-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.toc { position: sticky; top: 104px; }

.toc p {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.toc ul { list-style: none; border-left: 1px solid var(--line-bright); }

.toc a {
  display: block;
  padding: 5px 0 5px 16px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--text-dim);
  font-size: 0.875rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.toc a:hover { color: var(--text); border-left-color: var(--green-bright); text-decoration: none; }

.prose { max-width: 68ch; }

.prose h2 {
  font-family: var(--display);
  font-stretch: 125%;
  font-size: 1.375rem;
  font-weight: 750;
  line-height: 1.3;
  margin: 56px 0 16px;
}

.prose p, .prose ul { color: var(--text-dim); margin-bottom: 16px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--green-bright); }
.prose .intro { font-size: 1.1875rem; line-height: 1.7; color: var(--text); margin-bottom: 0; }

.callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  margin: 40px 0 0;
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(78, 151, 50, 0.14), transparent 70%),
    linear-gradient(160deg, var(--surface-2), var(--surface) 60%);
}

.callout p { margin: 0; color: var(--text); font-weight: 600; }
.callout p span { display: block; color: var(--text-dim); font-weight: 400; font-size: 0.875rem; }
.callout .cta { text-transform: none; letter-spacing: 0; font-size: 0.9375rem; padding: 14px 24px; }

/* ================= 404 ================= */

.error-page { text-align: center; padding: 200px 0 120px; }

.error-page .code {
  font-family: var(--display);
  font-stretch: 125%;
  font-size: clamp(6rem, 22vw, 13rem);
  font-weight: 850;
  line-height: 1;
  background: linear-gradient(100deg, var(--lime), var(--green-dark));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page h1 {
  font-family: var(--display);
  font-stretch: 125%;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 750;
  margin-top: 16px;
}

.error-page p { color: var(--text-dim); margin: 12px 0 40px; }

.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }

/* short viewports: keep the whole hero, marquee included, above the fold */
@media (min-width: 761px) and (max-height: 860px) {
  .hero > .wrap { padding-top: 108px; padding-bottom: 44px; }
  .hero h1 { font-size: clamp(2.25rem, min(6.8vw, 10.4vh), 5.375rem); }
  .eyebrow { margin-bottom: 26px; }
  .hero .sub { margin-top: 28px; }
  .hero-cta-row { margin-top: 34px; }
  .marquee { padding: 16px 0; }
}

/* ================= motion safety ================= */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .boot, .fade, .hero h1 .line > span { animation: none; opacity: 1; transform: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .section-rule { transform: none; transition: none; }
  .js .lede.split .w { opacity: 1; transition: none; }
  .hero::before, .hero::after, .marquee-track, .status::before { animation: none; }
  .card, .cta, .cta::after, .site-nav a::after, .site-header { transition: none; }
  @view-transition { navigation: none; }
}

/* ================= responsive ================= */

@media (max-width: 1020px) {
  .section-grid, .page-grid { grid-template-columns: 1fr; gap: 20px; }
  .section-label, .toc { position: static; }
  .toc { margin-bottom: 16px; }
  .lab-panel { grid-template-columns: 1fr; }
  .lab-copy { padding: 44px 32px 0; }
  #lab-canvas { min-height: 320px; }
  .facts { grid-template-columns: repeat(2, 1fr); gap: 28px 32px; }
  .contact-panel { padding: 56px 32px 44px; }
}

@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .card h3 { margin-top: 36px; }
  section { padding: 76px 0; }
  .section-rule { margin-bottom: 40px; }
  .page { padding-top: 140px; }
  .page-head { padding-bottom: 40px; margin-bottom: 40px; }
}

@media (max-width: 760px) {
  :root { --gutter: 22px; }

  /* full-screen menu */
  .js .nav-toggle { display: inline-flex; }

  .js .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 0 var(--gutter);
    background: rgba(10, 13, 11, 0.97);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
  }

  .js.nav-open .site-nav { visibility: visible; opacity: 1; transition: opacity 0.3s ease; }
  .js.nav-open body { overflow: hidden; }

  .js .site-nav a {
    font-family: var(--display);
    font-stretch: 125%;
    font-size: clamp(1.75rem, 9vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--text);
    padding: 8px 0;
    align-self: flex-start;
  }

  .js .site-nav a.active,
  .js .site-nav a[aria-current] { color: var(--lime); }
  .js .site-nav a::after { display: none; }

  /* without JS: one destination only — the logo covers "home" */
  html:not(.js) .site-nav a:not(:last-child) { display: none; }

  .site-header { padding: 16px 0; }
  .site-header.scrolled { padding: 10px 0; }
  .brand img { height: 30px; }

  .hero > .wrap { padding-top: 112px; padding-bottom: 56px; }
  .eyebrow { font-size: 0.75rem; letter-spacing: 0.2em; margin-bottom: 28px; }
  .eyebrow::before { width: 28px; }
  .hero .sub { margin-top: 28px; }
  .hero-cta-row { flex-wrap: wrap; gap: 14px; margin-top: 36px; }
  .marquee { padding: 16px 0; }
  .marquee-group li::after { margin: 0 24px; }

  .facts { margin-top: 48px; }
  .lab-copy { padding: 36px 24px 0; }
  .contact-panel { padding: 44px 24px 32px; border-radius: 16px; }
  .contact-actions .cta { font-size: 0.875rem; padding: 16px 22px; }
  .contact-panel .legal-line { margin-top: 40px; }
  .footer-wordmark { margin: 48px 0 24px; }
}

@media (max-width: 560px) {
  /* longest line is ~11.8em and must fit inside the gutters */
  .hero h1 { font-size: 7vw; }
  .brand .wordmark { font-size: 0.8125rem; }
  .footer-nav { gap: 28px 48px; }
}
