/*
 * ── Theme Switching ──
 * Default: light theme
 * To switch to dark: add data-theme="dark" to the <html> element
 * e.g. <html lang="en" data-theme="dark">
 */

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

/* ── Light theme (default) ── */
:root {
  --bg-deep: #f8fafb;
  --bg-card: #ffffff;
  --teal: #17b892;
  --teal-dim: rgba(23, 184, 146, 0.10);
  --teal-glow: rgba(23, 184, 146, 0.18);
  --text-primary: #1a202c;
  --text-secondary: #3a4556;
  --text-muted: #718096;
  --border: rgba(0, 0, 0, 0.10);
  --border-teal: rgba(23, 184, 146, 0.35);
  --nav-bg: rgba(248, 250, 251, 0.85);
  --nav-mobile-bg: rgba(248, 250, 251, 0.95);
  --teal-hover: #20c9a0;
  --btn-text: #ffffff;
  --orb-one: radial-gradient(circle, rgba(23,184,146,0.12), transparent 70%);
  --orb-two: radial-gradient(circle, rgba(23,184,146,0.08), transparent 70%);
  --shift-after-bg: linear-gradient(135deg, rgba(23,184,146,0.10), rgba(23,184,146,0.04));
  --stack-mid: #e8ecf0;
  --stack-desc-bg: rgba(0, 0, 0, 0.03);
  --success-bg: rgba(23, 184, 146, 0.08);
  --card-shadow: 0 1px 3px rgba(0,0,0,0.06);
  --fw-light: 400;
}

/* ── Dark theme ── */
[data-theme="dark"] {
  --bg-deep: #0a0f1a;
  --bg-card: #111827;
  --teal: #2dd4a8;
  --teal-dim: rgba(45, 212, 168, 0.12);
  --teal-glow: rgba(45, 212, 168, 0.25);
  --text-primary: #f0f4f8;
  --text-secondary: #8899aa;
  --text-muted: #556677;
  --border: rgba(255,255,255,0.06);
  --border-teal: rgba(45, 212, 168, 0.2);
  --nav-bg: rgba(10, 15, 26, 0.8);
  --nav-mobile-bg: rgba(10, 15, 26, 0.95);
  --teal-hover: #3ee6b8;
  --btn-text: #0a0f1a;
  --orb-one: radial-gradient(circle, rgba(45,212,168,0.08), transparent 70%);
  --orb-two: radial-gradient(circle, rgba(45,212,168,0.05), transparent 70%);
  --shift-after-bg: linear-gradient(135deg, rgba(45,212,168,0.08), rgba(45,212,168,0.02));
  --stack-mid: #0d1220;
  --stack-desc-bg: rgba(17, 24, 39, 0.5);
  --success-bg: rgba(45, 212, 168, 0.08);
  --card-shadow: none;
  --fw-light: 300;
}

[data-theme="dark"] body {
  -webkit-font-smoothing: antialiased;
}

html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: auto;
  position: relative;
  width: 100%;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }



