:root {
  --ground: #0f1115;
  --panel: #16181d;
  --panel-raised: #1d2026;
  --line: #2c3038;
  --grid: rgb(100 210 255 / 0.075);
  --ink: #ffffff;
  --muted: #a7b0bb;
  --accent: #64d2ff;
  --accent-deep: #0071e3;
  --font-sans: "Space Grotesk", system-ui, sans-serif;
  --font-display: "Oswald", Impact, sans-serif;
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    radial-gradient(circle at 78% 8%, rgb(100 210 255 / 0.12), transparent 30rem),
    var(--ground);
  background-size: 56px 56px, 56px 56px, auto, auto;
  font-family: var(--font-sans); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }
.skip-link {
  position: fixed; left: 1rem; top: 1rem; z-index: 20; transform: translateY(-200%);
  padding: 0.75rem 1rem; color: var(--ground); background: var(--accent); text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }
.site-head {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center;
  justify-content: space-between; min-height: 76px; padding: 0 clamp(1.25rem, 4vw, 4rem);
  border-bottom: 1px solid var(--line); background: rgb(15 17 21 / 0.88);
  backdrop-filter: blur(18px);
}
.brand, .back-link {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; text-decoration: none;
}
.brand span, .accent { color: var(--accent); }
.back-link { display: inline-flex; gap: 0.65rem; color: var(--muted); font-size: 0.92rem; }
.back-link::before { content: "←"; color: var(--accent); }
.back-link:hover, .back-link:focus-visible { color: var(--ink); }

main { width: min(1440px, calc(100% - 2.5rem)); margin-inline: auto; }
.hero {
  display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1.14fr);
  gap: clamp(2.5rem, 6vw, 7rem); align-items: center;
  min-height: min(850px, calc(100vh - 76px)); padding: clamp(4rem, 9vw, 8rem) 0;
}
.eyebrow, .section-index, .fact dt, .card-no, .media-label, .step-no {
  margin: 0; color: var(--accent); font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 10ch; margin: 0 0 1.5rem; font-family: var(--font-display);
  font-size: clamp(4.6rem, 7.4vw, 8.5rem); font-weight: 700;
  letter-spacing: -0.045em; line-height: 0.82; text-wrap: balance; text-transform: uppercase;
}
h1.title-long { font-size: clamp(4rem, 6.4vw, 7.4rem); }
.hero-copy { max-width: 42rem; color: var(--muted); font-size: clamp(1rem, 1.35vw, 1.28rem); line-height: 1.6; }
.hero-copy strong { color: var(--ink); font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.8rem;
  min-height: 48px; padding: 0.75rem 1rem; border: 1px solid var(--accent);
  color: var(--accent); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em;
  text-decoration: none; text-transform: uppercase;
}
.button::after { content: "↗"; }
.button.secondary { border-color: var(--line); color: var(--muted); }
.button:hover, .button:focus-visible { color: var(--ground); border-color: var(--accent); background: var(--accent); }

.media-card {
  position: relative; height: clamp(390px, 38vw, 520px); overflow: hidden; margin: 0;
  border: 1px solid var(--line); background: var(--panel);
  clip-path: polygon(0 0, calc(100% - 36px) 0, 100% 36px, 100% 100%, 0 100%);
}
.media-card::before {
  content: ""; position: absolute; inset: 4%; z-index: 2; pointer-events: none;
  border: 1px solid rgb(100 210 255 / 0.3);
  clip-path: polygon(0 0, 93% 0, 100% 12%, 100% 100%, 7% 100%, 0 88%);
}
.media-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to top, rgb(15 17 21 / 0.72), transparent 44%);
}
.media-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-card.portrait img { object-position: center 42%; }
.media-label, .media-code { position: absolute; z-index: 3; }
.media-label { left: 7%; top: 7%; }
.media-code { right: 7%; bottom: 7%; color: var(--ink); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; }

