/* GF case study — standalone editorial system (pilot for future site-wide look).
   Loaded only by gf.html; other pages stay on styles.css. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #FAFAF8;
  --ink: #141414;
  --muted: #6b6b6b;
  --faint: #a3a3a3;
  --rule: #e4e2dc;
  --accent: #3f7ff4;
  --sans: "Instrument Sans", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }

/* ── Mono label utility ── */
.mono-label {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #616060;
}

/* ── Top nav: flat editorial bar ── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 248, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}

.nav-content {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 48px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  color: var(--muted);
  transition: color .15s ease;
}
.nav-link:hover { color: var(--ink); }

.nav-separator {
  width: 1px;
  height: 18px;
  background: var(--rule);
}

.social-links {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.social-links a {
  display: flex;
  align-items: center;
  color: var(--muted);
  transition: color .15s ease;
}
.social-links a:hover { color: var(--accent); }
.social-links svg { width: 15px; height: 15px; fill: currentColor; }

/* ── Shell: sidebar + fill content, centered, max 1440 ── */
.case-shell {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  padding: 72px 48px 140px;
}

/* ── Sidebar TOC: mono, indexed ── */
.case-nav {
  position: sticky;
  top: 128px;
  display: grid;
  gap: 10px;
  counter-reset: toc;
}

.case-nav-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 4px;
}

.case-nav a {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--faint);
  transition: color .15s ease;
}
/* First link (Overview) sits outside the numbered flow — sec-index
   numbering starts at 01 on the section right after it, so the nav
   counter must skip it to stay in sync. */
.case-nav a:not(:first-of-type) {
  counter-increment: toc;
}
.case-nav a:not(:first-of-type)::before {
  content: counter(toc, decimal-leading-zero) "  ";
  color: var(--accent);
  opacity: .55;
}
.case-nav a:hover { color: var(--ink); }
.case-nav a.active {
  color: var(--ink);
  font-weight: 500;
}
.case-nav a.active::before { opacity: 1; }

/* ── Content column ── */
.case-content {
  min-width: 0;
  display: block;
}

/* ── Hero ── */
.case-hero { scroll-margin-top: 120px; }

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 26px;
}

