/* ============================================================
   Eliot Bridge Partners — site styles
   Tokens pulled directly from the brand guidelines (§04 Color,
   §05 Typography, §06 The Label, §09 Digital).
   ============================================================ */

:root {
  /* Color — §04 / §09 web tokens */
  --navy:        #1F2D44;  /* Cambridge Navy */
  --gold:        #C8A15A;  /* Heritage Gold  */
  --ivory:       #F5F1E6;  /* Warm Ivory     */
  --slate:       #52637A;  /* River Slate    */
  --stone:       #D9D6CF;  /* Masonry Stone  */
  --brickstone:  #B85A3C;  /* Brickstone — accent only, <5% */

  --navy-90:     rgba(31, 45, 68, 0.90);
  --ivory-soft:  #EFEAD9;
  --gold-soft:   rgba(200, 161, 90, 0.16);

  /* Type — §05 */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body:    "Schibsted Grotesk", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Layout */
  --maxw: 1120px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(32px, 4.5vw, 60px);
  --radius: 2px;

  --shadow-sm: 0 1px 2px rgba(31, 45, 68, 0.06);
  --shadow-md: 0 18px 48px rgba(31, 45, 68, 0.12);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--navy);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3 { margin: 0; font-weight: 500; }

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: var(--ivory);
  padding: 10px 18px;
  z-index: 200;
  border-radius: var(--radius);
}
.skip-link:focus { left: 12px; top: 12px; }

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

/* Header & footer span full width; body sections stay centered */
.site-header .container,
.site-footer .container {
  max-width: none;
  margin: 0;
}

/* ---------- Section surfaces ---------- */
.section { padding: var(--section-y) 0; }

.section--ivory { background: var(--ivory); color: var(--navy); }
.section--stone { background: var(--ivory-soft); color: var(--navy); }
.section--navy  { background: var(--navy);  color: var(--ivory); }

/* ---------- Typographic helpers ---------- */
.eyebrow,
.kicker {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.34em;       /* §06 tracking */
  text-transform: uppercase;
  padding-left: 0.34em;          /* §06 optical fix */
  margin: 0 0 18px;
  color: var(--slate);
}
.eyebrow--gold,
.kicker--gold { color: var(--gold); }

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.2vw, 2.85rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }

.section-intro {
  margin-top: 20px;
  font-size: 1.075rem;
  color: var(--slate);
  max-width: 64ch;
}

.section-closing {
  margin-top: clamp(36px, 5vw, 52px);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  line-height: 1.4;
  color: var(--navy);
  max-width: 60ch;
}
.section-closing em { font-style: italic; color: var(--slate); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: var(--radius);   /* §09 square corners */
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn:active { transform: translateY(1px); }

/* Gold — the single key conversion per view (§09) */
.btn-cta {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-cta:hover { background: #b8924a; border-color: #b8924a; }

/* Navy primary action on light surfaces */
.btn-navy {
  background: var(--navy);
  color: var(--ivory);
  border-color: var(--navy);
}
.btn-navy:hover { background: #16202f; }

/* Outline / ghost on dark surfaces */
.btn-ghost {
  background: transparent;
  color: var(--ivory);
  border-color: rgba(245, 241, 230, 0.4);
}
.btn-ghost:hover { border-color: var(--ivory); background: rgba(245, 241, 230, 0.06); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 241, 230, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--stone);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 58px;
  width: 100%;
}

.brand { display: inline-flex; align-items: center; }
.brand-logo { width: auto; height: 34px; }

.nav { display: flex; align-items: center; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 36px);
}
.nav-menu > li { display: flex; }
.nav-menu a:not(.btn) {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--navy);
  padding: 6px 0;
  position: relative;
  transition: color .2s ease;
}
.nav-menu a.btn {
  font-weight: 600;
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 9px 18px;
}
.nav-menu a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.nav-menu a:not(.btn):hover::after,
.nav-menu a.is-active:not(.btn)::after { transform: scaleX(1); }
.nav-menu a.is-active:not(.btn) { color: var(--navy); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 10px;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--navy);
  transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(92vh, 860px);
  padding: clamp(60px, 10vh, 110px) 0 clamp(28px, 4vh, 48px);
  background: var(--navy);
  color: var(--ivory);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  pointer-events: none;
  filter: brightness(1.28) saturate(1.05);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(20, 29, 47, 0.78) 0%, rgba(20, 29, 47, 0.52) 40%, rgba(20, 29, 47, 0.18) 72%, rgba(20, 29, 47, 0.05) 100%),
    linear-gradient(0deg, rgba(20, 29, 47, 0.62) 0%, rgba(20, 29, 47, 0) 45%);
}

.hero-inner { position: relative; max-width: 880px; margin: auto 0; text-align: left; }

