/* ============================================================
   PreeWorks — design system implementation
   Sources of truth: DESIGN.md (§§1-9) and design-system-visual-spec_2.html
   PreeWorks voice: Inter for structure; Lora for editorial moments only
   (Lapis band + About narrative); Oswald wordmark; no Coral, ever.
   ============================================================ */

:root {
  /* Base neutrals */
  --paper:        #F6F7FA;
  --surface:      #EFF0F4;
  --divider:      #E4E6EA;
  --hairline:     #D8DAE0;

  /* Text ladder */
  --ink:          #191A1E;
  --text-2:       #43454A;
  --text-3:       #686A70;
  --muted:        #A6A8AE;

  /* Teal system */
  --sea-light:    #8FB4B7;
  --sea-deep:     #5A8B8F;
  --sea-darkest:  #3A5B5E;
  --sea-tint:     #E9EEEF;
  --sea-tint-2:   #DDE9EC;

  /* Lapis system — CTAs + dark sections */
  --lapis:        #2A3A52;
  --lapis-tint:   #DEE4ED;

  /* Gold system — Preeworks-only structural accent (design-system v1.1).
     Structural use only: masthead rules, stat unit suffixes, nav underline,
     phase borders. Never a CTA, never prose emphasis, never text below 14px
     on paper, never more than ~10% of a surface. */
  --gold:         #C4A24A;
  --gold-deep:    #A8893A;
  --gold-darkest: #806829;
  --gold-tint:    #F5EFD9;
  --gold-tint-2:  #EDE3C0;

  /* Spacing scale */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-6: 24px; --space-7: 28px; --space-8: 32px; --space-12: 48px;
  --space-16: 64px; --space-20: 80px; --space-24: 96px; --space-28: 112px;

  /* Radius — per DESIGN.md §4 */
  --r-sm: 4px; --r-md: 8px; --r-card: 16px; --r-xl: 20px; --r-pill: 999px;

  /* Shadows — per DESIGN.md §4 */
  --shadow-1: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-2: 0 2px 8px rgba(42,58,82,0.08);
  --shadow-3: 0 4px 16px rgba(0,0,0,0.08);

  /* Layout */
  --container: 1200px;
  --prose: 760px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* ============================================================
   TYPE — DESIGN.md §3
   ============================================================ */

.eyebrow {
  font: 600 11px/1 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--sea-darkest);
  display: inline-block;
  margin-bottom: var(--space-4);
}
.eyebrow--on-dark { color: var(--sea-light); }

h1, h2, h3, h4 { font-family: 'Inter', sans-serif; color: var(--ink); font-weight: 600; }

/* Home hero display — Inter, editorial scale, tight tracking (DECISION 2026-06-14 reversal) */
.hero-display {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(34px, 6vw, 72px);
  letter-spacing: -0.025em;
  line-height: 1.0;
  color: var(--ink);
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: none;
}
.hero-display .accent { color: var(--sea-darkest); }

/* Subpage H1 — structural consulting voice */
.h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: clamp(22px, 2.6vw, 28px);
  letter-spacing: -0.3px;
  line-height: 1.2;
  margin-bottom: var(--space-4);
}
.h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  margin-bottom: var(--space-3);
}

/* Lora display — ONLY for Lapis band headlines + About story headline */
.display-lora-lg {
  font-family: 'Lora', Georgia, serif;
  font-weight: 500;
  font-size: clamp(36px, 4.4vw, 56px);
  letter-spacing: -0.5px;
  line-height: 1.1;
  color: inherit;
}
.display-lora-md {
  font-family: 'Lora', Georgia, serif;
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: -0.4px;
  line-height: 1.15;
}
.display-lora-lg em,
.display-lora-md em {
  font-style: italic;
  color: var(--sea-darkest);
}
.band-lapis .display-lora-lg em,
.band-lapis .display-lora-md em {
  color: var(--sea-light);
}

.lead {
  font-family: 'Inter', sans-serif;
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.65;
  color: var(--text-2);
  max-width: var(--prose);
}

.body-lg { font-size: 18px; line-height: 1.65; color: var(--text-2); }
.body    { font-size: 16px; line-height: 1.55; color: var(--text-2); }
.body-lora {
  font-family: 'Lora', Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-2);
}
.meta {
  font-size: 12px;
  letter-spacing: 0.3px;
  color: var(--text-3);
}

