/* =========================================================
   up2metric — shared styles
   Editorial / technical aesthetic
   Open Sans (matches logo) + Newsreader for displays
   ========================================================= */
:root {
  --ink:        #1a1a1c;
  --ink-soft:   #2a2a2e;
  --ink-line:   #3a3a3f;
  --paper:      #f5f3f0;
  --paper-warm: #eae8e4;
  --paper-soft: #faf9f7;
  --gray-500:   #6b6b70;
  --gray-700:   #4a4a4f;
  --yellow:     #ffd23f;
  --yellow-deep:#e9b800;
  --accent-blue:#1f3a5f;

  --container:  1280px;
  --gutter:     clamp(20px, 4vw, 48px);

  /* Open Sans matches the wordmark; Newsreader for editorial display */
  --font-display: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  --font-body:    'Open Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

::selection { background: var(--yellow); color: var(--ink); }

/* ============== Layout helpers ============== */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-500);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.05;
  color: var(--ink);
  /* prevent very long unbreakable words pushing layout on mobile */
  overflow-wrap: break-word;
  word-wrap: break-word;
}

p { color: var(--gray-700); }

/* ============== Navigation ============== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  background: rgba(245, 243, 240, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.scrolled { border-bottom-color: rgba(26, 26, 28, 0.08); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { height: 60px; width: auto; display: block; }

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  font-size: 14px;
  font-weight: 600;
}
.nav-links a {
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
  transition: color .2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 0;
  background: var(--yellow);
  transition: width .25s ease;
}
.nav-links a:hover,
.nav-links a.active { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  transition: transform .2s, background .2s;
}
.nav-cta:hover { transform: translateY(-1px); background: var(--ink-soft); }
.nav-cta::after { content: '→'; transition: transform .2s; }
.nav-cta:hover::after { transform: translate(2px, -1px); }

/* ============== Mobile nav: hamburger + slide-in drawer ============== */
.nav-toggle {
  display: none;  /* shown only at <=720px */
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid rgba(26, 26, 28, 0.18);
  border-radius: 6px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  transition: background .2s, border-color .2s;
}
.nav-toggle:hover { background: rgba(26, 26, 28, 0.06); }
.nav-toggle svg { width: 22px; height: 22px; display: block; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open  { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.nav-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(320px, 86vw);
  background: var(--paper);
  border-left: 1px solid rgba(26, 26, 28, 0.12);
  z-index: 200;
  padding: 80px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform .3s cubic-bezier(.2,.7,.2,1), visibility .3s;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.nav-drawer.open { transform: translateX(0); visibility: visible; }
.nav-drawer a {
  display: block;
  padding: 14px 0;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 1px solid rgba(26, 26, 28, 0.06);
  transition: color .2s;
}
.nav-drawer a:hover,
.nav-drawer a.active { color: var(--yellow-deep); }
.nav-drawer a.active { font-style: italic; }
.nav-drawer .drawer-cta {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--ink);
  color: var(--paper);
  border-bottom: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
}
.nav-drawer .drawer-cta::after { content: '→'; }

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 28, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.nav-backdrop.open { opacity: 1; pointer-events: auto; }

/* ============== Section base ============== */
.section {
  padding: clamp(80px, 11vw, 160px) 0;
  position: relative;
}
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  margin-bottom: 72px;
  align-items: start;
}
.section-head h2 {
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.0;
  letter-spacing: -0.025em;
}
.section-head h2 em {
  font-style: italic;
  color: var(--gray-700);
  font-weight: 300;
}
.section-head .lead {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
}

/* Page hero (used on inner pages) */
.page-hero {
  padding: 160px 0 80px;
  position: relative;
}
.page-hero h1 {
  font-size: clamp(48px, 8vw, 112px);
  line-height: 0.95;
  font-weight: 300;
  letter-spacing: -0.035em;
  max-width: 16ch;
}
.page-hero h1 em {
  font-style: italic;
  font-weight: 400;
  position: relative;
}
.page-hero h1 em::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  bottom: 0.06em;
  height: 0.16em;
  background: var(--yellow);
  z-index: -1;
}
.page-hero .lead {
  margin-top: 32px;
  font-size: clamp(17px, 1.7vw, 22px);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 60ch;
}

