/* Stone App Marketing Website - Core Design System & Styling */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Colors */
  --bg-primary: #090B0D;
  --bg-secondary: #111417;
  --bg-tertiary: #191E23;
  
  --accent: #10B981;
  --accent-glow: rgba(16, 185, 129, 0.15);
  --accent-light: #34D399;
  
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  
  --border-muted: #1E293B;
  --border-active: #334155;
  --border-accent: rgba(16, 185, 129, 0.3);
  
  /* Fonts */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
  
  /* Layout */
  --container-max: 1200px;
  --header-height: 80px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-active);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-bottom: 0.75rem;
}

p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
}

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

strong {
  color: var(--text-primary);
}

/* Utility Layouts */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: clamp(4rem, 8vw, 7.5rem) 0;
  position: relative;
  border-bottom: 1px solid var(--border-muted);
}

.section-alt {
  background-color: var(--bg-secondary);
}

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

.text-gradient {
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-accent {
  color: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--accent-glow);
  color: var(--accent-light);
  border: 1px solid var(--border-accent);
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (max-width: 968px) {
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
    gap: 3rem;
  }
}

@media (max-width: 576px) {
  .grid-3, .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
  background-color: rgba(9, 11, 13, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-muted);
  transition: var(--transition-smooth);
}

.header-scrolled {
  background-color: rgba(9, 11, 13, 0.92);
  height: 70px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.logo-dot {
  width: 10px;
  height: 10px;
  background-color: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: pulse-dot 2s infinite;
}

.logo-waveform {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 24px;
}

.logo-bar {
  width: 3px;
  background-color: var(--accent);
  border-radius: 10px;
}

.logo-bar:nth-child(1) { height: 10px; animation: bounce-bar 1.2s infinite ease-in-out; }
.logo-bar:nth-child(2) { height: 20px; animation: bounce-bar 0.9s infinite ease-in-out 0.15s; }
.logo-bar:nth-child(3) { height: 14px; animation: bounce-bar 1.5s infinite ease-in-out 0.3s; }
.logo-bar:nth-child(4) { height: 18px; animation: bounce-bar 1.1s infinite ease-in-out 0.05s; }
.logo-bar:nth-child(5) { height: 8px; animation: bounce-bar 1.3s infinite ease-in-out 0.4s; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

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

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  background-color: var(--accent);
  color: var(--bg-primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 1.25rem;
  border-radius: 8px;
  transition: var(--transition-fast);
}

.nav-cta:hover {
  background-color: var(--accent-light);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
  width: 44px;
  height: 44px;
  padding: 10px;
}

.menu-bar {
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: var(--transition-smooth);
}

@media (max-width: 968px) {
  .menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-muted);
    flex-direction: column;
    padding: calc(var(--header-height) + 2rem) 2rem 2rem;
    align-items: flex-start;
    gap: 1.5rem;
    transition: var(--transition-smooth);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  }
  
  .nav-menu.open {
    right: 0;
  }
  
  .menu-toggle.open .menu-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .menu-toggle.open .menu-bar:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.open .menu-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* Buttons & Interactive Elements */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 0.95rem 2.25rem;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background-color: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
}

.btn-primary:hover {
  background-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.35);
}

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

.btn-secondary:hover {
  border-color: var(--text-primary);
  background-color: rgba(255,255,255,0.03);
  transform: translateY(-2px);
}

.btn-sm {
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Card Styles */
.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-muted);
  border-radius: 20px;
  padding: 2.25rem;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.card:hover {
  border-color: var(--border-active);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.card-accent {
  border: 1px solid var(--border-accent);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(16, 185, 129, 0.02) 100%);
}

.card-accent:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.05);
}

.card-icon {
  width: 48px;
  height: 48px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  transition: var(--transition-smooth);
}

.card:hover .card-icon {
  background-color: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  transform: scale(1.05);
}

/* Hero Section */
.hero {
  padding-top: calc(var(--header-height) + 4rem);
  padding-bottom: 6rem;
  overflow: hidden;
  background: radial-gradient(circle at 80% 30%, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
}

.hero-subtitle {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 2rem;
}

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

.hero-bg-glow {
  position: absolute;
  width: 350px;
  height: 350px;
  background: var(--accent);
  filter: blur(120px);
  opacity: 0.15;
  z-index: 1;
  pointer-events: none;
}

/* Interactive Device Mockup (CSS & SVG) */
.device-mockup {
  position: relative;
  width: 320px;
  height: 640px;
  background-color: #0d0f11;
  border: 12px solid #202428;
  border-radius: 40px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 0 2px #2d3238;
  overflow: hidden;
  z-index: 2;
}

/* Speaker notch */
.device-mockup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 25px;
  background-color: #202428;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
  z-index: 10;
}

