/* ============================================================
   FATHOM — approved homepage direction
   Token-driven: design choices are data attributes on <html>,
   set by the dev customization panel (design.js).
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ============================================================
   TOKENS
   ============================================================ */

:root {
  --fathom-night: #020C18;
  --fathom-navy: #061A2F;
  --fathom-navy-soft: #0B2741;

  --fathom-ivory: #F5F2EB;
  --fathom-white: #FAFBFC;

  --fathom-mist: #C7D5E1;
  --fathom-muted: #8299AC;

  --fathom-blue: #4F86CF;
  --fathom-blue-bright: #6E9FD4;
  --fathom-blue-light: #A8C7E7;

  --fathom-border: rgba(168, 199, 231, 0.18);
  --fathom-border-strong: rgba(168, 199, 231, 0.30);

  --sans: 'Inter', system-ui, sans-serif;
  --container: 1180px;
}

/* Serif choice */
html[data-serif="newsreader"] { --serif: 'Newsreader', Georgia, serif; }
html[data-serif="cormorant"]  { --serif: 'Cormorant Garamond', Georgia, serif; }
html[data-serif="dmserif"]    { --serif: 'DM Serif Display', Georgia, serif; }

/* Density */
html[data-density="compact"]  { --vpad: 3.4rem; --gap: 1.6rem; }
html[data-density="balanced"] { --vpad: 4.6rem; --gap: 2rem; }
html[data-density="spacious"] { --vpad: 6.4rem; --gap: 2.6rem; }

/* Hero overlay depth */
html[data-hero-overlay="restrained"] { --overlay: .38; }
html[data-hero-overlay="balanced"]   { --overlay: .55; }
html[data-hero-overlay="deep"]       { --overlay: .72; }

/* Hero composition */
html[data-hero-comp="image"]    { --comp-title: .88; --comp-media: 1;   --comp-overlay: .85; }
html[data-hero-comp="balanced"] { --comp-title: 1;   --comp-media: 1;   --comp-overlay: 1; }
html[data-hero-comp="type"]     { --comp-title: 1.12; --comp-media: .8; --comp-overlay: 1.18; }

/* Image intensity */
html[data-image-intensity="restrained"] { --img-op: .55; --img-sat: .75; }
html[data-image-intensity="balanced"]   { --img-op: .8;  --img-sat: .9; }
html[data-image-intensity="cinematic"]  { --img-op: 1;   --img-sat: 1; }

/* ============================================================
   BASE
   ============================================================ */

html { scroll-behavior: smooth; }

body {
  background: var(--fathom-night);
  color: var(--fathom-ivory);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(22px, 4vw, 48px);
}

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.14; }
p { color: var(--fathom-muted); }

.swash { width: 74px; height: 7px; color: var(--fathom-blue); opacity: .85; }

/* Image slots — real assets are injected by design.js from images.js */
.img-slot { display: block; }
.img-slot img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--focal-d, 50% 50%);
}
.img-slot.has-image .ph-default { display: none; }
@media (max-width: 640px) {
  .img-slot img { object-position: var(--focal-m, var(--focal-d, 50% 50%)); }
}

