/* ─────────────────────────────────────────────────
   VAYAM CAPITAL — Brand-aligned Stylesheet
   Hepta Slab + Montserrat | Teal + Orange | Dark
───────────────────────────────────────────────── */

/* ── Local Fonts ── */
@font-face {
  font-family: 'Hepta Slab';
  src: url('fonts/HeptaSlab-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('fonts/Montserrat-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('fonts/Montserrat-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* ── Custom Properties ── */
:root {
  /* Brand colors — exact values from VAYAM CAPITAL Brand Guide */
  --teal:         #0095A3;   /* Primary — PANTONE P 122-14C, RGB 0 149 163 */
  --teal-light:   #AEDFE6;   /* Light teal — PANTONE P 121-3C */
  --teal-mid:     #74C2C5;   /* Mid teal for UI states */
  --teal-dark:    #00717C;   /* Darker teal for depth */
  --teal-dim:     rgba(0, 149, 163, 0.14);
  --teal-faint:   rgba(0, 149, 163, 0.06);
  --orange:       #F37443;   /* Accent — PANTONE P 37-7C, RGB 243 116 67 */
  --orange-light: #F58C62;
  --orange-dim:   rgba(243, 116, 67, 0.15);
  --slate:        #5F6E7D;   /* Secondary — PANTONE P 174-10C */

  /* Backgrounds — dark navy per brand dark color #081F2D */
  --dark:         #060E14;   /* Deepest background */
  --dark-1:       #081525;   /* Slightly lighter */
  --dark-2:       #0B1A2E;   /* Section variation */
  --dark-card:    #091626;   /* Card surfaces */
  --dark-mid:     #0E1E33;   /* Hover states */
  --bg-surface:   var(--dark);   /* semantic alias used in SVG fills */

  /* Text */
  --white:        #F2F6F6;
  --white-dim:    rgba(242, 246, 246, 0.6);
  --white-faint:  rgba(242, 246, 246, 0.12);
  --white-ghost:  rgba(242, 246, 246, 0.05);

  /* Borders */
  --border:       rgba(0, 149, 163, 0.14);
  --border-hover: rgba(0, 149, 163, 0.45);
  --border-white: rgba(242, 246, 246, 0.08);

  /* Typography */
  --font-serif:   'Hepta Slab', Georgia, serif;
  --font-sans:    'Montserrat', -apple-system, sans-serif;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  6rem;
  --space-xxl: 10rem;

  --max-w: 1200px;
  --nav-h: 72px;

  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
  scroll-snap-type: y proximity;
}

#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

body {
  position: relative;
  z-index: 1;
  background-color: var(--dark);
  color: var(--white);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

ul { list-style: none; }

button {
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

select, input, textarea {
  font-family: var(--font-sans);
}

/* ── Utility ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--space-sm);
}

.section-header {
  margin-bottom: var(--space-lg);
}

.section-header.center {
  text-align: center;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--white);
  margin-top: 0.5rem;
}

.title-muted {
  color: var(--white-dim);
  font-weight: 400;
}

.section-sub {
  margin-top: 1rem;
  color: var(--white-dim);
  font-size: 0.95rem;
  font-weight: 300;
}

/* ── Scroll-reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 110px;
  transition: height 0.4s var(--ease), background 0.4s var(--ease),
              border-color 0.4s var(--ease), transform 0.35s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  height: var(--nav-h);
  background: rgba(7, 14, 14, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

.nav.nav--hidden {
  transform: translateY(-100%);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo in nav */
.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: lighten;
  filter: brightness(0.95) saturate(1.1);
  transition: height 0.4s var(--ease);
}

.nav:not(.scrolled) .nav-logo-img {
  height: 44px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-links a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-dim);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--teal);
  transition: width 0.3s var(--ease);
}

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

.nav-links a:hover::after { width: 100%; }

.nav-links a.active {
  color: var(--white);
}
.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--white);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Mobile Menu ── */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(7, 14, 14, 0.98);
  backdrop-filter: blur(16px);
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  pointer-events: none;
}

.mobile-menu.open {
  opacity: 1;
  transform: none;
  pointer-events: all;
}

