/* ============================================================
   KLUIS SHOWCASE — Design System & Styles
   Colors from the Kluis Flutter app (AppColors)
   Font: Outfit (Google Fonts)
   ============================================================ */

/* ── CSS Variables ── */
:root {
  /* Parent (Blue) */
  --parent: #3B5BA9;
  --parent-dark: #2A4480;
  --parent-hover: #324F96;
  --parent-subtle: rgba(59, 91, 169, 0.1);
  --parent-glow: rgba(59, 91, 169, 0.25);

  /* Child (Green) */
  --child: #5A9C78;
  --child-dark: #437A5C;
  --child-subtle: rgba(90, 156, 120, 0.1);
  --child-bg: #EDF5F0;
  --child-glow: rgba(90, 156, 120, 0.25);

  /* Logo Colors */
  --logo-blue: #3B7AB9;
  --logo-green: #52B788;

  /* Backgrounds */
  --bg: #F5F5F8;
  --surface: #FFFFFF;
  --surface-elevated: #F0F2F5;

  /* Text */
  --text-primary: #1E293B;
  --text-secondary: #6B7280;
  --text-tertiary: #9CA3AF;
  --text-on-primary: #FFFFFF;

  /* Status */
  --destructive: #C45A4E;
  --success: #22C55E;
  --warning: #F59E0B;

  /* Borders */
  --divider: #E5E7EB;
  --card-border: #F0F0F3;

  /* Spacing */
  --section-py: 100px;
  --container-max: 1200px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.08);
  --shadow-xl: 0 16px 64px rgba(0,0,0,0.12);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
}

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

html {
  scroll-padding-top: 100px;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  scroll-padding-top: 100px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  padding: 8px 16px;
  background: var(--parent);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  z-index: 10000;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 8px;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

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

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 12px rgba(0,0,0,0.06);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.nav-logo-icon {
  width: 32px;
  height: 36px;
}

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

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
  position: relative;
  padding-block: 12px;
  display: inline-flex;
  align-items: center;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--parent);
  border-radius: 1px;
  transition: width 0.3s ease;
}

.nav-link:hover {
  color: var(--parent);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: var(--parent);
}

.nav-link.active::after {
  width: 100%;
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--parent);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.nav-hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all 0.3s;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-lg);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--parent);
  color: var(--text-on-primary);
  box-shadow: 0 4px 16px var(--parent-glow);
}

.btn-primary:hover {
  background: var(--parent-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--parent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--parent);
  border: 2px solid var(--divider);
}

.btn-ghost:hover {
  border-color: var(--parent);
  background: var(--parent-subtle);
}

/* ── Hero Section ── */
.hero {
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
  background: linear-gradient(135deg, #F8F9FC 0%, #EDF1FA 50%, var(--child-bg) 100%);
  contain: layout paint;
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  will-change: transform, opacity;
  contain: strict;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background: var(--parent-subtle);
  top: -100px;
  right: -100px;
  animation: float 8s ease-in-out infinite;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: var(--child-subtle);
  bottom: -50px;
  left: -100px;
  animation: float 10s ease-in-out infinite reverse;
}

.shape-3 {
  width: 300px;
  height: 300px;
  background: rgba(59, 122, 185, 0.08);
  top: 50%;
  left: 50%;
  animation: float 12s ease-in-out infinite 2s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -30px); }
  66% { transform: translate(-20px, 20px); }
}

.hero-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--parent) 0%, var(--logo-blue) 40%, var(--logo-green) 70%, var(--child) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 520px;
}

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

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

.stat {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  font-size: 1.5rem;
}