/* Placeholder system (until supplied assets arrive) */
.ph-default { position: absolute; inset: 0; overflow: hidden; }
.ph-tag {
  position: absolute; left: 12px; bottom: 10px; z-index: 2;
  font-family: var(--sans); font-size: .6rem; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(199, 213, 225, .4);
}
.ph-hero {
  background:
    radial-gradient(50% 42% at 76% 26%, rgba(240, 210, 150, .16), transparent 55%),
    linear-gradient(155deg, #0B2741 0%, #061A2F 45%, #020C18 100%);
}
.ph-closing {
  background:
    radial-gradient(60% 30% at 50% 78%, rgba(110, 159, 212, .16), transparent 60%),
    linear-gradient(180deg, #020C18 0%, #0B2741 55%, #061A2F 100%);
}
.ph-founder {
  background:
    radial-gradient(45% 40% at 55% 30%, rgba(240, 200, 150, .14), transparent 55%),
    linear-gradient(190deg, #0B2741 0%, #020C18 100%);
}

/* UI skeleton placeholder (product shots) */
.ph-ui { background: #081F36; display: flex; flex-direction: column; }
.ph-ui .phui-bar {
  display: flex; gap: 5px; align-items: center;
  height: 24px; padding-inline: 10px; flex: none;
  background: rgba(2, 12, 24, .6);
  border-bottom: 1px solid var(--fathom-border);
}
.ph-ui .phui-bar i { width: 6px; height: 6px; border-radius: 50%; background: rgba(199, 213, 225, .22); }
.ph-ui .phui-body { display: flex; flex: 1; min-height: 0; }
.ph-ui .phui-side { width: 25%; background: rgba(2, 12, 24, .4); border-right: 1px solid var(--fathom-border); }
.ph-ui .phui-main { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; gap: 9px; }
.ph-ui .phui-main i { display: block; height: 9px; border-radius: 3px; background: rgba(199, 213, 225, .1); }
.ph-ui .phui-main i.w50 { width: 50%; } .ph-ui .phui-main i.w55 { width: 55%; }
.ph-ui .phui-main i.w60 { width: 60%; } .ph-ui .phui-main i.w65 { width: 65%; }
.ph-ui .phui-main i.w70 { width: 70%; } .ph-ui .phui-main i.w75 { width: 75%; }
.ph-ui .phui-main i.w80 { width: 80%; } .ph-ui .phui-main i.w85 { width: 85%; }
.ph-ui .phui-main i.w90 { width: 90%; }

/* Dependency-graph placeholder (Code X-Ray) */
.ph-graph { background: #041426; }
.ph-graph svg { width: 100%; height: 100%; }

/* ============================================================
   NAV
   ============================================================ */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .35s ease, border-color .35s ease;
}
html:not([data-motion="none"]) .nav.scrolled,
html[data-motion="none"] .nav {
  background: rgba(2, 12, 24, .84);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--fathom-border);
}
.nav-inner {
  max-width: 1320px; margin-inline: auto;
  padding: 1.15rem clamp(22px, 3.5vw, 44px);
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.logo {
  font-family: var(--serif); font-size: 1.28rem; font-weight: 500;
  letter-spacing: .26em; color: var(--fathom-white);
  display: inline-flex; flex-direction: column; gap: 3px;
}
.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  font-size: .82rem; letter-spacing: .04em; color: var(--fathom-mist);
  transition: color .25s ease;
}
.nav-links a:hover { color: var(--fathom-white); }

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  min-height: min(92vh, 860px);
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 6rem; padding-bottom: 4rem;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; opacity: var(--comp-media); }
.hero-media img, .hero-media .ph-default { filter: saturate(var(--img-sat)); opacity: var(--img-op); }
.hero-media .ph-tag { left: auto; right: 14px; bottom: 12px; }

.hero-overlay {
  position: absolute; inset: 0;
  opacity: min(1, calc(var(--overlay) * var(--comp-overlay)));
  background:
    linear-gradient(90deg, var(--fathom-night) 0%, rgba(2, 12, 24, .78) 34%, rgba(2, 12, 24, .18) 68%, rgba(2, 12, 24, 0) 100%),
    linear-gradient(180deg, rgba(2, 12, 24, .35) 0%, rgba(2, 12, 24, 0) 30%);
}
.hero::after { /* seam into the page below, independent of overlay setting */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%;
  background: linear-gradient(180deg, transparent, var(--fathom-night));
  pointer-events: none;
}

.hero-content { position: relative; z-index: 2; width: 100%; }
.hero-title {
  font-size: calc(clamp(2.5rem, 5.4vw, 4.1rem) * var(--comp-title));
  font-weight: 400;
  max-width: 15ch;
  color: var(--fathom-white);
  margin-bottom: 1.5rem;
  letter-spacing: .002em;
}
.hero-sub {
  font-size: 1.02rem; line-height: 1.7;
  color: var(--fathom-mist);
  max-width: 38ch;
}
.cta-row { display: flex; align-items: center; gap: 1.3rem; margin-top: 2.3rem; flex-wrap: wrap; }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--sans); font-size: .89rem; font-weight: 500;
  padding: .82rem 1.55rem;
  border-radius: 7px;
  background: var(--fathom-blue);
  color: var(--fathom-white);
  transition: background .3s ease, transform .3s ease, box-shadow .3s ease;
}
.btn:hover { background: var(--fathom-blue-bright); }
.btn .arrow { transition: transform .3s ease; }
html:not([data-motion="none"]) .btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   SECTIONS — shared
   ============================================================ */

.section { padding-block: var(--vpad); border-top: 1px solid var(--fathom-border); position: relative; }
.section-title {
  text-align: center;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  color: var(--fathom-ivory);
  margin-bottom: calc(var(--gap) * 1.6);
}

