/*
 * Vital Structures — Personality Layer
 * Forest green · DM Sans + Space Grotesk · Biophilic
 * Imports: tokens.css → system.css → this file
 *
 * This file ONLY adds VS-specific overrides and components.
 * system.css handles: nav base, section anatomy, buttons, grids, cards, footer.
 */


/* ═══════════════════════════════════════════════════════════════
 *  1. TYPOGRAPHY
 * ═══════════════════════════════════════════════════════════════ */
h1, h2, h3, h4, .hero-kicker, .section-kicker, .spec-val {
  font-family: 'Space Grotesk', sans-serif;
}
body { font-family: 'DM Sans', sans-serif; }

/* Section subtitle — used across multiple sections */
.section-subtitle {
  font-size: 16px;
  color: var(--mid);
  line-height: 1.72;
  max-width: 600px;
  margin-bottom: var(--sp-6);
}


/* ═══════════════════════════════════════════════════════════════
 *  2. NAVIGATION — overrides system.css nav base
 * ═══════════════════════════════════════════════════════════════ */
nav {
  background: white;
}

.nav-inner {
  justify-content: flex-start; /* override system.css space-between */
}

.nav-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.nav-mark {
  width: 28px;
  height: 28px;
  font-size: 12px;
  border-radius: 6px;
  margin-right: 8px;
}

/* ── Desktop Nav Links ── */
.nav-links {
  margin-left: auto;
  gap: var(--sp-1);
}

/* Override system.css link styles for cleaner VS look */
.nav-links > li {
  position: relative;
}

.nav-links > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mid);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

/* Remove system.css underline pseudo-element on VS nav links */
.nav-links > li > a::after {
  display: none;
}

.nav-links > li > a:hover {
  color: var(--dark);
  background: var(--light);
}

.nav-links > li > a.active {
  color: var(--primary);
  font-weight: 600;
}


/* ── Dwellings Dropdown ── */
.nav-dd-arrow {
  font-size: 9px;
  opacity: 0.45;
  transition: transform 0.2s ease;
  display: inline-block;
  margin-left: 1px;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 520px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.04);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
  z-index: 200;
}

/* Hover bridge — invisible hitbox spanning gap between trigger and panel */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}

/* Show dropdown on hover of the PARENT LI */
.nav-links > li:hover > .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-links > li:hover > a .nav-dd-arrow {
  transform: rotate(180deg);
}

/* 2×2 card grid inside dropdown */
.nav-dropdown-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.nav-dropdown-item {
  display: block;
  padding: 16px 14px;
  text-decoration: none;
  color: var(--dark);
  border-radius: 10px;
  transition: background 0.12s ease;
}

/* Kill system.css underline on dropdown items */
.nav-dropdown-item::after {
  display: none !important;
}

.nav-dropdown-item:hover {
  background: var(--light);
}

.nav-dropdown-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 3px;
}

.nav-dropdown-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
  line-height: 1.2;
}

.nav-dropdown-desc {
  font-size: 12px;
  color: var(--mid);
  line-height: 1.4;
  margin-bottom: 5px;
}

.nav-dropdown-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}


/* ── CTA Button in Nav ── */
.nav-cta {
  margin-left: var(--sp-2);
  border-radius: 8px;
}


/* ── Mobile Nav Overrides ── */
.nav-mobile-dropdown {
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding-bottom: 4px;
  margin-bottom: 4px;
}

.nav-mobile-dropdown-toggle {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 12px 0;
  text-align: left;
  font-size: 15px;
  font-weight: 500;
  color: var(--dark);
  cursor: pointer;
}

.nav-mobile-dropdown-toggle::after {
  content: '\25BE';
  float: right;
  font-size: 12px;
  opacity: 0.4;
  transition: transform 0.2s;
}

.nav-mobile-dropdown-toggle.active::after {
  transform: rotate(180deg);
}

.nav-mobile-dropdown-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.nav-mobile-dropdown-items.active {
  max-height: 400px;
}

