/*
 * Shared styles for Spaarc marketing landing pages.
 *
 * Extracted verbatim from the inline <style> block education.html carried, so
 * the segment pages (medspa / aesthetics / wellness) and the education page all
 * render from one source instead of four near-identical copies.
 *
 * index.html deliberately keeps its own inline styles — it has homepage-only
 * components (pricing cards, the hero rotator) that nothing else uses.
 *
 * Colors come from the --sp-* custom properties in theme.css; never hardcode a
 * hex here or the light theme breaks.
 */

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--sp-bg);
  color: var(--sp-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  background: var(--sp-nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
nav.scrolled { border-bottom-color: var(--sp-border); }

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--sp-text);
  text-decoration: none;
}
.logo .wordmark > span { color: var(--sp-turquoise); }

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  color: var(--sp-text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--sp-text); }
.nav-links a.btn-primary { color: var(--sp-on-accent); }
.nav-links a.btn-primary:hover { color: var(--sp-on-accent); }
.nav-links a.nav-login {
  color: var(--sp-text);
  font-weight: 500;
}
.nav-links a.nav-login:hover {
  color: var(--sp-turquoise);
}

/* Hamburger toggle — hidden on desktop, shown ≤768px */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 101;
}
.nav-toggle-bar {
  display: block;
  width: 24px;
  height: 2px;
  margin: 0 auto;
  background: var(--sp-text);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
/* Morph the three bars into an X while the menu is open */
nav.menu-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.menu-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
nav.menu-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--sp-turquoise);
  color: var(--sp-on-accent);
}
.btn-primary:hover {
  background: var(--sp-tiffany);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--sp-accent-glow);
}
.btn-nav-cta {
  padding: 8px 20px;
  font-size: 13px;
}
.btn-secondary {
  background: var(--sp-surface);
  color: var(--sp-text);
  border: 1px solid var(--sp-border);
}
.btn-secondary:hover {
  background: var(--sp-bg-card-hover);
  border-color: var(--sp-text-dim);
}

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 1200px;
  background: radial-gradient(ellipse 60% 50%, var(--sp-glow-1) 0%, var(--sp-glow-2) 40%, transparent 70%);
  pointer-events: none;
}

.hero-content { max-width: 820px; position: relative; }

h1 {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 24px;
}
h1 .accent {
  background: linear-gradient(135deg, var(--sp-turquoise), var(--sp-tiffany));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--sp-text-secondary);
  max-width: 620px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero-note {
  margin-top: 48px;
  font-size: 13px;
  color: var(--sp-text-dim);
}

/* ── Sections ── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 24px;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--sp-turquoise);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
}

.section-desc {
  font-size: 18px;
  color: var(--sp-text-secondary);
  max-width: 560px;
  line-height: 1.7;
  margin-bottom: 64px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--sp-bg-card);
  border: 1px solid var(--sp-border);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s;
}
.feature-card:hover {
  background: var(--sp-bg-card-hover);
  border-color: var(--sp-accent-border);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--sp-tiffany-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 22px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.feature-card p {
  font-size: 15px;
  color: var(--sp-text-secondary);
  line-height: 1.6;
}

/* ── Stats ── */
.stats-section {
  border-top: 1px solid var(--sp-border);
  border-bottom: 1px solid var(--sp-border);
  background: var(--sp-bg-card);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 48px;
  text-align: center;
  padding: 80px 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.stat-value {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--sp-turquoise), var(--sp-tiffany));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: baseline;
  justify-content: center;
  min-height: 53px;
}

.stat-value--text {
  font-size: 36px;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 15px;
  color: var(--sp-text-secondary);
  margin-top: 8px;
}

/* ── How it works ── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  counter-reset: step;
}

.step {
  counter-increment: step;
  position: relative;
  padding: 32px;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  font-size: 64px;
  font-weight: 800;
  color: var(--sp-tiffany);
  line-height: 1;
  margin-bottom: 16px;
  display: block;
}
/* Light mode: match the shared theme.css `.step::before` override's
   specificity so this page's tiffany numerals win (later in source order). */
html[data-spaarc-theme="light"] .step::before { color: var(--sp-tiffany); }

.step h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.step p {
  font-size: 15px;
  color: var(--sp-text-secondary);
  line-height: 1.6;
}

/* ── Offer band (graduation) ── */
.offer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 120px;
}
.offer-inner {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--sp-accent-border);
  background: var(--sp-accent-soft);
  border-radius: 24px;
  padding: 64px 48px;
  text-align: center;
}
.offer-inner::before {
  content: '';
  position: absolute;
  top: -60%;
  left: 50%;
  transform: translateX(-50%);
  width: 760px;
  height: 760px;
  background: radial-gradient(circle, var(--sp-glow-1) 0%, transparent 70%);
  pointer-events: none;
}
.offer-inner > * { position: relative; }
.offer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--sp-tiffany-dim);
  color: var(--sp-tiffany);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid var(--sp-accent-border);
}
.offer-inner h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  max-width: 640px;
  margin: 0 auto 20px;
}
.offer-inner p {
  font-size: 18px;
  color: var(--sp-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── CTA ── */
.cta-section {
  text-align: center;
  padding: 120px 24px;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--sp-glow-1) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section .section-title { max-width: 600px; margin: 0 auto 20px; }
.cta-section .section-desc { margin: 0 auto 40px; text-align: center; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--sp-border);
  padding: 64px 24px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand { max-width: 280px; }

.footer-wordmark {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: var(--sp-text);
}
.footer-wordmark-period { color: var(--sp-turquoise); }

.footer-tagline {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--sp-text-dim);
}

.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col-heading {
  font-size: 13px;
  font-weight: 600;
  color: var(--sp-text);
  letter-spacing: 0.2px;
  margin-bottom: 4px;
}
.footer-col a {
  color: var(--sp-text-dim);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--sp-text-secondary); }

.footer-bottom {
  border-top: 1px solid var(--sp-border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy,
.footer-compliance {
  font-size: 13px;
  color: var(--sp-text-dim);
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-brand { grid-column: 1 / -1; max-width: none; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* ── Trial / primary CTA button ── */
.waitlist-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  background: var(--sp-turquoise);
  color: var(--sp-on-accent);
  border: none;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
}
.waitlist-btn:hover {
  background: var(--sp-tiffany);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--sp-accent-glow);
}
.waitlist-btn svg { flex-shrink: 0; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 20px;
    background: var(--sp-nav-menu-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--sp-border);
    /* Collapsed by default; slide + fade in when nav.menu-open is set */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
  }
  nav.menu-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-links a {
    padding: 14px 4px;
    font-size: 16px;
    border-bottom: 1px solid var(--sp-border-faint);
  }
  .nav-links a.btn-primary {
    margin-top: 12px;
    justify-content: center;
    border-bottom: none;
  }
  .features-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .steps { grid-template-columns: 1fr; }
  .offer-inner { padding: 48px 24px; }
  .footer-inner { justify-content: center; text-align: center; }
}