.facts {
  display: grid; grid-template-columns: repeat(6, 1fr); margin: 0 0 clamp(6rem, 11vw, 10rem);
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.fact { min-width: 0; padding: 1.25rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact dd {
  margin: 0.65rem 0 0; font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.9rem); line-height: 1.05; text-transform: uppercase;
}
.case-section { margin-bottom: clamp(6rem, 11vw, 10rem); scroll-margin-top: 96px; }
.section-head { display: grid; gap: 1.5rem; margin-bottom: 2.5rem; }
.section-head h2 {
  max-width: 12ch; margin-bottom: 0; font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 6.5rem); line-height: 0.9;
  overflow-wrap: normal; word-break: normal; hyphens: manual;
  text-wrap: balance; text-transform: uppercase;
}
.section-head > p:last-child {
  width: min(100%, 52rem); margin: 0 0 0 auto; color: var(--muted); line-height: 1.65;
}
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.card { min-width: 0; padding: clamp(1.5rem, 4vw, 3.25rem); background: var(--panel); }
.card h3, .step h3 {
  margin: 2rem 0 1rem; font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.8vw, 2.7rem); line-height: 1; text-transform: uppercase;
}
.card p, .step p { margin-bottom: 0; color: var(--muted); line-height: 1.65; }
.card.wide {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1.35fr);
  gap: clamp(1.5rem, 5vw, 5rem); align-items: end;
  background: linear-gradient(110deg, rgb(100 210 255 / 0.08), transparent 42%), var(--panel-raised);
}
.card.wide h3 { margin-bottom: 0; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.step {
  min-width: 0; min-height: 290px; padding: clamp(1.35rem, 3vw, 2.25rem);
  border: 1px solid var(--line); background: var(--panel);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}
.step h3 { margin-top: 3rem; }
.callout {
  padding: clamp(1rem, 2.5vw, 2.25rem); border: 1px solid var(--accent);
  background: linear-gradient(120deg, rgb(100 210 255 / 0.12), transparent 55%), var(--panel);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
}
.callout p { max-width: 68rem; margin-bottom: 0; font-size: clamp(1rem, 1.25vw, 1.25rem); line-height: 1.5; }
.closing {
  display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: end;
  padding: clamp(3rem, 7vw, 6rem) 0; border-top: 1px solid var(--line);
}
.closing h2 {
  max-width: 800px; margin-bottom: 0; font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6.5rem); line-height: 0.92; text-transform: uppercase;
}
footer {
  display: flex; justify-content: space-between; gap: 2rem;
  padding: 1.5rem clamp(1.25rem, 4vw, 4rem); border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.76rem; letter-spacing: 0.09em; text-transform: uppercase;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

@media (min-width: 1001px) {
  .section-head {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(2.5rem, 5vw, 6rem); align-items: start;
  }
  .section-head h2 { max-width: 11ch; font-size: clamp(3rem, 4.4vw, 5.25rem); }
  .section-head > p:last-child { width: auto; margin: 2.25rem 0 0; }
}

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .media-card { height: 390px; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .section-head > p:last-child { margin-left: 0; }
}
@media (max-width: 620px) {
  body { background-size: 42px 42px, 42px 42px, auto, auto; }
  main { width: min(100% - 1.5rem, 1440px); }
  .site-head { min-height: 64px; padding-inline: 0.75rem; }
  .brand { font-size: 0.88rem; }
  .back-link { font-size: 0.76rem; }
  .hero { padding-top: 4rem; }
  h1, h1.title-long { font-size: clamp(3.8rem, 19vw, 5.2rem); }
  .media-card { height: 280px; }
  .media-card.portrait { height: 430px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact { padding: 1rem; }
  .section-head > p:last-child { margin-left: 0; }
  .cards, .steps { grid-template-columns: 1fr; }
  .card.wide { grid-column: auto; grid-template-columns: 1fr; align-items: start; }
  .card.wide h3 { margin: 2rem 0 1rem; }
  .step { min-height: 0; }
  .closing { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 0.5rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
