@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Newsreader:opsz,wght@6..72,600&display=swap');

:root {
  --ink: #18201f;
  --muted: #5b6865;
  --paper: #f7f9f8;
  --surface: #ffffff;
  --line: #d7dfdc;
  --teal: #087f73;
  --teal-dark: #075f57;
  --coral: #d55d43;
  --amber: #e1a72c;
  --blue: #315f92;
  --display: "Newsreader", Georgia, serif;
  --body: "Manrope", Arial, sans-serif;
  --utility: "DM Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  line-height: 1.55;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  min-height: 76px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; gap: 10px; align-items: center; font-weight: 800; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: var(--ink);
  color: white;
  font: 500 .72rem var(--utility);
}
nav { display: flex; gap: 24px; align-items: center; }
nav a { color: var(--muted); font-size: .9rem; font-weight: 700; text-decoration: none; }
nav a:hover { color: var(--ink); }
.nav-action { padding: 8px 13px; border: 1px solid var(--line); background: var(--surface); }

main { overflow: hidden; }
.hero {
  display: grid;
  grid-template-columns: .86fr 1.14fr;
  gap: 72px;
  align-items: center;
  width: min(1180px, calc(100% - 40px));
  min-height: 610px;
  margin: 0 auto;
  padding: 72px 0 64px;
}
.eyebrow, .utility-label {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font: 500 .76rem var(--utility);
  text-transform: uppercase;
}
h1, h2 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: 0; }
h1 { max-width: 720px; font-size: clamp(3.25rem, 6vw, 5.7rem); line-height: .96; }
h2 { font-size: clamp(2.25rem, 4vw, 4rem); line-height: 1; }
.hero-lede { max-width: 620px; margin: 24px 0 0; color: var(--muted); font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 0 17px; font-weight: 800; text-decoration: none; }
.button.primary { background: var(--ink); color: white; }
.button.primary:hover { background: var(--teal-dark); }
.button.secondary { border: 1px solid var(--line); background: var(--surface); }

