/* ============================================================
   Cody Heart — Product Design Portfolio · v2
   Palette drawn from the Chicago print + LifeStance flag colors
   Editorial, but with teeth.
   ============================================================ */

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

/* ---------- Tokens ---------- */
:root {
  /* Chicago print — grounded */
  --portillos:   #D93318;
  --river:       #0F3B4A;
  --flw:         #C87A3C;
  --wrigley:     #EFE8D5;
  --ltrain:      #D9A14E;
  --skyscraper:  #2B2E33;
  --bean:        #DDE3E6;
  --grant:       #1E7A47;
  --drawbridge:  #7A3A49;
  --lakemichigan:#1E5872;

  /* LifeStance brand */
  --flag-red:        #E4002B;
  --flag-blue:       #41B6E6;
  --bahama:          #005899;   /* secondary-darkest */
  --malibu:          #0075BB;   /* secondary-dark */
  --lochmara:        #0092D1;   /* secondary-medium */
  --cornflower:      #A4D5EE;   /* secondary-light */
  --blue-mist:       #E1F3F8;   /* secondary-lightest */
  /* Extended blue ramp — from the companion sky palette */
  --sky:             #b6dbe9;   /* airy pale sky */
  --harbor:          #276a83;   /* mid-deep teal-blue */
  --midnight:        #0f2832;   /* deepest inked navy */

  /* System */
  --paper:       #FBFAF6;
  --paper-2:     #F3EFE4;
  --paper-pure:  #FFFFFF;
  --ink:         #141518;
  --ink-soft:    #2E3036;
  --muted:       #6A6E76;
  --rule:        #D8D3C3;
  --rule-soft:   #E8E3D3;

  /* Functional aliases */
  --accent:      var(--portillos);
  --accent-deep: #A8240F;
  --secondary:   var(--malibu);
  --tertiary:    var(--flw);
  --highlight:   var(--ltrain);

  /* Type scale */
  --fs-eyebrow:  0.72rem;
  --fs-body:     1.0625rem;
  --fs-lead:     1.2rem;
  --fs-h3:       1.6rem;
  --fs-h2:       clamp(2rem, 3.6vw, 3rem);
  --fs-hero:     clamp(2.4rem, 4.8vw, 4.2rem);
  --fs-mega:     clamp(4rem, 11vw, 10rem);

  /* Layout */
  --max:         1280px;
  --max-read:    720px;
  --gutter:      clamp(1.25rem, 5.5vw, 4rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Petrona', Georgia, serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Prevent any transform/shadow/ornament from causing horizontal scroll on mobile.
     `clip` is preferred over `hidden` because it still allows position:sticky to work. */
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Subtle grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.022;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background 320ms ease,
    backdrop-filter 320ms ease,
    -webkit-backdrop-filter 320ms ease,
    border-color 320ms ease,
    box-shadow 320ms ease;
}
/* Activated once the page scrolls past a threshold — liquid-glass treatment.
   Strong blur + saturation, soft paper tint, inner top-highlight for specular
   reflection, soft drop shadow below so the glass visibly floats over content. */
.site-header.is-scrolled {
  background: rgba(251, 250, 246, 0.62);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-bottom-color: rgba(182, 219, 233, 0.65);  /* --sky tinted */
  box-shadow:
    0 1px 0 rgba(230, 244, 250, 0.7) inset,        /* sky-tinted specular */
    0 8px 24px -12px rgba(15, 40, 50, 0.15);       /* --midnight-tinted shadow */
}
/* Gentle lift: the header itself inches down a hair so the shadow reads */
.site-header.is-scrolled .site-header__inner {
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  /* Fallback for browsers without backdrop-filter */
  .site-header.is-scrolled {
    background: rgba(251, 250, 246, 0.95);
  }
}
.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.4rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  transition: padding 320ms ease;
}
.wordmark {
  font-family: 'Petrona', serif;
  font-weight: 500;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  line-height: 1;
  /* Nudge the heart so its visible left edge aligns with body content below.
     The SVG has ~2px of internal whitespace on the left. */
  margin-left: -2px;
}
.wordmark em {
  font-style: italic;
}
.wordmark__heart {
  width: 24px;
  height: 24px;
  color: var(--accent);
  flex-shrink: 0;
  display: block;
  transform-origin: center;
  animation: heartbeat 1.4s ease-in-out 1 both;
}
.wordmark:hover .wordmark__heart {
  /* Continuous gentle pulse on hover */
  animation: heartbeat 1.1s ease-in-out infinite;
}
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15%      { transform: scale(1.22); }
  30%      { transform: scale(1); }
  45%      { transform: scale(1.22); }
  60%      { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .wordmark__heart,
  .wordmark:hover .wordmark__heart {
    animation: none;
  }
}

