/* ──────────────────────────────────────
   NoFail40 — Design Tokens & Styles
   Dark, bold, disciplined aesthetic.
   ────────────────────────────────────── */

:root {
  /* Type Scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(3rem, 0.5rem + 7vw, 8rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Font Families */
  --font-display: 'Clash Display', 'Arial Black', sans-serif;
  --font-body: 'Satoshi', 'Inter', 'Helvetica Neue', sans-serif;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
}

/* ── Dark Theme (Default) ── */
:root,
[data-theme='dark'] {
  --color-bg: #0c0c0e;
  --color-surface: #141416;
  --color-surface-2: #1a1a1e;
  --color-surface-offset: #111113;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-divider: rgba(255, 255, 255, 0.06);

  --color-text: #f0eeeb;
  --color-text-muted: #8a8880;
  --color-text-faint: #555550;

  --color-accent: #e8872e;
  --color-accent-hover: #f09a45;
  --color-accent-active: #cc7520;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* ── Light Theme ── */
[data-theme='light'] {
  --color-bg: #f5f3f0;
  --color-surface: #ffffff;
  --color-surface-2: #faf9f7;
  --color-surface-offset: #edeae5;
  --color-border: rgba(0, 0, 0, 0.1);
  --color-divider: rgba(0, 0, 0, 0.06);

  --color-text: #1a1815;
  --color-text-muted: #6b6860;
  --color-text-faint: #a5a29a;

  --color-accent: #c86b15;
  --color-accent-hover: #b05c0e;
  --color-accent-active: #9a4e08;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --color-bg: #f5f3f0;
    --color-surface: #ffffff;
    --color-surface-2: #faf9f7;
    --color-surface-offset: #edeae5;
    --color-border: rgba(0, 0, 0, 0.1);
    --color-divider: rgba(0, 0, 0, 0.06);
    --color-text: #1a1815;
    --color-text-muted: #6b6860;
    --color-text-faint: #a5a29a;
    --color-accent: #c86b15;
    --color-accent-hover: #b05c0e;
    --color-accent-active: #9a4e08;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
  }
}

/* ── Global Styles ── */
a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover {
  color: var(--color-accent-hover);
}

/* ── Layout ── */
.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 768px) {
  .container {
    padding-inline: var(--space-8);
  }
}

.section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-divider);
  transition: box-shadow 0.3s var(--ease-out);
}
.nav--scrolled {
  box-shadow: var(--shadow-md);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
}
.nav-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.nav-logo-text sup {
  color: var(--color-accent);
  font-size: 0.55em;
  font-weight: 500;
  vertical-align: super;
  line-height: 0;
}
/* Brand name: NOFAIL bold, 40 lighter */
.brand-name { font-weight: 800; letter-spacing: 0.02em; }
.brand-name sup { color: var(--color-accent); font-weight: 500; font-size: 0.6em; vertical-align: super; }
.nav-links {
  display: none;
  gap: var(--space-6);
  list-style: none;
}
.nav-links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.nav-links a:hover {
  color: var(--color-text);
}
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
#nav-cta {
  white-space: nowrap;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}
.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}
.mobile-menu-btn {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
@media (min-width: 768px) {
  .mobile-menu-btn {
    display: none;
  }
}
.mobile-menu {
  display: none;
  position: fixed;
  inset: 64px 0 0 0;
  z-index: 49;
  background: var(--color-bg);
  padding: var(--space-6) var(--space-4);
  border-top: 1px solid var(--color-divider);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.mobile-menu.open {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.nav:has(.mobile-menu.open) {
  background: var(--color-bg);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.mobile-menu a {
  font-size: var(--text-lg);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-2) 0;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition:
    background var(--transition-interactive),
    color var(--transition-interactive),
    transform var(--transition-interactive),
    box-shadow var(--transition-interactive);
  cursor: pointer;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}
.btn-primary {
  background: var(--color-accent);
  color: #0c0c0e;
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  color: #0c0c0e;
}
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.btn-secondary:hover {
  background: var(--color-surface-2);
  border-color: var(--color-text-faint);
}
.btn-lg {
  font-size: var(--text-base);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-lg);
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    oklch(from var(--color-bg) l c h / 0.6) 0%,
    oklch(from var(--color-bg) l c h / 0.3) 40%,
    oklch(from var(--color-bg) l c h / 0.9) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  padding-block: clamp(var(--space-16), 12vw, var(--space-32));
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-6);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: var(--space-6);
}
.hero h1 .accent {
  color: var(--color-accent);
}
.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: 560px;
  margin-bottom: var(--space-8);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* ── Stats Strip ── */
.stats-strip {
  border-top: 1px solid var(--color-divider);
  border-bottom: 1px solid var(--color-divider);
  background: var(--color-surface);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  padding-block: var(--space-8);
  text-align: center;
}
@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
  }
}
.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: var(--space-1);
}