.device-screen {
  width: 100%;
  height: 100%;
  background-color: #090B0D; /* Scaffold background - StoneColors.ink */
  display: flex;
  flex-direction: column;
  padding: 24px 0 0 0; /* Align clean, M3 NavigationBar at bottom, so no bottom padding here */
  font-family: var(--font-body);
  user-select: none;
  font-size: 13px;
  color: #F8FAFC;
}

/* App Header Frame */
.app-header-frame {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 14px 8px 14px;
  background-color: #090B0D;
}

.app-header-text {
  display: flex;
  flex-direction: column;
}

.app-header-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: #F8FAFC;
  line-height: 1.2;
}

.app-header-subtitle {
  font-size: 11px;
  color: #94A3B8;
  margin-top: 2px;
}

/* Header Play Action Button */
.app-header-action {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #1E293B;
  background: transparent;
  color: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
  padding: 6px;
}

.app-header-action:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: #94A3B8;
}

.app-header-action svg {
  width: 100%;
  height: 100%;
}

/* Scrollable Screen Body */
.app-screen-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: none; /* Hide scrollbars for crisp mockup */
}

.app-screen-body::-webkit-scrollbar {
  display: none;
}

/* Add Track Layer Button (StoneButton) */
.app-add-layer-btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: none;
  background-color: #10B981; /* StoneColors.green */
  color: #090B0D; /* StoneColors.ink */
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: transform var(--transition-fast), background-color var(--transition-fast);
}

.app-add-layer-btn:hover {
  background-color: #34D399;
  transform: translateY(-1px);
}

.app-add-layer-btn svg {
  width: 14px;
  height: 14px;
}

/* Tracks List */
.app-tracks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 24px;
}

/* Track Card (Material 3 Card) */
.app-track-card {
  background-color: #191E23; /* StoneColors.panelRaised */
  border: 1px solid #1E293B; /* StoneColors.line */
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.app-track-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-track-name {
  font-weight: 700;
  font-size: 13px;
  color: #F8FAFC;
}

.app-track-type-label {
  font-size: 11px;
  color: #94A3B8;
}

/* Waveform Preview */
.app-waveform-preview {
  height: 48px;
  background-color: #111417; /* StoneColors.panel */
  border: 1px solid #1E293B; /* StoneColors.line */
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
}

.app-waveform-bars {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
}

.w-bar {
  flex: 1;
  background-color: #10B981; /* StoneColors.green */
  border-radius: 2px;
  min-height: 4px;
  transition: height 0.15s ease, background-color 0.15s ease;
}

/* Active playback pulse animation class */
.playing-bars .w-bar {
  animation: bar-dance 1.2s infinite ease-in-out alternate;
}

/* Vary animation delays for realistic waveform playback */
.playing-bars .w-bar:nth-child(3n) { animation-delay: 0.2s; }
.playing-bars .w-bar:nth-child(3n+1) { animation-delay: 0.4s; }
.playing-bars .w-bar:nth-child(3n+2) { animation-delay: 0.6s; }

@keyframes bar-dance {
  0% {
    transform: scaleY(1);
  }
  100% {
    transform: scaleY(0.4);
  }
}

/* Volume Slider Row */
.app-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.app-slider-label {
  width: 44px;
  color: #F8FAFC;
  font-weight: 500;
}

.app-slider-track-wrap {
  flex: 1;
  height: 18px;
  display: flex;
  align-items: center;
  position: relative;
}

.app-slider-track {
  width: 100%;
  height: 4px;
  background-color: #1E293B; /* StoneColors.line */
  border-radius: 2px;
  position: relative;
}

.app-slider-fill {
  height: 100%;
  background-color: #10B981; /* StoneColors.green */
  border-radius: 2px;
  position: absolute;
  left: 0;
  top: 0;
}

.app-slider-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #10B981;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.app-slider-value {
  width: 32px;
  text-align: right;
  color: #94A3B8;
  font-weight: 700;
}