.nav-mobile-dropdown-items a {
  display: block;
  padding: 10px 0 10px 16px;
  font-size: 14px;
  color: var(--mid);
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.nav-mobile-dropdown-items a:last-child { border-bottom: none; }
.nav-mobile-dropdown-items a:hover { color: var(--primary); }

/* Hide mega-dropdown on mobile — mobile accordion replaces it */
@media (max-width: 768px) {
  .nav-dropdown { display: none !important; }
}

/* Footer nav reset */
footer nav {
  position: static;
  background: transparent;
  border: none;
  padding: 0;
  height: auto;
}
footer nav ul { gap: var(--sp-3); }
footer nav a { font-size: 13px; color: rgba(255,255,255,0.35); }
footer nav a:hover { color: rgba(255,255,255,0.65); }


/* ═══════════════════════════════════════════════════════════════
 *  3. HERO
 * ═══════════════════════════════════════════════════════════════ */
section.hero {
  background: var(--dark);
  position: relative;
  overflow: hidden;
  padding: var(--sp-16) var(--sp-4) var(--sp-12);
}
section.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(61,90,58,0.35) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-inner .hero-kicker {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tertiary);
  margin-bottom: var(--sp-3);
}

.hero-inner h1 {
  font-size: clamp(36px, 5.5vw, 62px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: white;
  margin-bottom: var(--sp-3);
}

.hero-inner h1 em {
  font-style: normal;
  color: var(--tertiary);
}

.hero-inner p {
  font-size: 18px;
  color: rgba(255,255,255,0.68);
  line-height: 1.72;
  margin-bottom: var(--sp-6);
  max-width: 640px;
}

.btn-group {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-8);
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--r-md);
  text-decoration: none;
  transition: opacity var(--t-fast);
  letter-spacing: 0.01em;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { opacity: 0.88; }
.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.2);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.4);
}

/* Hero stats bar */
.hero-stats {
  display: flex;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-stat {
  flex: 1;
  padding: var(--sp-3) var(--sp-3) 0 0;
}

.hero-stat:not(:last-child) {
  border-right: 1px solid rgba(255,255,255,0.08);
  padding-right: var(--sp-4);
  margin-right: var(--sp-4);
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.58);
  margin-bottom: 6px;
}

.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--tertiary);
  line-height: 1.3;
}


/* ═══════════════════════════════════════════════════════════════
 *  4. SPECS STRIP
 * ═══════════════════════════════════════════════════════════════ */
.specs-strip {
  background: var(--primary);
  padding: var(--sp-6) var(--sp-4);
}

.specs-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.12);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.spec-item {
  padding: var(--sp-4);
  background: var(--primary);
  text-align: center;
}

.spec-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: var(--tertiary);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.spec-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  line-height: 1.4;
}


/* ═══════════════════════════════════════════════════════════════
 *  5. THESIS
 * ═══════════════════════════════════════════════════════════════ */
.thesis { background: white; }

.thesis .section-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: var(--dark);
  max-width: 680px;
  margin-bottom: var(--sp-6);
  line-height: 1.2;
}

.thesis-content {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--sp-8);
  align-items: start;
}

.thesis-text p {
  font-size: 16px;
  color: var(--mid);
  line-height: 1.78;
  margin-bottom: var(--sp-3);
}

.thesis-quote {
  padding: var(--sp-5);
  background: var(--light-warm);
  border-radius: var(--r-lg);
  border-left: 3px solid var(--primary);
  font-size: 17px;
  font-weight: 400;
  color: var(--dark);
  line-height: 1.65;
  font-style: italic;
}

.thesis-quote .attr {
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-top: var(--sp-3);
}


/* ═══════════════════════════════════════════════════════════════
 *  6. ENGINEERING — 7 Principles Grid
 * ═══════════════════════════════════════════════════════════════ */
.eng-section {
  background: var(--light);
  border-top: 1px solid var(--border);
}

.eng-header {
  text-align: center;
  margin-bottom: var(--sp-6);
}