.nav {
  display: flex;
  gap: 2rem;
  font-family: 'Petrona', Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
}
.nav a {
  padding: 0.3rem 0;
  transition: color 180ms ease;
}
.nav a:hover { color: var(--accent); }
.nav a[aria-current="page"] { color: var(--accent); }

/* Small tablets / large phones — tighter header */
@media (max-width: 720px) {
  .site-header__inner { gap: 1rem; padding: 1.1rem var(--gutter); }
  .site-header.is-scrolled .site-header__inner {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  .wordmark { font-size: 1.2rem; gap: 0.5rem; }
  .wordmark__heart { width: 20px; height: 20px; }
  .nav { gap: 1.25rem; font-size: 0.95rem; }
  /* Larger touch targets for nav links on mobile */
  .nav a { padding: 0.6rem 0; }
}
/* Narrow phones — wordmark text hides, heart carries identity */
@media (max-width: 420px) {
  .wordmark span { display: none; }
  .nav { gap: 0.9rem; font-size: 0.88rem; }
  .site-header__inner { gap: 0.75rem; padding: 1rem var(--gutter); }
}

/* ---------- Shell ---------- */
main { position: relative; z-index: 2; }
.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.shell--read {
  max-width: var(--max-read);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Eyebrows ---------- */
.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  display: inline-block;
}
.eyebrow--red    { color: var(--accent); }
.eyebrow--blue   { color: var(--malibu); }
.eyebrow--lake   { color: var(--lakemichigan); }
.eyebrow--gold   { color: var(--tertiary); }

/* ---------- Hero ---------- */
.hero {
  padding-top: clamp(3.5rem, 9vw, 7rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}
.hero > * { position: relative; z-index: 1; }

/* Ornament: an abstract composition that lives in the hero's negative space.
   Two drifting concentric rings, a minimal Chicago skyline below, and two
   orbital dots that trace very slow circular paths. All muted except one
   Portillo's-red accent dot that acts as a quiet focal point. */
.hero__ornament {
  position: absolute;
  top: 14%;
  right: -10%;
  width: clamp(280px, 36vw, 520px);
  height: clamp(280px, 36vw, 520px);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  animation: ornamentFadeIn 1400ms 200ms cubic-bezier(.2,.7,.2,1) forwards;
}
.hero__ornament svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Ring animations — slow, opposing drifts, never complete full revolutions
   in a hurry. 40s and 60s so the motion feels atmospheric, not restless. */
.ornament-ring-outer {
  transform-origin: 50% 50%;
  animation: ringDriftCCW 60s linear infinite;
}
.ornament-ring-inner {
  transform-origin: 50% 50%;
  animation: ringDriftCW 44s linear infinite;
}
/* Orbital dots — each traces a circle via an offset-path */
.ornament-orbit-1 {
  offset-path: circle(42% at 50% 50%);
  offset-rotate: 0deg;
  animation: orbitCW 28s linear infinite;
}
.ornament-orbit-2 {
  offset-path: circle(28% at 50% 50%);
  offset-rotate: 0deg;
  animation: orbitCCW 19s linear infinite;
}
/* Skyline rises in on load, like bars of a chart settling */
.ornament-skyline rect {
  transform-origin: center bottom;
  transform-box: fill-box;
  animation: skylineRise 1200ms 500ms cubic-bezier(.2,.7,.2,1) both;
}
.ornament-skyline rect:nth-child(1) { animation-delay: 500ms; }
.ornament-skyline rect:nth-child(2) { animation-delay: 620ms; }
.ornament-skyline rect:nth-child(3) { animation-delay: 740ms; }
.ornament-skyline rect:nth-child(4) { animation-delay: 860ms; }
.ornament-skyline rect:nth-child(5) { animation-delay: 980ms; }

@keyframes ornamentFadeIn {
  to { opacity: 1; }
}
@keyframes ringDriftCW {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes ringDriftCCW {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}
@keyframes orbitCW {
  from { offset-distance: 0%; }
  to   { offset-distance: 100%; }
}
@keyframes orbitCCW {
  from { offset-distance: 100%; }
  to   { offset-distance: 0%; }
}
@keyframes skylineRise {
  from { transform: scaleY(0); opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}

@media (max-width: 900px) {
  .hero__ornament { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__ornament { opacity: 1; animation: none; }
  .ornament-ring-outer,
  .ornament-ring-inner,
  .ornament-orbit-1,
  .ornament-orbit-2,
  .ornament-skyline rect { animation: none; }
  .ornament-skyline rect { transform: scaleY(1); opacity: 1; }
}

.hero__eyebrow {
  margin-bottom: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.hero h1 {
  font-family: 'Petrona', serif;
  font-weight: 500;
  font-size: var(--fs-hero);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1.75rem;
  max-width: 18ch;
}
.hero h1 em { font-style: italic; color: var(--accent); }

.hero__lede {
  font-family: 'Petrona', Georgia, serif;
  font-size: var(--fs-lead);
  line-height: 1.55;
  max-width: 48ch;
  color: var(--ink-soft);
  margin: 0 0 2.5rem;
}
.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.hero__dateline {
  margin-top: 3rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.95rem 1.5rem;
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  border-radius: 999px;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.btn:hover {
  background: var(--lakemichigan);
  border-color: var(--lakemichigan);
  transform: translateY(-2px);
}
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover {
  background: var(--lakemichigan);
  color: var(--paper);
  border-color: var(--lakemichigan);
}
.btn .arrow {
  display: inline-block;
  transition: transform 220ms cubic-bezier(.2,.7,.2,1);
}
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Case study index ---------- */
.case-intro {
  padding: 6rem 0 3rem;
}
.case-intro__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: end;
}
@media (max-width: 760px) {
  .case-intro__grid { grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
}
.case-intro h2 {
  font-family: 'Petrona', serif;
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.05;
  letter-spacing: -0.022em;
  margin: 1rem 0 0;
  max-width: 18ch;
}
.case-intro h2 em { font-style: italic; color: var(--accent); }
.case-intro p {
  max-width: 52ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.6;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding: 2rem 0 6rem;
}
@media (max-width: 760px) {
  .case-grid { grid-template-columns: 1fr; }
}

.case-card {
  position: relative;
  background: var(--paper-pure);
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  min-height: 340px;
  transition: transform 300ms cubic-bezier(.2,.7,.2,1), box-shadow 300ms cubic-bezier(.2,.7,.2,1);
}
.case-card:hover {
  transform: translate(-6px, -6px);
  box-shadow: 10px 10px 0 var(--card-accent, var(--accent));
}

/* Abstract illustration slot — sits in the top-right corner of each card.
   Uses currentColor through var(--card-accent) so each card's motif
   matches its per-project accent color. */
.case-card__viz {
  position: absolute;
  top: 1.75rem;
  right: 1.75rem;
  width: 72px;
  height: 72px;
  color: var(--card-accent, var(--accent));
  pointer-events: none;
  opacity: 0.85;
  transition: transform 500ms cubic-bezier(.2,.7,.2,1), opacity 300ms ease;
}
.case-card__viz svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.case-card:hover .case-card__viz {
  transform: rotate(6deg) scale(1.08);
  opacity: 1;
}
@media (max-width: 520px) {
  .case-card__viz { width: 56px; height: 56px; top: 1.5rem; right: 1.5rem; }
}
.case-card__num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--card-accent, var(--accent));
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  font-weight: 500;
  padding-right: 90px; /* room for the __viz illustration in the top-right */
}
.case-card__title {
  font-family: 'Petrona', serif;
  font-weight: 500;
  font-size: 2.25rem;
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 0.8rem;
}
.case-card__title em { font-style: italic; color: var(--card-accent, var(--accent)); }
.case-card__desc {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 0 1.75rem;
  max-width: 40ch;
}
.case-card__meta {
  display: flex;
  gap: 1rem 1.5rem;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  flex-wrap: wrap;
  font-weight: 500;
}
.case-card__meta strong {
  color: var(--ink);
  font-weight: 600;
}
/* Per-card accent colors */
.case-card--01 { --card-accent: var(--portillos); }
.case-card--02 { --card-accent: var(--malibu); }
.case-card--03 { --card-accent: var(--flw); }
.case-card--04 { --card-accent: var(--grant); }
.case-card--05 { --card-accent: var(--drawbridge); }

/* ---------- Dashboards ---------- */
.dashboards {
  padding-top: 5rem;
  padding-bottom: 6rem;
  border-top: 1px solid var(--rule);
}
.dashboards__head {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: end;
  margin-bottom: 3rem;
}
@media (max-width: 760px) {
  .dashboards__head { grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
}
.dashboards h2 {
  font-family: 'Petrona', serif;
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.05;
  letter-spacing: -0.022em;
  margin: 1rem 0 0;
  max-width: 18ch;
}
.dashboards h2 em { font-style: italic; color: var(--accent); }
.dashboards__intro {
  color: var(--ink-soft);
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0;
  max-width: 52ch;
}
.dashboards__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 820px) {
  .dashboards__grid { grid-template-columns: 1fr; }
}
.dashboard {
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  background: var(--paper-pure);
  transition: transform 300ms cubic-bezier(.2,.7,.2,1), box-shadow 300ms cubic-bezier(.2,.7,.2,1);
  position: relative;
}
.dashboard:hover {
  transform: translate(-6px, -6px);
  box-shadow: 10px 10px 0 var(--dash-accent, var(--malibu));
}

.dashboard__viz {
  background: linear-gradient(180deg, var(--blue-mist) 0%, var(--sky) 100%);
  margin: -2.25rem -2.25rem 1.75rem;
  padding: 1.5rem 2rem 1.25rem;
  border-bottom: 1px solid var(--cornflower);
  /* Match the parent card's rounded corners at the top so the
     background gradient doesn't poke past the card's rounded edges.
     Uses slightly smaller radius since the border sits inside. */
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.dashboard__viz svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 150px;
}

.dashboard__eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dash-accent, var(--malibu));
  margin-bottom: 1rem;
  font-weight: 500;
}
.dashboard__title {
  font-family: 'Petrona', serif;
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.05;
  letter-spacing: -0.022em;
  margin: 0 0 0.8rem;
}
.dashboard__title em { font-style: italic; color: var(--dash-accent, var(--malibu)); }
.dashboard__desc {
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
  max-width: 42ch;
}
.dashboard__books {
  font-family: 'Petrona', Georgia, serif;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 1.5rem;
  font-style: italic;
}
.dashboard__books strong {
  font-style: normal;
  color: var(--ink);
  font-weight: 600;
  display: block;
  margin-bottom: 0.25rem;
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dashboard__link {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 180ms ease, gap 220ms cubic-bezier(.2,.7,.2,1);
}
.dashboard__link:hover {
  color: var(--dash-accent, var(--malibu));
  gap: 0.7rem;
}
.dashboard--casualties { --dash-accent: var(--portillos); }
.dashboard--lacunae    { --dash-accent: var(--bahama); }

/* ---------- Experience ---------- */
.experience {
  padding-top: 5rem;
  padding-bottom: 5rem;
  border-top: 1px solid var(--rule);
}
.experience__head {
  margin-bottom: 3.5rem;
  max-width: 62ch;
}
.experience__head .eyebrow {
  display: block;
  margin-bottom: 1.25rem;
}
.experience h2 {
  font-family: 'Petrona', serif;
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.05;
  letter-spacing: -0.022em;
  margin: 0 0 1.25rem;
  max-width: 18ch;
}
.experience h2 em { font-style: italic; color: var(--accent); }
.experience__intro {
  color: var(--ink-soft);
  font-size: 1.15rem;
  line-height: 1.55;
  margin: 0;
  max-width: 58ch;
}
.job {
  padding: 2.25rem 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 2.5fr;
  gap: 2.5rem;
  transition: background 280ms ease;
}
.job:hover {
  background: linear-gradient(90deg, transparent, var(--paper-2) 30%, var(--paper-2) 100%);
}
@media (max-width: 760px) {
  .job { grid-template-columns: 1fr; gap: 0.75rem; }
  .job:hover { background: none; }
  /* Tighter line-height in the meta block so stacked rows read as a unit,
     plus more space before the role heading to separate the two blocks */
  .job__meta { line-height: 1.45; }
  .job__meta strong { margin-bottom: 0.4rem; }
  .job__role { margin-top: 1rem; }
}
.job__meta {
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.75;
  font-weight: 500;
}
.job__meta strong {
  display: block;
  color: var(--job-accent, var(--ink));
  font-weight: 700;
  margin-bottom: 0.2rem;
  font-size: 0.95rem;
}
.job__role {
  font-family: 'Petrona', serif;
  font-size: var(--fs-h3);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.015em;
}
.job__role em { font-style: italic; color: var(--job-accent, var(--accent)); }
.job__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.8rem;
}
.job__list li {
  padding-left: 1.5rem;
  position: relative;
  color: var(--ink-soft);
}
.job__list li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--job-accent, var(--accent));
  font-weight: 700;
}

/* Per-job accent — mirrors the case-card accents so a company's work reads
   with the same color signature everywhere it appears on the page. */
.job--lifestance-lead   { --job-accent: var(--portillos); }
.job--lifestance-senior { --job-accent: var(--malibu); }
.job--collective-health { --job-accent: var(--flw); }

/* ---------- Hello / about ---------- */
.hello {
  padding: 6rem 0;
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.hello__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}
@media (max-width: 860px) {
  .hello__grid { grid-template-columns: 1fr; gap: 2rem; }
}
.hello h2 {
  font-family: 'Petrona', serif;
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.05;
  letter-spacing: -0.022em;
  margin: 1rem 0 1.5rem;
  max-width: 16ch;
}
.hello h2 em { font-style: italic; color: var(--accent); }
.hello p {
  color: var(--ink-soft);
  margin-bottom: 1rem;
  font-size: 1.0625rem;
  line-height: 1.65;
}
.hello__link {
  color: var(--accent);
  border-bottom: 1.5px solid var(--accent);
  font-weight: 500;
}
.hello__link:hover { color: var(--accent-deep); border-color: var(--accent-deep); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 2px solid var(--ink);
  padding: 4rem 0 3rem;
  background: var(--paper);
  position: relative;
  z-index: 2;
}
.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}
@media (max-width: 760px) {
  .site-footer__inner { grid-template-columns: 1fr; gap: 2rem; }
}
.site-footer h3 {
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
  font-weight: 600;
}
.site-footer__sign {
  font-family: 'Petrona', serif;
  font-weight: 400;
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
}
.site-footer__sign em { font-style: italic; color: var(--accent); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.site-footer ul a {
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, color 180ms ease;
  display: inline-block;
}
.site-footer ul a:hover { border-color: var(--accent); color: var(--accent); }
.site-footer__colophon {
  grid-column: 1 / -1;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Lock page ---------- */
.lock {
  min-height: calc(100vh - 80px);
  max-height: calc(100vh - 80px);
  display: grid;
  place-items: center;
  padding: 2rem var(--gutter);
  position: relative;
  overflow: hidden;
}

.lock__card {
  max-width: 520px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lock__icon {
  width: 44px;
  height: 44px;
  margin: 0 0 1.25rem;
  color: var(--accent);
  display: block;
}
.lock .eyebrow {
  margin-bottom: 0.5rem;
}
.lock h1 {
  font-family: 'Petrona', serif;
  font-weight: 500;
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.9rem;
}
.lock h1 em { font-style: italic; color: var(--accent); }
.lock p {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 0 1.5rem;
  max-width: 40ch;
}
.lock__access {
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 0.88rem !important;
  color: var(--muted) !important;
  margin: 0 0 1.5rem !important;
}
.lock__access a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}
.lock__form {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 420px;
  margin: 0;
  justify-content: center;
}
.lock__input {
  flex: 1;
  padding: 0.85rem 1.1rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-family: 'Petrona', Georgia, serif;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  text-align: center;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.lock__input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}
.lock__input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 12%, transparent);
}
.lock__error {
  color: var(--accent);
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.75rem;
  /* Double-hidden: both opacity AND visibility. Neither can be
     accidentally overridden by the staggered entrance animation.
     Only shows when JS adds .is-visible on a failed submit. */
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 0s linear 200ms;
  min-height: 1em;
}
.lock__error.is-visible {
  opacity: 1;
  visibility: visible;
  transition: opacity 200ms ease, visibility 0s linear 0s;
}
.lock__hint {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-family: 'Inter Tight', system-ui, sans-serif;
  color: var(--muted);
  letter-spacing: 0.01em;
}
.lock__hint a { color: var(--accent); border-bottom: 1px solid var(--accent); }