p + p { margin-top: var(--space-4); }

/* ============================================================
   CONTAINER + BANDS
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-16);
}

section { padding: var(--space-24) 0; }
section.hero { padding: var(--space-28) 0 var(--space-20); position: relative; overflow: hidden; }

.band-paper   { background: var(--paper); }
.band-surface { background: var(--surface); }
.band-tint    { background: var(--sea-tint); }
.band-tint-2  { background: var(--sea-tint-2); }
.band-lapis {
  background: var(--lapis);
  color: var(--paper);
}
.band-lapis .body, .band-lapis .body-lg, .band-lapis .lead { color: var(--sea-light); }
.band-lapis h1, .band-lapis h2, .band-lapis h3 { color: var(--paper); }

.prose { max-width: var(--prose); }

/* Hero atmospheric wash (Harvest cue) — subtle, restrained */
.hero::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse at center, var(--sea-tint) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}
.hero > .container { position: relative; z-index: 1; }

/* ============================================================
   NAV (Air-style sticky + backdrop-blur)
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 247, 250, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--divider);
}
.nav-row {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px var(--space-16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-8);
}

.wordmark {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 1.5px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  list-style: none;
}
.nav-link {
  font: 500 14px/1 'Inter', sans-serif;
  color: var(--text-2);
  padding: 8px 4px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: color 0.15s;
  background: transparent;
  border: none;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--ink); }

.nav-dropdown { position: relative; }
.nav-dropdown-toggle::after {
  content: " ▾";
  font-size: 9px;
  opacity: 0.5;
  margin-left: 4px;
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: -12px;
  min-width: 320px;
  background: var(--paper);
  border: 1px solid var(--divider);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-3);
  padding: 12px;
  display: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
}
.nav-dropdown[data-open="true"] .nav-dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.nav-dropdown-item {
  display: block;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.4;
  text-decoration: none;
  transition: background 0.12s;
}
.nav-dropdown-item:hover { background: var(--sea-tint-2); color: var(--ink); }
.nav-dropdown-item strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 2px;
}
.nav-dropdown-item small {
  color: var(--text-3);
  font-size: 12px;
  display: block;
  letter-spacing: -0.01em;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--ink);
}

/* ============================================================
   BUTTONS — pill, per DESIGN.md §5
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font: 500 14px/1 'Inter', sans-serif;
  letter-spacing: -0.01em;
  padding: 15px 30px;
  border-radius: var(--r-pill);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, color 0.15s;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.btn-primary { background: var(--lapis); color: var(--paper); }
.btn-primary:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--lapis); border-color: var(--lapis); }
.btn-ghost:hover { background: var(--lapis-tint); }
.btn-sm { padding: 10px 20px; font-size: 13px; }

.band-lapis .btn-primary { background: var(--paper); color: var(--lapis); }
.band-lapis .btn-ghost {
  border-color: var(--sea-light);
  color: var(--sea-light);
}
.band-lapis .btn-ghost:hover {
  background: rgba(255,255,255,0.06);
  color: var(--paper);
}

.link-arrow {
  font-size: 14px;
  font-weight: 500;
  color: var(--lapis);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.15s;
  letter-spacing: -0.01em;
}
.link-arrow:hover { gap: 8px; }
.band-lapis .link-arrow { color: var(--sea-light); }
.band-lapis .link-arrow:hover { color: var(--paper); }

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

.hero-content { max-width: 880px; }
.hero-display { margin-bottom: var(--space-6); }
.hero .lead { margin-bottom: var(--space-8); }
.hero-actions { display: flex; gap: var(--space-4); flex-wrap: wrap; }

.hero-centered {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.hero-centered .lead { margin-left: auto; margin-right: auto; }
.hero-centered .hero-actions { justify-content: center; }

/* ============================================================
   SUBPAGE HERO (asymmetric, Brex pattern)
   ============================================================ */

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: var(--space-16);
  align-items: center;
}
.hero-split .hero-text { padding-right: var(--space-4); }
.hero-split .pullquote {
  background: var(--lapis-tint);
  border-radius: var(--r-card);
  padding: var(--space-12);
  position: relative;
  overflow: hidden;
}
.hero-split .pullquote::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 56px; height: 56px;
  background: var(--lapis);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
}
.hero-split .pullquote-text {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.35;
  color: var(--sea-darkest);
  letter-spacing: -0.2px;
}
.hero-split .pullquote-attr {
  margin-top: var(--space-6);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--sea-darkest);
  font-weight: 600;
}