/* Chips Row */
.app-chips-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.app-chip {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #1E293B;
  background-color: #191E23;
  color: #F8FAFC;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.app-chip.selected {
  background-color: rgba(16, 185, 129, 0.22); /* Selected chip color */
  border-color: #10B981;
}

.app-chip.selected-muted {
  background-color: rgba(148, 163, 184, 0.15);
  border-color: #94A3B8;
  color: #94A3B8;
}

.app-chip.action-chip {
  background-color: #191E23;
  border-color: #1E293B;
}

.chip-icon {
  width: 12px;
  height: 12px;
}

/* Card Footer */
.app-track-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #1E293B;
  padding-top: 8px;
  margin-top: 2px;
}

.app-track-status {
  font-size: 10px;
  color: #94A3B8;
}

.app-track-delete {
  font-size: 11px;
  font-weight: 700;
  color: #FF6B6B; /* StoneColors.red */
  cursor: pointer;
}

/* Material 3 Bottom Navigation Bar */
.app-bottom-nav {
  height: 64px;
  background-color: #111417; /* StoneColors.panel */
  border-top: 1px solid #1E293B; /* StoneColors.line */
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 4px;
}

.app-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  color: #94A3B8;
  cursor: pointer;
  position: relative;
  height: 100%;
  justify-content: center;
}

.app-nav-item.active {
  color: #F8FAFC;
}

.nav-icon {
  width: 20px;
  height: 20px;
  z-index: 2;
}

.nav-label {
  font-size: 9px;
  font-weight: 700;
  z-index: 2;
}

/* M3 navigation active pill indicator */
.nav-indicator {
  position: absolute;
  top: 8px;
  width: 48px;
  height: 26px;
  background-color: rgba(16, 185, 129, 0.18);
  border-radius: 16px;
  z-index: 1;
}

/* Compare Problem Section */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
}

.compare-row {
  border-bottom: 1px solid var(--border-muted);
}

.compare-row th {
  padding: 1.25rem 1rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-align: left;
}

.compare-row td {
  padding: 1.25rem 1rem;
  font-size: 1rem;
}

.compare-check {
  color: var(--accent);
  font-weight: bold;
}

.compare-cross {
  color: #EF4444;
  font-weight: bold;
}

/* Feature grid additional details */
.feature-icon-wrapper {
  margin-bottom: 1rem;
}

/* Interactive auto-mix visualizer */
.automix-demo {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-muted);
  border-radius: 20px;
  padding: 2rem;
  margin-top: 3rem;
}

.mixer-channels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .mixer-channels {
    grid-template-columns: 1fr;
  }
}

.mixer-channel {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  padding: 1.25rem;
}

.mixer-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
}

.mixer-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mixer-slider-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mixer-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border-muted);
  border-radius: 2px;
  outline: none;
}

.mixer-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.mixer-slider::-webkit-slider-thumb:hover {
  background: var(--accent);
}

.mixer-pan-wrap {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.mixer-pan-dot {
  width: 10px;
  height: 10px;
  background-color: var(--border-active);
  border-radius: 50%;
  margin: 0 auto;
  position: relative;
  transition: transform var(--transition-smooth), background var(--transition-smooth);
}

.mixer-pan-dot.panned-l {
  transform: translateX(-15px);
  background-color: var(--accent);
}

.mixer-pan-dot.panned-r {
  transform: translateX(15px);
  background-color: var(--accent);
}

.mixer-pan-dot.panned-c {
  transform: translateX(0);
  background-color: var(--border-active);
}

/* Audio Cleanup simulator */
.cleanup-simulator {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.cleanup-visualizer {
  height: 80px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.cleanup-wave-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 1rem;
}

.cleanup-bar {
  width: 4px;
  height: 20%;
  background-color: var(--text-muted);
  border-radius: 2px;
  transition: height var(--transition-smooth), background-color var(--transition-smooth);
}

.cleanup-bar.noisy {
  background-color: #ef4444;
  height: calc(20% + var(--rand-h, 10px));
}

.cleanup-bar.clean {
  background-color: var(--accent);
  height: var(--clean-h, 15px);
}

.cleanup-slider-control {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

/* Screenshot gallery */
.gallery-wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

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

@media (max-width: 576px) {
  .gallery-wrap {
    grid-template-columns: 1fr;
  }
}

.gallery-item {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-muted);
  background-color: var(--bg-secondary);
  aspect-ratio: 9/16;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: var(--transition-smooth);
}

.gallery-item:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--border-active);
}

