/* =========================================================
   Amir Mohsen — Portfolio
   Tokens · Base · Components · Sections
   ========================================================= */

:root {
  --paper: #F4EFE6;
  --paper-2: #EAE2D4;
  --oak: #C49A6C;
  --walnut: #3A2A1F;
  --ink: #1B1A17;
  --green: #1F7A4D;
  --green-lite: #CFE6D6;

  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: clamp(16px, 3vw, 48px);
  --max: 1600px;
  --nav-h: 76px;
  --ease: cubic-bezier(.16, 1, .3, 1);

  /* Semantic surface tokens: light by default, swapped for dark mode below */
  --surface: var(--paper);
  --surface-2: var(--paper-2);
  --on-surface: var(--ink);
  --tag-bg: var(--green-lite);
  --tag-fg: var(--green);
  --accent-text: var(--green);
  color-scheme: light;

  --bg: var(--surface);
  --fg: var(--on-surface);
}

/* Dark appearance: follows the system unless the visitor picked one (data-mode on <html>) */
@media (prefers-color-scheme: dark) {
  :root:not([data-mode="light"]) {
    --surface: #15120F; --surface-2: #221C17; --on-surface: #EEE7DB;
    --tag-bg: rgba(92, 207, 143, .14); --tag-fg: #7FE0AA; --accent-text: #4CC384;
    color-scheme: dark;
  }
}
:root[data-mode="dark"] {
  --surface: #15120F; --surface-2: #221C17; --on-surface: #EEE7DB;
  --tag-bg: rgba(92, 207, 143, .14); --tag-fg: #7FE0AA; --accent-text: #4CC384;
  color-scheme: dark;
}

/* Theme scopes. Line + muted colors are recomputed wherever --fg changes. */
body,
[data-bg] {
  --line: color-mix(in srgb, var(--fg) 16%, transparent);
  --muted: color-mix(in srgb, var(--fg) 64%, transparent);
  color: var(--fg);
}
[data-bg="paper"]  { --bg: var(--surface); --fg: var(--on-surface); background: var(--bg); }
[data-bg="walnut"] { --bg: var(--walnut); --fg: var(--paper); background: var(--bg); }
[data-bg="green"]  { --bg: var(--green);  --fg: var(--paper); background: var(--bg); }

/* With motion on, the body owns the background and eases between themes. */
.js:not(.no-motion) [data-bg] { --bg: inherit; --fg: inherit; background: transparent; }
/* Short bands (data-solid) and the footer paint their own color instead of driving the page theme */
.js:not(.no-motion) .footer[data-bg],
.js:not(.no-motion) [data-bg="walnut"][data-solid] { --bg: var(--walnut); --fg: var(--paper); background: var(--bg); }
.js:not(.no-motion) [data-bg="green"][data-solid] { --bg: var(--green); --fg: var(--paper); background: var(--bg); }

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  font-family: var(--sans);
  font-size: clamp(17px, 1.15vw, 20px);
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
::selection { background: var(--green); color: var(--paper); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 4px; border-radius: 4px; }
.contact :focus-visible { outline-color: var(--paper); }

.skip {
  position: fixed; top: 12px; left: 12px; z-index: 10001;
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  transform: translateY(-160%); transition: transform .3s var(--ease);
}
.skip:focus { transform: none; }

/* Pixel cursor: cream arrow everywhere, green arrow on anything clickable */
html { cursor: url("assets/cursors/pixel-arrow.svg") 1 1, auto; }
a, button, [role="button"], label, summary {
  cursor: url("assets/cursors/pixel-arrow-green.svg") 1 1, pointer;
}

/* Film grain (static, very light) */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .05;
}

/* ---------- Atoms ---------- */
.dot {
  display: inline-block; width: .5em; height: .5em; border-radius: 50%;
  background: var(--green); vertical-align: .08em; flex: none;
}
.dot--paper { background: var(--paper); }

.eyebrow {
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .dot { width: 8px; height: 8px; margin-right: 10px; vertical-align: 1px; }

.h2 {
  font-family: var(--sans); font-weight: 500;
  font-size: clamp(40px, 6vw, 104px); line-height: .95; letter-spacing: -.035em;
}
.h2 em { letter-spacing: -.02em; }

.muted { color: var(--muted); }
/* Location: pin icon + cities */
.loc { display: inline-flex; align-items: center; gap: 6px; }
.loc .pin { width: 1.15em; height: 1.15em; flex: none; color: var(--accent-text); }
.footer .loc { margin-top: 6px; color: var(--muted); font-size: 14px; }
.footer .loc .pin { color: #7FE0AA; }

.link { transition: opacity .3s; }
.link:hover { opacity: .6; }

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 500; font-size: 16px; white-space: nowrap;
  transition: background-color .3s, color .3s, border-color .3s;
}
.btn .dot { width: 9px; height: 9px; vertical-align: 0; }
.btn--green { background: var(--green); color: var(--paper); }
.btn--green:hover { background: var(--on-surface); color: var(--surface); }
.btn--ghost { border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--fg); }
.btn--paper { background: var(--paper); color: var(--green); }
.btn--paper:hover { background: var(--ink); color: var(--paper); }
.btn--line { border: 1px solid color-mix(in srgb, var(--fg) 45%, transparent); }
.btn--line:hover { background: color-mix(in srgb, var(--fg) 12%, transparent); }

.mask { display: inline-block; overflow: hidden; padding: .06em .08em .14em; margin: -.06em -.08em -.14em; }
.mask__in { display: inline-block; }