.stat-value {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Hero Social Proof */
.hero-social-proof {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.hero-avatars {
  display: flex;
  flex-shrink: 0;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-left: -8px;
  border: 2px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: var(--shadow-sm);
}

.avatar:first-child { margin-left: 0; }
.avatar-1 { background: linear-gradient(135deg, var(--parent-subtle), var(--parent-light)); }
.avatar-2 { background: linear-gradient(135deg, var(--child-subtle), var(--child-light)); }
.avatar-3 { background: linear-gradient(135deg, #E8EFFE, #D4E8DC); }

.hero-family-count {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.hero-family-count strong {
  color: var(--parent);
  font-weight: 700;
}

/* Hero Store Badges */
.hero-store-badges {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--text-primary);
  color: white;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.store-badge svg {
  flex-shrink: 0;
}

.store-badge-sub {
  display: block;
  font-size: 0.6rem;
  font-weight: 400;
  opacity: 0.8;
  line-height: 1.2;
}

.store-badge-main {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Nav Backdrop (mobile) */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 99;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.nav-backdrop.active {
  display: block;
}

/* Hero Visual */
.hero-visual {
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.phone-mockup {
  width: 300px;
  background: var(--surface);
  border-radius: 32px;
  padding: 12px;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0,0,0,0.05);
  transform: rotateY(-5deg) rotateX(2deg);
  transition: transform 0.5s ease;
  animation: phoneBob 4s ease-in-out infinite;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.phone-mockup:hover {
  transform: rotateY(0) rotateX(0);
}

@keyframes phoneBob {
  0%, 100% { transform: rotateY(-5deg) rotateX(2deg) translateY(0); }
  50% { transform: rotateY(-5deg) rotateX(2deg) translateY(-10px); }
}

.phone-screen {
  background: linear-gradient(180deg, var(--child-bg) 0%, #FFFFFF 100%);
  border-radius: 22px;
  padding: 32px 20px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vault-demo {
  text-align: center;
}

.vault-icon-large svg {
  width: 120px;
  height: auto;
  margin-bottom: 24px;
  filter: drop-shadow(0 8px 24px rgba(59, 122, 185, 0.2));
  animation: vaultPulse 3s ease-in-out infinite;
}

@keyframes vaultPulse {
  0%, 100% { filter: drop-shadow(0 8px 24px rgba(59, 122, 185, 0.2)); transform: scale(1); }
  50% { filter: drop-shadow(0 12px 32px rgba(59, 122, 185, 0.3)); transform: scale(1.03); }
}

.vault-code-display {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 12px;
}

.code-digit {
  width: 48px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  font-weight: 700;
}

.code-digit.revealed {
  background: var(--child);
  color: white;
  animation: digitReveal 0.5s ease;
}

.code-digit.hidden {
  background: var(--surface-elevated);
  color: var(--text-tertiary);
  border: 2px dashed var(--divider);
}

@keyframes digitReveal {
  0% { transform: scale(0.5) rotateY(90deg); opacity: 0; }
  100% { transform: scale(1) rotateY(0); opacity: 1; }
}

.vault-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Section Styles ── */
.section {
  padding: var(--section-py) 0;
}

.section-light {
  background: var(--surface);
}

.section-parent {
  background: var(--bg);
}

.section-child {
  background: linear-gradient(180deg, var(--child-bg) 0%, var(--bg) 100%);
}

.section-flow {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  color: white;
}

.section-vault-demo {
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%);
}

.section-home {
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}

/* ── Home Screen / Profile Selector ── */
.home-cards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
}

.home-card {
  flex: 1;
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-2xl);
  padding: 40px 32px;
  text-align: center;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
  transform: translateY(30px);
  cursor: pointer;
}

.home-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.home-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.home-card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.home-card:hover .home-card-glow {
  opacity: 1;
}

.child-glow-bg {
  background: radial-gradient(circle, rgba(90, 156, 120, 0.08) 0%, transparent 60%);
}

.parent-glow-bg {
  background: radial-gradient(circle, rgba(59, 91, 169, 0.08) 0%, transparent 60%);
}

.home-card-icon {
  margin-bottom: 16px;
}

.home-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.home-card-child h3 {
  color: var(--child-dark);
}

.home-card-parent h3 {
  color: var(--parent-dark);
}

.home-card-tagline {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.home-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.home-card-nav-preview {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.home-card-nav-preview span {
  padding: 6px 12px;
  background: var(--surface-elevated);
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.home-card-child .home-card-nav-preview span:first-child {
  background: var(--child-subtle);
  color: var(--child-dark);
}

.home-card-parent .home-card-nav-preview span:first-child {
  background: var(--parent-subtle);
  color: var(--parent-dark);
}

.home-card-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.divider-line {
  width: 2px;
  height: 40px;
  background: var(--divider);
}

.divider-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


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

.section-tag {
  display: inline-block;
  padding: 6px 16px;
  background: var(--parent-subtle);
  color: var(--parent);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.tag-blue {
  background: var(--parent-subtle);
  color: var(--parent);
}

.tag-green {
  background: var(--child-subtle);
  color: var(--child-dark);
}

.tag-gradient {
  background: linear-gradient(135deg, var(--parent-subtle), var(--child-subtle));
  color: var(--parent-dark);
}

.section-flow .section-tag {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}

.section-flow .section-subtitle {
  color: rgba(255,255,255,0.6);
}

/* ── Steps Grid ── */
.steps-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
}

.step-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  text-align: center;
  flex: 1;
  max-width: 340px;
  position: relative;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--card-border);
  transition: all 0.3s ease;
}

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

.step-number {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  background: var(--parent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px var(--parent-glow);
}

.step-card[data-step="2"] .step-number {
  background: linear-gradient(135deg, var(--parent), var(--child));
}

.step-card[data-step="3"] .step-number {
  background: var(--child);
  box-shadow: 0 4px 12px var(--child-glow);
}

.step-icon-wrapper {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.step-icon-blue {
  background: var(--parent-subtle);
  color: var(--parent);
}

.step-icon-green {
  background: var(--child-subtle);
  color: var(--child);
}

.step-icon-gradient {
  background: linear-gradient(135deg, var(--parent-subtle), var(--child-subtle));
  color: var(--child-dark);
}

.step-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-connector {
  display: flex;
  align-items: center;
  padding-top: 60px;
}

/* ── Split Content (Parent / Child Sections) ── */
.split-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.split-content.reverse {
  direction: rtl;
}

.split-content.reverse > * {
  direction: ltr;
}

.split-text .section-tag {
  display: inline-block;
  margin-bottom: 16px;
}

.split-text .section-title {
  text-align: left;
  margin-bottom: 16px;
}

.split-text .section-subtitle {
  text-align: left;
  margin: 0 0 32px 0;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.feature-icon.blue {
  background: var(--parent-subtle);
}

.feature-icon.green {
  background: var(--child-subtle);
}

.feature-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.feature-item p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Dashboard Previews ── */
.dashboard-preview {
  background: var(--surface);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--card-border);
  transform: perspective(800px) rotateY(-3deg);
  transition: transform 0.4s ease;
}

.dashboard-preview:hover {
  transform: perspective(800px) rotateY(0);
}

.preview-header {
  padding: 16px 20px;
}

.blue-header {
  background: linear-gradient(135deg, var(--parent), var(--parent-dark));
}

.green-header {
  background: linear-gradient(135deg, var(--child), var(--child-dark));
}

.preview-nav {
  display: flex;
  gap: 20px;
}

.preview-nav-item {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
}

.preview-nav-item.active {
  color: white;
  font-weight: 700;
  position: relative;
}

.preview-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: white;
  border-radius: 1px;
}

.preview-body {
  padding: 20px;
}

.child-body {
  background: var(--child-bg);
  position: relative;
}

.preview-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.preview-title-bar h4 {
  font-size: 1.1rem;
  font-weight: 700;
}

.preview-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: var(--surface-elevated);
  border-radius: 50px;
  color: var(--text-secondary);
  font-weight: 500;
}

.preview-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter {
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--surface-elevated);
  color: var(--text-secondary);
}

.filter.active {
  background: var(--parent-dark);
  color: white;
}

.preview-task {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  border: 1px solid var(--card-border);
}

.child-task {
  border: 1px solid rgba(90, 156, 120, 0.15);
}

.task-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--divider);
  flex-shrink: 0;
}

.task-status-dot.orange {
  background: var(--warning);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.task-status-dot.green {
  background: var(--success);
}

.task-emoji {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.task-info {
  flex: 1;
  min-width: 0;
}

.task-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
}

.task-cat {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.task-status-text {
  font-size: 0.7rem;
  font-weight: 500;
}

.task-status-text.approved {
  color: var(--success);
}

.task-status-text.waiting {
  color: var(--warning);
}

.task-status-text.open {
  color: var(--text-tertiary);
}

.task-approve {
  padding: 6px 12px;
  background: var(--success);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.task-pending {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.task-done {
  color: var(--success);
  font-weight: 700;
}

.code-progress-mini {
  display: flex;
  gap: 4px;
}

.mini-digit {
  width: 24px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--surface-elevated);
  color: var(--text-tertiary);
  border: 1px dashed var(--divider);
}

.mini-digit.done {
  background: var(--child);
  color: white;
  border: none;
}

.child-fab {
  position: absolute;
  bottom: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  background: var(--child);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 300;
  box-shadow: 0 4px 16px var(--child-glow);
}

/* ── Flow Diagram ── */
.flow-diagram {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flow-node {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 20px 32px;
  border-radius: var(--radius-xl);
  margin-bottom: 24px;
}

.flow-end {
  margin-top: 24px;
  margin-bottom: 0;
  background: linear-gradient(135deg, rgba(82,183,136,0.15), rgba(59,122,185,0.15));
  border-color: rgba(82,183,136,0.3);
}

.flow-node-icon {
  font-size: 2rem;
}

.flow-node-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.flow-node-content p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

.flow-branch {
  width: 100%;
  margin-bottom: 24px;
}

.flow-branch-line {
  width: 2px;
  height: 24px;
  background: rgba(255,255,255,0.15);
  margin: 0 auto 24px;
}

.flow-branch-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.flow-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.flow-column-header {
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.blue-bg {
  background: var(--parent);
}

.green-bg {
  background: var(--child);
}

.flow-node-small {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
  width: 100%;
  text-align: left;
}

.highlight-node {
  background: rgba(59, 91, 169, 0.2);
  border-color: rgba(59, 91, 169, 0.3);
}

.green-highlight {
  background: rgba(82, 183, 136, 0.2) !important;
  border-color: rgba(82, 183, 136, 0.3) !important;
}

.flow-small-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.flow-arrow-down {
  width: 2px;
  height: 16px;
  background: rgba(255,255,255,0.15);
  margin: 0 auto;
}

.flow-converge {
  width: 100%;
}

.flow-converge-line {
  width: 2px;
  height: 24px;
  background: rgba(255,255,255,0.15);
  margin: 0 auto;
}

/* ── Lifecycle Cards ── */
.lifecycle-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 64px;
}

.lifecycle-card {
  background: var(--bg);
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 1px solid var(--card-border);
}

.lifecycle-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.state-machine {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.state {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--divider);
  white-space: nowrap;
}

.state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.state-pending .state-dot { background: var(--text-tertiary); }
.state-awaiting .state-dot { background: var(--warning); }
.state-approved .state-dot { background: var(--success); }
.state-consumed .state-dot { background: var(--parent); }
.state-archived .state-dot { background: var(--text-tertiary); }
.state-stored .state-dot { background: var(--text-tertiary); }
.state-active .state-dot { background: var(--warning); }
.state-claimed .state-dot { background: var(--success); }
.state-redeemed .state-dot { background: var(--parent); }

.state-arrow {
  color: var(--text-tertiary);
  font-weight: 300;
}

/* ── Categories ── */
.categories-title {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 32px;
}

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

.category-card {
  background: var(--bg);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  text-align: center;
  border: 1px solid var(--card-border);
  transition: all 0.3s ease;
}

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

.cat-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.category-card h3 {
  font-weight: 700;
  margin-bottom: 8px;
}

.category-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cat-learn { border-top: 3px solid var(--parent); }
.cat-chore { border-top: 3px solid var(--child); }
.cat-move { border-top: 3px solid var(--warning); }
.cat-other { border-top: 3px solid var(--logo-blue); }

/* ── Interactive Demo ── */
.demo-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  max-width: 800px;
  margin: 0 auto;
}

.demo-tasks h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.demo-task {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px 20px;
  background: var(--surface);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  margin-bottom: 10px;
  transition: all 0.3s ease;
}

.demo-task:hover:not(.done) {
  border-color: var(--parent);
  box-shadow: 0 0 0 4px var(--parent-subtle);
  transform: translateX(4px);
}

.demo-task.done {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.05);
  cursor: default;
}

.demo-task-emoji {
  font-size: 1.25rem;
}

.demo-task-name {
  flex: 1;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: left;
}

.demo-task-status {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--parent);
  padding: 4px 12px;
  background: var(--parent-subtle);
  border-radius: 50px;
  white-space: nowrap;
}

.demo-task.done .demo-task-status {
  color: var(--success);
  background: rgba(34, 197, 94, 0.1);
}

.demo-vault {
  text-align: center;
}

.demo-vault-body {
  margin-bottom: 24px;
  transition: transform 0.3s ease;
}

.demo-vault-body.shake {
  animation: shake 0.5s ease;
}

.demo-vault-body.unlocked {
  animation: unlock 0.8s ease forwards;
}

.demo-vault-body.unlocked .demo-vault-svg path {
  stroke: #6FCF97;
  transition: stroke 0.5s ease;
}

.demo-vault-body.unlocked .demo-vault-svg circle {
  fill: #6FCF97;
  transition: fill 0.5s ease;
}

.demo-vault-body.unlocked::after {
  content: '🎉';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.5rem;
  animation: popIn 0.5s ease 0.3s both;
  z-index: 2;
}

@keyframes popIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  60% { transform: translate(-50%, -50%) scale(1.3); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

@keyframes unlock {
  0% { transform: scale(1); }
  30% { transform: scale(1.1); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1.05) rotate(5deg); filter: drop-shadow(0 0 20px rgba(82, 183, 136, 0.5)); }
}

.demo-vault-svg {
  width: 100px;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(59, 122, 185, 0.15));
}

.demo-code {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 12px;
}

.demo-digit {
  width: 48px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-size: 1.4rem;
  font-weight: 700;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.demo-digit.hidden {
  background: var(--surface-elevated);
  color: var(--text-tertiary);
  border: 2px dashed var(--divider);
}

.demo-digit.revealed {
  background: var(--child);
  color: white;
  border: 2px solid var(--child-dark);
  transform: scale(1.1);
  box-shadow: 0 4px 12px var(--child-glow);
}

.demo-progress-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 16px;
}

.demo-input-area {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 12px;
}

.demo-input {
  width: 140px;
  padding: 12px 16px;
  border: 2px solid var(--divider);
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 8px;
  outline: none;
  transition: border-color 0.3s;
}

.demo-input:focus {
  border-color: var(--parent);
  box-shadow: 0 0 0 4px var(--parent-subtle);
}

.demo-submit {
  padding: 12px 24px;
  font-size: 0.9rem;
}

.demo-result {
  font-size: 1rem;
  font-weight: 700;
  min-height: 32px;
  padding: 8px;
}

.demo-result.success {
  color: var(--success);
  animation: celebrateText 0.5s ease;
}

.demo-result.error {
  color: var(--destructive);
  animation: shake 0.4s ease;
}

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

.demo-reset {
  padding: 10px 20px;
  background: var(--surface-elevated);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
  margin-top: 8px;
}

.demo-reset:hover {
  background: var(--parent-subtle);
  color: var(--parent);
}

/* ── Features Grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feat-card {
  background: var(--bg);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  border: 1px solid var(--card-border);
  transition: all 0.3s ease;
}

.feat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--parent-subtle);
}

.feat-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.feat-card h3 {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.feat-card p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Footer ── */
.footer {
  background: #1E293B;
  padding: 60px 0 40px;
  color: white;
}

.footer-content {
  text-align: center;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.footer-logo-icon {
  width: 32px;
  height: 36px;
}

.footer-tagline {
  color: rgba(255,255,255,0.5);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  font-size: 0.85rem;
}

.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: rgba(255,255,255,0.9);
}

.footer-links span {
  color: rgba(255,255,255,0.25);
}

.footer-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin-bottom: 24px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

.footer-version {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
}

/* ── Scroll Animations ── */
.step-card,
.feature-item,
.category-card,
.feat-card,
.lifecycle-card,
.flow-node,
.flow-node-small,
.demo-task {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.step-card.visible,
.feature-item.visible,
.category-card.visible,
.feat-card.visible,
.lifecycle-card.visible,
.flow-node.visible,
.flow-node-small.visible,
.demo-task.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-subtitle {
    margin: 0 auto 36px;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .split-content {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .split-content.reverse {
    direction: ltr;
  }

  .split-text .section-title,
  .split-text .section-subtitle {
    text-align: center;
  }

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

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

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

  .home-cards {
    flex-direction: column;
    gap: 20px;
  }

  .home-card-divider {
    flex-direction: row;
    gap: 16px;
  }

  .divider-line {
    width: 40px;
    height: 2px;
  }
}

@media (max-width: 768px) {
  :root {
    --section-py: 64px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--divider);
    box-shadow: var(--shadow-md);
  }

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

  .nav-hamburger {
    display: flex;
  }

  .steps-grid {
    flex-direction: column;
    align-items: center;
  }

  .step-connector {
    transform: rotate(90deg);
    padding-top: 0;
  }

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

  .flow-branch-sides {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .state-machine {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }

  .phone-mockup {
    width: 260px;
  }

  .hero-store-badges {
    flex-direction: column;
    align-items: flex-start;
  }

  .store-badge {
    padding: 8px 16px;
  }

  .hero-social-proof {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

.shape.paused {
  animation-play-state: paused;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .shape,
  .phone-mockup,
  .vault-icon-large svg,
  .code-digit,
  .demo-digit,
  .demo-vault-body,
  .step-card,
  .feature-item,
  .category-card,
  .feat-card,
  .lifecycle-card,
  .flow-node,
  .flow-node-small,
  .demo-task,
  .home-card,
  .store-badge,
  .btn {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Dark Mode ── */
@media (prefers-color-scheme: dark) {
  :root {
    /* Backgrounds */
    --bg: #0F172A;
    --surface: #1E293B;
    --surface-elevated: #334155;

    /* Text */
    --text-primary: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-tertiary: #64748B;

    /* Borders */
    --divider: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.06);

    /* Adjusted subtle colors for dark */
    --parent-subtle: rgba(59, 91, 169, 0.2);
    --parent-glow: rgba(59, 91, 169, 0.35);
    --child-subtle: rgba(90, 156, 120, 0.2);
    --child-bg: #162A20;
    --child-glow: rgba(90, 156, 120, 0.35);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 16px 64px rgba(0, 0, 0, 0.4);
  }

  /* Hero gradient */
  .hero {
    background: linear-gradient(135deg, #0F172A 0%, #1A2744 50%, #162A20 100%);
  }

  /* Navbar */
  .navbar {
    background: rgba(15, 23, 42, 0.85);
    border-bottom-color: var(--divider);
  }

  .navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  }

  /* Cards */
  .step-card,
  .feature-item,
  .feat-card,
  .category-card,
  .home-card {
    background: var(--surface);
    border-color: var(--card-border);
  }

  /* Dashboard previews */
  .dashboard-preview {
    background: var(--surface);
    border-color: var(--card-border);
  }

  /* Phone mockup */
  .phone-mockup {
    background: var(--surface);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.05);
  }

  /* Store badges */
  .store-badge {
    background: var(--surface);
    border: 1px solid var(--card-border);
  }

  /* Avatar borders */
  .avatar {
    border-color: var(--surface);
  }

  /* CTA section */
  .section-cta {
    background: linear-gradient(135deg, #1A2744 0%, #0F172A 100%);
  }

  /* Input fields */
  .demo-input {
    background: var(--surface);
    color: var(--text-primary);
    border-color: var(--divider);
  }

  /* Scroll bar */
  ::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
  }

  ::-webkit-scrollbar-track {
    background: var(--bg);
  }

  /* Skip link */
  .skip-link:focus {
    background: var(--parent);
  }

  /* Preview tasks */
  .preview-task {
    background: var(--surface-elevated);
  }

  /* Images / SVGs on dark bg */
  .nav-logo-icon rect:first-of-type,
  .footer-logo-icon rect:first-of-type {
    opacity: 0.9;
  }
}
