/* ===================================================================
   LUVERNA — Home page styles
   Colors sampled directly from the approved wireframe/mockup PDF.
   =================================================================== */

:root {
  /* Surfaces — cool mineral lacquer, tiered depth (Luverna's navy hue, refined in OKLCH) */
  --navy-950: oklch(16% 0.02 260);   /* deepest inset — mobile nav, deep footer bar */
  --navy-900: oklch(18% 0.022 260);  /* page ground */
  --navy-850: oklch(20% 0.023 260);
  --navy-800: oklch(22% 0.024 260);  /* raised panels / alternate sections */
  --navy-700: oklch(26% 0.028 260);  /* graphite — chips, inactive surfaces */

  /* Gold — kinpaku, tiered by role */
  --gold: oklch(88% 0.085 86);       /* primary — CTA fill, wordmark, active state */
  --gold-rich: oklch(80% 0.1 78);    /* active/pressed fill */
  --gold-deep: oklch(66% 0.09 76);   /* secondary — borders, diagram fills, subdued marks */
  --gold-pale: oklch(93% 0.05 88);   /* hover lift */

  /* Verdigris patina — secondary accent: state, live signals, interactive contrast */
  --patina: oklch(72% 0.1 190);
  --patina-pale: oklch(84% 0.07 190);
  --patina-deep: oklch(46% 0.08 190);

  /* Hairlines — neutral by default; gold reserved for brand-bearing structure */
  --hairline: oklch(94% 0 0 / 0.09);
  --hairline-strong: oklch(82% 0.09 84 / 0.55);

  /* Text */
  --cream: oklch(94% 0.014 90);
  --cream-soft: oklch(88% 0.01 90 / 0.72);
  --muted: oklch(68% 0.03 255);
  --faint: oklch(56% 0.02 255);

  --font-serif: 'EB Garamond', 'Georgia', serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', monospace;

  /* Type scale — EB Garamond headings: h1 58px, descending in steps of 8.
     Each step is the DESKTOP maximum; headings clamp down fluidly on smaller screens. */
  --h1: 58px;
  --h2: 50px;
  --h3: 42px;
  --h4: 34px;

  /* Body + component-level text — Manrope, 16px base */
  --text-lead: 18px;   /* intro / lead paragraph under a page title */
  --text-base: 16px;   /* body copy */
  --text-title: 21px;  /* component headings (cards) — below the h-scale by design */
  --text-sm: 15px;     /* dense card copy */

  --header-bg: oklch(16% 0.02 260 / 0.92);

  --container: 1240px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Elevation — restrained; used only for large framed modules and CTA lift */
  --shadow-panel: 0 24px 70px oklch(2% 0.01 262 / 0.45);
  --shadow-cta: 0 18px 44px oklch(3% 0.01 262 / 0.4);
  --focus-ring: 0 0 0 3px oklch(15% 0.035 262), 0 0 0 5px oklch(72% 0.1 190 / 0.8);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Browsers give <fieldset> a 2px groove border and a min-content inline size;
   neither belongs in this system. */
fieldset { border: none; min-inline-size: 0; }
legend { padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--navy-900);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Heading scale — EB Garamond throughout. Bare h1–h4 take the full scale;
   component headings (cards, footer labels) opt out via their own classes. */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(38px, 5vw, var(--h1)); font-weight: 500; line-height: 1.12; }
h2 { font-size: clamp(32px, 4.2vw, var(--h2)); font-weight: 700; line-height: 1.16; }
h3 { font-size: clamp(28px, 3.4vw, var(--h3)); font-weight: 600; }
h4 { font-size: clamp(24px, 2.8vw, var(--h4)); font-weight: 600; line-height: 1.25; }

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

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 1px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.section { padding: 130px 0; }

.section-eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--patina);
  margin-bottom: 18px;
}
.section-eyebrow.center { text-align: center; }
.section-eyebrow::before { content: '// '; color: var(--gold-deep); }

.section-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(32px, 4.2vw, var(--h2));
  line-height: 1.16;
  letter-spacing: -0.01em;
}
.section-title.center { text-align: center; }

