/* SongScribe Website - Watercolor Aesthetic
   Design: Flowing gradient from warm coral/orange to teal/turquoise */

/* =============================================================================
   CSS Custom Properties (Design Tokens)
   ============================================================================= */

:root {
  /* Watercolor Palette */
  --color-coral: #F5A962;
  --color-coral-light: #FBCFA0;
  --color-coral-dark: #E8944D;
  --color-teal: #2D9E9E;
  --color-teal-light: #5FBFBF;
  --color-teal-dark: #1F7A7A;

  /* Brand Colors */
  --color-primary: #FBBF24;
  --color-primary-hover: #F9B910;
  --color-secondary: #2D9E9E;
  --color-secondary-strong: #1F7A7A;

  /* Surface Colors (warmer cream tints) */
  --color-surface-0: #FFFFFF;
  --color-surface-1: #FDF9F3;
  --color-surface-2: #FAF5ED;
  --color-surface-warm: #FFF8F0;

  /* Text Colors */
  --color-text-primary: #2D3748;
  --color-text-secondary: rgba(45, 55, 72, 0.7);
  --color-text-on-dark: #FFFFFF;
  --color-text-on-dark-muted: rgba(255, 255, 255, 0.8);

  /* Border Colors */
  --color-border-subtle: #E8E4DC;
  --color-border-medium: #D4CFC5;

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Spacing Scale */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-xxl: 3rem;
  --space-xxxl: 4rem;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
  --shadow-orange: 0 4px 16px rgba(251, 191, 36, 0.35);
  --shadow-teal: 0 4px 16px rgba(45, 158, 158, 0.25);
  --shadow-coral: 0 4px 16px rgba(245, 169, 98, 0.3);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-Index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-cookie: 1100;
}

/* =============================================================================
   Reset & Base Styles
   ============================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
  /* iOS Safari safe area support */
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-primary);
  background-color: var(--color-surface-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.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;
}

/* =============================================================================
   Typography
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-primary);
}

p {
  margin: 0 0 var(--space-md) 0;
}

a {
  color: var(--color-secondary-strong);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

/* =============================================================================
   Layout
   ============================================================================= */

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

/* =============================================================================
   Header & Navigation
   ============================================================================= */

.header {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--color-border-subtle);
  padding: var(--space-md) var(--space-lg);
  padding-top: max(var(--space-md), env(safe-area-inset-top));
  padding-left: max(var(--space-lg), env(safe-area-inset-left));
  padding-right: max(var(--space-lg), env(safe-area-inset-right));
  z-index: var(--z-sticky);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.logo img {
  height: 72px;
  width: auto;
}

.logo-text {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
}

.nav-links {
  display: flex;
  gap: var(--space-xxl);
  align-items: center;
}

.nav-link {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
  position: relative;
  padding: var(--space-sm) 0;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--color-teal);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-coral), var(--color-teal));
  transition: width var(--transition-fast);
}

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

/* Tuner nav link badge */
.nav-badge {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 6px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background-color: var(--color-primary);
  color: var(--color-text-primary);
  border-radius: var(--radius-full);
  vertical-align: middle;
  line-height: 1.4;
}

.nav-cta {
  display: flex;
  gap: var(--space-md);
}

.nav-cta.mobile {
  display: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-text-primary);
  transition: all var(--transition-base);
  transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background-color: var(--color-surface-0);
    padding: var(--space-lg);
    gap: var(--space-md);
    border-bottom: 1px solid var(--color-border-subtle);
    box-shadow: var(--shadow-lg);
  }

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

  .mobile-menu-toggle {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .nav-cta.mobile {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border-subtle);
  }
}

/* =============================================================================
   Buttons
   ============================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font-family);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: 2px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-primary);
  border-color: var(--color-primary);
}

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

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-primary);
  border-color: var(--color-border-medium);
}

.btn-secondary:hover {
  border-color: var(--color-teal);
  color: var(--color-teal);
}

.btn-teal {
  background-color: var(--color-teal);
  color: var(--color-text-on-dark);
  border-color: var(--color-teal);
}

.btn-teal:hover {
  background-color: var(--color-teal-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-teal);
}

.btn-large {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-lg);
}

.btn-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* =============================================================================
   Hero Section - Watercolor Background
   ============================================================================= */

