/* Art direction: Casper — magical, playful, nighttime wonder
   Palette: Deep midnight purple/blue, ghostly white glow, starlight sparkles
   Typography: General Sans (display) + DM Sans (body) — friendly and readable for kids
   Audience: Children ages 6-12 — fun, warm, non-scary */

/* ============================================
   DESIGN TOKENS — Casper Magical Night Palette
   ============================================ */

:root, [data-theme="light"] {
  /* 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 */
  --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;

  /* Casper Light Mode — Soft Lavender */
  --color-bg:             #f5f0ff;
  --color-surface:        #ffffff;
  --color-surface-2:      #f0eafc;
  --color-surface-offset: #e6ddf5;
  --color-surface-dynamic: #dbd0f0;
  --color-divider:        #d4c8e8;
  --color-border:         #c5b8dc;

  /* Text */
  --color-text:           #2d1b4e;
  --color-text-muted:     #6b5a82;
  --color-text-faint:     #9a8fb0;
  --color-text-inverse:   #ffffff;

  /* Primary — Ghost Purple */
  --color-primary:        #8b5cf6;
  --color-primary-hover:  #7c3aed;
  --color-primary-active: #6d28d9;
  --color-primary-highlight: #ede9fe;

  /* Night Sky — Deep sections */
  --color-night:          #1a1035;
  --color-night-light:    #2d1b4e;
  --color-night-lighter:  #432e6e;

  /* Accent — Starlight Gold */
  --color-accent:         #fbbf24;
  --color-accent-hover:   #f59e0b;

  /* Ghost Glow */
  --color-glow:           rgba(139, 92, 246, 0.15);
  --color-ghost-white:    #f0e6ff;

  /* Success / Fun */
  --color-success:        #34d399;
  --color-error:          #f87171;

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

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

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(45, 27, 78, 0.06);
  --shadow-md: 0 4px 12px rgba(45, 27, 78, 0.08);
  --shadow-lg: 0 12px 32px rgba(45, 27, 78, 0.12);
  --shadow-xl: 0 20px 48px rgba(45, 27, 78, 0.16);
  --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.2);

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

  /* Fonts */
  --font-display: 'General Sans', 'DM Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
}

/* Dark mode — The default magical night */
[data-theme="dark"] {
  --color-bg:             #0d0a1a;
  --color-surface:        #1a1035;
  --color-surface-2:      #231748;
  --color-surface-offset: #2d1b4e;
  --color-surface-dynamic: #432e6e;
  --color-divider:        #432e6e;
  --color-border:         #5a3f8a;

  --color-text:           #e8e0f5;
  --color-text-muted:     #a99bc4;
  --color-text-faint:     #6b5a82;
  --color-text-inverse:   #1a1035;

  --color-primary:        #a78bfa;
  --color-primary-hover:  #c4b5fd;
  --color-primary-active: #8b5cf6;
  --color-primary-highlight: #2d1b4e;

  --color-night:          #0d0a1a;
  --color-night-light:    #1a1035;
  --color-night-lighter:  #231748;

  --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);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.25);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #0d0a1a;
    --color-surface:        #1a1035;
    --color-surface-2:      #231748;
    --color-surface-offset: #2d1b4e;
    --color-surface-dynamic: #432e6e;
    --color-divider:        #432e6e;
    --color-border:         #5a3f8a;
    --color-text:           #e8e0f5;
    --color-text-muted:     #a99bc4;
    --color-text-faint:     #6b5a82;
    --color-text-inverse:   #1a1035;
    --color-primary:        #a78bfa;
    --color-primary-hover:  #c4b5fd;
    --color-primary-active: #8b5cf6;
    --color-primary-highlight: #2d1b4e;
    --color-night:          #0d0a1a;
    --color-night-light:    #1a1035;
    --color-night-lighter:  #231748;
    --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);
    --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 60px rgba(139, 92, 246, 0.25);
  }
}

/* ============================================
   STARS BACKGROUND
   ============================================ */
.stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.stars::before,
.stars::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: #fff;
  box-shadow:
    80px 120px 0 #fff,
    200px 80px 0 rgba(255,255,255,0.6),
    350px 200px 0 #fff,
    500px 60px 0 rgba(255,255,255,0.4),
    650px 180px 0 #fff,
    800px 100px 0 rgba(255,255,255,0.5),
    950px 250px 0 #fff,
    120px 300px 0 rgba(255,255,255,0.6),
    300px 350px 0 #fff,
    450px 280px 0 rgba(255,255,255,0.4),
    600px 320px 0 #fff,
    750px 380px 0 rgba(255,255,255,0.5),
    900px 340px 0 #fff,
    1050px 150px 0 rgba(255,255,255,0.6),
    160px 450px 0 #fff,
    400px 500px 0 rgba(255,255,255,0.3),
    700px 480px 0 #fff,
    280px 550px 0 rgba(255,255,255,0.5);
  animation: twinkle 4s ease-in-out infinite alternate;
}

