/* ───────────────────────────────────────────────
   Itankwale — Stylesheet
   Energy Intelligence Platform · Launching Q4 2027
─────────────────────────────────────────────── */

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

:root {
  --g: #4ade80;
  --g2: #22c55e;
  --g3: #16a34a;
  --gm: rgba(74, 222, 128, 0.12);
  --gm2: rgba(74, 222, 128, 0.06);
  --bg: #0a0a0a;
  --bg2: #141414;
  --bg3: #1a1a1a;
  --bdr: rgba(255, 255, 255, 0.07);
  --bdr2: rgba(255, 255, 255, 0.13);
  --tx: #f0f0f0;
  --tx2: #a0a0a0;
  --tx3: #555;
  --fh: 'Fraunces', Georgia, serif;
  --fb: 'DM Sans', system-ui, sans-serif;
  --fm: 'DM Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--tx);
  font-family: var(--fb);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 5%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Solid-ish fallback. Backdrop blur is opt-in below — it was forcing the GPU
     to re-blur the page on every scroll/animation frame. */
  background: rgba(10, 10, 10, 0.92);
  border-bottom: 1px solid var(--bdr);
}
@supports (backdrop-filter: blur(8px)) {
  nav {
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}
.nav-logo {
  font-family: var(--fh);
  font-size: 20px;
  font-style: italic;
  color: var(--g);
  letter-spacing: -0.2px;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.nav-link {
  font-size: 14px;
  color: var(--tx2);
  text-decoration: none;
  transition: color 0.15s;
  font-family: var(--fm);
  letter-spacing: 0.3px;
}
.nav-link:hover { color: var(--tx); }
.nav-cta {
  font-family: var(--fm);
  font-size: 13px;
  font-weight: 500;
  background: var(--gm);
  border: 1px solid rgba(74, 222, 128, 0.22);
  color: var(--g);
  padding: 6px 16px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}
.nav-cta:hover {
  background: rgba(74, 222, 128, 0.2);
  border-color: rgba(74, 222, 128, 0.35);
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px 5% 60px;
  position: relative;
  overflow: hidden;
  /* Isolate paint/layout so changes inside don't invalidate the rest of the page. */
  contain: layout paint;
  isolation: isolate;
}

/* Static grid pattern (was animated infinitely — biggest GPU/memory cost). */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(74, 222, 128, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 222, 128, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.08) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  pointer-events: none;
  z-index: 0;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 820px;
}

.launch-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gm);
  border: 1px solid rgba(74, 222, 128, 0.2);
  padding: 6px 16px;
  border-radius: 20px;
  font-family: var(--fm);
  font-size: 11px;
  color: var(--g);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 32px;
  animation: fadeUp 0.6s ease both;
}

/* Pulse only animates while .pulse-on is present.
   JS adds it when on-screen and removes it when off-screen. */
.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--g);
}
.pulse-dot.pulse-on {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.85); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-title {
  font-family: var(--fh);
  font-size: clamp(44px, 8vw, 100px);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -3px;
  color: var(--tx);
  margin-bottom: 20px;
  animation: fadeUp 0.7s 0.1s ease both;
}
.hero-title em {
  color: var(--g);
  font-style: italic;
}

.hero-sub {
  font-size: clamp(17px, 2.2vw, 22px);
  color: var(--tx2);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 40px;
  animation: fadeUp 0.7s 0.2s ease both;
}
.hero-sub strong {
  color: var(--tx);
  font-weight: 500;
}

