/* ========================================
   FlintReady Design System
   Dark theme with ember accents
   ======================================== */

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

:root {
  --stone-50: #ffffff;
  --stone-100: #e8e8e8;
  --stone-200: #d0d0d0;
  --stone-300: #b0b0b0;
  --stone-400: #909090;
  --stone-500: #707070;
  --stone-600: #505050;
  --stone-700: #3a3a3a;
  --stone-800: #2a3142;
  --stone-900: #1f2533;
  --stone-950: #1a1f2e;
  --ember: #FF6B35;
  --ember-light: #FF8C55;
  --ember-glow: #FFB380;
  --forest: #D4A574;
  --forest-light: #E8B898;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--stone-950);
  color: var(--stone-200);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.15;
}

a { color: var(--ember-light); text-decoration: none; }
a:hover { color: var(--ember-glow); }

.ember { color: var(--ember); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 2rem; }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 2rem; }

/* ---- NAVIGATION ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 10, 9, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--stone-900);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--stone-50) !important;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.85rem;
  color: var(--stone-400);
  transition: color 0.15s;
  font-weight: 500;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--stone-400);
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--stone-950);
    border-bottom: 1px solid var(--stone-800);
    flex-direction: column;
    padding: 1rem 2rem;
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 0; border-bottom: 1px solid var(--stone-900); }
  .nav-links a:last-child { border-bottom: none; }
  .nav-toggle { display: block; }
}

/* ---- PAGE HERO ---- */
.page-hero {
  padding: 6rem 2rem 4rem;
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(194, 65, 12, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(54, 83, 20, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.page-hero-inner {
  max-width: 700px;
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--stone-50);
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.page-hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--stone-400);
  max-width: 560px;
}

.track-hero-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ---- BREADCRUMB ---- */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--stone-500);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--stone-400); }
.breadcrumb a:hover { color: var(--ember-light); }
.breadcrumb span { margin: 0 0.5rem; color: var(--stone-700); }

/* ---- TRACKS GRID ---- */
.tracks-section {
  padding: 0 0 4rem;
}

.tracks-section h2,
.featured-section h2,
.guides-section h2 {
  font-size: 1.5rem;
  color: var(--stone-50);
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

.tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  background: var(--stone-800);
  border: 1px solid var(--stone-800);
  border-radius: 12px;
  overflow: hidden;
}

.track-card {
  background: var(--stone-950);
  padding: 2rem;
  display: block;
  position: relative;
  transition: background 0.2s;
}

.track-card:hover {
  background: var(--stone-900);
}

.track-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--ember);
  transition: height 0.3s ease;
}

.track-card:hover::before {
  height: 100%;
}

.track-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.75rem;
}

.track-card h3 {
  font-size: 1.1rem;
  color: var(--stone-50);
  margin-bottom: 0.5rem;
}

.track-card p {
  font-size: 0.9rem;
  color: var(--stone-500);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.track-count {
  font-size: 0.8rem;
  color: var(--ember-light);
  font-weight: 500;
}

/* ---- GUIDES GRID ---- */
.featured-section,
.guides-section {
  padding: 3rem 0 4rem;
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.guide-card {
  background: var(--stone-900);
  border: 1px solid var(--stone-800);
  border-radius: 10px;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: border-color 0.2s, transform 0.2s;
}

.guide-card:hover {
  border-color: var(--stone-700);
  transform: translateY(-2px);
}

.guide-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.guide-badge {
  background: var(--ember);
  color: var(--stone-50);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.guide-card h3 {
  font-size: 1.1rem;
  color: var(--stone-50);
  line-height: 1.3;
}

.guide-card p {
  font-size: 0.9rem;
  color: var(--stone-500);
  line-height: 1.5;
  flex: 1;
}

.guide-card-meta {
  display: flex;
  gap: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--stone-800);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--stone-500);
}

.meta-item svg { opacity: 0.6; }

/* ---- DIFFICULTY ---- */
.difficulty {
  font-size: 0.85rem;
  color: var(--ember-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.difficulty-label {
  font-size: 0.75rem;
  color: var(--stone-500);
  font-family: 'DM Sans', sans-serif;
}

/* ---- GUIDE ARTICLE ---- */
.guide-article {
  padding: 5rem 0 4rem;
}

.guide-header {
  margin-bottom: 3rem;
}

.guide-header-meta {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.meta-time,
.meta-budget {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--stone-400);
}

.meta-time svg, .meta-budget svg { opacity: 0.6; }

.guide-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--stone-50);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.guide-description {
  font-size: 1.1rem;
  color: var(--stone-400);
  max-width: 600px;
}

/* ---- MATERIALS LIST ---- */
.guide-materials {
  margin-bottom: 3rem;
  padding: 2rem;
  background: var(--stone-900);
  border: 1px solid var(--stone-800);
  border-radius: 10px;
}

.guide-materials h2 {
  font-size: 1.2rem;
  color: var(--stone-50);
  margin-bottom: 1.25rem;
}

.materials-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.75rem;
}

.materials-list li {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--stone-800);
}