.stars::after {
  width: 1px;
  height: 1px;
  box-shadow:
    50px 200px 0 rgba(255,255,255,0.5),
    180px 150px 0 rgba(255,255,255,0.3),
    320px 100px 0 rgba(255,255,255,0.4),
    470px 250px 0 rgba(255,255,255,0.3),
    580px 50px 0 rgba(255,255,255,0.5),
    720px 220px 0 rgba(255,255,255,0.3),
    860px 180px 0 rgba(255,255,255,0.4),
    1000px 300px 0 rgba(255,255,255,0.3),
    100px 400px 0 rgba(255,255,255,0.4),
    250px 480px 0 rgba(255,255,255,0.3),
    550px 420px 0 rgba(255,255,255,0.5),
    830px 460px 0 rgba(255,255,255,0.3);
  animation-delay: 2s;
}

[data-theme="light"] .stars::before,
[data-theme="light"] .stars::after {
  opacity: 0;
}

@keyframes twinkle {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* ============================================
   LAYOUT & COMPONENTS
   ============================================ */

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: color-mix(in oklch, var(--color-bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in oklch, var(--color-border) 40%, transparent);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--color-text);
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  object-fit: cover;
  filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.3));
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-interactive);
}

.btn-primary {
  background: var(--color-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md), var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
}

.btn-ghost:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}

.theme-toggle:hover {
  background: var(--color-surface-2);
  color: var(--color-text);
}

/* --- Hero Section --- */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-32) var(--space-6) var(--space-16);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 60% at 50% 0%, color-mix(in oklch, var(--color-primary) 10%, transparent), transparent),
    radial-gradient(ellipse 60% 40% at 80% 20%, color-mix(in oklch, var(--color-accent) 4%, transparent), transparent);
  pointer-events: none;
}

.hero-content {
  max-width: var(--content-wide);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--color-text);
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 48ch;
}

.hero-cta {
  display: flex;
  gap: var(--space-4);
  padding-top: var(--space-4);
}

.hero-cta .btn {
  padding: var(--space-3) var(--space-8);
  font-size: var(--text-base);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.casper-hero-image {
  width: 320px;
  height: auto;
  filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.25)) brightness(1.1);
  animation: ghostFloat 5s ease-in-out infinite;
  border-radius: var(--radius-2xl);
  background: color-mix(in oklch, var(--color-bg) 60%, var(--color-primary));
  padding: var(--space-4);
  object-fit: contain;
}

@keyframes ghostFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-12px) rotate(1deg); }
  50% { transform: translateY(-20px) rotate(0deg); }
  75% { transform: translateY(-8px) rotate(-1deg); }
}

.hero-glow {
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklch, var(--color-primary) 15%, transparent), transparent 70%);
  pointer-events: none;
  z-index: -1;
  animation: glowPulse 4s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* --- Subdomain Claim Section --- */
.claim-section {
  padding: clamp(var(--space-16), 8vw, var(--space-32)) var(--space-6);
  background: var(--color-night);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.claim-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 60% 50% at 30% 50%, color-mix(in oklch, var(--color-primary) 8%, transparent), transparent),
    radial-gradient(ellipse 40% 60% at 70% 30%, color-mix(in oklch, var(--color-accent) 5%, transparent), transparent);
  pointer-events: none;
}

.claim-inner {
  max-width: var(--content-default);
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.claim-inner .section-label {
  color: var(--color-accent);
}

.claim-inner .section-title {
  color: #ffffff;
  margin-bottom: var(--space-4);
}

.claim-inner .section-desc {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--space-10);
}

.claim-box {
  max-width: 560px;
  margin: 0 auto;
  background: var(--color-night-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-glow);
}

.claim-input-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-night);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-2) var(--space-3);
  transition: border-color var(--transition-interactive);
}

.claim-input-row:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--color-primary) 15%, transparent);
}

.claim-input {
  flex: 1;
  padding: var(--space-3) var(--space-3);
  background: transparent;
  border: none;
  font-size: var(--text-lg);
  font-family: var(--font-display);
  font-weight: 600;
  color: #ffffff;
  outline: none;
  min-width: 0;
}