.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-menu a {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white-dim);
  transition: color 0.25s;
}

.mobile-menu a:hover { color: var(--white); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.85rem 2rem;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
              border-color 0.3s var(--ease), transform 0.2s var(--ease);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--dark);
}

.btn-primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(242, 246, 246, 0.3);
  color: var(--white);
}

.btn-ghost:hover {
  border-color: var(--white);
  background: var(--white-ghost);
}

.btn-outline {
  background: transparent;
  border-color: var(--teal);
  color: var(--teal);
}

.btn-outline:hover {
  background: var(--teal-dim);
  color: var(--teal-light);
  border-color: var(--teal-light);
}

.btn-full { width: 100%; }

/* ── Theme Toggle ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--teal);
  background: transparent;
  border: 1px solid var(--border);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease),
              color 0.25s var(--ease);
  flex-shrink: 0;
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--teal-dim);
  border-color: var(--teal);
}

/* Icon visibility: show sun in dark mode, moon in light mode */
.theme-icon--moon { display: none; }
.theme-icon--sun  { display: block; }

html[data-theme="light"] .theme-icon--moon { display: block; }
html[data-theme="light"] .theme-icon--sun  { display: none; }

/* Floating button (mobile only) */
.theme-toggle--float {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 200;
  width: 48px;
  height: 48px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  background: var(--dark-card);
  border-color: var(--border);
}

html[data-theme="light"] .theme-toggle--float {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
  /* Hide nav toggle on mobile */
  .nav-inner .theme-toggle:not(.theme-toggle--float) {
    display: none;
  }
  /* Show floating button on mobile */
  .theme-toggle--float {
    display: flex;
  }
}

/* ── Hero Section ── */
.hero {
  scroll-snap-align: start;
  position: relative;
  height: 100vh;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--dark);
}

/* Brand pattern overlay — very subtle */
.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: url('assets/pattern-teal.png');
  background-repeat: repeat;
  background-size: 160px auto;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
  z-index: 1;
}

/* Hero visual (dark theme only) — anchored right, fades into the background on its left edge */
.hero-visual {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 50%;
  max-width: 760px;
  object-fit: cover;
  object-position: center right;
  z-index: 1;
  pointer-events: none;
  opacity: 0.9;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 38%);
          mask-image: linear-gradient(to right, transparent 0%, #000 38%);
}

/* Light theme: leave the right side blank */
html[data-theme="light"] .hero-visual { display: none; }

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--nav-h) var(--space-md) 0;
  width: 100%;
}

.hero-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: 2rem;
  max-width: 820px;
}

.hero-headline em {
  font-style: italic;
  font-weight: 500;
  color: var(--teal-mid);
}

.hero-sub {
  font-size: 1rem;
  font-weight: 300;
  color: var(--white-dim);
  line-height: 1.85;
  margin-bottom: 2.5rem;
  max-width: 500px;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  z-index: 2;
}

.hero-scroll span {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white-dim);
  font-weight: 500;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--teal), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.15); }
}

/* ── Belief Section ── */
.belief {
  scroll-snap-align: start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xxl) 0;
  background: var(--dark);
  border-top: 1px solid var(--border);
}

.belief-inner {
  display: grid;
  grid-template-columns: min-content 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.belief-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding-top: 0.25rem;
}

.vertical-line {
  width: 1px;
  height: 48px;
  background: var(--teal);
  opacity: 0.5;
}

.belief-headline {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 2rem;
}

.belief-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: var(--white-dim);
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 3rem;
  max-width: 640px;
}

.timeline {
  display: flex;
  align-items: center;
  gap: 0;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  opacity: 0.75;
}

.timeline-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
}

.timeline-year {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--teal);
  text-transform: uppercase;
}

.timeline-desc {
  font-size: 0.72rem;
  color: var(--white-dim);
  white-space: nowrap;
  font-weight: 300;
}

.timeline-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--teal), rgba(0,149,163,0.12));
  margin-bottom: 3rem;
  min-width: 60px;
}

