/*
  /css/styles.css
  Shared styles for every page of the William Clements portfolio.

  Concept: the site is a camera monitor and an edit bay. Work is shown in
  "stills" (graded frames with slate info, like a frame grab from a shoot),
  vertical reels sit in film strips, and the interface stays quiet around them.

  Sections:
    1. Tokens          6. Stills (media frames)   11. Life page
    2. Base            7. Film strip              12. Contact page
    3. Top bar         8. Home page               13. Footer + next step
    4. Page header     9. Work page               14. Responsive
    5. Buttons/links  10. Services page           15. Reduced motion
*/

/* =========================================================
   1. TOKENS
   Dark by design: the site commits to one look, like a grading suite.
   ========================================================= */
:root {
  color-scheme: dark;

  --ink: #0c0c0b;          /* page background, warm near-black */
  --ink-2: #151513;        /* raised surfaces (form panel) */
  --black: #000;           /* film strip base, monitor bezel */
  --line: #2b2a26;         /* hairlines */
  --paper: #ede9e0;        /* primary text */
  --soft: #cfcabe;         /* body copy */
  --muted: #8f8a7f;        /* labels, secondary text */
  --accent: #e8a33d;       /* tungsten amber: links, active states */
  --rec: #e5484d;          /* record light only */

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1320px;
  --bar-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* =========================================================
   2. BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, iframe { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; font-weight: 400; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.label { font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.placeholder { color: var(--accent); font: 400 .82em var(--mono); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--paper); color: var(--ink); padding: 8px 12px; }

/* Film grain over everything: inline SVG noise, no extra request. */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 60; opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* =========================================================
   3. TOP BAR
   ========================================================= */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gutter) 14px;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar__name { font: 400 22px/1 var(--serif); text-decoration: none; white-space: nowrap; }
.bar nav { display: flex; gap: clamp(14px, 2.6vw, 34px); }
.bar nav a { font-size: 14px; text-decoration: none; color: var(--muted); padding-block: 6px; border-bottom: 1px solid transparent; }
.bar nav a:hover { color: var(--paper); }
.bar nav a[aria-current="page"] { color: var(--paper); border-bottom-color: var(--accent); }

/* =========================================================
   4. PAGE HEADER (inner pages)
   ========================================================= */
.page-head {
  padding-top: calc(var(--bar-h) + clamp(56px, 9vw, 120px));
  padding-bottom: clamp(40px, 6vw, 72px);
}
.page-head .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end; }
.page-head h1 { font: 400 clamp(56px, 9vw, 136px)/.9 var(--serif); margin: 10px 0 0; letter-spacing: -.015em; }
.page-head p { margin: 0; color: var(--soft); font-size: clamp(17px, 1.5vw, 20px); max-width: 48ch; }
/* Centered variant: title only, in the middle of the page */
.page-head--center .wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }

/* =========================================================
   5. BUTTONS AND LINKS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px; font: 600 15px var(--sans); text-decoration: none;
  border: 1px solid var(--paper); background: none; color: var(--paper); cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--solid { background: var(--paper); color: var(--ink); }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn--solid:hover { background: var(--accent); color: var(--ink); }
.btn--small { padding: 9px 14px; font-size: 13px; }
.link-arrow { font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.link-arrow:hover { color: var(--accent); }

/* =========================================================
   6. STILLS (media frames)
   A .still is any piece of media. With no photo yet it renders as a
   graded frame with slate text, so the layout reads as finished.
   To add a photo: put <img src="assets/img/..." alt="..."> inside it.
   Each frame can take its own grade: style="--tint: #hex".
   ========================================================= */
.still {
  --tint: #6b5a43;
  --ar: 16 / 9;
  position: relative; aspect-ratio: var(--ar); max-width: 100%;
  overflow: hidden; isolation: isolate;
  background:
    radial-gradient(120% 90% at 28% 22%, color-mix(in oklab, var(--tint) 60%, transparent), transparent 62%),
    radial-gradient(90% 80% at 85% 100%, color-mix(in oklab, var(--tint) 25%, transparent), transparent 70%),
    linear-gradient(160deg, color-mix(in oklab, var(--tint) 22%, var(--ink)), var(--black));
}
.still--v { --ar: 9 / 16; }
.still--4x5 { --ar: 4 / 5; }
.still--3x4 { --ar: 3 / 4; }
.still--4x3 { --ar: 4 / 3; }