.body-text {
  color: var(--cream-soft);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.75;
  margin-bottom: 22px;
  max-width: 46ch;
}

.link-arrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
  transition: opacity 0.25s var(--ease);
}
.link-arrow:hover { opacity: 0.7; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 17px 30px;
  border-radius: 2px;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-gold {
  background: var(--gold);
  color: var(--navy-950);
  font-weight: 600;
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.35);
}
.btn-gold:hover { transform: translateY(-2px); background: var(--gold-pale); box-shadow: var(--shadow-cta), inset 0 1px 0 oklch(100% 0 0 / 0.4); }
.btn-gold:active { transform: translateY(0); background: var(--gold-rich); }

.btn-outline {
  border-color: oklch(94% 0 0 / 0.22);
  color: var(--cream);
  background: transparent;
}
.btn-outline:hover { border-color: var(--patina); color: var(--patina-pale); transform: translateY(-2px); }

.btn-outline-sm {
  border: 1px solid var(--gold-deep);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 22px;
  display: inline-block;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn-outline-sm:hover { background: var(--gold); border-color: var(--gold); color: var(--navy-950); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 22px 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), padding 0.4s var(--ease);
}
.site-header.scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--hairline);
  padding: 14px 0;
}

/* Interior pages have no hero image behind the header, so it carries its
   surface from the start instead of fading in on scroll. */
.site-header--solid {
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 40px;
}

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
/* Brand lockup — images/logo.png carries the monogram + wordmark together,
   so it replaces both. Sized by height to preserve its 6.52:1 aspect ratio. */
.logo-img {
  height: 23px;
  width: auto;
  display: block;
}

.main-nav { display: flex; gap: 34px; margin-right: auto; }
.nav-link {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--cream-soft);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.25s var(--ease);
}
.nav-link:hover { color: var(--cream); }
.nav-link.active { color: var(--gold); }
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--gold);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 22px; height: 1.5px; background: var(--cream); transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 100px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: -4% 0 0 0;
  overflow: hidden;
}
.hero-bg-inner {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  animation: heroZoom 20s ease-out forwards;
}
@keyframes heroZoom {
  to { transform: scale(1); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, oklch(8% 0.032 262 / 0.97) 0%, oklch(8% 0.032 262 / 0.88) 38%, oklch(8% 0.032 262 / 0.55) 65%, oklch(8% 0.032 262 / 0.75) 100%),
    linear-gradient(to top, oklch(8% 0.032 262) 0%, oklch(8% 0.032 262 / 0.2) 30%);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 20px;
  flex: 1;
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(38px, 5vw, var(--h1));
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 26px;
}
.hero-title .line { display: block; }
.hero-title .accent { color: var(--gold); font-style: italic; }

.hero-text {
  color: var(--cream-soft);
  font-size: var(--text-base);
  line-height: 1.75;
  max-width: 46ch;
  margin-bottom: 34px;
}

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

.scroll-indicator {
  position: relative;
  z-index: 2;
  align-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cream-soft);
  margin: 24px auto 0;
}
.scroll-arrow { display: inline-block; animation: bounce 1.8s ease-in-out infinite; }
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---------- BAS diagram (shared, hero + secondary) ---------- */
.hero-diagram { display: flex; align-items: center; justify-content: center; position: relative; z-index: 2; }