.gallery-text {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 1rem;
  background: linear-gradient(0deg, var(--bg-primary) 0%, transparent 100%);
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Roadmap timeline */
.roadmap-timeline {
  position: relative;
  max-width: 800px;
  margin: 3rem auto 0 auto;
  padding-left: 2rem;
  border-left: 2px solid var(--border-muted);
}

.roadmap-item {
  position: relative;
  margin-bottom: 3.5rem;
}

.roadmap-item::before {
  content: '';
  position: absolute;
  left: -2.7rem;
  top: 0.25rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--bg-primary);
  border: 4px solid var(--border-muted);
  transition: var(--transition-smooth);
}

.roadmap-item.completed::before {
  border-color: var(--accent);
  background-color: var(--accent);
}

.roadmap-item.active::before {
  border-color: var(--accent);
  animation: pulse-dot 2s infinite;
}

.roadmap-date {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.roadmap-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.roadmap-list {
  list-style: none;
  padding-left: 0;
  margin-top: 0.5rem;
}

.roadmap-list li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.35rem;
}

.roadmap-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* Universal Retrace family footer */
.family-footer {
  margin-top: auto;
  padding: 34px 0;
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-muted);
  color: var(--text-secondary);
  font-size: 14px;
}

.family-footer__inner {
  width: min(var(--container-max), calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.family-footer__brand {
  min-width: 0;
  max-width: 560px;
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--text-secondary);
  text-decoration: none;
}

.family-footer__mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-accent);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(52, 211, 153, 0.12));
  color: var(--accent-light);
  font-family: var(--font-display);
  font-weight: 800;
}

.family-footer__copy {
  min-width: 0;
}

.family-footer__title,
.family-footer__description,
.family-footer__copyright {
  display: block;
}

.family-footer__title {
  color: var(--text-primary);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.family-footer__description {
  margin-top: 4px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.family-footer__copyright {
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.family-footer__navigation {
  display: grid;
  justify-items: end;
  gap: 12px;
}

.family-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
  font-weight: 700;
}

.family-footer a.family-footer__parent {
  color: var(--accent-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.family-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  text-underline-offset: 0.2em;
}

.family-footer a:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

.family-footer a.family-footer__parent:hover {
  color: var(--accent);
  text-decoration: none;
}

.family-footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

@media (max-width: 680px) {
  .family-footer {
    padding: 28px 0;
  }

  .family-footer__inner {
    width: calc(100% - 28px);
    align-items: flex-start;
    flex-direction: column;
  }

  .family-footer__brand {
    align-items: flex-start;
  }

  .family-footer__navigation {
    justify-items: start;
  }

  .family-footer__links {
    justify-content: flex-start;
  }
}

/* Page templates & grids */
.page-header {
  padding: calc(var(--header-height) + 4rem) 0 3rem 0;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.02) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-muted);
}

.page-title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.page-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 700px;
}

/* Accordion FAQs */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 800px;
  margin: 3rem auto 0 auto;
}

.faq-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1.5rem;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: transform var(--transition-smooth);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-smooth), padding var(--transition-smooth);
  padding: 0 1.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.faq-item.open {
  border-color: var(--border-active);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background-color: var(--accent);
  color: var(--bg-primary);
}

.faq-item.open .faq-answer {
  max-height: 200px;
  padding-bottom: 1.5rem;
}

/* Animations */
@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

@keyframes bounce-bar {
  0%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.4);
  }
}

@keyframes jitter-waveform {
  0%, 100% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.7) translateY(2px);
  }
}

@keyframes pulse-rec-btn {
  0% {
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.4);
  }
  100% {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.8);
  }
}

/* Custom layout classes for buskers/songwriters */
.benefit-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.benefit-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 1.05rem;
}

.benefit-icon {
  color: var(--accent);
  font-weight: 800;
  margin-top: 0.15rem;
}

/* Modal Dialog Styles */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(9, 11, 13, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-smooth);
  pointer-events: none;
}

.modal-backdrop.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  max-width: 440px;
  width: 90%;
  text-align: center;
  padding: 2.5rem;
  border: 1px solid var(--border-active);
  transform: scale(0.95);
  transition: transform var(--transition-smooth);
}

.modal-backdrop.active .modal-card {
  transform: scale(1);
}