/* ── Who We Back Section ── */
.who {
  scroll-snap-align: start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xxl) 0;
  background: var(--dark-2);
  border-top: 1px solid var(--border);
}

.who-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.who-card {
  padding: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--dark-card);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.who-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.who-stage {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1.25rem;
}

.who-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.who-text {
  font-size: 0.875rem;
  color: var(--white-dim);
  line-height: 1.8;
  font-weight: 300;
}

@media (max-width: 1024px) {
  .who-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .who-grid { grid-template-columns: 1fr; }
}

/* ── Industry Focus Section ── */
.sectors {
  scroll-snap-align: start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xxl) 0;
  background: var(--dark-1);
  border-top: 1px solid var(--border);
}

.sectors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.sector-card {
  padding: 2.5rem;
  border-top: 1px solid var(--border);
  position: relative;
  transition: border-color 0.3s var(--ease);
}

.sector-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: width 0.5s var(--ease);
}

.sector-card:hover::before { width: 100%; }
.sector-card:hover { border-color: transparent; }

.sector-number {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--teal);
  margin-bottom: 1.25rem;
}

.sector-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.25;
}

.sector-text {
  font-size: 0.875rem;
  color: var(--white-dim);
  line-height: 1.85;
  font-weight: 300;
}

@media (max-width: 1024px) {
  .sectors-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .sectors-grid { grid-template-columns: 1fr; }
}

/* ── Gap Section ── */
.gap {
  scroll-snap-align: start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xxl) 0;
  background: var(--dark-1);
}

.gap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.gap-card {
  padding: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--dark-card);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}

.gap-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 24px 64px rgba(0,0,0,0.45);
}

.gap-icon {
  color: var(--teal);
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.gap-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.gap-text {
  font-size: 0.875rem;
  color: var(--white-dim);
  line-height: 1.8;
  font-weight: 300;
}

/* ── Approach Section ── */
.approach {
  scroll-snap-align: start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xxl) 0;
  background: var(--dark);
}

.approach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto auto auto auto;
  gap: 0 1.5rem;
}

.approach-pillar {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 5;
  padding: 2.5rem;
  border-top: 1px solid var(--border);
  position: relative;
  transition: border-color 0.3s var(--ease);
  align-items: start;
  align-content: start;
}

.approach-pillar::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: width 0.5s var(--ease);
}

.approach-pillar:hover::before { width: 100%; }
.approach-pillar:hover { border-color: transparent; }

.pillar-number {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--teal);
  margin-bottom: 1.5rem;
}

.pillar-icon {
  color: var(--white-dim);
  margin-bottom: 1.5rem;
  transition: color 0.3s;
}

.approach-pillar:hover .pillar-icon { color: var(--teal); }

.pillar-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1rem;
  line-height: 1.25;
}

.pillar-text {
  font-size: 0.875rem;
  color: var(--white-dim);
  line-height: 1.85;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.pillar-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pillar-features li {
  font-size: 0.78rem;
  color: rgba(242, 246, 246, 0.4);
  padding-left: 1rem;
  position: relative;
  font-weight: 300;
}

.pillar-features li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--teal);
  opacity: 0.6;
  font-size: 0.7rem;
}

/* ── Credibility Section ── */
.credibility {
  scroll-snap-align: start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) 0;
  background: var(--dark-1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-strip {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 4rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.stats-group {
  display: flex;
  align-items: center;
}

.stats-group--numbers {
  flex: 0 0 auto;
}

.stats-group--qual {
  flex: 1;
  flex-direction: column;
  gap: 0;
  justify-content: center;
  padding: 2rem 2.5rem;
  background: var(--dark-card);
}

.stats-separator {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2.5rem 3.5rem;
  text-align: center;
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
}

.stat-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white-dim);
}

.stat-divider {
  width: 1px;
  height: 64px;
  background: var(--border);
  flex-shrink: 0;
}

.stat-qual {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.stat-qual:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.stat-qual:first-child {
  padding-top: 0;
}

.stat-qual-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}

.stat-qual-value {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--white);
  line-height: 1.3;
}