@media (max-width: 520px) {
  .lock__form { flex-direction: column; gap: 0.65rem; }
  .lock__form .btn { width: 100%; justify-content: center; }
}

/* ---------- Lock page animations ---------- */

/* Staggered entrance — each element fades in (no vertical slide on the icon,
   so its transform is freed up for the hover jiggle later). */
.lock__card > *:not(.lock__error) {
  opacity: 0;
  animation: lockFadeIn 700ms cubic-bezier(.2, .7, .2, 1) forwards;
}
.lock__card .eyebrow,
.lock__card h1,
.lock__card p,
.lock__form,
.lock__hint {
  transform: translateY(14px);
  animation-name: lockFadeUp;
}
.lock__icon             { animation-delay: 120ms; }
.lock__card .eyebrow    { animation-delay: 240ms; }
.lock__card h1          { animation-delay: 360ms; }
.lock__card p           { animation-delay: 480ms; }
.lock__form             { animation-delay: 600ms; }
.lock__hint             { animation-delay: 720ms; }

@keyframes lockFadeIn {
  to { opacity: 1; }
}
@keyframes lockFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* The shackle plays its "drop into locked position" animation AFTER the
   icon's entrance is fully complete. Using `forwards` (not `both`) so the
   shackle sits in its natural neutral position during the icon's fade-in —
   it only starts moving once the close animation fires at 820ms. */
