:root {
  --dark: #111315;
  --dark-2: #171a1f;
  --navy: #18222d;
  --ivory: #f3efe6;
  --ivory-soft: #f7f4ed;
  --paper: #fffdf8;
  --text-light: #f5f3ee;
  --text-dark: #171717;
  --muted: #747b84;
  --muted-dark: #adb2b7;
  --gold: #b79a63;
  --gold-dark: #987b49;
  --line-dark: rgba(255, 255, 255, .1);
  --line-gold: rgba(183, 154, 99, .25);
  --line-light: rgba(23, 23, 23, .11);
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", Arial, sans-serif;
  --container: 1240px;
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; overflow-x: hidden; }
body { margin: 0; color: var(--text-dark); background: var(--ivory-soft); font-family: var(--sans); font-size: 16px; line-height: 1.7; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.skip-link { position: fixed; z-index: 2000; top: .75rem; left: .75rem; padding: .7rem 1rem; color: var(--dark); background: var(--ivory); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.container { width: min(calc(100% - 3rem), var(--container)); margin-inline: auto; }
.eyebrow { display: block; margin-bottom: 1rem; color: var(--gold-dark); font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.dark .eyebrow, .navy .eyebrow { color: #c9ad76; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; }
h1 { max-width: 11ch; margin-bottom: 1.5rem; color: var(--text-light); font-size: clamp(3.8rem, 7.5vw, 6.4rem); letter-spacing: -.045em; }
h2 { max-width: 14ch; margin-bottom: 1.35rem; font-size: clamp(2.25rem, 4.6vw, 4rem); letter-spacing: -.035em; }
h3 { margin-bottom: .65rem; font-size: 1.3rem; }
p { color: var(--muted); }
.dark p, .navy p { color: var(--muted-dark); }
.lead { max-width: 790px; font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.75; }
.section { padding: clamp(5.5rem, 10vw, 8.5rem) 0; }
.paper { background: var(--paper); }
.ivory { background: var(--ivory); }
.dark { color: var(--text-light); background: var(--dark); }
.navy { color: var(--text-light); background: var(--navy); }

.case-nav { position: sticky; z-index: 1000; top: 0; color: var(--text-light); background: rgba(17, 19, 21, .94); border-bottom: 1px solid var(--line-dark); backdrop-filter: blur(16px); }
.nav-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; color: var(--dark); background: var(--gold); border-radius: 7px; font-family: var(--serif); font-weight: 600; }
.brand-copy { display: grid; line-height: 1.2; }
.brand-copy strong { font-size: .76rem; letter-spacing: .09em; text-transform: uppercase; }
.brand-copy span { color: #aeb4b9; font-size: .66rem; }
.nav-actions { display: flex; align-items: center; gap: .7rem; }

.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .78rem 1.1rem; border: 1px solid transparent; border-radius: 10px; font-size: .84rem; font-weight: 700; line-height: 1; text-decoration: none; transition: color 220ms ease, background 220ms ease, border-color 220ms ease, transform 220ms ease; }
.button:hover { transform: translateY(-3px); }
.button--gold { color: var(--dark); background: var(--gold); border-color: var(--gold); }
.button--ivory { color: var(--dark); background: var(--ivory); border-color: var(--ivory); }
.button--outline { color: inherit; background: transparent; border-color: currentColor; opacity: .88; }
.button--outline:hover { border-color: var(--gold); opacity: 1; }
.button-row { display: flex; flex-wrap: wrap; gap: .8rem; }
.text-link { display: inline-flex; align-items: center; gap: .35rem; color: var(--gold-dark); font-size: .78rem; font-weight: 700; text-decoration: none; }
.dark .text-link, .navy .text-link { color: #d0b77f; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.case-hero { position: relative; padding: clamp(6.8rem, 12vw, 10rem) 0 clamp(5.5rem, 9vw, 8rem); overflow: hidden; }
.case-hero::before { content: ""; position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(rgba(183, 154, 99, .2) 1px, transparent 1px), linear-gradient(90deg, rgba(183, 154, 99, .2) 1px, transparent 1px); background-size: 76px 76px; mask-image: linear-gradient(to right, transparent, black 65%, transparent); }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr); gap: clamp(3rem, 7vw, 7rem); align-items: end; }
.category { color: #c9ad76; font-size: .72rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.outcome { max-width: 800px; margin-bottom: 2rem; color: #c4c8cb; font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.7; }
.tag-list { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.tag-list li { padding: .35rem .62rem; color: #d2d5d7; background: rgba(255, 255, 255, .04); border: 1px solid var(--line-dark); border-radius: 999px; font-size: .68rem; font-weight: 600; }
.hero-proof { margin: 0; overflow: hidden; background: rgba(23, 26, 31, .78); border: 1px solid var(--line-gold); border-radius: var(--radius); box-shadow: 0 30px 70px rgba(0, 0, 0, .25); }
.hero-proof img { width: 100%; height: auto; background: #0f1114; }
.hero-proof figcaption { padding: .9rem 1rem; color: var(--muted-dark); border-top: 1px solid var(--line-dark); font-size: .72rem; }
.fact-strip { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 3rem; background: var(--line-dark); border: 1px solid var(--line-dark); }
.fact { padding: 1.2rem; background: rgba(23, 26, 31, .92); }
.fact strong { display: block; color: var(--text-light); font-family: var(--serif); font-size: 1.45rem; font-weight: 500; }
.fact span { color: var(--muted-dark); font-size: .7rem; }

.disclosure { padding: 1rem 0; color: #d7d9db; background: var(--dark-2); border-top: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); }
.disclosure p { margin: 0; color: #bdc1c4; font-size: .78rem; }
.disclosure strong { color: #d0b77f; }

.section-head { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 2rem; align-items: start; margin-bottom: 3rem; }
.section-number { padding-top: .5rem; color: var(--gold-dark); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.dark .section-number, .navy .section-number { color: #c9ad76; }
.section-copy { max-width: 900px; }

.problem-grid, .control-grid, .tech-grid { display: grid; gap: 1px; background: var(--line-light); border: 1px solid var(--line-light); }
.problem-grid { grid-template-columns: repeat(3, 1fr); }
.problem-card, .control-card, .tech-card { padding: 1.5rem; background: var(--ivory-soft); }
.problem-card { min-height: 190px; }
.problem-card span, .control-card span { display: block; margin-bottom: 2rem; color: var(--gold-dark); font-size: .66rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.problem-card p, .control-card p { margin: 0; }

.lifecycle { counter-reset: lifecycle; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.lifecycle li { counter-increment: lifecycle; position: relative; min-height: 150px; padding: 1.2rem; background: var(--paper); border: 1px solid var(--line-light); border-radius: var(--radius); }
.lifecycle li::before { content: counter(lifecycle, decimal-leading-zero); display: block; margin-bottom: 1.4rem; color: var(--gold-dark); font-family: var(--serif); font-size: 1.15rem; }
.lifecycle li:not(:last-child)::after { content: "→"; position: absolute; z-index: 2; top: 50%; right: -.78rem; color: var(--gold-dark); font-weight: 700; }
.lifecycle strong { display: block; font-size: .82rem; line-height: 1.45; }
.solution-boundaries { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 2.5rem; }
.boundary-card { padding: 1.6rem; background: var(--paper); border: 1px solid var(--line-light); border-radius: var(--radius); }
.boundary-card h3 { color: var(--gold-dark); font-family: var(--sans); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.plain-list, .value-list { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.plain-list li, .value-list li { position: relative; padding-left: 1.2rem; color: var(--muted); }
.plain-list li::before, .value-list li::before { content: ""; position: absolute; top: .7rem; left: 0; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; }

.architecture-grid { display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.architecture-flow { display: grid; gap: .5rem; }
.flow-node { min-height: 70px; display: grid; place-items: center; padding: 1rem 1.3rem; text-align: center; color: #e2e2de; background: #1d2732; border: 1px solid rgba(183, 154, 99, .22); border-radius: 10px; font-size: .82rem; font-weight: 600; }
.flow-arrow { height: 24px; display: grid; place-items: center; color: var(--gold); }
.proof-figure { margin: 0; overflow: hidden; background: var(--dark-2); border: 1px solid var(--line-gold); border-radius: var(--radius); }
.proof-figure img { width: 100%; height: auto; background: #0f1114; }
.proof-figure figcaption { padding: 1rem 1.1rem; color: var(--muted-dark); border-top: 1px solid var(--line-dark); font-size: .74rem; }

.evidence-intro { max-width: 800px; margin-bottom: 2.5rem; }
.evidence-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.evidence-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; margin: 0; background: var(--dark-2); border: 1px solid var(--line-dark); border-radius: var(--radius); }
.evidence-media { flex: 0 0 auto; min-width: 0; min-height: 0; aspect-ratio: 3 / 2; overflow: hidden; display: grid; place-items: center; padding: 1rem; background: #0f1114; border-bottom: 1px solid var(--line-dark); }
.evidence-media img { width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; }
.evidence-caption { position: static; z-index: auto; flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 1.2rem; }
.evidence-caption strong { display: block; margin-bottom: .45rem; color: var(--text-light); font-size: .9rem; }
.evidence-caption span { color: var(--muted-dark); font-size: .76rem; overflow-wrap: anywhere; }
.evidence-caption .text-link { margin-top: auto; padding-top: 1rem; }

.control-grid { grid-template-columns: repeat(3, 1fr); margin-bottom: 2.5rem; }
.control-card { min-height: 190px; }
.control-card h3 { font-family: var(--sans); font-size: .9rem; font-weight: 700; }
.reliability-proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.reliability-proof .proof-figure { color: var(--text-light); }
.reliability-proof .proof-figure img { width: 100%; height: 250px; object-fit: contain; }

.value-grid { display: grid; grid-template-columns: .78fr 1.22fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.value-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 2rem; }
.value-list li { padding-bottom: .8rem; border-bottom: 1px solid var(--line-light); }
.quote-band { margin-top: 3rem; padding: clamp(2.2rem, 5vw, 4rem); text-align: center; color: var(--text-light); background: var(--dark-2); border: 1px solid var(--line-gold); border-radius: var(--radius); }
.quote-band p { margin: 0; color: var(--text-light); font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 3.5rem); line-height: 1.25; }
.quote-band span { color: var(--gold); }

.tech-grid { grid-template-columns: repeat(4, 1fr); background: var(--line-dark); border-color: var(--line-dark); }
.tech-card { min-height: 230px; color: var(--text-light); background: var(--dark-2); }
.tech-card h3 { margin-bottom: 1.2rem; color: #d0b77f; font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.tech-card ul { display: grid; gap: .45rem; margin: 0; padding: 0; color: var(--muted-dark); list-style: none; font-size: .84rem; }

.final-cta { text-align: center; }
.final-cta h2 { max-width: none; }
.final-cta .lead { margin-inline: auto; }
.final-cta .button-row { justify-content: center; margin-top: 2rem; }
footer { padding: 2.2rem 0; color: #aeb3b7; background: #0d0f11; border-top: 1px solid var(--line-dark); }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; align-items: center; font-size: .75rem; }

@media (max-width: 1060px) {
  .hero-grid, .architecture-grid, .value-grid { grid-template-columns: 1fr; }
  .hero-proof { max-width: 760px; }
  .problem-grid, .control-grid { grid-template-columns: repeat(2, 1fr); }
  .lifecycle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lifecycle li:not(:last-child)::after { display: none; }
  .reliability-proof { grid-template-columns: 1fr; }
  .reliability-proof .proof-figure img { height: auto; }
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .container { width: min(calc(100% - 1.5rem), var(--container)); }
  .nav-inner { min-height: 68px; }
  .brand-copy span { display: none; }
  .nav-actions .button--outline { display: none; }
  h1 { font-size: clamp(3rem, 15vw, 4.5rem); }
  .section { padding: 4.8rem 0; }
  .section-head { grid-template-columns: 1fr; gap: .6rem; margin-bottom: 2.2rem; }
  .section-number { padding-top: 0; }
  .fact-strip, .problem-grid, .control-grid, .evidence-grid, .solution-boundaries, .value-list, .tech-grid { grid-template-columns: 1fr; }
  .lifecycle { grid-template-columns: 1fr; }
  .lifecycle li { min-height: auto; }
  .lifecycle li:not(:last-child)::after { display: block; content: "↓"; top: auto; right: 50%; bottom: -.85rem; transform: translateX(50%); }
  .evidence-media { aspect-ratio: 6 / 5; }
  .button-row { display: grid; grid-template-columns: 1fr; }
  .button { width: 100%; }
  .case-hero .button-row { max-width: 440px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 430px) {
  .brand-copy { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .button:hover { transform: none; }
}
