/* ============================================================
   UI/UX Nest — Case Study
   Design system: "The Syllabus"
   A field-notebook / course-catalog identity — the one project
   on the site that's actually a sequence (a curriculum), so
   numbered structure is earned here instead of decorative.
   The signature motif is the scope ledger: a kept/cut tally
   that makes the scope-creep tension visible and literal.

   Palette: blueish-white canvas with deep teal (#06405A) as
   the dominant structural ink — headlines, nav, body text,
   links — paired with a deep sage as the one accent reserved
   for anything kept or carried forward in the project. Teal
   doubles as the signal for anything cut or deferred, so the
   kept/cut tension reads as sage-vs-teal everywhere it shows
   up, not just inside the ledger itself.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Space+Mono:wght@400;700&display=swap');

:root {
  --canvas:      #F1F6F8;
  --canvas-2:    #E4EDF0;
  --paper:       #FFFFFF;
  --ink:         #06405A;
  --ink-soft:    #355769;
  --ink-quiet:   #7C93A0;
  --line:        #D9E3E8;
  --line-strong: #C2D2D9;

  --teal:        #06405A;
  --teal-bright: #0E5C7E;
  --teal-soft:   #E3EEF1;
  --teal-line:   rgba(6, 64, 90, 0.24);

  --sage:        #3E5C3E;
  --sage-bright: #4F7350;
  --sage-soft:   #E6EDE2;
  --sage-line:   rgba(62, 92, 62, 0.32);

  --sky:         #4D7C9E;
  --sky-soft:    #E6EEF3;

  --display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --sans:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:    'Space Mono', 'SF Mono', monospace;

  --measure: 660px;
  --measure-wide: 980px;

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --space-7: 9rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--canvas);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 100% 2.0625rem;
  background-position: 0 7.5rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--teal); text-decoration: none; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

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

/* ---------- Margin-tape progress ---------- */

.tape-track {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: transparent;
  z-index: 100;
}

.tape-track::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--line-strong);
  opacity: 0.6;
}

.tape-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: repeating-linear-gradient(
    -45deg,
    var(--teal) 0px, var(--teal) 6px,
    var(--sage) 6px, var(--sage) 12px
  );
  transition: width 0.1s linear;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  background: var(--canvas);
  border-bottom: 1px solid var(--line-strong);
}

.site-header .logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-header .logo img {
  height: 28px;
  width: auto;
  display: block;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.site-header nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 2px;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-header nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: var(--sage);
  transition: width 0.25s ease;
}

.site-header nav a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  border-radius: 8px;
}

.nav-toggle:hover { background: var(--canvas-2); }

.nav-links-mobile {
  display: none;
  list-style: none;
  flex-direction: column;
  background: var(--paper);
  border-bottom: 1px solid var(--line-strong);
  position: relative;
  z-index: 49;
  margin: 0;
  padding: 0;
}

.nav-links-mobile.is-open { display: flex; }

.nav-links-mobile li { border-top: 1px solid var(--line); }
.nav-links-mobile li:first-child { border-top: none; }

.nav-links-mobile a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 var(--space-3);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ---------- Hero ---------- */

.hero {
  min-height: 84vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-6) var(--space-3) var(--space-5);
  position: relative;
}

.hero-mark {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-3);
  color: var(--teal);
  opacity: 0;
  animation: rise 1s ease forwards;
  animation-delay: 0.05s;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--sage);
  margin-bottom: var(--space-3);
  opacity: 0;
  animation: rise 0.9s ease forwards;
  animation-delay: 0.1s;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-style: normal;
  letter-spacing: -0.005em;
  font-size: clamp(2.2rem, 5.6vw, 3.8rem);
  line-height: 1.18;
  color: var(--ink);
  max-width: 17ch;
  margin: 0 0 var(--space-4);
  opacity: 0;
  animation: rise 1s ease forwards;
  animation-delay: 0.25s;
}

.hero p.lede {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: var(--ink-quiet);
  max-width: 42ch;
  margin: 0 auto var(--space-5);
  opacity: 0;
  animation: rise 1s ease forwards;
  animation-delay: 0.45s;
}

.hero .scroll-cue {
  opacity: 0;
  animation: rise 1s ease forwards, float 2.6s ease-in-out infinite;
  animation-delay: 0.7s, 1.6s;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  font-weight: 500;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---------- Metadata strip ---------- */

.meta-strip {
  max-width: var(--measure-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5) var(--space-6);
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.meta-item .label {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.35rem;
  display: block;
}

.meta-item .value {
  font-size: 0.95rem;
  color: var(--ink);
}

/* ---------- Sections ---------- */

.section {
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--space-6) var(--space-3);
  scroll-margin-top: 90px;
}

.section.wide { max-width: var(--measure-wide); }

.section-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.section-num {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--teal);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.section h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.005em;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--ink);
  margin: 0;
}

