/* ==========================================================================
   Ellie Warson — portfolio styles
   Paper, ink, and one lipstick-red accent. Serif display, humanist sans body,
   and a handwriting face for the margin notes.
   ========================================================================== */

:root {
  --paper: #F9F5EE;
  --paper-2: #F0E9DE;
  --paper-3: #E7DECF;
  --ink: #1F1B17;
  --ink-2: #4A433D;
  --mute: #867C73;
  --rule: #DFD5C6;
  --lip: #D5392A;
  --lip-dark: #B32D20;
  --lip-soft: #F6D9D4;
  --white: #FFFDF9;

  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --body: 'Figtree', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --hand: 'Caveat', 'Bradley Hand', 'Segoe Print', cursive;

  --max: 1200px;
  --gutter: clamp(16px, 5vw, 64px);
  --radius: 18px;
  --shadow: 0 18px 40px -22px rgba(31, 27, 23, .35), 0 2px 6px -2px rgba(31, 27, 23, .12);
  --ease: cubic-bezier(.22, .8, .26, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--lip); text-underline-offset: .18em; }
a:hover { color: var(--lip); }
:focus-visible { outline: 2.5px solid var(--lip); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-variation-settings: 'SOFT' 100, 'opsz' 96;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: .5rem .75rem; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

.page {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
  padding-block: 0 2rem;
}

.hand { font-family: var(--hand); font-weight: 500; font-size: 1.35em; line-height: 1.1; color: var(--ink-2); }
.eyebrow {
  font-family: var(--body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--lip);
  margin: 0;
}
.eyebrow--light { color: var(--lip-soft); }

/* ---------- scribbles ---------- */
.scribble { display: block; overflow: visible; pointer-events: none; }
.scribble path { fill: none; stroke: var(--lip); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.js .scribble path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .scribble.is-in path, .js .is-in .scribble path { animation: draw 1.1s var(--ease) forwards; }
.js .is-in .scribble path:nth-child(2) { animation-delay: .35s; }
.js .is-in .scribble path:nth-child(3) { animation-delay: .55s; }
.js .is-in .scribble path:nth-child(4) { animation-delay: .7s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .js .scribble path { stroke-dasharray: none; stroke-dashoffset: 0; animation: none !important; } }

.scribble--divider { width: min(100%, 520px); height: 24px; margin: clamp(2rem, 6vw, 4.5rem) auto; }
.scribble--divider path { stroke: var(--ink-2); stroke-width: 2; opacity: .7; }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: .35; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- nav ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1.25rem;
}
.logo { display: inline-flex; align-items: center; gap: .35rem; text-decoration: none; color: var(--ink); }
.logo-mark { width: 26px; height: 30px; }
.logo-mark path { fill: none; stroke: var(--lip); stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.logo-word { font-family: var(--hand); font-weight: 600; font-size: 1.65rem; letter-spacing: .01em; line-height: 1; transform: translateY(2px); }
.nav-links { display: flex; gap: clamp(1rem, 3vw, 2.25rem); font-weight: 500; font-size: .95rem; }
.nav-links a { text-decoration: none; position: relative; padding-block: .25rem; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--lip); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav-links a:hover::after, .nav-links a:focus-visible::after { transform: scaleX(1); }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: end;
  padding-block: clamp(2.5rem, 8vw, 6rem) clamp(3.5rem, 9vw, 7.5rem);
}
.work { padding-top: clamp(2rem, 5vw, 4rem); }
.hero-title {
  font-size: clamp(2.75rem, 7.6vw, 6.4rem);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.028em;
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
}
.hero-line { display: block; }
.hero-line--photo { padding-left: .08em; }
.hero-name { position: relative; display: inline-block; white-space: nowrap; }
.scribble--underline { position: absolute; left: -.02em; bottom: -.14em; width: calc(100% + .04em); height: .22em; }
.hero-pill {
  display: inline-block; vertical-align: -.06em;
  width: 1.9em; height: .82em; margin-inline: .08em .18em;
  border-radius: 999px; overflow: hidden; background: var(--paper-3);
  transform: rotate(-5deg);
  box-shadow: var(--shadow);
  transition: transform .5s var(--ease);
}
.hero-pill--2 { transform: rotate(4deg); margin-inline: .18em 0; }
.hero-pill img { width: 100%; height: 100%; object-fit: cover; }
.hero-title:hover .hero-pill { transform: rotate(0) scale(1.06); }
.hero-side { display: grid; gap: 1.25rem; padding-bottom: .4rem; }

/* margin doodles — small sketches scattered around the copy, filled in by doodle.js */
.dd {
  position: absolute; width: var(--s, 72px); height: var(--s, 72px);
  transform: rotate(var(--r, 0deg)); opacity: 0;
  overflow: visible; pointer-events: none; z-index: 1;
}
.dd path { fill: none; stroke: var(--ink-2); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.dd:nth-of-type(odd) path { stroke: var(--lip); }
html:not(.js) .dd { display: none; }

.hero { position: relative; }
.dd--hero-a { --s: 96px; --r: -8deg; top: 6%; right: 6%; }
.dd--hero-b { --s: 66px; --r: 12deg; top: 34%; right: 24%; }
.dd--hero-c { --s: 58px; --r: -14deg; top: 48%; right: 3%; }
.dd--hero-d { --s: 54px; --r: 6deg; bottom: 4%; left: 46%; }
@media (max-width: 900px) {
  .dd--hero-a { --s: 64px; top: 2%; right: 2%; }
  .dd--hero-b, .dd--hero-d { display: none; }
  .dd--hero-c { --s: 52px; top: auto; bottom: 30%; right: 2%; }
}

.section-title { position: relative; }
.dd--about-title { --s: 56px; --r: 14deg; top: -28px; right: -20px; }
@media (max-width: 700px) { .dd--about-title { right: 0; } }
.hero-intro { font-size: 1.15rem; line-height: 1.55; max-width: 36ch; color: var(--ink-2); }
.hero-current { font-size: 1.05rem; }
.hero-current a { text-decoration: none; font-weight: 600; }
.circled { position: relative; display: inline-block; padding: .1em .35em; }
.scribble--circle { position: absolute; left: -.4em; top: -.45em; width: calc(100% + .8em); height: calc(100% + .9em); }
.hero-scroll { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; margin-top: .5rem; width: max-content; }
.scribble--arrow { width: 26px; height: 52px; }
.scribble--arrow path { stroke: var(--ink-2); stroke-width: 2.2; }
.hero-scroll:hover .scribble--arrow { animation: nudge 1.2s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .hero-scroll:hover .scribble--arrow { animation: none; } }

/* ---------- sections ---------- */
.section { padding-block: clamp(1rem, 3vw, 2rem); }
.section-head { display: grid; gap: .75rem; max-width: 820px; margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.section-title { font-size: clamp(1.9rem, 4vw, 3rem); }
.section-intro { font-size: 1.1rem; color: var(--ink-2); max-width: 62ch; }
.hand--note { color: var(--mute); font-size: 1.3rem; }

/* ---------- work list ---------- */
.work-list { border-top: 1.5px solid var(--ink); }
.work-row { border-bottom: 1.5px solid var(--rule); }
.work-link { display: block; text-decoration: none; color: inherit; }
.work-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem;
  padding-block: clamp(1.1rem, 2.4vw, 1.6rem);
}
.work-title { font-size: clamp(1.5rem, 3.4vw, 2.5rem); font-weight: 500; transition: color .3s, transform .5s var(--ease); }
.work-meta { display: flex; align-items: baseline; gap: 1.25rem; flex-shrink: 0; font-size: .92rem; color: var(--mute); font-variant-numeric: tabular-nums; }
.work-role { display: none; }
@media (min-width: 720px) { .work-role { display: inline; } }
.work-plus { font-family: var(--display); font-size: 1.8rem; line-height: 1; color: var(--ink); transition: transform .5s var(--ease), color .3s; }
.work-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease); }
.work-body-inner { overflow: hidden; min-height: 0; }
.work-row:hover .work-body, .work-row.is-open .work-body { grid-template-rows: 1fr; }
.work-row:hover .work-title, .work-row.is-open .work-title { color: var(--lip); transform: translateX(.35rem); }
.work-row:hover .work-plus, .work-row.is-open .work-plus { transform: rotate(45deg); color: var(--lip); }
.work-body-inner > * { } /* keep */
.work-body .work-text { padding-block: .25rem 1.75rem; }
.work-body-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: start;
}
.work-tagline { font-family: var(--display); font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.3; max-width: 30ch; margin-bottom: 1rem; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.tags li { font-size: .78rem; font-weight: 600; letter-spacing: .04em; padding: .3rem .7rem; border: 1.5px solid var(--rule); border-radius: 999px; color: var(--ink-2); background: var(--white); }
.work-cta { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--lip); }
.scribble--arrow-right { width: 48px; height: 16px; }
.work-cover { padding-block: .25rem 1.75rem; }
.work-cover img {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  border-radius: 12px; box-shadow: var(--shadow); background: var(--white);
  transform: rotate(-1.5deg) scale(.98); transition: transform .6s var(--ease);
}
.work-row:hover .work-cover img, .work-row.is-open .work-cover img { transform: rotate(0) scale(1); }
@media (max-width: 719px) {
  .work-body-inner { grid-template-columns: 1fr; gap: .5rem; }
  .work-cover { order: -1; padding-block: 0 .5rem; }
}