/* ── COUNTDOWN ── */
.countdown {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 40px;
  animation: fadeUp 0.7s 0.25s ease both;
}
.cd-unit {
  background: var(--bg2);
  border: 1px solid var(--bdr2);
  border-radius: 10px;
  padding: 16px 20px;
  min-width: 72px;
  text-align: center;
}
.cd-num {
  font-family: var(--fh);
  font-size: clamp(30px, 4.5vw, 46px);
  font-style: italic;
  color: var(--g);
  line-height: 1;
  letter-spacing: -1px;
  display: block;
}
.cd-lbl {
  font-family: var(--fm);
  font-size: 9px;
  color: var(--tx3);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.cd-sep {
  font-family: var(--fh);
  font-size: 36px;
  color: var(--tx3);
  align-self: center;
  margin-bottom: 18px;
}

/* ── SIGNUP ── */
.signup-wrap {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  animation: fadeUp 0.7s 0.3s ease both;
}
.signup-form {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-bottom: 10px;
}
.signup-input {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--bdr2);
  color: var(--tx);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--fb);
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}
.signup-input::placeholder { color: var(--tx3); }
.signup-input:focus { border-color: rgba(74, 222, 128, 0.35); }
.signup-btn {
  background: var(--g3);
  border: none;
  color: #fff;
  padding: 12px 22px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--fb);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.signup-btn:hover {
  background: var(--g2);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(74, 222, 128, 0.25);
}
.signup-note {
  font-size: 12px;
  color: var(--tx3);
  text-align: center;
  font-family: var(--fm);
}
.signup-success {
  display: none;
  padding: 12px 16px;
  background: var(--gm);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 8px;
  font-size: 14px;
  color: var(--g);
  text-align: center;
  margin-bottom: 10px;
}

/* ── SOCIAL PROOF ── */
.social-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1px solid var(--bdr);
  animation: fadeUp 0.7s 0.4s ease both;
  overflow: hidden;
}
.proof-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--fm);
  font-size: 10px;
  color: var(--tx3);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
}
.proof-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--g3);
}

/* ── PLATFORM ── */
.coming {
  padding: 100px 5%;
  max-width: 1100px;
  margin: 0 auto;
}
.section-label {
  font-family: var(--fm);
  font-size: 10px;
  color: var(--g2);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 500;
}
.section-title {
  font-family: var(--fh);
  font-size: clamp(30px, 4.5vw, 52px);
  font-weight: 300;
  letter-spacing: -0.5px;
  color: var(--tx);
  margin-bottom: 8px;
}
.section-sub {
  font-size: 17px;
  color: var(--tx2);
  margin-bottom: 48px;
  line-height: 1.6;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 960px) {
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .pillars .pillar:nth-child(3) { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .pillars {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .pillars .pillar:nth-child(3) { grid-column: auto; }
  .pillar { padding: 24px; }
}
.pillar {
  background: var(--bg2);
  border: 1px solid var(--bdr);
  border-radius: 14px;
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
  contain: layout paint;
}
.pillar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
}
.pillar:nth-child(1)::before { background: var(--g); }
.pillar:nth-child(2)::before { background: #fb923c; }
.pillar:nth-child(3)::before { background: #60a5fa; }
.pillar:hover {
  border-color: var(--bdr2);
  transform: translateY(-3px);
}
.pillar-num {
  font-family: var(--fh);
  font-size: 46px;
  font-style: italic;
  color: rgba(255, 255, 255, 0.05);
  line-height: 1;
  margin-bottom: 16px;
  letter-spacing: -2px;
}
.pillar-icon {
  font-size: 28px;
  margin-bottom: 14px;
  display: block;
}
.pillar-title {
  font-family: var(--fh);
  font-size: 22px;
  font-weight: 400;
  color: var(--tx);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
}
.pillar-desc {
  font-size: 15px;
  color: var(--tx2);
  line-height: 1.65;
}
.pillar-tag {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--fm);
  font-size: 10px;
  color: var(--tx3);
  border: 1px solid var(--bdr);
  padding: 3px 9px;
  border-radius: 4px;
}

/* ── STATS ── */
.stats-section {
  padding: 80px 5%;
  border-top: 1px solid var(--bdr);
  border-bottom: 1px solid var(--bdr);
  background: var(--bg2);
}
.stats-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
@media (max-width: 600px) {
  .stats-inner { grid-template-columns: 1fr 1fr; }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(-n+2) { border-bottom: 1px solid var(--bdr); }
  .stat-item { padding: 20px 12px; }
}
.stat-item {
  text-align: center;
  padding: 24px;
  border-right: 1px solid var(--bdr);
}
.stat-item:last-child { border-right: none; }
.stat-val {
  font-family: var(--fh);
  font-size: clamp(34px, 5.5vw, 58px);
  font-style: italic;
  color: var(--g);
  line-height: 1;
  letter-spacing: -2px;
  margin-bottom: 6px;
  display: block;
}
.stat-lbl {
  font-family: var(--fm);
  font-size: 10px;
  color: var(--tx3);
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.5;
}

/* ── TIMELINE ── */
.timeline {
  padding: 80px 5%;
  max-width: 1000px;
  margin: 0 auto;
}
.tl-steps {
  display: flex;
  gap: 0;
  margin-top: 40px;
  position: relative;
}
.tl-steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, var(--g), rgba(74, 222, 128, 0.15));
}
.tl-step {
  flex: 1;
  text-align: center;
  position: relative;
  padding-top: 44px;
}
.tl-dot {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(74, 222, 128, 0.3);
  background: var(--bg);
  z-index: 2;
  transition: background-color 0.2s, border-color 0.2s;
}
.tl-step.done .tl-dot {
  background: var(--g);
  border-color: var(--g);
}
.tl-step.now .tl-dot {
  background: var(--g);
  border-color: var(--g);
  box-shadow: 0 0 0 5px rgba(74, 222, 128, 0.12);
}
/* Pulse only when JS has flagged the dot as on-screen. */
.tl-step.now .tl-dot.pulse-on {
  animation: pulse 2s ease-in-out infinite;
}
.tl-year {
  font-family: var(--fm);
  font-size: 10px;
  color: var(--g);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  font-weight: 500;
}
.tl-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--tx);
  margin-bottom: 4px;
}
.tl-detail {
  font-size: 11px;
  color: var(--tx3);
  line-height: 1.4;
  padding: 0 8px;
}
@media (max-width: 800px) {
  .tl-steps { flex-direction: column; gap: 28px; }
  .tl-steps::before { display: none; }
  .tl-dot { position: static; transform: none; margin: 0 auto 10px; }
  .tl-step { padding-top: 0; }
}