/* ============================================================
   APPROACH
   ============================================================ */

.approach { background: linear-gradient(180deg, var(--fathom-night) 0%, rgba(6, 26, 47, .45) 60%, var(--fathom-night) 100%); }
.statement {
  text-align: center;
  font-size: clamp(1.5rem, 2.7vw, 2.15rem);
  color: var(--fathom-ivory);
  max-width: 34ch;
  margin: 0 auto calc(var(--gap) * 2);
}
html[data-technical="expressive"] .statement::after {
  content: ""; display: block; width: 46px; height: 1px;
  background: var(--fathom-border-strong); margin: 1.4rem auto 0;
}

.approach-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.approach-item { text-align: center; padding-inline: 1.2rem; }
html:not([data-technical="minimal"]) .approach-item + .approach-item { border-left: 1px solid var(--fathom-border); }
.a-icon { display: inline-grid; place-items: center; margin-bottom: 1.1rem; color: var(--fathom-blue-light); }
.a-icon svg { width: 42px; height: 42px; fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
html[data-technical="minimal"] .a-icon svg { width: 34px; height: 34px; }
.approach-item h3 { font-size: 1.35rem; margin-bottom: .6rem; color: var(--fathom-white); }
.approach-item p { font-size: .85rem; line-height: 1.65; max-width: 26ch; margin-inline: auto; }

/* Expressive technical: faint alignment grid behind the approach band */
html[data-technical="expressive"] .approach::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(168, 199, 231, .07) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}

/* ============================================================
   FROM FRICTION TO FLOW — reusable workflow component
   ============================================================ */

.flow-wrap {
  display: grid; grid-template-columns: minmax(240px, 300px) 1fr;
  gap: calc(var(--gap) * 1.6);
  row-gap: .5rem;
  align-items: center;
}
.nowrap { white-space: nowrap; }
.flow-intro h2 { font-size: clamp(1.6rem, 2.6vw, 2.05rem); color: var(--fathom-white); margin-bottom: 1rem; }
.flow-intro p { font-size: .92rem; max-width: 30ch; }

.flow-note {
  grid-column: 2;
  font-size: .8rem;
  color: var(--fathom-muted);
  max-width: 58ch;
  position: relative;
}
html[data-flow-note="off"] .flow-note { display: none; }

/* With rule: a short accent line ties the note to the diagram above */
html[data-flow-note="rule"] .flow-note { margin-top: .5rem; padding-top: 1.1rem; }
html[data-flow-note="rule"] .flow-note::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 42px; height: 1px;
  background: var(--fathom-blue); opacity: .55;
}

/* Editorial: quiet serif aside */
html[data-flow-note="editorial"] .flow-note {
  font-family: var(--serif); font-style: italic;
  font-size: 1.04rem; line-height: 1.55;
  color: var(--fathom-mist);
  margin-top: .4rem;
}

.flow-panel {
  border: 1px solid var(--fathom-border);
  border-radius: 12px;
  background: rgba(6, 26, 47, .35);
  padding: clamp(20px, 2.6vw, 32px);
  position: relative;
}
html[data-technical="minimal"] .flow-panel { border-color: transparent; background: rgba(6, 26, 47, .22); }
html[data-technical="expressive"] .flow-panel::before,
html[data-technical="expressive"] .flow-panel::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border-color: var(--fathom-border-strong); border-style: solid;
}
html[data-technical="expressive"] .flow-panel::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
html[data-technical="expressive"] .flow-panel::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

.flow { display: flex; gap: clamp(20px, 3vw, 40px); align-items: flex-start; }
.flow-group { flex: 1; min-width: 0; }
html:not([data-technical="minimal"]) .flow-after { border-left: 1px solid var(--fathom-border); padding-left: clamp(20px, 3vw, 40px); }

.flow-label {
  display: block;
  font-size: .62rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase;
  margin-bottom: 1.3rem;
}
.flow-before .flow-label { color: var(--fathom-muted); }
.flow-after .flow-label { color: var(--fathom-blue-bright); }

.flow-nodes { display: flex; align-items: flex-start; gap: 10px; }
.flow-node {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  flex: 1; min-width: 0; text-align: center;
}
.fn-icon {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--fathom-border); border-radius: 9px;
  background: rgba(2, 12, 24, .45);
}
html[data-technical="minimal"] .fn-icon { border-color: transparent; background: none; }
.fn-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.fn-cap { font-size: .68rem; line-height: 1.45; color: var(--fathom-muted); }