.claim-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
  font-weight: 400;
}

.claim-suffix {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-body);
  white-space: nowrap;
  flex-shrink: 0;
}

.claim-btn {
  margin-top: var(--space-5);
  width: 100%;
  padding: var(--space-4);
  font-size: var(--text-base);
  font-weight: 600;
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--transition-interactive);
}

.claim-btn:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.claim-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.claim-status {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  min-height: 1.5em;
  transition: all var(--transition-slow);
}

.claim-status.available {
  color: var(--color-success);
}

.claim-status.taken {
  color: var(--color-error);
}

.claim-status.claimed {
  color: var(--color-accent);
}

.claim-confetti {
  font-size: var(--text-lg);
  margin-top: var(--space-4);
  animation: celebrateBounce 0.5s ease-out;
}

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

.claim-success-msg {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  line-height: 1.5;
}

.visit-site-link {
  display: inline-block;
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-6);
  background: var(--color-accent);
  color: var(--color-text-inverse);
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--text-base);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  animation: celebrateBounce 0.5s ease-out 0.3s both;
}

.visit-site-link:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
}

/* ============================================
   SOCIAL PROOF — Activity Bar + Claim Toasts
   ============================================ */

/* --- Activity Bar (below claim box) --- */
.activity-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.activity-bar.visible {
  opacity: 1;
}

.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  flex-shrink: 0;
  animation: activityPulse 2s ease-in-out infinite;
}

@keyframes activityPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--color-success); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px transparent; }
}

.activity-text {
  white-space: nowrap;
}

.activity-count {
  font-weight: 600;
  color: var(--color-text);
}

/* --- Ghost Birth Toasts (bottom-left, ghosts float up into existence) --- */
.claim-toast-container {
  position: fixed;
  bottom: var(--space-6);
  left: var(--space-6);
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-3);
  z-index: 1000;
  pointer-events: none;
  max-height: 50vh;
  overflow: hidden;
}

.claim-toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: var(--space-3) var(--space-5) var(--space-3) var(--space-3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25),
              0 0 40px rgba(167, 139, 250, 0.08);
  pointer-events: auto;
  min-width: 240px;
  max-width: 320px;
  animation: ghostBorn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

/* Highlight when it's YOUR claim */
.claim-toast.is-you {
  border-color: var(--color-accent);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25),
              0 0 60px rgba(167, 139, 250, 0.2);
}

.claim-toast.exiting {
  animation: ghostAscend 0.6s ease forwards;
}

/* Ghost materialises: fades in from below with a soft scale */
@keyframes ghostBorn {
  0% {
    transform: translateY(30px) scale(0.6);
    opacity: 0;
    filter: blur(4px);
  }
  60% {
    filter: blur(0);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
    filter: blur(0);
  }
}

/* Ghost floats up and fades out when dismissed */
@keyframes ghostAscend {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-30px) scale(0.85);
    opacity: 0;
  }
}

.toast-ghost-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.2), rgba(125, 211, 252, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
  animation: ghostBreathe 3s ease-in-out infinite;
}

.claim-toast.is-you .toast-ghost-avatar {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.35), rgba(125, 211, 252, 0.3));
}

@keyframes ghostBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05) translateY(-2px); }
}

.toast-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.toast-name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.toast-detail {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  line-height: 1.3;
}

.toast-you-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-top: 1px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .claim-toast-container {
    left: var(--space-3);
    right: var(--space-3);
    bottom: var(--space-3);
  }

  .claim-toast {
    min-width: unset;
    max-width: unset;
    width: 100%;
  }
}

/* --- Gallery Strip (Infinite Scroll) --- */
.gallery-strip {
  padding: var(--space-8) 0;
  background: var(--color-surface);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.gallery-track {
  display: flex;
  gap: var(--space-4);
  animation: galleryScroll 40s linear infinite;
  width: max-content;
}

.gallery-img {
  width: 280px;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  flex-shrink: 0;
  border: 2px solid var(--color-border);
  transition: all var(--transition-slow);
  filter: saturate(1.1);
}

.gallery-img:hover {
  transform: scale(1.04);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

@keyframes galleryScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.gallery-strip:hover .gallery-track {
  animation-play-state: paused;
}

@media (max-width: 768px) {
  .gallery-img {
    width: 200px;
    height: 115px;
  }
  .gallery-track {
    gap: var(--space-3);
  }
}

/* --- Features Section --- */
.features {
  padding: clamp(var(--space-16), 8vw, var(--space-32)) var(--space-6);
  background: var(--color-surface);
  position: relative;
  z-index: 1;
}

.section-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-16);
}

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

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