.diagram-frame {
  position: relative;
  padding: 34px;
}
.diagram-frame::before,
.diagram-frame::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--gold-deep);
  opacity: 0.7;
}
.diagram-frame::before { top: 0; left: 0; border-right: none; border-bottom: none; }
.diagram-frame::after { bottom: 0; right: 0; border-left: none; border-top: none; }
.diagram-caption {
  position: absolute;
  bottom: 4px;
  left: 34px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.bas-svg { width: 100%; max-width: 440px; height: auto; }

.bas-lines line {
  stroke: var(--gold-deep);
  stroke-opacity: 0.32;
  stroke-width: 1;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: drawLine 1.4s var(--ease) forwards;
}
.bas-lines line:nth-child(1) { animation-delay: 0.15s; }
.bas-lines line:nth-child(2) { animation-delay: 0.25s; }
.bas-lines line:nth-child(3) { animation-delay: 0.35s; }
.bas-lines line:nth-child(4) { animation-delay: 0.45s; }
.bas-lines line:nth-child(5) { animation-delay: 0.55s; }
.bas-lines line:nth-child(6) { animation-delay: 0.65s; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }

.node {
  fill: var(--navy-800);
  stroke: oklch(94% 0 0 / 0.16);
  stroke-width: 1;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: nodeIn 0.6s var(--ease) forwards;
}
.node-sm:nth-of-type(1) { animation-delay: 0.5s; }
.bas-nodes .node-sm:nth-child(3) { animation-delay: 0.6s; }
.bas-nodes .node-sm:nth-child(5) { animation-delay: 0.7s; }
.node-center { fill: var(--gold); stroke: none; animation-delay: 0.15s !important; }
.bas-nodes .node-sm:nth-child(9) { animation-delay: 0.8s; }
.bas-nodes .node-sm:nth-child(11) { animation-delay: 0.9s; }
.bas-nodes .node-sm:nth-child(13) { animation-delay: 1s; }
@keyframes nodeIn {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

.node-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  fill: var(--cream-soft);
  text-anchor: middle;
  dominant-baseline: middle;
  opacity: 0;
  animation: fadeIn 0.6s var(--ease) forwards;
  animation-delay: 1.1s;
}
.node-label-lg { fill: var(--navy-950); font-size: 15px; font-weight: 700; font-family: var(--font-serif); }
.node-label-sub { fill: var(--navy-950); font-size: 8px; letter-spacing: 0.14em; opacity: 0.75; }
.node-center ~ .node-label-lg,
.node-center ~ .node-label-sub { animation-delay: 0.5s; }
@keyframes fadeIn { to { opacity: 1; } }

.live-dot {
  fill: var(--patina);
  opacity: 0;
  animation: fadeIn 0.6s var(--ease) forwards, pulseLive 2.4s ease-in-out infinite;
  animation-delay: 1.3s, 1.3s;
  transform-box: fill-box;
  transform-origin: center;
}
.live-ring {
  fill: none;
  stroke: var(--patina);
  stroke-width: 1;
  opacity: 0;
  animation: fadeIn 0.6s var(--ease) forwards, ringLive 2.4s ease-out infinite;
  animation-delay: 1.3s, 1.3s;
  transform-box: fill-box;
  transform-origin: center;
}
@keyframes pulseLive {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@keyframes ringLive {
  0% { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}

.bas-diagram-secondary .bas-svg { max-width: 400px; }

/* ---------- Why section ---------- */
.why-section { padding-top: 90px; }

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--hairline-strong);
  box-shadow: var(--shadow-panel);
  margin-top: 56px;
}
.why-card {
  padding: 40px 34px;
  border-left: 1px solid var(--hairline-strong);
}
.why-card:first-child { border-left: none; }
.why-card h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--text-title);
  color: var(--gold);
  margin-bottom: 16px;
  line-height: 1.3;
  letter-spacing: 0;
}
.why-card p { color: var(--cream-soft); font-size: var(--text-sm); line-height: 1.65; }

/* ---------- BAS nervous system section ---------- */
.bas-section { background: var(--navy-800); }
.bas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

/* ---------- Services ---------- */
.section-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 56px;
  gap: 20px;
  flex-wrap: wrap;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.service-card {
  display: block;
  color: inherit;
  text-decoration: none;
  padding: 36px 30px;
  border-top: 1px solid var(--hairline);
  border-left: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.service-card:not(.service-card-highlight):hover {
  background: oklch(72% 0.1 190 / 0.05);
  border-left-color: var(--patina);
}
.service-card:nth-child(-n+3) { border-top: none; }
.service-num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--gold-deep);
  display: block;
  margin-bottom: 18px;
}
.service-card h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--text-title);
  line-height: 1.3;
  letter-spacing: 0;
  margin-bottom: 12px;
}
.service-card p { color: var(--muted); font-size: var(--text-sm); line-height: 1.6; max-width: 34ch; }
.service-card-highlight {
  border-left: 1px solid var(--gold);
  background: oklch(88% 0.085 86 / 0.05);
}
.service-card-highlight .service-num { color: var(--gold); }
.service-card-highlight h3 { color: var(--gold); }

