:root {
  --ink: #07111d;
  --ink-deep: #040b13;
  --surface: #0d1b2b;
  --surface-raised: #12263b;
  --line: rgba(214, 232, 247, 0.15);
  --line-strong: rgba(126, 194, 255, 0.35);
  --paper: #f4f8fc;
  --muted: #adc0d1;
  --blue: #72c5ff;
  --blue-strong: #1e9bfa;
  --gold: #f4bd6d;
  --green: #9fe3c5;
  --max: 1120px;
  --radius: 18px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--ink);
  color: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

a { color: inherit; text-underline-offset: 0.22em; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

button { font: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: -70px;
  left: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
}

.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 17, 29, 0.88);
  backdrop-filter: blur(16px);
}

.nav-shell,
.container {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--blue);
  border-radius: 50%;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.91rem;
  font-weight: 680;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--paper); }

.nav-contact {
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--paper) !important;
}

.menu-button {
  display: none;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 8px 10px;
  background: transparent;
  color: var(--paper);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 72px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(114, 197, 255, 0.06) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(rgba(114, 197, 255, 0.06) 1px, transparent 1px) 0 0 / 56px 56px,
    radial-gradient(circle at 78% 22%, rgba(30, 155, 250, 0.23), transparent 28%),
    radial-gradient(circle at 12% 92%, rgba(244, 189, 109, 0.12), transparent 24%),
    var(--ink);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, var(--ink) 0%, transparent 44%, rgba(7, 17, 29, 0.32) 100%);
}

.hero-grid,
.case-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 56px;
  align-items: end;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 22px;
  height: 1px;
  content: "";
  background: currentColor;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 790px;
  margin-bottom: 21px;
  font-size: clamp(2.8rem, 6.4vw, 5.55rem);
  font-weight: 760;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.hero-copy {
  max-width: 620px;
  color: #cfdeea;
  font-size: clamp(1.04rem, 1.6vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 31px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 47px;
  padding: 11px 17px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font-size: 0.94rem;
  font-weight: 760;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover { transform: translateY(-2px); }

.button-primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #04111f;
}

.button-secondary { color: var(--paper); }
.button-secondary:hover { border-color: var(--blue); background: rgba(114, 197, 255, 0.08); }

.signal-panel {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(10, 27, 43, 0.82);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.25);
}

.signal-panel::before {
  position: absolute;
  top: -1px;
  left: 25px;
  width: 78px;
  height: 2px;
  content: "";
  background: var(--gold);
}

.signal-label {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.signal-list { display: grid; gap: 14px; }

.signal-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.signal-row:last-child { border-bottom: 0; padding-bottom: 0; }
.signal-row span { color: var(--muted); font-size: 0.86rem; }
.signal-row strong { color: var(--paper); font-size: 0.97rem; text-align: right; }

.section { padding: 88px 0; }
.section-dark { background: var(--ink-deep); }
.section + .section { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: end;
  margin-bottom: 34px;
}

.section-head h2,
.contact-panel h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.section-head p {
  max-width: 510px;
  margin-bottom: 0;
  color: var(--muted);
}

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

.work-card {
  display: flex;
  min-height: 365px;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(18, 38, 59, 0.94), rgba(9, 20, 33, 0.94));
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.work-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: 0 21px 55px rgba(0, 0, 0, 0.25);
}

.work-card-top { display: grid; gap: 20px; }

.case-number,
.small-label {
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 830;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.work-card h3 {
  margin-bottom: 12px;
  font-size: 1.45rem;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.work-card p { color: var(--muted); }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d4e3ee;
  font-size: 0.74rem;
  font-weight: 650;
}

.card-metric {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-top: 21px;
  border-top: 1px solid var(--line);
}

.card-metric strong {
  color: var(--gold);
  font-size: 2.45rem;
  letter-spacing: -0.07em;
  line-height: 1;
}

.card-metric span { color: var(--muted); font-size: 0.84rem; }

.work-link { margin-top: 20px; color: var(--blue); font-weight: 800; font-size: 0.9rem; }

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.method-step {
  min-height: 230px;
  padding: 27px;
  border-right: 1px solid var(--line);
  background: rgba(13, 27, 43, 0.72);
}

.method-step:last-child { border-right: 0; }
.method-step .step-num { color: var(--gold); font-size: 0.78rem; font-weight: 850; }
.method-step h3 { margin: 34px 0 10px; font-size: 1.17rem; letter-spacing: -0.025em; }
.method-step p { margin-bottom: 0; color: var(--muted); font-size: 0.92rem; }

.about-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 56px;
}

