/* Brand Variables (dark, teal-accented theme) */
:root {
  --bg:      #0c1c22;
  --bg-dark: #0f1a1a;
  --bg-soft: #f5f7f6;
  --surface: #0f2530;
  --text:    #e7f6f6;
  --muted:   #98bcbc;
  --teal:    #23d3c6;
  --accent:  #35e8d9;
    /* Layout */
  --container: 1100px;
  --header-h: 72px;

  /* New about css */
  /* --bg: #0b0f14; */
  --panel: #0f1624;
  --text-main: #e6edf3;
  --text-muted: #9fb3c8;
  --border-soft: rgba(255,255,255,0.08);


  --card-w: 280px;            /* pill width */
  --street-w: 6px;            /* street width (desktop) */
  --gap-from-street: 28px;    /* horizontal gap between columns */
  --gap-v: 28px;              /* vertical gap between cards */
  --street-grad: linear-gradient(to bottom, #14333a, #35e8d9 40%, #3b57ff 70%, #0b0d1a);

  --aa-bg: #0c1c22;
  --aa-surface: #0f2530;
  --aa-text: #e7f6f6;
  --aa-muted: #98bcbc;
  --aa-teal: #23d3c6;
  --aa-accent: #35e8d9;
}


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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  background: #000;
  color: #fff;
}

/* NAV */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 20;
  background: rgba(12, 28, 34, 0.96);
  backdrop-filter: blur(10px);
}

.nav-inner {
  max-width: 1200px;
  margin: auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  /* background: rgba(12, 28, 34, 0.9); */
}

.brand-sub   { font-size: 12px; color: var(--muted, #e6edf3); }

.index-site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(12, 28, 34, 0.9);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid #0b341f;
  z-index: 1000;
}

.index-nav {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: rgba(12, 28, 34, 0.96);
  backdrop-filter: saturate(1.2) blur(6px);
  border-bottom: 1px solid #11333d;

  /* Collapsed by default */
  display: grid;
  grid-template-columns: 1fr;
  padding: 12px;
  gap: 6px;

  /* Create its own scroll area */
  max-height: 0;
  overflow: hidden;     /* collapsed */
  opacity: 0;
  transform: translateY(-8px);
  transition: max-height 220ms ease, opacity 180ms ease, transform 200ms ease;
}

.logo {
  font-weight: 600;
}

.nav-links {
  display: flex;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.nav-links a:hover {
  opacity: 1;
}

/* HAMBURGER */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
}

/* MOBILE NAV */
.mobile-nav {
  display: none;
  flex-direction: column;
  background: rgba(0,0,0,0.95);
}

.mobile-nav a {
  padding: 1rem 1.5rem;
  color: #fff;
  text-decoration: none;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* HERO */
.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  height: 100%;
  padding-top: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-inline: 1.5rem;
}

.hero-heading {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.15;
  min-height: 1.3em;
}

#typewriter {
  white-space: nowrap;
  /* border-right: 2px solid #35e8d9; */
  padding-right: 0.15em;
  background-color: #161d2d;
}

.hero-subtext {
  margin-top: 1rem;
  font-size: 1.1rem;
  opacity: 0.9;
  background-color: #161d2d;
}

.hero h2 {
  font-size: 3.1rem;
  background-color: #161d2d;
}

@media (max-width: 600px) {
  .hero h2 {
    font-size: 1.1rem;
  }
  
}

.hero-button {
  margin-top: 2rem;
  padding: 0.75rem 1.8rem;
  border: 1px solid #35e8d9;
  color: #35e8d9;
  text-decoration: none;
  border-radius: 999px;
  transition: background 0.3s ease, color 0.3s ease;
}

.hero-button:hover {
  background: #35e8d9;
  color: #000;
}

/* CARDS */
/* FEATURE CARDS SECTION BACKGROUND */
.cards {
  position: relative;
  padding: 4rem 1.5rem;
  background-image: url("assets/root2ais2.jpg"); /* replace with your image */
  background-size: cover;
  background-position: center;
}

/* dark overlay for readability */
.cards::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 0;
}

/* keep cards above overlay */
.cards .card {
  position: relative;
  z-index: 1;
}


.cards {
  max-width: 1200px;
  margin: auto;
  padding: 4rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.card {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 2rem;
  min-height: 180px;

  text-decoration: none;
  color: #fff;

  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.02);

  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease;
}

