/* =============================================================
   AHM Business Intelligence · styles.css
   Design system + sections for the AHM marketing site.
   Single bundle — no @imports (HTTP/1.1 and HTTP/2 friendly).
   ============================================================= */

/* ---------- 0. Local fonts ---------- */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("../fonts/geist-latin-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/geist-mono-latin-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/fraunces-latin-variable.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/fraunces-italic-latin-variable.woff2") format("woff2");
}

/* ---------- 1. Design tokens ---------- */
:root {
  --bg: #f3f1ec;
  --bg-soft: #ede9e1;
  --surface: #ffffff;
  --ink: #121210;
  --ink-2: #2a2a26;
  --muted: #6a665d;
  --muted-2: #908b80;
  --line: rgba(18,18,16,0.08);
  --line-strong: rgba(18,18,16,0.16);
  /* Bronze/charcoal accent family — derived from the AHM logo mark */
  --accent: #8a5a36;
  --accent-2: #6e4527;
  --warm: #b8704a;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: #f6f4ef; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- 3. Utility helpers ---------- */
.wrap {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: 28px;
}
@media (max-width: 768px) { .wrap { padding-inline: 18px; } }

.u-span-2 { grid-column: 2 / -1; }
.block--soft { background: var(--bg-soft); }

/* Film grain overlay — fixed, pointer-events-none */
.grain {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  opacity: 0.035; mix-blend-mode: multiply;
  /* numOctaves=1: a second octave adds a low-frequency luminance drift that
     shows up as vertical bands at the 220px tile boundaries on large flat areas */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='1' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- 4. Reveal-on-view utility ---------- */
.reveal {
  opacity: 0; transform: translateY(28px); filter: blur(6px);
  transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
  will-change: transform, opacity, filter;
}
.reveal.in { opacity: 1; transform: none; filter: none; }
.reveal.d1 { transition-delay: .06s; }
.reveal.d2 { transition-delay: .12s; }
.reveal.d3 { transition-delay: .18s; }
.reveal.d4 { transition-delay: .24s; }
.reveal.d5 { transition-delay: .30s; }

/* ---------- 5. Floating glass nav ---------- */
.nav-shell {
  position: fixed; top: 0; left: 0; right: 0; z-index: 80;
  display: flex; justify-content: center;
  padding: 18px 16px;
  pointer-events: none;
}
.nav {
  pointer-events: auto;
  display: flex; align-items: center; gap: 28px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(18,18,16,0.06);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 24px 40px -28px rgba(18,18,16,0.15);
  border-radius: 999px;
  padding: 8px 8px 8px 22px;
  transition: transform .6s var(--ease), background .4s var(--ease);
}
.nav.scrolled { background: rgba(255,255,255,0.86); }
.nav-brand {
  font-family: "Geist", sans-serif;
  font-weight: 600;
  letter-spacing: 0.1em;
  font-size: 15px;
  display: inline-flex; align-items: center; gap: 11px;
}
.nav-brand .mark {
  width: 32px; height: 32px; border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(18,18,16,0.08);
}
.nav-brand .brand-text { display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.nav-brand small {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 8px; font-weight: 400;
  letter-spacing: 0.21em;
  text-transform: uppercase;
  color: var(--muted);
}
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1 } 50% { transform: scale(0.78); opacity: 0.7 } }
.nav-links {
  display: flex; gap: 22px;
  font-size: 13.5px; color: var(--ink-2);
}
.nav-links a { transition: color .3s var(--ease); }
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink);
  color: #f6f4ef;
  border-radius: 999px;
  padding: 9px 9px 9px 18px;
  font-size: 13.5px;
  letter-spacing: 0.01em;
  transition: transform .35s var(--ease), background .35s var(--ease);
}
.nav-cta:hover { background: var(--accent-2); }
.nav-cta:active { transform: translateY(1px) scale(0.98); }
.nav-cta .ico {
  width: 26px; height: 26px; border-radius: 999px;
  background: rgba(255,255,255,0.12);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .4s var(--ease);
}
.nav-cta:hover .ico { transform: translate(2px,-1px) rotate(-2deg); }
.nav-cta svg { width: 12px; height: 12px; stroke: #f6f4ef; }

.menu-btn { display: none; }
@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 999px;
    background: var(--ink); color: #f6f4ef;
  }
  .menu-btn span { display:block; width: 14px; height: 1.2px; background: #f6f4ef; position: relative; }
  .menu-btn span::before, .menu-btn span::after {
    content: ""; position: absolute; left: 0; width: 14px; height: 1.2px; background: #f6f4ef;
    transition: transform .4s var(--ease);
  }
  .menu-btn span::before { top: -5px; }
  .menu-btn span::after { top: 5px; }
  .menu-open .menu-btn span { background: transparent; }
  .menu-open .menu-btn span::before { transform: translateY(5px) rotate(45deg); }
  .menu-open .menu-btn span::after { transform: translateY(-5px) rotate(-45deg); }
}