.still img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; }
.still iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 5; }

/* Viewfinder corner marks, drawn with gradients */
.still::before {
  content: ""; position: absolute; inset: 12px; pointer-events: none; z-index: 1; opacity: .55;
  --c: color-mix(in srgb, var(--paper) 70%, transparent);
  background:
    linear-gradient(var(--c), var(--c)) top left / 16px 1px,
    linear-gradient(var(--c), var(--c)) top left / 1px 16px,
    linear-gradient(var(--c), var(--c)) top right / 16px 1px,
    linear-gradient(var(--c), var(--c)) top right / 1px 16px,
    linear-gradient(var(--c), var(--c)) bottom left / 16px 1px,
    linear-gradient(var(--c), var(--c)) bottom left / 1px 16px,
    linear-gradient(var(--c), var(--c)) bottom right / 16px 1px,
    linear-gradient(var(--c), var(--c)) bottom right / 1px 16px;
  background-repeat: no-repeat;
}
.still:has(img)::before { opacity: 0; }

/* Slate text: what the frame is */
.still__slate {
  position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 2;
  font: 500 10.5px/1.45 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 72%, transparent);
}
.still__slate b { font-weight: 500; color: var(--paper); display: block; }
.still__ar { position: absolute; top: 20px; right: 24px; z-index: 2; font: 500 10px var(--mono); color: color-mix(in srgb, var(--paper) 55%, transparent); }

/* Video frames: a play button covers the frame until clicked */
.play {
  position: absolute; inset: 0; z-index: 3; width: 100%;
  background: none; border: 0; cursor: pointer; color: var(--paper);
}
.play__icon {
  position: absolute; top: 50%; left: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px;
  border-radius: 50%; border: 1px solid var(--paper);
  background: color-mix(in srgb, var(--black) 35%, transparent);
  transition: transform .3s var(--ease), border-color .2s, background-color .2s;
}
.play__icon::after {
  content: ""; position: absolute; top: 50%; left: 50%; margin: -9px 0 0 -5px;
  border-style: solid; border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--paper);
}
.play:hover .play__icon, .play:focus-visible .play__icon { transform: scale(1.08); border-color: var(--accent); background-color: color-mix(in srgb, var(--accent) 18%, transparent); }
.still__open {
  position: absolute; top: 18px; left: 22px; z-index: 4;
  font: 500 10px var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 55%, transparent); text-decoration: none;
}
.still__open:hover { color: var(--accent); }
.still.is-playing .still__slate, .still.is-playing .still__ar, .still.is-playing::before { display: none; }

/* =========================================================
   7. FILM STRIP
   Vertical reels in a sideways-scrolling strip with sprocket holes.
   ========================================================= */
.strip, .contact-sheet {
  --hole: color-mix(in srgb, var(--paper) 16%, transparent);
  background-color: var(--black);
  background-image:
    repeating-linear-gradient(90deg, var(--hole) 0 10px, transparent 10px 24px),
    repeating-linear-gradient(90deg, var(--hole) 0 10px, transparent 10px 24px);
  background-size: 100% 8px, 100% 8px;
  background-position: 0 9px, 0 calc(100% - 9px);
  background-repeat: no-repeat;
}
.strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(160px, 21vw, 232px); gap: 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 26px 10px;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.strip > .still { scroll-snap-align: start; }
.strip-note { margin: 10px 0 0; }

/* =========================================================
   8. HOME PAGE
   ========================================================= */
