/* ==========================================================================
   Sparkify — Design System
   ========================================================================== */

:root {
  /* Brand — emerald green from the Sparkify "S" logo mark */
  --c-violet: #059669;
  --c-indigo: #10B981;
  --c-blue: #14B8A6;
  --c-amber: #F59E0B;
  --c-amber-light: #FEF3C7;
  --gradient-brand: linear-gradient(135deg, #10B981 0%, #059669 55%, #047857 100%);
  --gradient-brand-soft: linear-gradient(135deg, rgba(16,185,129,0.10) 0%, rgba(20,184,166,0.10) 100%);

  /* Neutrals */
  --c-ink: #0F172A;
  --c-body: #334155;
  --c-muted: #64748B;
  --c-border: #E2E8F0;
  --c-surface: #FFFFFF;
  --c-surface-alt: #F8FAFC;
  --c-surface-dark: #0F172A;

  /* Type */
  --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.06);
  --shadow-md: 0 8px 24px rgba(15,23,42,0.08);
  --shadow-lg: 0 24px 48px -12px rgba(5,150,105,0.20);

  --container: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--c-body);
  background: var(--c-surface);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--c-ink);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h3 { font-size: 1.2rem; }

p { color: var(--c-body); }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

ul { list-style: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 96px 0; }
.section-alt { background: var(--c-surface-alt); }

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-violet);
  background: var(--gradient-brand-soft);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.section-header {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-header p {
  color: var(--c-muted);
  font-size: 1.05rem;
  margin-top: 14px;
}

.section-header.align-left {
  margin: 0 0 48px;
  text-align: left;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-lg);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 28px 48px -14px rgba(5,150,105,0.28); }

.btn-secondary {
  background: var(--c-surface);
  color: var(--c-ink);
  border: 1.5px solid var(--c-border);
}
.btn-secondary:hover { border-color: var(--c-indigo); color: var(--c-indigo); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--c-ink);
  padding: 10px 18px;
}
.btn-ghost:hover { color: var(--c-indigo); }

.btn-block { width: 100%; }
.btn-lg { padding: 16px 32px; font-size: 1.02rem; }

/* ==========================================================================
   Header / Nav
   ========================================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  transition: box-shadow 0.2s ease;
}

nav {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 36px;
  width: auto;
}

.logo h1 {
  font-size: 1.45rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--c-body);
  position: relative;
}

.nav-links a:hover { color: var(--c-ink); }

.nav-links a.download-btn,
a.download-btn {
  background: var(--gradient-brand);
  color: #fff !important;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
}
.nav-links a.download-btn:hover { transform: translateY(-2px); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger-line {
  width: 24px;
  height: 2.5px;
  background: var(--c-ink);
  border-radius: 2px;
  transition: all 0.25s ease;
}

.hamburger.active .hamburger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger.active .hamburger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: 110px 24px 100px;
  text-align: center;
  overflow: hidden;
  background: var(--c-surface);
}

.hero::before {
  content: '';
  position: absolute;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(closest-side, rgba(16,185,129,0.18), rgba(16,185,129,0.08), transparent);
  filter: blur(10px);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

.hero-content h1 { margin-bottom: 22px; }
.hero-content h1 .grad {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content > p {
  font-size: 1.18rem;
  color: var(--c-muted);
  max-width: 580px;
  margin: 0 auto 36px;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.hero-stats .stat { text-align: center; }
.hero-stats .stat .num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
}
.hero-stats .stat .label { color: var(--c-muted); font-size: 0.88rem; font-weight: 600; }

/* ==========================================================================
   Page hero (sub-pages, non-home)
   ========================================================================== */
.page-hero {
  text-align: center;
  padding: 88px 24px 64px;
  background: var(--gradient-brand-soft);
  border-bottom: 1px solid var(--c-border);
}
.page-hero h1 { margin-bottom: 14px; }
.page-hero p { color: var(--c-muted); font-size: 1.1rem; max-width: 560px; margin: 0 auto; }

