:root {
  color-scheme: light;
  --bg: #f4f6f2;
  --ink: #111713;
  --muted: #5e6860;
  --panel: #fffdfa;
  --panel-2: #e9efea;
  --line: #d7ddd5;
  --field: #19443d;
  --field-dark: #0d2523;
  --signal: #d85d2a;
  --steel: #49636b;
  --amber: #d79d24;
  --shadow: 0 24px 70px rgba(17, 23, 19, 0.14);
  --radius: 8px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(25, 68, 61, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(25, 68, 61, 0.05) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.62;
  letter-spacing: 0;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: var(--field);
  font-weight: 760;
  text-decoration: none;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus-visible {
  color: var(--signal);
  text-decoration: underline;
}

p {
  margin: 0 0 1rem;
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.08;
}

h1 {
  max-width: 720px;
  font-size: clamp(2.85rem, 5.2vw, 4.8rem);
  font-weight: 850;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(2.1rem, 4.4vw, 4rem);
  font-weight: 860;
}

h3 {
  font-size: 1.24rem;
  font-weight: 820;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-200%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 0.6rem 0.85rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  border-bottom: 1px solid rgba(215, 221, 213, 0.9);
  background: rgba(244, 246, 242, 0.9);
  backdrop-filter: blur(18px);
}

.nav-shell,
.shell {
  width: calc(100% - 2rem);
  max-width: var(--max);
  margin: 0 auto;
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.wordmark {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 850;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 1rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.96rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  min-height: min(760px, calc(100vh - 70px));
  padding: clamp(3.8rem, 6vw, 5.6rem) 0 4rem;
}

.hero-copy {
  min-width: 0;
}

.kicker,
.section-label span,
.case-meta span,
.motion-card span {
  color: var(--signal);
  font-size: 0.78rem;
  font-weight: 880;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.kicker {
  margin-bottom: 0.9rem;
  overflow-wrap: anywhere;
}

.lead {
  max-width: 680px;
  margin-top: 1.4rem;
  color: #1d2925;
  font-size: clamp(1.12rem, 1.65vw, 1.32rem);
  line-height: 1.52;
}

.action-row,
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.action-row {
  margin-top: 1.4rem;
}

.action-row a,
.link-row a {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 0.52rem 0.82rem;
  color: var(--field);
  font-size: 0.95rem;
  font-weight: 820;
  box-shadow: 0 10px 28px rgba(17, 23, 19, 0.07);
}

.action-row a:hover,
.action-row a:focus-visible,
.link-row a:hover,
.link-row a:focus-visible {
  border-color: rgba(216, 93, 42, 0.55);
  color: var(--signal);
  text-decoration: none;
}

.hero-board {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  grid-template-rows: 210px 160px 160px;
  gap: 0.8rem;
  min-width: 0;
}

.board-tile {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(215, 221, 213, 0.9);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.board-tile img,
.board-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-tile {
  grid-row: span 2;
  min-height: 0;
}

.portrait-tile img {
  object-position: center 18%;
}

.video-tile {
  grid-row: span 1;
}

.diagram-tile {
  min-height: 0;
}

.diagram-tile img {
  object-fit: contain;
  padding: 0.8rem;
  background: #fff;
}

.dark-tile img {
  background: #f8faf7;
}

.board-tile figcaption {
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: 0.65rem;
  border-radius: 6px;
  background: rgba(13, 37, 35, 0.76);
  color: #fff;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 760;
}

.stack-section,
.dossier-section,
.log-section {
  padding: 5rem 0;
  border-top: 1px solid var(--line);
}

.section-label {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.7rem;
}

.section-label h2 {
  max-width: 880px;
}

.section-label.inverted h2,
.section-label.inverted span {
  color: #fff;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.78);
  box-shadow: 0 16px 44px rgba(17, 23, 19, 0.08);
}

.stack-grid article {
  min-width: 0;
  padding: 1.25rem;
}

.stack-grid article + article {
  border-left: 1px solid var(--line);
}

.stack-grid strong {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 1.02rem;
}

.stack-grid p,
.case-copy p,
.log-grid p,
.site-footer p {
  color: var(--muted);
}

.dossier-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.case-card {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 250, 0.88);
  box-shadow: 0 20px 52px rgba(17, 23, 19, 0.1);
}

.wide-case {
  grid-column: span 2;
  grid-template-columns: minmax(360px, 0.85fr) minmax(0, 1fr);
}

.case-media {
  min-height: 280px;
  background: #fff;
}

.case-media img,
.case-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.8rem;
}

.case-media video {
  object-fit: cover;
  padding: 0;
}

.case-copy {
  min-width: 0;
  padding: 1.35rem;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.65rem;
}

.case-copy h3 {
  margin-bottom: 0.75rem;
}

.authors {
  color: #2d3732;
  font-size: 0.92rem;
  line-height: 1.5;
}

.motion-section {
  padding: 5rem 0;
  background: var(--field-dark);
}

.motion-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.motion-card {
  display: grid;
  gap: 0.8rem;
  align-content: start;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.85rem;
}

.feature-motion {
  grid-column: span 2;
}

.motion-card video,
.motion-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #061211;
  object-fit: cover;
}

.motion-card h3 {
  color: #fff;
  margin-top: 0.2rem;
}

.log-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.log-grid article {
  border-top: 4px solid var(--field);
  border-radius: 0 0 var(--radius) var(--radius);
  background: rgba(255, 253, 250, 0.8);
  padding: 1.2rem;
}

.log-grid time {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--signal);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0;
}

.site-footer p {
  margin: 0;
  font-size: 0.95rem;
}

@media (max-width: 920px) {
  .hero,
  .wide-case {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .portrait-tile {
    min-height: 0;
  }

  .stack-grid,
  .log-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stack-grid article + article {
    border-left: 0;
  }

  .stack-grid article:nth-child(2n) {
    border-left: 1px solid var(--line);
  }

  .stack-grid article:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .motion-grid,
  .dossier-grid {
    grid-template-columns: 1fr;
  }

  .wide-case,
  .feature-motion {
    grid-column: span 1;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  h1 {
    max-width: 22rem;
    font-size: 2.45rem;
    line-height: 1.12;
  }

  .nav-shell,
  .shell {
    width: calc(100% - 1.25rem);
  }

  .nav-shell {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-links {
    justify-content: flex-start;
  }

  .kicker {
    font-size: 0.74rem;
    letter-spacing: 0.08em;
  }

  .lead {
    font-size: 1.12rem;
  }

  .hero-copy {
    max-width: 21rem;
  }

  .hero {
    padding-top: 3rem;
  }

  .hero-board {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .portrait-tile {
    min-height: auto;
  }

  .portrait-tile img {
    aspect-ratio: 4 / 5;
  }

  .stack-grid,
  .log-grid {
    grid-template-columns: 1fr;
  }

  .stack-grid article,
  .stack-grid article:nth-child(2n),
  .stack-grid article:nth-child(n + 3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .stack-grid article:first-child {
    border-top: 0;
  }

  .stack-section,
  .dossier-section,
  .motion-section,
  .log-section {
    padding: 3.5rem 0;
  }

  .case-copy,
  .log-grid article {
    padding: 1rem;
  }
}