/* ---------- Hero logo marquee ---------- */
.hero-marquee {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: clamp(48px, 8vh, 96px);
  padding-bottom: clamp(20px, 4vh, 44px);
}
.marquee-label {
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: clamp(28px, 4vh, 44px);
  padding: 0 var(--gutter);
}
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.marquee-track {
  display: flex;
  width: max-content;
  align-items: center;
  animation: marquee-scroll 50s linear infinite;
}
.marquee:hover .marquee-track,
.marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(26px, 4.5vw, 58px);
}
.marquee-item img {
  display: block;
  height: clamp(26px, 3.2vw, 38px);
  width: auto;
  max-width: clamp(120px, 16vw, 190px);
  object-fit: contain;
  opacity: 0.7;
  transition: opacity .2s ease;
}
.marquee-item:hover img { opacity: 1; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 10px;
  }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-item[aria-hidden="true"] { display: none; }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 6.6vw, 5rem);
  line-height: 1.04;
  letter-spacing: 0.005em;
  margin: 0 0 24px;
}

.hero-sub {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.6;
  color: rgba(245, 241, 230, 0.84);
  max-width: 60ch;
  margin-bottom: 38px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ============================================================
   APPROACH — comparison
   ============================================================ */
.compare {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
.compare-card {
  background: var(--ivory);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 30px 26px;
}
.compare-card--featured {
  background: var(--navy);
  color: var(--ivory);
  border-color: var(--navy);
  box-shadow: var(--shadow-md);
  position: relative;
  transform: translateY(-10px);
}
.compare-flag {
  font-size: 0.66rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 8px;
}
.compare-name {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--stone);
}
.compare-card--featured .compare-name { border-bottom-color: rgba(200, 161, 90, 0.4); }

.compare-list > div { padding: 12px 0; border-top: 1px solid rgba(82, 99, 122, 0.14); }
.compare-list > div:first-child { border-top: 0; }
.compare-list dt {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 3px;
}
.compare-card--featured .compare-list dt { color: rgba(245, 241, 230, 0.6); }
.compare-list dd { margin: 0; font-size: 1rem; font-weight: 500; }
.compare-card--featured .compare-list dd { color: var(--ivory); }

/* ============================================================
   OWNERS
   ============================================================ */
#owners .container { max-width: 1160px; }
#owners .section-head { max-width: 940px; }
#owners .section-intro { max-width: 82ch; }

.promise-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.promise-card {
  background: var(--ivory);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: 28px 22px;
}
.promise-mark { display: block; width: 60px; margin-bottom: 18px; }
.promise-mark img { width: 100%; height: auto; }
.promise-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 8px;
}
.promise-card p { color: var(--slate); font-size: 0.98rem; }
.promise-card em { font-style: italic; }

.paths { margin-top: clamp(40px, 6vw, 64px); }
.paths-lead {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  margin-bottom: 24px;
}
.paths-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.path-card {
  background: var(--navy);
  color: var(--ivory);
  border-radius: var(--radius);
  padding: 32px 30px;
  border-left: 3px solid var(--gold);
}
.path-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 10px;
}
.path-card p { color: rgba(245, 241, 230, 0.82); }

.soft-cta { margin-top: 28px; font-size: 1.05rem; color: var(--slate); }
.soft-cta a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--gold);
  padding-bottom: 2px;
}
.soft-cta a:hover { color: var(--gold); }

/* ============================================================
   WHAT WE DO
   ============================================================ */
/* Blueprint grid across the whole section (light-mode) */
#what-we-do { position: relative; overflow: hidden; }
#what-we-do::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(82, 99, 122, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(82, 99, 122, 0.07) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 84%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 84%, transparent 100%);
}
#what-we-do > .container { position: relative; z-index: 1; }

.wwd-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 5vw, 64px);
}
.wwd-label {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 18px;
}
.wwd-label--ladder { margin-top: 40px; }

.service-list li {
  font-family: var(--font-display);
  font-size: 1.45rem;
  padding: 12px 0;
  border-bottom: 1px solid var(--stone);
}
.service-list li:last-child { border-bottom: 0; }

.ladder { counter-reset: rung; display: grid; gap: 10px; }
.ladder li {
  counter-increment: rung;
  position: relative;
  padding: 12px 16px 12px 52px;
  background: var(--ivory-soft);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  font-weight: 500;
}
.ladder li::before {
  content: counter(rung);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  display: grid; place-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 50%;
}

/* Monospace code-comment labels — tech voice across the section */
.wwd-label--mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--slate);
}
.wwd-label--mono span { color: var(--gold); }