.flow-before .fn-icon { color: var(--fathom-muted); }
.flow-after .fn-icon { color: var(--fathom-blue-bright); border-color: rgba(110, 159, 212, .3); }
.flow-after .fn-cap { color: var(--fathom-mist); }

.flow-arrow { color: var(--fathom-muted); opacity: .55; font-size: .85rem; margin-top: 12px; flex: none; }
.flow-after .flow-arrow { color: var(--fathom-blue-bright); opacity: .7; }

/* --- Workflow style: linear (default) --- */
html[data-flow-style="linear"] .flow-branch { display: contents; }

/* --- Workflow style: branching --- */
html[data-flow-style="branching"] .flow-branch {
  display: flex; flex-direction: column; gap: 16px;
  position: relative; padding-inline: 14px; flex: 1.2;
}
html[data-flow-style="branching"] .flow-branch .linear-only { display: none; }
html[data-flow-style="branching"] .flow-branch::before,
html[data-flow-style="branching"] .flow-branch::after {
  content: ""; position: absolute; top: 18%; bottom: 18%; width: 9px;
  border: 1px solid rgba(110, 159, 212, .35);
}
html[data-flow-style="branching"] .flow-branch::before { left: 0; border-right: none; border-radius: 4px 0 0 4px; }
html[data-flow-style="branching"] .flow-branch::after { right: 0; border-left: none; border-radius: 0 4px 4px 0; }
html[data-flow-style="branching"] .flow-branch .flow-node { flex: none; }

/* --- Workflow style: architectural --- */
html[data-flow-style="architectural"] .flow-branch { display: contents; }
html[data-flow-style="architectural"] .flow-arrow { display: none; }
html[data-flow-style="architectural"] .flow-nodes { flex-direction: column; align-items: stretch; gap: 0; }
html[data-flow-style="architectural"] .flow-node {
  flex-direction: row; align-items: center; text-align: left;
  gap: 13px; padding: 10px 14px; margin-bottom: 20px;
  border: 1px solid var(--fathom-border); border-radius: 8px;
  background: rgba(2, 12, 24, .45);
  position: relative;
}
html[data-flow-style="architectural"] .flow-node:last-child { margin-bottom: 0; }
html[data-flow-style="architectural"] .flow-node:not(:last-child)::after {
  content: ""; position: absolute; left: 30px; top: 100%; height: 20px;
  border-left: 1px solid var(--fathom-border-strong);
}
html[data-flow-style="architectural"] .flow-after .flow-node:not(:last-child)::after { border-color: rgba(110, 159, 212, .4); }
html[data-flow-style="architectural"] .fn-icon { width: 34px; height: 34px; flex: none; border: none; background: none; }
html[data-flow-style="architectural"] .fn-cap { font-size: .76rem; }

/* ============================================================
   WHAT WE'RE BUILDING
   ============================================================ */

.work-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: calc(var(--gap) * .8); }

/* Layout variants */
html[data-work-layout="feature"] .work-grid { grid-template-columns: 2fr 1fr 1fr; }
html[data-work-layout="feature"] .work-card[data-card="planningroom"] { grid-row: span 2; display: flex; }
html[data-work-layout="feature"] .work-card[data-card="planningroom"] .work-shot { aspect-ratio: auto; flex: 1; min-height: 300px; }
html[data-work-layout="feature"] .work-card[data-card="founderAdvisory"] { grid-column: 2 / 4; }
html[data-work-layout="feature"] .work-card[data-card="founderAdvisory"] .work-shot { aspect-ratio: 32 / 10; }

html[data-work-layout="asymmetric"] .work-grid { grid-template-columns: repeat(3, 1fr); }
html[data-work-layout="asymmetric"] .work-card[data-card="planningroom"] { grid-column: span 2; }
html[data-work-layout="asymmetric"] .work-card[data-card="planningroom"] .work-shot { aspect-ratio: 32 / 12; }
html[data-work-layout="asymmetric"] .work-card[data-card="founderAdvisory"] { grid-column: span 2; }
html[data-work-layout="asymmetric"] .work-card[data-card="founderAdvisory"] .work-shot { aspect-ratio: 32 / 12; }