.about-title { color: var(--blue); font-weight: 780; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.8rem; }
.about-statement { max-width: 760px; font-size: clamp(1.45rem, 3vw, 2.35rem); font-weight: 560; letter-spacing: -0.045em; line-height: 1.15; }
.about-statement em { color: var(--gold); font-style: normal; }

.contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: linear-gradient(130deg, #102a45, #0a1726 68%);
}

.contact-panel p { max-width: 560px; margin: 15px 0 0; color: #c4d6e4; }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px; }

.site-footer {
  padding: 25px 0 36px;
  background: var(--ink-deep);
  color: #7f98ab;
  font-size: 0.78rem;
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  gap: 25px;
}

.footer-shell p { max-width: 740px; margin: 0; }

/* Case study pages */
.case-hero {
  padding: 83px 0 58px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 86% 20%, rgba(30, 155, 250, 0.2), transparent 26%),
    linear-gradient(90deg, rgba(114, 197, 255, 0.05) 1px, transparent 1px) 0 0 / 54px 54px,
    var(--ink);
}

.back-link {
  display: inline-flex;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 720;
}

.case-hero h1 { max-width: 790px; margin-bottom: 20px; font-size: clamp(2.85rem, 6.8vw, 5.1rem); }
.case-lede { max-width: 670px; color: #c6d8e6; font-size: 1.14rem; }

.case-chip {
  align-self: end;
  padding: 20px;
  border-left: 2px solid var(--gold);
  background: rgba(13, 27, 43, 0.75);
}

.case-chip strong { display: block; margin-bottom: 5px; color: var(--gold); font-size: 1.75rem; letter-spacing: -0.06em; }
.case-chip span { color: var(--muted); font-size: 0.83rem; }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.metric-card {
  min-height: 148px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(13, 27, 43, 0.7);
}

.metric-card:last-child { border-right: 0; }
.metric-card strong { display: block; color: var(--paper); font-size: clamp(1.75rem, 3.8vw, 2.55rem); letter-spacing: -0.065em; line-height: 1; }
.metric-card span { display: block; margin-top: 10px; color: var(--muted); font-size: 0.85rem; }

.case-body {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  gap: 64px;
  padding: 72px 0;
}

.case-facts { align-self: start; position: sticky; top: 94px; }
.case-facts h2 { margin-bottom: 18px; font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); }
.facts-list { display: grid; gap: 17px; margin: 0; }
.facts-list div { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.facts-list dt { margin-bottom: 4px; color: #839caf; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.facts-list dd { margin: 0; color: var(--paper); font-size: 0.93rem; }

.case-content { max-width: 760px; }
.case-content section { margin-bottom: 60px; }
.case-content h2 { margin-bottom: 14px; font-size: clamp(1.7rem, 3.4vw, 2.6rem); letter-spacing: -0.05em; line-height: 1.06; }
.case-content p { color: #c5d3df; font-size: 1.04rem; }

.decision-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 28px; }
.decision-card { min-height: 188px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.decision-card .small-label { color: var(--gold); }
.decision-card h3 { margin: 27px 0 8px; font-size: 1.05rem; letter-spacing: -0.025em; }
.decision-card p { margin-bottom: 0; color: var(--muted); font-size: 0.88rem; }

.evidence-section > p:not(.eyebrow):not(.evidence-disclaimer) { max-width: 690px; }
.evidence-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 30px; }
.evidence-figure { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.evidence-figure-wide { grid-column: 1 / -1; }
.evidence-figure img { display: block; width: 100%; height: auto; border-bottom: 1px solid var(--line); }
.evidence-figure figcaption { padding: 13px 16px 15px; color: var(--muted); font-size: 0.8rem; line-height: 1.45; }
.evidence-figure figcaption strong { color: var(--paper); font-size: 0.82rem; }
.evidence-disclaimer { margin: 17px 0 0; color: #9cb0c0 !important; font-size: 0.81rem !important; line-height: 1.5; }
#evidence-title { scroll-margin-top: 96px; }

.signal-map { display: grid; gap: 12px; margin-top: 25px; }
.signal-map-row { display: grid; grid-template-columns: 0.75fr 1.05fr 1.15fr; gap: 16px; align-items: center; padding: 17px 19px; border: 1px solid var(--line); border-radius: 10px; background: rgba(13, 27, 43, 0.75); }
.signal-map-row strong { font-size: 0.94rem; }
.signal-map-row span { color: var(--muted); font-size: 0.88rem; }
.signal-map-row em { color: var(--green); font-size: 0.84rem; font-style: normal; }

.integrity-note {
  padding: 22px 24px;
  border: 1px solid rgba(244, 189, 109, 0.45);
  border-radius: 12px;
  background: rgba(244, 189, 109, 0.07);
}

.integrity-note h2 { color: var(--gold); font-size: 1.23rem; }
.integrity-note p { margin-bottom: 0; color: #e2d2b9; font-size: 0.92rem; }

.case-next {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.case-next span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 0.78rem; font-weight: 780; letter-spacing: 0.1em; text-transform: uppercase; }
.case-next a { color: var(--blue); font-size: 1.1rem; font-weight: 770; }

html.js-ready [data-reveal] { opacity: 0; transform: translateY(15px); transition: opacity 460ms ease, transform 460ms ease; }
html.js-ready [data-reveal].is-visible { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .nav-shell { min-height: 64px; flex-wrap: wrap; gap: 8px 16px; padding: 10px 0; }
  .nav-shell nav { width: 100%; }
  .nav-links {
    flex-wrap: wrap;
    gap: 8px 16px;
  }
  html.js-ready .nav-shell { min-height: 64px; flex-wrap: nowrap; padding: 0; }
  html.js-ready .nav-shell nav { width: auto; }
  html.js-ready .menu-button { display: inline-flex; }
  html.js-ready .nav-links {
    position: absolute;
    top: 64px;
    right: 20px;
    left: 20px;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    background: #0b1928;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  }
  html.js-ready .nav-links.is-open { display: flex; }
  html.js-ready .nav-links a { display: block; padding: 11px 12px; }
  html.js-ready .nav-contact { border: 0; }
  .hero, .case-hero { padding-top: 68px; }
  .hero-grid, .case-hero-grid, .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .signal-panel, .case-chip { max-width: 520px; }
  .work-grid { grid-template-columns: 1fr; }
  .work-card { min-height: 290px; }
  .method-grid { grid-template-columns: repeat(2, 1fr); }
  .method-step:nth-child(2) { border-right: 0; }
  .method-step:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .metric-strip { grid-template-columns: 1fr; }
  .metric-card { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .metric-card:last-child { border-bottom: 0; }
  .case-body { grid-template-columns: 1fr; gap: 36px; padding: 54px 0; }
  .case-facts { position: static; }
  .facts-list { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .facts-list div { padding: 0 0 12px; }
  .decision-grid { grid-template-columns: 1fr; }
  .evidence-figure-wide { grid-column: auto; }
}

@media (max-width: 560px) {
  .nav-shell, .container { width: min(calc(100% - 28px), var(--max)); }
  .brand { font-size: 0.92rem; }
  .brand-mark { width: 31px; height: 31px; }
  .hero { padding-bottom: 52px; }
  h1 { font-size: clamp(2.55rem, 13vw, 4.2rem); }
  .section { padding: 62px 0; }
  .section-head, .contact-panel, .footer-shell, .case-next { align-items: flex-start; flex-direction: column; }
  .method-grid { grid-template-columns: 1fr; }
  .method-step, .method-step:nth-child(2) { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .method-step:last-child { border-bottom: 0; }
  .contact-panel { padding: 30px 24px; }
  .facts-list { grid-template-columns: 1fr; }
  .signal-map-row { grid-template-columns: 1fr; gap: 7px; }
}

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