/* ============================================
   HabitForge — Tactical Minimalism Design System
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Design Tokens --- */
:root {
  --bg: #000000;
  --bg-deep: #0C0C0C;
  --surface: #0A0A0A;
  --border: #1A1A1A;
  --border-hover: #2A2A2A;
  --ember: #FF6B2C;
  --ember-glow: #FF8F4C;
  --ember-dim: rgba(255, 107, 44, 0.15);
  --ember-subtle: rgba(255, 107, 44, 0.06);
  --text-primary: #FFFFFF;
  --text-muted: #808080;
  --text-dim: #4A4A4A;
  --radius: 4px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --container-width: 1200px;
  --section-padding: 120px 0;
}

/* --- Typography --- */
.mono-label {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ember);
  font-weight: 500;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

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

section {
  padding: var(--section-padding);
  position: relative;
}

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 80px 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero-eyebrow {
  margin-bottom: 24px;
}

.hero-eyebrow .line-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-eyebrow .line-inner::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--ember);
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(3rem, 7vw, 5.5rem);
  color: var(--text-primary);
  margin-bottom: 24px;
}

.hero h1 .accent {
  color: var(--ember);
  position: relative;
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 0;
  font-weight: 400;
}

/* Spacing between masked hero elements */
.hero-content > .line-mask:nth-child(3) {
  margin-bottom: 48px;
}

/* CTA Button */
.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: var(--text-primary);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.cta-button svg {
  width: 22px;
  height: 22px;
}

.cta-button:hover {
  background: var(--ember);
  color: var(--bg);
  box-shadow: 0 0 30px rgba(255, 107, 44, 0.3);
  transform: translateY(-1px);
}

.cta-button:active {
  transform: translateY(0);
}

/* Hero Text Reveal — Masked Slide-Up */
@keyframes lineReveal {
  from {
    transform: translateY(110%) rotate(3deg);
  }
  to {
    transform: translateY(0) rotate(0deg);
  }
}

.line-mask {
  overflow: hidden;
  display: block;
}

h1 .line-mask {
  display: block;
  line-height: 1.15;
}

.line-inner {
  display: block;
  transform: translateY(110%) rotate(3deg);
  animation: lineReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Stagger: eyebrow, h1 line 1, h1 line 2, subtitle, CTA */
.hero-eyebrow .line-inner                { animation-delay: 0s; }
.hero h1 .line-mask:nth-child(1) .line-inner { animation-delay: 0.1s; }
.hero h1 .line-mask:nth-child(2) .line-inner { animation-delay: 0.2s; }
.hero-sub.line-inner                      { animation-delay: 0.35s; }
.cta-button.line-inner                    { animation-delay: 0.5s; display: inline-flex; }

/* Heatmap Background */
.heatmap-wrapper {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  opacity: 0.4;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.heatmap-wrapper.glow-active {
  opacity: 0.8;
}

.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(52, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 3px;
  width: 600px;
  height: auto;
}

.heatmap-cell {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--ember-dim);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.heatmap-cell.l1 { background: rgba(255, 107, 44, 0.1); }
.heatmap-cell.l2 { background: rgba(255, 107, 44, 0.25); }
.heatmap-cell.l3 { background: rgba(255, 107, 44, 0.45); }
.heatmap-cell.l4 { background: rgba(255, 107, 44, 0.7); }
.heatmap-cell.l5 { background: rgba(255, 107, 44, 0.95); box-shadow: 0 0 6px rgba(255, 107, 44, 0.3); }

@keyframes cellPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.heatmap-cell.pulse {
  animation: cellPulse 3s ease-in-out infinite;
}

/* --- Gradient Mesh (ambient blobs) --- */
.gradient-mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.mesh-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
}

.mesh-blob-1 {
  width: 550px;
  height: 550px;
  background: var(--ember);
  opacity: 0.16;
  top: 0%;
  left: 0%;
  animation: meshDrift1 25s ease-in-out infinite;
}

.mesh-blob-2 {
  width: 450px;
  height: 450px;
  background: #FF4500;
  opacity: 0.12;
  top: -5%;
  right: 5%;
  animation: meshDrift2 33s ease-in-out infinite;
}

.mesh-blob-3 {
  width: 400px;
  height: 400px;
  background: var(--ember-glow);
  opacity: 0.10;
  bottom: 0%;
  left: 30%;
  animation: meshDrift3 28s ease-in-out infinite;
}

@keyframes meshDrift1 {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(80px, 40px); }
  50%      { transform: translate(40px, 100px); }
  75%      { transform: translate(-30px, 60px); }
}