.menu-modal {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(243,241,236,0.92);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .55s var(--ease);
}
.menu-open .menu-modal { opacity: 1; pointer-events: auto; }
.menu-modal ul { list-style: none; padding: 0; margin: 0; text-align: center; }
.menu-modal li {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(36px, 8vw, 72px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
  opacity: 0; transform: translateY(28px); filter: blur(6px);
  transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s var(--ease);
}
.menu-open .menu-modal li { opacity: 1; transform: none; filter: none; }
.menu-open .menu-modal li:nth-child(1) { transition-delay: .08s; }
.menu-open .menu-modal li:nth-child(2) { transition-delay: .14s; }
.menu-open .menu-modal li:nth-child(3) { transition-delay: .20s; }
.menu-open .menu-modal li:nth-child(4) { transition-delay: .26s; }
.menu-open .menu-modal li:nth-child(5) { transition-delay: .32s; }
.menu-inner { display: flex; flex-direction: column; align-items: center; gap: 34px; }
/* CTA + contact enter last, after the nav links have staggered in */
.menu-cta, .menu-contact {
  opacity: 0; transform: translateY(28px); filter: blur(6px);
  transition: opacity .7s var(--ease), transform .7s var(--ease), filter .7s var(--ease);
}
.menu-open .menu-cta { opacity: 1; transform: none; filter: none; transition-delay: .40s; }
.menu-open .menu-contact { opacity: 1; transform: none; filter: none; transition-delay: .48s; }
.menu-contact {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: "Geist Mono", monospace;
  font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
}
.menu-contact a,
.menu-contact span { color: var(--muted); transition: color .3s var(--ease); }
.menu-contact a:hover { color: var(--ink); }

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  padding-top: 140px;
  padding-bottom: 80px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: -10% -20% auto auto; width: 70vw; height: 70vw;
  background: radial-gradient(closest-side, rgba(138,90,54,0.10), rgba(138,90,54,0) 70%);
  z-index: 0; pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; bottom: -30%; left: -10%; width: 60vw; height: 60vw;
  background: radial-gradient(closest-side, rgba(184,112,74,0.08), rgba(184,112,74,0) 70%);
  z-index: 0; pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 80px;
  align-items: end;
  margin-top: auto;
}
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 48px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 7px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
}
.eyebrow .pulse {
  width: 7px; height: 7px; border-radius: 999px; background: var(--accent);
  box-shadow: 0 0 0 3px rgba(138,90,54,0.18);
  animation: pulse 3s var(--ease) infinite;
  flex: 0 0 7px;
}
/* Keep the hero pill on a single line on narrow screens (incl. real
   390px phones, not just the 500px dev-window minimum). */
@media (max-width: 620px) {
  .eyebrow { font-size: 9px; letter-spacing: 0.1em; padding: 6px 11px; gap: 8px; }
}