/* ---------- Logos ---------- */
/* Monochrome brand marks (Simple Icons), tinted to the current text color */
.logo {
  display: inline-block; width: 1.25em; height: 1.25em; flex: none;
  background: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat;
          mask: var(--src) center / contain no-repeat;
}
.logo-mono {
  display: inline-grid; place-items: center; width: 1.25em; height: 1.25em; flex: none;
  border: 1px solid currentColor; border-radius: 6px;
  font-family: var(--mono); font-style: normal; font-size: .72em; line-height: 1;
}
.wordmark { font-family: var(--sans); font-weight: 600; letter-spacing: -.03em; white-space: nowrap; }
/* Official Money Fellows logo (assets/logos): blue on light surfaces, white in dark mode and on dark bands */
.mf-logo { display: inline-flex; align-items: center; }
.mf-logo img { display: block; height: 1em; width: auto; }
.mf-logo__white { display: none !important; }
:root[data-mode="dark"] .mf-logo__blue,
[data-bg="walnut"] .mf-logo__blue, [data-bg="green"] .mf-logo__blue { display: none !important; }
:root[data-mode="dark"] .mf-logo__white,
[data-bg="walnut"] .mf-logo__white, [data-bg="green"] .mf-logo__white { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-mode]) .mf-logo__blue { display: none !important; }
  :root:not([data-mode]) .mf-logo__white { display: block !important; }
}
/* In the "Experience at" row the logo is monochrome like its neighbours: the official file used as a mask */
.clients__list .mf-logo {
  height: .78em; aspect-ratio: 2000 / 192; background: currentColor;
  -webkit-mask: url("assets/logos/money-fellows-horizontal-white.webp") center / contain no-repeat;
          mask: url("assets/logos/money-fellows-horizontal-white.webp") center / contain no-repeat;
}
.clients__list .mf-logo img { display: none !important; }
.cs-meta .mf-logo { font-size: 20px; margin-top: 4px; }

/* ---------- Progress ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 9600;
  background: var(--green); transform-origin: 0 50%; transform: scaleX(0);
}
body[data-theme="green"] .progress { background: var(--paper); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  height: var(--nav-h); padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  color: var(--fg);
  transition: transform .5s var(--ease);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__logo { font-weight: 600; letter-spacing: -.01em; font-size: 17px; white-space: nowrap; }
.nav__logo .dot { width: 7px; height: 7px; margin-left: 3px; vertical-align: 0; }
.nav__links { display: flex; gap: 36px; font-size: 15px; }
.nav__cta {
  display: inline-flex; align-items: center; height: 42px; padding: 0 20px; border-radius: 999px;
  background: var(--green); color: var(--paper); font-size: 15px; font-weight: 500;
  transition: background-color .3s, color .3s;
}
.nav__cta:hover { background: var(--on-surface); color: var(--surface); }
.nav__end { display: flex; align-items: center; gap: 10px; }
.nav__menu { display: none; height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 15px; font-weight: 500; }
.mode {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--fg); transition: border-color .3s;
}
.mode:hover { border-color: var(--fg); }
.mode svg { width: 18px; height: 18px; }
:root[data-mode="dark"] .mode__moon, :root:not([data-mode="dark"]) .mode__sun { display: none; }
.no-js-hide { display: none; }
.js .no-js-hide { display: grid; }
body[data-theme="green"] .nav__cta { background: var(--paper); color: var(--green); }
body[data-theme="walnut"] .nav__cta:hover { background: var(--paper); color: var(--walnut); }

/* ---------- Sections (shared) ---------- */
section, .footer { position: relative; }
.section-head {
  max-width: var(--max); margin: 0 auto clamp(40px, 5vw, 80px);
  display: grid; gap: 20px;
}
.section-head .eyebrow { justify-content: flex-start; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  padding: calc(var(--nav-h) + 2vh) var(--gutter) clamp(24px, 4vh, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr auto;
  gap: 2vh 4vw;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
}
.hero__eyebrow { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--line); }
.hero__eyebrow { justify-content: space-between; }
.hero__intro { display: grid; gap: 20px; justify-items: start; }

/* Ring: a stroke revolves twice, then settles as a full outline.
   Starts when .is-on is present; --ring sets the color, --ring-delay the start. */