.work-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--fathom-border);
  border-radius: 10px;
  background: rgba(6, 26, 47, .35);
  padding: 10px;
  transition: transform .35s ease, border-color .35s ease;
}
html:not([data-motion="none"]) .work-card:hover { transform: translateY(-3px); border-color: var(--fathom-border-strong); }
.work-card-static { cursor: default; }
html:not([data-motion="none"]) .work-card-static:hover { transform: none; border-color: var(--fathom-border); }

.work-shot {
  position: relative; display: block;
  aspect-ratio: 16 / 10.5;
  border-radius: 6px; overflow: hidden;
  background: var(--fathom-navy);
}
.work-shot img, .work-shot .ph-default { filter: saturate(var(--img-sat)); }
.work-shot img { opacity: var(--img-op); }

.work-shot-caption {
  position: absolute; left: 16px; bottom: 14px; z-index: 3; right: 16px;
  font-family: var(--serif); font-size: 1.25rem; line-height: 1.25;
  color: var(--fathom-white);
  text-shadow: 0 2px 14px rgba(2, 12, 24, .8);
}

.work-meta { display: block; padding: 13px 8px 6px; }
.work-title {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-family: var(--sans); font-size: .95rem; font-weight: 500; color: var(--fathom-white);
}
.work-title .arrow { color: var(--fathom-blue-bright); transition: transform .3s ease; }
html:not([data-motion="none"]) .work-card:hover .work-title .arrow { transform: translateX(4px); }
.work-blurb { display: block; font-size: .79rem; color: var(--fathom-muted); margin-top: .25rem; }

/* ============================================================
   CLOSING
   ============================================================ */

.closing {
  position: relative;
  padding-block: calc(var(--vpad) * 1.5);
  border-top: 1px solid var(--fathom-border);
  overflow: hidden;
}
.closing-media { position: absolute; inset: 0; }
.closing-media img, .closing-media .ph-default { filter: saturate(var(--img-sat)); opacity: var(--img-op); }
.closing-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, var(--fathom-night) 0%, rgba(2, 12, 24, .25) 40%, rgba(2, 12, 24, .45) 100%);
}
.closing-content { position: relative; z-index: 2; text-align: center; }
.closing-statement {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  color: var(--fathom-white);
  max-width: 26ch; margin-inline: auto;
}
.closing .cta-row { justify-content: center; margin-top: 2.2rem; }

/* ============================================================
   FOOTER
   ============================================================ */

.footer { border-top: 1px solid var(--fathom-border); padding-block: 2.4rem; position: relative; background: var(--fathom-night); }
.footer-inner { display: flex; align-items: baseline; gap: 1.4rem; }
.footer-line, .footer-meta { font-size: .79rem; color: var(--fathom-muted); }
.footer-copy { flex: 1; text-align: left; font-size: .73rem; color: var(--fathom-muted); opacity: .7; white-space: nowrap; }
.footer-line { flex: 1.6; text-align: center; color: color-mix(in srgb, var(--fathom-mist) 40%, var(--fathom-muted)); }
.footer-meta { flex: 1; text-align: right; white-space: nowrap; }
.footer a:hover { color: var(--fathom-mist); }

/* ============================================================
   SERVICES PAGE
   ============================================================ */

.nav-links a.active { color: var(--fathom-white); }

.page-head {
  padding-top: 9.5rem;
  padding-bottom: calc(var(--vpad) * .8);
  background:
    radial-gradient(55% 60% at 80% 0%, rgba(110, 159, 212, .07), transparent 60%),
    linear-gradient(180deg, var(--fathom-navy) -40%, var(--fathom-night) 65%);
}
.eyebrow-line {
  font-size: .72rem; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  color: var(--fathom-blue-bright);
  margin-bottom: 1.1rem;
}
.page-head h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  color: var(--fathom-white);
  margin-bottom: 1.2rem;
}
.page-lede { font-size: 1.02rem; line-height: 1.7; color: var(--fathom-mist); max-width: 52ch; }
.page-note { font-size: .84rem; margin-top: 1rem; max-width: 52ch; }
.page-note a { color: var(--fathom-blue-bright); }
.page-note a:hover { color: var(--fathom-blue-light); }

.about-belief {
  font-size: .95rem; line-height: 1.75;
  max-width: 58ch;
  margin: 1.8rem auto 0;
  text-align: center;
}

.svc-head { margin-bottom: 1.6rem; }
.svc-head h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); color: var(--fathom-ivory); }
.svc-who { font-size: .86rem; color: var(--fathom-muted); margin-top: .5rem; max-width: 62ch; }