.section-desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 56ch;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.feature-card {
  padding: var(--space-8);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  transition: all var(--transition-slow);
}

.feature-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-4px);
}

/* Feature cards with images */
.feature-card--has-image {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.feature-image-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
}

.feature-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
  filter: saturate(1.15) brightness(1.05);
}

.feature-card--has-image:hover .feature-image {
  transform: scale(1.06);
}

.feature-body {
  padding: var(--space-6) var(--space-8) var(--space-8);
}

.feature-body .feature-title {
  margin-bottom: var(--space-3);
}

@media (max-width: 768px) {
  .feature-image-wrap {
    height: 150px;
  }
  .feature-body {
    padding: var(--space-5) var(--space-6) var(--space-6);
  }
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
  font-size: 24px;
}

.feature-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.feature-desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- Demo Section (Chat) --- */
.demo-section {
  padding: clamp(var(--space-16), 8vw, var(--space-32)) var(--space-6);
  background: var(--color-bg);
  position: relative;
  z-index: 1;
}

.demo-layout {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-12);
  align-items: start;
}

.demo-text {
  position: sticky;
  top: calc(80px + var(--space-8));
}

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

.demo-text p {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.demo-suggestions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.suggestion-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-interactive);
}

.suggestion-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-highlight);
}

/* --- Chat Window --- */
.chat-window {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  display: flex;
  flex-direction: column;
  height: 600px;
  position: relative;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-divider);
  background: var(--color-surface-2);
  position: relative;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--color-primary-highlight);
  filter: brightness(1.1);
}

.chat-header-info h3 {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.chat-header-info p {
  font-size: var(--text-xs);
  color: var(--color-success);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.chat-header-info p::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-success);
}

.chat-header-badge {
  margin-left: auto;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: color-mix(in oklch, var(--color-success) 12%, transparent);
  color: var(--color-success);
  flex-shrink: 0;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  scroll-behavior: smooth;
}

.chat-messages::-webkit-scrollbar {
  width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: var(--radius-full);
}

.message {
  display: flex;
  gap: var(--space-3);
  max-width: 85%;
  animation: messageIn 300ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

.message-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
  margin-top: var(--space-1);
}

.message-bubble {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-xl);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.message-bot .message-bubble {
  background: var(--color-surface-2);
  color: var(--color-text);
  border-bottom-left-radius: var(--radius-sm);
}

.message-user .message-bubble {
  background: var(--color-primary);
  color: #ffffff;
  border-bottom-right-radius: var(--radius-sm);
}

.message-typing .message-bubble {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: var(--space-3) var(--space-5);
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-faint);
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

.chat-input-area {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-top: 1px solid var(--color-divider);
  background: var(--color-surface);
}

.chat-input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-interactive);
}

.chat-input::placeholder {
  color: var(--color-text-faint);
}

.chat-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 15%, transparent);
}

.chat-send {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #ffffff;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  transition: all var(--transition-interactive);
}

.chat-send:hover {
  background: var(--color-primary-hover);
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.chat-send svg {
  width: 18px;
  height: 18px;
}

/* --- Model Loading Overlay --- */
.model-load-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: color-mix(in oklch, var(--color-surface) 95%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.model-load-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.model-load-content {
  text-align: center;
  padding: var(--space-8);
  max-width: 320px;
}

.model-load-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-highlight);
  color: var(--color-primary);
  border-radius: var(--radius-xl);
  margin: 0 auto var(--space-5);
  animation: loadIconPulse 2s ease-in-out infinite;
}

@keyframes loadIconPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.model-load-content h4 {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.model-load-name {
  font-size: var(--text-xs);
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: var(--space-5);
}

.progress-track {
  width: 100%;
  height: 4px;
  background: var(--color-surface-offset);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-3);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
  width: 0%;
}

.model-load-status {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}

.skip-load-btn {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  transition: all var(--transition-interactive);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.skip-load-btn:hover {
  color: var(--color-text-muted);
  background: var(--color-surface-2);
}

/* --- How It Works --- */
.how-it-works {
  padding: clamp(var(--space-16), 8vw, var(--space-32)) var(--space-6);
  background: var(--color-night);
  color: #ffffff;
  position: relative;
  z-index: 1;
}

.how-it-works .section-label {
  color: var(--color-accent);
}

.how-it-works .section-title {
  color: #ffffff;
}

.how-it-works .section-desc {
  color: rgba(255, 255, 255, 0.6);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.step-card {
  padding: var(--space-8);
  background: var(--color-night-light);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  position: relative;
}

.step-number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary);
  opacity: 0.3;
  margin-bottom: var(--space-4);
}