/* ── Problem Section ── */
.problem {
  background: var(--color-surface);
}
.problem-grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}
@media (min-width: 768px) {
  .problem-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
}
.problem-text h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}
.problem-text p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  line-height: 1.7;
}
.problem-text p:last-child {
  margin-bottom: 0;
}
.problem-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.problem-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Features ── */
.features-header {
  text-align: left;
  max-width: 600px;
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-16));
}
.features-header .label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.features-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}
.features-header p {
  color: var(--color-text-muted);
}
.features-grid {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.feature-card {
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}
.feature-card:hover {
  border-color: oklch(from var(--color-accent) l c h / 0.3);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
  letter-spacing: -0.01em;
}
.feature-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ── How It Works ── */
.how-it-works {
  background: var(--color-surface);
}
.how-header {
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-16));
}
.how-header .label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.how-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.steps {
  display: grid;
  gap: var(--space-8);
  max-width: 860px;
  margin-inline: auto;
}
@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}
.step {
  text-align: center;
}
.step-number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: var(--space-3);
}
.step h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.step p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 28ch;
  margin-inline: auto;
}

/* ── Challenge Section ── */
.challenge-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  margin-inline: var(--space-4);
}
@media (min-width: 768px) {
  .challenge-banner {
    margin-inline: var(--space-8);
  }
}
.challenge-banner-bg {
  position: absolute;
  inset: 0;
}
.challenge-banner-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}
.challenge-banner-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, oklch(from var(--color-bg) l c h / 0.85), oklch(from var(--color-bg) l c h / 0.4));
}
.challenge-content {
  position: relative;
  z-index: 1;
  padding: clamp(var(--space-8), 5vw, var(--space-16));
  max-width: 560px;
}
.challenge-content .label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.challenge-content h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}
.challenge-content p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-6);
}
.challenge-checklist {
  list-style: none;
  margin-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.challenge-checklist li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.challenge-checklist .check {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-accent);
}

/* ── Platforms ── */
.platforms-header {
  text-align: center;
  max-width: 540px;
  margin-inline: auto;
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-12));
}
.platforms-header .label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.platforms-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.platforms-grid {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 768px) {
  .platforms-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.platform-card {
  padding: var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
}
.platform-icon {
  width: 48px;
  height: 48px;
  margin-inline: auto;
  margin-bottom: var(--space-4);
  color: var(--color-accent);
}
.platform-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.platform-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-inline: auto;
}

/* ── Testimonials ── */
.testimonials {
  background: var(--color-surface);
}
.testimonials-header {
  text-align: center;
  max-width: 540px;
  margin-inline: auto;
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-12));
}
.testimonials-header .label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.testimonials-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.testimonials-grid {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 640px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.testimonial-card {
  padding: var(--space-6);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.testimonial-stars {
  color: var(--color-accent);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  letter-spacing: 0.1em;
}
.testimonial-card blockquote {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4);
  font-style: italic;
}
.testimonial-author {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
}
.testimonial-role {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ── FAQ ── */
.faq-header {
  text-align: center;
  max-width: 540px;
  margin-inline: auto;
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-12));
}
.faq-header .label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.faq-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.faq-list {
  max-width: 720px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}
.faq-item {
  border-bottom: 1px solid var(--color-divider);
}
.faq-item:first-child {
  border-top: 1px solid var(--color-divider);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  text-align: left;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}
.faq-question:hover {
  color: var(--color-accent);
}
.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform 0.3s var(--ease-out);
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out), padding 0.4s var(--ease-out);
}
.faq-item.open .faq-answer {
  max-height: 300px;
}
.faq-answer p {
  padding-bottom: var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ── Final CTA ── */
.final-cta {
  text-align: center;
  background: var(--color-surface);
}
.final-cta h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}
.final-cta p {
  color: var(--color-text-muted);
  margin-inline: auto;
  margin-bottom: var(--space-8);
  max-width: 48ch;
}
.final-cta .btn {
  margin-inline: auto;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-8);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}
.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}
.footer-links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}
.footer-links a {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--color-text);
}