.eng-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.eng-card {
  background: white;
  position: relative;
}

.eng-card-inner {
  padding: var(--sp-5) var(--sp-4);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.eng-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
  opacity: 0.5;
  margin-bottom: var(--sp-2);
}

.eng-accent {
  width: 28px;
  height: 2px;
  background: var(--primary);
  margin-bottom: var(--sp-3);
  border-radius: 1px;
}

.eng-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.eng-card p {
  font-size: 13px;
  color: var(--mid);
  line-height: 1.6;
  flex-grow: 1;
}

/* Feature cards — top row, span 2 columns each */
.eng-card-feature {
  grid-column: span 2;
}

.eng-card-feature .eng-accent {
  width: 40px;
  height: 3px;
}

.eng-card-feature h3 { font-size: 18px; }
.eng-card-feature p { font-size: 14px; }

.eng-stat {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.eng-stat-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.eng-stat-label {
  font-size: 12px;
  color: var(--mid);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Credo card — dark brand accent */
.eng-card-credo {
  background: var(--dark);
}

.eng-card-credo h3 { color: var(--light); }
.eng-card-credo p { color: rgba(255,255,255,0.6); }

.eng-credo-mark {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--tertiary);
  margin-bottom: var(--sp-3);
}


/* ═══════════════════════════════════════════════════════════════
 *  7. APPLICATIONS / AUDIENCES
 * ═══════════════════════════════════════════════════════════════ */
.audiences {
  background: var(--dark);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}

.app-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-4);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.app-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.14);
}

.app-icon {
  width: 40px;
  height: 40px;
  margin-bottom: var(--sp-3);
  color: var(--tertiary);
}

.app-icon svg {
  width: 40px;
  height: 40px;
}

.app-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tertiary);
  margin-bottom: var(--sp-2);
}

.app-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--light);
  margin-bottom: 8px;
  line-height: 1.3;
}

.app-card p {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  line-height: 1.65;
  margin-bottom: var(--sp-3);
}

.app-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: var(--sp-3);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.app-stat {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
}

.app-stat span {
  display: inline-block;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  min-width: 100px;
}


/* ═══════════════════════════════════════════════════════════════
 *  8. PROCESS
 * ═══════════════════════════════════════════════════════════════ */
/* Uses system.css .process-grid + .process-step base.
 * VS overrides the step titles since HTML uses h3/p not .process-step-title */

#process .process-step h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: var(--sp-1);
  letter-spacing: -0.01em;
}

#process .process-step p {
  font-size: 13px;
  color: var(--mid);
  line-height: 1.65;
}


/* ═══════════════════════════════════════════════════════════════
 *  9. CTA
 * ═══════════════════════════════════════════════════════════════ */
section.cta {
  background: var(--primary);
  text-align: center;
  padding: var(--sp-12) var(--sp-4);
}

section.cta h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  color: white;
  margin-bottom: var(--sp-3);
  letter-spacing: -0.02em;
}

section.cta p {
  font-size: 16px;
  color: rgba(255,255,255,0.78);
  line-height: 1.75;
  max-width: 600px;
  margin: 0 auto var(--sp-5);
}


/* ═══════════════════════════════════════════════════════════════
 *  10. FOOTER
 * ═══════════════════════════════════════════════════════════════ */
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
}


/* ═══════════════════════════════════════════════════════════════
 *  11. RESPONSIVE
 * ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1040px) {
  .thesis-content { grid-template-columns: 1fr; }
  .eng-grid { grid-template-columns: repeat(2, 1fr); }
  .eng-card-feature { grid-column: span 1; }
}

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

@media (max-width: 640px) {
  .hero-stats { flex-wrap: wrap; }
  .hero-stat { flex: none; width: 50%; }
  .specs-inner { grid-template-columns: 1fr 1fr; }
  .eng-grid { grid-template-columns: 1fr; }
  .eng-card-feature { grid-column: span 1; }
  .hide-mobile { display: none; }
  section.hero { padding: var(--sp-8) var(--sp-3); }
}