/* ---------- welcome sign ---------- */
.welcome {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--lip); color: var(--paper);
  display: grid; place-items: center;
  transition: transform .9s cubic-bezier(.76, 0, .24, 1);
}
.welcome.is-leaving { transform: translateY(-101%); }
.welcome.is-gone { display: none; }
.welcome-inner { display: grid; justify-items: center; gap: .25rem; text-align: center; padding-inline: 1rem; }
.welcome-hand { font-size: clamp(3.5rem, 12vw, 8rem); line-height: 1; display: inline-block; transform-origin: 70% 75%; animation: wave 1.6s ease-in-out .15s 1 both; }
.welcome-word { font-family: var(--display); font-variation-settings: 'SOFT' 100, 'opsz' 144; font-size: clamp(3.2rem, 13vw, 9.5rem); line-height: 1; letter-spacing: -.03em; animation: rise .8s var(--ease) .1s both; }
.welcome-sub { color: var(--lip-soft); font-size: clamp(1.3rem, 3vw, 1.9rem); animation: rise .8s var(--ease) .35s both; }
@keyframes wave { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(18deg); } 35% { transform: rotate(-10deg); } 55% { transform: rotate(16deg); } 75% { transform: rotate(-6deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
html.has-welcome { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  .welcome { transition: opacity .4s; }
  .welcome.is-leaving { transform: none; opacity: 0; }
  .welcome-hand, .welcome-word, .welcome-sub { animation: none; }
}
html:not(.js) .welcome { display: none; }

/* ---------- approach ---------- */
.principles {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem) clamp(1.5rem, 4vw, 4rem);
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.principle { position: relative; padding-left: 2.6rem; }
.principle .scribble--tick { position: absolute; left: 0; top: .1rem; width: 30px; height: 30px; }
.principle h3 { font-size: 1.4rem; margin-bottom: .4rem; }
.principle p { color: var(--ink-2); max-width: 46ch; }
@media (max-width: 640px) { .principles { grid-template-columns: 1fr; } }

.ai-card {
  position: relative;
  background: var(--paper-2); border-radius: 24px;
  border: 1.5px dashed var(--paper-3);
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3rem);
  display: grid; gap: .75rem; max-width: 900px;
  margin-inline: auto; justify-items: center; text-align: center;
}
.ai-card .tags--ai { justify-content: center; }
.ai-card .scribble--sparkle { position: absolute; top: -22px; right: clamp(1rem, 4vw, 2.5rem); width: 52px; height: 52px; }
.ai-lead { color: var(--mute); font-size: 1.45rem; }
.ai-question { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.02; letter-spacing: -.025em; color: var(--ink); }
.ai-qmark { color: var(--lip); display: inline-block; margin-left: .05em; transform: rotate(8deg); }
.ai-answer { font-size: 1.1rem; line-height: 1.65; color: var(--ink-2); max-width: 62ch; margin-top: .5rem; }
.tags--ai { margin: .75rem 0 0; }
.tags--ai li { background: var(--paper); }

/* ---------- vouch carousel ---------- */
.carousel { position: relative; }
.quotes {
  display: flex; gap: 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 0;
  padding-block: .5rem 1rem; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
  scrollbar-width: none;
}
.quotes::-webkit-scrollbar { display: none; }
.quote {
  flex: 0 0 min(440px, 84vw); scroll-snap-align: start;
  display: grid; gap: 1.25rem; align-content: space-between;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: rotate(var(--tilt, 0deg));
}
.quote:nth-child(odd) { --tilt: -.6deg; }
.quote:nth-child(even) { --tilt: .5deg; }
.quote blockquote { margin: 0; }
.quote blockquote p { font-family: var(--display); font-size: 1.2rem; line-height: 1.45; font-variation-settings: 'SOFT' 100, 'opsz' 24; }
.quote blockquote p::before { content: '“'; color: var(--lip); margin-right: .05em; }
.quote blockquote p::after { content: '”'; color: var(--lip); }
.quote-who { display: flex; align-items: center; gap: .85rem; }
.quote-who div { display: grid; line-height: 1.3; }
.quote-who span { font-size: .9rem; color: var(--mute); }
.avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.avatar--initials { display: grid; place-items: center; background: var(--lip-soft); color: var(--lip-dark); font-weight: 600; font-size: .9rem; letter-spacing: .04em; }
.carousel-controls { display: flex; gap: .6rem; margin-top: .5rem; }
.carousel-btn {
  width: 46px; height: 46px; cursor: pointer;
  background: var(--paper); color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 52% 48% 50% 50% / 48% 52% 48% 52%;
  font: inherit; font-size: 1.15rem;
  transition: background .25s, color .25s, transform .3s var(--ease);
}
.carousel-btn:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }

/* ---------- about / behind the pixels ---------- */
.road { position: relative; margin-top: clamp(1rem, 3vw, 2rem); }
.road-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.road-edge { fill: none; stroke: var(--paper-3); stroke-width: 18px; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.road-line { fill: none; stroke: var(--ink-2); stroke-width: 2px; stroke-dasharray: 10 12; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: .55; }
.js .road-edge { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 0)); }
.stops { display: grid; grid-auto-rows: 1fr; position: relative; }
.stop {
  position: relative; display: grid; align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(2rem, 5vw, 3.5rem);
  min-height: 300px;
}
.stop--left { grid-template-columns: 20% minmax(0, 1.1fr) minmax(0, 1fr); }
.stop--left .stop-card { grid-column: 2; }
.stop--left .cluster--stop { grid-column: 3; }
.stop--right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 20%; }
.stop--right .cluster--stop { grid-column: 1; grid-row: 1; }
.stop--right .stop-card { grid-column: 2; grid-row: 1; }
.stop-pin { position: absolute; top: 50%; width: 40px; height: 40px; transform: translate(-50%, -62%); }
.stop--left .stop-pin { left: 20%; }
.stop--right .stop-pin { left: 80%; }
.stop-pin svg { width: 100%; height: 100%; overflow: visible; }
.stop-pin path { fill: var(--paper); stroke: var(--lip); stroke-width: 2.6; stroke-linejoin: round; }
.stop-pin path + path { fill: var(--lip); }
.stop-card { position: relative; display: grid; gap: .35rem; max-width: 36ch; }
.stop-when { color: var(--lip); font-size: 1.4rem; }
.stop-title { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.stop-text { color: var(--ink-2); line-height: 1.6; }
.about-outro { font-family: var(--display); font-size: clamp(1.25rem, 2.6vw, 1.7rem); line-height: 1.4; color: var(--ink); max-width: 46ch; margin: clamp(1.5rem, 4vw, 3rem) auto 0; text-align: center; text-wrap: balance; }
.cluster { display: flex; justify-content: center; align-items: center; padding: 1rem; }
.cluster--stop .polaroid { width: min(48%, 210px); }
.cluster--stop .polaroid:only-child { width: min(70%, 230px); }
.cluster--empty .dd--stop { position: static; --s: clamp(90px, 12vw, 130px); }
.dd--about-a { --s: 64px; --r: 8deg; top: -70px; right: -10px; }
.dd--about-b { --s: 56px; --r: -10deg; bottom: -66px; right: 10%; }
@media (max-width: 760px) {
  .road-svg { display: none; }
  .road::before { content: ''; position: absolute; left: 14px; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--paper-3); }
  .stop, .stop--left, .stop--right { grid-template-columns: 1fr; padding-left: 2.6rem; min-height: 0; padding-block: 1.5rem; }
  .stop--left .stop-card, .stop--right .stop-card, .stop--left .cluster--stop, .stop--right .cluster--stop { grid-column: 1; grid-row: auto; }
  .stop--left .stop-pin, .stop--right .stop-pin { left: 14px; top: 1.9rem; transform: translate(-50%, 0); width: 30px; height: 30px; }
  .cluster--stop { justify-content: flex-start; padding: .5rem 0; }
  .cluster--empty { display: none; }
  .dd--about-a { --s: 50px; top: -56px; right: 0; }
  .dd--about-b { display: none; }
}
.polaroid {
  margin: 0; background: var(--white); padding: 10px 10px 2.4rem;
  box-shadow: var(--shadow); width: min(46%, 230px);
  transform: rotate(var(--r)); transition: transform .5s var(--ease), z-index 0s;
  position: relative;
}
.polaroid + .polaroid { margin-left: -6%; }
.polaroid:hover { transform: rotate(0) scale(1.06); z-index: 2; }
.polaroid img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.polaroid figcaption { position: absolute; left: 0; right: 0; bottom: .55rem; text-align: center; font-family: var(--hand); font-size: 1.25rem; color: var(--ink-2); line-height: 1; }