/* ── Team Section ── */
.team {
  scroll-snap-align: start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xxl) 0;
  background: var(--dark);
  border-top: 1px solid var(--border);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; }
}

.team-card {
  position: relative;
  width: 100%;
  background: var(--dark-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.team-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.team-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--dark-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Sit above the fallback icon; fallback only shows if the image fails (onerror hides img) */
  position: relative;
  z-index: 1;
}

/* Horizontally flipped profile images */
.flip-x {
  transform: scaleX(-1);
}

.team-photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.team-info {
  padding: 1.25rem 1.5rem 1.5rem;
}

.team-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.35rem;
}

.team-role {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}

.team-hover {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,149,163,0.18), transparent);
  color: var(--teal-light);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 2rem 1.5rem 1rem;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.team-card:hover .team-hover { opacity: 1; }

/* ── Team Modal ── */
.team-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.team-modal.open { display: flex; }

.team-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 14, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.team-modal-inner {
  position: relative;
  z-index: 1;
  background: var(--dark-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  display: grid;
  grid-template-columns: 320px 1fr;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  animation: modalIn 0.3s var(--ease-out);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.team-modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--dark-mid);
  border: 1px solid var(--border);
  color: var(--white-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.team-modal-close:hover { color: var(--white); border-color: var(--teal); }

.team-modal-photo {
  background: var(--dark-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  overflow: hidden;
  position: relative;
}

.team-modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.team-modal-photo-fallback {
  color: var(--white);
}

.team-modal-body {
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  /* Allow the cell to shrink below its content and scroll within the
     90vh-capped modal instead of being clipped by the grid row */
  min-height: 0;
  max-height: 90vh;
}

.team-modal-role {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}

.team-modal-name {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 600;
  color: var(--white);
  line-height: 1.15;
}

.team-modal-bio {
  font-size: 0.9rem;
  color: var(--white-dim);
  line-height: 1.85;
  font-weight: 300;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.team-modal-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  transition: color 0.25s;
}

.team-modal-linkedin:hover { color: var(--teal-light); }

@media (max-width: 768px) {
  .team-modal-inner {
    grid-template-columns: 1fr;
    max-height: 88vh;
    overflow-y: auto;
  }
  .team-modal-photo { min-height: 280px; }
  .team-modal-body { padding: 2rem 1.5rem; }
}

/* ── Portfolio Section ── */
.portfolio {
  scroll-snap-align: start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xxl) 0;
  background: var(--dark);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.portfolio-card {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 180px;
  background: var(--dark-card);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease),
              transform 0.3s var(--ease);
}

.portfolio-card:hover {
  border-color: var(--border-hover);
  background: var(--dark-mid);
  transform: translateY(-2px);
}

.portfolio-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.portfolio-sector {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
}

.portfolio-stage {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 500;
  opacity: 0.85;
}

.portfolio-thesis {
  font-size: 0.9rem;
  color: var(--white-dim);
  line-height: 1.7;
  font-weight: 300;
  flex: 1;
}

.portfolio-card-bottom {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: auto;
}

.portfolio-status {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(242, 246, 246, 0.22);
  font-weight: 500;
}

.portfolio-note {
  font-size: 0.72rem;
  color: rgba(242, 246, 246, 0.22);
  text-align: center;
  font-style: italic;
}

/* ── Intent Section ── */
.intent {
  scroll-snap-align: start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xxl) 0;
  background: var(--dark-1);
  text-align: center;
  /* Subtle orange pattern hint */
  position: relative;
  overflow: hidden;
}

.intent::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('assets/pattern-teal.png');
  background-repeat: repeat;
  background-size: 120px auto;
  opacity: 0.025;
  pointer-events: none;
}

.intent-inner {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.intent-quote {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 500;
  line-height: 1.35;
  color: var(--white);
  margin: 1.5rem 0 2.5rem;
  font-style: italic;
}

.intent-body {
  font-size: 1.1rem;
  color: var(--white-dim);
  line-height: 1.9;
  max-width: 560px;
  margin: 0 auto;
  font-weight: 300;
}

/* ── Contact Section ── */
.contact {
  scroll-snap-align: start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xxl) 0;
  background: var(--dark);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 4rem;
  align-items: start;
}