.materials-list li::before {
  content: '\2022';
  color: var(--ember);
  font-weight: bold;
  flex-shrink: 0;
}

.material-name {
  color: var(--stone-200);
  font-size: 0.95rem;
}

.material-note {
  font-size: 0.8rem;
  color: var(--stone-500);
  font-style: italic;
}

.material-optional {
  font-size: 0.7rem;
  background: var(--stone-800);
  color: var(--stone-400);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  margin-left: auto;
}

/* ---- AFFILIATE LINKS ---- */
.affiliate-link {
  color: var(--stone-200);
  text-decoration: none;
  border-bottom: 1px solid var(--ember);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.affiliate-link:hover {
  color: var(--ember-light);
  border-bottom-color: var(--ember-light);
}

.affiliate-icon {
  opacity: 0.55;
  flex-shrink: 0;
  position: relative;
  top: -1px;
  transition: opacity 0.15s;
}

.affiliate-link:hover .affiliate-icon {
  opacity: 0.9;
}

.affiliate-disclosure {
  font-size: 0.78rem;
  color: var(--stone-500);
  font-style: italic;
  margin-bottom: 1rem;
  padding: 0.5rem 0.75rem;
  border-left: 2px solid var(--stone-700);
}

/* ---- STEPS ---- */
.guide-steps {
  margin-bottom: 3rem;
}

.guide-steps h2 {
  font-size: 1.5rem;
  color: var(--stone-50);
  margin-bottom: 2rem;
}

.steps-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.step-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.step-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--stone-800);
  min-width: 3rem;
  line-height: 1;
  padding-top: 0.2rem;
}

.step-content {
  flex: 1;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--stone-900);
}

.step-item:last-child .step-content { border-bottom: none; }

.step-content h3 {
  font-size: 1.05rem;
  color: var(--stone-100);
  margin-bottom: 0.5rem;
}

.step-content p {
  font-size: 0.95rem;
  color: var(--stone-400);
  line-height: 1.7;
}

.step-warning {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 107, 53, 0.1);
  border-left: 3px solid var(--ember);
  border-radius: 0 6px 6px 0;
  font-size: 0.9rem;
  color: var(--ember-glow);
}

/* ---- TIPS ---- */
.guide-tips {
  margin-bottom: 3rem;
  padding: 2rem;
  background: rgba(212, 165, 116, 0.08);
  border: 1px solid rgba(212, 165, 116, 0.2);
  border-radius: 10px;
}

.guide-tips h2 {
  font-size: 1.2rem;
  color: var(--forest-light);
  margin-bottom: 1.25rem;
}

.tips-list {
  list-style: none;
}

.tips-list li {
  padding: 0.5rem 0;
  padding-left: 1.25rem;
  position: relative;
  font-size: 0.95rem;
  color: var(--stone-300);
}

.tips-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--forest-light);
  font-weight: bold;
}

/* ---- GUIDE NAV ---- */
.guide-nav {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--stone-800);
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--stone-400);
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--stone-800);
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-back:hover {
  color: var(--stone-100);
  border-color: var(--stone-600);
  background: var(--stone-900);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--stone-50);
  padding: 0.75rem 1.5rem;
  background: var(--ember);
  border: none;
  border-radius: 8px;
  transition: background 0.2s;
  cursor: pointer;
}

