/* ============================================================
   CSS VARIABLES
   Edit these to change colors, spacing, and type globally.
   ============================================================ */
:root {
  /* Colors — pulled from Levelan logo palette */
  --bg:            #0b1120;
  --bg-surface:    #101827;
  --bg-card:       #152035;
  --border:        rgba(56, 200, 232, 0.1);
  --border-hover:  rgba(56, 200, 232, 0.22);
  --text:          #e8f0f8;
  --text-muted:    #7090b0;
  --text-dim:      #3a5070;
  --accent:        #38c8e8;
  --accent-hover:  #5dd9f4;
  --accent-glow:   rgba(56, 200, 232, 0.14);

  /* Typography — system font stack, SF Pro on Apple devices */
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* Spacing scale */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   1.5rem;
  --space-lg:   2.5rem;
  --space-xl:   4rem;
  --space-2xl:  6rem;
  --space-3xl:  8rem;

  /* Layout */
  --container:  72rem;

  /* Shape */
  --radius-sm:  8px;
  --radius:     12px;
  --radius-lg:  20px;

  /* Motion */
  --transition: 180ms ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; font-size: inherit; }
ol, ul { list-style: none; }

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Hide desktop line break on mobile */
.br-desktop { display: none; }
@media (min-width: 640px) {
  .br-desktop { display: block; }
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .container { padding: 0 2.5rem; }
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3 {
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; }
p  { color: var(--text-muted); }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-md);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}
.section-header h2 { margin-bottom: 0.5rem; }

.section-sub {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 40ch;
  margin: 0 auto;
  line-height: 1.65;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), opacity var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.4;
}

.btn-primary {
  background: var(--accent);
  color: #0b1120;
  border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-nav {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border);
}
.btn-nav:hover {
  border-color: var(--border-hover);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(9, 9, 15, 0.75);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .nav-inner { padding: 0 2.5rem; }
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-mark { flex-shrink: 0; border-radius: 6px; }

.logo-text {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
}

/* ============================================================
   HERO
   ============================================================ */
.section-hero {
  position: relative;
  padding: var(--space-3xl) 0 var(--space-2xl);
  overflow: hidden;
}

/* Subtle radial glow at top center */
.section-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 960px;
  height: 640px;
  background: radial-gradient(
    ellipse 55% 50% at 50% 0%,
    var(--accent-glow) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
}

.hero-headline {
  margin-bottom: var(--space-md);
}

.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: var(--text-muted);
  max-width: 40ch;
  margin: 0 auto var(--space-lg);
  line-height: 1.7;
}

/* ============================================================
   FORMS
   ============================================================ */
.waitlist-form {
  margin-bottom: var(--space-xs);
}

.form-row {
  display: flex;
  gap: 0.5rem;
  max-width: 30rem;
  margin: 0 auto;
}

.form-row input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0.625rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-row input[type="email"]::placeholder {
  color: var(--text-dim);
}

.form-row input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-row input[type="email"].is-error {
  border-color: #f87171;
}

.form-note {
  font-size: 0.8125rem;
  color: var(--text-dim);
  text-align: center;
  margin-top: 0.75rem;
}

.form-message {
  min-height: 1.4rem;
  font-size: 0.875rem;
  text-align: center;
  margin-top: 0.625rem;
  line-height: 1.5;
}
.form-message.is-success { color: #4ade80; }
.form-message.is-error   { color: #f87171; }
.form-message.is-info    { color: var(--accent-hover); }

/* Stack form on small screens */
@media (max-width: 480px) {
  .form-row {
    flex-direction: column;
  }
  .form-row .btn {
    width: 100%;
  }
}

/* ============================================================
   BENEFITS
   ============================================================ */
.section-benefits {
  padding: var(--space-2xl) 0;
}

/* "Hairline grid" pattern — gap becomes visible border between cells */
.benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (min-width: 640px) {
  .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  padding: var(--space-lg) var(--space-md);
  background: var(--bg-card);
  transition: background var(--transition);
}

.card:hover {
  background: var(--bg-surface);
}

.card-icon {
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: var(--space-sm);
  color: var(--accent);
}

.card-title {
  margin-bottom: 0.625rem;
}

.card-copy {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.section-how {
  padding: var(--space-2xl) 0;
}

.steps {
  display: flex;
  flex-direction: column;
  max-width: 38rem;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border);
}

.step:last-child {
  border-bottom: none;
}

.step-num {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  padding-top: 0.25rem;
  min-width: 2rem;
  flex-shrink: 0;
}

.step-content h3 {
  margin-bottom: 0.375rem;
}

.step-content p {
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ============================================================
   PHILOSOPHY
   ============================================================ */
.section-philosophy {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.philosophy-inner {
  max-width: 38rem;
  margin: 0 auto;
  text-align: center;
}

.philosophy-headline {
  margin-bottom: var(--space-md);
}

.philosophy-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.philosophy-body:last-child { margin-bottom: 0; }

/* ============================================================
   FAQ
   ============================================================ */
.section-faq {
  padding: var(--space-2xl) 0;
}

.faq-list {
  max-width: 38rem;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  gap: 1rem;
  user-select: none;
  transition: color var(--transition);
}

.faq-question::-webkit-details-marker { display: none; }

/* The +/× toggle indicator */
.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-muted);
  flex-shrink: 0;
  line-height: 1;
  transition: color var(--transition);
}

.faq-item[open] > .faq-question {
  color: var(--text);
}

.faq-item[open] > .faq-question::after {
  content: '\00D7';
  color: var(--text-muted);
}

.faq-answer {
  padding-bottom: var(--space-md);
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-muted);
}

/* ============================================================
   FINAL WAITLIST CTA
   ============================================================ */
.section-waitlist {
  padding: var(--space-3xl) 0;
  position: relative;
  overflow: hidden;
}

/* Matching bottom glow */
.section-waitlist::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 800px;
  height: 500px;
  background: radial-gradient(
    ellipse 60% 50% at 50% 100%,
    var(--accent-glow) 0%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.waitlist-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 36rem;
  margin: 0 auto;
}

.waitlist-inner h2 {
  margin-bottom: 0.75rem;
}

.waitlist-inner .section-sub {
  margin-bottom: var(--space-lg);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-lg) 0 var(--space-md);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.footer-brand .nav-logo {
  margin-bottom: 0.375rem;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-dim);
  padding-left: 1.75rem; /* align with logo text */
}

.footer-nav {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  padding-top: 0.125rem;
}

.footer-nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