.contact-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-card {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--dark-card);
  transition: border-color 0.3s var(--ease);
}

.contact-card:hover { border-color: var(--border-hover); }

.contact-card-icon {
  color: var(--teal);
  margin-bottom: 1rem;
}

.contact-icon-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.contact-card-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.contact-card-text {
  font-size: 0.85rem;
  color: var(--white-dim);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

/* ── Form ── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-dim);
}

.form-group input,
.form-group textarea,
.form-group select {
  background: var(--dark-card);
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--white);
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  font-weight: 300;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(242, 246, 246, 0.2);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-dim);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230095A3' stroke-width='1.2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-group select option {
  background: var(--dark-mid);
  color: var(--white);
}

/* File Input */
.file-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--teal) !important;
  cursor: pointer;
  font-size: 0.68rem !important;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600 !important;
  transition: color 0.25s;
}

.file-label:hover { color: var(--teal-light) !important; }

.file-optional {
  font-size: 0.65rem;
  color: var(--white-faint);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 300 !important;
}

.file-input { display: none; }

.file-name {
  font-size: 0.78rem;
  color: rgba(242, 246, 246, 0.38);
  margin-top: 0.25rem;
}

.form-note {
  font-size: 0.72rem;
  color: rgba(242, 246, 246, 0.28);
  text-align: center;
  margin-top: 0.25rem;
}