/* ============================================================
   PROOF STRIP
   ============================================================ */

.proof-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-6);
  padding: var(--space-12) 0;
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  margin-top: var(--space-12);
}
.proof-item .num {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 38px);
  color: var(--lapis);
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: var(--space-2);
}
.proof-item .label {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.45;
  letter-spacing: -0.01em;
}

/* ============================================================
   LOGO MARQUEE
   ============================================================ */

.logo-marquee {
  overflow: hidden;
  position: relative;
  padding: var(--space-8) 0;
}

/* Progressive blur edge — ported from ibelick/motion-primitives ProgressiveBlur
   to vanilla CSS. Layers built in JS on the Home page (see index.html).
   Each layer has a gradient mask exposing a strip + an increasing backdrop-filter
   blur. Result: logos blur progressively as they approach the band edge,
   replacing the previous flat sea-tint gradient fade. */
.blur-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 200px;
  pointer-events: none;
  z-index: 3;
}
.blur-edge-left  { left: 0; }
.blur-edge-right { right: 0; }
.blur-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.logo-track {
  display: flex;
  gap: 72px;
  width: max-content;
  animation: marquee 80s linear infinite;
  align-items: center;
}
.logo-track:hover { animation-play-state: paused; }
.logo-track img {
  height: 56px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.72;
  transition: filter 0.3s, opacity 0.3s;
}
.logo-track img:hover {
  filter: grayscale(0%);
  opacity: 1;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.logo-caption {
  text-align: center;
  margin-top: var(--space-6);
  color: var(--text-3);
  font-size: 13px;
  letter-spacing: -0.01em;
}

/* ============================================================
   TILES — service cards (Harvest-inspired, brand colored)
   ============================================================ */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}
.tile {
  background: var(--paper);
  border: 1px solid var(--divider);
  border-radius: var(--r-card);
  padding: var(--space-8);
  box-shadow: var(--shadow-1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  text-decoration: none;
  color: inherit;
  min-height: 280px;
}
.tile:hover {
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
  border-color: var(--sea-light);
}
.tile--accent { background: var(--lapis-tint); border-color: transparent; }
.tile--accent::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 56px; height: 56px;
  background: var(--lapis);
  clip-path: polygon(100% 0, 0 0, 100% 100%);
}
.tile--external { background: var(--paper); border-style: dashed; }
.tile .h3 {
  color: var(--ink);
  margin-top: var(--space-2);
  margin-bottom: var(--space-4);
  letter-spacing: -0.4px;
}
.tile p {
  color: var(--text-2);
  flex: 1;
  margin-bottom: var(--space-6);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.01em;
}
.tile .link-arrow { margin-top: auto; }

/* ============================================================
   QUOTE LIST (Analytics page opener pain quotes)
   ============================================================ */

.quote-list {
  list-style: none;
  margin: var(--space-6) 0;
  display: grid;
  gap: var(--space-3);
  max-width: var(--prose);
}
.quote-list li {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  color: var(--sea-darkest);
  padding: var(--space-2) var(--space-6);
  border-left: 3px solid var(--sea-light);
  line-height: 1.5;
}

/* ============================================================
   LIST — clean bullets (What we do sections)
   ============================================================ */

.list-clean {
  list-style: none;
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
  max-width: var(--prose);
}
.list-clean li {
  padding-left: var(--space-6);
  position: relative;
  color: var(--text-2);
  line-height: 1.55;
}
.list-clean li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sea-deep);
}
.band-lapis .list-clean li { color: var(--paper); }
.band-lapis .list-clean li::before { background: var(--sea-light); }

/* Italic Q&A list (Strategic Growth questions) */
.list-questions {
  list-style: none;
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-6);
  max-width: var(--prose);
}
.list-questions li {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 19px;
  color: var(--sea-darkest);
  padding-left: var(--space-6);
  position: relative;
  line-height: 1.45;
}
.list-questions li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--sea-light);
  font-style: normal;
  font-weight: 600;
}