/* ---------- contact ---------- */
.contact { padding-top: clamp(2rem, 6vw, 4rem); }
.contact-card {
  position: relative; overflow: hidden;
  background: var(--lip); color: var(--paper);
  border-radius: 28px;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
  display: grid; gap: 1rem; justify-items: start;
}
.contact-card .scribble--star { position: absolute; right: clamp(1rem, 4vw, 3rem); top: clamp(1rem, 4vw, 2.5rem); width: clamp(56px, 10vw, 110px); height: auto; }
.contact-card .scribble--star path { stroke: var(--paper); stroke-width: 2.5; }
.contact-title { font-size: clamp(2rem, 5vw, 3.6rem); max-width: 16ch; }
.contact-body { font-size: 1.1rem; max-width: 46ch; color: var(--lip-soft); }
.contact-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .75rem; }
.btn { display: inline-flex; align-items: center; padding: .8rem 1.3rem; border-radius: 999px; text-decoration: none; font-weight: 600; border: 1.5px solid transparent; transition: transform .3s var(--ease), background .25s, color .25s; }
.btn:hover { transform: translateY(-2px); }
.btn--light { background: var(--paper); color: var(--lip-dark); }
.btn--light:hover { color: var(--ink); }
.btn--ghost { border-color: rgba(249, 245, 238, .6); color: var(--paper); }
.btn--ghost:hover { background: rgba(249, 245, 238, .14); color: var(--paper); }