.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    var(--color-coral-light) 0%,
    var(--color-surface-warm) 25%,
    var(--color-surface-1) 50%,
    var(--color-teal-light) 75%,
    var(--color-teal) 100%
  );
  background-size: 200% 200%;
  animation: watercolorShift 20s ease infinite;
}

@keyframes watercolorShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(245, 169, 98, 0.3) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(45, 158, 158, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 40% 40%, rgba(251, 191, 36, 0.15) 0%, transparent 40%);
  pointer-events: none;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xxl) var(--space-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xxl);
  align-items: center;
  position: relative;
  z-index: 1;
}

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

.hero-phone {
  width: auto;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.12));
}

.hero-content {
  max-width: 560px;
}

/* 3D Logo Container in Hero */
.hero-logo-container {
  position: relative;
  width: 240px;
  height: 240px;
  margin-top: -2rem;
  margin-bottom: var(--space-sm);
  margin-left: auto;
  transform-style: flat;
  isolation: isolate;
}

.hero-logo-container #logo-container {
  display: block;
  width: 240px;
  height: 240px;
}

.hero-logo-container .glass-scene {
  position: relative;
}

/* Hero Tagline SVG */
.hero-tagline-svg {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  margin-bottom: var(--space-lg);
  margin-left: auto;
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
  text-align: right;
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Device Mockup */
.device-mockup {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: var(--color-surface-0);
  border-radius: var(--radius-2xl);
  padding: var(--space-sm);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(0, 0, 0, 0.05);
}

.device-mockup-inner {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--color-surface-1);
  aspect-ratio: 9/16;
}

.device-mockup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device-mockup-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-coral-light), var(--color-teal-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-on-dark);
  font-weight: 600;
  text-align: center;
  padding: var(--space-lg);
}

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding: var(--space-xxl) 0;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    padding: var(--space-lg);
  }

  .hero-visual {
    display: none;
  }

  .hero-phone {
    max-height: 45vh;
  }

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

  .hero-logo-container {
    width: 180px;
    height: 180px;
    margin: 0 auto var(--space-lg);
  }

  .hero-tagline-svg {
    max-width: 320px;
    margin: 0 auto var(--space-lg);
  }

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

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

/* =============================================================================
   Features Section
   ============================================================================= */

.features {
  padding: var(--space-xxxl) 0;
  background-color: var(--color-surface-0);
  position: relative;
}

.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, var(--color-surface-1) 0%, transparent 100%);
  pointer-events: none;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-xxl);
  position: relative;
}

.section-title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-md);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
}

/* Flow Features Section - Centered Cascade */
.section-header--flow {
  max-width: 720px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background: var(--color-surface-2);
  padding: var(--space-xxl) var(--space-xl);
  border-radius: var(--radius-xl);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  margin-bottom: var(--space-xxxl);
}

.section-header--flow .section-title {
  margin-bottom: var(--space-md);
  font-size: var(--text-4xl);
  line-height: 1.2;
}

.section-tagline {
  font-size: var(--text-xl);
  font-weight: 500;
  font-style: italic;
  color: var(--color-teal);
  margin-bottom: var(--space-lg);
  letter-spacing: -0.01em;
}

/* Watercolor gradient divider */
.flow-divider {
  width: 120px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-coral), var(--color-teal));
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
  opacity: 0.7;
}

/* Compact 2x2 value prop grid */
.flow-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: var(--space-sm) var(--space-xl);
  justify-content: center;
}

.flow-features li {
  position: relative;
  padding-left: var(--space-lg);
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.5;
  text-align: left;
}

.flow-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, var(--color-coral), var(--color-teal));
  border-radius: 50%;
}

/* Mobile: Stack to single column */
@media (max-width: 600px) {
  .section-header--flow .section-title {
    font-size: var(--text-3xl);
  }

  .section-tagline {
    font-size: var(--text-lg);
  }

  .flow-features {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    max-width: 220px;
  }
}

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