h1.display {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(44px, 9.2vw, 144px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 28px 0 0;
}
@media (max-width: 520px) {
  h1.display { font-size: clamp(40px, 11.4vw, 56px); }
}
h1.display em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}
h1.display .underline {
  display: inline-block; position: relative;
  background-image: linear-gradient(transparent 84%, rgba(184,112,74,0.78) 84%, rgba(184,112,74,0.78) 96%, transparent 96%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.hero-meta {
  display: flex; flex-direction: column; gap: 30px;
  padding-bottom: 8px;
}
.hero-lead {
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 46ch;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: 6px;
}

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 999px;
  padding: 12px 12px 12px 22px;
  font-size: 14.5px;
  letter-spacing: 0.005em;
  transition: transform .35s var(--ease), background .35s var(--ease), color .3s var(--ease);
  border: 1px solid transparent;
  will-change: transform;
  /* Pill buttons must never wrap — a two-line pill reads as a layout bug */
  white-space: nowrap;
}
.btn .ico {
  width: 30px; height: 30px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .45s var(--ease);
}
.btn svg { width: 12px; height: 12px; }
.btn-primary { background: var(--ink); color: #f6f4ef; }
.btn-primary .ico { background: rgba(255,255,255,0.12); }
.btn-primary svg { stroke: #f6f4ef; }
.btn-primary:hover { background: var(--accent-2); }
.btn-primary:hover .ico { transform: translate(2px,-1px); }
.btn-secondary {
  background: rgba(255,255,255,0.66);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-secondary .ico { background: rgba(18,18,16,0.06); }
.btn-secondary svg { stroke: var(--ink); }
.btn-secondary:hover { background: var(--surface); }
.btn:active { transform: translateY(1px) scale(0.985); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.hero-foot {
  margin-top: 80px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  font-family: "Geist Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-foot .stats { display: flex; gap: 36px; flex-wrap: wrap; }
.hero-foot strong {
  display: block;
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-style: italic;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-transform: none;
  margin-top: 6px;
}
@media (max-width: 720px) {
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .hero-foot .stats { gap: 22px; }
}

/* ---------- 8. Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line);
  background: var(--bg-soft);
  overflow: hidden;
  padding: 22px 0;
}
.marquee-track {
  display: flex; gap: 56px;
  white-space: nowrap;
  animation: scroll 38s linear infinite;
  font-family: "Geist Mono", monospace;
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.marquee-track span { display: inline-flex; align-items: center; gap: 18px; }
.marquee-track svg { width: 14px; height: 14px; opacity: 0.55; }
@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- 9. Scroll-tied video sequence ---------- */
.seq {
  position: relative;
  height: 320vh;
  background: var(--ink);
}
.seq-stick {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #0c0c0a;
}
.seq-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.06) brightness(0.84);
}
.seq-vignette {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg,
      rgba(0,0,0,0.58) 0%,
      rgba(0,0,0,0.28) 16%,
      rgba(0,0,0,0) 38%,
      rgba(0,0,0,0) 48%,
      rgba(0,0,0,0.42) 70%,
      rgba(0,0,0,0.74) 92%,
      rgba(0,0,0,0.84) 100%),
    linear-gradient(100deg,
      rgba(0,0,0,0.55) 0%,
      rgba(0,0,0,0.18) 28%,
      rgba(0,0,0,0) 55%),
    radial-gradient(ellipse 90% 70% at 50% 60%, rgba(0,0,0,0) 40%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
}
.seq-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(28px, 5vw, 64px);
  color: #f4f1ea;
  z-index: 2;
}
.seq-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  font-family: "Geist Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(244,241,234,0.82);
  text-shadow: 0 1px 18px rgba(0,0,0,0.72), 0 1px 2px rgba(0,0,0,0.4);
}
.seq-progress {
  display: flex; align-items: center; gap: 14px;
}
.seq-progress .bar {
  width: 220px; height: 1px; background: rgba(244,241,234,0.18); position: relative; overflow: hidden;
}
.seq-progress .bar i {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%; background: #f4f1ea;
  transition: width .15s var(--ease);
}
.seq-stage { font-variant-numeric: tabular-nums; }
.seq-bottom { max-width: 1100px; }
.seq-chapter {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: "Geist Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(244,241,234,0.78);
  margin-bottom: 22px;
  text-shadow: 0 1px 18px rgba(0,0,0,0.72), 0 1px 2px rgba(0,0,0,0.4);
}
.seq-chapter b { color: #f4f1ea; font-weight: 500; }
.seq-headlines { position: relative; min-height: clamp(140px, 22vh, 260px); }
.seq-head {
  position: absolute; inset: 0;
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(34px, 6vw, 92px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  color: #f4f1ea;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  will-change: transform, opacity;
  text-shadow: 0 2px 28px rgba(0,0,0,0.55), 0 1px 2px rgba(0,0,0,0.25);
}
.seq-head em { font-style: italic; color: #e7d3ba; }
.seq-head.active { opacity: 1; transform: none; }
.seq-sub {
  margin-top: clamp(22px, 3.2vw, 56px);
  max-width: 58ch;
  color: rgba(244,241,234,0.88);
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.55;
  min-height: 3em;
  position: relative;
  text-shadow: 0 1px 18px rgba(0,0,0,0.55), 0 1px 2px rgba(0,0,0,0.3);
}
.seq-sub span {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(14px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.seq-sub span.active { opacity: 1; transform: none; }

@media (max-width: 720px) {
  .seq { height: 280vh; }
  .seq-overlay { padding-top: clamp(72px, 14vw, 96px); }
  .seq-progress .bar { width: 120px; }
  .seq-top .seq-stage { display: none; }
  .seq-top > div:last-child:not(.seq-progress) { display: none; }
}

/* ---------- 10. Section base ---------- */
section.block { padding: clamp(90px, 12vw, 160px) 0; position: relative; }
.section-head {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 64px;
}
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; gap: 28px; margin-bottom: 40px; } }
.section-head h2 {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(40px, 5.4vw, 84px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 18px 0 0;
  color: var(--ink);
}
.section-head h2 em { font-style: italic; color: var(--accent); font-weight: 300; }
.section-head p {
  color: var(--ink-2);
  font-size: clamp(16px, 1.2vw, 18.5px);
  line-height: 1.55;
  max-width: 52ch;
  margin: 0;
}
/* Keep the eyebrow pill from stretching to fill its grid cell */
.section-head .eyebrow { justify-self: start; align-self: end; }

/* ---------- 11. Services (asymmetric bento) ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(0, auto);
  gap: 18px;
}
.service {
  position: relative;
  background: rgba(255,255,255,0.65);
  border: 1px solid var(--line);
  padding: 6px;
  border-radius: var(--r-lg);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 30px 50px -38px rgba(18,18,16,0.18);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.service:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.95) inset,
    0 40px 70px -38px rgba(18,18,16,0.24);
}
.service-inner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--r-lg) - 6px);
  padding: clamp(26px, 3vw, 40px);
  height: 100%;
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}
.service .num {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}
.service h3 {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(26px, 2.5vw, 38px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--ink);
}
.service h3 em { font-style: italic; color: var(--accent); font-weight: 300; }
.service p {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
  margin: 0;
  max-width: 44ch;
}
.service ul {
  list-style: none; padding: 0; margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.service ul li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
}
.service ul li::before {
  content: ""; width: 5px; height: 5px; margin-top: 8px;
  border-radius: 999px; background: var(--accent);
  flex: 0 0 5px;
}
.s-wide  { grid-column: span 7; }
.s-tall  { grid-column: span 5; grid-row: span 2; }
.s-half  { grid-column: span 7; }
.s-third { grid-column: span 4; }
.s-twothird { grid-column: span 8; }
.s-full  { grid-column: span 12; }
/* Full-width card: copy left, list right — keeps the row from feeling empty */
.s-full .service-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  grid-template-rows: auto auto 1fr;
  column-gap: clamp(32px, 5vw, 80px);
  row-gap: 18px;
}
.s-full .num { grid-column: 1 / -1; }
.s-full h3 { grid-column: 1; }
.s-full p { grid-column: 1; }
.s-full ul { grid-column: 2; grid-row: 2 / span 2; align-self: center; border-top: 0; padding-top: 0; }

/* Visual riffs inside select cards */
.viz {
  margin-top: auto;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  overflow: hidden;
  position: relative;
}
.viz-bars {
  display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end;
  height: 110px;
}
.viz-bars i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 4px 4px 1px 1px;
  transform-origin: bottom;
  animation: bar 4.8s var(--ease) infinite;
}
/* Per-bar variance via nth-child — keeps markup clean, no inline styles */
.viz-bars i:nth-child(1)  { --h1: 0.30; --h2: 0.62; animation-delay: -0.10s; }
.viz-bars i:nth-child(2)  { --h1: 0.45; --h2: 0.88; animation-delay: -0.30s; }
.viz-bars i:nth-child(3)  { --h1: 0.20; --h2: 0.55; animation-delay: -0.50s; }
.viz-bars i:nth-child(4)  { --h1: 0.55; --h2: 0.92; animation-delay: -0.80s; }
.viz-bars i:nth-child(5)  { --h1: 0.40; --h2: 0.78; animation-delay: -0.20s; }
.viz-bars i:nth-child(6)  { --h1: 0.70; --h2: 1.00; animation-delay: -0.60s; }
.viz-bars i:nth-child(7)  { --h1: 0.30; --h2: 0.65; animation-delay: -1.10s; }
.viz-bars i:nth-child(8)  { --h1: 0.50; --h2: 0.85; animation-delay: -0.40s; }
.viz-bars i:nth-child(9)  { --h1: 0.25; --h2: 0.58; animation-delay: -0.90s; }
.viz-bars i:nth-child(10) { --h1: 0.60; --h2: 0.95; animation-delay: -0.70s; }
.viz-bars i:nth-child(11) { --h1: 0.35; --h2: 0.72; animation-delay: -0.15s; }
.viz-bars i:nth-child(12) { --h1: 0.48; --h2: 0.83; animation-delay: -0.55s; }
.viz-bars i:nth-child(13) { --h1: 0.28; --h2: 0.60; animation-delay: -1.00s; }
.viz-bars i:nth-child(14) { --h1: 0.62; --h2: 0.97; animation-delay: -0.25s; }
@keyframes bar {
  0%,100% { transform: scaleY(var(--h1, 0.4)); }
  50%     { transform: scaleY(var(--h2, 0.9)); }
}
.viz-cap {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: "Geist Mono", monospace;
  font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  line-height: 1.7;
  color: var(--muted);
}
.viz-cap .swatch {
  display: inline-block; width: 9px; height: 9px; border-radius: 2.5px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  margin-right: 9px;
}
.viz-flow {
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 14px; align-items: center;
}
.viz-node {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  font-family: "Geist Mono", monospace;
  font-size: 11.5px;
  color: var(--ink-2);
  text-align: center;
  letter-spacing: 0.04em;
}
.viz-node b { display: block; font-family: "Geist", sans-serif; font-weight: 500; color: var(--ink); margin-bottom: 4px; font-size: 13px; letter-spacing: 0; }
.viz-arrow {
  height: 1px; background: var(--line-strong); position: relative;
}
.viz-arrow::after {
  content: ""; position: absolute; right: -1px; top: -3px;
  width: 7px; height: 7px; border-top: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong);
  transform: rotate(45deg);
}
.viz-dot {
  width: 7px; height: 7px; border-radius: 999px; background: var(--accent);
  animation: travel 3.6s linear infinite;
  position: absolute; top: 50%; margin-top: -3.5px; left: 0;
}
.viz-flow .viz-arrow:nth-of-type(2) .viz-dot { animation-delay: -1.2s; }
@keyframes travel { 0% { left: 0%; } 100% { left: 100%; } }
/* Real phones (≤560px): the three flow nodes don't fit side by side —
   stack vertically with a downward arrow connector. */
@media (max-width: 560px) {
  .viz-flow { grid-template-columns: 1fr; gap: 10px; justify-items: stretch; }
  .viz-arrow { width: 1px; height: 22px; margin-inline: auto; }
  .viz-arrow::after { right: auto; left: -3px; top: auto; bottom: 0; transform: rotate(135deg); }
  .viz-dot { display: none; }
}

.viz-chat {
  display: flex; flex-direction: column; gap: 8px;
}
.bubble {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--ink-2);
  max-width: 86%;
}
.bubble.me { align-self: flex-end; background: var(--ink); color: #f6f4ef; border-color: var(--ink); }
.bubble .caret { display: inline-block; width: 6px; background: var(--ink-2); margin-left: 2px; animation: caret 1s steps(2) infinite; height: 14px; vertical-align: -2px; }
.bubble.me .caret { background: #f6f4ef; }
@keyframes caret { 50% { opacity: 0; } }

@media (max-width: 980px) {
  .services { grid-template-columns: repeat(6, 1fr); }
  .s-wide, .s-tall, .s-half, .s-third, .s-twothird, .s-full { grid-column: span 6; grid-row: auto; }
  .s-full .service-inner { display: flex; flex-direction: column; }
  .s-full ul { border-top: 1px solid var(--line); padding-top: 16px; }
}

/* ---------- 12. Process ---------- */
.process { padding-top: 8px; }
.process-row {
  display: grid;
  grid-template-columns: 160px 1fr 1.4fr 0.8fr;
  gap: 36px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  align-items: start;
}
.process-row:last-child { border-bottom: 1px solid var(--line); }
.process-row .step {
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}
.process-row h4 {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(22px, 2.4vw, 34px);
  letter-spacing: -0.018em;
  line-height: 1.05;
  margin: 0;
}
.process-row h4 em { font-style: italic; color: var(--accent); }
.process-row p { color: var(--ink-2); margin: 0; font-size: 15.5px; line-height: 1.6; max-width: 56ch; }
.process-row .dur {
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  justify-self: end;
  text-align: right;
}
.process-row .dur b { display: block; color: var(--ink); font-family: "Fraunces", serif; font-style: italic; font-weight: 400; font-size: 18px; margin-top: 4px; }
@media (max-width: 860px) {
  .process-row { grid-template-columns: 1fr; gap: 12px; padding: 22px 0; }
  .process-row .dur { justify-self: start; text-align: left; }
}

/* ---------- 13. Branchen ---------- */
.branchen {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.branche {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 32px;
  background: rgba(255,255,255,0.4);
  transition: background .5s var(--ease);
  min-height: 220px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
}
.branche:hover { background: var(--surface); }
.branche .tag {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}
.branche h5 {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 18px 0 0;
  color: var(--ink);
}
.branche h5 em { font-style: italic; color: var(--accent); }
.branche .ex { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
@media (max-width: 860px) {
  .branchen { grid-template-columns: 1fr; }
  .branche { min-height: 0; padding: 24px; gap: 18px; }
}

/* ---------- 14. Team / About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 980px) { .about-grid { grid-template-columns: 1fr; gap: 36px; } }
.about-quote {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.about-quote em { font-style: italic; color: var(--accent); }
.about-sign {
  margin-top: 20px;
  font-family: "Geist Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.about-meta {
  display: flex; flex-direction: column; gap: 18px;
  margin-top: 28px;
  font-family: "Geist Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.about-meta div b { display: block; color: var(--ink); font-family: "Fraunces", serif; font-style: italic; font-weight: 400; font-size: 22px; text-transform: none; letter-spacing: -0.01em; margin-top: 6px; }

.people {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  /* The cards are shorter than the quote + meta column — center them
     against it instead of leaving a void at the bottom right. */
  align-self: center;
}
.person {
  background: rgba(255,255,255,0.65);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 6px;
}
.person-inner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--r-lg) - 6px);
  padding: 22px;
  height: 100%;
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}
.avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--bg-soft), var(--bg));
  position: relative;
  isolation: isolate; /* own stacking context so the z-index:-1 washes stay inside */
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(44px, 4.5vw, 68px);
  letter-spacing: 0.03em;
  color: rgba(18,18,16,0.62);
}
/* Gradient washes sit behind the founder initials (negative z-index keeps
   them above the avatar background but below the in-flow text). */
