/* ─────────────────────────────────────────────────────────────
   Qualitech — Quiet, Federal-editorial style
   Inspired by National Design Studio sites: big serif, lots of
   air, a single accent, almost no chrome.
   ───────────────────────────────────────────────────────────── */

:root {
  --bg: #F6F2EA;
  --bg-2: #EFE9DA;
  --paper: #FBF8F1;
  --ink: #141414;
  --ink-soft: #4A4A4A;
  --ink-mute: #8A8A8A;
  --rule: rgba(20, 20, 20, 0.12);
  --accent: #D9573F;
  --accent-deep: #B23F2A;
  --hero-ink: #0E0E10;

  --f-display: "Instrument Serif", "Times New Roman", serif;
  --f-sans: "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 1180px;
  --gutter: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }

/* ── Typography ─────────────────────────────────────────────── */
.display {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 0.98;
  color: var(--ink);
  text-wrap: pretty;
}
.display em { font-style: italic; }

.eyebrow {
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow.muted { color: var(--ink-mute); }

.lede {
  font-family: var(--f-sans);
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
}

/* ── Top utility bar ───────────────────────────────────────── */
.bar {
  font-family: var(--f-sans);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.bar .row {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex; justify-content: space-between; align-items: center;
}
.bar .lock {
  display: inline-flex; align-items: center; gap: 8px;
}
.bar .lock svg { display: block; }
.bar .right { display: flex; gap: 28px; }

/* ── Nav ───────────────────────────────────────────────────── */
.nav {
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}
.nav .row {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px var(--gutter);
  display: flex; justify-content: space-between; align-items: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.brand img {
  display: block;
  height: 28px;
  width: auto;
}
.nav .links {
  display: flex; gap: 36px;
}
.nav .links a {
  font-size: 14.5px;
  color: var(--ink-soft);
  transition: color .2s;
}
.nav .links a:hover { color: var(--ink); }
.nav .cta {
  font-size: 13.5px;
  font-weight: 500;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: background .25s, color .25s;
}
.nav .cta:hover { background: var(--ink); color: var(--bg); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background .25s, transform .25s;
}
.btn:hover { background: var(--accent-deep); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn.ghost:hover { background: var(--ink); color: var(--bg); }
.btn .arr { display: inline-flex; transition: transform .25s; }
.btn:hover .arr { transform: translateX(3px); }

/* ── Section primitives ────────────────────────────────────── */
.section { padding: 140px var(--gutter); }
.section.compact { padding: 100px var(--gutter); }
.section.deep { padding: 180px var(--gutter); }
.section + .section { border-top: 1px solid var(--rule); }
.section.bg-2 { background: var(--bg-2); }
.section.bg-ink { background: var(--ink); color: var(--bg); border-top: 0; }
.section.bg-ink .display { color: var(--bg); }
.section.bg-ink .lede { color: rgba(255,255,255,0.7); }
.section.bg-ink .eyebrow { color: #D5B679; }

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--hero-ink);
  color: #F4F1EB;
  padding: 140px var(--gutter) 0;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.hero .inner {
  position: relative;
  z-index: 2;
  max-width: 980px;
  margin: 0 auto;
}
.hero h1 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(56px, 8vw, 124px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  color: #F4F1EB;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lede {
  margin: 36px auto 0;
  font-size: 20px;
  text-align: center;
  max-width: 56ch;
  color: rgba(244, 241, 235, 0.72);
}
.hero .cta-row {
  margin-top: 44px;
  display: flex; gap: 14px; justify-content: center;
}
.hero .btn {
  background: var(--accent);
  color: #fff;
}
.hero .btn:hover { background: var(--accent-deep); }
.hero .btn.ghost {
  background: transparent;
  color: #F4F1EB;
  border: 1px solid rgba(244,241,235,0.35);
}
.hero .btn.ghost:hover {
  background: rgba(244,241,235,0.08);
  color: #fff;
  border-color: rgba(244,241,235,0.55);
}

.hero-banner {
  position: relative;
  z-index: 1;
  margin: 64px auto 0;
  max-width: 1080px;
  padding: 0 var(--gutter);
}
.hero-banner img {
  display: block;
  width: 100%;
  height: auto;
  /* Blend the laptop image into the dark hero background */
  filter: brightness(0.95) contrast(1.02) saturate(0.9);
  mix-blend-mode: screen;
  opacity: 0.92;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 65%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 65%, transparent 100%);
}
/* Subtle floor glow to seat the laptop on the dark surface */
.hero::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 90%;
  height: 55%;
  background: radial-gradient(ellipse at 50% 100%,
              rgba(217, 87, 63, 0.10) 0%,
              rgba(217, 87, 63, 0) 55%);
  pointer-events: none;
  z-index: 0;
}

/* ── Image placeholder ─────────────────────────────────────── */
.ph {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(14,26,43,0.04) 0 1px, transparent 1px 9px),
    var(--paper);
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
}
.ph::after {
  content: ""; position: absolute; inset: 18px;
  border: 1px dashed rgba(14,26,43,0.18);
  pointer-events: none;
  border-radius: 4px;
}
.ph-label {
  position: relative; z-index: 2;
  padding: 8px 14px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.ph.dark {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 9px),
    #1A2638;
  border-color: rgba(255,255,255,0.12);
}
.ph.dark::after { border-color: rgba(255,255,255,0.18); }
.ph.dark .ph-label {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.7);
}

/* ── Centered section title block ──────────────────────────── */
.head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 80px;
}
.head .eyebrow { margin-bottom: 24px; }
.head h2 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(48px, 5.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}
.head h2 em { font-style: italic; }
.head .lede { margin: 28px auto 0; }

/* ── Brief / mission ───────────────────────────────────────── */
.mission .head { margin-bottom: 72px; }
.mission .head h2 { max-width: 18ch; margin-left: auto; margin-right: auto; }

.mission-body {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px 64px;
  padding-bottom: 72px;
  border-bottom: 1px solid var(--rule);
}
.mission-body .msg {
  display: grid;
  grid-template-columns: 56px 1fr;
  column-gap: 24px;
  row-gap: 12px;
  align-items: baseline;
}
.mission-body .msg-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--paper);
  align-self: start;
}
.mission-body .msg-icon svg { display: block; }
.mission-body .msg-t {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(24px, 2.2vw, 30px);
  letter-spacing: -0.012em;
  line-height: 1.1;
  color: var(--ink);
}
.mission-body .msg-d {
  grid-column: 2;
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
  max-width: 42ch;
}
.mission-body .msg-d em {
  font-family: var(--f-display);
  font-style: italic;
  color: var(--ink);
}

.mission-stats {
  max-width: 980px;
  margin: 64px auto 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}