/* "How it works" engagement cards */
.engagement-list {
  list-style: none;
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.engagement-list > li {
  background: var(--paper);
  border: 1px solid var(--divider);
  border-radius: var(--r-card);
  padding: var(--space-8);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.engagement-list > li:hover { border-color: var(--sea-light); box-shadow: var(--shadow-1); }
.engagement-list strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: -0.3px;
  font-size: 18px;
}
.engagement-list .desc { color: var(--text-2); font-size: 15px; line-height: 1.55; letter-spacing: -0.01em; }
.engagement-list .training-sub {
  list-style: none;
  margin-top: var(--space-3);
  padding-left: var(--space-3);
  display: grid;
  gap: 6px;
}
.engagement-list .training-sub li {
  font-style: italic;
  font-family: 'Lora', Georgia, serif;
  font-size: 16px;
  color: var(--sea-darkest);
  padding: 0;
  border: 0;
}
.engagement-list .training-sub li::before { content: "• "; color: var(--sea-light); margin-right: 4px; font-style: normal; }

/* ============================================================
   PROOF CALLOUT (on Lapis bands)
   ============================================================ */

.proof-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}
.proof-block .item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(143, 180, 183, 0.22);
  border-radius: var(--r-card);
  padding: var(--space-8);
}
.proof-block .item .num {
  font-weight: 700;
  font-size: 30px;
  color: var(--paper);
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: var(--space-2);
  display: block;
}
.proof-block .item .desc {
  color: var(--sea-light);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

/* ============================================================
   SCROLL-DRIVEN WORD REVEAL
   Ported from magicui/text-reveal (donor) per CLAUDE.md rule.
   Used once per site: the Why PreeWorks Lapis band on Home.
   ============================================================ */

.reveal-track {
  position: relative;
  min-height: 150vh;
}
.reveal-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
}
.reveal-headline { /* inherits display-lora-lg */ }

.reveal-word {
  position: relative;
  display: inline-block;
}
.reveal-ghost,
.reveal-revealed {
  display: inline-block;
}
.reveal-ghost {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0.30;
  pointer-events: none;
  color: var(--paper);
}
.reveal-revealed {
  color: var(--paper);
  opacity: var(--reveal, 0);
}
.reveal-word.is-em .reveal-ghost,
.reveal-word.is-em .reveal-revealed {
  font-style: italic;
  color: var(--sea-light);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-track { min-height: 0; }
  .reveal-sticky { position: static; height: auto; }
  .reveal-revealed { opacity: 1; }
  .reveal-ghost { display: none; }
}

/* ============================================================
   D1 — Hand-drawn underline (Aceternity animated-underline donor)
   Used on About "The story" Lapis band, under italic "pre-work".
   ============================================================ */

.pree-underline {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.pree-underline svg {
  position: absolute;
  left: 0;
  bottom: -0.18em;
  width: 100%;
  height: 14px;
  overflow: visible;
  pointer-events: none;
}
.pree-underline path {
  fill: none;
  stroke: var(--sea-light);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 320;
  stroke-dashoffset: 320;
  transition: d 0.8s ease, stroke-dashoffset 1.4s ease-out;
}
.pree-underline.is-in-view path { stroke-dashoffset: 0; }
.pree-underline:hover path { d: path("M 0,10 Q 75,20 150,10 Q 225,0 300,10"); }

/* On light bands the stroke is Sea Darkest instead of Sea Light. */
.band-paper .pree-underline path,
.band-surface .pree-underline path,
.band-tint .pree-underline path { stroke: var(--sea-darkest); }

@media (prefers-reduced-motion: reduce) {
  .pree-underline path {
    stroke-dashoffset: 0;
    transition: none;
  }
}

/* ============================================================
   D2 — Hairline hero frame + per-word blur-in entrance
   Donor: Aceternity hero-section. Used on Home hero only.
   ============================================================ */

.hero--framed { position: relative; }
.hero--framed .hero-frame-line {
  position: absolute;
  background: var(--divider);
  z-index: 1;
  pointer-events: none;
}
.hero--framed .hero-frame-line--left { top: 0; bottom: 0; left: 0; width: 1px; }
.hero--framed .hero-frame-line--right { top: 0; bottom: 0; right: 0; width: 1px; }
.hero--framed .hero-frame-line--bottom { left: 0; right: 0; bottom: 0; height: 1px; }
.hero--framed .hero-frame-ray {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}
.hero--framed .hero-frame-ray--left,
.hero--framed .hero-frame-ray--right {
  top: 0;
  width: 1px;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--sea-deep), transparent);
}
.hero--framed .hero-frame-ray--left  { left: 0; }
.hero--framed .hero-frame-ray--right { right: 0; }
.hero--framed .hero-frame-ray--bottom {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--sea-deep), transparent);
}
.hero--framed > .container { position: relative; z-index: 3; }