/* ── Nav ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 0; background: var(--nav-bg);
  backdrop-filter: blur(20px); border-bottom: 1px solid var(--border);
}
nav .container { display: flex; align-items: center; justify-content: space-between; }
.logo {
  text-decoration: none; display: flex; align-items: center;
}
.logo-img { height: 32px; width: auto; display: block; border-radius: 4px; }
.logo-bar { width: 3px; height: 22px; background: var(--teal); border-radius: 2px; }
.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links a {
  color: var(--text-secondary); text-decoration: none;
  font-size: 0.93rem; font-weight: 400; transition: color 0.2s;
}
.nav-links a:hover { color: var(--teal); }
.nav-cta {
  background: var(--teal) !important; color: var(--btn-text) !important;
  padding: 9px 22px !important; border-radius: 6px;
  font-weight: 600 !important; font-size: 0.85rem !important; transition: all 0.25s !important;
}
.nav-cta:hover {
  background: var(--teal-hover) !important; transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--teal-glow);
}

/* ── Hero ── */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; padding: 120px 0 80px;
  overflow: hidden;
}
.hero-bg-orb { position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none; }
.hero-bg-orb.one {
  width: 600px; height: 600px;
  background: var(--orb-one);
  top: -100px; right: -150px;
}
.hero-bg-orb.two {
  width: 400px; height: 400px;
  background: var(--orb-two);
  bottom: 0; left: -100px;
}
.hero-content { position: relative; z-index: 2; max-width: 780px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; background: var(--teal-dim);
  border: 1px solid var(--border-teal); border-radius: 100px;
  font-size: 0.78rem; font-weight: 500; color: var(--teal);
  letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 32px;
}
.hero-badge::before {
  content: ''; width: 6px; height: 6px;
  background: var(--teal); border-radius: 50%;
}
.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.2rem); font-weight: 800;
  line-height: 1.08; letter-spacing: -0.04em; margin-bottom: 24px;
}
.hero h1 .teal { color: var(--teal); }
.hero-sub {
  font-size: 1.2rem; line-height: 1.65; color: var(--text-secondary);
  max-width: 560px; margin-bottom: 36px; font-weight: var(--fw-light);
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 36px; background: var(--teal); color: var(--btn-text);
  font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 700;
  letter-spacing: -0.01em; border: none; border-radius: 8px;
  cursor: pointer; transition: all 0.25s;
}
.btn-primary:hover {
  background: var(--teal-hover); transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--teal-glow);
}
.btn-primary svg { transition: transform 0.2s; }
.btn-primary:hover svg { transform: translateX(3px); }

/* ── Waitlist form ── */
.waitlist-form { width: 100%; max-width: 540px; }
.waitlist-input-group {
  display: flex; gap: 0;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; transition: border-color 0.25s, box-shadow 0.25s;
}
.waitlist-input-group:focus-within {
  border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-dim);
}
.waitlist-input-group.error { border-color: #ef4444; }
.waitlist-input-group.error:focus-within { box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.waitlist-input {
  flex: 1; padding: 15px 20px; background: transparent;
  border: none; outline: none; color: var(--text-primary);
  font-family: 'Outfit', sans-serif; font-size: 0.95rem; font-weight: 400; min-width: 0;
}
.waitlist-input::placeholder { color: var(--text-muted); }
.waitlist-btn {
  border-radius: 0 8px 8px 0 !important; padding: 15px 28px !important;
  white-space: nowrap; flex-shrink: 0;
}
.waitlist-error {
  font-size: 0.8rem; color: #ef4444; margin-top: 8px; min-height: 20px;
  padding-left: 2px; opacity: 0; transition: opacity 0.2s;
}
.waitlist-error.show { opacity: 1; }
.waitlist-success {
  display: none; align-items: center; gap: 10px;
  padding: 16px 22px; background: var(--success-bg);
  border: 1px solid var(--border-teal); border-radius: 10px;
  font-size: 0.92rem; font-weight: 500; color: var(--teal);
}
.waitlist-success.show {
  display: flex;
}
.cta-section .waitlist-form { margin: 0 auto; }

/* ── Section shared ── */
section { padding: 96px 0; position: relative; overflow: hidden; }
.section-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--teal); margin-bottom: 16px;
}
.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 20px;
}
.section-desc {
  font-size: 1.1rem; color: var(--text-secondary);
  max-width: 540px; line-height: 1.6; font-weight: var(--fw-light);
}
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-teal), transparent);
  border: none;
}

/* ── Problem ── */
.problem-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.problem-card {
  padding: 36px 28px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 12px;
  border-top: 2px solid var(--teal); transition: all 0.35s;
  position: relative; overflow: hidden;
  box-shadow: var(--card-shadow);
}
.problem-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at top, var(--teal-dim), transparent 60%);
  opacity: 0; transition: opacity 0.35s;
}
.problem-card:hover { border-color: var(--border-teal); transform: translateY(-4px); }
.problem-card:hover::after { opacity: 1; }
.problem-icon {
  width: 44px; height: 44px; background: var(--teal-dim);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; position: relative; z-index: 1;
}
.problem-icon svg { width: 20px; height: 20px; stroke: var(--teal); fill: none; stroke-width: 2; }
.problem-card h3 {
  font-size: 1.1rem; font-weight: 600; margin-bottom: 10px;
  position: relative; z-index: 1;
}
.problem-card p {
  font-size: 0.93rem; color: var(--text-secondary); line-height: 1.55;
  font-weight: var(--fw-light); position: relative; z-index: 1;
}