/* Feature Card - Glass/Frosted Effect */
.feature-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-coral), var(--color-teal));
  opacity: 0;
  transition: opacity var(--transition-base);
}

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

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-coral-light), var(--color-teal-light));
  border-radius: var(--radius-lg);
  font-size: var(--text-2xl);
}

.feature-title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.feature-description {
  color: var(--color-text-secondary);
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.6;
}

.feature-image {
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-coral-light) 0%, var(--color-teal-light) 100%);
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-image-placeholder {
  color: var(--color-text-on-dark);
  font-weight: 500;
  font-size: var(--text-sm);
  padding: var(--space-md);
  text-align: center;
}

@media (max-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: var(--text-3xl);
  }
}

/* =============================================================================
   Feature Showcase - Dynamic Editorial Layout
   ============================================================================= */

.feature-cascade {
  padding: var(--space-xxxl) 0;
  background: linear-gradient(
    180deg,
    var(--color-surface-0) 0%,
    var(--color-surface-warm) 25%,
    var(--color-surface-1) 50%,
    var(--color-surface-warm) 75%,
    var(--color-surface-0) 100%
  );
  overflow: hidden;
}

.feature-showcase {
  display: flex;
  flex-direction: column;
  gap: var(--space-xxxl);
}

/* Showcase Row */
.showcase-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xxl);
  padding: var(--space-xl) 0;
}

.showcase-row--reverse {
  flex-direction: row-reverse;
}

/* Text/SVG Styling */
.showcase-text {
  flex: 0 0 auto;
  max-width: 320px;
}

.showcase-svg {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
}

.showcase-text--left {
  text-align: right;
}

.showcase-text--left .showcase-svg {
  margin-left: auto;
}

.showcase-text--right {
  text-align: left;
}

/* Showcase Captions */
.showcase-caption {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.showcase-caption li {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.showcase-caption--simple {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 0 0;
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.showcase-tagline {
  margin-top: var(--space-sm);
  font-size: var(--text-base);
  font-weight: 500;
  font-style: italic;
  color: var(--color-teal);
  letter-spacing: -0.01em;
}

.showcase-text--left .showcase-caption,
.showcase-text--left .showcase-tagline {
  text-align: right;
}


.showcase-text--right .showcase-caption,
.showcase-text--right .showcase-tagline {
  text-align: left;
}

/* Overlap section captions */
.showcase-text--overlap .showcase-caption,
.showcase-text--overlap .showcase-tagline {
  text-align: left;
}

/* Phone Container Groups */
.showcase-phones {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* =============================================================================
   Phone Screenshots - Safari-Compatible Drop Shadow

   Safari has a bug where drop-shadow on a parent element renders against
   the bounding box instead of the alpha channel. The fix is to:
   1. Apply drop-shadow to the img element directly
   2. Remove hardware acceleration hints (translateZ, backface-visibility)
      from the parent that interfere with alpha compositing
   3. Use will-change: transform on the parent for smooth hover transitions
   4. Add micro-animation to force recomposite on page load
   ============================================================================= */

@keyframes safariDropShadowFix {
  from { transform: translateZ(0); }
  to { transform: translateZ(0); }
}

/* Individual Phone Container */
.phone {
  margin: 0;
  position: relative;
  transition: transform var(--transition-base);
  will-change: transform;
}

/* Drop shadow on the image itself - respects PNG transparency in all browsers */
.phone img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.18));
  transition: filter var(--transition-base);
  animation: safariDropShadowFix 0.001s linear 1;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.phone:hover {
  transform: translateY(-8px) scale(1.03);
  z-index: 20;
}

.phone:hover img {
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.22));
}

/* Phone Sizes */
.phone--sm { width: 140px; }
.phone--md { width: 200px; }
.phone--lg { width: 260px; }
.phone--xl { width: 320px; }
.phone--2xl { width: 480px; }