/* Per-word blur-in — words wrapped at runtime by JS */
.hero-display .word {
  display: inline-block;
  opacity: 0;
  filter: blur(4px);
  transform: translateY(10px);
  animation: word-in 0.42s ease-out forwards;
  animation-delay: calc(var(--i, 0) * 0.08s);
}
.hero-display .word .accent { color: var(--sea-darkest); }
@keyframes word-in {
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}
.hero .lead {
  opacity: 0;
  animation: word-in 0.6s ease-out 0.85s forwards;
}
.hero .hero-actions {
  opacity: 0;
  animation: word-in 0.6s ease-out 1.05s forwards;
}
.hero .proof-strip {
  opacity: 0;
  animation: word-in 0.6s ease-out 1.25s forwards;
}

@media (prefers-reduced-motion: reduce) {
  .hero-display .word,
  .hero .lead,
  .hero .hero-actions,
  .hero .proof-strip {
    opacity: 1;
    filter: none;
    transform: none;
    animation: none;
  }
}

/* ============================================================
   D4 — Sticky two-section scroll-stack transition
   Donor: hero-scroll-animation. Used on Strategic Growth Advisory
   between "How it works" and "Proof".
   ============================================================ */

.stack-track {
  position: relative;
  min-height: 200vh;
  background: var(--lapis); /* prevents background flash between sticky transitions */
}
.stack-track .stack-recede {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform-origin: center top;
  transform: scale(1) rotate(0deg);
  will-change: transform;
}
.stack-track .stack-rise {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform-origin: center bottom;
  transform: scale(0.8) rotate(5deg);
  will-change: transform;
  z-index: 1;
}
.stack-track .stack-rise {
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  overflow: hidden;
}

/* Subtle grid texture overlay borrowed from the donor — D4 atmosphere */
.stack-grid-texture {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(58,91,94,0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(58,91,94,0.08) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 70%, transparent 100%);
}
.stack-recede .container,
.stack-rise .container { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .stack-track { min-height: 0; background: transparent; }
  .stack-track .stack-recede,
  .stack-track .stack-rise {
    position: static;
    transform: none;
    min-height: 0;
  }
  .stack-track .stack-rise { border-radius: 0; }
}

/* ============================================================
   D5 — Split-screen hero with diagonal clip-path photo reveal
   Donor: hero-section-2. Used on About hero (left text, right headshot).
   ============================================================ */

.hero-photo-split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--space-16);
  align-items: stretch;
  min-height: 560px;
}
.hero-photo-split .hero-photo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-8) 0;
}
.hero-photo-split .hero-hairline {
  width: 56px;
  height: 2px;
  background: var(--sea-deep);
  margin: var(--space-6) 0;
}
.hero-photo-split .hero-textlink {
  display: inline-block;
  font: 600 13px/1 'Inter', sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--lapis);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
  margin-top: var(--space-6);
  align-self: flex-start;
}
.hero-photo-split .hero-textlink::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--lapis);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.hero-photo-split .hero-textlink:hover::after { transform: scaleX(1.15); }

.hero-photo-split .hero-info-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--divider);
}
.hero-photo-split .hero-info-strip a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-2);
  letter-spacing: -0.01em;
  transition: color 0.15s;
}
.hero-photo-split .hero-info-strip a:hover { color: var(--ink); }
.hero-photo-split .hero-info-strip svg {
  width: 16px;
  height: 16px;
  stroke: var(--sea-darkest);
  flex-shrink: 0;
}

