/* ==========================================================================
   AAVA Climate — Climate Performance Ventures
   Palette: deep charcoal + paper, teal = technical, amber = commercial.
   Dark cinematic bookends (hero, system, contact); editorial paper between.
   ========================================================================== */

:root {
  /* base */
  --ink: #14181d;
  --ink-soft: #3d444d;
  --paper: #f6f4ef;
  --paper-raised: #fdfcf9;
  --hairline: #d9d5cc;

  /* dark surfaces (from the plexus globe artwork) */
  --navy-deep: #061423;
  --navy: #0a1f33;
  --navy-raised: #10293f;
  --hairline-dark: rgba(214, 226, 238, 0.14);
  --text-on-dark: #e8eef4;
  --text-on-dark-soft: #a7b6c4;

  /* accents */
  --teal: #0f6b6d;          /* on paper */
  --teal-bright: #4fc8c4;   /* on dark */
  --amber: #9a5a24;         /* on paper (AA against --paper) */
  --amber-bright: #e0a458;  /* on dark */

  /* type */
  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  /* rhythm */
  --space-2xs: 8px;
  --space-xs: 16px;
  --space-sm: 24px;
  --space-md: 40px;
  --space-lg: 64px;
  --space-xl: 96px;
  --space-2xl: 144px;

  --container: 1200px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
}

p { margin: 0; }

a { color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 48px);
}

.section { padding: var(--space-2xl) 0; }

.section-dark {
  background: var(--navy-deep);
  color: var(--text-on-dark);
}

/* ---------- accessibility ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible {
  outline: 2px solid var(--teal-bright);
  outline-offset: 3px;
}

/* ---------- kicker / labels ---------- */

.kicker {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: var(--space-sm);
}

.kicker-light { color: var(--teal-bright); }

.kicker-rule {
  display: inline-block;
  width: 40px;
  height: 1px;
  background: currentColor;
  flex: none;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  min-height: 48px;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.22s var(--ease-out-expo),
              color 0.22s var(--ease-out-expo),
              border-color 0.22s var(--ease-out-expo),
              transform 0.22s var(--ease-out-expo);
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--teal-bright);
  color: var(--navy-deep);
}
.btn-primary:hover { background: #6ad9d5; }

.btn-ghost {
  border-color: var(--hairline-dark);
  color: var(--text-on-dark);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--teal-bright); color: var(--teal-bright); }

.btn-lg { padding: 18px 36px; font-size: 17px; }

.btn-nav {
  background: transparent;
  border-color: currentColor;
  padding: 9px 20px;
  min-height: 40px;
  font-size: 14px;
}
.btn-nav:hover { background: var(--teal-bright); border-color: var(--teal-bright); color: var(--navy-deep); }

/* ---------- nav ---------- */

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  color: var(--text-on-dark);
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.site-nav.is-scrolled {
  background: rgba(6, 20, 35, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--hairline-dark);
}