/* Phone Rotations */
.phone--tilt-left { transform: rotate(-6deg); }
.phone--tilt-right { transform: rotate(6deg); }
.phone--tilt-left:hover { transform: rotate(-6deg) translateY(-8px) scale(1.03); }
.phone--tilt-right:hover { transform: rotate(6deg) translateY(-8px) scale(1.03); }

/* Phone Depth */
.phone--back {
  opacity: 0.85;
  z-index: 1;
}

.phone--front {
  z-index: 10;
}

/* Cluster Layout - 2 phones overlapping */
.showcase-phones--cluster {
  gap: 0;
}

.showcase-phones--cluster .phone--overlap {
  margin-left: -60px;
  margin-top: 40px;
}

/* Triple Layout - 3 phones with center prominent */
.showcase-phones--triple {
  gap: 0;
}

.showcase-phones--triple .phone--back:first-child {
  margin-right: -40px;
  transform: rotate(-8deg);
}

.showcase-phones--triple .phone--back:last-child {
  margin-left: -40px;
  transform: rotate(8deg);
}

.showcase-phones--triple .phone--back:first-child:hover {
  transform: rotate(-8deg) translateY(-8px) scale(1.03);
}

.showcase-phones--triple .phone--back:last-child:hover {
  transform: rotate(8deg) translateY(-8px) scale(1.03);
}

/* Stack Layout - 2 phones staggered */
.showcase-phones--stack {
  gap: 0;
}

.showcase-phones--stack .phone--offset {
  margin-left: -80px;
  margin-top: 60px;
}

/* Fan Layout - 3 phones spread */
.showcase-phones--fan {
  gap: var(--space-md);
}

.showcase-phones--fan .phone:nth-child(2) {
  margin-top: -30px;
}

/* Pair Layout - 2 phones side by side */
.showcase-phones--pair {
  gap: var(--space-md);
}

.showcase-phones--pair .phone:first-child {
  margin-top: 20px;
}

.showcase-phones--pair .phone:last-child {
  margin-top: -20px;
}

/* Spread Layout - 3 phones with varied sizes */
.showcase-phones--spread {
  gap: var(--space-lg);
  align-items: flex-end;
}

.showcase-phones--spread .phone:first-child {
  margin-bottom: 40px;
}

.showcase-phones--spread .phone:last-child {
  margin-bottom: 60px;
}

/* Overlap Layout - Large phone with text overlapping */
.showcase-row--overlap {
  position: relative;
  justify-content: flex-end;
  padding-right: 10%;
}

.showcase-text--overlap {
  position: absolute;
  left: 8%;
  top: 50%;
  transform: translateY(-50%);
  max-width: 400px;
  z-index: 10;
}

.showcase-svg--overlap {
  max-width: 100%;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.3));
}

.showcase-phones--hero {
  position: relative;
}

.showcase-phones--hero .phone--2xl img {
  filter: none;
}

.showcase-phones--hero .phone--2xl:hover {
  transform: translateY(-12px) scale(1.02);
}

.showcase-phones--hero .phone--2xl:hover img {
  filter: none;
}