.home-hero {
  padding-top: calc(var(--bar-h) + clamp(40px, 6vw, 80px));
  padding-bottom: clamp(36px, 5vw, 64px);
}
.home-hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 40px clamp(32px, 5vw, 80px); align-items: center; }
.home-hero h1 { font: 400 clamp(42px, 5.2vw, 80px)/1 var(--serif); margin: 14px 0 22px; letter-spacing: -.01em; }
.home-hero h1 em { color: var(--accent); }
.home-hero__lede { margin: 0 0 28px; color: var(--soft); max-width: 44ch; }
.home-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* The "monitor": a showreel frame with a live REC readout */
.monitor { border: 1px solid var(--line); padding: 10px; background: var(--black); min-width: 0; }
.monitor__hud {
  display: flex; justify-content: space-between; gap: 12px; padding: 2px 4px 10px;
  font: 500 11px var(--mono); letter-spacing: .06em; color: var(--muted);
}
.monitor__hud--foot { padding: 10px 4px 2px; }
.rec { color: var(--paper); display: inline-flex; align-items: center; gap: 8px; }
.rec::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rec); animation: blink 1.2s steps(1) infinite; }
.timecode { font-variant-numeric: tabular-nums; color: var(--paper); }
@keyframes blink { 50% { opacity: .2; } }

/* Chapter index: the opening guide */
.chapters-wrap { padding-bottom: 8px; }
.chapters { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.chapters a {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 300px) 32px; align-items: center; gap: 6px 24px;
  padding: clamp(14px, 2vw, 22px) 0; border-bottom: 1px solid var(--line); text-decoration: none;
}
.chapters .num { font: 500 12px var(--mono); color: var(--muted); }
.chapters .title { font: 400 clamp(46px, 6.6vw, 104px)/.95 var(--serif); letter-spacing: -.01em; transition: transform .5s var(--ease), color .25s; }
.chapters .desc { color: var(--muted); font-size: 15px; }
.chapters .go { font-size: 24px; color: var(--muted); transition: transform .4s var(--ease), color .25s; }
.chapters a:hover .title, .chapters a:focus-visible .title { transform: translateX(14px); color: var(--accent); }
.chapters a:hover .go, .chapters a:focus-visible .go { transform: translateX(6px); color: var(--accent); }

.credits {
  display: flex; flex-wrap: wrap; gap: 10px 32px; padding-block: 28px 64px;
  font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.credits b { color: var(--paper); font-weight: 500; }

/* =========================================================
   8b. FRONT PAGE MENU
   Four links, centered in the screen, nothing else.
   ========================================================= */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.menu {
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  padding: 32px var(--gutter);
}
.menu__list { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(4px, 1.2vh, 14px); text-align: center; }
.menu__list a {
  display: inline-block; text-decoration: none;
  font: 400 clamp(50px, 14vw, 120px)/1.02 var(--serif); letter-spacing: -.01em;
  color: var(--paper); transition: color .25s, font-style .25s;
}
/* Hovering one link dims the others, so the choice stands out */
.menu__list:hover a, .menu__list:focus-within a { color: var(--muted); }
.menu__list a:hover, .menu__list a:focus-visible { color: var(--accent); font-style: italic; }

/* =========================================================
   9. WORK PAGE
   Trusted-by logos, jump links, then one section per type of work.
   ========================================================= */
.trusted { padding-bottom: clamp(40px, 6vw, 72px); display: grid; gap: 18px; }
/* Logo marquee: two identical lists side by side slide left by exactly one
   list's width, then restart, so the loop has no visible jump. */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line); padding: 22px 0;
  /* soft fade at both edges */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.logos { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; flex-shrink: 0; }
.logos li { padding-inline: clamp(28px, 4vw, 56px); }
.logos li { display: flex; align-items: center; min-height: 54px; }
.logos a { display: flex; align-items: center; text-decoration: none; }
/* Logos are shown in one tone so mixed brand colors read as a set */
/* Logo files are pre-toned to the site's off-white, so mixed brand colors read as one set */
.logos img { width: auto; max-width: 100%; opacity: .7; transition: opacity .2s; }
.logos a:hover img, .logos a:focus-visible img { opacity: 1; }
.logos li.has-img span { display: none; }
.logos span { font: 600 clamp(14px, 1.3vw, 17px)/1 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

.type-nav {
  position: sticky; top: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); z-index: 40;
  background: var(--ink); border-block: 1px solid var(--line);
}
.type-nav .wrap { display: flex; gap: 8px 28px; flex-wrap: wrap; padding-block: 14px; }
.type-nav a { font-size: 15px; color: var(--muted); text-decoration: none; }
.type-nav a:hover { color: var(--accent); }

