/* Emily Lange — portfolio
   Clean white page; hand-drawn ink lines are the one recurring mark.
   Change colors and type here; the font files are loaded in build.js. */

:root {
  --paper: #fffdf8;        /* warm white page */
  --ink: #1d2129;          /* text */
  --muted: #5d6373;        /* secondary text */
  --line: #0d7a55;         /* ink lines (emerald) */
  --tint: #f1f2f4;         /* image placeholders */
  --accent: #0d7a55;       /* emerald: links on hover, buttons, focus */
  --accent-tint: #ebf5f0;  /* soft emerald for focus rings */
  --audit-bg: #f6faf8;     /* very faint emerald behind the audit offer */
  --accent-line: #a8d2bf;  /* pale emerald outline for the audit offer */
  --soft: #a3a8b3;         /* light section headers and labels */
  --field: #c9cdd6;        /* form field borders */
  --on-accent: #ffffff;    /* text on emerald buttons */
  --error: #b3261e;        /* form error text */

  /* Only three text sizes on the whole site */
  --fs-display: clamp(2.5rem, 6.4vw, 5.25rem);
  --fs-body: 1.0625rem;
  --fs-small: .9375rem;

  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Lato", "Helvetica Neue", Arial, system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  --measure: 42rem;
  --wide: 72rem;
  --radius: 6px;

  /* Home page card colors: background / text */
  --c-emerald: #0d7a55; --c-emerald-t: #ffffff;
  --c-peach: #ffe3d9;   --c-peach-t: #1d2129;
  --c-blue: #e4e9ff;    --c-blue-t: #1d2129;
  --c-yellow: #fff4cf;  --c-yellow-t: #1d2129;
  --c-pink: #fde1ec;    --c-pink-t: #1d2129;
  --c-ink: #1d2129;     --c-ink-t: #fffdf8;
  --c-mint: #c9eadb;    --c-mint-t: #1d2129;
  --blob: #c9eadb; --sticker: #f5c04a; --doodle-1: #e0412b; --doodle-2: #1f45e0;

  /* Underline shapes: a barely-wobbly line, and a gentle wave for hover. Color is baked in (%230d7a55 = emerald). */
  --u-calm: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='8' viewBox='0 0 160 8'%3E%3Cpath d='M0 4.2C18 3.6 34 4.6 54 4.1S92 3.5 112 4.3 146 4.5 160 4.2' fill='none' stroke='%230d7a55' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E");
  --u-calm-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='8' viewBox='0 0 160 8'%3E%3Cpath d='M0 4.2C18 3.6 34 4.6 54 4.1S92 3.5 112 4.3 146 4.5 160 4.2' fill='none' stroke='%230d7a55' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  --u-squig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='8' viewBox='0 0 160 8'%3E%3Cpath d='M0 4.2Q20 1.9 40 4.2T80 4.2 120 4.2 160 4.2' fill='none' stroke='%230d7a55' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E");
  --u-squig-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='8' viewBox='0 0 160 8'%3E%3Cpath d='M0 4.2Q20 1.9 40 4.2T80 4.2 120 4.2 160 4.2' fill='none' stroke='%230d7a55' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  --u-squig-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='8' viewBox='0 0 160 8'%3E%3Cpath d='M0 4.2Q20 1.9 40 4.2T80 4.2 120 4.2 160 4.2' fill='none' stroke='%230d7a55' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Dark mode: follows the visitor's system setting until they click the moon/sun, then remembers their choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121513;
    --ink: #eef0ec;
    --muted: #a9afb8;
    --line: #4fc493;
    --tint: #1d211f;
    --accent: #4fc493;
    --accent-tint: #173328;
    --audit-bg: #17201b;
    --accent-line: #2d6b52;
    --soft: #7d838d;
    --field: #3a3f44;
    --on-accent: #08140f;
    --error: #ff8a80;
    --c-emerald: #17614a; --c-emerald-t: #f1f5f2;
    --c-peach: #3b2822;   --c-peach-t: #f3e9e4;
    --c-blue: #232a47;    --c-blue-t: #e9ecff;
    --c-yellow: #3a321a;  --c-yellow-t: #f7efd6;
    --c-pink: #3d2331;    --c-pink-t: #f8e6ee;
    --c-ink: #2a2f38;     --c-ink-t: #f1f2f4;
    --c-mint: #1d3a2e;    --c-mint-t: #e3f4ec;
    --blob: #1f3d31; --sticker: #e2b23f; --doodle-1: #ff6b55; --doodle-2: #7d95ff;
    --u-calm: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='8' viewBox='0 0 160 8'%3E%3Cpath d='M0 4.2C18 3.6 34 4.6 54 4.1S92 3.5 112 4.3 146 4.5 160 4.2' fill='none' stroke='%234fc493' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E");
    --u-calm-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='8' viewBox='0 0 160 8'%3E%3Cpath d='M0 4.2C18 3.6 34 4.6 54 4.1S92 3.5 112 4.3 146 4.5 160 4.2' fill='none' stroke='%234fc493' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
    --u-squig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='8' viewBox='0 0 160 8'%3E%3Cpath d='M0 4.2Q20 1.9 40 4.2T80 4.2 120 4.2 160 4.2' fill='none' stroke='%234fc493' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E");
    --u-squig-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='8' viewBox='0 0 160 8'%3E%3Cpath d='M0 4.2Q20 1.9 40 4.2T80 4.2 120 4.2 160 4.2' fill='none' stroke='%234fc493' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
    --u-squig-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='8' viewBox='0 0 160 8'%3E%3Cpath d='M0 4.2Q20 1.9 40 4.2T80 4.2 120 4.2 160 4.2' fill='none' stroke='%234fc493' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121513;
  --ink: #eef0ec;
  --muted: #a9afb8;
  --line: #4fc493;
  --tint: #1d211f;
  --accent: #4fc493;
  --accent-tint: #173328;
  --audit-bg: #17201b;
  --accent-line: #2d6b52;
  --soft: #7d838d;
  --field: #3a3f44;
  --on-accent: #08140f;
  --error: #ff8a80;
  --c-emerald: #17614a; --c-emerald-t: #f1f5f2;
  --c-peach: #3b2822;   --c-peach-t: #f3e9e4;
  --c-blue: #232a47;  --c-blue-t: #e9ecff;
  --c-yellow: #3a321a;  --c-yellow-t: #f7efd6;
  --c-pink: #3d2331;  --c-pink-t: #f8e6ee;
  --c-ink: #2a2f38;   --c-ink-t: #f1f2f4;
  --c-mint: #1d3a2e;  --c-mint-t: #e3f4ec;
  --blob: #1f3d31; --sticker: #e2b23f; --doodle-1: #ff6b55; --doodle-2: #7d95ff;
  --u-calm: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='8' viewBox='0 0 160 8'%3E%3Cpath d='M0 4.2C18 3.6 34 4.6 54 4.1S92 3.5 112 4.3 146 4.5 160 4.2' fill='none' stroke='%234fc493' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E");
  --u-calm-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='8' viewBox='0 0 160 8'%3E%3Cpath d='M0 4.2C18 3.6 34 4.6 54 4.1S92 3.5 112 4.3 146 4.5 160 4.2' fill='none' stroke='%234fc493' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  --u-squig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='8' viewBox='0 0 160 8'%3E%3Cpath d='M0 4.2Q20 1.9 40 4.2T80 4.2 120 4.2 160 4.2' fill='none' stroke='%234fc493' stroke-width='1' stroke-linecap='round'/%3E%3C/svg%3E");
  --u-squig-b: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='8' viewBox='0 0 160 8'%3E%3Cpath d='M0 4.2Q20 1.9 40 4.2T80 4.2 120 4.2 160 4.2' fill='none' stroke='%234fc493' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E");
  --u-squig-i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='8' viewBox='0 0 160 8'%3E%3Cpath d='M0 4.2Q20 1.9 40 4.2T80 4.2 120 4.2 160 4.2' fill='none' stroke='%234fc493' stroke-width='1.2' stroke-linecap='round'/%3E%3C/svg%3E");
  color-scheme: dark;
}
:root { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 300 var(--fs-body)/1.6 var(--body); text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(var(--wide), 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap-wide { width: min(80rem, 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- ink lines ---------- */
.ink { display: block; width: 100%; height: 12px; overflow: visible; }
.ink path { fill: var(--line); stroke: none; }

/* ---------- links: ink underlines that squiggle on hover ---------- */
a { color: inherit; text-decoration: none;
  background: var(--u-calm) 0 100% / 160px 8px repeat-x; padding-bottom: 5px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
a:hover { background-image: var(--u-squig); color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  a:hover { animation: wiggle 9s linear infinite; }
  @keyframes wiggle { to { background-position: -160px 100%; } }
}
/* Bold links get a heavier line to match the bold text */
.wordmark, .work-title, .audit-link, .pager a, strong a, a strong, .prose h3 a { --u-calm: var(--u-calm-b); --u-squig: var(--u-squig-b); }
/* Links that only show their line on hover */
.site-header a, .work-item a, .pager a, .crumb a, .wordmark { background-size: 0 0; }
.site-header nav a:hover, .crumb a:hover, .wordmark:hover { background-size: 160px 8px; }

/* ---------- header ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 26px; }
.wordmark { font-weight: 700; }
.site-header nav { display: flex; gap: clamp(16px, 3vw, 32px); }
.site-header nav a { padding-block: 4px 6px; }
.site-header nav { align-items: center; }
.site-header nav a.say-hi { background: var(--ink); color: var(--paper); padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: var(--fs-small); line-height: 1.2; }
.site-header nav a.say-hi:hover { background: var(--accent); color: var(--on-accent); background-size: auto; animation: none; }
@media (max-width: 520px) { .site-header nav a.say-hi { display: none; } }
.theme-toggle { display: grid; place-items: center; width: 34px; height: 34px; margin: -6px -6px -6px 0; padding: 0;
  border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.theme-toggle { position: relative; }
.theme-toggle::after { content: ""; position: absolute; left: 7px; right: 7px; bottom: -3px; height: 8px;
  background: var(--u-squig-i) 0 100% / 160px 8px repeat-x; opacity: 0; transition: opacity .2s; }
.theme-toggle:hover { color: var(--accent); }
.theme-toggle:hover::after, .theme-toggle:focus-visible::after { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .theme-toggle:hover::after { animation: wiggle 9s linear infinite; }
}
.theme-toggle svg { width: 19px; height: 19px; grid-area: 1 / 1; }
.theme-toggle .sun { opacity: 0; transform: rotate(-90deg) scale(.6); }
:root[data-theme="dark"] .theme-toggle .moon { opacity: 0; transform: rotate(90deg) scale(.6); }
:root[data-theme="dark"] .theme-toggle .sun { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon { opacity: 0; transform: rotate(90deg) scale(.6); }
  :root:not([data-theme="light"]) .theme-toggle .sun { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .theme-toggle svg { transition: opacity .3s ease, transform .4s cubic-bezier(.3,.7,.2,1); }
  body { transition: background-color .3s ease, color .3s ease; }
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- hero: big playful headline + photo with doodles ---------- */
.hero { padding-top: clamp(32px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 88px); }
.hero h1, .nf-body h1 {
  font: 800 clamp(2.5rem, 5.2vw, 4rem)/1.03 var(--display);
  font-variation-settings: "opsz" 96;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.hero-cols { display: grid; gap: 48px clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 860px) { .hero-cols { grid-template-columns: 1.35fr 1fr; } }
.hero h1 { margin: 0; cursor: default; }
.hello .w { white-space: nowrap; }
.hero-text { min-width: 0; max-width: 34rem; margin-top: 26px; font-size: 1.125rem; }
.hero-text p { margin: 0 0 .8em; }

.chips { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 5px 14px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: .8125rem; font-weight: 700; }
.hero-art { position: relative; width: min(100%, 440px); justify-self: center; aspect-ratio: 1 / 1.05; }
.hero-art .blob { position: absolute; inset: 2% 6% 4% 2%; background: var(--blob); border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%; }
.hero-photo { position: absolute; inset: 9% 13% 11% 9%; width: 78%; height: 80%; object-fit: cover; object-position: 50% 40%; border-radius: 22px; transform: rotate(2deg); box-shadow: 0 18px 40px rgba(20,25,30,.14); }
.doodle { position: absolute; overflow: visible; }
.doodle.star { right: 0; top: 0; width: 22%; stroke: var(--doodle-1); }
.doodle.wave { left: -4%; bottom: 0; width: 44%; stroke: var(--doodle-2); }
.sticker { position: absolute; right: 2%; bottom: 13%; background: var(--sticker); color: #1d2129; padding: 7px 13px; border-radius: 10px; font: 700 .9375rem/1.2 var(--display); transform: rotate(-6deg); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
@media (prefers-reduced-motion: no-preference) {
  .doodle.star { animation: twinkle 5s ease-in-out infinite; transform-origin: 50% 50%; }
  @keyframes twinkle { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(14deg) scale(1.08); } }
  .sticker { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
  .hero-art:hover .sticker { transform: rotate(-2deg) scale(1.05); }
}

/* Clients: one row of names between two lines, drifting slowly to the left (pauses on hover) */
.clients { padding-block: 20px; border-block: 1.5px solid var(--ink);
  font: 500 1.0625rem/1.4 var(--display); color: var(--muted); }
.clients-view { overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.clients-track { display: flex; width: max-content; }
.clients ul { list-style: none; margin: 0; padding: 0 48px 0 0; display: flex; gap: 48px; white-space: nowrap; }
@media (prefers-reduced-motion: no-preference) {
  .clients-track { animation: drift 45s linear infinite; }
  .clients-view:hover .clients-track { animation-play-state: paused; }
  @keyframes drift { to { transform: translateX(-50%); } }
}
@media (prefers-reduced-motion: reduce) { .clients-view { overflow-x: auto; } .clients ul[aria-hidden] { display: none; } }

/* ---------- section headers: big and bold, stuck to the top while you scroll the section ---------- */
.section-h {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 3;
  margin: 0; padding-block: 16px 14px;
  background: var(--paper);
  font: 700 clamp(1.625rem, 2.6vw, 2rem)/1.2 var(--display);
  color: var(--ink);
  transition: color .45s ease;
}

/* ---------- work + made by me: colorful cards on a 3-column grid ---------- */
.work { padding-block: clamp(56px, 8vw, 96px) 0; display: grid; gap: clamp(16px, 2vw, 24px); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } .span-2 { grid-column: span 2; } .span-3 { grid-column: 1 / -1; } }
.card { min-width: 0; border-radius: 22px; }
.card-link { display: flex; flex-direction: column; gap: 16px; height: 100%; padding: clamp(22px, 2.4vw, 32px); border-radius: 22px;
  background: var(--card-bg); color: var(--card-t); background-image: none; text-decoration: none; }
a.card-link:hover { color: var(--card-t); background-image: none; animation: none; }
@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform .35s cubic-bezier(.2,.8,.2,1); }
  .card:hover { transform: translateY(-6px) rotate(-0.6deg); }
}
.c-emerald { --card-bg: var(--c-emerald); --card-t: var(--c-emerald-t); }
.c-peach { --card-bg: var(--c-peach); --card-t: var(--c-peach-t); }
.c-blue { --card-bg: var(--c-blue); --card-t: var(--c-blue-t); }
.c-yellow { --card-bg: var(--c-yellow); --card-t: var(--c-yellow-t); }
.c-pink { --card-bg: var(--c-pink); --card-t: var(--c-pink-t); }
.c-ink { --card-bg: var(--c-ink); --card-t: var(--c-ink-t); }
.c-mint { --card-bg: var(--c-mint); --card-t: var(--c-mint-t); }
/* Bold colors from the headline: the same in light and dark mode */
.c-gold { --card-bg: #f5c04a; --card-t: #1d2129; }
.c-red { --card-bg: #d23a22; --card-t: #ffffff; }
.c-royal { --card-bg: #1f45e0; --card-t: #ffffff; }
.c-magenta { --card-bg: #d4306b; --card-t: #ffffff; }
/* Card images with see-through backgrounds sit straight on the card color */
.card-img.cutout { border-radius: 0; overflow: visible; }
.card-img.cutout img { filter: drop-shadow(0 14px 22px rgba(0,0,0,.16)); }
.card-top { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.card-title { font: 700 1.5rem/1.15 var(--display); }
.span-2 .card-title, .span-3 .card-title { font-size: 1.75rem; }
.card-meta { font-size: .875rem; opacity: .85; }
.card-img { display: block; border-radius: 12px; overflow: hidden; }
.card-img img { width: 100%; height: auto; }
.tilt-l { transform: rotate(-1.5deg); } .tilt-r { transform: rotate(1.5deg); }
@media (prefers-reduced-motion: no-preference) {
  .card-img { transition: transform .45s cubic-bezier(.2,.8,.2,1); }
  .card:hover .card-img { transform: rotate(0) scale(1.015); }
}
.card-line { font-size: .9375rem; line-height: 1.5; }
.card .soon { color: inherit; opacity: .85; margin: 0; font-size: .875rem; }
.soon { margin: 6px 0 0; color: var(--muted); font-size: 0.875em; display: flex; align-items: baseline; gap: 8px; max-width: 30rem; }
.soon-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; transform: translateY(-1px); }
.soon-lg { font-size: 1em; }
@media (prefers-reduced-motion: no-preference) { .soon-dot { animation: soon-pulse 2.4s ease-in-out infinite; } }
@keyframes soon-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------- about ---------- */
.about { display: grid; gap: clamp(16px, 2vw, 24px) clamp(32px, 5vw, 72px); padding-block: clamp(72px, 10vw, 128px); align-items: start; }
.about .section-h { grid-column: 1 / -1; }
@media (min-width: 760px) { .about { grid-template-columns: 5fr 7fr; } }
.about-photo { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--tint); }
.about-text { max-width: var(--measure); min-width: 0; }
.about-text p { margin: 0 0 1em; }
.facts { margin: 2.2em 0 0; display: grid; gap: 18px; }
.facts > div { display: grid; gap: 2px; }
@media (min-width: 560px) { .facts > div { grid-template-columns: 8.5rem 1fr; gap: 24px; } }
.facts dt { color: var(--soft); }
.facts dd { margin: 0; min-width: 0; }
.fact-line { display: block; }
.fact-name, .fact-name a { color: var(--soft); }

/* ---------- footer: contact, laid out like About (content in the right column) ---------- */
.site-footer { padding-bottom: 104px; }
.contact { display: grid; gap: clamp(16px, 2vw, 24px); padding-top: clamp(24px, 4vw, 48px); }
.contact-cols { display: grid; gap: 0 clamp(32px, 5vw, 72px); }
@media (min-width: 760px) { .contact-cols { grid-template-columns: 5fr 7fr; } }
/* Hand-drawn arrow in the empty left column, pointing at the form */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.contact-body { min-width: 0; max-width: var(--measure); display: grid; gap: 28px; }
.contact { border-top: 1.5px solid var(--ink); padding-top: clamp(48px, 7vw, 80px); }
.contact-title { margin: 0 0 32px; font: 700 clamp(2rem, 3.6vw, 2.75rem)/1.1 var(--display); text-wrap: balance; }
@media (min-width: 760px) { .contact-title { position: sticky; top: 24px; align-self: start; } }
.contact-text p { margin: 0; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 28px; }

/* form: quiet underline fields, small muted labels */
.contact-form { display: grid; gap: 20px; min-width: 0; }
.field-row { display: grid; gap: 20px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field[hidden] { display: none; }
.field label { font-size: var(--fs-small); color: var(--muted); }
.field .opt { color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--tint);
  border: 1px solid transparent; border-radius: 8px; padding: 12px 14px;
  transition: border-color .2s, background-color .2s;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--field); }
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px;
  background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%235d6373' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 16px center / 12px 8px;
}
.field select option { color: #111; }
.field textarea { resize: vertical; min-height: 7rem; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); background-color: var(--paper); }
.hp { position: absolute; left: -9999px; }
.contact-form .btn { justify-self: start; cursor: pointer; font: inherit; font-weight: 700; margin-top: 4px; padding: 10px 24px; }
.form-status { margin: -10px 0 0; min-height: 1.6em; }
.form-status:empty { display: none; }
.form-status[data-kind="ok"] { color: var(--accent); font-weight: 700; }
.form-status[data-kind="error"] { color: var(--error); }

/* free audit: a plain note, no box */
.audit { padding-top: 8px; }
.audit h3 { font: 700 var(--fs-body)/1.4 var(--body); margin: 0 0 6px; color: var(--ink); }
.audit p { margin: 0 0 10px; }
.audit p:last-child { margin-bottom: 0; }
.audit-link { font-weight: 700; color: var(--accent); }
.foot-bar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 28px;
  margin-top: clamp(56px, 7vw, 88px); font-size: var(--fs-small); }
.copy { color: var(--muted); margin: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-block; padding: 10px 20px; border: 1.5px solid var(--ink); border-radius: 999px; font-weight: 700; background: none; color: var(--ink); }
.btn:hover { background: var(--ink); color: var(--paper); animation: none; }
.btn-solid { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-solid:hover { background: var(--ink); border-color: var(--ink); }
.btn:disabled { opacity: .6; cursor: progress; }
/* The letter that flies out of "Send message" when a message goes through */
.flying-letter { position: fixed; z-index: 20; color: var(--accent); pointer-events: none; animation: fly-off 1.6s ease-in-out forwards; }
.flying-letter svg { display: block; overflow: visible; }
/* A loop-de-loop: hops up, tumbles back on itself, then spins away up and to the right */
@keyframes fly-off {
  0%   { transform: translate(0, 0) rotate(0) scale(.5); opacity: 0; }
  10%  { transform: translate(-6px, -22px) rotate(-16deg) scale(1.1); opacity: 1; }
  26%  { transform: translate(46px, -78px) rotate(150deg) scale(1); }
  42%  { transform: translate(8px, -128px) rotate(320deg) scale(.95); }
  58%  { transform: translate(-18px, -96px) rotate(420deg) scale(.95); }
  76%  { transform: translate(120px, -170px) rotate(560deg) scale(.8); opacity: 1; }
  100% { transform: translate(320px, -280px) rotate(760deg) scale(.45); opacity: 0; }
}
.btn.just-sent { animation: send-pop .45s ease; }
@keyframes send-pop { 0% { transform: scale(1); } 35% { transform: scale(.94); } 100% { transform: scale(1); } }

/* ---------- case study: image-led, one column shared by text and images ---------- */
.case.wrap { width: min(60rem, 100% - 2 * var(--gutter)); padding-top: clamp(16px, 3vw, 40px); }
.case-head { display: grid; gap: 2px; margin-bottom: 20px; }
.case-head h1 { font: 700 clamp(1.75rem, 3vw, 2.25rem)/1.15 var(--display); margin: 0 0 6px; }
.case-meta { margin: 0; color: var(--soft); }
.cover { margin: 0 0 clamp(32px, 5vw, 56px); }
.cover img { width: 100%; border-radius: var(--radius); background: var(--tint); }
.lede p { margin: 0 0 1em; }
.case-links { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }

/* Case study headings stay body size: section names are light, sub-headings are bold. */
.prose h2 { font: 300 var(--fs-body)/1.6 var(--body); color: var(--soft); margin: 3em 0 .5em; }
.prose h3 { font: 700 var(--fs-body)/1.5 var(--body); margin: 1.8em 0 .4em; }
.prose h2 + h3 { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose li { margin-bottom: .45em; }
.prose blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 2px solid var(--line); }
.ink-hr { margin: 3em 0; }
.prose figure { margin: clamp(32px, 5vw, 56px) 0; }
.prose figure img, .prose figure video { display: block; width: 100%; height: auto; border-radius: var(--radius); background: var(--tint); }
.prose figure.pair { display: grid; gap: 16px; align-items: start; }
@media (min-width: 560px) { .prose figure.cols-2 { grid-template-columns: 1fr 1fr; } .prose figure.cols-3 { grid-template-columns: repeat(3, 1fr); } }
.prose figcaption { grid-column: 1 / -1; margin: 10px 0 0; color: var(--soft); font-size: var(--fs-small); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-block: clamp(64px, 9vw, 112px) clamp(24px, 4vw, 48px); }
.pager a { font-weight: 700; padding: 0; background-size: 0 0; }
.pager a:hover { animation: none; }
.pager-label { display: block; font-weight: 300; color: var(--soft); }
/* The wavy underline sits under the project name only, not the whole column */
.pager-title { padding-bottom: 6px; background: var(--u-calm) 0 100% / 0 8px repeat-x; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.pager a:hover .pager-title, .pager a:focus-visible .pager-title { background-image: var(--u-squig); background-size: 160px 8px; }
@media (prefers-reduced-motion: no-preference) { .pager a:hover .pager-title { animation: wiggle 9s linear infinite; } }
.pager .next { text-align: right; }

/* ---------- 404 ---------- */
.nf-body { padding-block: clamp(64px, 12vw, 160px); }
.nf-body h1 { margin: 0 0 16px; }

/* Case study footer row: back to work on the left, prev / next on the right */
.work-nav { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-block: clamp(64px, 9vw, 112px) clamp(24px, 4vw, 48px); }
.work-nav-pn { color: var(--soft); white-space: nowrap; }
.work-nav-pn > span { margin-inline: 4px; }

/* Floating scroll-to-top arrow */
.top-btn { position: fixed; right: clamp(16px, 3vw, 32px); bottom: clamp(16px, 3vw, 32px); z-index: 50; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; padding: 0; background: var(--accent); color: var(--paper); background-size: auto; text-decoration: none; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .25s, transform .25s, visibility 0s .25s, background-color .2s; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.top-btn.show { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .25s, visibility 0s, background-color .2s; }
.top-btn:hover, .top-btn:focus-visible { animation: none; color: var(--paper); background: var(--ink); }
.top-btn svg { width: 22px; height: 22px; }
.top-btn::after { content: attr(data-tip); position: absolute; right: calc(100% + 10px); top: 50%; transform: translate(4px, -50%); white-space: nowrap; font-size: var(--fs-small); line-height: 1; padding: 8px 10px; border-radius: 6px; background: var(--ink); color: var(--paper); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
.top-btn:hover::after, .top-btn:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
@media (prefers-reduced-motion: reduce) { .top-btn, .top-btn.show, .top-btn::after { transition: none; transform: none; } }
