/* ==========================================================================
   SetForge Landing Page — Stylesheet
   Design system matches the SetForge app (dark-first, purple/orange gradient)
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg: #0A0A0F;
  --card: #13131A;
  --surface: #1C1C26;
  --accent: #6C63FF;
  --accent-2: #FF6B35;
  --success: #00D4AA;
  --warning: #FFB800;
  --text-primary: #FFFFFF;
  --text-secondary: #8B8B9E;
  --text-tertiary: #5A5A6E;
  --border: #2A2A3A;

  --grad-hero: linear-gradient(135deg, #6C63FF, #FF6B35);
  --grad-purple: linear-gradient(135deg, #8B7BFF, #6C63FF);
  --grad-teal: linear-gradient(135deg, #2BF0CD, #00B894);

  --font-display: "Sora", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-card: 20px;
  --radius-btn: 16px;
  --radius-pill: 999px;

  --glow-accent: 0 8px 30px rgba(108, 99, 255, 0.45);
  --container-max: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 20px;
}
section { position: relative; }
.gradient-text {
  background: var(--grad-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
::selection { background: var(--accent); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--grad-hero);
  color: #fff;
  box-shadow: var(--glow-accent);
}
.btn-primary:hover { box-shadow: 0 10px 40px rgba(108, 99, 255, 0.6); transform: translateY(-2px); }
.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-pill { border-radius: var(--radius-pill); }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* Store badge buttons */
.store-badges { display: flex; flex-wrap: wrap; gap: 14px; }
.store-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: var(--radius-btn);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.store-badge:hover { border-color: var(--accent); transform: translateY(-2px); }
.store-badge svg { width: 24px; height: 24px; flex-shrink: 0; }
.store-badge .store-text { display: flex; flex-direction: column; line-height: 1.2; }
.store-badge .store-text small { font-size: 0.65rem; color: var(--text-secondary); }
.store-badge .store-text strong { font-family: var(--font-display); font-size: 0.95rem; }
.cta-banner .store-badge { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.25); }
.cta-banner .store-badge:hover { border-color: #fff; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  background: transparent;
  transition: background 0.3s ease, padding 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; }
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links {
  display: none;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
}
.nav-toggle svg { width: 20px; height: 20px; }

.mobile-menu {
  position: fixed;
  inset: 0;
  top: 0;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(12px);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.mobile-menu .btn { margin-top: 12px; }

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.hero-glow {
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  max-width: 200vw;
  height: 700px;
  background: radial-gradient(circle at 30% 30%, rgba(108,99,255,0.35), transparent 60%),
              radial-gradient(circle at 70% 60%, rgba(255,107,53,0.28), transparent 60%);
  filter: blur(60px);
  animation: emberPulse 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
@keyframes emberPulse {
  0% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}
.hero .container { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 24px;
}
.eyebrow::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--grad-hero);
}
.hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.75rem);
  max-width: 900px;
  margin-inline: auto;
  margin-bottom: 22px;
}
.hero-sub {
  max-width: 620px;
  margin: 0 auto 36px;
  color: var(--text-secondary);
  font-size: clamp(1rem, 2vw, 1.15rem);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 64px;
}
.hero-visual { display: flex; justify-content: center; }

/* ---------- Phone mockup ---------- */
.phone-mockup {
  position: relative;
  width: 260px;
  max-width: 78vw;
  aspect-ratio: 1080 / 2400;
  background: linear-gradient(160deg, #1b1b24, #0b0b10);
  border-radius: 46px;
  padding: 12px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 60px rgba(108, 99, 255, 0.15);
  flex-shrink: 0;
}
.phone-mockup .screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: var(--card);
}
.phone-mockup .screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.phone-mockup .notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: 22px;
  background: #0b0b10;
  border-radius: var(--radius-pill);
  z-index: 2;
}
.phone-mockup.phone-lg { width: 300px; }
.phone-mockup.phone-sm { width: 220px; }

/* Stacked double-mockup for features with two screenshots */
.phone-stack {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 380px;
}
.phone-stack .phone-mockup:first-child {
  position: relative;
  z-index: 2;
  margin-right: -60px;
  margin-top: 40px;
}
.phone-stack .phone-mockup:last-child {
  position: relative;
  z-index: 1;
  margin-left: -60px;
  margin-top: -40px;
  opacity: 0.9;
}

/* ---------- Stats bar ---------- */
.stats {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}
.stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 2.75rem);
  background: var(--grad-hero);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 6px;
}