.card:hover {
  background: rgb(8, 8, 205);
  border-color: rgb(86, 4, 124);
  transform: translateY(-4px);
}

.card-text h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.card-text p {
  font-size: 0.95rem;
  opacity: 0.85;
  max-width: 220px;
}

.card-arrow {
  font-size: 1.4rem;
  color: #35e8d9;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.card:hover .card-arrow {
  transform: translateX(6px);
}



/* RESPONSIVE */
@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .mobile-nav.active {
    display: flex;
  }

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

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

  .hero-heading {
    min-height: 2.6em;
  }
  
}

/* Brand: title + subline block */
.index-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text, #e6edf3);
}
.index-brand-logo { display:block; height: 36px; width: auto; }

/* Wrap title + subline so we can stack on mobile */
.index-brand-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.15;
}
.index-brand-title { font-weight: 700; font-size: 18px; color: var(--text, #e6edf3); }
.index-brand-sub   { font-size: 12px; color: #e6edf3; }



/* OUR BELIEF SECTION */
/* BELIEF SECTION */
/* BELIEF SECTION */
.belief-section {
  position: relative;
  padding: 5rem 1.5rem;
  background-size: cover;
  background-position: center;
  color: #fff;
}

.belief-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
}

.belief-content {
  position: relative;
  max-width: 1100px;
  margin: auto;
  text-align: center;
}

.belief-content h2 {
  color: white;
  margin-bottom: 1rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
}

.belief-intro {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  opacity: 0.9;
}

/* GRID */
.belief-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.8rem;
}

/* CARD */
.belief-card {
  position: relative;
  height: 260px;
  background: rgba(15,15,15,0.9);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
}

.belief-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  color: var(--accent, #35e8d9);
}

.belief-card .icon svg {
  width: 36px;
  height: 36px;
}


/* ROADMAP GRID */
.roadmap-grid {
  max-width: 900px;
  margin: 0 auto;
}

/* PERFORMANCE SAFETY — ROADMAP SECTION */
.roadmap-section .belief-card {
  transform: none !important;
  will-change: auto;
}

.roadmap-section .card-front,
.roadmap-section .card-back {
  transform: none !important;
}

/* Prevent Chrome GPU over-compositing on scroll */
@media (hover: hover) {
  .roadmap-section {
    contain: paint;
  }
}

/* CTA STRIP */
.index-cta-strip {
  background: rgba(12,28,34,0.75);
  padding: 3.5rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.index-cta-container {
  max-width: 1100px;
  margin: auto;
}

.index-cta-grid-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: center;
}

.index-cta-strip h3 {
  color: #35e8d9;
  margin-bottom: 0.5rem;
}

.index-btn-power {
  display: inline-block;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  background: #2206af;
  border: 1px solid none;
  color: white;
  text-decoration: none;
  font-weight: 500;
  /* transition: background 0.25s ease; */
}

.index-btn-power:hover {
  background: rgba(14, 2, 119, 0.25);
}

/* MOBILE CTA */
@media (max-width: 768px) {
  .index-cta-grid-2 {
    grid-template-columns: 1fr;
    text-align: center;
  }
}


/* FRONT / BACK */
.cards-section {
  padding: 4rem 2rem;
}

/* .cards-title {
  margin-bottom: 2rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.02em;
} */

.card-front,
.card-back {
  position: absolute;
  inset: 0;
  padding: 1.8rem;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.card-front {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.card-front .icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}

.card-front p {
  opacity: 0.85;
}

.cards-title {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 2.5rem;

  /* Match global section headers */
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.02em;

  /* Inherit exact color from section theme */
  color: white;
}

/* =========================================================
   CARDS SECTION HEADER — FINAL, QA-LOCKED FIX
   ========================================================= */

.cards > .cards-title {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 2.5rem;

  /* Match other section headers EXACTLY */
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.02em;

  /* FORCE correct color above cards/link styles */
  color: var(--section-heading-color, #ffffff);

  /* Ensure overlay doesn't affect text */
  position: relative;
  z-index: 2;
}

/* BACK */
.card-back {
  opacity: 0;
  transform: translateY(12px);
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.55;
}

.cards-header {
  width: 100%;
  margin-bottom: 2rem;
}

.cards-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}


.belief-card:hover .card-front {
  opacity: 0;
  transform: translateY(-10px);
}

.belief-card:hover .card-back {
  opacity: 1;
  transform: translateY(0);
}

/* MOBILE TAP-TO-EXPAND */
@media (hover: none) and (pointer: coarse) {

  .belief-card {
    height: auto;
  }

  .card-front {
    opacity: 1;
    transform: none;
  }

  .card-back {
    position: relative;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: none;
    transition: opacity 0.3s ease, max-height 0.3s ease;
  }

  /* Tap to expand */
  .belief-card:focus-within .card-back {
    opacity: 1;
    max-height: 500px; /* safely large */
  }

  .belief-card:focus-within .card-front {
    opacity: 0.15;
  }
}


/* Allow hover content to scroll if it exceeds card height */
.card-back {
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Optional: subtle scrollbar styling (desktop only) */
.card-back::-webkit-scrollbar {
  width: 4px;
}

.card-back::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.25);
  border-radius: 4px;
}


/* 4TH GRADE VISUAL */
.reading-visual {
  margin-top: 1rem;
  display: grid;
  gap: 0.6rem;
}

.path {
  padding: 0.6rem;
  border-radius: 8px;
  font-size: 0.8rem;
}

.path span {
  font-weight: 600;
  display: block;
}

.path.negative {
  background: rgba(255,80,80,0.15);
  border-left: 4px solid #ff6b6b;
}

.path.positive {
  background: rgba(53,232,217,0.15);
  border-left: 4px solid #35e8d9;
}

/* CLOSE */
.belief-close {
  margin-top: 2.5rem;
  font-weight: 500;
  opacity: 0.95;
}

.program-section .belief-card ul {
  margin-top: 0.8rem;
  padding-left: 1rem;
  font-size: 0.9rem;
}

.program-section .belief-card ul li {
  margin-bottom: 0.4rem;
}

/* PILOT STATUS BADGE */
.pilot-badge {
  display: inline-block;
  margin: 0.75rem auto 1.5rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  color: #35e8d9;
  border: 1px solid rgba(53,232,217,0.45);
  background: rgba(53,232,217,0.08);
}

/* QUIET CTA */
.quiet-cta {
  margin-top: 2.5rem;
  text-align: center;
  opacity: 0.95;
}

.quiet-cta p {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.quiet-link {
  font-size: 0.9rem;
  color: #1103a6;
  text-decoration: none;
  border-bottom: 1px solid rgba(53,232,217,0.4);
  padding-bottom: 2px;
  transition: border-color 0.25s ease;
}

.quiet-link:hover {
  border-color: #35e8d9;
}

/* CURRENT PHASE BADGE */
.phase-badge {
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  color: #35e8d9;
  border: 1px solid rgba(53,232,217,0.45);
  background: rgba(53,232,217,0.1);
}

/* FUND PUNCHLINE */
.fund-punchline {
  margin: 1.5rem auto 3rem;
  font-size: 0.95rem;
  opacity: 0.95;
  font-weight: 1000;
}

.fund-amount {
  font-weight: 1000;
  color: white;
}

.fund-arrow {
  margin: 0 0.4rem;
  opacity: 0.7;
}

.fund-outcomes {
  opacity: 0.9;
}

/* FUND SECTION TWEAKS */
.fund-section .belief-grid {
  max-width: 1000px;
}

/* Footer */
.site-footer { margin-top: 1px; border-top: 1px solid #12343e; background: rgba(12,28,34,0.75); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 18px 0; }
.footer-links a { color: var(--muted); margin-right: 12px; text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.copyright { font-size: 12px; color: var(--muted); padding-bottom: 18px; }
.index-footer-container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* =========================================================
   PERFORMANCE HARDENING — SAFE ANIMATION LAYER
   (Does NOT change visuals or behavior)
   ========================================================= */

/* 1. Prevent accidental GPU over-promotion */
.belief-card,
.card,
.card-front,
.card-back {
  will-change: auto;
}

/* 2. Ensure transforms stay lightweight */
.card,
.card-arrow {
  backface-visibility: hidden;
}

/* 3. Isolate heavy sections to prevent repaint bleed */
.belief-section,
.roadmap-section,
.fund-section,
.cards {
  contain: paint;
}

/* 4. Neutralize hover recalculation during scroll (desktop) */
@media (hover: hover) and (pointer: fine) {
  .belief-card:hover,
  .card:hover {
    transition-delay: 0s;
  }
}

/* 5. Safety net for mobile browsers */
@media (hover: none) and (pointer: coarse) {
  .card:hover,
  .belief-card:hover {
    transform: none;
  }
}

/* 6. Reduce scrollbar repaint cost inside cards */
.card-back {
  overscroll-behavior: contain;
}


/* =========================================================
   MOBILE NAV: FIXED DROPDOWN THAT STAYS IN PLACE
   ========================================================= */
@media (max-width: 900px) {
  .mobile-nav {
    position: fixed;
    top: var(--header-h, 72px); /* header height */
    left: 0;
    right: 0;
    z-index: 2000;

    max-height: calc(100vh - var(--header-h, 72px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    /* Keep your existing look */
    display: none; /* default closed */
  }

  .mobile-nav.active {
    display: flex; /* your existing open behavior */
  }
}

/* Lock the page scroll when mobile menu is open */
body.nav-open {
  overflow: hidden;
  touch-action: none;
}



/* Prevent sticky :hover on touch devices affecting belief cards */
@media (hover: none) and (pointer: coarse) {
  .belief-card:hover .card-front {
    opacity: 1 !important;
    transform: none !important;
  }
  .belief-card:hover .card-back {
    opacity: 0 !important;
    transform: none !important;
  }
}

html.nav-open,
body.nav-open {
  height: 100%;
  overflow: hidden;
}

body.nav-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
}


/* =========================================================
   BELIEF CARDS — MOBILE FIX (single source of truth)
   Uses .is-open class toggled by JS
   Fixes:
   - front text missing (height collapse)
   - open/close toggle on same card
   - back scroll
   ========================================================= */

/* Desktop hover flip only on true hover devices */
@media (hover: hover) and (pointer: fine) {
  .belief-card:hover .card-front {
    opacity: 0;
    transform: translateY(-10px);
  }
  .belief-card:hover .card-back {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Touch devices: disable hover behavior and use .is-open */
@media (hover: none) and (pointer: coarse) {

  /* Prevent sticky hover from interfering */
  .belief-card:hover .card-front {
    opacity: 1 !important;
    transform: none !important;
  }
  .belief-card:hover .card-back {
    opacity: 0 !important;
    transform: none !important;
  }

  /* IMPORTANT: stable height so front content renders */
  .belief-card {
    min-height: 260px;
    height: 260px; /* keep consistent; change if you want taller */
    position: relative;
  }

  /* Ensure both faces are full-card layers */
  .belief-card .card-front,
  .belief-card .card-back {
    position: absolute;
    inset: 0;
  }

  /* Default state: FRONT visible */
  .belief-card .card-front {
    opacity: 1;
    transform: none;
    z-index: 2;
    pointer-events: auto;
  }

  /* Default state: BACK hidden */
  .belief-card .card-back {
    opacity: 0;
    transform: none;
    z-index: 1;

    /* allow scroll when visible */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;

    /* prevent interaction when hidden */
    pointer-events: none;
  }

  /* Open state */
  .belief-card.is-open .card-front {
    opacity: 0;
    pointer-events: none; /* front must NOT block scroll */
  }

  .belief-card.is-open .card-back {
    opacity: 1;
    z-index: 3;
    pointer-events: auto;
  }

  /* Light mobile transitions */
  .belief-card .card-front,
  .belief-card .card-back {
    transition: opacity 180ms ease;
  }
}


/* Kill focus-within flipping on mobile (prevents random edge flips) */
@media (hover: none) and (pointer: coarse) {
  .belief-card:focus-within .card-front {
    opacity: 1 !important;
  }
  .belief-card:focus-within .card-back {
    opacity: 0 !important;
    max-height: none !important;
  }

  /* But allow the intended JS state to win */
  .belief-card.is-open .card-front {
    opacity: 0 !important;
  }
  .belief-card.is-open .card-back {
    opacity: 1 !important;
  }
}


/*@media (hover: none) and (pointer: coarse) {*/
/*  .belief-card.is-open .card-front {*/
/*    pointer-events: none;*/
/*  }*/
/*  .belief-card.is-open .card-back {*/
/*    pointer-events: auto;*/
/*    overflow-y: auto;*/
/*    -webkit-overflow-scrolling: touch;*/
/*  }*/
/*}*/


@media (hover: none) and (pointer: coarse) {
  .belief-card.is-open .card-front { pointer-events: none; }
  .belief-card.is-open .card-back  {
    pointer-events: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}