.case-title {
  font-size: clamp(44px, 6vw, 54px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.02;
  max-width: 100%;
}

.hero-support {
  margin-top: 18px;
  font-size: 21px;
  font-weight: 400;
  color: var(--muted);
  max-width: 52ch;
}

/* Spec sheet strip — rows stack column-wise; each row is itself
   label + value arranged row-wise via the grid below. */
.spec-strip {
  margin-top: 48px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.spec-rows {
  display: grid;
  gap: 12px;
}

.spec-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.spec-item b {
  font-weight: 500;
  color: var(--faint);
}

.spec-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

/* Problem / What I Did duo */
.hero-duo {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}

.hero-duo .mono-label { display: block; margin-bottom: 12px; }
.hero-duo p:not(.mono-label) {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
}

/* Notice / callout — e.g. NDA disclosures, constraints */
.notice {
  margin-top: 36px;
  padding: 16px 20px;
  border-left: 2px solid var(--accent);
  background: rgba(63, 127, 244, .05);
  max-width: 68ch;
}
.notice p {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: .01em;
  line-height: 1.7;
  color: var(--muted);
  text-transform: none;
}
.notice p b {
  font-weight: 500;
  color: var(--ink);
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ── Section scaffolding ── */
.case-section {
  margin-top: 90px;
  scroll-margin-top: 96px;
}
.case-section.sec--major { margin-top: 140px; }

.sec-index {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #3f7ff4;
  margin-bottom: 20px;
}
.sec-index em {
  font-style: normal;
  margin-right: 10px;
}

.sec-title {
  font-size: clamp(34px, 4.5vw, 36px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.05;
  max-width: 100%;
}

.sec-support {
  margin-top: 14px;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  max-width: 58ch;
}

.sec-body { margin-top: 34px; }
.sec-body > p {
  max-width: 68ch;
  color: #3a3a3a;
}
.sec-body > p + p { margin-top: 16px; }

.sec-body ul {
  margin-top: 16px;
  max-width: 68ch;
  padding-left: 20px;
}
.sec-body ul + p, .sec-body p + ul { margin-top: 16px; }
.sec-body li {
  color: #3a3a3a;
  line-height: 1.65;
}
.sec-body li + li { margin-top: 10px; }
.sec-body li::marker { color: var(--accent); }
.sec-body li strong { color: var(--ink); font-weight: 600; }

/* Numbered pillar lead-ins — "1. Name: description" rows that introduce
   their own media directly below, full-width (not list-indented). */
.pillar-lead { max-width: 68ch; color: #3a3a3a; }
.pillar-num { color: var(--accent); font-weight: 600; margin-right: 2px; }
.pillar-name { color: var(--accent); font-weight: 600; }
.media-caption + .pillar-lead { margin-top: 48px; }

/* Inline sub-headings (mono-label) used to break up a section body —
   e.g. Clara's "Putting it in numbers perspective…" or "Roadmap" —
   need the same rhythm as everything else around them. */
p + .mono-label,
.media-full + .mono-label,
.media-plain + .mono-label,
.sec-body > p + p.mono-label {
  margin-top: 32px;
}
.mono-label + p,
.sec-body > .mono-label + p {
  margin-top: 12px;
}

/* Narrow header variant — same row-stack, just a tighter support measure */
.sec--narrow .sec-support { max-width: 44ch; }

/* ── Stats band ── */
.stats-band {
  margin-top: 64px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding: 30px 28px 26px 0;
}
.stat + .stat {
  border-left: 1px solid var(--rule);
  padding-left: 28px;
}

.stat-value {
  font-size: clamp(44px, 4.5vw, 64px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--accent);
}

.stat-label {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Media treatments ── */
.media-full {
  margin-top: 48px;
  border: 1px solid var(--rule);
}
.media-full img, .media-full video { width: 100%; }

.media-plain { margin-top: 48px; }
.media-plain img { width: 100%; }

/* Every image sits above its caption; caption is centered under it. */
.media-caption {
  margin-top: 14px;
  margin-left: auto;
  margin-right: auto;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #616060;
  line-height: 1.7;
  max-width: 60ch;
  text-align: center;
}

/* ── Next case ── */
.next-case {
  display: block;
  margin-top: 150px;
  padding-top: 28px;
  border-top: 1px solid var(--ink);
  transition: color .15s ease;
}
.next-case .mono-label { display: block; margin-bottom: 14px; }
.next-case-title {
  display: block;
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  max-width: 26ch;
}
.next-case-arrow {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted);
  transition: color .15s ease, transform .2s ease;
}
.next-case:hover .next-case-title { color: var(--accent); }
.next-case:hover .next-case-arrow { color: var(--accent); transform: translateX(6px); }

/* ── Footer contact ── */
.bottom-contact {
  margin-top: 90px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.bottom-contact > span {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}
.bottom-contact .social-links { margin-left: 0; }
.bottom-contact .social-links svg { width: 16px; height: 16px; }

/* ── Breakpoints ── */
@media (max-width: 1144px) {
  .case-shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 56px 24px 100px;
    gap: 0;
  }
  .case-nav { display: none; }
}

@media (max-width: 720px) {
  .nav-content { padding: 0 20px; gap: 18px; }

  .case-shell { padding: 44px 18px 80px; }

  .case-title { font-size: clamp(34px, 10vw, 44px); }
  .hero-support { font-size: 18px; }

  .spec-strip { flex-direction: column; align-items: flex-start; gap: 20px; }
  .spec-item { grid-template-columns: 90px 1fr; font-size: 13px; }

  .hero-duo { grid-template-columns: 1fr; gap: 28px; margin-top: 36px; }

  .case-section { margin-top: 70px; }
  .case-section.sec--major { margin-top: 96px; }

  .stats-band { grid-template-columns: 1fr 1fr; border-top-width: 1px; }
  .stat { padding: 22px 16px 20px 0; }
  .stat + .stat { padding-left: 16px; }
  .stat:nth-child(3) { border-left: none; padding-left: 0; border-top: 1px solid var(--rule); }
  .stat:nth-child(4) { border-top: 1px solid var(--rule); }
  .stat-value { font-size: 40px; }

  .next-case { margin-top: 100px; }
  .bottom-contact { flex-direction: column; align-items: flex-start; }
}

/* ── About page components ── */

/* Rotating multilingual greeting — odometer-style vertical cycle */
.hello-rotor {
  display: inline-block;
  overflow: hidden;
  height: 1.25em;
  margin-bottom: 22px;
  vertical-align: bottom;
}
.hello-track {
  display: flex;
  flex-direction: column;
  animation: hello-cycle 10.5s cubic-bezier(.75, 0, .25, 1) infinite;
}
.hello-track span {
  display: block;
  height: 1.25em;
  line-height: 1.25;
}
.hello-pink   { color: #ec4899; }
.hello-yellow { color: #d97706; }
.hello-orange { color: #ea580c; }
.hello-blue   { color: #3f7ff4; }
.hello-purple { color: #7c3aed; }

@keyframes hello-cycle {
  0%, 14%   { transform: translateY(0); }
  20%, 34%  { transform: translateY(-1.25em); }
  40%, 54%  { transform: translateY(-2.5em); }
  60%, 74%  { transform: translateY(-3.75em); }
  80%, 94%  { transform: translateY(-5em); }
  100%      { transform: translateY(-6.25em); }
}
@media (prefers-reduced-motion: reduce) {
  .hello-track { animation: none; }
}

/* Resume CTA */
.resume-cta {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--ink);
  padding: 12px 22px;
  white-space: nowrap;
  transition: background .15s ease;
}
.resume-cta:hover { background: var(--accent); }

.resume-cta--outline {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
}
.resume-cta--outline:hover { color: var(--bg); background: var(--accent); border-color: var(--accent); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Process flow — top-bordered pastel steps */
.process-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}
.mono-label + .process-flow,
.mono-label + .career-list,
.mono-label + .principles-grid { margin-top: 18px; }

.process-step {
  border-top: 3px solid var(--rule);
  padding-top: 16px;
}
.process-step--pink   { border-top-color: #f9a8d4; }
.process-step--yellow { border-top-color: #fcd34d; }
.process-step--orange { border-top-color: #fdba74; }
.process-step--blue   { border-top-color: #93c5fd; }
.process-step--purple { border-top-color: #c4b5fd; }

.process-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 10px;
}
.process-step p:not(.process-title) {
  font-size: 14px;
  line-height: 1.65;
  color: #3a3a3a;
}

/* Design truths — 2x2 dashed matrix, square-bulleted heads */
.truths-matrix {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.truth { padding: 26px 32px 26px 0; }
.truth:nth-child(odd) { border-right: 1px dashed var(--faint); }
.truth:nth-child(even) { padding-left: 32px; padding-right: 0; }
.truth:nth-child(-n+2) { padding-top: 0; border-bottom: 1px dashed var(--faint); }
.truth:nth-child(n+3) { padding-bottom: 0; }

.truth-head {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.truth-head::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent);
  flex: 0 0 auto;
}
.truth p:not(.truth-head) {
  font-size: 15px;
  line-height: 1.7;
  color: #3a3a3a;
}

/* Stacked constraint/detail groups — reuse the square-bullet mono head,
   just full-width and separated by a hairline instead of a grid. */
.constraint-group { max-width: 68ch; }
.constraint-group + .constraint-group {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px dashed var(--faint);
}
.constraint-group .truth-head { margin-bottom: 14px; }
.constraint-group ul { margin-top: 0; }

/* Career — title left, years right */
.career-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 32px;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.career-row:first-child { padding-top: 4px; }
.career-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.career-desc {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 56ch;
}
.career-date {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.career-list + .mono-label,
.principles-grid + .mono-label { margin-top: 48px; }

/* Principles — quote cards, hairline borders, tinted attributions */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.principle {
  border: 1px solid var(--rule);
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}
.principle--wide3 { grid-column: span 3; }
.principle--wide2 { grid-column: span 2; }
.principle p {
  font-size: 16px;
  line-height: 1.6;
  color: #3a3a3a;
}
.principle--wide3 p { font-size: 19px; max-width: 56ch; }
.principle cite {
  font-style: normal;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
  align-self: flex-end;
}
.principle--purple cite { color: #7c3aed; }
.principle--yellow cite { color: #d97706; }
.principle--orange cite { color: #ea580c; }
.principle--teal cite   { color: #0d9488; }

@media (max-width: 720px) {
  .truths-matrix { grid-template-columns: 1fr; }
  .truth,
  .truth:nth-child(odd),
  .truth:nth-child(even) { border-right: none; padding: 22px 0; }
  .truth:nth-child(-n+2) { padding-top: 22px; }
  .truth { border-bottom: 1px dashed var(--faint); }
  .truth:first-child { padding-top: 0; }
  .truth:last-child { border-bottom: none; padding-bottom: 0; }

  .career-row { flex-direction: column; gap: 6px; }

  .principles-grid { grid-template-columns: 1fr; }
  .principle--wide3,
  .principle--wide2 { grid-column: auto; }
  .principle--wide3 p { font-size: 16px; }
}