.worktype { padding-top: clamp(72px, 9vw, 120px); scroll-margin-top: calc(var(--bar-h) + 56px); display: grid; gap: 28px; }
.worktype__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 56px; align-items: end; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.worktype__head h2 { font: 400 clamp(42px, 5.5vw, 80px)/.95 var(--serif); margin: 0; }
.worktype__head p:last-child { margin: 0; color: var(--soft); max-width: 50ch; }
.worktype__more { margin: 0; color: var(--soft); }

/* A piece = one photo or video + a one-line caption */
.piece { margin: 0; display: grid; gap: 10px; break-inside: avoid; }
.piece figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; }
.piece figcaption .label { text-align: right; }
.piece__img { position: relative; overflow: hidden; background: var(--ink-2); max-width: 100%; }
.piece__img img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .6s var(--ease); }
.piece__img:hover img { transform: scale(1.03); }
.piece__img.is-missing img, .gphoto.is-missing img { visibility: hidden; }
.gphoto.is-missing { position: relative; }
.piece__img.is-missing::after, .gphoto.is-missing::after {
  content: "Photo loads on the live site"; position: absolute; inset: 0; display: grid; place-items: center;
  font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}

.masonry { columns: 3 280px; column-gap: 16px; }
.masonry .piece { margin-bottom: 26px; }

.result-card { display: grid; gap: 10px; padding: clamp(28px, 4vw, 56px) 0; }
.result-card__num { margin: 0; font: 400 clamp(64px, 11vw, 168px)/.9 var(--serif); color: var(--accent); font-variant-numeric: tabular-nums; }
.result-card__what { margin: 0; font-size: clamp(18px, 1.6vw, 22px); color: var(--soft); max-width: 46ch; }

/* Process map: each step is a frame on a strip of film, scrolling sideways */
.process-map__head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.subhead { font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 8px 0 0; }
.process-map { display: grid; gap: 14px; }
.pstrip {
  --hole: color-mix(in srgb, var(--paper) 16%, transparent);
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 28px 10px; background-color: var(--black);
  background-image:
    repeating-linear-gradient(90deg, var(--hole) 0 10px, transparent 10px 24px),
    repeating-linear-gradient(90deg, var(--hole) 0 10px, transparent 10px 24px);
  background-size: 100% 8px, 100% 8px; background-position: 0 10px, 0 calc(100% - 10px); background-repeat: no-repeat;
  background-attachment: local;   /* sprockets scroll with the frames */
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.pstrip ol { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(250px, 23vw, 290px); gap: 10px; }
.pframe {
  scroll-snap-align: start; display: flex; flex-direction: column; gap: 10px;
  padding: 22px 20px 20px; min-height: 260px; background: var(--ink-2); border: 1px solid var(--line);
}
.pframe h4 { margin: 0; font: 400 32px/1.05 var(--serif); }
.pframe > p { margin: 0; color: var(--soft); font-size: 15px; }
.pframe .pframe__deliv { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 4px; color: var(--paper); font-size: 15px; }
.pframe__deliv .label { color: var(--accent); }
.loopback {
  margin: 0; padding: 10px 14px; display: flex; align-items: center; gap: 10px;
  border: 1px dashed var(--line); border-top: 0; color: var(--muted); font-size: 14px;
}
.loopback span { color: var(--accent); font-size: 20px; line-height: 1; }
.shared { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 8px 32px; align-items: baseline; padding: 22px 0 6px; }
.shared p { margin: 0; }
.shared p:last-child { color: var(--soft); max-width: 62ch; }
@media (max-width: 860px) { .shared { grid-template-columns: minmax(0, 1fr); } }
.process-map + .subhead { margin-top: 32px; }

/* Video strip: every video side by side at one height, widths follow each video's shape */
.vstrip {
  --hole: color-mix(in srgb, var(--paper) 16%, transparent);
  overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
  padding: 30px 12px 22px; background-color: var(--black);
  background-image:
    repeating-linear-gradient(90deg, var(--hole) 0 10px, transparent 10px 24px),
    repeating-linear-gradient(90deg, var(--hole) 0 10px, transparent 10px 24px);
  background-size: 100% 8px, 100% 8px; background-position: 0 10px, 0 calc(100% - 10px); background-repeat: no-repeat;
  background-attachment: local;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.vstrip__row { display: flex; gap: 12px; width: max-content; }
.vstrip { --h: clamp(300px, 42vw, 440px); }   /* one shared height for every video */
.vstrip__item { flex: none; scroll-snap-align: start; padding-bottom: 14px; width: calc(var(--h) * 16 / 9); }
.vstrip__item:has(.still--v) { width: calc(var(--h) * 9 / 16); }
.vstrip__item .still { height: var(--h); width: 100%; }
.vstrip__item figcaption { flex-direction: column; gap: 2px; max-width: 100%; }
.vstrip__item figcaption .label { text-align: left; }

/* Photography: tight uniform grid; every photo is a button that opens the viewer */
.photo-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.gphoto { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: var(--ink-2); cursor: zoom-in; overflow: hidden; }
.gphoto img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), opacity .3s; }
.gphoto:hover img, .gphoto:focus-visible img { transform: scale(1.05); }
.photo-grid:hover .gphoto img { opacity: .6; }
.photo-grid .gphoto:hover img { opacity: 1; }