/* ── Shift ── */
.shift-container {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 32px; align-items: center; margin-top: 44px;
}
.shift-card { padding: 40px 32px; border-radius: 14px; border: 1px solid var(--border); }
.shift-card.before { background: var(--bg-card); }
.shift-card.after {
  background: var(--shift-after-bg);
  border-color: var(--border-teal);
}
.shift-card-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px;
}
.shift-card.after .shift-card-label { color: var(--teal); }
.shift-card h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: 22px; }
.shift-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.shift-list li {
  font-size: 0.95rem; color: var(--text-secondary); line-height: 1.5;
  padding-left: 20px; position: relative; font-weight: var(--fw-light);
}
.shift-list li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted);
}
.shift-card.after .shift-list li::before { background: var(--teal); }
.shift-arrow {
  width: 56px; height: 56px; display: flex; align-items: center; justify-content: center;
  background: var(--teal-dim); border-radius: 50%; flex-shrink: 0;
}
.shift-arrow svg { width: 24px; height: 24px; stroke: var(--teal); fill: none; stroke-width: 2; }

/* ── Architecture ── */
.stack-section { background: linear-gradient(180deg, var(--bg-deep), var(--stack-mid), var(--bg-deep)); overflow: hidden; }
.stack-layers { margin-top: 44px; display: flex; flex-direction: column; gap: 4px; }
.stack-layer {
  display: grid; grid-template-columns: 180px 1fr;
  align-items: stretch; border-radius: 10px; overflow: hidden;
  transition: all 0.3s; border: 1px solid var(--border);
}
.stack-layer:hover { border-color: var(--border-teal); }
.stack-layer-num {
  padding: 22px 24px; background: var(--bg-card);
  display: flex; align-items: center; gap: 14px;
  font-weight: 600; font-size: 0.85rem; border-right: 2px solid var(--teal);
}
.stack-layer-num span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; color: var(--teal); font-weight: 500;
}
.stack-layer-desc {
  padding: 22px 28px; background: var(--stack-desc-bg);
  font-size: 0.93rem; color: var(--text-secondary); font-weight: var(--fw-light);
  display: flex; align-items: center;
}

/* ── Features ── */
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 44px; }
.feature-card {
  padding: 36px 30px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 12px; transition: all 0.35s;
  box-shadow: var(--card-shadow);
}
.feature-card:hover { border-color: var(--border-teal); transform: translateY(-3px); }
.feature-icon {
  width: 48px; height: 48px; background: var(--teal-dim);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.feature-icon svg { width: 22px; height: 22px; stroke: var(--teal); fill: none; stroke-width: 1.8; }
.feature-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 10px; }
.feature-card p { font-size: 0.93rem; color: var(--text-secondary); line-height: 1.6; font-weight: var(--fw-light); }