.hero-photo-split .hero-photo {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--sea-tint);
  align-self: stretch;
  clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%);
  animation: photo-reveal 1.2s cubic-bezier(0.85, 0, 0.15, 1) 0.2s forwards;
  min-height: 480px;
}
.hero-photo-split .hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
@keyframes photo-reveal {
  to { clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%); }
}

@media (max-width: 900px) {
  .hero-photo-split {
    grid-template-columns: 1fr;
    gap: var(--space-8);
    min-height: 0;
  }
  .hero-photo-split .hero-photo { min-height: 320px; order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-photo-split .hero-photo {
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
    animation: none;
  }
}

/* ============================================================
   D6 — Word-cycle inside a static H1 frame
   Donor: animated-hero. Used on Analytics & AI Transformation hero.
   ============================================================ */

.word-cycle {
  position: relative;
  display: block;
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(22px, 2.8vw, 32px);
  letter-spacing: -0.3px;
  color: var(--sea-darkest);
  line-height: 1.25;
  margin-top: var(--space-3);
  overflow: hidden;
  height: 1.25em;
}
.word-cycle-spacer {
  visibility: hidden;
  white-space: nowrap;
  display: inline-block;
}
.word-cycle-item {
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(1.25em);
  transition: opacity 0.55s ease-out, transform 0.55s ease-out;
}
.word-cycle-item.is-active {
  opacity: 1;
  transform: translateY(0);
}
.word-cycle-item.is-leaving {
  opacity: 0;
  transform: translateY(-1.25em);
}

@media (prefers-reduced-motion: reduce) {
  .word-cycle { height: auto; }
  .word-cycle-item {
    position: static;
    opacity: 1;
    transform: none;
    display: block;
    transition: none;
  }
  .word-cycle-spacer { display: none; }
}

/* ============================================================
   D7 — Asymmetric 4-card grid + bouncy hover
   Donor: bounce-card-features. Used on Home "What we do" and
   Services hub tiles.
   ============================================================ */

.tile-grid--asymmetric {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-8);
}
.tile-grid--asymmetric > :nth-child(1) { grid-column: span 5; }
.tile-grid--asymmetric > :nth-child(2) { grid-column: span 7; }
.tile-grid--asymmetric > :nth-child(3) { grid-column: span 7; }
.tile-grid--asymmetric > :nth-child(4) { grid-column: span 5; }

@media (max-width: 900px) {
  .tile-grid--asymmetric { grid-template-columns: 1fr; }
  .tile-grid--asymmetric > * { grid-column: 1 / -1 !important; }
}

/* Bouncy hover replaces the default tile lift */
.tile-grid--asymmetric .tile {
  transition: transform 220ms ease-out, box-shadow 220ms ease-out, border-color 220ms ease-out;
}
.tile-grid--asymmetric .tile:hover {
  transform: scale(0.985) rotate(-0.4deg);
  box-shadow: var(--shadow-2);
  border-color: var(--sea-light);
}

@media (prefers-reduced-motion: reduce) {
  .tile-grid--asymmetric .tile:hover {
    transform: none;
  }
}

/* ============================================================
   HOME HYBRID SECTIONS (DECISION 2026-06-14)
   Centered hero proof row, offset editorial block, "What changes"
   even outcome grid, compact services, gapless "How it works" steps.
   Set 2 hero/who/how + Set 1 what-changes/services/why.
   ============================================================ */

/* Centered hero proof row — fixed 4 columns with hairline dividers */
.proof-strip--hero {
  grid-template-columns: repeat(4, 1fr);
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
.proof-strip--hero .proof-item {
  padding: 0 var(--space-6);
  border-left: 1px solid var(--divider);
}
.proof-strip--hero .proof-item:first-child { border-left: 0; }

/* Offset editorial block — eyebrow rail + content column */
.editorial-offset {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-8);
}
.editorial-offset .rail { grid-column: span 3; padding-top: 6px; }
.editorial-offset .content { grid-column: 5 / span 8; }
.editorial-offset .content .h2 { max-width: 20ch; }
.editorial-offset .content p { max-width: 58ch; margin-top: var(--space-6); }