.mission-stats > div {
  text-align: left;
}
.mission-stats dt {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 14px;
}
.mission-stats dd {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(34px, 3.4vw, 44px);
  letter-spacing: -0.018em;
  line-height: 1;
  color: var(--accent);
}
.mission-stats dd small {
  display: block;
  margin-top: 10px;
  font-family: var(--f-sans);
  font-size: 13.5px;
  letter-spacing: 0;
  color: var(--ink-soft);
  line-height: 1.4;
}

/* ── What we do — simple list ──────────────────────────────── */
.services {
  max-width: 920px;
  margin: 0 auto;
}
.service {
  display: grid;
  grid-template-columns: 80px 1fr 1.2fr;
  gap: 40px;
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.service:first-child { border-top: 1px solid var(--rule); }
.service .svc-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: var(--paper);
}
.service .svc-icon svg { display: block; }
.service .t {
  font-family: var(--f-display);
  font-size: clamp(26px, 2.8vw, 36px);
  letter-spacing: -0.012em;
  line-height: 1.05;
}
.service .d {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.55;
}

/* ── Process — horizontal timeline ─────────────────────────── */
.process .head { margin-bottom: 72px; }
.timeline {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.timeline .rail {
  position: absolute;
  top: 28px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: var(--rule);
  z-index: 0;
}
.timeline .nodes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  position: relative;
  z-index: 1;
}
.timeline .node {
  text-align: center;
  padding: 0 8px;
}
.timeline .node .dot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--accent);
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.timeline .node .dot svg { display: block; }
.timeline .node .pname {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(20px, 1.7vw, 24px);
  line-height: 1.1;
  letter-spacing: -0.012em;
  margin-bottom: 12px;
  color: var(--ink);
}
.timeline .node .pbody {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 28ch;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .timeline .rail {
    top: 0;
    bottom: 0;
    left: 28px;
    right: auto;
    width: 1px;
    height: auto;
  }
  .timeline .nodes {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .timeline .node {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 20px;
    text-align: left;
    padding: 0;
    align-items: start;
  }
  .timeline .node .dot {
    margin: 0;
  }
  .timeline .node .pname {
    margin-top: 14px;
    margin-bottom: 8px;
  }
  .timeline .node .pbody {
    max-width: none;
    margin: 0;
  }
}

/* ── Areas of focus — centered ledger ──────────────────────── */
.focus-ledger {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.focus-item {
  padding: 56px 0;
  border-top: 1px solid var(--rule);
  display: grid;
  justify-items: center;
  gap: 22px;
}
.focus-item:last-child { border-bottom: 1px solid var(--rule); }
.focus-ico {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.focus-ico svg { display: block; }
.focus-item h3 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(32px, 3.4vw, 44px);
  letter-spacing: -0.018em;
  line-height: 1.04;
  color: var(--ink);
}
.focus-item p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.6;
  max-width: 52ch;
}

@media (max-width: 600px) {
  .focus-item { padding: 40px 0; gap: 16px; }
  .focus-ico { width: 48px; height: 48px; }
  .focus-ico svg { width: 22px; height: 22px; }
}

/* ── Lightbox ──────────────────────────────────────────────
   Full-screen modal opens when a project screen is clicked. */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 8, 10, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  cursor: zoom-out;
  animation: lightboxIn 220ms ease-out;
}
@keyframes lightboxIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: default;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: lightboxImgIn 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes lightboxImgIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 240ms ease, transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
  z-index: 1;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: rotate(90deg);
}
@media (max-width: 720px) {
  .lightbox { padding: 3vh 3vw; }
  .lightbox-close { top: 14px; right: 14px; width: 38px; height: 38px; }
}