@keyframes meshDrift2 {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(-60px, 50px); }
  50%      { transform: translate(-100px, 20px); }
  75%      { transform: translate(-40px, -30px); }
}

@keyframes meshDrift3 {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(50px, -40px); }
  50%      { transform: translate(-30px, -80px); }
  75%      { transform: translate(70px, -20px); }
}

@media (max-width: 768px) {
  .mesh-blob-1 { width: 300px; height: 300px; }
  .mesh-blob-2 { width: 250px; height: 250px; }
  .mesh-blob-3 { width: 200px; height: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  .mesh-blob { animation: none; }
}

/* ============================================
   APP SHOWCASE SECTION
   ============================================ */
.showcase {
  padding: var(--section-padding);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

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

.showcase-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-top: 16px;
}

.showcase-phones {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 24px;
}

.phone {
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
  transform-origin: bottom center;
}

/* Smooth transitions for the featured swap */
.phone,
.phone .phone-frame,
.phone .phone-glow {
  transition: all 0.4s cubic-bezier(0.2, 0, 0.2, 1);
}

.phone-frame {
  width: 260px;
  background: #000;
  border-radius: 42px;
  border: 2px solid #3a3a3c;
  padding: 8px;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    inset 0 0 2px rgba(255, 255, 255, 0.05);
}

/* Side button: power (right side) */
.phone-frame::before {
  content: '';
  position: absolute;
  right: -4px;
  top: 25%;
  width: 3px;
  height: 28px;
  background: #3a3a3c;
  border-radius: 0 2px 2px 0;
  z-index: 3;
}

/* Side button: volume (left side) */
.phone-frame::after {
  content: '';
  position: absolute;
  left: -4px;
  top: 22%;
  width: 3px;
  height: 20px;
  background: #3a3a3c;
  border-radius: 2px 0 0 2px;
  z-index: 3;
  box-shadow: 0 14px 0 #3a3a3c; /* second volume button below */
}

/* Notch */
.phone-notch {
  width: 110px;
  height: 22px;
  background: #000;
  border-radius: 0 0 18px 18px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

/* Speaker grille inside notch */
.phone-notch::before {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  background: #1a1a1a;
  border-radius: 2px;
}

/* Home indicator bar */
.phone-home-indicator {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 36%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  z-index: 2;
}

.phone-frame img {
  width: 100%;
  display: block;
  border-radius: 36px;
}

/* Ember glow beneath each phone */
.phone-glow {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 40px;
  background: radial-gradient(ellipse, rgba(255, 107, 44, 0.1), transparent 70%);
  filter: blur(12px);
  pointer-events: none;
  opacity: 0;
}

/* Featured phone: scaled up, ember border */
.phone-featured {
  transform: scale(1.12);
  z-index: 2;
}

.phone-featured .phone-frame {
  border-color: var(--ember);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 107, 44, 0.1) inset,
    0 0 60px rgba(255, 107, 44, 0.06);
}

.phone-featured .phone-glow {
  opacity: 1;
  background: radial-gradient(ellipse, rgba(255, 107, 44, 0.25), transparent 70%);
  width: 70%;
  height: 50px;
}

/* Non-featured phones shrink slightly when one is featured */
.phone:not(.phone-featured) {
  opacity: 0.7;
}

.phone:not(.phone-featured):hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .showcase-phones {
    gap: 12px;
  }

  .phone-frame {
    width: 120px;
    border-radius: 24px;
    padding: 4px;
    border-width: 1.5px;
  }

  .phone-frame::before {
    width: 2px;
    height: 18px;
    right: -3px;
  }

  .phone-frame::after {
    width: 2px;
    height: 14px;
    left: -3px;
    box-shadow: 0 10px 0 #3a3a3c;
  }

  .phone-notch {
    width: 54px;
    height: 12px;
    top: 4px;
    border-radius: 0 0 10px 10px;
  }

  .phone-notch::before {
    width: 18px;
    height: 2px;
    bottom: 3px;
  }

  .phone-home-indicator {
    height: 3px;
    bottom: 7px;
  }

  .phone-frame img {
    border-radius: 20px;
  }
}