/* Tablet */
@media (max-width: 1024px) {
  .showcase-row {
    gap: var(--space-xl);
  }

  .showcase-text h3 {
    font-size: var(--text-2xl);
  }

  .phone--sm { width: 110px; }
  .phone--md { width: 160px; }
  .phone--lg { width: 200px; }
  .phone--xl { width: 260px; }
  .phone--2xl { width: 360px; }

  .showcase-row--overlap {
    padding-right: 5%;
  }

  .showcase-text--overlap {
    left: 5%;
    max-width: 300px;
  }

  .showcase-phones--cluster .phone--overlap {
    margin-left: -40px;
    margin-top: 30px;
  }

  .showcase-phones--triple .phone--back:first-child {
    margin-right: -30px;
  }

  .showcase-phones--triple .phone--back:last-child {
    margin-left: -30px;
  }

  .showcase-phones--stack .phone--offset {
    margin-left: -60px;
    margin-top: 40px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .feature-showcase {
    gap: var(--space-xxl);
  }

  .showcase-row,
  .showcase-row--reverse {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .showcase-text,
  .showcase-text--left,
  .showcase-text--right {
    text-align: center;
    max-width: 100%;
  }

  .showcase-svg {
    max-width: 240px;
    margin: 0 auto;
  }

  .showcase-text--left .showcase-svg {
    margin: 0 auto;
  }

  .showcase-caption,
  .showcase-tagline,
  .showcase-text--left .showcase-caption,
  .showcase-text--left .showcase-tagline,
  .showcase-text--right .showcase-caption,
  .showcase-text--right .showcase-tagline {
    text-align: center;
  }

  .showcase-caption {
    align-items: center;
  }


  .phone--sm { width: 100px; }
  .phone--md { width: 140px; }
  .phone--lg { width: 180px; }
  .phone--xl { width: 220px; }
  .phone--2xl { width: 280px; }

  .showcase-row--overlap {
    flex-direction: column;
    padding-right: 0;
  }

  .showcase-text--overlap {
    position: static;
    transform: none;
    left: auto;
    max-width: 100%;
    text-align: center;
    margin-bottom: var(--space-lg);
  }

  .showcase-svg--overlap {
    max-width: 240px;
    margin: 0 auto;
  }

  .showcase-phones--cluster .phone--overlap {
    margin-left: -30px;
    margin-top: 20px;
  }

  .showcase-phones--triple .phone--back:first-child {
    margin-right: -25px;
  }

  .showcase-phones--triple .phone--back:last-child {
    margin-left: -25px;
  }

  .showcase-phones--stack .phone--offset {
    margin-left: -50px;
    margin-top: 30px;
  }

  .showcase-phones--spread {
    gap: var(--space-sm);
  }

  .showcase-phones--spread .phone:first-child {
    margin-bottom: 20px;
  }

  .showcase-phones--spread .phone:last-child {
    margin-bottom: 30px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .phone--sm { width: 80px; }
  .phone--md { width: 110px; }
  .phone--lg { width: 140px; }
  .phone--xl { width: 180px; }
  .phone--2xl { width: 220px; }

  .showcase-svg--overlap {
    max-width: 200px;
  }

  .showcase-text h3 {
    font-size: var(--text-xl);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .phone {
    transition: none;
  }

  .phone img {
    transition: none;
    animation: none;
  }

  .phone:hover {
    transform: none;
  }

  .phone:hover img {
    filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.18));
  }

  .phone--tilt-left:hover,
  .phone--tilt-right:hover {
    transform: rotate(-6deg);
  }

  .phone--tilt-right:hover {
    transform: rotate(6deg);
  }
}

/* =============================================================================
   Screenshot Lightbox
   ============================================================================= */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  pointer-events: none;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, opacity 0.3s ease;
}

.lightbox-overlay.active {
  background: rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  opacity: 1;
  pointer-events: auto;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  transform: scale(0.8);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.lightbox-overlay.active .lightbox-image {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.lightbox-close::before,
.lightbox-close::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 1px;
}

.lightbox-close::before {
  transform: rotate(45deg);
}

.lightbox-close::after {
  transform: rotate(-45deg);
}

/* Make phones clickable */
.phone {
  cursor: zoom-in;
}

/* Reduced motion for lightbox */
@media (prefers-reduced-motion: reduce) {
  .lightbox-overlay,
  .lightbox-image {
    transition: opacity 0.2s ease;
  }

  .lightbox-image {
    transform: scale(1);
  }
}

/* =============================================================================
   How It Works Section
   ============================================================================= */

.how-it-works {
  padding: var(--space-xxxl) 0;
  background: linear-gradient(
    180deg,
    var(--color-surface-0) 0%,
    var(--color-surface-warm) 50%,
    var(--color-surface-1) 100%
  );
}

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

.step {
  text-align: center;
  padding: var(--space-xl);
}

.step-number {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-coral), var(--color-teal));
  color: var(--color-text-on-dark);
  font-size: var(--text-2xl);
  font-weight: 700;
  border-radius: 50%;
}

