/* ============================================================
   StepByStory Landing — styles.css
   Premium, modern landing page
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');

/* ---------- Custom Properties ---------- */
:root {
  /* Palette — warm coral + deep indigo */
  --bg:                #0b0b1a;
  --bg-gradient-start:  #0e0e20;
  --bg-gradient-end:    #161630;
  --surface:           #15152a;
  --surface-light:     #1e1e3a;
  --surface-hover:     #252548;

  --accent:            #f97066;   /* coral */
  --accent-light:      #fca5a0;
  --accent-dark:       #e05650;
  --accent-glow:       rgba(249, 112, 102, 0.30);

  --purple:            #a78bfa;
  --purple-light:      #c4b5fd;
  --purple-glow:       rgba(167, 139, 250, 0.25);

  --gold:              #fbbf24;
  --green:             #34d399;

  --text-primary:      #f1f3f9;
  --text-secondary:    #9b9ec4;
  --text-muted:        #656896;
  --text-on-accent:    #ffffff;

  --border:            rgba(255, 255, 255, 0.06);
  --border-light:      rgba(255, 255, 255, 0.10);

  /* Typography */
  --font-body:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;

  /* Layout */
  --max-width: 1200px;
  --section-py: 100px;

  /* Transitions */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* ---------- Utility ---------- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.section-label::before {
  content: ''; width: 30px; height: 2px; background: var(--accent); border-radius: 2px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.2;
  margin-bottom: 20px;
}
.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%;
  z-index: 100;
  padding: 18px 0;
  transition: background 0.4s, box-shadow 0.4s, padding 0.4s;
}
.navbar.scrolled {
  background: rgba(11, 11, 26, 0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 30px rgba(0,0,0,0.3);
  padding: 12px 0;
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.3rem; font-weight: 800;
  color: var(--text-primary);
}
.nav-brand span { font-size: 1.5rem; }
.nav-links {
  display: flex; align-items: center; gap: 32px;
}
.nav-links a {
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content:''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  background: var(--accent) !important;
  color: var(--text-on-accent) !important;
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column; gap: 5px; width: 28px;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--text-primary);
  border-radius: 4px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 100px;
  position: relative;
  overflow: hidden;
}
/* Animated gradient bg */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 40%, rgba(249,112,102,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 30%, rgba(167,139,250,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 50% 80% at 50% 90%, rgba(52,211,153,0.05) 0%, transparent 50%);
  animation: heroGlow 8s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0.6; transform: scale(1.05); }
}
/* Floating orbs */
.hero-orb {
  position: absolute; border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero-orb-1 {
  width: 400px; height: 400px;
  background: var(--accent-glow);
  top: 10%; left: -5%;
  animation: float1 12s ease-in-out infinite;
}
.hero-orb-2 {
  width: 300px; height: 300px;
  background: var(--purple-glow);
  bottom: 10%; right: -5%;
  animation: float2 10s ease-in-out infinite;
}
@keyframes float1 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(40px, -30px); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-30px, 20px); }
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative; z-index: 1;
}
.hero-content { max-width: 560px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface-light);
  border: 1px solid var(--border-light);
  border-radius: 100px;
  padding: 6px 16px 6px 8px;
  font-size: 0.82rem; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  line-height: 1.1;
  margin-bottom: 24px;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 50%, var(--accent-light) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 6s ease infinite;
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.8;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff; font-weight: 700; font-size: 1rem;
  padding: 16px 36px; border-radius: 14px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px var(--accent-glow);
}
.btn-secondary {
  background: var(--surface-light);
  border: 1px solid var(--border-light);
  color: var(--text-primary); font-weight: 600; font-size: 1rem;
  padding: 16px 36px; border-radius: 14px;
  transition: background 0.3s, transform 0.3s var(--ease);
}
.btn-secondary:hover {
  background: var(--surface-hover);
  transform: translateY(-2px);
}
.hero-image {
  display: flex; justify-content: center;
  position: relative;
}
.hero-image img {
  width: 100%; max-width: 420px;
  border-radius: 24px;
  animation: heroFloat 6s ease-in-out infinite;
}
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-16px); }
}
/* Stats row below hero */
.hero-stats {
  display: flex; gap: 40px; margin-top: 48px;
}
.hero-stat strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-light), var(--purple-light));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-stat span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------- FEATURES ---------- */
.features { padding: var(--section-py) 0; }
.features-header { text-align: center; margin-bottom: 64px; }
.features-header .section-subtitle { margin: 0 auto; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 28px;
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content:'';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  opacity: 0;
  transition: opacity 0.4s;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-light);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}
.feature-icon.coral   { background: rgba(249,112,102,0.12); }
.feature-icon.purple  { background: rgba(167,139,250,0.12); }
.feature-icon.green   { background: rgba(52,211,153,0.12); }
.feature-icon.gold    { background: rgba(251,191,36,0.12); }