.section p {
  margin: 0 0 var(--space-3);
  color: var(--ink-soft);
}

.section p.hook-line {
  font-family: var(--sans);
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--ink);
  text-align: center;
  max-width: 36ch;
  margin: 0 auto;
}

.fade-in {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Team strip ---------- */

.team-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-3) 0 var(--space-4);
}

.team-chip {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--sage-soft);
  border: 1px solid var(--sage-line);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
}

.team-chip.lead {
  background: var(--teal-soft);
  border-color: var(--teal-line);
  color: var(--teal);
}

/* ---------- Honest framing / placeholder callouts ---------- */

.note {
  background: var(--paper);
  border-left: 3px solid var(--sage);
  border-radius: 4px;
  padding: var(--space-3) var(--space-4);
  margin: var(--space-3) 0 var(--space-4);
}

.note .note-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--sage);
  display: block;
  margin-bottom: 0.4rem;
}

.note p { margin: 0; color: var(--ink-soft); }

.placeholder {
  background: var(--paper);
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  padding: var(--space-2) var(--space-3);
  margin: var(--space-3) 0;
}

.placeholder .placeholder-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal);
  display: block;
  margin-bottom: 0.3rem;
}

.placeholder p { margin: 0; color: var(--ink-quiet); font-size: 0.92rem; font-style: italic; }

/* ---------- Stat grid (research data) ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: var(--space-3) var(--space-4);
}

.stat-card .stat-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  display: block;
  margin-bottom: var(--space-2);
}

.stat-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.stat-card p strong {
  font-family: var(--sans);
  font-style: italic;
  color: var(--sage);
  font-size: 1.05em;
}

/* ---------- SCOPE LEDGER — signature motif ----------
   The literal scope-creep tension made visible: a kept
   column and a cut column, balanced like a ledger, with
   a running tally line connecting them. Kept = sage,
   cut = teal, matching the kept/cut convention used
   everywhere else in this design. */

.scope-ledger {
  margin: var(--space-4) 0;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  overflow: hidden;
}

.scope-ledger-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line-strong);
}

.scope-ledger-head span {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-2) var(--space-4);
}

.scope-ledger-head .kept-label { color: var(--sage); background: var(--sage-soft); }
.scope-ledger-head .cut-label { color: var(--teal); background: var(--teal-soft); }

.scope-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.scope-row:last-child { border-bottom: none; }

.scope-cell {
  padding: var(--space-2) var(--space-4);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.scope-cell.kept { color: var(--ink-soft); border-right: 1px solid var(--line); }
.scope-cell.cut { color: var(--ink-quiet); }
.scope-cell.cut span.strike { text-decoration: line-through; text-decoration-color: var(--teal-line); text-decoration-thickness: 1.5px; }
.scope-cell.empty { color: var(--line-strong); font-style: italic; }

.scope-mark { flex-shrink: 0; width: 14px; height: 14px; }
.scope-cell.kept .scope-mark { color: var(--sage); }
.scope-cell.cut .scope-mark { color: var(--teal); }

.scope-ledger-foot {
  padding: var(--space-3) var(--space-4);
  background: var(--canvas-2);
  font-family: var(--sans);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink);
  text-align: center;
}

/* ---------- Curriculum path (the actual sequence) ----------
   This is forward motion through the project, so the path
   markers use sage — the "kept / moving ahead" signal. */

.curriculum-path {
  margin: var(--space-4) 0;
  display: flex;
  flex-direction: column;
}

.path-phase {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-3);
  position: relative;
  padding-bottom: var(--space-4);
}

.path-phase:last-child { padding-bottom: 0; }

.path-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.path-marker .path-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--canvas);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.path-marker .path-line {
  flex: 1;
  width: 2px;
  background: var(--line-strong);
  margin-top: 0.4rem;
}

.path-phase:last-child .path-marker .path-line { display: none; }

.path-content h4 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 0.3rem;
}

.path-content p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.path-content .path-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sky);
  background: var(--sky-soft);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-top: 0.5rem;
}

/* ---------- Subsection blocks (Design Decisions) ---------- */

.subsection {
  padding: var(--space-3) 0;
  border-top: 1px solid var(--line);
}