/* What changes — even outcome card grid */
.outcome-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-8);
}
.outcome-card {
  background: var(--paper);
  border: 1px solid var(--divider);
  border-radius: var(--r-card);
  padding: var(--space-7);
  transition: transform 0.2s, box-shadow 0.2s;
}
.outcome-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.outcome-card h3 { font-size: 18px; font-weight: 600; color: var(--ink); }
.outcome-card p { margin-top: var(--space-2); color: var(--text-2); line-height: 1.55; }

/* Compact services grid — tighter than the airy asymmetric tiles */
.tile-grid--compact { grid-template-columns: repeat(3, 1fr); }
.tile-grid--compact .tile { min-height: 0; padding: var(--space-7); }
.tile--wide {
  margin-top: var(--space-4);
  min-height: 0;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-7) var(--space-8);
}
.tile--wide .tile-wide-body { flex: 1; }
.tile--wide .h3 { margin: 0 0 4px; }
.tile--wide p { margin: 0; flex: unset; }

/* How it works — gapless connected steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--divider);
  border: 1px solid var(--divider);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-top: var(--space-8);
}
.step-cell { background: var(--paper); padding: var(--space-8); }
.step-cell .step-num {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size: 30px;
  color: var(--lapis);
  line-height: 1;
}
.step-cell h3 { font-size: 18px; font-weight: 600; color: var(--ink); margin-top: var(--space-4); }
.step-cell p { margin-top: var(--space-2); color: var(--text-2); line-height: 1.55; }
.steps-cta { margin-top: var(--space-8); }

@media (max-width: 900px) {
  .editorial-offset { grid-template-columns: 1fr; gap: var(--space-4); }
  .editorial-offset .rail,
  .editorial-offset .content { grid-column: 1 / -1; }
  .tile-grid--compact { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .outcome-grid { grid-template-columns: 1fr; }
  .proof-strip--hero { grid-template-columns: repeat(2, 1fr); }
  .proof-strip--hero .proof-item:nth-child(3) { border-left: 0; }
  .tile--wide { flex-direction: column; align-items: flex-start; }
}

/* Gold masthead rule — structural accent under section headings (Preeworks only).
   60px gold bar per design-system §6. */
.gold-rule {
  width: 60px;
  height: 3px;
  background: var(--gold);
  border-radius: var(--r-pill);
  margin: 0 0 var(--space-6);
}
.gold-rule--center { margin-left: auto; margin-right: auto; }

/* ============================================================
   GOLD TREATMENTS (DECISION 2026-06-14) — Preeworks-only structural
   accent (design-system v1.1 / styles §gold). Sanctioned uses only:
   masthead mark, nav underline, stat unit suffix. Never a CTA, never
   prose emphasis, never more than ~10% of a surface.
   ============================================================ */

/* Masthead mark — short gold rule under the nav wordmark */
.nav .wordmark { position: relative; }
.nav .wordmark::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 20px;
  height: 2px;
  background: var(--gold);
  border-radius: var(--r-pill);
}

/* Nav underline — gold, on anchor links only so the Services
   dropdown toggle keeps its caret (which also uses ::after). */
a.nav-link { position: relative; }
a.nav-link::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 0;
  height: 2px;
  background: var(--gold);
  border-radius: var(--r-pill);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
a.nav-link:hover::after,
a.nav-link[aria-current="page"]::after { transform: scaleX(1); }

/* Stat unit suffixes — gold on the non-numeric glyphs ($ M % +) */
.proof-item .num .u { color: var(--gold-deep); }

/* "Beliefs" — editorial manifesto stack (How I think on About).
   Replaces the weak auto-fit card grid: full-width rows, Lora editorial lines,
   hairline dividers, a short gold structural mark per row. Handles odd counts. */
.beliefs-manifesto {
  max-width: 860px;
  margin-top: var(--space-8);
}
.belief-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: var(--space-4);
  align-items: baseline;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--hairline);
}
.belief-row:first-child { border-top: 1px solid var(--hairline); }
.belief-mark {
  width: 24px;
  height: 3px;
  background: var(--gold);
  border-radius: var(--r-pill);
  align-self: start;
  margin-top: 0.7em;
}
.belief-row p {
  font-family: 'Lora', Georgia, serif;
  font-weight: 500;
  font-size: clamp(19px, 2.2vw, 22px);
  line-height: 1.4;
  color: var(--ink);
}

/* ============================================================
   FORM — survey
   ============================================================ */