/* ---------- Sectors gallery ---------- */
.sectors-section { background: var(--navy-900); }
.sectors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-top: 56px;
}
/* the head row already carries the gap below it */
.section-head-row + .sectors-grid { margin-top: 0; }
.sector-card {
  display: block;
  color: inherit;
  text-decoration: none;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.sector-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), filter 0.6s var(--ease);
  filter: grayscale(35%) brightness(0.75);
}
.sector-card:hover img { transform: scale(1.06); filter: grayscale(0%) brightness(0.85); }
.sector-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, oklch(8% 0.032 262 / 0.85) 0%, oklch(8% 0.032 262 / 0) 55%);
}
.sector-card::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--patina);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
  z-index: 3;
}
.sector-card:hover::before { transform: scaleX(1); }
.sector-label {
  position: absolute;
  left: 22px; bottom: 18px;
  z-index: 2;
  font-family: var(--font-serif);
  font-size: 19px;
  color: var(--cream);
}

/* ---------- Banner (blank placeholder band) ---------- */
.banner-section { line-height: 0; }
.banner-img { width: 100%; height: clamp(220px, 30vw, 500px); object-fit: cover; }

/* ---------- CTA ---------- */
.cta-section { background: var(--navy-900); }
.cta-inner { text-align: center; max-width: 720px; }
.cta-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(32px, 4.2vw, var(--h2));
  line-height: 1.16;
  margin-bottom: 26px;
}
.cta-text { color: var(--cream-soft); font-size: var(--text-base); line-height: 1.75; margin-bottom: 40px; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  background: var(--navy-950);
  padding-top: 80px;
}
.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--gold) 20%, var(--patina) 55%, transparent 100%);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
}
.footer-logo { height: 27px; width: auto; display: block; margin-bottom: 16px; }
.footer-tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.footer-desc { color: var(--muted); font-size: var(--text-sm); line-height: 1.65; max-width: 32ch; }

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.footer-col a { display: block; color: var(--cream-soft); font-size: var(--text-sm); margin-bottom: 12px; transition: color 0.25s var(--ease); }
.footer-col a:hover { color: var(--gold); }
.footer-social a { display: inline; margin-bottom: 0; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 10px;
}

/* ===================================================================
   INTERIOR PAGES — shared page-level patterns
   =================================================================== */

/* ---------- Page hero (interior pages, no background image) ---------- */
.page-hero {
  background: var(--navy-900);
  padding: 200px 0 130px;
}
.page-hero-title { max-width: 22ch; margin-bottom: 34px; }

.lead {
  color: var(--cream-soft);
  font-size: var(--text-lead);
  line-height: 1.75;
  max-width: 60ch;
}

/* ---------- Misión / Visión ---------- */
.mv-section { background: var(--navy-900); border-top: 1px solid var(--hairline); }
.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}
.mv-item { border-left: 1px solid var(--gold-deep); padding-left: 36px; }
.mv-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
}
.mv-statement {
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.8vw, var(--h4));
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.mv-item p { color: var(--cream-soft); font-size: var(--text-base); line-height: 1.75; }

/* ---------- Principles ---------- */
.principles-section { background: var(--navy-800); }
.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 56px;
  margin-top: 56px;
}
.principle {
  padding: 38px 0 46px;
  border-top: 1px solid var(--hairline);
}
.principle h3 {
  font-family: var(--font-serif);
  font-size: var(--text-title);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--gold);
  margin-bottom: 16px;
}
.principle p { color: var(--cream-soft); font-size: var(--text-sm); line-height: 1.65; }