.lock__icon-shackle {
  transform-origin: 12px 7px;
  animation: shackleClose 700ms 820ms cubic-bezier(.34, 1.5, .64, 1) forwards;
}
@keyframes shackleClose {
  0%   { transform: translateY(-4px) rotate(-22deg); }
  70%  { transform: translateY(1px)  rotate(3deg); }
  100% { transform: translateY(0)    rotate(0); }
}

/* Hover: padlock jiggles like you're testing the lock.
   Uses `forwards` fill AND sets opacity: 1 explicitly so the icon can never
   fall back to the entrance's opacity: 0 state when the hover animation ends. */
.lock__icon {
  transform-origin: center;
  cursor: default;
}
.lock__icon:hover {
  animation: lockJiggle 450ms cubic-bezier(.36, .07, .19, .97) forwards;
}
@keyframes lockJiggle {
  0%   { opacity: 1; transform: translate(0, 0) rotate(0); }
  15%  { opacity: 1; transform: translate(-3px, 0) rotate(-3deg); }
  35%  { opacity: 1; transform: translate(3px, 0) rotate(3deg); }
  55%  { opacity: 1; transform: translate(-2px, 0) rotate(-2deg); }
  75%  { opacity: 1; transform: translate(2px, 0) rotate(2deg); }
  100% { opacity: 1; transform: translate(0, 0) rotate(0); }
}