/* ============== Footer ============== */
.footer {
  background: var(--ink);
  color: rgba(245, 243, 240, 0.7);
  padding: 64px 0 32px;
  font-size: 14px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(245, 243, 240, 0.12);
}
.footer-brand img {
  height: 36px;
  filter: brightness(0) invert(1);
  opacity: 0.95;
  margin-bottom: 18px;
}
.footer-brand p {
  color: rgba(245, 243, 240, 0.55);
  font-size: 13px;
  max-width: 32ch;
  line-height: 1.5;
}
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--yellow);
  font-weight: 600;
  margin-bottom: 18px;
}
.footer-col a, .footer-col span {
  display: block;
  color: rgba(245, 243, 240, 0.7);
  margin-bottom: 8px;
  transition: color .2s;
  font-size: 14px;
}
.footer-col a:hover { color: var(--yellow); }

.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(245, 243, 240, 0.45);
}

/* ============== Reveal animations ============== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============== Buttons ============== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform .2s, background .2s;
  border: none;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); background: var(--ink-soft); }
.btn::after { content: '→'; transition: transform .2s; }
.btn:hover::after { transform: translate(3px, -1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* ============== Decorative grid bg (hero) ============== */
.decor-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}
.decor-grid svg { width: 100%; height: 100%; }

/* =========================================================
   SHARED COMPONENTS  (lifted from per-page <style> blocks so
   index.html and about.html stay consistent)
   ========================================================= */

/* Values grid + cards. Used on home (.values section) and about
   (.about-values section). Same background on both via per-page bg. */
.values-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px;
}
.value-card {
  padding: 40px 36px; background: var(--paper); position: relative;
  border-top: 3px solid var(--yellow);
  transition: transform .3s;
}
.value-card:hover { transform: translateY(-4px); }
.value-card:nth-child(2) { border-top-color: var(--accent-blue); }
.value-card:nth-child(3) { border-top-color: var(--yellow-deep); }
.value-card:nth-child(4) { border-top-color: var(--ink); }
.value-card h3 {
  font-size: 32px; font-weight: 500; letter-spacing: -0.015em;
  margin-bottom: 14px; font-family: var(--font-display);
}
.value-card p { font-size: 16px; line-height: 1.55; color: var(--ink-soft); }

/* About stats: 2-col grid of stats with big numerals.
   Defaults to ink-on-paper (about.html). When wrapped in .about (home),
   the .about override below flips it to yellow-on-dark. */
.about-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  margin-top: 56px; padding-top: 40px;
  border-top: 1px solid rgba(26, 26, 28, 0.15);
}
.about-stats .stat .num {
  font-family: var(--font-display); font-size: clamp(40px, 5vw, 64px);
  font-weight: 400; letter-spacing: -0.03em; color: var(--ink); line-height: 1;
}
.about-stats .stat .label {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--gray-500); margin-top: 10px; display: block;
}
/* Dark variant for the home page (section.about has ink bg) */
.about .about-stats { border-top-color: rgba(245, 243, 240, 0.15); }
.about .about-stats .stat .num   { color: var(--yellow); }
.about .about-stats .stat .label { color: rgba(245, 243, 240, 0.6); }

/* Milestones / Timeline. Horizontal scroller, used on home and about. */
.timeline { position: relative; }
.timeline-track {
  display: flex; gap: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--ink) transparent;
  padding-bottom: 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.timeline-track::-webkit-scrollbar { height: 4px; }
.timeline-track::-webkit-scrollbar-thumb { background: var(--ink); border-radius: 2px; }

.tl-item {
  flex: 0 0 280px;
  padding: 32px 24px 24px;
  border-right: 1px solid rgba(26, 26, 28, 0.18);
  position: relative;
  scroll-snap-align: start;
}
.tl-item:first-child { border-left: 1px solid rgba(26, 26, 28, 0.18); }
.tl-item .year {
  font-family: var(--font-display); font-size: 36px; font-weight: 500;
  color: var(--ink); letter-spacing: -0.02em;
  position: relative; display: inline-block;
}
.tl-item .year::after {
  content: ''; position: absolute;
  bottom: 4px; left: -4px; right: -4px;
  height: 8px; background: var(--yellow);
  z-index: -1; opacity: 0; transition: opacity .25s;
}
.tl-item:hover .year::after { opacity: 1; }
.tl-item h4 {
  font-size: 16px; font-weight: 700;
  margin: 12px 0 8px; letter-spacing: -0.005em;
  font-family: var(--font-body);
}
.tl-item p { font-size: 13px; line-height: 1.5; color: var(--gray-700); }

/* Why us: dark band with three reasons. Used on about.html and
   about_with_team.html (lifted here so both pages share the same rule). */