/* ── NEWSLETTER ── */
.newsletter {
  padding: 100px 5%;
  text-align: center;
  position: relative;
  overflow: hidden;
  contain: layout paint;
}
.newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(74, 222, 128, 0.04) 0%, transparent 65%);
  pointer-events: none;
}
.newsletter-inner {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: 0 auto;
}
.newsletter-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--gm);
  border: 1px solid rgba(74, 222, 128, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 20px;
}
.newsletter-title {
  font-family: var(--fh);
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 300;
  color: var(--tx);
  letter-spacing: -0.4px;
  margin-bottom: 10px;
}
.newsletter-sub {
  font-size: 16px;
  color: var(--tx2);
  line-height: 1.65;
  margin-bottom: 32px;
}
.nl-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}
.nl-name-row {
  display: flex;
  gap: 8px;
}
.nl-input {
  background: var(--bg2);
  border: 1px solid var(--bdr2);
  color: var(--tx);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--fb);
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  min-width: 0;
}
.nl-input::placeholder { color: var(--tx3); }
.nl-input:focus { border-color: rgba(74, 222, 128, 0.35); }
.nl-select {
  background: var(--bg2);
  border: 1px solid var(--bdr2);
  color: var(--tx2);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--fb);
  outline: none;
  cursor: pointer;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.nl-select:focus { border-color: rgba(74, 222, 128, 0.35); }
.nl-btn {
  background: var(--g3);
  border: none;
  color: #fff;
  padding: 14px;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--fb);
  font-size: 15px;
  font-weight: 600;
  transition: background-color 0.15s, box-shadow 0.15s;
}
.nl-btn:hover {
  background: var(--g2);
  box-shadow: 0 4px 20px rgba(74, 222, 128, 0.2);
}
.nl-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 16px;
}
.nl-tag {
  font-family: var(--fm);
  font-size: 10px;
  color: var(--tx3);
  border: 1px solid var(--bdr);
  padding: 3px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
  user-select: none;
}
.nl-tag.selected {
  color: var(--g);
  border-color: rgba(74, 222, 128, 0.3);
  background: var(--gm);
}
.nl-tag:hover { color: var(--tx2); }
.nl-success {
  display: none;
  padding: 16px;
  background: var(--gm);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 10px;
  color: var(--g);
  font-size: 15px;
  margin-top: 10px;
}
.sub-count {
  margin-top: 20px;
  font-family: var(--fm);
  font-size: 12px;
  color: var(--tx3);
}
.sub-count span { color: var(--g); }