.feature-card h3 {
  font-size: 1.15rem; font-weight: 700;
  margin-bottom: 10px;
}
.feature-card p {
  font-size: 0.95rem; color: var(--text-secondary);
  line-height: 1.65;
}

/* ---------- SHOWCASE (How it works) ---------- */
.showcase {
  padding: var(--section-py) 0;
  position: relative;
}
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.showcase-image img {
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
}
.showcase-steps { display: flex; flex-direction: column; gap: 32px; }
.step {
  display: flex; gap: 20px; align-items: flex-start;
}
.step-number {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800;
  color: var(--text-on-accent);
  background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%);
}
.step h3 {
  font-size: 1.1rem; font-weight: 700;
  margin-bottom: 6px;
}
.step p {
  font-size: 0.95rem; color: var(--text-secondary);
  line-height: 1.65;
}

/* ---------- FREE BOOK BANNER ---------- */
.free-book {
  padding: var(--section-py) 0;
}
.free-book-card {
  background: linear-gradient(135deg, var(--surface-light), var(--surface));
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 56px;
  display: flex;
  align-items: center;
  gap: 48px;
  position: relative;
  overflow: hidden;
}
.free-book-card::before {
  content:'';
  position: absolute; top: -50%; right: -20%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(251,191,36,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.free-book-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(251,191,36,0.15);
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 0.82rem; font-weight: 700;
  color: var(--gold);
  margin-bottom: 16px;
}
.free-book-content { flex: 1; position: relative; z-index: 1; }
.free-book-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 12px;
}
.free-book-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 28px;
  line-height: 1.7;
}
.free-book-illustration {
  flex-shrink: 0;
  width: 260px;
  position: relative; z-index: 1;
}
.free-book-illustration img {
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

/* ---------- PRICING ---------- */
.pricing { padding: var(--section-py) 0; }
.pricing-header { text-align: center; margin-bottom: 64px; }
.pricing-header .section-subtitle { margin: 0 auto; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 960px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 30px;
  text-align: center;
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
  position: relative;
}
.pricing-card:hover {
  transform: translateY(-6px);
}
.pricing-card.popular {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(249,112,102,0.06) 0%, var(--surface) 40%);
  box-shadow: 0 0 60px var(--accent-glow);
}
.popular-badge {
  position: absolute;
  top: -14px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff; font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding: 6px 20px; border-radius: 100px;
}
.pricing-card h3 {
  font-size: 1.1rem; font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.pricing-price {
  font-size: 2.8rem; font-weight: 800;
  margin-bottom: 4px;
}
.pricing-price span {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
}
.pricing-period {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}
.pricing-features {
  text-align: left;
  margin-bottom: 32px;
}
.pricing-features li {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.92rem; color: var(--text-secondary);
  padding: 8px 0;
}
.pricing-features li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
}
.pricing-btn {
  display: block; width: 100%;
  padding: 14px 0; border-radius: 12px;
  font-weight: 700; font-size: 0.95rem;
  text-align: center;
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.pricing-btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.pricing-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}
.pricing-btn.secondary {
  background: var(--surface-hover);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}
.pricing-btn.secondary:hover {
  transform: translateY(-2px);
  background: var(--surface-light);
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand h4 {
  font-size: 1.2rem; font-weight: 800;
  margin-bottom: 12px;
}
.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 340px;
}
.footer-col h5 {
  font-size: 0.85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 0.92rem;
  color: var(--text-secondary);
  padding: 5px 0;
  transition: color 0.3s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom p {
  font-size: 0.82rem; color: var(--text-muted);
}
.footer-socials {
  display: flex; gap: 16px;
}
.footer-socials a {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: background 0.3s, transform 0.3s var(--ease);
}
.footer-socials a:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 968px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-content { max-width: 100%; }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-image { margin-top: 40px; }
  .hero-image img { max-width: 320px; }
  .showcase-grid { grid-template-columns: 1fr; }
  .showcase-image { order: -1; }
  .showcase-image img { max-width: 400px; margin: 0 auto; }
  .free-book-card { flex-direction: column; text-align: center; padding: 40px 28px; }
  .free-book-illustration { width: 200px; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --section-py: 72px; }

  .nav-links { 
    display: none;
    position: absolute; top: 100%; left: 0; width: 100%;
    flex-direction: column; gap: 0;
    background: rgba(11, 11, 26, 0.97);
    backdrop-filter: blur(20px);
    padding: 16px 0;
    border-top: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    display: block; padding: 14px 24px; width: 100%;
  }
  .nav-links a::after { display: none; }
  .nav-cta {
    margin: 8px 24px; text-align: center;
    display: block !important;
  }
  .nav-toggle { display: flex; }

  .hero h1 { font-size: 2.2rem; }
  .hero-stats { flex-wrap: wrap; gap: 24px; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}