.why { background: var(--ink); color: var(--paper); }
.why h2 { color: var(--paper); }
.why .eyebrow { color: var(--yellow); }
.why .eyebrow::before { background: var(--yellow); }
.why .lead { color: rgba(244, 241, 234, 0.75); }
.why-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid rgba(244, 241, 234, 0.18);
}
.why-item {
  padding: 48px 32px; border-right: 1px solid rgba(244, 241, 234, 0.18);
  display: flex; flex-direction: column; gap: 16px; min-height: 280px;
}
.why-item:last-child { border-right: none; }
.why-item .num { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.16em; color: var(--yellow); }
.why-item h3 {
  font-family: var(--font-display); font-size: 28px; font-weight: 400;
  color: var(--paper); letter-spacing: -0.01em; line-height: 1.15;
}
.why-item p { color: rgba(244, 241, 234, 0.72); font-size: 15px; line-height: 1.6; }

/* ============== Responsive ============== */
@media (max-width: 1024px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .values-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; border-top: none; }
  .why-item { border-right: none; border-bottom: 1px solid rgba(244, 241, 234, 0.18); }
}

@media (max-width: 720px) {
  /* Switch nav to mobile hamburger drawer */
  .nav-links { display: none; }
  .nav-cta   { display: none; }  /* CTA available inside the drawer */
  .nav-toggle { display: inline-flex; }

  .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  /* Shared component adjustments */
  .about-stats { grid-template-columns: 1fr 1fr; gap: 16px; }
}

/* Small phones */
@media (max-width: 480px) {
  :root { --gutter: 16px; }
  .nav { padding: 10px 0; }
  .brand img { height: 36px; }      /* down from 60px */
  .nav-toggle { width: 40px; height: 40px; }
  .nav-toggle svg { width: 20px; height: 20px; }

  .about-stats { grid-template-columns: 1fr; gap: 20px; }
  .footer { padding: 40px 0 24px; }
  .footer-top { padding-bottom: 24px; gap: 24px; }
}

/* =========================================================
   FUNDING RIBBON, slim band immediately below the hero
   ========================================================= */
.funding-ribbon {
  border-top: 1px solid rgba(26, 26, 28, 0.1);
  border-bottom: none;
  background: transparent;
  color: var(--ink);
  padding: 14px 0;
  height: auto;
  display: block;
}
.funding-ribbon-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}
.funding-ribbon-logos {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.funding-ribbon-logos::-webkit-scrollbar { display: none; }

.funding-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 210px;
  height: 60px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--gray-700);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid transparent;
}
.funding-chip:hover,
.funding-chip:focus-visible {
  background: var(--paper-soft);
  border-color: rgba(26, 26, 28, 0.15);
  color: var(--ink);
}
.funding-chip img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}
.funding-chip svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: block;
  opacity: 0.75;
  transition: opacity .2s;
}
.funding-chip:hover svg { opacity: 1; color: var(--yellow-deep); }
.funding-chip-name {
  display: inline-block;
}

@media (max-width: 720px) {
  .funding-ribbon { padding: 10px 0; }
  .funding-ribbon-inner { justify-content: center; }
  .funding-ribbon-logos { gap: 8px; }
  .funding-chip { width: 160px; height: 48px; padding: 4px; }
  .funding-chip-name { display: none; }
  .funding-chip svg { width: 22px; height: 22px; }
}

/* =========================================================
   ACCESSIBILITY TOOLBAR
   ========================================================= */

/* Skip link, hidden until focused */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--ink); color: var(--paper);
  padding: 12px 18px; border-radius: 4px;
  z-index: 200; font-size: 14px; font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 16px; outline: 2px solid var(--yellow); outline-offset: 2px; }

/* Visible focus styles for keyboard users */
:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
  border-radius: 2px;
}

.a11y-toggle {
  position: fixed; right: 20px; bottom: 20px;
  z-index: 150;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--ink); color: var(--paper);
  border: 2px solid var(--yellow);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px -4px rgba(26, 26, 28, 0.35);
  transition: transform .2s, background .2s;
}
.a11y-toggle:hover { transform: translateY(-2px); background: var(--ink-soft); }
.a11y-toggle svg { width: 24px; height: 24px; }

.a11y-panel {
  position: fixed; right: 20px; bottom: 84px;
  z-index: 150;
  width: 300px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid rgba(26, 26, 28, 0.18);
  border-radius: 8px;
  box-shadow: 0 12px 32px -8px rgba(26, 26, 28, 0.3);
  padding: 20px 20px 16px;
  opacity: 0; pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
}
.a11y-panel.open { opacity: 1; pointer-events: auto; transform: translateY(0); }