/* Global Range Input Styling with Touch-Friendly Custom Thumbs */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--border-muted);
  border-radius: 3px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: var(--accent);
  transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb:hover {
  background: var(--accent);
  transform: scale(1.1);
}

/* Workflow step responsive layout classes (replacing inline grids) */
.step-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 2rem;
  margin-bottom: 5rem;
  align-items: start;
}

.step-number {
  width: 80px;
  height: 80px;
  background-color: var(--accent-glow);
  border: 2px solid var(--border-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--accent-light);
  flex-shrink: 0;
}

/* Scroll Lock helper */
body.menu-lock {
  overflow: hidden;
}

/* Responsive navigation CTA styles */
.nav-mobile-cta-wrapper {
  display: none;
  width: 100%;
  margin-top: 1rem;
}

/* Card custom download padding */
.card-download {
  padding: 3rem 2rem;
}

/* Modal button group container */
.modal-btn-group {
  display: flex;
  gap: 1rem;
}

/* Mobile responsive query overrides */
@media (max-width: 968px) {
  .nav-menu {
    overflow-y: auto;
  }
  
  .nav-menu li {
    width: 100%;
  }

  .nav-link {
    display: block;
    width: 100%;
    padding: 0.85rem 0; /* Ensures 44px+ tap target height in vertical list */
  }

  .nav-mobile-cta-wrapper {
    display: block;
  }

  .nav-mobile-cta {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .roadmap-timeline {
    padding-left: 1.5rem;
  }
  .roadmap-item::before {
    left: -2.2rem;
  }
}

@media (max-width: 640px) {
  /* Step row stacking */
  .step-row {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    text-align: center;
    margin-bottom: 4rem;
  }

  .step-number {
    margin: 0 auto;
  }

  /* Comparison table stacked card transform */
  .compare-table, 
  .compare-table thead, 
  .compare-table tbody, 
  .compare-table th, 
  .compare-table td, 
  .compare-table tr {
    display: block;
  }
  
  .compare-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  .compare-row {
    border: 1px solid var(--border-muted);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    padding: 1.25rem 1rem;
    background-color: var(--bg-secondary);
  }
  
  .compare-row td {
    border: none;
    position: relative;
    padding: 0.65rem 0;
    font-size: 0.95rem;
    text-align: left;
  }
  
  .compare-row td:first-child {
    font-size: 1.1rem;
    font-weight: bold;
    padding-left: 0;
    border-bottom: 1px solid var(--border-muted);
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    color: var(--text-primary);
  }
  
  .compare-row td:nth-of-type(2), 
  .compare-row td:nth-of-type(3) {
    padding-left: 35%;
  }

  .compare-row td::before {
    position: absolute;
    left: 0;
    width: 30%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: 600;
    color: var(--text-muted);
  }
  
  .compare-row td:nth-of-type(2)::before { content: "Traditional:"; }
  .compare-row td:nth-of-type(3)::before { content: "Stone App:"; }
}

@media (max-width: 576px) {
  /* Header logo shrink & hide header CTA */
  .logo {
    font-size: 1.3rem;
  }
  
  .header .nav-cta {
    display: none;
  }

  /* Full-width buttons on mobile */
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
  }

  /* Responsive card padding */
  .card {
    padding: 1.5rem;
  }

  .card-download {
    padding: 2rem 1.25rem;
  }
}

@media (max-width: 480px) {
  /* Stacking modal buttons vertically */
  .modal-card {
    padding: 1.5rem;
  }
  
  .modal-btn-group {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* Hero device mockup scaling overrides */
@media (max-width: 380px) {
  .device-mockup {
    width: 280px;
    height: 560px;
    border-width: 10px;
    border-radius: 32px;
  }
  .device-mockup::before {
    width: 120px;
    height: 22px;
  }
}

@media (max-width: 320px) {
  .device-mockup {
    width: 240px;
    height: 480px;
    border-width: 8px;
    border-radius: 24px;
  }
  .device-mockup::before {
    width: 100px;
    height: 18px;
  }
}

/* Database Table structure mockup in Features */
.db-table-row {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 0.5rem;
  font-family: monospace;
  font-size: 0.8rem;
}

@media (max-width: 576px) {
  .db-table-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    margin-bottom: 0.75rem;
  }
}

/* Responsive cleanup slider */
#cleanup-slider {
  width: 100%;
  max-width: 200px;
}

/* Ensure pre code tags don't cause page-level overflow */
pre {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}
