:root {
  color-scheme: light;
  --bg: #f4f2ed;
  --bg-elevated: #fbfaf7;
  --surface: #ffffff;
  --surface-soft: #e9eef0;
  --ink: #132838;
  --ink-soft: #526574;
  --line: #cbd5da;
  --line-strong: #8fa4af;
  --accent: #1f7895;
  --accent-bright: #2e9bb9;
  --accent-soft: #d8edf3;
  --amber: #a96820;
  --amber-soft: #f5e7d5;
  --teal: #267d78;
  --teal-soft: #d9eeeb;
  --blue: #386fa7;
  --blue-soft: #dce8f5;
  --shadow: 0 20px 55px rgba(18, 40, 55, 0.1);
  --header: rgba(244, 242, 237, 0.9);
  --max: 1180px;
  --radius: 18px;
  --radius-sm: 10px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07141e;
  --bg-elevated: #0a1b27;
  --surface: #0d2230;
  --surface-soft: #112d3c;
  --ink: #edf6fa;
  --ink-soft: #a9bdc7;
  --line: #294656;
  --line-strong: #557181;
  --accent: #59bad3;
  --accent-bright: #76cce1;
  --accent-soft: #123b49;
  --amber: #e3a554;
  --amber-soft: #3c2b1b;
  --teal: #67c3ba;
  --teal-soft: #123a38;
  --blue: #78aee0;
  --blue-soft: #172f49;
  --shadow: 0 24px 65px rgba(0, 0, 0, 0.3);
  --header: rgba(7, 20, 30, 0.9);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 6%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 27rem),
    linear-gradient(180deg, var(--bg-elevated) 0, var(--bg) 34rem);
  font-family: Aptos, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-bright); }
img { display: block; max-width: 100%; }
button, input { font: inherit; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.65rem 0.9rem;
  color: var(--surface);
  background: var(--ink);
  border-radius: 6px;
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: var(--header);
  backdrop-filter: blur(18px);
}

.header-inner, .section, .footer-inner {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  font-family: Bahnschrift, "Arial Narrow", sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.brand-corner {
  width: 25px;
  height: 25px;
  position: relative;
  border-left: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
}
.brand-corner::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 7px;
  height: 7px;
  border: 2px solid var(--amber);
  border-radius: 50%;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: auto;
}

.site-nav a {
  padding: 0.45rem 0.72rem;
  color: var(--ink-soft);
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 620;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: var(--surface-soft); }

.theme-toggle, .menu-toggle {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
  border-radius: 999px;
  cursor: pointer;
}

.theme-toggle { padding: 0.42rem 0.75rem; font-size: 0.88rem; font-weight: 700; }
.menu-toggle { display: none; width: 42px; height: 42px; }

main { min-height: 70vh; }
.section { padding-block: 5.5rem; }
.section-compact { padding-block: 3.5rem; }
.section-tint { border-block: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 54%, transparent); }

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--accent);
  font-family: Bahnschrift, "Arial Narrow", sans-serif;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin-top: 0;
  color: var(--ink);
  font-family: Bahnschrift, "Arial Narrow", Aptos, sans-serif;
  line-height: 1.06;
}
h1 { max-width: 930px; margin-bottom: 1.4rem; font-size: clamp(2.65rem, 7vw, 6rem); letter-spacing: -0.045em; }
h2 { margin-bottom: 1.1rem; font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -0.03em; }
h3 { margin-bottom: 0.6rem; font-size: 1.3rem; letter-spacing: -0.015em; }
p { margin: 0 0 1rem; }

.hero { padding-block: clamp(5rem, 10vw, 8.5rem) 5rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr); gap: clamp(2.5rem, 6vw, 6.5rem); align-items: center; }
.hero-copy { max-width: 760px; }
.hero-copy .lead { max-width: 720px; color: var(--ink-soft); font-size: clamp(1.15rem, 2vw, 1.38rem); }

.button-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.68rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 750;
}
.button:hover { color: #fff; background: var(--accent-bright); }
.button-secondary { color: var(--ink); background: transparent; border-color: var(--line-strong); }
.button-secondary:hover { color: var(--ink); background: var(--surface); }

.evidence-flow {
  position: relative;
  min-height: 390px;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(145deg, var(--surface), var(--surface-soft));
  box-shadow: var(--shadow);
  overflow: hidden;
}
.evidence-flow::before {
  content: "";
  position: absolute;
  inset: 22% -20% auto 16%;
  height: 1px;
  background: var(--line-strong);
  transform: rotate(-19deg);
}
.flow-node {
  position: absolute;
  width: min(72%, 250px);
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--ink) 9%, transparent);
}
.flow-node strong { display: block; font-size: 1rem; }
.flow-node span { color: var(--ink-soft); font-size: 0.84rem; }
.flow-node:nth-child(1) { top: 12%; left: 7%; }
.flow-node:nth-child(2) { top: 39%; right: 7%; }
.flow-node:nth-child(3) { bottom: 10%; left: 12%; }
.flow-node::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -7px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--surface);
}