.a11y-panel h4 {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.a11y-panel h4 .label-title {
  font-family: var(--font-display); font-size: 18px; font-weight: 500;
  color: var(--ink); letter-spacing: -0.01em;
  text-transform: none; display: block; margin-bottom: 4px;
}

.a11y-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(26, 26, 28, 0.08);
}
.a11y-row:last-of-type { border-bottom: none; }
.a11y-row .name { font-size: 13px; font-weight: 600; color: var(--ink); }

.a11y-btn-group { display: flex; gap: 6px; align-items: center; }
.a11y-btn {
  background: transparent;
  border: 1px solid rgba(26, 26, 28, 0.2);
  color: var(--ink);
  width: 30px; height: 30px;
  border-radius: 4px; cursor: pointer;
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s;
}
.a11y-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.a11y-btn--toggle {
  width: auto; padding: 0 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}
.a11y-btn--toggle.on { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.a11y-size-display {
  font-family: var(--font-mono); font-size: 11px;
  width: 36px; text-align: center; color: var(--ink); font-weight: 600;
}

.a11y-reset {
  width: 100%; margin-top: 12px;
  padding: 10px;
  border: 1px solid var(--ink); background: transparent;
  color: var(--ink); cursor: pointer;
  border-radius: 4px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600;
  transition: background .2s, color .2s;
}
.a11y-reset:hover { background: var(--ink); color: var(--paper); }

/* ============== Accessibility variants ============== */

/* Font scaling via CSS zoom (scales whole layout proportionally) */
html { font-size: 16px; }
body { font-size: 1rem; }

/* High contrast mode: heavy text-on-bg ratios, brighter accent */
body.a11y-contrast {
  --paper: #ffffff;
  --paper-warm: #f0f0f0;
  --paper-soft: #ffffff;
  --ink: #000000;
  --ink-soft: #000000;
  --ink-line: #000000;
  --gray-500: #1a1a1a;
  --gray-700: #000000;
  --yellow: #ffd000;
  --yellow-deep: #b88a00;
  --accent-blue: #003a8c;
}
body.a11y-contrast a,
body.a11y-contrast .nav-links a,
body.a11y-contrast .footer a { text-decoration: underline; }
body.a11y-contrast .exp-card,
body.a11y-contrast .enable-card,
body.a11y-contrast .product,
body.a11y-contrast .news-card,
body.a11y-contrast .iso-card,
body.a11y-contrast .funding-card,
body.a11y-contrast .value-card { border-width: 2px; border-color: #000; }
body.a11y-contrast .feat,
body.a11y-contrast .r-pillar { border-left-width: 4px; }

/* Dark mode: invert paper/ink */
body.a11y-dark {
  --paper: #15151a;
  --paper-warm: #1c1c22;
  --paper-soft: #1a1a20;
  --ink: #f5f3f0;
  --ink-soft: #d8d4c8;
  --ink-line: #4a4a52;
  --gray-500: #a0a0a8;
  --gray-700: #c8c5be;
}
body.a11y-dark .nav { background: rgba(21, 21, 26, 0.82); }
body.a11y-dark .nav.scrolled { border-bottom-color: rgba(245, 243, 240, 0.12); }
body.a11y-dark .nav-drawer { background: #1c1c22; border-left-color: rgba(245, 243, 240, 0.12); }
body.a11y-dark .nav-drawer a { border-bottom-color: rgba(245, 243, 240, 0.08); }
body.a11y-dark .nav-toggle { border-color: rgba(245, 243, 240, 0.2); }
body.a11y-dark .nav-toggle:hover { background: rgba(245, 243, 240, 0.08); }
body.a11y-dark .footer { background: #0a0a10; }
body.a11y-dark .why,
body.a11y-dark .work .visual { background: #0a0a10; }
body.a11y-dark .about,
body.a11y-dark .contact,
body.a11y-dark .iso-summary { background: #0a0a10; color: var(--ink); }
body.a11y-dark .a11y-panel { background: #1c1c22; color: #f5f3f0; border-color: rgba(245, 243, 240, 0.15); }
body.a11y-dark .a11y-btn { color: #f5f3f0; border-color: rgba(245, 243, 240, 0.25); }
body.a11y-dark .a11y-btn:hover { background: #f5f3f0; color: #15151a; border-color: #f5f3f0; }
body.a11y-dark .a11y-reset { color: #f5f3f0; border-color: #f5f3f0; }
body.a11y-dark .a11y-reset:hover { background: #f5f3f0; color: #15151a; }

/* Reduced motion (respects user preference automatically) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 720px) {
  .a11y-panel { width: calc(100vw - 32px); right: 16px; }
  .a11y-toggle { right: 16px; bottom: 16px; }
}