/* ── FOOTER ── */
footer {
  padding: 40px 5%;
  border-top: 1px solid var(--bdr);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo {
  font-family: var(--fh);
  font-size: 17px;
  font-style: italic;
  color: var(--g);
}
.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-link {
  font-family: var(--fm);
  font-size: 12px;
  color: var(--tx3);
  text-decoration: none;
  transition: color 0.15s;
  letter-spacing: 0.3px;
}
.footer-link:hover { color: var(--tx2); }
.footer-copy {
  font-family: var(--fm);
  font-size: 12px;
  color: var(--tx3);
}

/* ── RESPONSIVE: tablet + mobile refinements ─────────────────── */

/* Tablet (≤900px): tighten section padding, scale spacing */
@media (max-width: 900px) {
  .coming { padding: 80px 5%; }
  .stats-section { padding: 60px 5%; }
  .timeline { padding: 60px 5%; }
  .newsletter { padding: 80px 5%; }
}

/* Mobile (≤600px): nav, hero, forms, social strip, footer */
@media (max-width: 600px) {
  /* Nav: drop the "Platform" link to make room, keep Newsletter + CTA */
  nav { padding: 0 4%; gap: 8px; }
  .nav-right { gap: 14px; }
  .nav-link[href="#platform"] { display: none; }
  .nav-cta { padding: 6px 12px; }

  /* Hero spacing */
  .hero { padding: 90px 5% 50px; }
  .hero-title { letter-spacing: -1.5px; }

  /* Countdown: smaller boxes + smaller separators so all 4 fit on phones */
  .countdown { gap: 4px; }
  .cd-unit {
    min-width: 0;
    flex: 1 1 0;
    padding: 12px 6px;
    max-width: 80px;
  }
  .cd-sep { font-size: 22px; margin-bottom: 14px; }

  /* Hero signup: stack input + button vertically (button no longer crammed) */
  .signup-form { flex-direction: column; gap: 10px; }
  .signup-btn { width: 100%; padding: 14px; }

  /* Social proof: allow wrapping instead of clipping */
  .social-strip {
    flex-wrap: wrap;
    overflow: visible;
    gap: 12px 18px;
  }

  /* Newsletter: stack the first/last name row */
  .nl-name-row { flex-direction: column; gap: 10px; }

  /* Footer: center everything when stacked */
  footer {
    justify-content: center;
    text-align: center;
    padding: 32px 5%;
  }
  .footer-links { justify-content: center; }
}

/* Small phones (≤380px): final squeeze */
@media (max-width: 380px) {
  nav { padding: 0 4%; }
  .nav-right { gap: 10px; }
  .nav-link { font-size: 13px; }
  .nav-cta { font-size: 12px; padding: 5px 10px; }
  .nav-logo { font-size: 18px; }

  /* Countdown: two rows of two on the smallest phones */
  .countdown { flex-wrap: wrap; max-width: 280px; margin-left: auto; margin-right: auto; margin-bottom: 36px; }
  .cd-unit { flex: 1 1 calc(50% - 16px); max-width: none; }
  .cd-sep { display: none; }

  .hero { padding: 80px 4% 40px; }
  .coming, .timeline, .newsletter { padding-left: 4%; padding-right: 4%; }
}

/* Large desktops (≥1400px): cap content widths so things don't sprawl */
@media (min-width: 1400px) {
  .hero-inner { max-width: 920px; }
  .coming { max-width: 1200px; }
  .stats-inner { max-width: 1100px; }
  .timeline { max-width: 1100px; }
}

/* Landscape phones: keep hero from feeling cramped vertically */
@media (max-height: 600px) and (orientation: landscape) {
  .hero { min-height: auto; padding: 90px 5% 50px; }
}


/* ── ACCESSIBILITY ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