/* ---------- Team ---------- */
.team-section { background: var(--navy-900); }
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 56px;
}
.team-member {
  border-left: 1px solid var(--hairline);
  padding: 8px 30px 8px 34px;
}
.team-member:first-child { border-left: none; padding-left: 0; }
.team-avatar {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  background: var(--navy-700);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  font-family: var(--font-serif);
  font-size: var(--text-title);
  color: var(--gold-deep);
  margin-bottom: 26px;
}
.team-name {
  font-family: var(--font-serif);
  font-size: var(--text-title);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  margin-bottom: 8px;
}
.team-role { color: var(--muted); font-size: var(--text-sm); margin-bottom: 20px; }
.team-exp {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

/* ---------- Closing statement + credentials list ---------- */
.closing-section { background: var(--navy-950); }
.closing-grid {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 80px;
  align-items: center;
}
.closing-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.4vw, var(--h3));
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: 34px;
}
.closing-list { list-style: none; }
.closing-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: start;
  padding: 26px 0;
  border-bottom: 1px solid var(--hairline);
}
.closing-item:first-child { border-top: 1px solid var(--hairline); }
.closing-arrow { color: var(--gold); font-size: 15px; line-height: 1.6; }
.closing-item p { color: var(--muted); font-size: var(--text-base); line-height: 1.6; }
.closing-item strong {
  font-family: var(--font-serif);
  font-size: var(--text-lead);
  font-weight: 500;
  color: var(--cream);
}

/* ===================================================================
   SERVICIOS — hero with image + interactive service tabs
   =================================================================== */

/* ---------- Page hero with a background image ---------- */
.page-hero--image {
  position: relative;
  overflow: hidden;
  padding: 190px 0 110px;
  background: var(--navy-950);
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.page-hero--image .container { position: relative; z-index: 2; }
/* Kept deliberately light: the banners are already dark at source, so a heavy
   veil only muddied them. Measured contrast for the hero copy stays ~8:1,
   above the AAA threshold for large text. The home hero keeps its own,
   stronger overlay (.hero-overlay) because its copy sits over busier art. */
.page-hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, oklch(16% 0.02 260 / 0.58) 0%, oklch(16% 0.02 260 / 0.34) 45%, oklch(16% 0.02 260 / 0.1) 100%),
    linear-gradient(to bottom, oklch(16% 0.02 260 / 0.12) 0%, oklch(16% 0.02 260 / 0) 40%, oklch(16% 0.02 260 / 0.55) 100%);
}

/* ---------- Services layout: list + detail panel ---------- */
.services-detail { background: var(--navy-900); }
.services-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 64px;
  align-items: start;
}

/* Left: the service list (a tablist) */
.service-list {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--hairline);
}
.service-item {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  padding: 20px 24px;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.service-item + .service-item { border-top: 1px solid var(--hairline); }
.service-item:hover {
  background: oklch(72% 0.1 190 / 0.05);
  border-left-color: var(--patina);
}
.service-item.is-active {
  background: var(--navy-800);
  border-left-color: var(--gold);
}
.service-item-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 9px;
  transition: color 0.3s var(--ease);
}
.service-item.is-active .service-item-num { color: var(--gold); }
.service-item-name {
  display: block;
  font-size: var(--text-base);
  line-height: 1.35;
  color: var(--cream-soft);
  transition: color 0.3s var(--ease);
}
.service-item.is-active .service-item-name { color: var(--cream); }

/* Right: the detail panels */
.service-panel { display: none; }
.service-panel.is-active { display: block; }

.panel-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 3.4vw, var(--h3));
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}
.panel-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-lead);
  line-height: 1.6;
  color: var(--cream-soft);
  max-width: 62ch;
  margin-bottom: 26px;
}
.panel-body {
  color: var(--cream-soft);
  font-size: var(--text-base);
  line-height: 1.75;
  max-width: 62ch;
}

.panel-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin: 44px 0;
}
.panel-meta h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.deliverables { list-style: none; }
.deliverables li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 12px;
  color: var(--cream-soft);
  font-size: var(--text-sm);
  line-height: 1.6;
}
.deliverables li::before {
  content: '';
  position: absolute;
  left: 0; top: 9px;
  width: 4px; height: 4px;
  background: var(--gold-deep);
}
.sector-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.sector-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--cream-soft);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 8px 12px;
}