.modern-list { display: grid; gap: 4px; counter-reset: step; }
.modern-list > li {
  counter-increment: step;
  position: relative;
  padding: 22px 0 22px 52px;
  border-top: 1px solid var(--stone);
}
.modern-list > li:first-child { border-top: 0; padding-top: 0; }
.modern-list > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 24px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.04em;
}
.modern-list > li:first-child::before { top: 2px; }
.modern-list h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 6px;
}
.modern-list p { color: var(--slate); }

/* ============================================================
   AI AGENTS & LOOPS
   ============================================================ */
.section--navy .section-intro { color: rgba(245, 241, 230, 0.80); }

/* Blueprint grid — the machine room */
.ai-loop { position: relative; overflow: hidden; }
.ai-loop::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(200, 161, 90, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(245, 241, 230, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(120% 90% at 70% 0%, #000 35%, transparent 80%);
          mask-image: radial-gradient(120% 90% at 70% 0%, #000 35%, transparent 80%);
}
.ai-loop > .container { position: relative; z-index: 1; }

/* Transition seam — "entering the modern engine" */
.tech-seam {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.tech-seam-line {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(200, 161, 90, 0.45));
}
.tech-seam-line:last-child {
  background: linear-gradient(90deg, rgba(200, 161, 90, 0.45), transparent);
}
.tech-seam-label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(200, 161, 90, 0.85);
  white-space: nowrap;
}

.loop {
  max-width: 860px;
  margin-top: clamp(8px, 1.5vw, 16px);
}
.loop > li {
  position: relative;
  padding-left: 76px;
  padding-bottom: clamp(28px, 4vw, 40px);
}
.loop > li:last-child { padding-bottom: 0; }
.loop-num {
  position: absolute;
  left: 0;
  top: 0;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--gold);
  background: rgba(200, 161, 90, 0.06);
  border: 1px solid rgba(200, 161, 90, 0.5);
  border-radius: var(--radius);
  box-shadow: 0 0 0 4px rgba(31, 45, 68, 0.6), 0 0 18px rgba(200, 161, 90, 0.25);
  z-index: 1;
}
.loop > li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 52px;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(200, 161, 90, 0.5) 0 6px,
    transparent 6px 12px
  );
}
.loop-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(200, 161, 90, 0.7);
  white-space: nowrap;
  vertical-align: 0.18em;
}
.loop-tag::before {
  content: "·";
  margin: 0 0.45em 0 0.3em;
  color: rgba(200, 161, 90, 0.5);
}
.loop h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  color: var(--ivory);
  padding-top: 7px;
  margin-bottom: 6px;
}
.loop p { color: rgba(245, 241, 230, 0.74); max-width: 62ch; }
.loop em { font-style: italic; color: var(--gold); }

/* "Shows its work" provenance card */
.trace-card {
  margin: clamp(40px, 6vw, 64px) 0 0;
  max-width: 540px;
  font-family: var(--font-mono);
  background: rgba(245, 241, 230, 0.035);
  border: 1px solid rgba(200, 161, 90, 0.28);
  border-radius: var(--radius);
  box-shadow: 0 0 36px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(245, 241, 230, 0.02);
  overflow: hidden;
}
.trace-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(200, 161, 90, 0.2);
  background: rgba(31, 45, 68, 0.4);
  font-size: 0.74rem;
}
.trace-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(200, 161, 90, 0.7);
  flex: 0 0 auto;
}
.trace-meta { color: rgba(245, 241, 230, 0.7); letter-spacing: 0.02em; }
.trace-status {
  margin-left: auto;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.trace-body { padding: 8px 16px 14px; }
.trace-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid rgba(245, 241, 230, 0.06);
  font-size: 0.82rem;
}
.trace-row:first-child { border-top: 0; }
.trace-key {
  flex: 0 0 64px;
  color: rgba(245, 241, 230, 0.4);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.trace-val { color: rgba(245, 241, 230, 0.88); }
.trace-val--num { color: var(--ivory); font-weight: 600; }
.trace-chip {
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: var(--gold);
  padding: 2px 8px;
  border: 1px solid rgba(200, 161, 90, 0.45);
  border-radius: 999px;
  background: rgba(200, 161, 90, 0.08);
}
.trace-review {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid rgba(200, 161, 90, 0.2);
  background: rgba(31, 45, 68, 0.4);
}
.trace-review-label {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(245, 241, 230, 0.55);
}
.trace-actions { margin-left: auto; display: flex; gap: 8px; }
.trace-btn {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(245, 241, 230, 0.22);
  color: rgba(245, 241, 230, 0.7);
}
.trace-btn--approve {
  color: var(--navy);
  background: var(--gold);
  border-color: var(--gold);
  font-weight: 600;
}

.ai-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: clamp(44px, 6vw, 72px);
}
.ai-pillar {
  padding: 26px 24px;
  background: rgba(245, 241, 230, 0.04);
  border: 1px solid rgba(200, 161, 90, 0.28);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
}
.ai-pillar h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ivory);
  margin-bottom: 8px;
}
.ai-pillar p { color: rgba(245, 241, 230, 0.72); font-size: 0.98rem; }