/* Wrong password — shake the icon + input */
.lock.is-error .lock__icon {
  animation: lockShake 500ms cubic-bezier(.36, .07, .19, .97);
}
.lock.is-error .lock__input {
  animation: lockShake 500ms cubic-bezier(.36, .07, .19, .97);
}
@keyframes lockShake {
  0%, 100%       { transform: translateX(0); }
  15%, 45%, 75%  { transform: translateX(-6px); }
  30%, 60%, 90%  { transform: translateX(6px); }
}

/* Success — shackle lifts out of the body, quick celebratory moment */
.lock.is-success .lock__icon-shackle {
  transform-origin: 12px 7px;
  animation: shackleLift 600ms cubic-bezier(.2, .7, .2, 1) forwards;
}
.lock.is-success .lock__icon-body {
  animation: bodyNudge 600ms cubic-bezier(.2, .7, .2, 1);
}
.lock.is-success .lock__icon {
  animation: iconExit 700ms 300ms cubic-bezier(.2, .7, .2, 1) forwards;
}
@keyframes shackleLift {
  0%   { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-3px) rotate(-18deg); }
}
@keyframes bodyNudge {
  0%, 100% { transform: translateY(0); }
  40%      { transform: translateY(1px); }
}
@keyframes iconExit {
  to { opacity: 0; transform: scale(0.92) translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .lock__icon,
  .lock__icon-shackle,
  .lock__icon:hover,
  .lock__card > *,
  .lock.is-error .lock__icon,
  .lock.is-error .lock__input,
  .lock.is-success .lock__icon-shackle,
  .lock.is-success .lock__icon-body,
  .lock.is-success .lock__icon {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ---------- Case study page ---------- */
.cs-hero {
  padding-top: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.cs-hero__nav {
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 3rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  font-weight: 500;
}
.cs-hero__nav a { color: var(--ink-soft); transition: color 180ms ease; }
.cs-hero__nav a:hover { color: var(--accent); }
.cs-hero__eyebrow {
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.cs-hero h1 {
  font-family: 'Petrona', serif;
  font-weight: 400;
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 1.5rem;
  max-width: 22ch;
}
.cs-hero h1 em { font-style: italic; color: var(--accent); }
.cs-hero__lede {
  font-family: 'Petrona', Georgia, serif;
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0 0 3rem;
}
.cs-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
@media (max-width: 760px) {
  .cs-meta { grid-template-columns: repeat(2, 1fr); }
}
.cs-meta__label {
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
  font-weight: 600;
}
.cs-meta__value {
  font-family: 'Petrona', serif;
  font-size: 1.05rem;
  font-weight: 500;
}

/* Metrics strip */
.metrics {
  background: var(--ink);
  color: var(--paper);
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}
.metrics::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(to right,
    var(--portillos) 0%, var(--portillos) 33%,
    var(--flw) 33%, var(--flw) 66%,
    var(--secondary) 66%, var(--secondary) 100%);
}
.metrics__grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}
@media (max-width: 760px) {
  .metrics__grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
.metric {
  border-top: 1px solid rgba(251, 250, 246, 0.2);
  padding-top: 1.5rem;
}
.metric__num {
  font-family: 'Petrona', serif;
  font-weight: 400;
  font-size: clamp(3rem, 6.5vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 0 0 0.75rem;
}
.metric__num em { font-style: italic; color: var(--flag-blue); }
.metric__label {
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 0.9rem;
  color: rgba(251, 250, 246, 0.72);
  line-height: 1.5;
  font-weight: 500;
  max-width: 32ch;
}

/* Long-form body */
.cs-body {
  padding-top: 5rem;
  padding-bottom: 5rem;
}
.cs-body h2 {
  font-family: 'Petrona', serif;
  font-weight: 500;
  font-size: 2.4rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 3.5rem 0 1.25rem;
  max-width: 22ch;
}
.cs-body h2 em { font-style: italic; color: var(--accent); }
.cs-body h2:first-child { margin-top: 0; }
.cs-body h3 {
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.cs-body p {
  max-width: 64ch;
  margin: 0 0 1.25rem;
  color: var(--ink-soft);
  line-height: 1.7;
}
.cs-body p strong { color: var(--ink); font-weight: 700; }

/* About-page hero portrait.
   Two-column grid: headline on left, portrait on right.
   Portrait uses the same rounded editorial square treatment as other
   imagery on the site, with a mono dateline caption below. */
.about-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.about-hero__text { min-width: 0; }
.about-hero__portrait {
  margin: 0;
  justify-self: center;
  width: 100%;
  max-width: 340px;
}
.about-hero__portrait-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  background: var(--paper-2);
  box-shadow:
    0 1px 2px rgba(15, 40, 50, 0.05),
    0 18px 40px -8px rgba(15, 40, 50, 0.18),
    0 2px 8px rgba(15, 40, 50, 0.04);
}
.about-hero__portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}
.about-hero__portrait figcaption {
  margin-top: 1rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--rule);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
@media (max-width: 820px) {
  .about-hero__grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .about-hero__portrait {
    justify-self: center;
    max-width: 280px;
    order: 2;
  }
  .about-hero__text { order: 1; }
}
@media (max-width: 640px) {
  .about-hero__portrait { max-width: 220px; }
}
.cs-body blockquote {
  margin: 2.5rem 0;
  padding: 0 0 0 1.5rem;
  border-left: 3px solid var(--accent);
  font-family: 'Petrona', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.55rem;
  line-height: 1.32;
  color: var(--ink);
  max-width: 32ch;
}
.cs-body ul {
  max-width: 64ch;
  margin: 0 0 1.5rem;
  padding-left: 0;
  list-style: none;
}
.cs-body ul li {
  padding-left: 1.6rem;
  position: relative;
  color: var(--ink-soft);
  margin-bottom: 0.7rem;
  line-height: 1.65;
}
.cs-body ul li::before {
  content: "§";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.cs-chapter {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 2rem;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
}
@media (max-width: 760px) {
  .cs-chapter { grid-template-columns: 1fr; gap: 0.5rem; }
}
.cs-chapter__num {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 0.5rem;
  font-weight: 500;
}
.cs-chapter__num::before { content: "№ "; }

/* In-body stat callout */
.cs-stat {
  margin: 3rem 0;
  padding: 2.5rem 0;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: baseline;
}
@media (max-width: 600px) {
  .cs-stat { grid-template-columns: 1fr; gap: 0.5rem; }
}
.cs-stat__num {
  font-family: 'Petrona', serif;
  font-weight: 400;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--accent);
}
.cs-stat__num em { font-style: italic; }
.cs-stat__label {
  font-family: 'Petrona', Georgia, serif;
  font-size: 1.15rem;
  color: var(--ink);
  line-height: 1.5;
  max-width: 36ch;
  align-self: center;
}

/* Next case */
.cs-next {
  background: var(--ink);
  color: var(--paper);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}
.cs-next::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent);
}
.cs-next__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}
.cs-next__label {
  font-family: 'Inter Tight', system-ui, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(251, 250, 246, 0.55);
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.cs-next__title {
  font-family: 'Petrona', serif;
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--paper);
}
.cs-next__title em { font-style: italic; color: var(--flag-blue); }
.cs-next a {
  display: block;
  transition: transform 220ms cubic-bezier(.2,.7,.2,1);
}
.cs-next a:hover { transform: translateX(8px); }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 900ms cubic-bezier(.2,.7,.2,1), transform 900ms cubic-bezier(.2,.7,.2,1);
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
.reveal--d1 { transition-delay: 80ms; }
.reveal--d2 { transition-delay: 160ms; }
.reveal--d3 { transition-delay: 240ms; }
.reveal--d4 { transition-delay: 320ms; }
.reveal--d5 { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

.visually-hidden {
  position: absolute;
  clip: rect(0 0 0 0);
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ============================================================
   MOBILE PASS — consolidated responsive refinements.
   Standard breakpoints used site-wide:
     820px  — tablet (two-column → one-column transitions)
     640px  — large phone
     420px  — narrow phone
   Purpose: compress vertical rhythm, reduce over-large headings,
   tighten grid gaps, fix edge cases where content overflows.
   ============================================================ */
@media (max-width: 820px) {
  /* Compress section padding across the site */
  .case-intro    { padding: 4rem 0 2rem; }
  .case-grid     { padding: 1.5rem 0 4rem; }
  .dashboards    { padding-top: 3.5rem; padding-bottom: 4rem; }
  .experience    { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .hello         { padding: 4rem 0; }
  .site-footer   { padding: 3rem 0 2.5rem; }
  .cs-hero       { padding-top: 3rem; }
  .metrics       { padding: 3.5rem 0; }
  .cs-body       { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .cs-next       { padding: 3rem 0; }

  /* Grid gaps tighten */
  .dashboards__head { margin-bottom: 2rem; }
  .experience__head { margin-bottom: 2.5rem; }

  /* Buttons go full-width-ish on mobile for easier tapping */
  .hero__actions { gap: 0.75rem; }
}

@media (max-width: 640px) {
  /* Body h2 reduces so 22ch max-width doesn't create awkward single-word lines */
  .cs-body h2 { font-size: 1.9rem; margin: 2.5rem 0 1rem; }
  .cs-body h3 { font-size: 1.05rem; margin: 1.5rem 0 0.6rem; }

  /* In-body blockquote — smaller and tighter */
  .cs-body blockquote {
    font-size: 1.3rem;
    margin: 2rem 0;
    padding-left: 1.1rem;
  }

  /* Case card — the num label had 90px of right padding to clear the viz,
     but the viz is now 56px so we can reclaim that space */
  .case-card__num { padding-right: 72px; }
  .case-card      { padding: 1.75rem; min-height: 280px; }
  .case-card__title { font-size: 1.9rem; }
  .case-card__desc  { font-size: 0.95rem; }

  /* Dashboards padding matches cards */
  .dashboard { padding: 1.75rem; }
  .dashboard__viz { margin: -1.75rem -1.75rem 1.5rem; }

  /* Case study hero — meta label 4-up is too cramped on phones; the existing
     760px query puts it at 2x2 which is good, but fix spacing there */
  .cs-meta { gap: 1.5rem 1.25rem; }

  /* Next-case footer was `flex-wrap: wrap` and fine, but add explicit spacing */
  .cs-next__inner { gap: 1.5rem; }
  .cs-next__title { font-size: 1.75rem; }

  /* Hero tightens */
  .hero h1 { margin-bottom: 1.25rem; }
  .hero__lede { margin-bottom: 1.75rem; font-size: 1.1rem; }

  /* Buttons stack vertically and fill width — easier thumb targets */
  .hero__actions .btn { flex: 1 1 100%; justify-content: center; }

  /* Body paragraph width maxes at viewport — 64ch constraint is already
     loose enough on phones but ensure no horizontal overflow */
  .cs-body p, .cs-body ul { max-width: 100%; }
}

@media (max-width: 420px) {
  /* Hero h1 scale — allow smaller floor on narrow phones */
  .hero h1 { font-size: clamp(2rem, 9vw, 2.4rem); max-width: none; }
  .hero__lede { font-size: 1.05rem; }

  /* Case study hero title similarly */
  .cs-hero h1 { font-size: clamp(2.1rem, 9.5vw, 2.6rem); max-width: none; }
  .cs-hero__lede { font-size: 1.1rem; }

  /* Case card title — don't want 6-char words dominating the card */
  .case-card__title { font-size: 1.65rem; }

  /* Metrics number scale */
  .metric__num { font-size: clamp(2.6rem, 12vw, 3.5rem); }

  /* Reduce cs-body paragraph margin slightly */
  .cs-body p { margin-bottom: 1rem; }
}

/* iOS-safe viewport for the lock page: avoid the `vh` jump when the
   address bar collapses, and let the keyboard push content naturally. */
@supports (height: 100dvh) {
  .lock {
    min-height: 100dvh;
    max-height: none;
  }
}
@media (max-width: 640px) {
  .lock {
    min-height: auto;
    max-height: none;
    padding: 3rem var(--gutter) 4rem;
    overflow: visible;
  }
  .lock__card { max-width: 100%; }
}