.shift-lab { position: relative; min-width: 0; padding: 26px; border: 1px solid #bdcbc7; background: var(--surface); box-shadow: 14px 14px 0 #dfe9e6; }
.lab-heading { display: flex; gap: 20px; justify-content: space-between; align-items: start; }
.lab-heading strong { display: block; max-width: 300px; font-size: 1.1rem; }
.utility-label { display: block; margin-bottom: 4px; font-size: .68rem; }
.segmented { display: inline-flex; padding: 3px; background: #eaf0ee; }
.segment { min-height: 34px; padding: 0 11px; border: 0; background: transparent; color: var(--muted); font: 500 .67rem var(--utility); cursor: pointer; }
.segment.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(24,32,31,.14); }
.timeline { position: relative; height: 130px; margin: 58px 0 22px; }
.timeline-track { position: absolute; inset: 43px 0 auto; height: 38px; background: #eaf0ee; }
.shift-block { position: absolute; top: 0; bottom: 0; transition: width .35s ease, left .35s ease, background .35s ease; }
.shift-block.before { left: 0; width: 25%; background: var(--teal); }
.shift-block.after { left: 25%; width: 75%; background: var(--coral); }
.midnight-line { position: absolute; z-index: 3; top: -16px; bottom: -16px; left: 25%; width: 2px; background: var(--ink); }
.time-label { position: absolute; top: 0; color: var(--muted); font: 500 .72rem var(--utility); }
.time-label.start { left: 0; }
.time-label.midnight { left: 25%; transform: translateX(-50%); }
.time-label.end { right: 0; }
.lab-result { display: grid; grid-template-columns: 180px 1fr; gap: 16px; align-items: start; padding-top: 18px; border-top: 1px solid var(--line); }
.result-status { color: var(--coral); font: 500 .75rem/1.4 var(--utility); }
.lab-result p { margin: 0; color: var(--muted); font-size: .9rem; }
.shift-lab.is-operational .shift-block.before { width: 100%; background: var(--teal); }
.shift-lab.is-operational .shift-block.after { left: 100%; width: 0; background: var(--teal); }
.shift-lab.is-operational .result-status { color: var(--teal-dark); }

.proof-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
.proof-strip div { min-width: 0; padding: 24px max(18px, calc((100vw - 1180px) / 8)); border-right: 1px solid var(--line); }
.proof-strip div:last-child { border-right: 0; }
.proof-strip strong, .proof-strip span { display: block; }
.proof-strip strong { font-size: .88rem; }
.proof-strip span { margin-top: 3px; color: var(--muted); font-size: .78rem; }

.work-section, .method-section { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 112px 0; }
.section-intro { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: end; margin-bottom: 46px; }
.section-intro .eyebrow { grid-column: 1 / -1; margin-bottom: -24px; }
.section-intro > p:last-child { max-width: 500px; margin: 0; color: var(--muted); }
.case-feature { display: grid; grid-template-columns: 1.25fr .75fr; gap: 44px; align-items: center; }
.case-visual { display: block; min-width: 0; border: 1px solid var(--line); background: #dfe9e6; overflow: hidden; }
.case-visual img { display: block; width: 100%; height: auto; aspect-ratio: 16/10; object-fit: cover; object-position: top; transition: transform .4s ease; }
.case-visual:hover img { transform: scale(1.015); }
.case-facts { margin: 0; }
.case-facts div { padding: 17px 0; border-bottom: 1px solid var(--line); }
.case-facts dt { color: var(--teal-dark); font: 500 .7rem var(--utility); text-transform: uppercase; }
.case-facts dd { margin: 5px 0 0; font-weight: 700; }
.case-stack { margin: 22px 0; color: var(--muted); font: 400 .72rem/1.7 var(--utility); }
.text-link { display: inline-flex; gap: 9px; align-items: center; color: var(--teal-dark); font-weight: 800; text-decoration: none; }
.text-link:hover span { transform: translateX(4px); }
.text-link span { transition: transform .2s ease; }

.method-section { border-top: 1px solid var(--line); }
.section-intro.compact { grid-template-columns: 1fr; max-width: 720px; }
.method-list { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; list-style: none; counter-reset: method; }
.method-list li { min-height: 180px; padding: 22px; border-left: 1px solid var(--line); counter-increment: method; }
.method-list li:last-child { border-right: 1px solid var(--line); }
.method-list li::before { content: "0" counter(method); display: block; margin-bottom: 38px; color: var(--coral); font: 500 .74rem var(--utility); }
.method-list span { font-weight: 800; }
.method-list p { margin: 6px 0 0; color: var(--muted); font-size: .88rem; }

footer { display: flex; justify-content: space-between; gap: 24px; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 36px 0 54px; border-top: 1px solid var(--line); }
footer p { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
footer a { color: var(--teal-dark); font: 500 .76rem var(--utility); }

.case-page .site-header { margin-bottom: 0; }
.case-hero { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 74px 0 52px; }
.case-hero h1 { max-width: 900px; }
.case-hero .hero-lede { max-width: 760px; }
.case-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 48px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.case-summary div { padding: 20px; border-right: 1px solid var(--line); }
.case-summary div:last-child { border-right: 0; }
.case-summary dt { color: var(--muted); font: 500 .68rem var(--utility); text-transform: uppercase; }
.case-summary dd { margin: 7px 0 0; font-weight: 700; }
.case-content { width: min(960px, calc(100% - 40px)); margin: 0 auto; padding: 86px 0; }
.case-content section { display: grid; grid-template-columns: 210px 1fr; gap: 52px; padding: 48px 0; border-bottom: 1px solid var(--line); }
.case-content h2 { font-size: 2rem; }
.case-content p { margin: 0 0 18px; color: var(--muted); }
.formula {
  margin: 22px 0 0;
  padding: 16px;
  border-left: 4px solid var(--teal);
  background: #eaf0ee;
  color: var(--ink);
  font: 500 .8rem/1.8 var(--utility);
  white-space: pre-wrap;
}
.comparison-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.comparison-table th, .comparison-table td { padding: 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: .86rem; }
.comparison-table th { color: var(--muted); font: 500 .68rem var(--utility); text-transform: uppercase; }
.comparison-table .good { color: var(--teal-dark); font-weight: 800; }
.comparison-table .warn { color: var(--coral); font-weight: 800; }
.dashboard-preview { display: block; margin-top: 22px; border: 1px solid var(--line); background: var(--surface); }
.dashboard-preview img { display: block; width: 100%; height: auto; }
.case-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

@media (max-width: 900px) {
  nav a:not(.nav-action) { display: none; }
  .hero, .case-feature { grid-template-columns: 1fr; }
  .hero { gap: 46px; padding-top: 58px; }
  .proof-strip { grid-template-columns: repeat(2, 1fr); }
  .proof-strip div:nth-child(2) { border-right: 0; }
  .proof-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .section-intro { grid-template-columns: 1fr; align-items: start; }
  .section-intro .eyebrow { margin-bottom: -24px; }
  .method-list { grid-template-columns: repeat(2, 1fr); }
  .method-list li:nth-child(2) { border-right: 1px solid var(--line); }
  .method-list li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 620px) {
  .site-header, .hero, .work-section, .method-section, footer, .case-hero, .case-content { width: min(100% - 28px, 1180px); }
  .brand span:last-child { display: none; }
  h1 { font-size: 3.15rem; }
  .hero { min-height: auto; padding: 46px 0 56px; }
  .shift-lab { padding: 18px; box-shadow: 8px 8px 0 #dfe9e6; }
  .lab-heading { display: block; }
  .segmented { width: 100%; margin-top: 18px; }
  .segment { flex: 1; }
  .lab-result { grid-template-columns: 1fr; gap: 6px; }
  .proof-strip { grid-template-columns: 1fr 1fr; }
  .proof-strip div { padding: 18px 14px; }
  .work-section, .method-section { padding: 76px 0; }
  .section-intro { margin-bottom: 32px; }
  .method-list { grid-template-columns: 1fr; }
  .method-list li, .method-list li:nth-child(2), .method-list li:last-child { min-height: auto; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .method-list li::before { margin-bottom: 18px; }
  footer { display: block; }
  footer a { display: inline-block; margin-top: 18px; }
  .case-summary { grid-template-columns: 1fr; }
  .case-summary div, .case-summary div:last-child { border-right: 0; border-bottom: 1px solid var(--line); }
  .case-content section { grid-template-columns: 1fr; gap: 18px; }
  .table-scroll { overflow-x: auto; }
  .comparison-table { min-width: 680px; }
}

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