/* Paid social tactics */
.tactics { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.tactics li { padding: 24px 24px 8px 0; display: grid; gap: 10px; align-content: start; }
.tactics li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.tactics h3, .pillars h3, .skill-row h3 { margin: 0; font: 400 28px/1.1 var(--serif); }
.tactics p, .pillars p, .skill-row p { margin: 0; color: var(--soft); font-size: 15px; }

/* SEM */
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px clamp(32px, 5vw, 80px); align-items: start; }
.split__lead { display: grid; gap: 12px; }
.split .result-card__num { font-size: clamp(56px, 7vw, 108px); white-space: nowrap; }
.accounts { margin: 16px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.accounts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.accounts dt { font-weight: 600; }
.accounts dd { margin: 0; color: var(--muted); text-align: right; }
.pillars { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.pillars li { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 8px 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }

/* SEO */
.skill-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.skill-row li { padding: 22px 20px 8px 0; display: grid; gap: 10px; align-content: start; }
.skill-row li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.skill-row h3 { font-size: 24px; }
.clients-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.clients-2 + .skill-row { margin-top: 16px; }
.clients-2 article { display: grid; gap: 18px; align-content: start; padding: clamp(22px, 3vw, 36px); background: var(--ink-2); border: 1px solid var(--line); }
.clients-2__logo { width: auto; opacity: .85; }
.clients-2 p { margin: 0; color: var(--soft); }
/* Big result numbers in each SEO client panel */
.big-stats { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.big-stats div { padding: 16px 14px 16px 0; display: grid; gap: 6px; align-content: start; }
.big-stats div + div { padding-left: 14px; border-left: 1px solid var(--line); }
.big-stats dt { font: 400 clamp(28px, 3.2vw, 44px)/1 var(--serif); color: var(--accent); font-variant-numeric: tabular-nums; }
.big-stats dd { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--soft); }
@media (max-width: 480px) {
  .big-stats { grid-template-columns: minmax(0, 1fr); }
  .big-stats div, .big-stats div + div { padding: 12px 0; border-left: 0; }
  .big-stats div + div { border-top: 1px solid var(--line); }
}

/* SEM trend chart: four small multiples on one shared scale, hover/focus for the story */
.ads-chart { --good: #5fd08a; margin-top: 44px; padding: clamp(20px, 3vw, 32px); background: var(--ink-2); border: 1px solid var(--line); display: grid; gap: 18px; position: relative; }
.ads-chart__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; }
.ads-chart__head .label { margin: 0 0 6px; }
.ads-chart__spend { margin: 0; color: var(--muted); font-size: 15px; }
.ads-chart__spend span { color: var(--paper); font-weight: 600; }
.ads-chart__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.trend { margin: 0; padding: 16px 16px 10px; background: var(--ink); border: 1px solid var(--line); display: grid; gap: 10px; cursor: crosshair; outline: none; transition: opacity .2s, border-color .2s; }
.trend figcaption { display: grid; gap: 4px; }
.trend__total { font: 400 clamp(28px, 2.8vw, 38px)/1 var(--serif); color: var(--paper); font-variant-numeric: tabular-nums; }
.trend__chip { justify-self: start; font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.trend--up .trend__chip, .trend--down-good .trend__chip { color: var(--good); }
.trend__svg { width: 100%; height: 88px; overflow: visible; }
.trend__base { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.trend__line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; transition: stroke-width .2s; }
.trend__area { fill: color-mix(in srgb, var(--accent) 12%, transparent); stroke: none; }
.trend__end { fill: var(--accent); stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; }
.ads-chart__grid:hover .trend:not(:hover) { opacity: .45; }
.trend:hover, .trend:focus-visible { border-color: var(--accent); }
.trend:hover .trend__line, .trend:focus-visible .trend__line { stroke-width: 3; }
.ads-chart__axis { display: flex; justify-content: space-between; font: 500 10.5px var(--mono); letter-spacing: .06em; color: var(--muted); margin-top: -6px; }
.ads-chart__tip {
  position: absolute; z-index: 5; width: min(280px, 80%); pointer-events: none;
  padding: 14px 16px; background: var(--ink); border: 1px solid var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-size: 14px; color: var(--soft);
}
.ads-chart__tip b { display: block; color: var(--paper); font-size: 15px; margin-bottom: 2px; }
.ads-chart__tip .tip-total { display: block; font: 400 26px/1.1 var(--serif); color: var(--paper); margin-bottom: 6px; }
.ads-chart__tip .tip-chip { display: block; color: var(--good); font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
@media (max-width: 860px) { .ads-chart__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .ads-chart__grid { grid-template-columns: minmax(0, 1fr); } }

.case-dialog { width: min(820px, 94vw); max-height: 90vh; overflow-y: auto; padding: clamp(24px, 4vw, 44px); background: var(--ink-2); color: var(--paper); border: 1px solid var(--line); }
.case-dialog::backdrop { background: rgba(0, 0, 0, .85); }
.case-dialog h3 { margin: 8px 0 14px; font: 400 clamp(30px, 4vw, 46px)/1.05 var(--serif); }
.case-dialog > p { margin: 0 0 16px; color: var(--soft); }
.case-dialog strong { color: var(--accent); font-weight: 600; }
.case-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 22px 0; background: var(--line); border: 1px solid var(--line); }
.case-stats div { background: var(--ink); padding: 16px 18px; display: grid; gap: 4px; }
.case-stats dt { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.case-stats dd { margin: 0; font: 400 clamp(26px, 3vw, 36px)/1 var(--serif); color: var(--paper); font-variant-numeric: tabular-nums; }
.case-note { font-size: 14px; color: var(--muted) !important; }
.case-img { width: 100%; height: auto; margin: 6px 0 12px; border: 1px solid var(--line); background: #fff; }
.case-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
@media (max-width: 560px) { .case-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Photo viewer: image centered, title and description beside it */
.viewer { border: 0; padding: 0; background: transparent; color: var(--paper); max-width: min(1200px, 94vw); max-height: 92vh; overflow: visible; }
.viewer::backdrop { background: rgba(0, 0, 0, .9); }
.viewer__inner { display: grid; grid-template-columns: minmax(0, auto) minmax(220px, 300px); gap: 28px; align-items: center; }
.viewer__img { max-width: 100%; max-height: 86vh; width: auto; height: auto; justify-self: center; }
.viewer__info { display: grid; gap: 10px; align-content: center; }
.viewer__client { margin: 0; color: var(--accent); }
.viewer__title { margin: 0; font: 400 40px/1.05 var(--serif); }
.viewer__desc { margin: 0 0 8px; color: var(--soft); }
.viewer__close { justify-self: start; }

/* =========================================================
   10. SERVICES PAGE
   ========================================================= */
.services { border-top: 1px solid var(--line); }
.service {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px clamp(32px, 5vw, 80px);
  padding-block: clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--line); align-items: center;
}
.service:nth-child(even) .service__media { order: 2; }
.service h2 { font: 400 clamp(38px, 4.4vw, 60px)/1 var(--serif); margin: 0 0 16px; }
.service p { margin: 0 0 22px; color: var(--soft); max-width: 52ch; }
.service ul { margin: 0 0 26px; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.service li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.service__proof { margin-bottom: 10px; }
.service__proof b { color: var(--accent); font-weight: 500; }

.process { padding-block: clamp(72px, 10vw, 128px) 48px; }
.process h2 { font: 400 clamp(36px, 4vw, 56px)/1 var(--serif); margin: 0 0 40px; }
.process ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.process li { padding: 22px 20px 0 0; display: grid; gap: 8px; align-content: start; }
.process li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.process .label { color: var(--accent); }
.process strong { font: 400 30px/1.1 var(--serif); }
.process li > span:last-child { color: var(--soft); font-size: 15px; }

.cta-band { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: clamp(72px, 10vw, 128px); }

/* =========================================================
   10b. SERVICES AT A GLANCE + DETAIL POP-UP
   ========================================================= */
.svc-picker { padding-bottom: clamp(56px, 8vw, 96px); }
.svc-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.svc-tile {
  width: 100%; height: 100%; min-height: 300px; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 14px; padding: 28px 24px;
  background: var(--ink-2); color: var(--paper); border: 1px solid var(--line);
  font: inherit; transition: border-color .2s, transform .25s var(--ease);
}
.svc-tile:hover, .svc-tile:focus-visible { border-color: var(--accent); transform: translateY(-4px); }
.svc-tile { min-height: 260px; }
.svc-tile--lead { border-color: var(--accent); }
.svc-tile--link { text-decoration: none; min-height: 220px; }
.service { scroll-margin-top: calc(var(--bar-h) + 16px); }   /* tile jumps land below the fixed top bar */   /* Work page tiles are links that jump down the page */
.svc-picker + .wrap .worktype:first-child { padding-top: clamp(32px, 5vw, 64px); }   /* the flagship service gets the accent outline */
.svc-tile__icon svg { width: 52px; height: 52px; fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.svc-tile__name { font: 400 clamp(24px, 2.1vw, 30px)/1.05 var(--serif); }
.svc-tile__line { color: var(--soft); font-size: 15px; }
.svc-tile__more { margin-top: auto; font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

.svc-dialog {
  width: min(720px, 92vw); max-height: 88vh; overflow-y: auto; padding: clamp(24px, 4vw, 44px);
  background: var(--ink-2); color: var(--paper); border: 1px solid var(--line);
}
.svc-dialog::backdrop { background: rgba(0, 0, 0, .85); }
.svc-dialog__body h2 { font: 400 clamp(32px, 4vw, 48px)/1.05 var(--serif); margin: 0 0 16px; }
.svc-dialog__body p { color: var(--soft); margin: 0 0 18px; }
.svc-dialog__body ul { margin: 0 0 22px; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.svc-dialog__body li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.svc-dialog__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

@media (max-width: 760px) { .svc-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) {
  .svc-tiles { grid-template-columns: minmax(0, 1fr); }
  .svc-tile { min-height: 0; }
  .svc-dialog__body ul { grid-template-columns: 1fr; }
}

/* =========================================================
   11. LIFE PAGE
   ========================================================= */
.life { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 40px clamp(40px, 6vw, 96px); align-items: start; }
.life__story p { font-size: 19px; margin: 0 0 20px; color: var(--soft); max-width: 58ch; }
.life__story .pull { font: 400 clamp(30px, 3.2vw, 44px)/1.15 var(--serif); color: var(--paper); margin-bottom: 32px; }
.life__portrait { position: sticky; top: calc(var(--bar-h) + 32px); }

.timeline { list-style: none; margin: 56px 0 0; padding: 0; border-top: 1px solid var(--line); }
.timeline li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.timeline li span:last-child { font-size: 17px; }

.sheet-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 8px 16px; margin: clamp(80px, 10vw, 128px) 0 16px; }
.sheet-head h2 { font: 400 clamp(36px, 4vw, 56px)/1 var(--serif); margin: 0; }
.contact-sheet {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px;
  padding: 30px 10px; margin-bottom: clamp(72px, 10vw, 128px);
}

/* =========================================================
   12. CONTACT PAGE
   ========================================================= */
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px clamp(40px, 6vw, 96px); align-items: start; }

.lead { display: grid; gap: 20px; padding: clamp(24px, 3vw, 40px); background: var(--ink-2); border: 1px solid var(--line); }
.lead__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.lead h2 { font: 400 32px/1.1 var(--serif); margin: 0; }
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field textarea {
  font: 400 17px/1.5 var(--sans); color: var(--paper);
  background: var(--ink); border: 1px solid var(--line); border-radius: 0;
  padding: 14px 16px; width: 100%;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.hp { position: absolute; left: -9999px; }   /* honeypot: hidden from people, filled by spam bots */
.lead .btn { justify-self: start; }
.lead .btn:disabled { opacity: .6; cursor: wait; }
.form-status { min-height: 1.6em; margin: 0; color: var(--muted); font-size: 15px; }
.form-status.is-ok { color: var(--accent); }

.expect { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.expect li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.expect li span:last-child { color: var(--soft); }

.direct { padding-block: clamp(64px, 9vw, 112px); margin-top: clamp(64px, 9vw, 112px); border-top: 1px solid var(--line); }
.direct p { margin: 0 0 10px; color: var(--muted); font-size: 19px; }
.direct__row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-bottom: 36px; }
.direct .email { font: 400 clamp(34px, 6.4vw, 104px)/1 var(--serif); text-decoration: none; overflow-wrap: anywhere; }
.direct .email:hover { color: var(--accent); }
.socials { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.socials a { color: var(--muted); text-decoration: none; }
.socials a:hover { color: var(--paper); }

/* =========================================================
   13. FOOTER AND NEXT STEP
   ========================================================= */
.next-step { border-top: 1px solid var(--line); padding-block: clamp(56px, 8vw, 96px); }
.next-step a { display: inline-block; font: 400 clamp(34px, 5vw, 72px)/1 var(--serif); text-decoration: none; margin-top: 12px; transition: color .2s; }
.next-step a:hover { color: var(--accent); }

footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 24px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line);
}
footer a { text-decoration: none; }
footer a:hover { color: var(--paper); }

/* =========================================================
   14. RESPONSIVE
   ========================================================= */
@media (max-width: 1000px) {
  .process ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process li, .process li + li { padding: 20px 16px 20px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .chapters a { grid-template-columns: 48px minmax(0, 1fr) 28px; }
  .chapters .desc { grid-column: 2; grid-row: 2; }
  .chapters .go { grid-column: 3; grid-row: 1; }
}
@media (max-width: 860px) {
  :root { --bar-h: 56px; }
  .home-hero .wrap, .page-head .wrap, .service, .life, .contact-layout { grid-template-columns: minmax(0, 1fr); }
  .service:nth-child(even) .service__media { order: 0; }
  .life__portrait { position: static; max-width: 420px; }
  .contact-sheet { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .worktype__head { grid-template-columns: minmax(0, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tactics, .skill-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tactics li, .tactics li + li, .skill-row li, .skill-row li + li { padding: 20px 16px 20px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .split, .clients-2 { grid-template-columns: minmax(0, 1fr); }
  .pillars li { grid-template-columns: minmax(0, 1fr); }
  .viewer__inner { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .viewer__img { max-height: 60vh; }
  .viewer { max-height: 94vh; overflow-y: auto; }
    .bar__name { font-size: 18px; }
  .bar nav { gap: 12px; }
  .bar nav a { font-size: 13px; }
}
@media (max-width: 480px) {
  .service ul, .process ol { grid-template-columns: 1fr; }
      .masonry { columns: 2; column-gap: 10px; }
  .tactics, .skill-row { grid-template-columns: minmax(0, 1fr); }
  .viewer__title { font-size: 30px; }
  .piece figcaption { flex-direction: column; gap: 2px; }
  .piece figcaption .label { text-align: left; }
  .chapters a { grid-template-columns: 30px minmax(0, 1fr) 20px; gap: 6px 10px; }
  .timeline li, .expect li { grid-template-columns: 84px minmax(0, 1fr); }
  .still__slate { left: 16px; right: 16px; bottom: 14px; font-size: 9.5px; }
}

/* =========================================================
   15. REDUCED MOTION
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__track { width: auto; }
  .marquee .logos { flex-wrap: wrap; row-gap: 16px; }
  .marquee .logos[aria-hidden] { display: none; }
}