@property --spin { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.ring { position: relative; border-radius: 999px; --ring: var(--green); --ring-delay: 0s; }
.ring::before, .ring::after {
  content: ""; position: absolute; inset: 0; padding: 1.5px; border-radius: inherit; pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.ring::before {
  background: conic-gradient(from var(--spin), transparent 0deg 200deg, var(--ring) 340deg, transparent 360deg);
  opacity: 0;
}
.ring::after { background: color-mix(in srgb, var(--ring) 75%, transparent); opacity: 0; }
.ring.is-on::before {
  opacity: 1;
  animation: ring-spin 1.3s linear var(--ring-delay) 2 forwards, ring-out .4s ease calc(var(--ring-delay) + 2.5s) forwards;
}
.ring.is-on::after { animation: ring-in .6s ease calc(var(--ring-delay) + 2.4s) forwards; }
.no-motion .ring::after { opacity: 1; }
@keyframes ring-spin { to { --spin: 360deg; } }
@keyframes ring-out { to { opacity: 0; } }
@keyframes ring-in { to { opacity: 1; } }

.status {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; --ring-delay: 1s;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg);
}
.live__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #2fbf71; }
.live__dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: #2fbf71;
  animation: live-pulse 2s cubic-bezier(.2, .6, .4, 1) infinite;
}
@keyframes live-pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(2.8); opacity: 0; } }
.hero__title {
  grid-column: 1; grid-row: 2; align-self: center;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(52px, 8.4vw, 164px); line-height: .88; letter-spacing: -.035em;
}
.hero__title .line { display: flex; align-items: baseline; white-space: nowrap; }
.hero__title .line:nth-child(2) { padding-left: .9em; }
.sell { transition: color .6s var(--ease); }
.sell.is-green, .no-motion .sell { color: var(--accent-text); }
.period {
  display: inline-block; width: .17em; height: .17em; margin-left: .05em;
  border-radius: 50%; background: var(--green); flex: none;
}
.hero__portrait { grid-column: 2; grid-row: 2; align-self: center; position: relative; width: clamp(170px, 22vw, 380px); }
.portrait {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  border-radius: 50% 50% 28px 28px / 37.5% 37.5% 28px 28px; background: var(--oak);
}
.portrait img {
  width: 100%; height: 100%; object-fit: cover; object-position: 45% 30%;
  filter: grayscale(1) contrast(1.08) brightness(1.06);
  mix-blend-mode: multiply;
  transform: scale(1.06);
}
.sticker {
  position: absolute; left: -14%; bottom: 14%;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  box-shadow: 0 10px 30px -12px rgba(27, 26, 23, .35);
  transform: rotate(-8deg);
}
.sticker .dot { width: 8px; height: 8px; vertical-align: 0; }
.hero__foot {
  grid-column: 1 / -1; grid-row: 3;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px 48px;
}
.hero__sub { max-width: 34ch; font-size: clamp(18px, 1.35vw, 22px); line-height: 1.4; color: var(--muted); }
.hero__sub em { color: var(--fg); font-size: 1.12em; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* Hero intro start state (cleared by JS once GSAP takes over; failsafe in <head>) */
.hero-pending:not(.no-motion) .hero [data-fade] { opacity: 0; }
.hero-pending:not(.no-motion) .hero .mask__in { transform: translateY(105%); }
.hero-pending:not(.no-motion) .period { opacity: 0; }

/* ---------- Experience logos ---------- */
.clients-band { padding: 0 var(--gutter) clamp(48px, 6vw, 80px); }
.clients {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 24px 64px;
  padding-top: 28px; border-top: 1px solid var(--line);
}
.clients__list {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px;
  font-size: clamp(18px, 1.6vw, 26px); color: color-mix(in srgb, var(--fg) 72%, transparent);
}
.clients__list .logo { width: 2.6em; height: 2.6em; margin: -.8em 0; }

/* ---------- What I do ---------- */
.help { padding: clamp(72px, 9vw, 140px) var(--gutter); }
.help__inner { max-width: var(--max); margin: 0 auto; }
.help__title {
  max-width: 20ch; margin-bottom: clamp(40px, 5vw, 72px);
  font-weight: 500; font-size: clamp(36px, 4.4vw, 76px); line-height: 1.04; letter-spacing: -.035em;
}
.help__title .soft { color: color-mix(in srgb, var(--fg) 42%, transparent); }
.help__title em { color: var(--accent-text); letter-spacing: -.02em; }
.help__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.help__card {
  display: flex; flex-direction: column; gap: 12px;
  padding: clamp(24px, 2.4vw, 36px); border-radius: 20px;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  border: 1px solid transparent; transition: border-color .3s;
}
.help__card:hover { border-color: var(--line); }
.help__card h3 { font-weight: 500; font-size: clamp(26px, 2.2vw, 36px); line-height: 1.05; letter-spacing: -.03em; }
.help__card > p { color: var(--muted); max-width: 38ch; }

/* ---------- Story (experience table) ---------- */
.story { padding: clamp(72px, 9vw, 140px) var(--gutter); }
.xp { max-width: var(--max); margin: 0 auto; }
.xp__head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: clamp(24px, 3vw, 40px); }
.xp__title { font-weight: 500; font-size: clamp(28px, 2.6vw, 44px); line-height: 1; letter-spacing: -.03em; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid #2fbf71; color: #7fe0aa;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}
.xp__row {
  display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 2.2fr) minmax(0, 3fr); gap: 8px 32px; align-items: baseline;
  padding: clamp(16px, 1.6vw, 22px) 0; border-bottom: 1px solid var(--line);
}
.xp__year { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.xp__role { font-size: clamp(16px, 1.1vw, 18px); }
.xp__role b { font-weight: 600; }
.xp__desc { color: var(--muted); font-size: clamp(15px, 1.05vw, 17px); }
.story__quote {
  margin-top: clamp(48px, 6vw, 88px); text-align: center; text-wrap: balance;
  font-family: var(--serif); font-size: clamp(36px, 4.6vw, 80px); line-height: 1; letter-spacing: -.03em;
}
.story__quote em { color: var(--oak); }

/* ---------- Services ---------- */
.services { padding: clamp(72px, 9vw, 140px) var(--gutter); }
.services__grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px);
}
.offer {
  display: flex; flex-direction: column; gap: 18px;
  min-height: clamp(340px, 28vw, 440px); padding: clamp(24px, 2.4vw, 40px);
  border-radius: 20px; background: var(--walnut); color: var(--paper);
  transition: background-color .4s;
}
.offer:hover, .offer:focus-visible { background: #46342a; }
.offer__icon { position: relative; width: 56px; height: 56px; }
.offer__icon--a { border-radius: 50%; border: 1px solid var(--oak); }
.offer__icon--a::after { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: var(--oak); }
.offer__icon--b { border-radius: 50% 50% 8px 8px; background: var(--oak); }
.offer__icon--c { display: flex; gap: 6px; align-items: center; }
.offer__icon--c::before, .offer__icon--c::after { content: ""; width: 24px; height: 24px; border-radius: 50%; background: var(--oak); }
.offer__icon--c::after { border-radius: 4px; transform: rotate(45deg) scale(.8); }
.offer__title { margin-top: auto; font-weight: 500; font-size: clamp(30px, 2.6vw, 44px); line-height: 1; letter-spacing: -.03em; }
.offer__copy { color: color-mix(in srgb, var(--paper) 74%, transparent); }
.offer__link {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  margin-top: 6px; padding: 12px 20px; --ring: #5ccf8f;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  transition: background-color .35s, color .35s;
}
.offer:nth-child(2) .offer__link { --ring-delay: .25s; }
.offer:nth-child(3) .offer__link { --ring-delay: .5s; }
.offer:hover .offer__link, .offer:focus-visible .offer__link { background: #5ccf8f; color: var(--walnut); }
.offer__link span { transition: transform .3s var(--ease); }
.offer:hover .offer__link span { transform: translate(2px, -2px); }

/* ---------- Work (compact two-column grid) ---------- */
.work { padding: clamp(72px, 9vw, 140px) var(--gutter) clamp(72px, 8vw, 120px); }
.work--page { padding-top: calc(var(--nav-h) + clamp(40px, 6vw, 96px)); }
.work-grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px) clamp(16px, 3vw, 44px);
}
/* Equal 3:2 tiles; the caption sits on a scrim at the bottom */
.tile { position: relative; display: block; aspect-ratio: 3 / 2; border-radius: 20px; overflow: hidden; isolation: isolate; background: var(--paper-2); }
.tile__inner { position: absolute; inset: 0; transition: filter .45s var(--ease), transform .6s var(--ease); }
.tile__media { position: absolute; inset: 0; }
.tile__media > img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.tile__photo { background: var(--paper-2); }
.tile__photo > img { object-fit: contain; padding: 7% 7% 22%; mix-blend-mode: multiply; }
.tile__cap {
  position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 6px;
  padding: clamp(40px, 5vw, 72px) clamp(16px, 1.8vw, 26px) clamp(16px, 1.6vw, 22px);
  background: linear-gradient(transparent, rgba(20, 16, 12, .78)); color: #F4EFE6;
}
.tile__meta { display: flex; gap: 10px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.tile__meta span { color: #7FE0AA; }
.tile__title { font-weight: 500; font-size: clamp(20px, 1.8vw, 28px); line-height: 1.1; letter-spacing: -.02em; }

/* Typographic tiles for cases without visuals yet */
.tile__type { display: grid; place-items: center; }
/* iPhone 18 Pro Max style mockup with a blank dark grey screen */
.tile__phone {
  position: absolute; left: 50%; top: 13%; width: 29%; aspect-ratio: 78 / 163; transform: translateX(-50%);
  border-radius: 17% / 8.2%; padding: 2.6%;
  background: #1c1c1e;
  box-shadow: 0 0 0 2px #9a958d, 0 0 0 3px #5d5a55, 0 34px 60px -24px rgba(0, 0, 0, .55);
  transition: transform .6s var(--ease);
}
.tile__phone::before {
  content: ""; display: block; height: 100%; border-radius: 15% / 7.2%;
  background: linear-gradient(160deg, #3b3b3f 0%, #2a2a2d 55%, #232326 100%);
}
.tile__phone::after { /* side buttons */
  content: ""; position: absolute; right: -4px; top: 24%; width: 3px; height: 11%; border-radius: 2px; background: #9a958d;
  box-shadow: -1px 0 0 #5d5a55;
}
.tile__island { position: absolute; top: 4.2%; left: 50%; width: 30%; height: 3.4%; transform: translateX(-50%); border-radius: 999px; background: #0b0b0c; }
.tile__logo { position: absolute; top: clamp(16px, 1.8vw, 24px); left: clamp(16px, 1.8vw, 24px); }
.tile__logo .mf-logo { font-size: 18px; }
.tone-walnut { background: var(--walnut); --tone-fg: var(--oak); }
.tone-green  { background: var(--green);  --tone-fg: #CFE6D6; }
.tone-oak    { background: #D9BC98;        --tone-fg: var(--walnut); }
.tone-paper  { background: var(--paper-2); --tone-fg: var(--walnut); }
.tone-walnut .mf-logo__blue, .tone-green .mf-logo__blue { display: none !important; }
.tone-walnut .mf-logo__white, .tone-green .mf-logo__white { display: block !important; }
.tone-oak .mf-logo__white, .tone-paper .mf-logo__white { display: none !important; }
.tone-oak .mf-logo__blue, .tone-paper .mf-logo__blue { display: block !important; }

/* Live tile */
.tile__go {
  position: absolute; right: clamp(14px, 1.6vw, 22px); bottom: clamp(14px, 1.6vw, 22px);
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--green); color: var(--paper); font-weight: 500; font-size: 14px;
  opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .45s var(--ease);
}
a.tile:hover .tile__media > img, a.tile:focus-visible .tile__media > img { transform: scale(1.04); }
a.tile:hover .tile__go, a.tile:focus-visible .tile__go { opacity: 1; transform: none; }

/* Coming soon: hover blurs the tile and reveals the tag */
.tile.is-soon { cursor: not-allowed; }
.tile__soon {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  background: rgba(20, 16, 12, .72); color: #F4EFE6; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  opacity: 0; transform: translate(-50%, -40%); transition: opacity .35s, transform .45s var(--ease);
  pointer-events: none;
}
.tile__soon .dot { width: 7px; height: 7px; vertical-align: 0; background: #7FE0AA; }
.tile.is-soon:hover .tile__inner { filter: blur(8px) saturate(.8); transform: scale(1.03); }
.tile.is-soon:hover .tile__soon { opacity: 1; transform: translate(-50%, -50%); }
/* Touch screens can't hover: keep the tag visible in the corner, CTA visible */
@media (hover: none) {
  .tile__soon { opacity: 1; left: auto; top: 14px; right: 14px; transform: none; padding: 7px 12px; font-size: 10.5px; }
  .tile__go { opacity: 1; transform: none; top: 14px; bottom: auto; min-height: 34px; padding: 0 12px; font-size: 13px; }
}

/* ---------- iPhone mockup (swap the placeholder for an <img> later) ---------- */
.phone {
  position: relative; width: clamp(180px, 15vw, 240px); aspect-ratio: 393 / 852; flex: none;
  padding: 3.4%; border-radius: 15% / 7%;
  background: #1b1a17;
  box-shadow: inset 0 0 0 1.5px #4a4642, 0 40px 60px -30px rgba(27, 26, 23, .45);
}
.phone::before, .phone::after {
  content: ""; position: absolute; width: 2px; border-radius: 2px; background: #2b2926;
}
.phone::before { left: -2px; top: 18%; height: 7%; }
.phone::after { right: -2px; top: 24%; height: 11%; }
.phone__island {
  position: absolute; z-index: 2; top: 3%; left: 50%; transform: translateX(-50%);
  width: 31%; height: 3.3%; border-radius: 999px; background: #0b0b0a;
}
.phone__screen {
  position: relative; height: 100%; overflow: hidden;
  border-radius: 12.5% / 5.8%; background: var(--paper);
}
.phone__screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
.phone__placeholder {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px;
  padding: 16px; text-align: center; color: rgba(27, 26, 23, .55);
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  background:
    repeating-linear-gradient(-45deg, rgba(27, 26, 23, .035) 0 8px, transparent 8px 16px),
    var(--paper);
}
.phone__placeholder .dot { width: 8px; height: 8px; }
.phone__placeholder small { font-size: 9px; opacity: .7; }

.brands { display: flex; flex-wrap: wrap; gap: 10px; }
.brands li {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 42px; padding: 0 16px 0 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 15px;
}
.brands li:not(:has(.logo, .logo-mono)) { padding-left: 16px; }
.brands .logo, .brands .logo-mono { width: 18px; height: 18px; color: color-mix(in srgb, var(--fg) 80%, transparent); }
.brands .logo-mono { font-size: 10px; border-radius: 5px; }
.brands .logo--wordmark { width: 34px; height: 34px; margin: -8px 0; }

/* ---------- Testimonials (continuous marquee) ---------- */
.words { padding: clamp(72px, 9vw, 140px) 0; }
.words .section-head, .words__more { padding: 0 var(--gutter); }
.words .section-head { max-width: calc(var(--max) + 2 * var(--gutter)); }

/* The track holds two identical sets and slides by exactly one set, so the loop is seamless */
.marquee-words { overflow: hidden; padding: 8px 0 12px; }
.marquee-words__track {
  display: flex; width: max-content;
  animation: words-marquee var(--marquee-time, 60s) linear infinite;
}
.marquee-words__set { display: flex; align-items: stretch; gap: clamp(16px, 2vw, 24px); padding-right: clamp(16px, 2vw, 24px); }
.marquee-words:has(.quote:hover, .quote:focus-within, .quote.is-open) .marquee-words__track,
.marquee-words.is-offscreen .marquee-words__track { animation-play-state: paused; }
@keyframes words-marquee { to { transform: translateX(-50%); } }
/* Reduced motion / no JS: a still row you can swipe */
.no-motion .marquee-words { overflow-x: auto; scroll-snap-type: x mandatory; padding-inline: var(--gutter); }
.no-motion .marquee-words__track { animation: none; }
.no-motion .marquee-words__set[aria-hidden] { display: none; }

.quote {
  flex: 0 0 clamp(290px, 34vw, 480px); scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 22px; margin: 0;
  padding: clamp(22px, 2.2vw, 32px); border-radius: 20px; border: 1px solid transparent;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent);
  transition: transform .4s var(--ease), border-color .3s;
}
.quote:hover { transform: translateY(-4px); border-color: var(--line); }
.quote blockquote { margin: 0; display: grid; gap: 14px; align-content: start; flex: 1; }
.quote__pull { font-family: var(--serif); font-size: clamp(24px, 2vw, 32px); line-height: 1.1; letter-spacing: -.015em; transition: color .4s var(--ease); }
.quote:hover .quote__pull, .quote:focus-within .quote__pull { color: var(--accent-text); }
.quote__body {
  display: grid; gap: 10px; color: var(--muted); font-size: 15px; line-height: 1.55;
  max-height: calc(1.55em * 6); overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent);
}
.quote.is-short .quote__body, .quote.is-open .quote__body { max-height: none; -webkit-mask-image: none; mask-image: none; }
.quote__more {
  justify-self: start; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  border-bottom: 1px solid var(--line); padding-bottom: 2px;
}
.quote__by { display: flex; align-items: center; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.quote__by img { width: 52px; height: 52px; flex: none; border-radius: 50%; object-fit: cover; clip-path: circle(44%); /* trims the white ring left from the LinkedIn crop */ }
.quote__by span { display: grid; gap: 3px; }
.quote__by b { font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
/* Job title: highlighted in the accent green */
.quote__by small { color: var(--accent-text); font-weight: 500; font-size: 14px; line-height: 1.35; }
.quote__by .quote__rel { color: var(--muted); font-weight: 400; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.words__more { display: block; width: fit-content; margin: clamp(20px, 2.4vw, 32px) auto 0; }

/* ---------- Contact ---------- */
.contact {
  padding: clamp(80px, 9vw, 128px) var(--gutter);
  display: flex; flex-direction: column; justify-content: center; gap: clamp(20px, 2.6vw, 36px);
}
.contact > * { width: 100%; max-width: var(--max); margin-left: auto; margin-right: auto; }
.contact--page { min-height: 100svh; padding-top: calc(var(--nav-h) + clamp(40px, 5vw, 80px)); }
.contact .eyebrow { justify-content: flex-start; color: color-mix(in srgb, var(--fg) 75%, transparent); }
.contact__lead { font-size: clamp(20px, 1.8vw, 28px); letter-spacing: -.02em; }
.contact__title {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(64px, 9vw, 168px); line-height: .9; letter-spacing: -.04em;
}
/* Booking: session → day → time (on the green contact section) */
.booking {
  display: grid; gap: clamp(22px, 2.4vw, 32px);
  padding: clamp(20px, 2.4vw, 36px); border-radius: 24px;
  background: rgba(0, 0, 0, .12); border: 1px solid color-mix(in srgb, var(--paper) 20%, transparent);
}
.booking__step { display: grid; gap: 12px; }
.booking__label {
  display: flex; align-items: baseline; gap: 12px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.booking__label > span:first-child { opacity: .6; }
.booking__tz {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 10px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--paper) 30%, transparent);
  background: rgba(0, 0, 0, .1);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  transition: color .35s, border-color .35s, background-color .35s;
}
/* Desert sand, for the pyramids: on the badge itself, on time slots, and the badge lights up while a slot is hovered */
.booking { --sand: #E8C27A; }
.booking__tz:hover,
.booking__step:has(.slot:hover, .slot:focus-visible) .booking__tz { color: var(--sand); border-color: var(--sand); background: rgba(232, 194, 122, .12); }
.slot:not([aria-pressed="true"]):hover { color: var(--sand); border-color: var(--sand); background: rgba(232, 194, 122, .12); }
.booking__tz svg { width: 34px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.booking__tz svg circle { fill: currentColor; stroke: none; }
.booking__tz svg path:last-child { opacity: .5; } /* the shaded face of the great pyramid */
.booking__types { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.type, .day, .slot {
  border: 1px solid color-mix(in srgb, var(--paper) 35%, transparent);
  transition: background-color .25s, color .25s, border-color .25s;
}
.type:hover, .day:hover { border-color: var(--paper); }
.type[aria-pressed="true"], .day[aria-pressed="true"], .slot[aria-pressed="true"] {
  background: var(--paper); color: var(--green); border-color: var(--paper);
}
.type { display: grid; gap: 4px; text-align: left; padding: 16px 18px; border-radius: 16px; }
.type b { font-weight: 500; font-size: 19px; letter-spacing: -.02em; }
.type small { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; opacity: .75; }
.booking__days { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.booking__days::-webkit-scrollbar { display: none; }
.day { flex: none; display: grid; gap: 2px; min-width: 76px; padding: 10px 14px; border-radius: 14px; text-align: left; }
.day small { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.day b { font-weight: 500; font-size: 16px; white-space: nowrap; }
.booking__times { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { min-height: 44px; padding: 0 18px; border-radius: 999px; font-family: var(--mono); font-size: 14px; }
.booking__confirm {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px;
  padding-top: 20px; border-top: 1px solid color-mix(in srgb, var(--paper) 20%, transparent);
}
.booking__summary { font-size: clamp(17px, 1.3vw, 20px); }

/* Booking on a light page (services.html): same layout, theme-aware colors */
.services--page { padding-top: calc(var(--nav-h) + clamp(40px, 6vw, 96px)); }
.contact--light { min-height: 0; padding-top: 0; }
.contact--light .eyebrow { color: var(--muted); }
.contact--light .contact__title { color: var(--fg); }
.contact--light .booking { background: color-mix(in srgb, var(--surface-2) 60%, transparent); border-color: var(--line); }
.contact--light .booking__confirm { border-top-color: var(--line); }
.contact--light .type, .contact--light .day, .contact--light .slot { border-color: var(--line); }
.contact--light .type:hover, .contact--light .day:hover { border-color: var(--fg); }
.contact--light .type[aria-pressed="true"], .contact--light .day[aria-pressed="true"], .contact--light .slot[aria-pressed="true"] {
  background: var(--green); color: var(--paper); border-color: var(--green);
}
.contact--light .booking__tz { border-color: var(--line); background: transparent; }
.contact--light .booking { --sand: #B07D2A; }
.contact--light .booking__tz:hover,
.contact--light .booking__step:has(.slot:hover, .slot:focus-visible) .booking__tz,
.contact--light .slot:not([aria-pressed="true"]):hover { background: rgba(176, 125, 42, .1); }
.contact--light .contact__note { color: var(--muted); }
.contact--light .btn--line { border-color: var(--line); }
.contact--light :focus-visible { outline-color: var(--green); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.contact__note { color: color-mix(in srgb, var(--fg) 75%, transparent); }

/* ---------- Footer ---------- */
.footer { padding: clamp(56px, 6vw, 96px) var(--gutter) 0; overflow: hidden; }
.footer__row {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px;
  font-size: 16px; padding-bottom: clamp(32px, 4vw, 56px); border-bottom: 1px solid var(--line);
}
.footer__right { text-align: right; }
.social { display: flex; gap: 10px; justify-content: center; align-items: start; }
.social__link {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); transition: background-color .3s, color .3s, border-color .3s;
}
.social__link .logo { width: 18px; height: 18px; }
.social__link:hover { background: var(--fg); color: var(--walnut); border-color: var(--fg); }
.footer__word {
  display: block;
  font-family: var(--serif); white-space: nowrap; text-align: center;
  font-size: 15.6vw; line-height: .78; letter-spacing: -.045em;
  color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--fg) 45%, transparent);
  padding-top: 3vw; margin: 0 calc(-1 * var(--gutter));
}
.footer__word span { position: relative; display: inline-block; transform: translateY(12%); }
/* Solid copy of the name that fills up from the baseline on hover */
.footer__word span::after {
  content: attr(data-text); position: absolute; inset: 0;
  color: var(--fg); -webkit-text-stroke: 0;
  clip-path: inset(100% 0 0 0);
  transition: clip-path .6s cubic-bezier(.65, 0, .35, 1);
}
.footer__word:hover span::after { clip-path: inset(0 0 0 0); transition-duration: 1s; }

/* =========================================================
   Resume page
   ========================================================= */
.nav__links .is-current { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--green); }

.resume-head { padding: calc(var(--nav-h) + clamp(32px, 6vw, 96px)) var(--gutter) clamp(40px, 5vw, 72px); }
.resume-head__inner { max-width: var(--max); margin: 0 auto; display: grid; gap: clamp(24px, 3vw, 40px); }
.resume-head__inner .eyebrow { padding-top: 8px; border-top: 1px solid var(--line); }
.resume-head__title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(56px, 9vw, 168px); line-height: .9; letter-spacing: -.035em;
}
.resume-head__title em { color: var(--accent-text); }
.resume-head__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.download { --ring: #7fe0aa; --ring-delay: .8s; }
.download svg { flex: none; }

.photos {
  max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter) clamp(64px, 8vw, 120px);
  display: grid; gap: clamp(10px, 1.2vw, 18px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(3, clamp(220px, 26vw, 420px));
  grid-template-areas:
    "team team talk talk"
    "portrait award ethics ethics"
    "loop loop join join";
}
.photo { position: relative; margin: 0; overflow: hidden; border-radius: 20px; background: var(--surface-2); }
.photo img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.85); transition: transform .8s var(--ease), filter .5s;
}
.photo:hover img { transform: scale(1.03); filter: saturate(1); }
.photo--team { grid-area: team; }
.photo--talk { grid-area: talk; }
.photo--award { grid-area: award; }
.photo--award img { object-position: 50% 45%; }
.photo--ethics { grid-area: ethics; }
.photo--loop { grid-area: loop; }
.photo--join { grid-area: join; }
.photo--join img { object-position: 60% 50%; }
/* The portrait keeps the site's duotone treatment */
.photo--portrait { grid-area: portrait; background: var(--oak); }
.photo--portrait img { filter: grayscale(1) contrast(1.06) brightness(1.04); mix-blend-mode: multiply; object-position: 50% 35%; }
.photo--portrait:hover img { filter: grayscale(1) contrast(1.06) brightness(1.04); }
.photo figcaption {
  position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px);
  padding: 7px 12px; border-radius: 999px;
  background: rgba(27, 26, 23, .55); color: #F4EFE6; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
}

.about { padding: 0 var(--gutter) clamp(72px, 9vw, 140px); }
.about__inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 24px 48px;
}
.about__inner .eyebrow { justify-content: flex-start; align-self: start; padding-top: 10px; }
.about__body { display: grid; gap: clamp(24px, 3vw, 40px); }
.about__lead { font-weight: 500; font-size: clamp(26px, 2.6vw, 44px); line-height: 1.12; letter-spacing: -.03em; max-width: 26ch; }
.about__lead b { font-weight: 500; color: var(--accent-text); }
.about__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 40px; color: var(--muted); }
.lead-how { display: grid; gap: 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.lead-how__title { font-family: var(--mono); font-weight: 400; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.lead-how__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 32px; counter-reset: how; }
.lead-how__list li { counter-increment: how; position: relative; padding-left: 34px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.lead-how__list li::before { content: counter(how, decimal-leading-zero); position: absolute; left: 0; top: 2px; font-family: var(--mono); font-size: 12px; color: var(--accent-text); }
.lead-how__list b { display: block; margin-bottom: 2px; color: var(--fg); font-weight: 500; font-size: 18px; letter-spacing: -.01em; }
.facts { display: flex; flex-wrap: wrap; gap: 12px 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.facts li { display: grid; gap: 2px; font-size: 16px; }
.facts b { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.xp__desc p { margin: 0; }
.xp__hl { display: grid; gap: 4px; margin-top: 10px; }
.xp__hl li { position: relative; padding-left: 16px; font-size: 15px; color: var(--muted); }
.xp__hl li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: #5ccf8f; }

.creds { padding: clamp(72px, 9vw, 140px) var(--gutter); }
.creds__grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 72px) clamp(32px, 4vw, 64px); }
.creds__grid > div { display: grid; gap: 16px; align-content: start; }
.creds__grid .eyebrow { justify-content: flex-start; }
.creds__big { font-weight: 500; font-size: clamp(28px, 2.6vw, 44px); line-height: 1; letter-spacing: -.03em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 6px 12px; border-radius: 999px; background: var(--tag-bg); color: var(--tag-fg);
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
}
.tags--loose { gap: 10px; }
.tags--loose li { padding: 8px 14px; }

.resume-end { padding: clamp(80px, 9vw, 128px) var(--gutter); border-top: 1px solid var(--line); }
.resume-end__title em { color: var(--accent-text); }
.resume-end__inner { max-width: var(--max); margin: 0 auto; display: grid; gap: clamp(24px, 3vw, 36px); }
.resume-end__title { font-family: var(--serif); font-weight: 400; font-size: clamp(56px, 8vw, 150px); line-height: .9; letter-spacing: -.035em; }

/* =========================================================
   Case study pages
   ========================================================= */
.cs-wrap { max-width: var(--max); margin: 0 auto; }
.cs-hero { padding: calc(var(--nav-h) + clamp(32px, 5vw, 80px)) var(--gutter) clamp(48px, 6vw, 88px); }
.cs-hero .eyebrow { padding-top: 8px; border-top: 1px solid var(--line); }
.cs-hero__title {
  margin: clamp(28px, 4vw, 56px) 0 16px; max-width: 22ch;
  font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6.2vw, 116px); line-height: .95; letter-spacing: -.03em;
}
.cs-scope { margin-bottom: clamp(28px, 3.6vw, 48px); font-family: var(--mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cs-hero__title em { color: var(--accent-text); }
.cs-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 32px; margin: 0; }
.cs-meta div { padding-top: 14px; border-top: 1px solid var(--line); }
.cs-meta dt { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cs-meta dd { margin: 6px 0 0; font-size: 16px; }

.cs-metrics { padding: clamp(56px, 7vw, 104px) var(--gutter); }
.cs-metrics__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.cs-metrics__list li { display: grid; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.cs-metrics__list b { font-family: var(--serif); font-weight: 400; font-size: clamp(52px, 6vw, 104px); line-height: .9; letter-spacing: -.03em; }
.cs-metrics__list span { color: var(--muted); font-size: 16px; }

.cs-body { padding: clamp(72px, 9vw, 140px) var(--gutter); }
.cs-body .cs-wrap { display: grid; gap: clamp(56px, 7vw, 104px); }
.cs-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 20px 48px; align-items: baseline; }
.cs-block > .eyebrow {
  justify-content: flex-start; align-self: start;
  position: sticky; top: calc(var(--nav-h) + 20px);
  font-size: 15px; letter-spacing: .1em; color: var(--fg);
}
.cs-block > .eyebrow .dot { width: 10px; height: 10px; }
.cs-block--wide > .eyebrow { position: static; }
.cs-block__lead { font-weight: 500; font-size: clamp(24px, 2.4vw, 40px); line-height: 1.18; letter-spacing: -.025em; max-width: 32ch; }
.cs-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.cs-list li { position: relative; padding: 16px 0 16px 22px; border-top: 1px solid var(--line); }
.cs-list li::before { content: ""; position: absolute; left: 0; top: 1.45em; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.cs-shots {
  display: flex; justify-content: center; align-items: center; gap: clamp(16px, 3vw, 48px);
  padding: clamp(32px, 5vw, 72px) 16px; border-radius: 28px; background: var(--surface-2); overflow: hidden;
}
.cs-shots .phone:nth-child(2) { transform: translateY(-6%); }
.cs-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
.cs-steps li { display: grid; gap: 8px; align-content: start; padding: clamp(20px, 2vw, 28px); border-radius: 20px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.cs-steps span { font-family: var(--mono); font-size: 12px; color: var(--accent-text); }
.cs-steps b { font-weight: 500; font-size: clamp(20px, 1.6vw, 26px); letter-spacing: -.02em; }
.cs-steps p { color: var(--muted); font-size: 16px; }
/* Art direction: full-width block with a tile grid */
.cs-block--wide { grid-template-columns: 1fr; gap: 28px; }
.spec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 18px); }
.spec-grid li {
  display: flex; flex-direction: column; gap: 10px;
  padding: clamp(20px, 2vw, 28px); border-radius: 20px;
  background: color-mix(in srgb, var(--surface-2) 70%, transparent); border: 1px solid transparent;
  transition: border-color .3s;
}
.spec-grid li:hover { border-color: var(--line); }
.spec__i { font-family: var(--mono); font-size: 12px; color: var(--accent-text); }
.spec-grid h3 { font-weight: 500; font-size: clamp(20px, 1.6vw, 26px); line-height: 1.1; letter-spacing: -.02em; }
.spec-grid p { color: var(--muted); font-size: 15px; line-height: 1.5; }
.swatches { display: flex; gap: 6px; }
.swatches i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }

.cs-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 24px); }
.cs-gallery figure { margin: 0; overflow: hidden; border-radius: 24px; background: #fff; position: relative; }
.cs-gallery img { width: 100%; height: auto; display: block; transition: transform .8s var(--ease); }
.cs-gallery figure:hover img { transform: scale(1.02); }
.cs-gallery figcaption {
  position: absolute; left: 14px; bottom: 14px; display: inline-flex; gap: 8px; align-items: center;
  padding: 7px 12px; border-radius: 999px; background: rgba(27, 26, 23, .78); color: #F4EFE6;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase;
}
.cs-gallery figcaption b { color: #7FE0AA; font-weight: 500; }
.cs-gallery__note { margin-top: -40px; text-align: center; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.cs-figure { margin: 0; overflow: hidden; border-radius: 28px; background: var(--paper-2); }
.cs-figure img { width: 100%; height: auto; }

.cs-next { padding: 0; }
.cs-next__link { display: grid; gap: 16px; padding: clamp(64px, 8vw, 120px) var(--gutter); }
.cs-next__title {
  font-family: var(--serif); font-size: clamp(44px, 7vw, 128px); line-height: .95; letter-spacing: -.035em;
  transition: transform .5s var(--ease);
}
.cs-next__link:hover .cs-next__title { transform: translateX(12px); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clients { grid-template-columns: 1fr; }
  .clients__list { justify-content: flex-start; }
}

@media (max-width: 899px) {
  :root { --nav-h: 64px; }
  .nav__menu { display: inline-flex; align-items: center; }
  .nav__links {
    display: none; position: absolute; top: calc(100% - 4px); left: var(--gutter); right: var(--gutter);
    flex-direction: column; gap: 0; padding: 8px; border-radius: 18px;
    background: var(--bg); border: 1px solid var(--line); box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .35);
    font-size: 18px;
  }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { padding: 14px 12px; border-radius: 12px; }
  .nav__links a + a { border-top: 1px solid var(--line); }
  .nav.is-open { transform: none !important; }
  .photos {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(2, clamp(180px, 46vw, 300px)) clamp(200px, 60vw, 360px) repeat(3, clamp(180px, 46vw, 300px));
    grid-template-areas: "team team" "talk talk" "portrait award" "ethics ethics" "loop loop" "join join";
  }
  .about__inner, .about__cols, .creds__grid, .lead-how__list { grid-template-columns: 1fr; }
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto auto; gap: 24px; }
  .hero__portrait { grid-column: 1; grid-row: 2; width: 132px; justify-self: start; }
  .sticker { left: auto; right: -110%; bottom: 40%; }
  .hero__title { grid-row: 3; font-size: clamp(40px, 12.4vw, 104px); }
  .hero__title .line:nth-child(2) { padding-left: 0; }
  .hero__foot { grid-row: 4; }
  .hide-sm { display: none; }

  .help__grid, .services__grid, .booking__types { grid-template-columns: 1fr; }
  .cs-meta, .cs-metrics__list { grid-template-columns: 1fr 1fr; }
  .cs-block, .cs-list, .cs-steps, .cs-gallery, .spec-grid { grid-template-columns: 1fr; }
  .cs-block > .eyebrow { position: static; }
  .cs-shots { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; }
  .cs-shots .phone { scroll-snap-align: center; }
  .cs-shots .phone:nth-child(2) { transform: none; }
  .offer { min-height: 0; }
  .offer__title { margin-top: 12px; }

  .xp__row { grid-template-columns: 1fr; gap: 4px; }

  .work-grid { grid-template-columns: 1fr; }
  .tile__go { opacity: 1; transform: none; top: 14px; bottom: auto; min-height: 34px; padding: 0 12px; font-size: 13px; }
  .tile__logo .mf-logo { font-size: 13px; }

  .footer__row { grid-template-columns: 1fr 1fr; }
  .social { order: 3; justify-content: flex-start; }
}

@media (max-width: 520px) {
  .nav { gap: 10px; }
  .nav__logo { font-size: 15px; }
  .nav__links { font-size: 14px; }
  .nav__end { gap: 6px; }
  .mode { width: 38px; height: 38px; }
  .nav__cta { height: 38px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
  .btn { min-height: 48px; padding: 0 20px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