/* Panel entrance animation */
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.service-panel.is-active { animation: panelIn 0.45s var(--ease) both; }
.service-panel.is-active .panel-meta { animation: panelIn 0.45s var(--ease) both; animation-delay: 0.08s; }
.service-panel.is-active .panel-cta { animation: panelIn 0.45s var(--ease) both; animation-delay: 0.14s; }

@media (prefers-reduced-motion: reduce) {
  .service-panel.is-active,
  .service-panel.is-active .panel-meta,
  .service-panel.is-active .panel-cta { animation: none; }
}

/* ---------- Split CTA band ---------- */
.cta-band { background: var(--navy-800); border-top: 1px solid var(--hairline); }
.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding: 70px 32px;
}
.cta-band-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.8vw, var(--h4));
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.cta-band-text { color: var(--cream-soft); font-size: var(--text-base); }

/* ===================================================================
   CONTACTO — enquiry form + office cards
   =================================================================== */

.contact-section { background: var(--navy-900); }
.contact-layout {
  display: grid;
  grid-template-columns: 1.85fr 1fr;
  gap: 56px;
  align-items: start;
}

/* ---------- Form ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px 32px;
}
.field { display: flex; flex-direction: column; }
.field--full { grid-column: 1 / -1; }

.field-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 10px;
}
.field-label .req { color: var(--gold); }

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  background: var(--navy-850);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  padding: 15px 16px;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.field-textarea { min-height: 168px; resize: vertical; }
.field-input::placeholder,
.field-textarea::placeholder { color: var(--faint); }

.field-input:hover,
.field-select:hover,
.field-textarea:hover { border-color: oklch(94% 0 0 / 0.18); }

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--gold-deep);
  background: var(--navy-800);
  box-shadow: 0 0 0 3px oklch(72% 0.1 190 / 0.22);
}

/* native select arrow, drawn to match the system */
.field-select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--cream-soft) 50%),
    linear-gradient(135deg, var(--cream-soft) 50%, transparent 50%);
  background-position: right 20px center, right 14px center;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 44px;
  cursor: pointer;
}
.field-select option { background: var(--navy-800); color: var(--cream); }

/* invalid state, only after a submit attempt */
.contact-form.was-validated .field-input:invalid,
.contact-form.was-validated .field-select:invalid,
.contact-form.was-validated .field-textarea:invalid {
  border-color: oklch(62% 0.16 32);
}
.field-error {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: oklch(70% 0.15 32);
  margin-top: 8px;
  display: none;
}
.contact-form.was-validated .field-input:invalid ~ .field-error,
.contact-form.was-validated .field-select:invalid ~ .field-error,
.contact-form.was-validated .field-textarea:invalid ~ .field-error { display: block; }

/* ---------- Segmented control (project size) ---------- */
.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  overflow: hidden;
}
.segmented-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 8px;
  border-left: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--cream-soft);
  background: var(--navy-850);
  cursor: pointer;
  text-align: center;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.segmented-option:first-child { border-left: none; }
.segmented-option input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-option:hover { background: var(--navy-800); }
.segmented-option:has(input:checked) {
  background: var(--navy-800);
  color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
}
.segmented-option:has(input:focus-visible) {
  box-shadow: inset 0 0 0 1px var(--gold), 0 0 0 3px oklch(72% 0.1 190 / 0.5);
}

.form-actions { margin-top: 36px; }
.form-status {
  margin-top: 20px;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--cream-soft);
}
.form-status:empty { margin-top: 0; }
.form-status.is-error { color: oklch(70% 0.15 32); }
.form-status.is-ok { color: var(--patina); }

/* ---------- Office / contact cards ---------- */
.contact-cards { display: flex; flex-direction: column; gap: 20px; }
.contact-card {
  border: 1px solid var(--hairline);
  border-radius: 2px;
  background: var(--navy-850);
  padding: 30px 28px;
}
.contact-card h2,
.contact-card h3 {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}
.contact-row + .contact-row { margin-top: 20px; }
.contact-row dt {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}
.contact-row dd {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--cream);
}
.contact-row dd a { color: var(--cream); transition: color 0.25s var(--ease); }
.contact-row dd a:hover { color: var(--gold); }