.svc-list { display: grid; }
.svc {
  display: grid; grid-template-columns: minmax(220px, 300px) 1fr;
  gap: .4rem 3rem; align-items: baseline;
  padding-block: 1.15rem;
  border-top: 1px solid var(--fathom-border);
}
.svc:last-child { border-bottom: 1px solid var(--fathom-border); }
.svc h3 { font-family: var(--sans); font-size: .95rem; font-weight: 500; color: var(--fathom-white); }
.svc p { font-size: .88rem; max-width: 60ch; }

.svc-closing { text-align: center; padding-block: calc(var(--vpad) * 1.2); }
.svc-closing-line { font-size: .92rem; max-width: 48ch; margin: 1.4rem auto 0; }
.closing-cta-row { justify-content: center; margin-top: 2.2rem; }

@media (max-width: 640px) {
  .page-head { padding-top: 7.5rem; }
  .svc { grid-template-columns: 1fr; gap: .35rem; }
}

/* ============================================================
   PROSE (privacy and other document pages)
   ============================================================ */

.prose { max-width: 640px; }
.prose h2 {
  font-size: 1.25rem; color: var(--fathom-ivory);
  margin: 2.2rem 0 .7rem;
}
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: .92rem; line-height: 1.75; margin-bottom: .9rem; }
.prose ul { margin: 0 0 .9rem 1.2rem; }
.prose li { font-size: .92rem; line-height: 1.75; color: var(--fathom-muted); margin-bottom: .35rem; }
.prose a { color: var(--fathom-blue-bright); }
.prose a:hover { color: var(--fathom-blue-light); }

/* ============================================================
   CONTACT PAGE
   ============================================================ */

.contact-form { max-width: 620px; }