.status-strip {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 5px var(--amber-soft); }

.section-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: end; margin-bottom: 2rem; }
.section-heading > div { max-width: 760px; }
.section-heading p { color: var(--ink-soft); }

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 335px;
  padding: 1.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 34px color-mix(in srgb, var(--ink) 6%, transparent);
  overflow: hidden;
}
.product-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--accent); }
.product-card[data-accent="amber"]::before { background: var(--amber); }
.product-card[data-accent="teal"]::before { background: var(--teal); }
.product-card[data-accent="blue"]::before { background: var(--blue); }
.product-stage { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 2.2rem; }
.pill { display: inline-flex; padding: 0.26rem 0.55rem; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.pill-muted { color: var(--ink-soft); background: var(--surface-soft); }
.product-card h3 { font-size: 1.85rem; }
.product-subtitle { min-height: 3.2em; color: var(--ink-soft); font-size: 0.9rem; }
.product-descriptor { margin-top: -0.35rem; color: var(--accent); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.product-descriptor-lead { margin-top: -0.6rem; font-size: 0.84rem; }
.product-summary { color: var(--ink-soft); }
.product-card .text-link { margin-top: auto; font-weight: 800; }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.principle { padding-top: 1.25rem; border-top: 2px solid var(--line-strong); }
.principle p { color: var(--ink-soft); }

.page-hero { padding-block: 5rem 3rem; border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 1000px; font-size: clamp(2.8rem, 7vw, 5.4rem); }
.page-lead { max-width: 820px; color: var(--ink-soft); font-size: 1.2rem; }
.breadcrumbs { margin-bottom: 1.5rem; color: var(--ink-soft); font-size: 0.86rem; }
.breadcrumbs a { color: inherit; }

.product-detail-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr); gap: 3rem; align-items: start; }
.product-detail-grid ul, .article-body ul { padding-left: 1.2rem; }
.product-detail-grid li, .article-body li { margin-bottom: 0.6rem; }
.detail-panel { padding: 1.3rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.detail-panel dl { margin: 0; }
.detail-panel dt { margin-top: 1rem; color: var(--ink-soft); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.detail-panel dt:first-child { margin-top: 0; }
.detail-panel dd { margin: 0.2rem 0 0; }
.boundary-note { margin-top: 2rem; padding: 1.2rem 1.3rem; border-left: 4px solid var(--amber); background: var(--amber-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.product-art { margin-top: 2rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #07141e; }
.product-art img { width: 100%; height: auto; }

.article-list { display: grid; gap: 1rem; }
.article-card { padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.article-card p { color: var(--ink-soft); }
.article-meta { color: var(--ink-soft); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; }
.article-body { max-width: 820px; }
.article-body h2 { margin-top: 3rem; font-size: 2rem; }
.article-body h3 { margin-top: 2.2rem; }
.article-body a { overflow-wrap: anywhere; }

.site-footer { margin-top: 4rem; border-top: 1px solid var(--line); background: var(--bg-elevated); }
.footer-inner { display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr; gap: 2rem; padding-block: 3rem; }
.footer-brand { max-width: 520px; }
.footer-brand p { color: var(--ink-soft); }
.footer-links { display: grid; align-content: start; gap: 0.45rem; }
.footer-links strong { margin-bottom: 0.35rem; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; }
.footer-links a { color: var(--ink-soft); text-decoration: none; }
.footer-bottom { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; padding-block: 1rem 1.8rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 0.82rem; }

@media (max-width: 900px) {
  .hero-grid, .product-detail-grid { grid-template-columns: 1fr; }
  .evidence-flow { min-height: 330px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principles { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .header-inner { min-height: 66px; }
  .brand { font-size: 0.8rem; letter-spacing: 0.08em; }
  .menu-toggle { display: inline-grid; place-items: center; margin-left: auto; }
  .site-nav { display: none; position: absolute; top: calc(100% + 1px); left: 0; right: 0; padding: 0.75rem 1rem 1rem; border-bottom: 1px solid var(--line); background: var(--bg-elevated); box-shadow: var(--shadow); }
  .site-nav[data-open] { display: grid; }
  .site-nav a { padding: 0.72rem; }
  .theme-toggle { padding-inline: 0.65rem; }
  .section { padding-block: 4rem; }
  .hero { padding-block: 4rem; }
  .product-grid, .footer-inner { grid-template-columns: 1fr; }
  .product-card { min-height: 0; }
  .product-subtitle { min-height: 0; }
  .section-heading { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