/* Make the device screens look clickable */
.imac-screen[role="button"],
.iphone-screen[role="button"],
.android-screen[role="button"] {
  cursor: zoom-in;
  transition: transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.imac-screen[role="button"]:hover img { filter: brightness(1.04); }
.iphone-screen[role="button"]:hover,
.android-screen[role="button"]:hover {
  transform: scale(1.02);
}
.imac-screen[role="button"]:focus-visible,
.iphone-screen[role="button"]:focus-visible,
.android-screen[role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* ── Image loading shimmer ─────────────────────────────────
   Any device screen (iMac / iPhone / Android) shows a soft
   horizontal shimmer over the screen area WHILE the screenshot
   is fetching. Once loaded, the shimmer disappears instantly
   and the already-rendered image is visible — no fade-in
   delay, no perceived lag for cached images.                 */
.imac-screen,
.iphone-screen,
.android-screen {
  position: relative;
  isolation: isolate;
}
/* The image itself is ALWAYS at full opacity — no transition.
   Cached images appear the same frame the project changes. */
.imac-screen img,
.iphone-screen img,
.android-screen img {
  opacity: 1;
}
/* Shimmer overlay only paints while parent has .loading. It
   covers the screen area with a solid placeholder + a sweeping
   highlight. When the parent flips to .loaded, the overlay is
   instantly removed (display none) — no fade. */
.imac-screen.loading::before,
.iphone-screen.loading::before,
.android-screen.loading::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      100deg,
      transparent 30%,
      rgba(255, 255, 255, 0.10) 50%,
      transparent 70%
    ) 0 0 / 220% 100% no-repeat,
    #15171b;
  animation: workShimmer 1.4s linear infinite;
  z-index: 1;
  pointer-events: none;
}
@keyframes workShimmer {
  0%   { background-position: 140% 0; }
  100% { background-position: -140% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .imac-screen.loading::before,
  .iphone-screen.loading::before,
  .android-screen.loading::before {
    animation: none;
    background: #15171b;
  }
}

/* ── iMac frame (Selected Work) ────────────────────────────── */
.imac {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.imac-shell {
  width: 100%;
  background:
    linear-gradient(180deg, #e6e8ea 0%, #d3d6d9 55%, #c4c7ca 100%);
  border-radius: 14px;
  padding: 16px 16px 0;
  position: relative;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 -1px 0 rgba(0,0,0,0.05) inset,
    0 0 0 1px rgba(0,0,0,0.12),
    0 22px 40px rgba(14, 18, 28, 0.18);
}
/* subtle aluminum reflection on top */
.imac-shell::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 12%;
  right: 12%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0));
  pointer-events: none;
}
.imac-screen {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #0a0a0c;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 1.5px #0a0a0c,
    0 0 0 3px rgba(255,255,255,0.06),
    0 1px 0 rgba(0,0,0,0.4) inset;
}
.imac-screen .imac-screenshot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.imac-chin {
  height: 52px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.imac-logo {
  width: 14px;
  height: 17px;
  background: rgba(0,0,0,0.32);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 170 170'><path d='M150.37 130.25c-2.45 5.66-5.35 10.87-8.71 15.66-4.58 6.53-8.33 11.05-11.22 13.56-4.48 4.12-9.28 6.23-14.42 6.35-3.69 0-8.14-1.05-13.32-3.18-5.197-2.12-9.973-3.17-14.34-3.17-4.58 0-9.492 1.05-14.746 3.17-5.262 2.13-9.501 3.24-12.742 3.35-4.929.21-9.842-1.96-14.746-6.52-3.13-2.73-7.045-7.41-11.735-14.04-5.032-7.08-9.169-15.29-12.41-24.65-3.471-10.11-5.211-19.9-5.211-29.378 0-10.857 2.346-20.221 7.045-28.068 3.693-6.303 8.606-11.275 14.755-14.925s12.793-5.51 19.948-5.629c3.915 0 9.049 1.211 15.429 3.591 6.362 2.388 10.443 3.599 12.227 3.599 1.334 0 5.868-1.416 13.565-4.239 7.28-2.618 13.423-3.702 18.445-3.275 13.6 1.097 23.819 6.462 30.62 16.123-12.156 7.366-18.17 17.677-18.05 30.93.107 10.318 3.857 18.901 11.227 25.722 3.344 3.176 7.084 5.62 11.224 7.343-.9 2.605-1.853 5.1-2.851 7.487zM119.36 8.81c0 8.103-2.96 15.668-8.86 22.674-7.122 8.324-15.736 13.133-25.078 12.374a25.21 25.21 0 0 1-.188-3.07c0-7.778 3.385-16.102 9.397-22.913 3.001-3.449 6.82-6.319 11.45-8.611 4.62-2.257 8.99-3.504 13.106-3.717.12 1.092.179 2.184.179 3.263z'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 170 170'><path d='M150.37 130.25c-2.45 5.66-5.35 10.87-8.71 15.66-4.58 6.53-8.33 11.05-11.22 13.56-4.48 4.12-9.28 6.23-14.42 6.35-3.69 0-8.14-1.05-13.32-3.18-5.197-2.12-9.973-3.17-14.34-3.17-4.58 0-9.492 1.05-14.746 3.17-5.262 2.13-9.501 3.24-12.742 3.35-4.929.21-9.842-1.96-14.746-6.52-3.13-2.73-7.045-7.41-11.735-14.04-5.032-7.08-9.169-15.29-12.41-24.65-3.471-10.11-5.211-19.9-5.211-29.378 0-10.857 2.346-20.221 7.045-28.068 3.693-6.303 8.606-11.275 14.755-14.925s12.793-5.51 19.948-5.629c3.915 0 9.049 1.211 15.429 3.591 6.362 2.388 10.443 3.599 12.227 3.599 1.334 0 5.868-1.416 13.565-4.239 7.28-2.618 13.423-3.702 18.445-3.275 13.6 1.097 23.819 6.462 30.62 16.123-12.156 7.366-18.17 17.677-18.05 30.93.107 10.318 3.857 18.901 11.227 25.722 3.344 3.176 7.084 5.62 11.224 7.343-.9 2.605-1.853 5.1-2.851 7.487zM119.36 8.81c0 8.103-2.96 15.668-8.86 22.674-7.122 8.324-15.736 13.133-25.078 12.374a25.21 25.21 0 0 1-.188-3.07c0-7.778 3.385-16.102 9.397-22.913 3.001-3.449 6.82-6.319 11.45-8.611 4.62-2.257 8.99-3.504 13.106-3.717.12 1.092.179 2.184.179 3.263z'/></svg>") center / contain no-repeat;
}

/* Neck: trapezoidal aluminum, narrower at top, curving outward */
.imac-neck {
  width: 26%;
  height: 22px;
  background: linear-gradient(180deg, #c7cacd 0%, #aeb1b4 100%);
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0% 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset;
}
/* Foot: thicker elliptical base, slightly raised */
.imac-foot {
  width: 46%;
  height: 12px;
  background: linear-gradient(180deg, #d0d3d6 0%, #9a9da0 100%);
  border-radius: 0 0 80px 80px / 0 0 30px 30px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.5) inset,
    0 10px 18px rgba(14,18,28,0.18);
}

/* Dark Selected-Work variant — space-grey iMac */
.section.bg-ink .imac-shell {
  background: linear-gradient(180deg, #353841 0%, #1e2128 100%);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.08) inset,
    0 0 0 1px rgba(255,255,255,0.06),
    0 22px 40px rgba(0, 0, 0, 0.55);
}
.section.bg-ink .imac-logo { background: rgba(255,255,255,0.35); }
.section.bg-ink .imac-neck { background: linear-gradient(180deg, #44464d 0%, #25272d 100%); }
.section.bg-ink .imac-foot { background: linear-gradient(180deg, #44464d 0%, #16181c 100%); }

/* In the work card */
.work-card .imac { max-width: 560px; margin: 0 auto; }

/* iMac + iPhone pair */
.imac-pair {
  position: relative;
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding-right: 40px;
}
.imac-pair .imac {
  max-width: none;
}
.imac-pair .iphone {
  position: absolute;
  right: 0;
  bottom: 38px;
  width: 78px;
  z-index: 2;
}

/* iPhone frame */
.iphone-shell {
  width: 100%;
  aspect-ratio: 9 / 19.5;
  background: #14161a;
  border-radius: 14px;
  padding: 4px;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 0 0 1px rgba(0,0,0,0.55),
    0 10px 22px rgba(14, 18, 28, 0.32);
}
.iphone-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  height: 8px;
  background: #000;
  border-radius: 999px;
  z-index: 2;
}
.iphone-screen {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}
.iphone-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

@media (max-width: 720px) {
  .imac-pair { padding-right: 28px; }
  .imac-pair .iphone { width: 58px; bottom: 28px; }
  .imac-pair .android { width: 58px; bottom: 28px; }
}

/* ── Trio layout: iMac flanked by Android (left) + iPhone (right) ── */
.imac-pair.imac-trio {
  padding-left: 56px;
  padding-right: 56px;
}
.imac-pair.imac-trio .imac { max-width: none; }

/* ── Android phone frame ───────────────────────────────────── */
.android {
  position: absolute;
  left: 0;
  bottom: 32px;
  width: 68px;
  z-index: 2;
}
.android-shell {
  width: 100%;
  aspect-ratio: 9 / 19.5;
  /* Slightly squarer than iPhone (radius vs 14% on iPhone) */
  border-radius: 12% / 6%;
  background: #1a1c20;
  position: relative;
  padding: 5px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 0 0 2px #0b0c0f,
    0 10px 22px rgba(14, 18, 28, 0.32);
}
/* Android punch-hole camera — small circle, top center */
.android-punch {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0a0b0e;
  z-index: 2;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
}
.android-screen {
  width: 100%;
  height: 100%;
  border-radius: 9% / 4.4%;
  background: #000;
  overflow: hidden;
  position: relative;
}
.android-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Tighten the trio layout on narrow viewports */
@media (max-width: 720px) {
  .imac-pair.imac-trio { padding-left: 28px; padding-right: 28px; }
  .imac-pair.imac-trio .android { width: 52px; bottom: 28px; }
}

/* ── Selected work (single hero card) ──────────────────────── */
.work .head { margin-bottom: 64px; }
/* Static structure: all 5 project cards live in the DOM (for SEO).
   Only the one with .is-active is visible — work.js toggles the
   class when the pager arrows are clicked. */
.work-card:not(.is-active) { display: none; }
.work-card {
  max-width: 1180px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 56px 64px 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(360px, auto) auto;
  column-gap: 56px;
  row-gap: 40px;
  align-items: center;
}
.work-card .work-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}
.work-card .work-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 360px;
  justify-content: center;
}
.work-card .work-tags {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}
.section.bg-ink .work-card {
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.12);
}
.work-card .ph { aspect-ratio: 4 / 3; }
.work-meta .case-label {
  display: none;
}
.work-meta .work-logo {
  margin-bottom: 8px;
  display: block;
  max-width: 240px;
}
.work-meta .work-logo img {
  display: block;
  height: auto;
  width: auto;
  max-height: 72px;
  max-width: 100%;
}
.section.bg-ink .work-meta .work-logo img {
  filter: brightness(1.05);
}
/* When a logo needs a dark plate behind it (e.g. white-knockout marks) */
.work-meta .work-logo.dark-plate {
  display: inline-flex;
  align-items: center;
  padding: 14px 20px;
  background: #14161a;
  border-radius: 10px;
  width: fit-content;
}
.work-meta .work-logo.dark-plate img {
  height: auto;
  max-height: 48px;
}
.section.bg-ink .work-meta .work-logo {
  background: transparent;
  padding: 0;
}
.section.bg-ink .work-meta .work-logo.dark-plate {
  background: transparent;
  padding: 0;
}
.section.bg-ink .work-meta .work-logo.dark-plate img {
  height: auto;
  max-height: 72px;
}
.work-meta h3 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(40px, 4.2vw, 56px);
  line-height: 1;
  letter-spacing: -0.018em;
}
.section.bg-ink .work-meta h3 { color: var(--bg); }
.work-meta .domain {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}
.work-meta .summary {
  margin: 24px 0 28px;
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.55;
}
.section.bg-ink .work-meta .summary { color: rgba(255,255,255,0.75); }
.work-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.work-tags li {
  font-family: var(--f-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--bg);
}
.section.bg-ink .work-tags li {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.04);
}

.work-pager {
  display: flex; align-items: center; justify-content: center;
  gap: 22px;
  margin-top: 56px;
}
.work-pager button {
  width: 48px; height: 48px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.section.bg-ink .work-pager button { border-color: rgba(255,255,255,0.3); color: var(--bg); }
.work-pager button:hover { background: var(--ink); color: var(--bg); }
.section.bg-ink .work-pager button:hover { background: var(--bg); color: var(--ink); }
.work-pager .count {
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.section.bg-ink .work-pager .count { color: rgba(255,255,255,0.7); }

/* ── Contact form ──────────────────────────────────────────── */
.contact-form {
  margin: 72px auto 0;
  max-width: 640px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-form .field span {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.contact-form input,
.contact-form textarea {
  font: inherit;
  font-family: var(--f-sans);
  font-size: 20px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 22px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  resize: vertical;
  width: 100%;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--ink-mute); }
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 87, 63, 0.12);
}
.contact-form textarea { min-height: 180px; }
.contact-form .form-row {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.contact-form .form-row .btn {
  padding: 18px 36px;
  font-size: 16px;
}
.contact-form .form-note {
  font-size: 14px;
  color: var(--ink-soft);
}
.contact-form .form-note a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
.contact-form .form-note a:hover { text-decoration-color: var(--accent); }
.contact-form .form-error { color: var(--accent-deep); }
.contact-form .btn:disabled { opacity: 0.7; cursor: default; }

/* ── Contact form: success state ───────────────────────────
   Shown by work.js after a successful submit. Editorial card —
   thin rule above, oversized serif thank-you, animated drawn
   check, and a small "sent to / reply within / from" meta row
   so the user knows exactly what happened and what to expect.
   ────────────────────────────────────────────────────────── */
.form-success {
  margin: 72px auto 0;
  max-width: 640px;
  padding: 64px 8px 8px;
  text-align: center;
  border-top: 1px solid var(--rule);
  position: relative;
}
.form-success-mark {
  width: 88px;
  height: 88px;
  margin: 0 auto 36px;
  color: var(--accent);
}
.form-success-mark svg .ring {
  transform-origin: 44px 44px;
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  animation: fs-ring 700ms cubic-bezier(0.22, 0.61, 0.36, 1) 80ms forwards;
}
.form-success-mark svg .tick {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: fs-tick 420ms cubic-bezier(0.22, 0.61, 0.36, 1) 620ms forwards;
}
@keyframes fs-ring {
  to { stroke-dashoffset: 0; }
}
@keyframes fs-tick {
  to { stroke-dashoffset: 0; }
}
.form-success-title {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.form-success-title em {
  font-style: italic;
  color: var(--accent);
}
.form-success-body {
  margin: 28px auto 0;
  max-width: 480px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.form-success-body strong { color: var(--ink); font-weight: 500; }
.form-success-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
  transition: text-decoration-color 220ms ease;
}
.form-success-body a:hover { text-decoration-color: var(--accent); }

.form-success-meta {
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.form-success-meta > div {
  padding: 24px 16px;
  border-right: 1px solid var(--rule);
}
.form-success-meta > div:last-child { border-right: 0; }
.form-success-meta .k {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 10px;
}
.form-success-meta .v {
  font-family: var(--f-display);
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
  /* Truncate long emails gracefully without breaking the grid */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-success-again {
  margin: 40px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  padding: 8px 4px;
  font: inherit;
  font-family: var(--f-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  cursor: pointer;
  border-bottom: 1px solid var(--rule);
  transition: color 220ms ease, border-color 220ms ease;
}
.form-success-again:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Whole card fades + lifts in when shown */
.form-success:not([hidden]) {
  animation: fs-in 520ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@keyframes fs-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .form-success-mark svg .ring,
  .form-success-mark svg .tick { animation: none; stroke-dashoffset: 0; }
  .form-success:not([hidden]) { animation: none; }
}

@media (max-width: 720px) {
  .form-success { padding-top: 48px; }
  .form-success-meta {
    grid-template-columns: 1fr;
  }
  .form-success-meta > div {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .form-success-meta > div:last-child { border-bottom: 0; }
}

@media (max-width: 720px) {
  .contact-form { gap: 24px; }
  .contact-form input,
  .contact-form textarea { font-size: 17px; padding: 18px; }
}

/* ── Contact ───────────────────────────────────────────────── */
.contact .inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.contact .channels {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.contact .channel {
  padding: 36px 24px;
  text-align: center;
  border-right: 1px solid var(--rule);
}
.contact .channel:last-child { border-right: 0; }
.contact .channel .k {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 10px;
}
.contact .channel .v {
  font-family: var(--f-display);
  font-size: 22px;
  letter-spacing: -0.01em;
}
.contact .cta-row {
  margin-top: 56px;
  display: flex; justify-content: center; gap: 14px;
}

/* ── Footer ────────────────────────────────────────────────── */
footer {
  background: var(--ink);
  color: var(--bg);
  padding: 80px var(--gutter) 32px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}
.footer-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}
.footer-brand img {
  display: block;
  height: 32px;
  width: auto;
}
.footer-tag {
  color: rgba(255,255,255,0.6);
  max-width: 50ch;
  margin: 0 auto 56px;
  font-size: 15.5px;
  line-height: 1.55;
}
.footer-rule {
  width: 80px; height: 1px;
  background: rgba(255,255,255,0.3);
  margin: 0 auto 32px;
}
.footer-credit {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  line-height: 1.8;
}
.footer-credit .em {
  display: block;
  color: rgba(255,255,255,0.85);
}
.footer-base {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(255,255,255,0.14);
  font-size: 12.5px;
  color: rgba(255,255,255,0.5);
  display: flex; justify-content: space-between;
  letter-spacing: 0.02em;
}
/* Footer email — same color as surrounding text, brightens on hover */
.footer-email {
  position: relative;
  color: inherit;
  text-decoration: none;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: color 240ms ease, background-size 480ms cubic-bezier(0.65, 0, 0.35, 1);
}
.footer-email:hover {
  color: rgba(255,255,255,0.95);
  background-size: 100% 1px;
}

/* ─────────────────────────────────────────────────────────────
   SCROLL ANIMATIONS — three modes via [data-anim-mode] on <html>
   ─────────────────────────────────────────────────────────────
   Modes: quiet | editorial | cinematic | off
   All animations only touch opacity, transform, clip-path —
   GPU-friendly. Initial hidden state set in default block;
   each mode tweaks the rise distance, duration, easing, stagger.
   ───────────────────────────────────────────────────────────── */

/* Default hidden state (any mode != "off") */
html:not([data-anim-mode="off"]) [data-reveal] {
  --rise: 16px;
  --dur: 700ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --stag: 0ms;
  opacity: 0;
  transform: translateY(var(--rise));
  transition:
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease),
    clip-path var(--dur) var(--ease);
  transition-delay: calc(var(--i, 0) * var(--stag));
  will-change: opacity, transform;
}

/* Revealed state */
html:not([data-anim-mode="off"]) [data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}

/* Image / rule / count variants share the base, but layer on top */

/* Image mask reveal — uncovers from bottom to top */
html:not([data-anim-mode="off"]) [data-reveal="image"] {
  clip-path: inset(100% 0 0 0);
  opacity: 1; /* let the mask do the reveal, not the fade */
  transform: none;
}
html:not([data-anim-mode="off"]) [data-reveal="image"].in {
  clip-path: inset(0 0 0 0);
}

/* Horizontal rule — draws left to right via scaleX */
html:not([data-anim-mode="off"]) [data-reveal="rule"] {
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 1;
}
html:not([data-anim-mode="off"]) [data-reveal="rule"].in {
  transform: scaleX(1);
}

/* Count numbers reveal like text but suppress flash before JS sets value */
html:not([data-anim-mode="off"]) [data-reveal="count"] {
  --rise: 12px;
}

/* ───────── MODE: QUIET ─────────
   Most restrained. Equal fade+rise on everything.            */
html[data-anim-mode="quiet"] [data-reveal] {
  --rise: 16px;
  --dur: 700ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --stag: 0ms;
}

/* ───────── MODE: EDITORIAL ─────────
   Type-led. Short rise, generous timing, soft stagger,
   rules draw, images mask-reveal.                            */
html[data-anim-mode="editorial"] [data-reveal] {
  --rise: 8px;
  --dur: 900ms;
  --ease: cubic-bezier(0.16, 0.84, 0.36, 1);
  --stag: 90ms;
}
html[data-anim-mode="editorial"] [data-reveal="image"] {
  --dur: 1100ms;
}
html[data-anim-mode="editorial"] [data-reveal="rule"] {
  --dur: 1100ms;
}

/* ───────── MODE: CINEMATIC ─────────
   More presence — bigger rise, longer durations, wider
   stagger, slight scale on images, scroll-tied parallax.      */
html[data-anim-mode="cinematic"] [data-reveal] {
  --rise: 32px;
  --dur: 1100ms;
  --ease: cubic-bezier(0.19, 1, 0.22, 1); /* ease-out-expo-ish */
  --stag: 130ms;
}
html[data-anim-mode="cinematic"] [data-reveal="image"] {
  clip-path: inset(0 0 0 0);
  transform: scale(0.94) translateY(40px);
  opacity: 0;
  transition:
    opacity var(--dur) var(--ease),
    transform var(--dur) var(--ease);
}
html[data-anim-mode="cinematic"] [data-reveal="image"].in {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Scroll-tied parallax — only active in cinematic, --py set by JS */
html[data-anim-mode="cinematic"] [data-parallax] {
  transform: translateY(var(--py, 0));
  transition: none;
  will-change: transform;
}

/* ───────── MODE: OFF ─────────
   No motion. Everything visible immediately.                  */
html[data-anim-mode="off"] [data-reveal] { opacity: 1; transform: none; clip-path: none; }

/* Accessibility — collapse everything if user opts out of motion */
@media (prefers-reduced-motion: reduce) {
  html [data-reveal],
  html [data-reveal].in {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
    transition: none !important;
  }
  html [data-parallax] { transform: none !important; }
}

/* ─────────────────────────────────────────────────────────────
   MOUSE INTERACTIONS — text tilt, icon micro-animations, CTAs
   ─────────────────────────────────────────────────────────────
   Toggled globally by [data-hover-fx="off"] on <html>.
   ───────────────────────────────────────────────────────────── */

/* ── 1. Text tilt — display headings lean toward cursor ───── */
html:not([data-hover-fx="off"]) [data-tilt] {
  --mx: 0;
  --my: 0;
  --tilt-amt: 6px;
  display: inline-block;
  transition: transform 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
  transform: translate3d(
    calc(var(--mx) * var(--tilt-amt)),
    calc(var(--my) * var(--tilt-amt) * 0.6),
    0
  );
  will-change: transform;
}
/* Italic emphases inside a tilting heading lean a bit more —
   creates a subtle parallax between the body type and the
   highlighted phrases. */
html:not([data-hover-fx="off"]) [data-tilt] em {
  display: inline-block;
  transition: transform 360ms cubic-bezier(0.22, 0.61, 0.36, 1);
  transform: translate3d(
    calc(var(--mx) * var(--tilt-amt) * 0.6),
    calc(var(--my) * var(--tilt-amt) * 0.35),
    0
  );
}

/* ── 2. Icon hover micro-animations ───────────────────────── */
/* Generic baseline: icons get a tiny scale + tint shift,
   then per-icon classes layer their unique behavior on top. */
html:not([data-hover-fx="off"]) .svc-icon,
html:not([data-hover-fx="off"]) .focus-ico,
html:not([data-hover-fx="off"]) .timeline .node .dot,
html:not([data-hover-fx="off"]) .msg-icon {
  transition: transform 400ms cubic-bezier(0.22, 0.61, 0.36, 1),
              background 300ms ease, color 300ms ease,
              border-color 300ms ease;
}
html:not([data-hover-fx="off"]) .service:hover .svc-icon,
html:not([data-hover-fx="off"]) .focus-item:hover .focus-ico,
html:not([data-hover-fx="off"]) .timeline .node:hover .dot {
  background: var(--accent);
  color: var(--paper);
  border-color: var(--accent);
}

/* All inline SVG icons: stable transforms + transitions */
html:not([data-hover-fx="off"]) [class^="ic-"],
html:not([data-hover-fx="off"]) [class*=" ic-"] {
  transition: transform 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center;
  overflow: visible; /* let dramatic transforms extend past the SVG viewBox */
}
html:not([data-hover-fx="off"]) [class^="ic-"] *,
html:not([data-hover-fx="off"]) [class*=" ic-"] * {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 280ms ease,
              stroke-dashoffset 600ms ease,
              stroke 300ms ease;
}

/* Universal icon baseline — every icon clearly moves on hover.
   Per-icon rules below layer their personality on top. */
.service:hover .ic-web,
.service:hover .ic-apps,
.service:hover .ic-admin,
.service:hover .ic-integrate,
.service:hover .ic-cms,
.timeline .node:hover .ic-discover,
.timeline .node:hover .ic-uxui,
.timeline .node:hover .ic-design,
.timeline .node:hover .ic-build,
.timeline .node:hover .ic-support,
.focus-item:hover .ic-news,
.focus-item:hover .ic-controls,
.focus-item:hover .ic-envelope {
  transform: scale(1.15);
}

/* — Service: ic-web — three address-bar dots pulse in sequence */
.ic-web circle:nth-of-type(1) { transition-delay: 0ms; }
.ic-web circle:nth-of-type(2) { transition-delay: 80ms; }
.ic-web circle:nth-of-type(3) { transition-delay: 160ms; }
.service:hover .ic-web circle { transform: scale(2.6); }

/* — Service: ic-apps — laptop + phone tilt apart */
.service:hover .ic-apps rect:nth-of-type(1) { transform: rotate(-6deg); }
.service:hover .ic-apps rect:nth-of-type(2) { transform: rotate(6deg); }
.service:hover .ic-apps circle { transform: translateY(-1px) scale(1.4); }

/* — Service: ic-admin — sidebar rows light up like a cursor scanning */
.ic-admin path:nth-of-type(3),
.ic-admin path:nth-of-type(4),
.ic-admin path:nth-of-type(5),
.ic-admin path:nth-of-type(6) { transform-origin: left center; transform: scaleX(0.4); }
.service:hover .ic-admin path:nth-of-type(3) { transform: scaleX(1); transition-delay: 0ms; }
.service:hover .ic-admin path:nth-of-type(4) { transform: scaleX(1); transition-delay: 90ms; }
.service:hover .ic-admin path:nth-of-type(5) { transform: scaleX(1); transition-delay: 180ms; }
.service:hover .ic-admin path:nth-of-type(6) { transform: scaleX(1); transition-delay: 270ms; }

/* — Service: ic-integrate — three nodes spin around their triangle */
.service:hover .ic-integrate { transform: rotate(120deg) scale(1.1); transition: transform 900ms cubic-bezier(0.22, 0.61, 0.36, 1); }
.ic-integrate { transition: transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1); }

/* — Service: ic-cms — rows cascade right */
.service:hover .ic-cms rect:nth-of-type(1) { transform: translateX(0); }
.service:hover .ic-cms rect:nth-of-type(2) { transform: translateX(4px); transition-delay: 80ms; }
.service:hover .ic-cms rect:nth-of-type(3) { transform: translateX(8px); transition-delay: 160ms; }
.service:hover .ic-cms rect:nth-of-type(4) { transform: translateX(4px); transition-delay: 240ms; }

/* — Process: ic-discover — magnifier zooms in */
.timeline .node:hover .ic-discover circle { transform: scale(1.3); }
.timeline .node:hover .ic-discover path { transform: translate(4px, 4px); }

/* — Process: ic-plan — gentle scale + tilt */
.timeline .node:hover .ic-plan { transform: rotate(-8deg) scale(1.18); transition: transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.ic-plan { transition: transform 400ms cubic-bezier(0.22, 0.61, 0.36, 1); }

/* — Process: ic-uxui — bottom rows draw in */
.ic-uxui path:nth-of-type(3),
.ic-uxui path:nth-of-type(4) { transform-origin: left center; transform: scaleX(0.3); }
.timeline .node:hover .ic-uxui path:nth-of-type(3) { transform: scaleX(1); }
.timeline .node:hover .ic-uxui path:nth-of-type(4) { transform: scaleX(1); transition-delay: 120ms; }

/* — Process: ic-design — pen tip lifts */
.timeline .node:hover .ic-design { transform: rotate(-14deg) translate(-2px, -2px) scale(1.12); transition: transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.ic-design { transition: transform 400ms cubic-bezier(0.22, 0.61, 0.36, 1); }

/* — Process: ic-build — brackets spread, slash leans */
.timeline .node:hover .ic-build path:nth-of-type(1) { transform: translateX(-4px); }
.timeline .node:hover .ic-build path:nth-of-type(2) { transform: translateX(4px); }
.timeline .node:hover .ic-build path:nth-of-type(3) { transform: rotate(14deg) scale(1.15); }

/* — Process: ic-support — shield scales, check draws  */
.ic-support path:nth-of-type(2) {
  stroke-dasharray: 16;
  stroke-dashoffset: 0;
}
.timeline .node:hover .ic-support { transform: scale(1.18) rotate(-5deg); transition: transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.ic-support { transition: transform 400ms cubic-bezier(0.22, 0.61, 0.36, 1); }
@keyframes drawCheck {
  0%   { stroke-dashoffset: 16; }
  100% { stroke-dashoffset: 0; }
}
.timeline .node:hover .ic-support path:nth-of-type(2) {
  animation: drawCheck 600ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* — Focus: ic-news — text-lines pulse in sequence */
.ic-news path:nth-of-type(1) { transition-delay: 0ms; }
.ic-news path:nth-of-type(2) { transition-delay: 80ms; }
.ic-news path:nth-of-type(3) { transition-delay: 160ms; }
.focus-item:hover .ic-news path { transform-origin: left center; transform: scaleX(1.15) translateY(-1px); }
.focus-item:hover .ic-news rect:nth-of-type(2) { transform: scale(1.1); transform-origin: left center; }

/* — Focus: ic-globe — rotates like spinning earth */
.focus-item:hover .ic-globe { transform: rotate(-45deg) scale(1.1); transition: transform 1100ms cubic-bezier(0.22, 0.61, 0.36, 1); }
.ic-globe { transition: transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1); }
.focus-item:hover .ic-globe ellipse { transform: scaleX(0.4); transition: transform 800ms cubic-bezier(0.22, 0.61, 0.36, 1); }

/* — Focus: ic-controls — handle dots slide on their tracks */
.focus-item:hover .ic-controls circle:nth-of-type(1) { transform: translateX(8px) scale(1.2); }
.focus-item:hover .ic-controls circle:nth-of-type(2) { transform: translateX(-7px) scale(1.2); transition-delay: 90ms; }
.focus-item:hover .ic-controls circle:nth-of-type(3) { transform: translateX(9px) scale(1.2); transition-delay: 180ms; }

/* — Focus: ic-envelope — closed mail icon fades out, Tabler
   mail-opened (open envelope) fades in.  */
.ic-envelope .env-open {
  opacity: 0;
  transition: opacity 360ms ease;
}
.ic-envelope .env-closed {
  transition: opacity 220ms ease;
}
.focus-item:hover .ic-envelope .env-closed { opacity: 0; }
.focus-item:hover .ic-envelope .env-open {
  opacity: 1;
  transition-delay: 120ms;
}

/* — Mission: ic-team — two people lean toward each other.
   Hover trigger is the ICON itself, not the surrounding text block. */
.ic-team circle:nth-of-type(1) { transform-origin: 13px 14px; }
.ic-team circle:nth-of-type(2) { transform-origin: 23px 14px; }
.mission-body .msg-icon:hover .ic-team circle:nth-of-type(1) { transform: translate(2px, -1px); }
.mission-body .msg-icon:hover .ic-team circle:nth-of-type(2) { transform: translate(-2px, -1px); }
.mission-body .msg-icon:hover .ic-team path:nth-of-type(1) { transform: translateX(2px); }
.mission-body .msg-icon:hover .ic-team path:nth-of-type(2) { transform: translateX(-2px); }
.mission-body .msg-icon:hover .ic-team { transform: scale(1.1); }

/* — Mission: ic-senior — pinnacle lifts, foundation widens */
.mission-body .msg-icon:hover .ic-senior circle { transform: translateY(-2px) scale(1.15); }
.mission-body .msg-icon:hover .ic-senior path:nth-of-type(1) { transform: translate(-1px, 1px); }
.mission-body .msg-icon:hover .ic-senior path:nth-of-type(2) { transform: translate(1px, 1px); }
.mission-body .msg-icon:hover .ic-senior path:nth-of-type(3) { transform: scaleX(1.1); transform-origin: center; }
.mission-body .msg-icon:hover .ic-senior { transform: scale(1.12); }

/* Icon-only hover — the bg fill and color change only when the
   pointer is over the icon, not the whole text block. */
html:not([data-hover-fx="off"]) .mission-body .msg-icon {
  transition: transform 400ms cubic-bezier(0.22, 0.61, 0.36, 1),
              background 320ms ease, color 320ms ease;
  cursor: default;
}
html:not([data-hover-fx="off"]) .mission-body .msg-icon:hover {
  background: var(--accent);
  color: var(--paper);
}

/* — Contact channels — subtle feedback on hover */
html:not([data-hover-fx="off"]) .contact .channel {
  transition: transform 380ms cubic-bezier(0.22, 0.61, 0.36, 1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
html:not([data-hover-fx="off"]) .contact .channel:not([href]) { cursor: default; }
html:not([data-hover-fx="off"]) .contact .channel .k {
  transition: color 280ms ease, letter-spacing 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
html:not([data-hover-fx="off"]) .contact .channel .v {
  display: inline-block;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: 0 100%;
  transition: background-size 480ms cubic-bezier(0.65, 0, 0.35, 1),
              transform 380ms cubic-bezier(0.22, 0.61, 0.36, 1);
  padding-bottom: 4px;
}
html:not([data-hover-fx="off"]) .contact .channel:hover {
  transform: translateY(-3px);
}
html:not([data-hover-fx="off"]) .contact .channel:hover .k {
  color: var(--accent);
  letter-spacing: 0.28em;
}
html:not([data-hover-fx="off"]) .contact .channel[href]:hover .v {
  background-size: 100% 1px;
}

/* ===================================================================
   TEXT SHIFT — small “nudge right” feedback on hover for non-title text.
   Main display titles keep the cursor-tilt; everything else uses this.
   =================================================================== */
html:not([data-hover-fx="off"]) .service .t,
html:not([data-hover-fx="off"]) .focus-item h3,
html:not([data-hover-fx="off"]) .mission-body .msg-t,
html:not([data-hover-fx="off"]) .timeline .node .pname,
html:not([data-hover-fx="off"]) .mission-stats dd,
html:not([data-hover-fx="off"]) .mission-stats dt,
html:not([data-hover-fx="off"]) .work-meta .domain,
html:not([data-hover-fx="off"]) .work-meta .summary,
html:not([data-hover-fx="off"]) .nav .links a,
html:not([data-hover-fx="off"]) .work-tags li,
html:not([data-hover-fx="off"]) .service .d,
html:not([data-hover-fx="off"]) .focus-item p,
html:not([data-hover-fx="off"]) .timeline .node .pbody {
  transition: transform 360ms cubic-bezier(0.22, 0.61, 0.36, 1),
              color 280ms ease;
  will-change: transform;
}

/* Title text shifts a bit more, body text a touch less — keeps the
   hierarchy readable. */
html:not([data-hover-fx="off"]) .service:hover .t { transform: translateX(6px); }
html:not([data-hover-fx="off"]) .service:hover .d { transform: translateX(3px); transition-delay: 60ms; }
html:not([data-hover-fx="off"]) .focus-item:hover h3 { transform: translateX(6px); }
html:not([data-hover-fx="off"]) .focus-item:hover p { transform: translateX(3px); transition-delay: 60ms; }
html:not([data-hover-fx="off"]) .mission-body .msg:hover .msg-t { transform: translateX(5px); }
html:not([data-hover-fx="off"]) .timeline .node:hover .pname { transform: translateY(-2px); }
html:not([data-hover-fx="off"]) .nav .links a:hover { transform: translateX(3px); }
html:not([data-hover-fx="off"]) .work-tags li {
  transition: transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1), background 200ms;
}
html:not([data-hover-fx="off"]) .work-tags li:hover { transform: translateX(3px); }

/* ===================================================================
   Mission stats (Founded / Reach / Delivered / Saved) — hover feedback.
   No href, but they get a tile-style lift + accent color shift.
   =================================================================== */
html:not([data-hover-fx="off"]) .mission-stats > div {
  transition: transform 380ms cubic-bezier(0.22, 0.61, 0.36, 1);
  cursor: default;
}
html:not([data-hover-fx="off"]) .mission-stats > div:hover {
  transform: translateY(-4px);
}
html:not([data-hover-fx="off"]) .mission-stats > div:hover dt {
  color: var(--accent);
  letter-spacing: 0.28em;
}
html:not([data-hover-fx="off"]) .mission-stats > div:hover dd {
  color: var(--accent);
}
html:not([data-hover-fx="off"]) .mission-stats dd {
  transition: color 280ms ease;
}
@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  20%      { transform: scale(1.3); }
  40%      { transform: scale(0.92); }
  60%      { transform: scale(1.18); }
  80%      { transform: scale(0.98); }
}
.focus-item:hover .ic-donate { animation: heartBeat 900ms cubic-bezier(0.22, 0.61, 0.36, 1); transform-origin: center; }

/* ── 3. Distinct CTA treatment — applies to .btn ──────────── */
/* The signature: text shifts right, a paper-bronze fill sweeps
   in from the left behind it, the arrow extends further than
   the existing 3px nudge. Same vocabulary on every action so
   the user learns it. */
html:not([data-hover-fx="off"]) .btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color 360ms cubic-bezier(0.22, 0.61, 0.36, 1),
              border-color 360ms ease;
}
html:not([data-hover-fx="off"]) .btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-deep);
  transform: translateX(-101%);
  transition: transform 480ms cubic-bezier(0.65, 0, 0.35, 1);
  z-index: -1;
}
html:not([data-hover-fx="off"]) .btn:hover::before { transform: translateX(0); }
html:not([data-hover-fx="off"]) .btn > * {
  transition: transform 380ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
html:not([data-hover-fx="off"]) .btn:hover { transform: translateY(-1px); }
html:not([data-hover-fx="off"]) .btn:hover .arr { transform: translateX(6px); }

/* Ghost button: same swipe but in ink, text turns light */
html:not([data-hover-fx="off"]) .btn.ghost::before { background: var(--ink); }
html:not([data-hover-fx="off"]) .hero .btn.ghost::before { background: rgba(244,241,235,0.12); }

/* Nav CTA: the underline that lives nowhere right now should
   sweep in too — reuse the same pattern */
html:not([data-hover-fx="off"]) .nav .cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
html:not([data-hover-fx="off"]) .nav .cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateX(-101%);
  transition: transform 420ms cubic-bezier(0.65, 0, 0.35, 1);
  z-index: -1;
}
html:not([data-hover-fx="off"]) .nav .cta:hover::before { transform: translateX(0); }

/* Pager arrows in Selected Work — distinct circle-fill */
html:not([data-hover-fx="off"]) .work-pager button {
  transition: background 320ms ease, color 320ms ease,
              border-color 320ms ease, transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
html:not([data-hover-fx="off"]) .work-pager button:hover { transform: scale(1.08); }

html:not([data-hover-fx="off"]) .nav .links a {
  position: relative;
}
html:not([data-hover-fx="off"]) .nav .links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 320ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
html:not([data-hover-fx="off"]) .nav .links a:hover::after { transform: scaleX(1); }

/* Accessibility — collapse hover effects under reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html [data-tilt] { transform: none !important; }
  html [data-tilt] em { transform: none !important; }
  html [class^="ic-"] *, html [class*=" ic-"] * { transition: none !important; transform: none !important; }
  html .btn::before, html .nav .cta::before { display: none; }
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --gutter: 26px; }
  .nav .links { display: none; }
  .section { padding: 90px var(--gutter); }
  .mission .meta, .mission-body, .mission-stats, .contact .channels { grid-template-columns: 1fr; gap: 24px; }
  .service { grid-template-columns: 50px 1fr; }
  .service .d { grid-column: 1 / -1; }
  .work-card { grid-template-columns: 1fr; padding: 32px; }
  .work-card .work-meta { min-height: 0; }
  .work-card .work-visual { min-height: 0; }
  .footer-base { flex-direction: column; gap: 12px; }
}

/* ── Mobile (phones) — focused fixes ───────────────────────── */
@media (max-width: 720px) {
  /* HERO: tighter top breathing room, larger hero image */
  .hero {
    padding-top: 60px;
  }
  .hero h1 {
    font-size: clamp(48px, 11vw, 80px);
  }
  .hero .lede {
    margin-top: 24px;
    font-size: 17px;
  }

  /* HERO CTAs: stack vertically, full width. Same vocabulary as
     a mobile app primary/secondary action — no side-by-side cramping. */
  .hero .cta-row {
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
    width: 100%;
  }
  .hero .cta-row .btn {
    width: 100%;
    justify-content: center;
    padding: 18px 24px;
  }

  /* HERO banner image: keep the full laptop visible on mobile,
     no horizontal crop. Sits inside the viewport with a small
     gutter so nothing gets clipped. */
  .hero-banner {
    margin-top: 32px;
    padding: 0 var(--gutter);
    overflow: visible;
  }
  .hero-banner img {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
  }

  /* MISSION: stack each .msg so the icon sits on its own row at
     the top-left, then the heading, then the description — all
     left-aligned in a single column. */
  .mission-body .msg {
    display: block;
    text-align: left;
  }
  .mission-body .msg-icon {
    margin-bottom: 20px;
  }
  .mission-body .msg-t {
    margin-bottom: 12px;
  }
  .mission-body .msg-d {
    grid-column: auto;
    max-width: none;
  }

  /* MISSION STATS: stack each Founded/Delivered/Saved/Reach tile
     with a thin rule between them so the four blocks don't blur
     into one continuous column. */
  .mission-stats {
    margin-top: 40px;
    gap: 0;
  }
  .mission-stats > div {
    padding: 28px 0;
    border-bottom: 1px solid var(--rule);
  }
  .mission-stats > div:first-child { padding-top: 8px; }
  .mission-stats > div:last-child  { border-bottom: 0; padding-bottom: 8px; }

  /* WHAT WE DO: stack each .service vertically — icon → title →
     description, all left-aligned. (Desktop keeps the 3-column
     grid; the 900px breakpoint's grid override is replaced here.) */
  .section #services + * .service,
  #services .service {
    display: block;
    text-align: left;
    padding: 32px 0;
  }
  #services .service .svc-icon {
    margin: 0 0 20px 0;
  }
  #services .service .t {
    margin-bottom: 14px;
    font-size: clamp(28px, 8vw, 40px);
  }
  /* SELECTED WORK: tighter padding, no forced 360px row height,
     less air around the device visual and between description
     and tags. */
  .work-card {
    padding: 28px 22px;
    grid-template-rows: auto auto auto;
    row-gap: 24px;
  }
  .work-card .work-visual,
  .work-card .work-meta {
    min-height: 0;
  }
  .work-meta .summary {
    margin: 16px 0 8px;
  }
  .work-card .work-tags {
    padding-top: 18px;
  }
}