.step-title {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.step-description {
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.6;
}

.step-visual {
  margin-top: var(--space-lg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-coral-light), var(--color-teal-light));
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.step-visual-placeholder {
  color: var(--color-text-on-dark);
  font-weight: 500;
}

@media (max-width: 768px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xxl);
  }
}

/* =============================================================================
   Newsletter Section
   ============================================================================= */

.newsletter {
  padding: var(--space-xxxl) 0;
  background: var(--color-surface-1);
}

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

.newsletter-title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
}

.newsletter-subtitle {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
}

.newsletter-form {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

.newsletter-input {
  flex: 1;
  max-width: 320px;
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-base);
  font-family: var(--font-family);
  border: 2px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background-color: var(--color-surface-0);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(45, 158, 158, 0.1);
}

.newsletter-help {
  margin-top: var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

@media (max-width: 640px) {
  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-input {
    max-width: 100%;
  }
}

/* =============================================================================
   Final CTA Section
   ============================================================================= */

.final-cta {
  padding: var(--space-xxxl) 0;
  background: linear-gradient(
    135deg,
    var(--color-coral) 0%,
    var(--color-coral-light) 25%,
    var(--color-teal-light) 75%,
    var(--color-teal) 100%
  );
  text-align: center;
}

.final-cta .section-title {
  color: var(--color-text-on-dark);
}

.final-cta .section-subtitle {
  color: var(--color-text-on-dark-muted);
}

.cta-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.final-cta .btn-primary {
  background-color: var(--color-surface-0);
  color: var(--color-text-primary);
  border-color: var(--color-surface-0);
}

.final-cta .btn-primary:hover {
  background-color: var(--color-surface-1);
  box-shadow: var(--shadow-lg);
}

.final-cta .btn-secondary {
  background-color: transparent;
  color: var(--color-text-on-dark);
  border-color: rgba(255, 255, 255, 0.5);
}

.final-cta .btn-secondary:hover {
  border-color: var(--color-text-on-dark);
}

/* =============================================================================
   Footer
   ============================================================================= */

.footer {
  padding: var(--space-xxl) 0 var(--space-xl);
  padding-bottom: max(var(--space-xl), env(safe-area-inset-bottom));
  background-color: var(--color-surface-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xxl);
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  text-decoration: none;
}

.footer-logo img {
  height: 28px;
  width: auto;
}

.footer-logo-text {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text-primary);
}

.footer-tagline {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  margin: 0 0 var(--space-lg);
}

.social-links {
  display: flex;
  gap: var(--space-md);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--color-surface-0);
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: linear-gradient(135deg, var(--color-coral), var(--color-teal));
  color: var(--color-text-on-dark);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.footer-column h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-lg);
  color: var(--color-text-primary);
}

.footer-column a {
  display: block;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-sm);
  transition: color var(--transition-fast);
}

.footer-column a:hover {
  color: var(--color-teal);
}

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.footer-bottom p {
  margin: 0;
}

.platform-icons {
  display: flex;
  gap: var(--space-md);
}

.platform-icon {
  width: 20px;
  height: 20px;
  fill: var(--color-text-secondary);
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.platform-icon:hover {
  opacity: 1;
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-brand {
    grid-column: 1 / -1;
    max-width: 100%;
    margin-bottom: var(--space-lg);
  }
}

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

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
}

/* =============================================================================
   Cookie Consent Banner
   ============================================================================= */

.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--color-surface-0);
  border-top: 1px solid var(--color-border-subtle);
  padding: var(--space-lg);
  padding-bottom: max(var(--space-lg), env(safe-area-inset-bottom));
  padding-left: max(var(--space-lg), env(safe-area-inset-left));
  padding-right: max(var(--space-lg), env(safe-area-inset-right));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  z-index: var(--z-cookie);
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}

.cookie-consent.show {
  transform: translateY(0);
}

.cookie-consent-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

@media (min-width: 640px) {
  .cookie-consent-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

.cookie-consent-content p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-primary);
  flex: 1;
}

.cookie-consent-buttons {
  display: flex;
  gap: var(--space-md);
}