/* ── QR Code Section ── */
.qr-section {
  display: grid;
  gap: var(--space-8);
  align-items: center;
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}
@media (min-width: 768px) {
  .qr-section {
    grid-template-columns: 1fr auto;
    gap: var(--space-12);
    padding: var(--space-12);
  }
}
.qr-content h2 {
  line-height: 1.1;
}
.qr-visual {
  display: flex;
  justify-content: center;
}
.qr-mock {
  width: 260px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.qr-mock-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
}
.qr-mock-body {
  padding: var(--space-6);
  text-align: center;
}
.qr-code-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.qr-mock-body p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-inline: auto;
}

/* ── Scroll Reveals ── */
.fade-in {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
}

@keyframes reveal-fade {
  to {
    opacity: 1;
  }
}

/* ───────────────────────────────────────────
   Section: The 40-Day Journey Timeline
   ─────────────────────────────────────────── */

.journey {
  background: var(--color-bg);
}

.journey-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: clamp(var(--space-10), 5vw, var(--space-20));
}

.journey-header .label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.journey-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.journey-intro {
  color: var(--color-text-muted);
  line-height: 1.7;
  font-size: var(--text-base);
}

/* ── Timeline layout ── */
.journey-timeline {
  position: relative;
  display: grid;
  gap: var(--space-8);
}

/* Desktop: 4-column horizontal layout */
@media (min-width: 900px) {
  .journey-timeline {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-6);
    align-items: start;
  }
}

/* Horizontal connector line (desktop only) */
.journey-connector {
  display: none;
}

@media (min-width: 900px) {
  .journey-connector {
    display: block;
    position: absolute;
    top: 28px; /* aligns with center of 56px node */
    left: calc(12.5% + 28px); /* starts at center of first node */
    right: calc(12.5% + 28px); /* ends at center of last node */
    height: 2px;
    background: linear-gradient(
      to right,
      var(--color-border),
      var(--color-border) 60%,
      var(--color-accent) 100%
    );
    z-index: 0;
  }
}

/* ── Individual phase ── */
.journey-phase {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
}

@media (min-width: 900px) {
  .journey-phase {
    align-items: center;
  }
}

/* ── Node bubble ── */
.journey-node {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--transition-interactive), background var(--transition-interactive);
}

.journey-node--active {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.journey-node--active .journey-node-label {
  color: #0c0c0e;
}

.journey-node-label {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.01em;
}

.journey-node--active .journey-node-label {
  color: #0c0c0e;
}

/* ── Phase card ── */
.journey-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
  width: 100%;
}

.journey-card:hover {
  border-color: rgba(232, 135, 46, 0.25);
  box-shadow: var(--shadow-md);
}

.journey-card--active {
  border-color: rgba(232, 135, 46, 0.35);
  background: var(--color-surface-2);
}

.journey-phase-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

.journey-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-3);
}

.journey-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: var(--space-4);
}

/* ── Stat callout ── */
.journey-stat {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: auto;
}

.journey-stat-number {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.journey-stat-text {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}


/* ───────────────────────────────────────────
   Section: Stack a Habit (Phase 2)
   ─────────────────────────────────────────── */

.stack-habit {
  background: var(--color-surface);
}

.stack-header {
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(var(--space-10), 5vw, var(--space-16));
}

.stack-header .label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.stack-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.stack-subhead {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  line-height: 1.4;
}

.stack-body {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ── Habit cards grid ── */
.habit-cards {
  display: grid;
  gap: var(--space-5);
  margin-bottom: clamp(var(--space-8), 4vw, var(--space-16));
}

@media (min-width: 640px) {
  .habit-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .habit-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ── Individual habit card ── */
.habit-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive), transform var(--transition-interactive);
}

.habit-card:hover {
  border-color: rgba(232, 135, 46, 0.3);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Rank badge */
.habit-rank {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text-faint);
  letter-spacing: 0.05em;
}

/* Icon */
.habit-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.habit-icon svg,
.habit-icon i {
  width: 28px;
  height: 28px;
  stroke-width: 1.75;
}

/* Content */
.habit-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.habit-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.habit-tagline {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
  margin: 0;
}

.habit-body {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.65;
  flex: 1;
  margin: 0;
}

.habit-stat {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
  padding: var(--space-2) var(--space-3);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  line-height: 1.5;
  margin-top: var(--space-2);
}

.habit-source {
  font-weight: 400;
  color: var(--color-text-muted);
}

.habit-cta {
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-4);
  align-self: flex-start;
  margin-top: var(--space-2);
}

/* ── Coming soon footer ── */
.stack-footer {
  text-align: center;
}

.stack-coming-soon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
}

.stack-coming-soon p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-style: italic;
  margin: 0;
}

.stack-coming-icon {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
  flex-shrink: 0;
}