.site-nav.on-paper {
  color: var(--ink);
}
.site-nav.on-paper.is-scrolled {
  background: rgba(246, 244, 239, 0.88);
  box-shadow: 0 1px 0 var(--hairline);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px clamp(20px, 5vw, 48px);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* logo variant swaps with the nav theme */
.nav-logo {
  height: 36px;
  width: auto;
}
.nav-logo-light { display: none; }
.on-paper .nav-logo-dark { display: none; }
.on-paper .nav-logo-light { display: block; }

.site-nav nav { margin-left: auto; }

.nav-links {
  display: flex;
  gap: clamp(18px, 2.5vw, 34px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  opacity: 0.85;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.nav-links a:hover { opacity: 1; border-bottom-color: currentColor; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  padding: 10px;
  margin-left: auto;
  cursor: pointer;
}
.nav-toggle span {
  width: 26px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease-out-expo), opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  background: var(--navy-deep);
  border-top: 1px solid var(--hairline-dark);
  padding: var(--space-xs) clamp(20px, 5vw, 48px) var(--space-sm);
}
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu a {
  display: block;
  padding: 14px 0;
  color: var(--text-on-dark);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 18px;
  border-bottom: 1px solid var(--hairline-dark);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  background:
    radial-gradient(ellipse 90% 70% at 72% 42%, #12324e 0%, var(--navy) 45%, var(--navy-deep) 100%);
  color: var(--text-on-dark);
  overflow: hidden;
}

.hero-globe {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-globe canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.globe-fallback {
  position: absolute;
  right: -8%;
  top: 50%;
  transform: translateY(-50%);
  width: min(62vw, 900px);
  opacity: 0.9;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--container);
  margin: 0 auto;
  padding: 140px clamp(20px, 5vw, 48px) 120px;
  width: 100%;
}

.hero-title {
  font-size: clamp(32px, 4.2vw, 56px);
  font-weight: 600;
  max-width: 22ch;
  margin-bottom: var(--space-sm);
}

.hero-title em {
  font-style: normal;
  color: var(--amber-bright);
}

.hero-sub {
  max-width: 54ch;
  font-size: clamp(16px, 1.35vw, 19px);
  font-weight: 300;
  color: var(--text-on-dark-soft);
  margin-bottom: var(--space-md);
}

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

.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-on-dark-soft);
}

.hero-scroll-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.hero-scroll-line {
  width: 1px;
  height: 44px;
  background: currentColor;
  animation: scrollPulse 2.2s var(--ease-out-expo) infinite;
  transform-origin: top;
}

@keyframes scrollPulse {
  0% { transform: scaleY(0); opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(10px); opacity: 0; }
}

/* ---------- thesis strip ---------- */

.thesis {
  background: var(--navy);
  color: var(--text-on-dark);
  border-top: 1px solid var(--hairline-dark);
  padding: var(--space-lg) 0;
}

.thesis-line {
  font-family: var(--font-display);
  font-size: clamp(19px, 2vw, 25px);
  font-weight: 400;
  line-height: 1.5;
  max-width: 46ch;
}

.thesis-line strong { font-weight: 600; color: var(--teal-bright); }

.thesis-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
  margin: var(--space-lg) 0 0;
  border-top: 1px solid var(--hairline-dark);
  padding-top: var(--space-md);
}

.stat-num {
  font-family: var(--font-display);
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 600;
  color: var(--teal-bright);
  margin: 0 0 10px;
}

.stat-label {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-on-dark-soft);
}

/* ---------- section headings ---------- */

.section-title {
  font-size: clamp(30px, 3.6vw, 48px);
  font-weight: 600;
  max-width: 20ch;
}

.section-lede {
  max-width: 56ch;
  margin-top: var(--space-sm);
  font-size: 18px;
  font-weight: 300;
  color: var(--text-on-dark-soft);
}


/* ---------- shift ---------- */

.shift-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
  margin-top: var(--space-xl);
  border-top: 1px solid var(--hairline);
  padding-top: var(--space-md);
}

.shift-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--amber);
  letter-spacing: 0.15em;
}

.shift-item h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 14px 0 12px;
}

.shift-item p {
  color: var(--ink-soft);
  font-size: 16px;
}

/* ---------- system diagram ---------- */

.system { overflow: hidden; }

.diagram-wrap {
  max-width: 1240px;
  margin: var(--space-xl) auto 0;
  padding: 0 clamp(12px, 3vw, 40px);
}

#systemDiagram {
  width: 100%;
  height: auto;
  display: block;
}

#systemDiagram text {
  font-family: var(--font-mono);
}

.diagram-legend {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-top: var(--space-sm);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--text-on-dark-soft);
}

.legend-item { display: inline-flex; align-items: center; gap: 10px; }

.legend-swatch { width: 22px; height: 2px; display: inline-block; }
.swatch-teal { background: var(--teal-bright); }
.swatch-amber { background: var(--amber-bright); }

/* ---------- verticals ---------- */

.vertical-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 32px);
  margin-top: var(--space-xl);
}