/* ── Footer ── */
.footer {
  scroll-snap-align: start;
  background: var(--dark-1);
  border-top: 1px solid var(--border);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4rem;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.footer-logo-img {
  height: 40px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
  mix-blend-mode: lighten;
  filter: brightness(0.95) saturate(1.1);
}

.footer-tagline {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.footer-sub {
  font-size: 0.85rem;
  color: var(--white-dim);
  max-width: 280px;
  line-height: 1.75;
  font-weight: 300;
}

.footer-links {
  display: flex;
  gap: 4rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-col-title {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white-dim);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-col a {
  font-size: 0.85rem;
  color: rgba(242, 246, 246, 0.42);
  transition: color 0.25s;
  font-weight: 300;
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-legal {
  font-size: 0.7rem;
  color: rgba(242, 246, 246, 0.18);
  line-height: 1.7;
  max-width: 700px;
  font-weight: 300;
}

.footer-reg {
  font-size: 0.7rem;
  color: rgba(242, 246, 246, 0.18);
  flex-shrink: 0;
}

/* ── Desktop break ── */
.desktop-br { display: block; }

/* ─────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .belief-inner {
    gap: var(--space-md);
  }

  .gap-grid,
  .approach-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-strip {
    flex-direction: column;
  }

  .stats-separator {
    width: 100%;
    height: 1px;
  }

  .stats-group--numbers {
    width: 100%;
    justify-content: center;
  }

  .stats-group--qual {
    width: 100%;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  :root {
    --space-xxl: 6rem;
    --space-xl:  4rem;
  }

  /* Disable scroll-snap on mobile — it fights natural scrolling when
     section content is taller than the (URL-bar-resizing) viewport */
  html { scroll-snap-type: none; }

  .nav-links  { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu { display: block; }

  .hero-headline { font-size: clamp(2rem, 7vw, 2.8rem); }

  .hero-visual { display: none; }

  .desktop-br { display: none; }

  .belief-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .belief-label {
    flex-direction: row;
    align-items: center;
  }

  .vertical-line {
    width: 32px;
    height: 1px;
  }

  .gap-grid,
  .approach-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  /* Credibility ("The Team") — stack the numbers vertically so they don't overflow */
  .stats-strip { margin-top: 2.5rem; }

  .stats-group--numbers { flex-direction: column; }

  .stat-item {
    padding: 1.75rem 1rem;
    width: 100%;
  }

  .stat-number { font-size: 2.75rem; }

  .stat-divider {
    width: 56px;
    height: 1px;
  }

  .timeline { flex-wrap: wrap; gap: 1rem; }
  .timeline-line { display: none; }

  .form-row { grid-template-columns: 1fr; }

  .footer-inner {
    flex-direction: column;
    gap: 2.5rem;
  }

  .footer-links { gap: 2.5rem; }

  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
  }

  .intent-quote {
    font-size: clamp(1.3rem, 5.5vw, 1.8rem);
  }
}

@media (max-width: 480px) {
  :root { --space-xxl: 4rem; }

  .hero-cta { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; }

  .footer-links { flex-direction: column; }

  .gap-card,
  .approach-pillar,
  .contact-card {
    padding: 1.75rem;
  }
}

/* ─────────────────────────────────────────────────
   LIGHT THEME OVERRIDES
   Applied when <html data-theme="light">
───────────────────────────────────────────────── */
html[data-theme="light"] {
  --dark:         #F5F7F7;
  --dark-1:       #EBF0F0;
  --dark-2:       #E5ECEC;
  --dark-card:    #FFFFFF;
  --dark-mid:     #E0EAEB;
  --bg-surface:   #FFFFFF;

  --white:        #0D1F2D;
  --white-dim:    rgba(13, 31, 45, 0.75);
  --white-faint:  rgba(13, 31, 45, 0.08);
  --white-ghost:  rgba(13, 31, 45, 0.04);

  --border:       rgba(0, 149, 163, 0.2);
  --border-hover: rgba(0, 149, 163, 0.55);
  --border-white: rgba(13, 31, 45, 0.1);
}

/* Nav scrolled — light version */
html[data-theme="light"] .nav.scrolled {
  background: rgba(245, 247, 247, 0.95);
}

html[data-theme="light"] .nav:not(.scrolled) {
  background: transparent;
}

/* Mobile menu — light version */
html[data-theme="light"] .mobile-menu {
  background: rgba(245, 247, 247, 0.98);
}

/* Logo blend mode — multiply works on light backgrounds */
html[data-theme="light"] .nav-logo-img,
html[data-theme="light"] .footer-logo-img {
  mix-blend-mode: multiply;
  filter: none;
}

/* btn-primary text — keep readable on teal button */
html[data-theme="light"] .btn-primary {
  color: #F2F6F6;
}

html[data-theme="light"] .btn-primary:hover {
  color: #F2F6F6;
}

/* btn-ghost — adapt border/text to dark-on-light */
html[data-theme="light"] .btn-ghost {
  border-color: rgba(13, 31, 45, 0.3);
  color: var(--white);
}

html[data-theme="light"] .btn-ghost:hover {
  border-color: var(--white);
  background: rgba(13, 31, 45, 0.05);
}

/* Form inputs — light bg */
html[data-theme="light"] .form-group input,
html[data-theme="light"] .form-group textarea,
html[data-theme="light"] .form-group select {
  background: #F5F7F7;
  color: var(--white);
}

html[data-theme="light"] .form-group input::placeholder,
html[data-theme="light"] .form-group textarea::placeholder {
  color: rgba(13, 31, 45, 0.3);
}

html[data-theme="light"] .form-group select option {
  background: #EBF0F0;
  color: #0D1F2D;
}

/* Nav toggle bars */
html[data-theme="light"] .nav-toggle span {
  background: var(--white);
}

/* Hardcoded rgba overrides — light theme */
html[data-theme="light"] .pillar-features li {
  color: rgba(13, 31, 45, 0.5);
}

html[data-theme="light"] .portfolio-status,
html[data-theme="light"] .portfolio-note {
  color: rgba(13, 31, 45, 0.35);
}

html[data-theme="light"] .file-name {
  color: rgba(13, 31, 45, 0.45);
}

html[data-theme="light"] .form-note {
  color: rgba(13, 31, 45, 0.4);
}

html[data-theme="light"] .footer-col a {
  color: rgba(13, 31, 45, 0.5);
}

html[data-theme="light"] .footer-legal,
html[data-theme="light"] .footer-reg {
  color: rgba(13, 31, 45, 0.35);
}

/* Smooth theme transition on body — only after theme is applied */
html[data-theme] body {
  transition: background-color 0.3s ease, color 0.3s ease;
}