.subsection:first-of-type { border-top: none; padding-top: 0; }

.subsection h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  margin: 0 0 var(--space-2);
}

/* ---------- Findings list (usability test results) ----------
   Findings are confirmations carried forward into the design,
   so the dot uses sage. */

.findings-list {
  list-style: none;
  margin: var(--space-3) 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.findings-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: var(--space-2) var(--space-3);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.93rem;
  color: var(--ink-soft);
}

.findings-list .findings-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
  flex-shrink: 0;
  margin-top: 8px;
}

/* ---------- Screenshot placeholders ---------- */

.shot-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.shot-row.single { grid-template-columns: 1fr; }

.shot-frame {
  aspect-ratio: 16 / 11;
  border: 1.5px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--canvas-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--teal);
}

.shot-frame .shot-icon {
  width: 28px;
  height: 28px;
  opacity: 0.7;
}

.shot-frame span.shot-label {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-align: center;
  padding: 0 var(--space-2);
  color: var(--ink-quiet);
}

/* Real images replacing placeholders — solid border, image fills frame */
.shot-frame.has-image {
  border-style: solid;
  border-color: var(--line-strong);
  padding: 0;
  overflow: hidden;
  display: block;
}

.shot-frame.has-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
  display: block;
  cursor: zoom-in;
  transition: filter 0.2s ease, transform 0.3s ease;
}

.shot-frame.has-image img:hover,
.shot-frame.has-image img:focus-visible {
  filter: brightness(1.04);
  transform: scale(1.01);
}

.shot-frame.has-image img:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: -2px;
}

/* Full-page captures (homepage, curriculum grid) are naturally tall —
   let them run their own ratio instead of forcing a 16:11 crop, the
   same approach used for the full-page shots in the Big Cat Rescue
   case study. */
.tall-shot-row {
  align-items: start;
}

.shot-frame.has-image.tall-shot {
  aspect-ratio: auto;
}

.shot-frame.has-image.tall-shot img {
  height: auto;
  object-fit: contain;
  background: var(--canvas-2);
}

/* ---------- Image lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  background: rgba(6, 20, 28, 0.82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 64px -16px rgba(6, 20, 28, 0.5);
  background: var(--paper);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.lightbox.is-open .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: fixed;
  top: var(--space-3);
  right: var(--space-3);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  border-color: var(--teal);
  background: var(--canvas-2);
}

@media (max-width: 480px) {
  .lightbox { padding: var(--space-2); }
  .lightbox-close { top: var(--space-2); right: var(--space-2); width: 40px; height: 40px; }
}

/* ---------- Reflection card ---------- */

.reflection-card {
  background: var(--canvas-2);
  border-radius: 14px;
  padding: var(--space-5) var(--space-4);
  border: 1px solid var(--line-strong);
}

.reflection-card .note { background: var(--paper); border-left-color: var(--teal); }
.reflection-card .placeholder { background: var(--paper); }

/* ---------- Footer / project nav ---------- */

.project-nav {
  border-top: 1px solid var(--line-strong);
  padding: var(--space-6) var(--space-5);
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  max-width: var(--measure-wide);
  margin: 0 auto;
}

.project-nav a {
  flex: 1;
  padding: var(--space-3);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--paper);
  transition: border-color 0.2s ease, transform 0.2s ease;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-nav a:hover {
  border-color: var(--sage);
  transform: translateY(-2px);
}

.project-nav .direction {
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.3rem;
}

.project-nav .title {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  font-size: 1.02rem;
}

.project-nav a.next { text-align: right; }

.site-footer {
  text-align: center;
  padding: var(--space-4) var(--space-3) var(--space-5);
  font-size: 0.85rem;
  color: var(--ink-quiet);
}

/* ---------- Style system section ---------- */

.style-system {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.style-block {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: var(--space-4);
}

.style-block-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal);
  display: block;
  margin-bottom: var(--space-3);
}

/* Color */
.color-row {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  align-items: flex-start;
}

.color-swatch-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.color-group-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  margin-bottom: 0.25rem;
}

.color-swatch {
  width: 160px;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.color-swatch .color-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
}

.color-swatch .color-hex {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.75);
}

.color-swatch.dark .color-name,
.color-swatch.dark .color-hex { color: rgba(255,255,255,0.9); }

.highlight-pair-row {
  display: flex;
  gap: var(--space-1);
}

.highlight-pill {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: var(--sans);
}

/* Typography scale */
.type-scale {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.type-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}

.type-row:first-child { border-top: none; }