.avatar::before, .avatar::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.avatar.a1::before { background: radial-gradient(circle at 30% 40%, rgba(138,90,54,0.38), transparent 60%); }
.avatar.a1::after  { background: radial-gradient(circle at 75% 75%, rgba(184,112,74,0.34), transparent 55%); }
.avatar.a2::before { background: radial-gradient(circle at 65% 35%, rgba(184,112,74,0.4), transparent 60%); }
.avatar.a2::after  { background: radial-gradient(circle at 25% 80%, rgba(44,43,39,0.42), transparent 55%); }
.person h6 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.person .role {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: -10px;
}
.person p { font-size: 13.5px; color: var(--ink-2); margin: 0; line-height: 1.55; }
@media (max-width: 540px) { .people { grid-template-columns: 1fr; } }

/* ---------- 15. CTA / contact ---------- */
.cta-shell {
  background: var(--ink);
  color: #f4f1ea;
  border-radius: 36px;
  padding: clamp(40px, 6vw, 80px);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: end;
  position: relative;
  overflow: hidden;
  box-shadow: 0 60px 100px -50px rgba(18,18,16,0.4);
}
.cta-shell::before {
  content: ""; position: absolute; right: -10%; top: -30%; width: 60%; height: 120%;
  background: radial-gradient(closest-side, rgba(140,92,58,0.5), rgba(140,92,58,0) 70%);
  pointer-events: none;
}
.cta-shell::after {
  content: ""; position: absolute; left: -20%; bottom: -30%; width: 60%; height: 120%;
  background: radial-gradient(closest-side, rgba(184,112,74,0.25), rgba(184,112,74,0) 70%);
  pointer-events: none;
}
.cta-shell > * { position: relative; z-index: 1; }
.cta-shell h3 {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 14px 0 0;
  color: #f4f1ea;
}
.cta-shell h3 em { font-style: italic; color: #ead8c2; }
.cta-shell .eyebrow {
  background: rgba(244,241,234,0.06);
  border-color: rgba(244,241,234,0.12);
  color: rgba(244,241,234,0.78);
}
.cta-lead {
  color: rgba(244,241,234,0.75);
  max-width: 44ch;
  margin-top: 24px;
  font-size: 16px;
  line-height: 1.55;
}
.cta-meta { color: rgba(244,241,234,0.55); }
/* Higher specificity than the matching .about-meta div b rule (which would
   otherwise win and paint the values in ink-black on the dark shell). */
.cta-meta div b { color: #f4f1ea; }
.cta-form {
  background: rgba(244,241,234,0.05);
  border: 1px solid rgba(244,241,234,0.14);
  border-radius: var(--r-lg);
  padding: 8px;
}
.cta-form-inner {
  background: rgba(244,241,234,0.04);
  border: 1px solid rgba(244,241,234,0.08);
  border-radius: calc(var(--r-lg) - 8px);
  padding: 26px;
  display: flex; flex-direction: column; gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: "Geist Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: rgba(244,241,234,0.55);
  text-transform: uppercase;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(244,241,234,0.18);
  padding: 10px 0;
  color: #f4f1ea;
  font: inherit;
  font-size: 15.5px;
  transition: border-color .3s var(--ease);
  outline: none;
  border-radius: 0;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(244,241,234,0.35); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: rgba(244,241,234,0.6); }
/* Tall enough that the placeholder never overflows — an empty field with a
   scrollbar reads as broken. On narrow phones the placeholder wraps to 4 lines. */
.field textarea { resize: none; min-height: 128px; line-height: 1.55; }
@media (max-width: 620px) { .field textarea { min-height: 170px; } }
.cta-form .btn-primary { background: #f4f1ea; color: var(--ink); align-self: flex-start; margin-top: 8px; }
.cta-form .btn-primary .ico { background: rgba(18,18,16,0.08); }
.cta-form .btn-primary svg { stroke: var(--ink); }
.cta-form .btn-primary:hover { background: #fff; }
.form-note,
.form-status {
  margin: 2px 0 0;
  color: rgba(244,241,234,0.58);
  font-size: 12.5px;
  line-height: 1.55;
}
.form-note a {
  color: #f4f1ea;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.form-status {
  min-height: 1.4em;
  color: #ead8c2;
}
/* Honeypot — hidden visually & from AT, but available to spam bots */
.hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}
@media (max-width: 980px) { .cta-shell { grid-template-columns: 1fr; gap: 36px; } }

/* ---------- 16. Footer ---------- */
footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr;
  gap: 36px;
  align-items: start;
}
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .foot-grid { grid-template-columns: 1fr; } }
.foot-brand h6 {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(36px, 4.4vw, 64px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
}
.foot-brand h6 em { font-style: italic; color: var(--accent); }
.foot-brand p { max-width: 36ch; margin-top: 14px; font-size: 14px; }
.foot-col h6 {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 8px 0 16px;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col a,
.foot-col span { font-size: 14.5px; color: var(--ink-2); transition: color .3s var(--ease); }
.foot-col a:hover { color: var(--accent); }
.foot-bottom {
  margin-top: 60px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex; justify-content: space-between; gap: 24px;
  font-family: "Geist Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  flex-wrap: wrap;
}
@media (max-width: 620px) {
  .foot-bottom { font-size: 10px; letter-spacing: 0.12em; }
}

/* ---------- 17. Legal pages ---------- */
.legal-page {
  padding-top: 136px;
}
.legal-hero {
  padding: 0 0 54px;
}
.legal-hero h1 {
  max-width: 9ch;
  margin: 18px 0 0;
  font-family: "Fraunces", serif;
  font-size: clamp(48px, 9vw, 112px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: 0;
}
.legal-hero h1 em {
  color: var(--accent);
  font-style: italic;
}
.legal-hero p {
  max-width: 62ch;
  margin: 24px 0 0;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.65;
}
.legal-layout {
  max-width: 76ch;
  padding-bottom: 100px;
}
.legal-section {
  border-top: 1px solid var(--line);
  padding: 30px 0;
}
.legal-section h2 {
  margin: 0 0 16px;
  font-family: "Fraunces", serif;
  font-size: clamp(28px, 3.2vw, 44px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: 0;
}
.legal-section h3 {
  margin: 28px 0 10px;
  font-family: "Geist", sans-serif;
  font-size: 18px;
  font-weight: 600;
}
.legal-section p,
.legal-section li {
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.72;
}
.legal-section p { margin: 0 0 14px; }
.legal-section ul {
  margin: 10px 0 18px;
  padding-left: 1.1em;
}
.legal-section a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-data {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}
.legal-data div {
  display: grid;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.legal-data dt {
  font-family: "Geist Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.legal-data dd {
  margin: 0;
  color: var(--ink);
}
.placeholder {
  color: var(--accent-2);
  font-family: "Geist Mono", monospace;
  font-size: 0.92em;
}
.legal-callout {
  margin: 24px 0;
  padding: 18px 20px;
  background: rgba(138,90,54,0.08);
  border: 1px solid rgba(138,90,54,0.16);
  border-radius: var(--r-sm);
}
.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
@media (max-width: 620px) {
  .legal-page { padding-top: 118px; }
  .legal-hero h1 { font-size: clamp(42px, 14vw, 72px); }
  .legal-layout { padding-bottom: 72px; }
}

/* ---------- 18. Scrollbar (subtle) ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(18,18,16,0.18); border-radius: 999px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: rgba(18,18,16,0.3); }

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

/* ---------- 20. Print ---------- */
@media print {
  .nav-shell, .menu-modal, .seq, .grain, .cta-form { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: inherit; text-decoration: underline; }
}