@media (max-width: 480px) {
  .showcase-phones {
    gap: 6px;
  }

  .phone-frame {
    width: 60px;
    border-radius: 14px;
    padding: 2px;
    border-width: 1px;
  }

  .phone-frame::before,
  .phone-frame::after {
    display: none;
  }

  .phone-notch {
    width: 28px;
    height: 7px;
    top: 2px;
    border-radius: 0 0 6px 6px;
  }

  .phone-notch::before {
    display: none;
  }

  .phone-home-indicator {
    height: 2px;
    bottom: 4px;
  }

  .phone-frame img {
    border-radius: 12px;
  }
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features {
  background: var(--bg-deep);
  padding: var(--section-padding);
}

.features-header {
  margin-bottom: 64px;
}

.features-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-top: 16px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: repeat(5, auto);
  gap: 12px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, transparent, transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: var(--transition);
  pointer-events: none;
}

.feature-card:hover {
  border-color: var(--ember);
  box-shadow: 0 0 40px rgba(255, 107, 44, 0.08), 0 0 80px rgba(255, 107, 44, 0.04);
  transform: translateY(-2px);
}

.feature-card:hover::before {
  background: linear-gradient(135deg, var(--ember), transparent 60%);
}

.feature-card.large {
  grid-row: 1 / 6;
  grid-column: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Compact feature chips (right side 2x5 grid) */
.feature-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: var(--transition);
  position: relative;
}

.feature-chip:hover {
  border-color: var(--ember);
  box-shadow: 0 0 24px rgba(255, 107, 44, 0.06);
  transform: translateY(-1px);
}

.chip-icon {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ember);
  transition: var(--transition);
}

.feature-chip:hover .chip-icon {
  border-color: var(--ember);
  box-shadow: 0 0 10px rgba(255, 107, 44, 0.15);
}

.chip-text h4 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 3px;
  letter-spacing: -0.01em;
}

.chip-text p {
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

/* --- HabitGridCard replica (from lib/widgets/habit_grid_card.dart) --- */
/* Font: Inter (same as app — app_theme.dart uses GoogleFonts.interTextTheme) */
/* Surface: #1C1C1E (AppTheme.surfaceColor) */
/* Border radius: 20 (CardTheme shape) */

.widget-demo-area { margin-top: 24px; }

.hg-card {
  background: #1C1C1E;
  border-radius: 20px;
  padding: 12px;
  position: relative;
  max-width: 260px;
  margin: 0 auto;
}

/* HabitCardHeader: Row, spacing 8 */
.hg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* Toggle: 36x36 circle, habitColor.withAlpha(0.2), NO border (habit_grid_card.dart line 54-57) */
.hg-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(136, 88, 168, 0.2);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Pulse ring to signal interactivity — stops after first click */
@keyframes togglePulse {
  0% { box-shadow: 0 0 0 0 rgba(136, 88, 168, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(136, 88, 168, 0); }
  100% { box-shadow: 0 0 0 0 rgba(136, 88, 168, 0); }
}

.hg-toggle.pulsing {
  animation: togglePulse 1.5s ease infinite;
}

.hg-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: opacity 0.4s ease;
}

.hg-hint::before {
  content: '\2191';
  display: inline-block;
  animation: hintBounce 1.2s ease infinite;
}

@keyframes hintBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.hg-hint.hidden {
  opacity: 0;
}

.hg-toggle-check { display: none; }
.hg-toggle-icon { display: block; }

.hg-toggle.checked .hg-toggle-icon { display: none; }
.hg-toggle.checked {
  background: #8858A8;
  box-shadow: 0 2px 8px rgba(136, 88, 168, 0.4);
}

.hg-toggle.checked .hg-toggle-check {
  display: block;
}

/* Title: fontSize 14 bold white, subtitle: fontSize 10 white 0.5 */
.hg-text { display: flex; flex-direction: column; min-width: 0; }
.hg-name { font-size: 14px; font-weight: 700; color: #fff; line-height: 1.3; }
.hg-sub { font-size: 10px; color: rgba(255,255,255,0.5); line-height: 1.3; }

/* ContributionGraph: 8 cols x 7 rows, spacing 4px, borderRadius 4 */
.hg-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(7, auto);
  grid-auto-flow: column;
  gap: 4px;
}

.hg-grid .hg-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.3s ease;
}