.type-row--display .type-specimen {
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--ink-quiet);
}

.type-specimen {
  color: var(--ink);
  flex: 1;
  min-width: 0;
}

.type-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-quiet);
  flex-shrink: 0;
  white-space: nowrap;
}

/* Illustration characteristics */
.illus-chars {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.illus-char-pill {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--sage-bright);
  background: var(--sage-soft);
  border: 1px solid var(--sage-line);
  padding: 0.45rem 1rem;
  border-radius: 999px;
}

/* ============================================================
   RESPONSIVE — 760px and below
   ============================================================ */

@media (max-width: 760px) {

  body { background-position: 0 5.5rem; }

  .site-header { padding: 0 var(--space-3); height: 56px; }
  .site-header .logo img { height: 24px; }

  .site-header nav { display: none; }

  .nav-toggle { display: flex; order: -1; }

  .site-header .logo { order: 1; }

  /* Pinned mobile dropdown — stays fixed directly under the sticky
     header as the page scrolls, instead of scrolling away with content. */
  .nav-links-mobile.is-open {
    position: fixed;
    top: var(--mobile-nav-offset, 56px);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--mobile-nav-offset, 56px));
    overflow-y: auto;
    z-index: 49;
  }

  .hero { min-height: 78vh; padding: var(--space-5) var(--space-3) var(--space-4); }
  .hero-mark { width: 52px; height: 52px; }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 2.5rem); max-width: none; }
  .hero p.lede { font-size: 1rem; max-width: none; margin-bottom: var(--space-4); }

  .meta-strip {
    grid-template-columns: repeat(2, 1fr);
    padding: var(--space-3) var(--space-3) var(--space-4);
    gap: var(--space-2) var(--space-3);
  }

  .section { padding: var(--space-4) var(--space-3); }
  .section-head { margin-bottom: var(--space-3); gap: var(--space-1); }

  .stat-grid { grid-template-columns: 1fr; }

  .color-row { flex-direction: column; gap: var(--space-3); }
  .color-swatch { width: 100%; }
  .highlight-pair-row { flex-wrap: wrap; }
  .type-row { flex-direction: column; gap: 0.2rem; align-items: flex-start; }
  .type-meta { font-size: 0.66rem; }

  .scope-ledger-head span { padding: var(--space-2) var(--space-2); font-size: 0.66rem; }
  .scope-cell { padding: var(--space-2) var(--space-2); font-size: 0.85rem; }

  .shot-row { grid-template-columns: 1fr; }
  .shot-frame:not(.has-image) { aspect-ratio: 4 / 3; }
  .shot-frame.has-image.tall-shot { max-width: 420px; margin: 0 auto; }

  .reflection-card { padding: var(--space-3) var(--space-3); border-radius: 10px; }

  .project-nav {
    flex-direction: column;
    padding: var(--space-4) var(--space-3);
    gap: var(--space-2);
  }

  .project-nav a { flex: none; width: 100%; }
  .project-nav a.next { text-align: left; }
}

@media (max-width: 480px) {

  :root {
    --space-4: 2rem;
    --space-5: 3rem;
    --space-6: 4rem;
  }

  body { font-size: 16px; }

  .site-header {
    flex-wrap: wrap;
    row-gap: 0.5rem;
    height: auto;
    padding: var(--space-2) var(--space-3);
  }

  .site-header nav { gap: var(--space-2); }
  .site-header nav a { font-size: 0.85rem; min-height: 36px; }

  .hero { min-height: 72vh; }
  .hero h1 { font-size: clamp(1.7rem, 9vw, 2.2rem); line-height: 1.25; }

  .meta-strip { grid-template-columns: 1fr 1fr; gap: var(--space-2); }
  .meta-item .value { font-size: 0.88rem; word-break: break-word; }

  .section h2 { font-size: clamp(1.35rem, 6vw, 1.8rem); }
  .hook-line { font-size: clamp(1.05rem, 4.5vw, 1.25rem) !important; }

  .subsection h3 { font-size: 1.05rem; }

  .scope-ledger-head, .scope-row { grid-template-columns: 1fr; }
  .scope-cell.kept { border-right: none; border-bottom: 1px solid var(--line); }
  .scope-ledger-head .cut-label { border-top: 1px solid var(--line-strong); }

  .path-phase { grid-template-columns: 40px 1fr; gap: var(--space-2); }
  .path-marker .path-num { width: 32px; height: 32px; font-size: 0.82rem; }

  .note, .placeholder { padding: var(--space-2); }
}