.social-list { list-style: none; }
.social-list li + li { margin-top: 14px; }
.social-list a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: baseline;
  font-size: var(--text-sm);
  color: var(--cream-soft);
  transition: color 0.25s var(--ease);
}
.social-list a:hover { color: var(--gold); }
.social-list .arrow { color: var(--gold-deep); }

/* ===================================================================
   SECTORES — index chips + alternating sector blocks
   =================================================================== */

/* Quick-jump index under the hero */
.sector-index { background: var(--navy-950); border-bottom: 1px solid var(--hairline); }
.sector-index-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 32px;
}
.sector-chip {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-soft);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 9px 14px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.sector-chip:hover {
  color: var(--gold);
  border-color: var(--gold-deep);
  background: oklch(88% 0.085 86 / 0.05);
}

/* Alternating sector blocks */
.sector-block { background: var(--navy-900); }
.sector-block:nth-of-type(even) { background: var(--navy-800); }

.sector-grid {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 60px;
  align-items: center;
}
.sector-block--reverse .sector-media { order: 2; }

.sector-media {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.sector-media img { width: 100%; height: 100%; object-fit: cover; }

.sector-content .section-title { margin-bottom: 20px; }
.sector-content .panel-meta { margin: 34px 0 0; }

/* Discipline tags become links through to the matching service panel */
a.sector-tag { transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease); }
a.sector-tag:hover {
  color: var(--gold);
  border-color: var(--gold-deep);
  background: oklch(88% 0.085 86 / 0.05);
}

/* ===================================================================
   WHATSAPP — floating action button (every page)
   =================================================================== */
.wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;                 /* under the mobile nav drawer (90) and its toggle (110) */
  display: flex;
  align-items: center;
  gap: 0;
  height: 56px;
  padding: 0 16px;
  border-radius: 28px;
  /* Verde WhatsApp llevado un paso más oscuro: el blanco sobre el verde
     original (#25D366) da 1.98:1 y no se lee. Este da 5.02:1 (AA). */
  background: #0e8043;
  color: #ffffff;
  box-shadow: 0 10px 28px oklch(2% 0.01 262 / 0.45);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.wa-float:hover {
  background: #0b6e39;         /* más oscuro al pasar: mantiene el contraste del blanco */
  transform: translateY(-2px);
  box-shadow: 0 16px 36px oklch(2% 0.01 262 / 0.5);
}
.wa-float:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--navy-900), 0 0 0 5px oklch(72% 0.1 190 / 0.9);
}
.wa-float svg { width: 26px; height: 26px; flex-shrink: 0; fill: currentColor; }

/* The label expands on hover on pointer devices; the icon alone on touch. */
.wa-float-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-width 0.35s var(--ease), opacity 0.25s var(--ease), margin-left 0.35s var(--ease);
}
@media (hover: hover) and (min-width: 721px) {
  .wa-float:hover .wa-float-label,
  .wa-float:focus-visible .wa-float-label {
    max-width: 160px;
    opacity: 1;
    margin-left: 10px;
  }
}