/* ── Teams ── */
.teams-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.team-card {
  padding: 28px 24px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 10px;
  border-left: 3px solid var(--teal); transition: all 0.3s;
  box-shadow: var(--card-shadow);
}
.team-card:nth-child(2) { border-left-color: #3b82f6; }
.team-card:nth-child(3) { border-left-color: #a78bfa; }
.team-card:nth-child(4) { border-left-color: #f97316; }
.team-card:nth-child(5) { border-left-color: #ec4899; }
.team-card:nth-child(6) { border-left-color: #06b6d4; }
.team-card:hover { transform: translateY(-3px); border-color: var(--border-teal); }
.team-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.team-card p { font-size: 0.85rem; color: var(--text-muted); font-weight: var(--fw-light); }

/* ── CTA ── */
.cta-section { text-align: center; padding: 110px 0; }
.cta-section .section-title { max-width: 600px; margin: 0 auto 20px; }
.cta-section .section-desc { max-width: 480px; margin: 0 auto 44px; }
.cta-actions { display: flex; justify-content: center; }

/* ── Footer ── */
footer { padding: 48px 0; border-top: 1px solid var(--border); }
footer .container { display: flex; justify-content: space-between; align-items: center; }
.footer-left { display: flex; align-items: center; gap: 10px; }
.footer-text { font-size: 0.88rem; color: var(--text-muted); font-weight: var(--fw-light); }
.footer-links { display: flex; gap: 28px; list-style: none; }
.footer-links a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.88rem; transition: color 0.2s;
}
.footer-links a:hover { color: var(--teal); }



/* ── Dark theme: spacing & font size overrides ── */
[data-theme="dark"] section { padding: 120px 0; }
[data-theme="dark"] .hero { padding: 140px 0 100px; }
[data-theme="dark"] .cta-section { padding: 140px 0; }
[data-theme="dark"] .problem-grid,
[data-theme="dark"] .features-grid,
[data-theme="dark"] .teams-grid,
[data-theme="dark"] .stack-layers,
[data-theme="dark"] .shift-container { margin-top: 56px; }
[data-theme="dark"] .hero-sub { font-size: 1.15rem; margin-bottom: 44px; }
[data-theme="dark"] .section-desc { font-size: 1.05rem; }
[data-theme="dark"] .problem-card p,
[data-theme="dark"] .feature-card p,
[data-theme="dark"] .stack-layer-desc,
[data-theme="dark"] .nav-links a { font-size: 0.88rem; }
[data-theme="dark"] .shift-list li { font-size: 0.9rem; }
[data-theme="dark"] .team-card p { font-size: 0.8rem; }
[data-theme="dark"] .footer-text,
[data-theme="dark"] .footer-links a { font-size: 0.82rem; }



/* ── Mobile nav ── */
.nav-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 4px; width: 36px; height: 36px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text-primary);
  border-radius: 2px; transition: all 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--nav-mobile-bg); backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border); padding: 8px 0;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block; padding: 14px 24px; font-size: 0.95rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links li:last-child a {
    margin: 12px 24px; padding: 12px 22px; text-align: center;
    border-bottom: none;
  }

  section { padding: 60px 0; }
  .hero { min-height: auto; padding: 100px 0 60px; }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
  .hero-sub { font-size: 1.05rem; margin-bottom: 32px; }
  .hero-badge { margin-bottom: 24px; }

  .section-title { font-size: clamp(1.6rem, 5vw, 2.2rem); }
  .section-desc { font-size: 1rem; }

  .problem-grid, .features-grid { grid-template-columns: 1fr; }
  .teams-grid { grid-template-columns: 1fr 1fr; }
  .shift-container { grid-template-columns: 1fr; }
  .shift-arrow { transform: rotate(90deg); margin: 0 auto; }
  .stack-layer { grid-template-columns: 130px 1fr; }

  .cta-section { padding: 72px 0; }
  .cta-section .section-title { font-size: clamp(1.5rem, 5vw, 2rem); }

  footer .container { flex-direction: column; gap: 20px; text-align: center; }

  /* Dark theme mobile overrides */
  [data-theme="dark"] section { padding: 72px 0; }
  [data-theme="dark"] .hero { padding: 110px 0 72px; }
  [data-theme="dark"] .cta-section { padding: 80px 0; }
  [data-theme="dark"] .hero-sub { font-size: 1rem; }
  [data-theme="dark"] .section-desc { font-size: 0.95rem; }
}

@media (max-width: 520px) {
  .hero { padding: 92px 0 48px; }
  .hero h1 { font-size: 1.85rem; }

  .teams-grid { grid-template-columns: 1fr; }
  .stack-layer { grid-template-columns: 1fr; }
  .stack-layer-num { border-right: none; border-bottom: 2px solid var(--teal); }

  .waitlist-input-group { flex-direction: column; }
  .waitlist-btn { border-radius: 0 0 8px 8px !important; justify-content: center; }

  .shift-card { padding: 28px 22px; }
  .problem-card { padding: 28px 22px; }
  .feature-card { padding: 28px 22px; }

  [data-theme="dark"] .hero { padding: 100px 0 56px; }
}