.btn-primary:hover { background: var(--ember-light); color: var(--stone-50); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--stone-300);
  padding: 0.6rem 1.2rem;
  background: var(--stone-900);
  border: 1px solid var(--stone-700);
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--stone-800);
  border-color: var(--stone-600);
  color: var(--stone-50);
}

/* Standalone lead magnet badge (outside .newsletter-cta) */
.lead-magnet-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ember);
  background: rgba(194, 65, 12, 0.12);
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  border: 1px solid rgba(194, 65, 12, 0.25);
}

/* Download link inside newsletter success */
.btn-download-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ember);
  color: var(--stone-50) !important;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-download-inline:hover { background: var(--ember-light); color: var(--stone-50) !important; }

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--stone-500);
  font-size: 1.1rem;
}

/* ---- FOOTER ---- */
.site-footer {
  border-top: 1px solid var(--stone-900);
  padding: 4rem 2rem 0;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  padding-bottom: 3rem;
}

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

.footer-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--stone-50);
  display: block;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--stone-500);
}

.footer-links {
  display: flex;
  gap: 4rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--stone-400);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.footer-col a {
  font-size: 0.85rem;
  color: var(--stone-500);
  transition: color 0.15s;
}

.footer-col a:hover { color: var(--stone-200); }

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 0;
  border-top: 1px solid var(--stone-900);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--stone-600);
}

.footer-bottom a {
  color: var(--stone-500);
}

/* ---- NEWSLETTER SIGNUP (Guide Pages) ---- */
.newsletter-cta {
  margin: 3rem 0 2rem;
  padding: 2.5rem;
  background: var(--stone-900);
  border: 1px solid var(--stone-800);
  border-radius: 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.newsletter-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 60% at 50% 100%, rgba(194, 65, 12, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.newsletter-cta-inner {
  position: relative;
  z-index: 1;
}

.newsletter-cta .lead-magnet-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  background: rgba(194, 65, 12, 0.1);
  border: 1px solid rgba(194, 65, 12, 0.25);
  border-radius: 2rem;
  font-size: 0.8rem;
  color: var(--ember-glow);
  margin-bottom: 1rem;
}

.newsletter-cta h3 {
  font-size: 1.4rem;
  color: var(--stone-50);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.newsletter-cta p {
  font-size: 0.95rem;
  color: var(--stone-400);
  max-width: 440px;
  margin: 0 auto 1.5rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  max-width: 440px;
  margin: 0 auto;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--stone-700);
  background: var(--stone-950);
  color: var(--stone-100);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.newsletter-form input[type="email"]::placeholder {
  color: var(--stone-600);
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--ember);
}

.newsletter-form button {
  padding: 0.8rem 1.25rem;
  border-radius: 8px;
  border: none;
  background: var(--ember);
  color: var(--stone-50);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

.newsletter-form button:hover {
  background: var(--ember-light);
  transform: translateY(-1px);
}

.newsletter-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.newsletter-note {
  font-size: 0.75rem;
  color: var(--stone-600);
  margin-top: 0.75rem;
}

.newsletter-success {
  display: none;
  padding: 1rem 1.25rem;
  background: rgba(54, 83, 20, 0.2);
  border: 1px solid var(--forest-light);
  border-radius: 8px;
  color: var(--stone-200);
  font-size: 0.95rem;
  max-width: 440px;
  margin: 0 auto;
}

.newsletter-success strong {
  color: var(--stone-50);
}

.newsletter-error {
  display: none;
  font-size: 0.85rem;
  color: #ef4444;
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    gap: 2rem;
  }
  .footer-links {
    flex-direction: column;
    gap: 2rem;
  }
  .guides-grid { grid-template-columns: 1fr; }
  .tracks-grid { grid-template-columns: 1fr; }
  .materials-list { grid-template-columns: 1fr; }
  .step-number { font-size: 1.2rem; min-width: 2.5rem; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form button { width: 100%; }
  .newsletter-cta { padding: 2rem 1.5rem; }
}