/* ---------- footer ---------- */
.footer { margin-top: clamp(2.5rem, 6vw, 4rem); border-top: 1.5px solid var(--rule); padding-block: 1.75rem 1rem; }
.footer-inner { display: grid; gap: 1rem; grid-template-columns: auto 1fr; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: flex-end; font-size: .95rem; }
.footer-note { grid-column: 1 / -1; font-size: .85rem; color: var(--mute); }
.logo--footer .logo-word { font-size: 1.4rem; }

/* ==========================================================================
   Case study pages
   ========================================================================== */
.cs { padding-block: clamp(1rem, 3vw, 2rem) 0; }
.cs-hero { display: grid; gap: 1rem; max-width: 1000px; }
.back { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--ink-2); width: max-content; margin-bottom: .5rem; }
.back .scribble--arrow-right { transform: scaleX(-1); width: 40px; }
.back .scribble--arrow-right path { stroke: var(--ink-2); }
.back:hover { color: var(--lip); }
.cs-title { font-size: clamp(2.1rem, 5.4vw, 4.2rem); line-height: 1.02; letter-spacing: -.025em; max-width: 18ch; font-variation-settings: 'SOFT' 100, 'opsz' 144; }
.cs-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; color: var(--mute); font-size: .95rem; font-variant-numeric: tabular-nums; }
.cs-meta li + li::before { content: '·'; margin-right: 1.25rem; color: var(--rule); }
.cs-cover { margin: clamp(1rem, 3vw, 2rem) 0 0; max-width: none; }
.cs-cover img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--white); }
.cs-hero .cs-cover { grid-column: 1 / -1; }
@media (min-width: 1000px) { .cs-hero { max-width: none; } .cs-hero > :not(.cs-cover) { max-width: 1000px; } }

.cs-overview {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  padding-block: clamp(2rem, 5vw, 3.5rem);
  border-bottom: 1.5px solid var(--rule);
}
.cs-details { margin: 0; display: grid; gap: 1rem; align-content: start; font-size: .95rem; }
.cs-details div { display: grid; gap: .15rem; padding-bottom: .9rem; border-bottom: 1.5px dashed var(--rule); }
.cs-details dt { font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.cs-details dd { margin: 0; color: var(--ink); }
.cs-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.25rem, 3vw, 2rem); }
.cs-sum { display: grid; gap: .6rem; align-content: start; }
.cs-sum p { color: var(--ink-2); font-size: 1rem; line-height: 1.55; }
@media (max-width: 900px) { .cs-overview { grid-template-columns: 1fr; } .cs-details { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } }
@media (max-width: 640px) { .cs-summary { grid-template-columns: 1fr; } }