.contact-form .field { margin-bottom: 1.4rem; }
.contact-form label {
  display: block;
  font-size: .78rem; font-weight: 500; letter-spacing: .04em;
  color: var(--fathom-mist);
  margin-bottom: .45rem;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  background: rgba(6, 26, 47, .5);
  border: 1px solid var(--fathom-border);
  border-radius: 7px;
  padding: .75rem .9rem;
  color: var(--fathom-white);
  font-family: var(--sans); font-size: .95rem; line-height: 1.5;
  transition: border-color .25s ease;
}
.contact-form textarea { resize: vertical; min-height: 150px; }
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--fathom-blue-bright);
}
.contact-form ::placeholder { color: var(--fathom-muted); opacity: .7; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.turnstile-wrap { margin: 1.2rem 0; min-height: 65px; }
.form-actions { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.form-status { font-size: .85rem; color: var(--fathom-mist); }

.contact-email-note {
  margin-top: 2.2rem; padding-top: 1.4rem;
  border-top: 1px solid var(--fathom-border);
  font-size: .88rem; color: var(--fathom-muted);
}
.contact-email-note a { color: var(--fathom-blue-bright); }
.contact-email-note a:hover { color: var(--fathom-blue-light); }

/* ============================================================
   MOTION
   ============================================================ */

html:not([data-motion="none"]) .reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .7s ease, transform .7s ease;
}
html:not([data-motion="none"]) .reveal.in { opacity: 1; transform: none; }
html[data-motion="atmospheric"] .reveal { transition-duration: 1s; }

/* Workflow nodes stagger in as the panel reveals */
html:not([data-motion="none"]) .flow-panel .flow-node,
html:not([data-motion="none"]) .flow-panel .flow-arrow {
  opacity: 0; transition: opacity .5s ease var(--d, 0s);
}
html:not([data-motion="none"]) .flow-panel.in .flow-node,
html:not([data-motion="none"]) .flow-panel.in .flow-arrow { opacity: 1; }
.flow-before .flow-node:nth-child(1) { --d: .05s; } .flow-before .flow-arrow:nth-child(2) { --d: .1s; }
.flow-before .flow-node:nth-child(3) { --d: .15s; } .flow-before .flow-arrow:nth-child(4) { --d: .2s; }
.flow-before .flow-node:nth-child(5) { --d: .25s; } .flow-before .flow-arrow:nth-child(6) { --d: .3s; }
.flow-before .flow-node:nth-child(7) { --d: .35s; } .flow-before .flow-arrow:nth-child(8) { --d: .4s; }
.flow-before .flow-node:nth-child(9) { --d: .45s; }
.flow-after .flow-node, .flow-after .flow-arrow, .flow-after .flow-branch .flow-node { --d: .55s; }
.flow-after .flow-nodes > *:nth-child(2) { --d: .62s; }
.flow-after .flow-nodes > *:nth-child(3) .flow-node:first-child, .flow-after .flow-nodes > *:nth-child(3) { --d: .69s; }
.flow-after .flow-nodes > *:nth-child(4) { --d: .76s; }
.flow-after .flow-nodes > *:nth-child(5) { --d: .83s; }

/* Hero entrance — title, supporting copy, CTA stagger in on load */
html:not([data-motion="none"]) .hero-title,
html:not([data-motion="none"]) .hero-sub,
html:not([data-motion="none"]) .hero .cta-row {
  opacity: 0; transform: translateY(18px);
  transition: opacity .9s ease, transform .9s ease;
}
html:not([data-motion="none"]) body.loaded .hero-title { opacity: 1; transform: none; transition-delay: .1s; }
html:not([data-motion="none"]) body.loaded .hero-sub   { opacity: 1; transform: none; transition-delay: .3s; }
html:not([data-motion="none"]) body.loaded .hero .cta-row { opacity: 1; transform: none; transition-delay: .5s; }
html[data-motion="atmospheric"] .hero-title,
html[data-motion="atmospheric"] .hero-sub,
html[data-motion="atmospheric"] .hero .cta-row { transition-duration: 1.3s; }

/* Atmospheric: slow hero drift */
html[data-motion="atmospheric"] .hero-media { animation: heroDrift 30s ease-in-out infinite alternate; }
@keyframes heroDrift {
  from { transform: scale(1.04) translate(0, 0); }
  to   { transform: scale(1.11) translate(-1.8%, -.6%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .flow-panel .flow-node, .flow-panel .flow-arrow,
  .hero-title, .hero-sub, .hero .cta-row { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1080px) {
  .flow-wrap { grid-template-columns: 1fr; gap: var(--gap); align-items: start; }
  .flow-intro p { max-width: 52ch; }
  .flow-note { grid-column: auto; margin-top: 0; }
}

@media (max-width: 900px) {
  .approach-grid { grid-template-columns: repeat(2, 1fr); row-gap: calc(var(--gap) * 1.4); }
  html:not([data-technical="minimal"]) .approach-item + .approach-item { border-left: none; }
  html:not([data-technical="minimal"]) .approach-item:nth-child(even) { border-left: 1px solid var(--fathom-border); }

  .flow { flex-direction: column; gap: calc(var(--gap) * 1.1); }
  html:not([data-technical="minimal"]) .flow-after {
    border-left: none; padding-left: 0;
    border-top: 1px solid var(--fathom-border); padding-top: calc(var(--gap) * 1.1);
  }

  .work-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .work-card { grid-column: auto !important; grid-row: auto !important; }
  html[data-work-layout="feature"] .work-card[data-card="planningroom"] .work-shot,
  html[data-work-layout="feature"] .work-card[data-card="founderAdvisory"] .work-shot,
  html[data-work-layout="asymmetric"] .work-card[data-card="planningroom"] .work-shot,
  html[data-work-layout="asymmetric"] .work-card[data-card="founderAdvisory"] .work-shot { aspect-ratio: 16 / 10.5; }
}

@media (max-width: 640px) {
  .nav-inner { padding-block: .85rem; }
  .nav-links { gap: 1.1rem; }
  .nav-links a { font-size: .76rem; }
  .logo { font-size: 1.1rem; }

  .hero { min-height: 78vh; padding-top: 5.5rem; }
  .hero-title { max-width: 13ch; }

  .approach-grid { grid-template-columns: 1fr; }
  html:not([data-technical="minimal"]) .approach-item { border-left: none !important; }
  html:not([data-technical="minimal"]) .approach-item + .approach-item {
    border-top: 1px solid var(--fathom-border); padding-top: calc(var(--gap) * .9);
  }

  /* Workflow turns vertical on mobile */
  .flow-nodes { flex-direction: column; align-items: stretch; gap: 12px; }
  .flow-node { flex-direction: row; text-align: left; gap: 13px; align-items: center; }
  .fn-icon { flex: none; }
  .fn-cap { font-size: .78rem; }
  .flow-arrow { margin: 0 0 0 14px; transform: rotate(90deg); width: 14px; }
  html[data-flow-style="branching"] .flow-branch { padding-inline: 0; padding-left: 14px; }
  html[data-flow-style="branching"] .flow-branch::after { display: none; }
  html[data-flow-style="branching"] .flow-branch::before { top: 8%; bottom: 8%; }
  html[data-flow-style="architectural"] .flow-node { margin-bottom: 16px; }

  .work-grid { grid-template-columns: 1fr !important; }
  .footer-inner { flex-direction: column; align-items: center; gap: .5rem; }
  .footer-copy, .footer-line, .footer-meta { flex: none; text-align: center; white-space: normal; }
}

/* ============================================================
   DEV CUSTOMIZATION PANEL (development only — see design.js)
   ============================================================ */

.dpanel {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: #061424;
  border-bottom: 1px solid rgba(168, 199, 231, .22);
  color: #dde6ef;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: .78rem;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .45);
  transition: transform .35s ease, opacity .35s ease;
}
.dpanel.collapsed { transform: translateY(-104%); opacity: 0; pointer-events: none; }

/* While the bar is open, push the site (and its fixed nav) down below it */
html.dpanel-open body { padding-top: var(--dpanel-h, 120px); }
html.dpanel-open .nav { top: var(--dpanel-h, 120px); }

.dpanel-tab {
  position: fixed; top: 0; left: 50%; z-index: 9998;
  transform: translateX(-50%);
  padding: 6px 16px 7px;
  background: #061424;
  border: 1px solid rgba(168, 199, 231, .22); border-top: none;
  border-radius: 0 0 8px 8px;
  color: #A8C7E7; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase;
  font-family: 'Inter', system-ui, sans-serif;
}
.dpanel-tab.hidden { display: none; }

.dpanel-inner {
  display: flex; flex-wrap: wrap; align-items: flex-start;
  gap: 10px 22px;
  padding: 10px 18px 12px;
  max-height: 46vh; overflow-y: auto;
}
.dpanel-inner::-webkit-scrollbar { width: 8px; }
.dpanel-inner::-webkit-scrollbar-thumb { background: rgba(168, 199, 231, .16); border-radius: 4px; }

.dpanel-meta { display: flex; flex-direction: column; gap: 7px; padding-right: 14px; border-right: 1px solid rgba(168, 199, 231, .14); }
.dpanel-head-row { display: flex; align-items: center; gap: 12px; }
.dpanel-title { font-weight: 600; letter-spacing: .1em; font-size: .7rem; text-transform: uppercase; color: #A8C7E7; }
.dpanel-close { color: #8299AC; font-size: .95rem; line-height: 1; padding: 2px 6px; }
.dpanel-close:hover { color: #fff; }
.dpanel-actions { display: flex; gap: 8px; }
.dpanel-actions button {
  background: #0B2741; border: 1px solid rgba(168, 199, 231, .22);
  border-radius: 6px; padding: 5px 10px;
  font-size: .69rem; color: #dde6ef; white-space: nowrap;
}
.dpanel-actions button:hover { border-color: #A8C7E7; }
.dpanel-state { font-size: .66rem; color: #8299AC; }
.dpanel-state b { color: #dde6ef; font-weight: 500; }
.dpanel-warn {
  max-width: 230px;
  font-size: .64rem; line-height: 1.45;
  color: #e8c98a;
}

.dctl { width: 172px; flex: 0 0 auto; }
.dctl-label { display: block; font-size: .64rem; color: #8299AC; margin-bottom: 4px; letter-spacing: .04em; }

.dseg { display: flex; background: #0B2741; border: 1px solid rgba(168, 199, 231, .16); border-radius: 6px; overflow: hidden; }
.dseg button {
  flex: 1; padding: 6px 2px;
  font-size: .67rem; color: #8299AC;
  border-right: 1px solid rgba(168, 199, 231, .1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dseg button:last-child { border-right: none; }
.dseg button.on { background: rgba(110, 159, 212, .22); color: #f2f7fc; }
.dseg button:hover:not(.on) { color: #c9d6e2; }
.dseg button { padding: 5px 2px; }

.dpanel-toast {
  position: fixed; top: calc(var(--dpanel-h, 120px) + 14px); right: 18px; z-index: 9999;
  background: #0B2741; border: 1px solid rgba(168, 199, 231, .45);
  color: #f2f7fc; font-size: .74rem; font-family: 'Inter', system-ui, sans-serif;
  padding: 8px 14px; border-radius: 6px;
  opacity: 0; transform: translateY(6px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.dpanel-toast.show { opacity: 1; transform: none; }