/* ==========================================================================
   Feature grid / cards
   ========================================================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 20px;
}

.feature-card h3 { margin-bottom: 10px; }
.feature-card p { color: var(--c-muted); font-size: 0.96rem; }

/* ==========================================================================
   How it works / steps
   ========================================================================== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}

.step {
  text-align: center;
  padding: 0 12px;
}

.step .step-num {
  width: 48px;
  height: 48px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-display);
}

.step h3 { margin-bottom: 8px; }
.step p { color: var(--c-muted); font-size: 0.95rem; }

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.testimonial-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.testimonial-card .stars { color: var(--c-amber); margin-bottom: 14px; font-size: 0.9rem; }
.testimonial-card p.quote { color: var(--c-body); font-size: 0.98rem; margin-bottom: 22px; }

.testimonial-person { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.testimonial-person .name { font-weight: 700; color: var(--c-ink); font-size: 0.92rem; }
.testimonial-person .role { color: var(--c-muted); font-size: 0.82rem; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
  background: var(--gradient-brand);
  border-radius: var(--radius-lg);
  padding: 64px 48px;
  text-align: center;
  color: #fff;
  margin: 0 24px;
  position: relative;
  overflow: hidden;
}

.cta-band h2 { color: #fff; margin-bottom: 14px; }
.cta-band p { color: rgba(255,255,255,0.85); max-width: 480px; margin: 0 auto 32px; }
.cta-band .btn-primary { background: #fff; color: var(--c-indigo); box-shadow: none; }
.cta-band .btn-primary:hover { background: #fff; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,0.18); }
.cta-band .btn-secondary { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.3); }
.cta-band .btn-secondary:hover { background: rgba(255,255,255,0.2); border-color: #fff; color: #fff; }

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  background: var(--c-surface-dark);
  color: #CBD5E1;
  padding: 72px 0 32px;
}

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

.footer-brand h3 {
  color: #fff;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 14px;
}
.footer-brand p { color: #94A3B8; font-size: 0.92rem; max-width: 280px; }

.footer-col h4 { color: #fff; font-size: 0.92rem; margin-bottom: 18px; letter-spacing: 0.02em; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col a { color: #94A3B8; font-size: 0.92rem; transition: color 0.15s ease; }
.footer-col a:hover { color: #fff; }

.footer-social { display: flex; gap: 12px; margin-top: 20px; }
.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #CBD5E1;
}
.footer-social a:hover { background: var(--gradient-brand); color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: #64748B;
}

/* ==========================================================================
   About page specifics
   ========================================================================== */
.about-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.about-story .visual {
  border-radius: var(--radius-lg);
  background: var(--gradient-brand);
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 4rem;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.value-card { text-align: center; }
.value-card .feature-icon { margin: 0 auto 18px; }

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.team-card { text-align: center; }
.team-card .avatar { width: 92px; height: 92px; font-size: 1.8rem; margin: 0 auto 16px; }
.team-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.team-card .role { color: var(--c-violet); font-size: 0.85rem; font-weight: 600; }

/* ==========================================================================
   Features page specifics — tabs
   ========================================================================== */
.tabs-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.tab-btn {
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--c-border);
  background: var(--c-surface);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--c-body);
  cursor: pointer;
  transition: all 0.18s ease;
}

.tab-btn.active {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.tab-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.tab-panel .visual {
  border-radius: var(--radius-lg);
  background: var(--gradient-brand-soft);
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: var(--c-indigo);
  border: 1px solid var(--c-border);
}

.tab-panel ul { margin-top: 20px; }
.tab-panel ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  color: var(--c-body);
  font-size: 0.96rem;
}
.tab-panel ul li i { color: var(--c-indigo); margin-top: 3px; }

.compare-table-wrap { overflow-x: auto; }
table.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--c-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
table.compare-table th, table.compare-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
  font-size: 0.92rem;
}
table.compare-table thead th {
  background: var(--c-surface-alt);
  color: var(--c-ink);
  font-weight: 700;
}
table.compare-table td i.fa-check { color: #16A34A; }
table.compare-table td i.fa-xmark, table.compare-table td i.fa-times { color: #CBD5E1; }

/* ==========================================================================
   Contact page specifics
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
}

.contact-info-card {
  display: flex;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.contact-info-card .feature-icon { width: 44px; height: 44px; font-size: 1rem; flex-shrink: 0; margin-bottom: 0; }
.contact-info-card h3 { font-size: 1rem; margin-bottom: 4px; }
.contact-info-card p { color: var(--c-muted); font-size: 0.9rem; }

.contact-form {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--c-ink);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--c-ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--c-indigo);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.14);
}

.form-group textarea { resize: vertical; min-height: 130px; }

.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  overflow: hidden;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 700;
  color: var(--c-ink);
  font-size: 0.98rem;
}
.faq-question i { color: var(--c-violet); transition: transform 0.25s ease; }
.faq-item.active .faq-question i { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 24px;
}
.faq-item.active .faq-answer { max-height: 240px; padding: 0 24px 22px; }
.faq-answer p { color: var(--c-muted); font-size: 0.92rem; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 992px) {
  .feature-grid, .steps, .testimonials-grid, .values-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .about-story, .tab-panel, .contact-grid { grid-template-columns: 1fr; }
  .about-story .visual { order: -1; min-height: 240px; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    box-shadow: var(--shadow-md);
  }

  .nav-links.active { max-height: 420px; }
  .nav-links a { padding: 14px 24px; border-bottom: 1px solid var(--c-border); }
  .nav-links a.download-btn { margin: 12px 24px; text-align: center; }

  .section { padding: 64px 0; }
  .feature-grid, .steps, .testimonials-grid, .values-grid, .team-grid, .form-row { grid-template-columns: 1fr; }
  .cta-band { margin: 0 16px; padding: 48px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-stats { gap: 32px; }
}