/* ---------- Section headers ---------- */
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-tag {
  display: inline-block;
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 14px; }
.section-head p { color: var(--text-secondary); font-size: 1.05rem; }

.section-pad { padding: 100px 0; }

/* ---------- Features (zig-zag) ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
  padding: 56px 0;
}
.feature-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.feature-row .feature-visual { display: flex; justify-content: center; }
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--grad-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feature-icon svg { width: 26px; height: 26px; color: #fff; }
.feature-text h3 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 14px; }
.feature-text p { color: var(--text-secondary); font-size: 1.02rem; margin-bottom: 20px; }
.feature-list { display: flex; flex-direction: column; gap: 10px; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
}
.feature-list li svg { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; margin-top: 3px; }

@media (min-width: 1024px) {
  .feature-row { grid-template-columns: 1fr 1fr; gap: 64px; }
  .feature-row.reverse .feature-text { order: 2; }
  .feature-row.reverse .feature-visual { order: 1; }
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  position: relative;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--grad-hero);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 20px;
}
.step-card h3 { font-size: 1.25rem; margin-bottom: 10px; }
.step-card p { color: var(--text-secondary); font-size: 0.95rem; }

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

/* ---------- Testimonials ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.testimonial-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px;
}
.testimonial-stars { color: var(--warning); font-size: 1.1rem; margin-bottom: 16px; letter-spacing: 2px; }
.testimonial-quote { color: var(--text-secondary); font-size: 1rem; margin-bottom: 22px; line-height: 1.7; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--grad-purple);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  flex-shrink: 0;
}
.testimonial-name { font-weight: 700; font-size: 0.9rem; }
.testimonial-role { color: var(--text-tertiary); font-size: 0.8rem; }

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

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-align: left;
}
.faq-question .plus {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: transform 0.3s ease, background 0.3s ease;
}
.faq-question .plus::before, .faq-question .plus::after {
  content: '';
  position: absolute;
  background: var(--text-secondary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.faq-question .plus::before { width: 12px; height: 2px; }
.faq-question .plus::after { width: 2px; height: 12px; }
.faq-item.open .faq-question .plus { background: var(--grad-hero); transform: rotate(45deg); }
.faq-item.open .faq-question .plus::before,
.faq-item.open .faq-question .plus::after { background: #fff; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 26px;
}
.faq-answer p { color: var(--text-secondary); padding-bottom: 22px; font-size: 0.95rem; line-height: 1.7; }
.faq-item.open .faq-answer { max-height: 300px; }

/* ---------- Final CTA ---------- */
.cta-banner {
  background: var(--grad-hero);
  border-radius: 28px;
  padding: 64px 32px;
  text-align: center;
  overflow: hidden;
  position: relative;
}
.cta-banner h2 {
  font-size: clamp(1.8rem, 5vw, 2.75rem);
  margin-bottom: 16px;
}
.cta-banner p {
  color: rgba(255,255,255,0.9);
  max-width: 500px;
  margin: 0 auto 36px;
  font-size: 1.05rem;
}
.cta-banner .store-badges { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { padding: 72px 0 32px; border-top: 1px solid var(--border); }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand p { color: var(--text-secondary); font-size: 0.95rem; max-width: 280px; }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 18px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: var(--text-secondary); font-size: 0.95rem; font-weight: 600; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--text-primary); }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.footer-social a:hover { border-color: var(--accent); color: var(--accent); }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

/* ---------- Static legal pages (privacy-policy.html / terms.html) ---------- */
.legal-page { padding: 140px 0 100px; max-width: 760px; margin: 0 auto; }
.legal-page h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 10px; }
.legal-page .updated { color: var(--text-tertiary); font-size: 0.9rem; margin-bottom: 40px; }
.legal-page h2 { font-size: 1.3rem; margin: 36px 0 14px; }
.legal-page p, .legal-page li { color: var(--text-secondary); font-size: 0.98rem; margin-bottom: 14px; }
.legal-page ul { padding-left: 22px; list-style: disc; }
.legal-page a.back-link { color: var(--accent); font-weight: 700; display: inline-block; margin-bottom: 32px; }

/* ---------- Responsive tweaks ---------- */
@media (min-width: 640px) {
  .hero-ctas { flex-wrap: nowrap; }
}
@media (min-width: 1280px) {
  .container { padding-inline: 40px; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-glow { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