.cookie-button {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-family);
  border: 2px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.cookie-accept {
  background-color: var(--color-primary);
  color: var(--color-text-primary);
  border-color: var(--color-primary);
}

.cookie-accept:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-orange);
}

.cookie-decline {
  background-color: transparent;
  color: var(--color-text-primary);
}

.cookie-decline:hover {
  background-color: var(--color-surface-1);
  border-color: var(--color-text-secondary);
}

/* =============================================================================
   Coming Soon / Legacy Styles (retained for email signup)
   ============================================================================= */

.coming-soon-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  background: linear-gradient(
    135deg,
    var(--color-coral-light) 0%,
    var(--color-surface-warm) 30%,
    var(--color-surface-1) 60%,
    var(--color-teal-light) 100%
  );
  background-size: 200% 200%;
  animation: watercolorShift 20s ease infinite;
}

.coming-soon-content {
  text-align: center;
  max-width: 600px;
  width: 100%;
  z-index: 1;
}

.logo-container {
  margin-bottom: var(--space-xxl);
  min-height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: var(--space-xl);
}

#logo-container {
  width: 100%;
  min-height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.headline {
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--space-lg) 0;
  color: var(--color-text-primary);
}

.tagline {
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-xxxl) 0;
}

.feature-scroller {
  margin-bottom: var(--space-xxxl);
}

.feature-window {
  height: 6rem;
  overflow: hidden;
  position: relative;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
  height: 6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.feature-item {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1.8rem;
  color: var(--color-text-secondary);
  opacity: 0;
  transform: translateY(2.5rem);
  transition:
    opacity 600ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 600ms cubic-bezier(0.4, 0, 0.2, 1),
    font-size 600ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.feature-item--prev {
  opacity: 0.4;
  transform: translateY(-2.5rem);
}

.feature-item--active {
  color: var(--color-text-primary);
  opacity: 1;
  font-weight: 600;
  font-size: var(--text-lg);
  transform: translateY(0);
  pointer-events: auto;
}

.feature-item--next {
  opacity: 0.4;
  transform: translateY(2.5rem);
}

.email-form {
  margin-bottom: var(--space-xxxl);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

@media (min-width: 640px) {
  .form-group {
    flex-direction: row;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
}

.email-input {
  flex: 1;
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-base);
  font-family: var(--font-family);
  border: 2px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background-color: var(--color-surface-0);
  color: var(--color-text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.email-input:focus {
  outline: none;
  border-color: var(--color-teal);
  box-shadow: 0 0 0 3px rgba(45, 158, 158, 0.1);
}

.email-input::placeholder {
  color: var(--color-text-secondary);
}

.notify-button {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-base);
  font-weight: 600;
  font-family: var(--font-family);
  color: var(--color-text-primary);
  background-color: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
}

.notify-button:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-orange);
}

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

.form-help {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0;
}

.coming-soon-footer {
  margin-top: auto;
  padding-top: var(--space-xxl);
  text-align: center;
}

.coming-soon-footer p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0;
}

.coming-soon-footer a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.coming-soon-footer a:hover {
  color: var(--color-teal);
  text-decoration: underline;
}

.coming-soon-footer .platform-icons {
  margin-bottom: var(--space-lg);
}

@media (max-width: 640px) {
  .headline {
    font-size: var(--text-3xl);
  }

  .tagline {
    font-size: var(--text-lg);
  }

  .feature-window {
    height: 12rem;
  }

  .feature-list {
    height: 12rem;
  }

  .feature-item {
    font-size: 0.9rem;
    line-height: 1.4rem;
    padding: 0 var(--space-sm);
    transform: translateY(3.5rem);
  }

  .feature-item--active {
    font-size: 1rem;
    line-height: 1.5rem;
  }

  .feature-item--prev {
    transform: translateY(-3.5rem);
  }

  .feature-item--next {
    transform: translateY(3.5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .feature-window {
    height: auto;
  }

  .feature-list {
    height: auto;
    position: static;
  }

  .feature-item {
    position: static;
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero,
  .coming-soon-container {
    animation: none;
  }
}