.step-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: #ffffff;
  margin-bottom: var(--space-3);
}

.step-desc {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

/* --- Inference Status Badge (Header) --- */
.inference-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
  transition: all var(--transition-slow);
  white-space: nowrap;
}

.inference-local {
  background: color-mix(in oklch, var(--color-success) 15%, transparent);
  color: var(--color-success);
  border: 1px solid color-mix(in oklch, var(--color-success) 30%, transparent);
}

.inference-cloud {
  background: color-mix(in oklch, var(--color-accent) 15%, transparent);
  color: var(--color-accent);
  border: 1px solid color-mix(in oklch, var(--color-accent) 30%, transparent);
}

.inference-loading {
  background: color-mix(in oklch, var(--color-primary) 10%, transparent);
  color: var(--color-primary);
  border: 1px solid color-mix(in oklch, var(--color-primary) 20%, transparent);
}

.inference-detecting {
  background: color-mix(in oklch, var(--color-text-faint) 10%, transparent);
  color: var(--color-text-faint);
  border: 1px solid color-mix(in oklch, var(--color-text-faint) 20%, transparent);
}

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

.status-local {
  background: var(--color-success);
  box-shadow: 0 0 6px var(--color-success);
}

.status-cloud {
  background: var(--color-accent);
  box-shadow: 0 0 6px var(--color-accent);
}

.status-loading {
  background: var(--color-primary);
  animation: statusPulse 1.5s ease-in-out infinite;
}

.status-detecting {
  background: var(--color-text-faint);
  animation: statusPulse 1.5s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* --- Device Tier Table --- */
.device-table-wrapper {
  margin-top: var(--space-16);
  overflow-x: auto;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.device-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  text-align: left;
}

.device-table thead th {
  padding: var(--space-4) var(--space-5);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.device-table tbody td {
  padding: var(--space-4) var(--space-5);
  color: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}

.device-table tbody tr:last-child td {
  border-bottom: none;
}

.device-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.cost-free {
  color: var(--color-success);
  font-weight: 600;
}

.cost-cloud {
  color: var(--color-accent);
  font-weight: 500;
}

/* --- Hero Tech Stack Pills --- */
.hero-tech-stack {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding-top: var(--space-2);
}

.tech-pill {
  display: inline-flex;
  padding: var(--space-1) var(--space-3);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
}

/* --- Casper Story Section --- */
.casper-story {
  padding: clamp(var(--space-16), 8vw, var(--space-32)) var(--space-6);
  background: var(--color-surface);
  position: relative;
  z-index: 1;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.story-image-stack {
  position: relative;
  padding: var(--space-8);
}

.story-img {
  border-radius: var(--radius-2xl);
  border: 2px solid var(--color-border);
  filter: saturate(1.15) brightness(1.05);
}

.story-img--main {
  width: 100%;
  display: block;
  box-shadow: var(--shadow-xl);
}

.story-img--accent {
  position: absolute;
  width: 45%;
  bottom: 0;
  left: 0;
  box-shadow: var(--shadow-lg);
  border: 3px solid var(--color-surface);
}

.story-text .section-title {
  text-align: left;
}

.story-body {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}

@media (max-width: 768px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .story-image-stack {
    padding: var(--space-4);
    max-width: 400px;
    margin: 0 auto;
  }
  .story-text {
    text-align: center;
  }
  .story-text .section-title {
    text-align: center;
  }
}

/* --- CTA Section --- */
.cta-section {
  padding: clamp(var(--space-16), 8vw, var(--space-32)) var(--space-6);
  background: var(--color-bg);
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-inner {
  max-width: var(--content-default);
  margin: 0 auto;
}

.cta-casper-image {
  width: 200px;
  height: auto;
  border-radius: var(--radius-2xl);
  margin-bottom: var(--space-8);
  filter: drop-shadow(0 0 30px rgba(139, 92, 246, 0.2)) saturate(1.15) brightness(1.05);
  border: 2px solid var(--color-border);
}

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

.cta-desc {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  max-width: 48ch;
  margin-inline: auto;
}

.cta-input-group {
  display: flex;
  gap: var(--space-3);
  max-width: 480px;
  margin: 0 auto var(--space-4);
}

.cta-input {
  flex: 1;
  padding: var(--space-3) var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  color: var(--color-text);
  outline: none;
}

.cta-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--color-primary) 15%, transparent);
}

.cta-fine {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* --- Footer --- */
.site-footer {
  padding: var(--space-8) var(--space-6);
  border-top: 1px solid var(--color-divider);
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

.footer-copy a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.footer-copy a:hover {
  color: var(--color-primary);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-8);
  }

  .hero-text {
    align-items: center;
  }

  .hero-subtitle {
    max-width: 100%;
  }

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

  .hero-visual {
    order: -1;
  }

  .casper-hero-image {
    width: 220px;
  }

  .features-grid,
  .steps-grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .demo-layout {
    grid-template-columns: 1fr;
  }

  .demo-text {
    position: static;
  }

  .chat-window {
    height: 500px;
  }

  .footer-inner {
    flex-direction: column;
    gap: var(--space-3);
  }

  .header-actions .btn-ghost {
    display: none;
  }

  .inference-badge .status-label {
    display: none;
  }

  .device-table-wrapper {
    margin-top: var(--space-8);
  }

  .hero-tech-stack {
    justify-content: center;
  }

  .claim-input-row {
    flex-direction: column;
    align-items: stretch;
  }

  .claim-suffix {
    text-align: center;
    padding-bottom: var(--space-2);
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: var(--space-3) var(--space-4);
  }

  .hero {
    padding-top: var(--space-24);
  }

  .cta-input-group {
    flex-direction: column;
  }
}

/* ============================================
   VINTAGE CRT TV COMPONENT
   ============================================ */

.vintage-tv {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  perspective: 800px;
}

.tv-body {
  position: relative;
  background: #1a1a2e;
  border-radius: 24px;
  padding: 20px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

/* Subtle wood-grain texture on body */
.tv-body::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    rgba(88, 56, 30, 0.15) 0%,
    rgba(60, 40, 20, 0.08) 50%,
    rgba(88, 56, 30, 0.12) 100%
  );
  pointer-events: none;
}