.v-card {
  background: var(--paper-raised);
  border: 1px solid var(--hairline);
  padding: clamp(24px, 2.5vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s var(--ease-out-expo);
}

.v-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -20px rgba(20, 24, 29, 0.25);
}

.v-head { display: flex; align-items: center; gap: 14px; }

.v-icon {
  width: 30px;
  height: 30px;
  flex: none;
  color: var(--teal);
}

.v-card h3 { font-size: 21px; font-weight: 600; }

.v-body {
  font-size: 15.5px;
  color: var(--ink-soft);
  flex: 1;
}

.v-finance {
  font-size: 15px;
  font-weight: 500;
  color: var(--amber);
  border-top: 1px solid var(--hairline);
  padding-top: 16px;
  position: relative;
}

/* ---------- approach ---------- */

.approach { background: var(--paper); }

.approach-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.approach-text p {
  color: var(--ink-soft);
  margin-bottom: 1.4em;
  max-width: 62ch;
}
.approach-text p:last-child { margin-bottom: 0; }

.approach-quote {
  border-left: 2px solid var(--teal);
  padding-left: clamp(20px, 2.5vw, 36px);
  position: sticky;
  top: 120px;
}

.approach-quote blockquote { margin: 0; }

.approach-quote p {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 20px;
}

.approach-quote .quote-em {
  font-size: clamp(16px, 1.4vw, 19px);
  font-weight: 400;
  color: var(--ink-soft);
  margin-bottom: 0;
}

.approach-quote em { color: var(--teal); font-style: normal; font-weight: 600; }

/* ---------- geography ---------- */

.geo { background: var(--navy); }

.geo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
  margin-top: var(--space-xl);
  border-top: 1px solid var(--hairline-dark);
  padding-top: var(--space-md);
}

.geo-item h3 {
  font-size: 21px;
  font-weight: 600;
  color: var(--teal-bright);
  margin-bottom: 12px;
}

.geo-item p { color: var(--text-on-dark-soft); font-size: 16px; }

/* ---------- founder ---------- */

.founder { background: var(--paper); }

.founder-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 185px;
  gap: clamp(48px, 8vw, 130px);
  align-items: center;
}

.founder-quote {
  margin: 0;
  position: relative;
}

.quote-mark {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(72px, 7vw, 104px);
  font-weight: 700;
  line-height: 0.55;
  color: var(--teal);
  opacity: 0.3;
  margin: 10px 0 16px -6px;
}

.founder-quote p {
  font-family: var(--font-display);
  font-size: clamp(23px, 2.4vw, 33px);
  font-weight: 500;
  line-height: 1.42;
  color: var(--ink);
}

.founder-bio {
  margin-top: var(--space-md);
  border-top: 1px solid var(--hairline);
  padding-top: var(--space-sm);
  max-width: 62ch;
  font-size: 16px;
  color: var(--ink-soft);
}

/* portrait: small, framed, supplementary to the quote */
.founder-portrait { max-width: 185px; }

.portrait-frame {
  position: relative;
  margin: 0 0 22px;
}

.portrait-frame::before {
  content: "";
  position: absolute;
  inset: 14px -14px -14px 14px;
  border: 1px solid var(--teal);
  opacity: 0.55;
}

.portrait-frame img {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
}

.founder-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
}

.founder-role {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 6px 0 16px;
}

.founder-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  color: var(--teal);
  text-decoration: none;
  border: 1px solid var(--hairline);
  padding: 10px 18px;
  min-height: 44px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.founder-link:hover { border-color: var(--teal); }
.founder-link svg { width: 18px; height: 18px; }

/* ---------- geo map ---------- */

.geo-map {
  margin-top: var(--space-xl);
}

.geo-map svg {
  width: 100%;
  height: auto;
  display: block;
}

.map-land {
  fill: var(--navy-raised);
  stroke: rgba(214, 226, 238, 0.22);
  stroke-width: 1;
}

.map-arc {
  stroke: var(--teal-bright);
  stroke-width: 1.4;
  stroke-dasharray: 4 7;
  opacity: 0.6;
}

.marker-dot { fill: var(--teal-bright); }