/* ============================================================
   TEAM
   ============================================================ */
#team .container { max-width: 1160px; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.team-card {
  background: var(--ivory);
  border: 1px solid var(--stone);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 40px);
}
.team-head { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.team-photo {
  flex: 0 0 auto;
  width: 76px; height: 76px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--ivory-soft);
  box-shadow: 0 0 0 1px var(--gold), 0 0 0 5px var(--ivory), 0 0 0 6px rgba(200, 161, 90, 0.35);
}
.team-name { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.1; }
.team-role {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-top: 4px;
}
.team-bio { color: var(--slate); }

/* ============================================================
   CONTACT
   ============================================================ */
.contact { position: relative; overflow: hidden; }
.contact-inner { position: relative; z-index: 1; }

/* ---------- Grainy blue surface (contact) ---------- */
.contact { background-color: var(--navy); }
.contact::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.contact-line {
  margin-top: 18px;
  font-size: 1.1rem;
  color: rgba(245, 241, 230, 0.84);
  max-width: 56ch;
}

.contact-form {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 720px;
}
.field { display: flex; flex-direction: column; }
.field--full { grid-column: 1 / -1; }
.field--hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.field label {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(245, 241, 230, 0.7);
  margin-bottom: 8px;
}
.field input,
.field select,
.field textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ivory);
  background: rgba(245, 241, 230, 0.06);
  border: 1px solid rgba(245, 241, 230, 0.24);
  border-radius: var(--radius);
  padding: 13px 14px;
  width: 100%;
  transition: border-color .2s ease, background-color .2s ease;
}
.field textarea { resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(245, 241, 230, 0.1);
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(245, 241, 230, 0.4); }
.field select option { color: var(--navy); }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form-note { font-size: 0.92rem; color: var(--gold); margin: 0; }

.contact-alt {
  margin-top: 28px;
  color: rgba(245, 241, 230, 0.7);
  font-size: 0.98rem;
}
.contact-alt a { color: var(--gold); text-decoration: none; border-bottom: 1px solid rgba(200, 161, 90, 0.5); }
.contact-alt a:hover { border-bottom-color: var(--gold); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { padding: clamp(24px, 3.5vw, 36px) 0; border-top: 1px solid rgba(200, 161, 90, 0.25); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  width: 100%;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 32px);
  flex: 0 1 auto;
  min-width: 0;
}
.footer-logo { width: auto; height: 56px; flex: 0 0 auto; }
.footer-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.35;
  color: rgba(245, 241, 230, 0.8);
  max-width: 28ch;
}
.footer-meta { flex: 0 0 auto; margin-left: auto; text-align: right; }
.footer-email {
  display: inline-block;
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 8px;
}
.footer-email:hover { text-decoration: underline; }
.footer-copy { font-size: 0.85rem; color: rgba(245, 241, 230, 0.55); }

/* ============================================================
   Scroll reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Responsive
   ============================================================ */
/* Promise cards go 4-across only when wide enough to keep headings on one line */
@media (max-width: 1160px) {
  .promise-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .compare { grid-template-columns: 1fr; }
  .compare-card--featured { transform: none; order: -1; }
  .wwd-grid { grid-template-columns: 1fr; }
  .ai-pillars { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--stone);
    box-shadow: var(--shadow-md);
    padding: 8px var(--gutter) 20px;
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    pointer-events: none;
    transition: clip-path .3s ease, opacity .2s ease;
  }
  .nav-menu.is-open { clip-path: inset(0 0 0 0); opacity: 1; pointer-events: auto; }
  .nav-menu > li { width: 100%; }
  .nav-menu a:not(.btn) { padding: 14px 0; font-size: 1.05rem; }
  .nav-menu a:not(.btn)::after { display: none; }
  .nav-menu a.btn { margin-top: 12px; width: 100%; }

  .team-grid,
  .paths-grid,
  .contact-form { grid-template-columns: 1fr; }

  .tech-seam-label { font-size: 0.62rem; white-space: normal; }
  .trace-review { flex-wrap: wrap; }
  .trace-actions { margin-left: 0; width: 100%; }
  .trace-btn { flex: 1; text-align: center; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-brand { flex-direction: column; align-items: flex-start; }
  .footer-meta { margin-left: 0; text-align: left; }

  .hero { min-height: 88vh; }
  .hero-bg { object-position: center 30%; }
  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(20, 29, 47, 0.62) 0%, rgba(20, 29, 47, 0.35) 42%, rgba(20, 29, 47, 0.72) 100%);
  }
}

@media (max-width: 480px) {
  .promise-grid { grid-template-columns: 1fr; }
  .brand-logo { height: 28px; }
}
