/* ============================================
   9toFree — Styles
   ============================================ */

:root {
  --color-bg: #faf8f5;
  --color-surface: #ffffff;
  --color-dark: #1a1a2e;
  --color-text: #2d2d3a;
  --color-muted: #6b6b7b;
  --color-accent: #e85d26;
  --color-accent-hover: #d14e1a;
  --color-accent-light: #fff0ea;
  --color-warm: #f5e6d3;
  --color-border: #e8e6e3;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 2px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.1);
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

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

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(232, 93, 38, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--color-dark);
  border-color: var(--color-dark);
}

.btn-outline:hover {
  background: var(--color-dark);
  color: #fff;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--color-dark);
  color: #fff;
  border-color: var(--color-dark);
}

.btn-secondary:hover {
  background: transparent;
  color: var(--color-dark);
  transform: translateY(-2px);
}

.btn-nav {
  padding: 10px 24px;
  font-size: 0.875rem;
}

.btn-large {
  padding: 18px 40px;
  font-size: 1.05rem;
}

/* ---- Navbar ---- */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.3s ease;
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  border-bottom-color: var(--color-border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--color-dark);
  letter-spacing: -0.5px;
}

.logo span {
  color: var(--color-accent);
}

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

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: color 0.2s;
}

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

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

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: 0.3s;
}

/* ---- Hero ---- */

.hero {
  position: relative;
  padding: 180px 0 100px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 20%, rgba(232,93,38,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(232,93,38,0.05) 0%, transparent 50%);
}

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

.hero-tag {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-accent);
  margin-bottom: 24px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.05;
  color: var(--color-dark);
  margin-bottom: 28px;
}

.highlight {
  color: var(--color-accent);
  position: relative;
}

.hero-sub {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--color-muted);
  max-width: 600px;
  margin-bottom: 40px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 72px;
}

.hero-stats {
  display: flex;
  gap: 56px;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-dark);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-weight: 500;
}

/* ---- Manifesto ---- */

.manifesto {
  padding: 100px 0;
}

.manifesto-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.manifesto h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--color-dark);
  line-height: 1.3;
  margin-bottom: 24px;
}

.manifesto p {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--color-muted);
}

/* ---- Section Headers ---- */

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header.light {
  color: #fff;
}

.section-header.light .section-tag {
  color: rgba(255,255,255,0.7);
}

.section-header.light h2 {
  color: #fff;
}

.section-tag {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--color-dark);
}

/* ---- Stories ---- */

.stories {
  padding: 100px 0;
  background: var(--color-surface);
}

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

.story-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.story-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.story-card.featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
}

.story-image {
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

.story-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--color-dark);
}

.story-body {
  padding: 32px;
}

.story-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-accent);
  margin-bottom: 12px;
}

.story-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-dark);
  margin-bottom: 12px;
}

.story-card.featured h3 {
  font-size: 1.4rem;
}

.story-card p {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.story-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.story-author {
  font-weight: 600;
  color: var(--color-dark);
}

.stories-cta {
  text-align: center;
  margin-top: 48px;
}

/* ---- Paths ---- */

.paths {
  padding: 100px 0;
}

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

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

.path-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.path-icon {
  width: 48px;
  height: 48px;
  color: var(--color-accent);
  margin-bottom: 20px;
}

.path-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 10px;
}

.path-card p {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.path-stat {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
}

/* ---- Timeline ---- */

.timeline {
  padding: 100px 0;
  background: var(--color-surface);
}

.timeline-steps {
  display: flex;
  gap: 32px;
  position: relative;
}

.timeline-steps::before {
  content: '';
  position: absolute;
  top: 42px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-border);
}

.timeline-step {
  flex: 1;
  position: relative;
  text-align: center;
  padding-top: 72px;
}

.step-number {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.timeline-step h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 8px;
}

.timeline-step p {
  font-size: 0.85rem;
  color: var(--color-muted);
  line-height: 1.7;
}

/* ---- Resources ---- */

.resources {
  padding: 100px 0;
}

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

.resource-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  transition: border-color 0.3s ease;
}

.resource-card:hover {
  border-color: var(--color-accent);
}

.resource-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 10px;
}

.resource-card p {
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.resource-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-accent);
  transition: gap 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.resource-link:hover {
  gap: 8px;
}

/* ---- Community ---- */

.community {
  padding: 100px 0;
  background: var(--color-dark);
}

.community-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.community-feature {
  padding: 40px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.3s;
}

.community-feature:hover {
  background: rgba(255,255,255,0.08);
}

.community-feature h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.community-feature p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
}

/* ---- Join ---- */

.join {
  padding: 100px 0;
  background: var(--color-accent-light);
}

.join-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.join-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--color-dark);
  margin-bottom: 16px;
}

.join-inner > p {
  font-size: 1.05rem;
  color: var(--color-muted);
  margin-bottom: 40px;
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.join-form input,
.join-form select {
  flex: 1;
  padding: 16px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--color-surface);
  color: var(--color-dark);
  transition: border-color 0.2s;
  appearance: none;
}

.join-form input:focus,
.join-form select:focus {
  outline: none;
  border-color: var(--color-accent);
}

.join-form select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%236b6b7b' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-note {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 8px;
}

/* ---- Testimonials ---- */

.testimonials {
  padding: 100px 0;
  background: var(--color-surface);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.testimonial {
  padding: 36px;
  border-radius: var(--radius-lg);
  background: var(--color-bg);
  border: none;
}

.testimonial p {
  font-size: 1rem;
  font-style: italic;
  line-height: 1.8;
  color: var(--color-dark);
  margin-bottom: 20px;
}

.testimonial cite {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-style: normal;
  font-weight: 500;
}

/* ---- Footer ---- */

.footer {
  padding: 80px 0 40px;
  background: var(--color-dark);
  color: rgba(255,255,255,0.6);
}

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

.footer-brand p {
  margin-top: 12px;
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-brand .logo {
  color: #fff;
}

.footer-links h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
}

/* ---- Responsive ---- */

@media (max-width: 968px) {
  .stories-grid {
    grid-template-columns: 1fr;
  }

  .story-card.featured {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }

  .paths-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline-steps {
    flex-direction: column;
    gap: 0;
  }

  .timeline-steps::before {
    top: 0;
    bottom: 0;
    left: 24px;
    right: auto;
    width: 2px;
    height: auto;
  }

  .timeline-step {
    padding: 0 0 40px 72px;
    text-align: left;
  }

  .step-number {
    left: 0;
    transform: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .testimonial-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 140px 0 80px;
  }

  .hero-stats {
    gap: 32px;
  }

  .paths-grid {
    grid-template-columns: 1fr;
  }

  .community-features {
    grid-template-columns: 1fr;
  }

  .resources-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ---- Animations ---- */

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

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