@media (max-width: 720px) {
  .wa-float { right: 16px; bottom: 16px; height: 52px; padding: 0 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .wa-float, .wa-float-label { transition: none; }
  .wa-float:hover { transform: none; }
}

/* ---------- reCAPTCHA slot (Netlify renders the widget here) ---------- */
.recaptcha-slot { margin-top: 30px; }
.recaptcha-slot:empty { display: none; }
/* the widget itself is an iframe from Google; keep it from overflowing on mobile */
.recaptcha-slot > div { max-width: 100%; overflow-x: auto; }

/* ---------- Confirmation page ---------- */
.thanks-section { background: var(--navy-900); }
.thanks-inner { max-width: 640px; text-align: center; }
.thanks-mark {
  width: 62px;
  height: 62px;
  margin: 0 auto 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-deep);
  border-radius: 2px;
  color: var(--gold);
}
.thanks-mark svg { width: 26px; height: 26px; }
.thanks-title {
  font-family: var(--font-serif);
  font-size: clamp(32px, 4.2vw, var(--h2));
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.thanks-text { color: var(--cream-soft); font-size: var(--text-lead); line-height: 1.75; margin-bottom: 38px; }
.thanks-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Honeypot: invisible to people, tempting to bots ----------
   Deliberately not display:none — many bots skip hidden inputs but fill
   off-screen ones. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Scroll reveal ---------- */
[data-reveal], [data-reveal-child] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
[data-reveal].in-view, [data-reveal-child].in-view {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-child] { transition-delay: var(--d, 0s); }

.no-js [data-reveal], .no-js [data-reveal-child] {
  opacity: 1;
  transform: none;
}

/* Without JS the tabs can't switch, so every service panel is shown stacked
   rather than leaving six of seven services unreachable. */
.no-js .services-layout { grid-template-columns: 1fr; }
.no-js .service-list { display: none; }
.no-js .service-panel,
.no-js .service-panel[hidden] { display: block; animation: none; }
.no-js .service-panel + .service-panel {
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid var(--hairline);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-diagram { display: none; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .why-card:nth-child(2n+1) { border-left: none; }
  .why-card:nth-child(-n+2) { border-bottom: 1px solid var(--hairline-strong); }
  .bas-grid { grid-template-columns: 1fr; }
  .bas-diagram-secondary { display: none; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-card:nth-child(-n+3) { border-top: 1px solid var(--hairline); }
  .service-card:nth-child(-n+2) { border-top: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  /* Interior pages */
  .page-hero { padding: 160px 0 90px; }
  .mv-grid { grid-template-columns: 1fr; gap: 48px; }
  .principles-grid { grid-template-columns: repeat(2, 1fr); column-gap: 40px; }
  .team-grid { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .team-member:nth-child(2n+1) { border-left: none; padding-left: 0; }
  .closing-grid { grid-template-columns: 1fr; gap: 48px; }
  .services-layout { grid-template-columns: 260px 1fr; gap: 36px; }
  .page-hero--image { padding: 150px 0 80px; }
  .contact-layout { grid-template-columns: 1fr; gap: 48px; }
  .sector-grid { grid-template-columns: 1fr; gap: 36px; }
  .sector-block--reverse .sector-media { order: 0; }
}

@media (max-width: 720px) {
  .main-nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(78vw, 300px);
    background: var(--navy-950);
    border-left: 1px solid var(--hairline);
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding: 100px 34px;
    transform: translateX(100%);
    transition: transform 0.4s var(--ease);
    z-index: 90;
  }
  .main-nav.open { transform: translateX(0); }
  .nav-toggle { display: flex; z-index: 110; }
  .nav-toggle.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .btn-outline-sm.header-cta-hide { display: none; }
  .section { padding: 80px 0; }
  .why-grid { grid-template-columns: 1fr; }
  .why-card { border-left: none !important; border-top: 1px solid var(--hairline-strong); }
  .why-card:first-child { border-top: none; }
  .why-card:nth-child(-n+2) { border-bottom: none; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card { border-top: 1px solid var(--hairline) !important; }
  .service-card:first-child { border-top: none !important; }
  .sectors-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  /* Interior pages */
  .page-hero { padding: 140px 0 70px; }
  .principles-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; row-gap: 40px; }
  .team-member { border-left: none; padding-left: 0; }
  .mv-item { padding-left: 26px; }
  .closing-item { gap: 18px; }

  /* Services: list stacks above the panel */
  .services-layout { grid-template-columns: 1fr; gap: 40px; }
  .panel-meta { grid-template-columns: 1fr; gap: 34px; }
  .page-hero--image { padding: 130px 0 64px; }
  .cta-band-inner { padding: 56px 0; flex-direction: column; align-items: flex-start; gap: 28px; }

  /* Contacto: single column, segmented control stacks 2x2 */
  .form-grid { grid-template-columns: 1fr; gap: 22px; }
  .segmented { grid-template-columns: 1fr 1fr; }
  .segmented-option:nth-child(odd) { border-left: none; }
  .segmented-option:nth-child(n+3) { border-top: 1px solid var(--hairline); }
}