/* Completed: baseColor solid */
.hg-grid .hg-cell.filled { background: #8858A8; }

/* Today: inset box-shadow instead of border (no layout shift) */
.hg-grid .hg-cell.today { box-shadow: inset 0 0 0 2px #8858A8; }

/* Cell click ripple */
.hg-grid .hg-cell.pop {
  animation: cellPop 0.3s ease;
}

@keyframes cellPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}


.feature-icon {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--ember);
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  border-color: var(--ember);
  box-shadow: 0 0 16px rgba(255, 107, 44, 0.2);
}

.feature-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.feature-card .mono-label {
  margin-bottom: 20px;
}

/* Mini heatmap inside feature card */
.mini-heatmap {
  display: grid;
  grid-template-columns: repeat(14, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 2px;
  margin-top: 24px;
  max-width: 260px;
}

.mini-heatmap .heatmap-cell {
  width: 7px;
  height: 7px;
}


/* ============================================
   SCROLL HEATMAP STRIP
   ============================================ */
.scroll-heatmap {
  padding: 40px 0;
  background: var(--bg);
  overflow: hidden;
  /* Override the default section padding */
}

.scroll-heatmap-grid {
  display: grid;
  grid-template-rows: repeat(7, 10px);
  gap: 3px;
  justify-content: center;
  /* grid-template-columns set by JS based on viewport width */
}

/* Empty state: barely visible ghost grid */
.scroll-heatmap-grid .heatmap-cell {
  width: 10px;
  height: 10px;
  background: rgba(255, 107, 44, 0.04);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Active state: cell has been "filled in" by scroll */
.scroll-heatmap-grid .heatmap-cell.sh-active {
  /* background set inline per cell by JS */
}

/* Brightest active cells get a glow */
.scroll-heatmap-grid .heatmap-cell.sh-active.sh-l5 {
  box-shadow: 0 0 6px rgba(255, 107, 44, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  .scroll-heatmap-grid .heatmap-cell {
    transition: none;
  }
}

/* ============================================
   DATA SOVEREIGNTY SECTION
   ============================================ */
.sovereignty {
  padding: var(--section-padding);
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sovereignty-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.sovereignty h2 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 24px;
}

.sovereignty h2 .accent {
  color: var(--ember);
}

.sovereignty p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto;
}

.sovereignty a {
  color: var(--ember);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sovereignty a:hover {
  color: var(--ember-glow);
}

.sovereignty-badges {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.sovereignty-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.sovereignty-badge .badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 8px rgba(255, 107, 44, 0.4);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-size: 0.85rem;
  color: var(--text-dim);
  font-weight: 400;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.footer-links a:hover {
  color: var(--ember);
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--ember);
  transition: var(--transition);
}

.footer-links a:hover::after {
  width: 100%;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ============================================
   PRIVACY PAGE
   ============================================ */
.privacy-page {
  min-height: 100vh;
  padding: 80px 0;
}

.privacy-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 48px;
  transition: var(--transition);
}

.privacy-back:hover {
  color: var(--ember);
}

.privacy-back svg {
  width: 16px;
  height: 16px;
}

.privacy-content {
  max-width: 640px;
}

.privacy-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 12px;
}

.privacy-content .privacy-updated {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 48px;
}

.privacy-content h2 {
  font-size: 1.2rem;
  margin-top: 40px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.privacy-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.privacy-content a {
  color: var(--ember);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.privacy-content a:hover {
  color: var(--ember-glow);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .heatmap-wrapper {
    right: -100px;
    opacity: 0.2;
  }

  .heatmap-grid {
    width: 450px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 80px 0;
  }

  .hero {
    min-height: auto;
    padding: 120px 0 80px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .heatmap-wrapper {
    display: none;
  }

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

  .feature-card.large {
    grid-row: auto;
    grid-column: auto;
  }

  .sovereignty-badges {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .footer-links {
    gap: 24px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .cta-button {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
  }

  .feature-card {
    padding: 28px;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  .line-inner {
    animation: none;
    transform: none;
  }

}