.tv-screen-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #0a0a0a;
  box-shadow:
    inset 0 0 30px rgba(0, 0, 0, 0.8),
    inset 0 0 2px 1px rgba(255, 255, 255, 0.03);
}

/* CRT curvature effect */
.tv-screen-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: radial-gradient(
    ellipse 120% 120% at 50% 50%,
    transparent 50%,
    rgba(0, 0, 0, 0.3) 100%
  );
  pointer-events: none;
  z-index: 4;
}

.tv-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
  z-index: 1;
}

.tv-video.playing {
  opacity: 1;
}

/* Snow/static canvas */
.tv-snow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.8s ease;
}

.tv-snow.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Scan lines overlay */
.tv-scanlines {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 4px
  );
  mix-blend-mode: multiply;
}

/* Screen reflection/glare */
.tv-glare {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06) 0%,
    transparent 40%,
    transparent 60%,
    rgba(255, 255, 255, 0.02) 100%
  );
  border-radius: 14px;
}

/* TV base/stand */
.tv-base {
  width: 60%;
  height: 10px;
  margin: 0 auto;
  margin-top: -2px;
  background: linear-gradient(to bottom, #1a1a2e, #12121f);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* TV label (episode title) */
.tv-label {
  text-align: center;
  margin-top: var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-style: italic;
  letter-spacing: 0.02em;
}

/* Power indicator light */
.tv-power {
  position: absolute;
  bottom: 8px;
  right: 16px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #333;
  box-shadow: none;
  transition: all 0.4s ease;
  z-index: 6;
}

.tv-power.on {
  background: #4ade80;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

/* Hero TV placement */
.hero-tv-wrap {
  margin-top: var(--space-8);
}

/* Feature TV - inline with content */
.feature-tv-wrap {
  margin: var(--space-12) auto;
  max-width: 560px;
}

/* Story TV - alongside text */
.story-tv-wrap {
  width: 100%;
}

/* Responsive TV sizing */
@media (max-width: 768px) {
  .vintage-tv {
    max-width: 340px;
  }

  .tv-body {
    padding: 14px;
    border-radius: 18px;
  }

  .tv-screen-wrap {
    border-radius: 10px;
  }
}

@media (max-width: 480px) {
  .vintage-tv {
    max-width: 280px;
  }

  .tv-body {
    padding: 10px;
    border-radius: 14px;
  }

  .tv-screen-wrap {
    border-radius: 8px;
  }
}