.marker-ring {
  fill: none;
  stroke: var(--teal-bright);
  stroke-width: 1;
  opacity: 0.5;
}

.marker-leader {
  stroke: rgba(214, 226, 238, 0.3);
  stroke-width: 1;
}

.map-label {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  fill: var(--text-on-dark);
}

.map-sublabel {
  font-family: var(--font-mono);
  font-size: 12.5px;
  fill: var(--text-on-dark-soft);
}

.map-caption {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.3em;
  fill: var(--teal-bright);
  opacity: 0.85;
}

/* ---------- contact ---------- */

.contact {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: var(--space-2xl) 0;
}

.contact-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 55% at 50% 115%, rgba(79, 200, 196, 0.16), transparent 70%);
  pointer-events: none;
}

.contact-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-title {
  font-size: clamp(28px, 3.4vw, 46px);
  font-weight: 600;
  max-width: 24ch;
}

.contact-sub {
  margin-top: var(--space-sm);
  color: var(--text-on-dark-soft);
  font-size: 18px;
  font-weight: 300;
  max-width: 44ch;
}

.contact-actions { margin-top: var(--space-md); }

/* ---------- footer ---------- */

.site-footer {
  background: #03101f;
  color: var(--text-on-dark-soft);
  border-top: 1px solid var(--hairline-dark);
  padding: 68px 0 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
  border-bottom: 1px solid var(--hairline-dark);
}

.footer-logo {
  height: 50px;
  width: auto;
  display: block;
  margin-bottom: 18px;
}

.footer-tagline {
  font-size: 14px;
  line-height: 1.6;
  max-width: 300px;
}

.footer-head {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-on-dark-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--text-on-dark); }

.footer-plain, .footer-soon { font-size: 14px; }

.soon-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-bright);
  margin-left: 4px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-on-dark-soft);
}

/* ---------- reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.reveal[data-reveal-delay="1"] { transition-delay: 0.1s; }
.reveal[data-reveal-delay="2"] { transition-delay: 0.2s; }
.reveal[data-reveal-delay="3"] { transition-delay: 0.3s; }

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* diagram line draw */
#systemDiagram .d-link {
  stroke-dasharray: var(--len, 400);
  stroke-dashoffset: var(--len, 400);
  transition: stroke-dashoffset 1.4s var(--ease-out-expo);
}
#systemDiagram.is-drawn .d-link { stroke-dashoffset: 0; }

#systemDiagram .d-node, #systemDiagram .d-label {
  opacity: 0;
  transition: opacity 0.6s ease;
}
#systemDiagram.is-drawn .d-node,
#systemDiagram.is-drawn .d-label { opacity: 1; }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  #systemDiagram .d-link,
  #systemDiagram .d-node,
  #systemDiagram .d-label {
    opacity: 1;
    transform: none;
    transition: none;
    stroke-dashoffset: 0;
  }
  .hero-scroll-line { animation: none; }
  .btn, .v-card { transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .shift-grid, .vertical-cards, .geo-grid {
    grid-template-columns: 1fr 1fr;
  }
  .approach-grid { grid-template-columns: 1fr; }
  .approach-quote { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .founder-grid { grid-template-columns: 1fr; }
  .founder-portrait { max-width: 170px; }
}

@media (max-width: 720px) {
  .section { padding: var(--space-xl) 0; }

  .site-nav nav, .btn-nav { display: none; }
  .nav-toggle { display: flex; }

  .shift-grid, .vertical-cards, .geo-grid {
    grid-template-columns: 1fr;
  }

  .hero-inner { padding-top: 120px; padding-bottom: 140px; }

  .globe-fallback {
    right: 50%;
    top: auto;
    bottom: -10%;
    transform: translateX(50%);
    width: 130vw;
    opacity: 0.45;
  }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  /* keep diagram labels legible: pan instead of shrink */
  .diagram-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #systemDiagram { min-width: 880px; }

  .thesis-stats { grid-template-columns: 1fr; }

  .geo-map {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .geo-map svg { min-width: 900px; }
}