.cs-impact {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem;
  padding-block: clamp(2rem, 5vw, 3.5rem);
}
.impact { display: grid; gap: .2rem; align-content: start; padding-left: 1.1rem; border-left: 2.5px solid var(--lip); }
.impact-value { font-family: var(--display); font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -.03em; color: var(--lip); font-variation-settings: 'SOFT' 100, 'opsz' 144; font-variant-numeric: tabular-nums; }
.impact-label { font-weight: 600; margin-top: .4rem; }
.impact-note { font-size: .9rem; color: var(--mute); }
@media (max-width: 640px) { .cs-impact { grid-template-columns: 1fr; gap: 1.5rem; } }

.cs-body { max-width: 72ch; margin-inline: auto; padding-block: clamp(1rem, 3vw, 2rem) 0; }
.cs-body > p, .cs-section > p { font-size: 1.1rem; line-height: 1.7; color: var(--ink-2); margin-bottom: 1.25rem; }
.cs-body > p:first-child { font-size: 1.3rem; color: var(--ink); font-family: var(--display); line-height: 1.45; }
.cs-section { padding-top: clamp(2rem, 5vw, 3.5rem); }
.eyebrow--section { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; }
.eyebrow--section::after { content: ''; flex: 1; height: 1.5px; background: var(--rule); max-width: 120px; }
.cs-section h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 1.75rem 0 .9rem; }
.cs-section h3:first-of-type { margin-top: 0; }
.cs-section h4 { font-size: 1.2rem; margin: 1.25rem 0 .5rem; font-family: var(--body); font-weight: 600; }
.cs-list { display: grid; gap: .5rem; margin: .25rem 0 1.5rem; padding-left: 1.4rem; color: var(--ink-2); }
.cs-list li { position: relative; }
.cs-list li::before { content: ''; position: absolute; left: -1.3rem; top: .72em; width: 9px; height: 9px; border-radius: 55% 45% 50% 50%; background: var(--lip); }
.cs-list--numbered { counter-reset: n; }
.cs-list--numbered li::before { content: counter(n); counter-increment: n; background: none; color: var(--lip); font-family: var(--hand); font-size: 1.3rem; top: -.15em; width: auto; height: auto; }
.cs-figure { margin: 1.75rem calc(50% - 50vw) 2rem; padding-inline: var(--gutter); max-width: none; }
@media (min-width: 1200px) { .cs-figure { margin-inline: calc((72ch - var(--max)) / 2); padding-inline: 0; } }
.cs-figure img { width: 100%; max-width: var(--max); margin-inline: auto; border-radius: 14px; box-shadow: var(--shadow); background: var(--white); }
.cs-figure--plain img { background: none; box-shadow: none; border-radius: 0; }
.cs-figure--small img { max-width: min(100%, 640px); }
.cs-figure figcaption { text-align: center; font-family: var(--hand); font-size: 1.25rem; color: var(--mute); margin-top: .75rem; }
.cs-quote { margin: 2rem 0; padding: 1.25rem 1.5rem; border-left: 3px solid var(--lip); background: var(--paper-2); border-radius: 0 14px 14px 0; }
.cs-quote p { font-family: var(--display); font-size: 1.2rem; line-height: 1.5; color: var(--ink); margin: 0; }
.cs-body hr { border: 0; height: 1.5px; background: var(--rule); margin: 2.5rem 0; }

.cs-next { margin-top: clamp(3rem, 7vw, 5rem); border-top: 1.5px solid var(--ink); padding-top: 1.5rem; display: grid; gap: .75rem; }
.cs-next-link { display: grid; gap: .25rem; text-decoration: none; justify-items: start; }
.cs-next-title { font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.8rem); line-height: 1.1; letter-spacing: -.02em; transition: color .3s; }
.cs-next-sub { color: var(--mute); }
.cs-next-link .scribble--arrow-right { width: 64px; height: 22px; margin-top: .5rem; transition: transform .4s var(--ease); }
.cs-next-link:hover .cs-next-title { color: var(--lip); }
.cs-next-link:hover .scribble--arrow-right { transform: translateX(8px); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; align-items: start; }
  .hero-side { padding-bottom: 0; }
}
@media (max-width: 480px) {
  body { font-size: 1rem; }
  .hero-pill { width: 1.7em; height: .78em; }
  .work-meta { gap: .75rem; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: flex-start; }
}