.form-card {
  background: var(--paper);
  border: 1px solid var(--divider);
  border-radius: var(--r-card);
  padding: var(--space-12);
  max-width: 640px;
  margin-top: var(--space-12);
  box-shadow: var(--shadow-1);
}
.form-field { margin-bottom: var(--space-8); }
.form-field label.q-label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}
.form-field .help {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-top: 6px;
  letter-spacing: -0.01em;
}
.input, .textarea, .select {
  width: 100%;
  font: 400 15px/1.4 'Inter', sans-serif;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { min-height: 110px; resize: vertical; font-family: inherit; }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--lapis);
  box-shadow: 0 0 0 3px rgba(42, 58, 82, 0.12);
}

.choice-group { display: grid; gap: var(--space-2); }
.choice {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px 16px;
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-2);
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
  letter-spacing: -0.01em;
}
.choice input { accent-color: var(--lapis); width: 16px; height: 16px; }
.choice:hover { border-color: var(--sea-deep); }
.choice:has(input:checked) {
  border-color: var(--lapis);
  background: var(--lapis-tint);
  color: var(--ink);
  font-weight: 500;
}

.form-status {
  margin-top: var(--space-6);
  font-size: 14px;
  display: none;
  padding: 12px 16px;
  border-radius: var(--r-md);
}
.form-status.is-error   { display: block; color: #A4533F; background: #F5E8E5; border: 1px solid #E8C8BE; }
.form-status.is-success { display: block; color: var(--sea-darkest); background: var(--sea-tint); border: 1px solid var(--sea-light); }

/* ============================================================
   FOOTER — Lapis bookend (Brex pattern)
   ============================================================ */

.footer {
  background: var(--lapis);
  color: var(--sea-light);
  padding: var(--space-20) 0 var(--space-8);
  margin-top: 0;
}
.footer-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
  align-items: start;
}
.footer-col h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--sea-light);
  margin-bottom: var(--space-4);
}
.footer-col ul { list-style: none; display: grid; gap: var(--space-2); }
.footer-col a {
  font-size: 14px;
  color: var(--sea-light);
  letter-spacing: -0.01em;
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--paper); }
.footer-brand .wordmark { font-size: 26px; color: var(--paper); }
.footer-brand p {
  font-size: 13px;
  color: var(--sea-light);
  margin-top: var(--space-4);
  max-width: 320px;
  line-height: 1.55;
  letter-spacing: -0.01em;
}
.footer-bottom {
  margin-top: var(--space-16);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(143,180,183,0.22);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--sea-light);
  flex-wrap: wrap;
  gap: var(--space-4);
  letter-spacing: -0.01em;
}

/* ============================================================
   UTILITY
   ============================================================ */

.text-center { text-align: center; }
.mt-3  { margin-top: var(--space-3); }
.mt-4  { margin-top: var(--space-4); }
.mt-6  { margin-top: var(--space-6); }
.mt-8  { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.external::after { content: " ↗"; font-size: 0.85em; opacity: 0.7; }
.brand-inline {
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  letter-spacing: 0.6px;
}

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

@media (max-width: 900px) {
  :root {
    --space-16: 28px;
    --space-20: 56px;
    --space-24: 64px;
    --space-28: 80px;
  }
  .container { padding: 0 24px; }
  .hero-split { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer-row { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
  .footer-brand { grid-column: 1 / -1; margin-bottom: var(--space-6); }
}

@media (max-width: 720px) {
  :root { --space-24: 48px; }
  .nav-row { padding: 12px 20px; gap: var(--space-3); }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--divider);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-3);
    gap: 0;
    display: none;
  }
  .nav-links[data-open="true"] { display: flex; }
  .nav-link { padding: 12px 16px; border-radius: var(--r-md); width: 100%; text-align: left; }
  .nav-link:hover { background: var(--sea-tint-2); }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-menu {
    position: static;
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 0 var(--space-3);
    display: block;
    opacity: 1;
    transform: none;
    min-width: 0;
  }
  .nav-toggle { display: inline-flex; }
  .nav-cta-desktop { display: none; }
  .footer-row { grid-template-columns: 1fr; }
  .proof-strip { gap: var(--space-4); }
  .form-card { padding: var(--space-8); }
}