/* ---------- placeholders for images not added yet ---------- */
.missing-img {
  display: grid; place-content: center; justify-items: center; gap: .35rem; text-align: center;
  min-height: 220px; padding: 1.5rem; border: 2px dashed var(--paper-3); border-radius: 14px;
  background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(31, 27, 23, .025) 14px 28px), var(--paper-2);
  color: var(--mute);
}
.missing-img .hand { color: var(--lip); font-size: 1.4rem; }
.missing-img code { font-size: .8rem; background: var(--paper); padding: .15rem .5rem; border-radius: 6px; color: var(--ink-2); }
.missing-img p { font-size: .9rem; max-width: 40ch; margin-top: .25rem; }
.missing-img--cover { aspect-ratio: 16 / 10; min-height: 0; transform: rotate(-1.5deg) scale(.98); }
.missing-img--hero { aspect-ratio: 21 / 9; }

/* ---------- laptop mockup ---------- */
.laptop { width: 100%; display: grid; justify-items: center; }
.laptop-screen {
  position: relative; width: 100%; aspect-ratio: 16 / 10;
  background: #1A1816; border-radius: 18px 18px 6px 6px; padding: 3.2% 2.4% 2.8%;
  box-shadow: var(--shadow);
}
.laptop-screen img { width: 100%; height: 100%; object-fit: contain; object-position: center; background: #fff; border-radius: 4px; }
.laptop-cam { position: absolute; top: 1.5%; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: #3a3633; transform: translateX(-50%); }
.laptop-base {
  width: 112%; height: 2.6%; min-height: 10px; margin-top: 0;
  background: linear-gradient(#DCD6CD, #B9B2A8); border-radius: 0 0 14px 14px / 0 0 100% 100%;
  position: relative;
}
.laptop-base::before { content: ''; position: absolute; left: 50%; top: 0; width: 14%; height: 35%; background: #A39C92; border-radius: 0 0 6px 6px; transform: translateX(-50%); }
.work-cover--laptop .laptop { transform: rotate(-1.5deg) scale(.96); transition: transform .6s var(--ease); }
.work-row:hover .work-cover--laptop .laptop, .work-row.is-open .work-cover--laptop .laptop { transform: rotate(0) scale(1); }
.work-cover--laptop img { aspect-ratio: auto; box-shadow: none; transform: none; border-radius: 4px; }
.cs-cover--laptop { max-width: 980px; margin-inline: auto; }
.cs-cover--laptop img { box-shadow: none; border-radius: 4px; }
.tag--lock { background: var(--lip-soft) !important; border-color: var(--lip-soft) !important; color: var(--lip-dark) !important; }

/* ---------- password gate ---------- */
.gate { display: grid; place-items: center; padding-block: clamp(2rem, 8vw, 6rem); }
.gate-card {
  width: min(100%, 520px); display: grid; gap: .75rem; justify-items: start;
  padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); transform: rotate(-.6deg);
}
.gate-lock { width: 54px; height: 54px; overflow: visible; }
.gate-lock path { fill: none; stroke: var(--lip); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.gate-title { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.gate-body { color: var(--ink-2); }
.gate-form { display: flex; gap: .6rem; width: 100%; margin-top: .5rem; flex-wrap: wrap; }
.gate-form input {
  flex: 1 1 200px; font: inherit; padding: .8rem 1rem; border-radius: 999px; border: 1.5px solid var(--rule);
  background: var(--paper); color: var(--ink); min-width: 0;
}
.gate-form input:focus { outline: none; border-color: var(--lip); box-shadow: 0 0 0 3px var(--lip-soft); }
.btn--ink { background: var(--ink); color: var(--paper); cursor: pointer; font: inherit; font-weight: 600; }
.btn--ink:hover { background: var(--lip); color: var(--paper); }
.gate-error { color: var(--lip-dark); font-weight: 500; }
.gate.shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main.is-locked .cs-next { display: none; }
/* tall page screenshots inside the laptop: show the top of the page, like a real screen would */
.laptop-screen img.tall { object-fit: cover; object-position: top; }
