/* Super Sound Machine — Marketing Site */

:root {
  --bg: #E0D1D1;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #1a2744;
  --accent-light: #2a3d66;
  --card: rgba(255, 255, 255, 0.55);
  --card-solid: #f5efef;
  --shadow: 0 4px 24px rgba(26, 39, 68, 0.08);
  --shadow-lg: 0 12px 48px rgba(26, 39, 68, 0.12);
  --radius: 16px;
  --radius-lg: 24px;
  --max-width: 1100px;
  --header-height: 64px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, system-ui, sans-serif;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-in-out: cubic-bezier(0.42, 0, 0.58, 1);
  --showcase-nav-duration: 0.55s;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.028;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 128 128' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* ── Ambient background ── */

.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.ambient-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.08;
  animation: ambient-drift 50s ease-in-out infinite alternate;
}

.ambient-blob-1 {
  top: -10%;
  left: -5%;
  width: 620px;
  height: 620px;
  background: #BE8296;
  animation-duration: 52s;
}

.ambient-blob-2 {
  top: 35%;
  right: -12%;
  width: 720px;
  height: 720px;
  background: #1a2744;
  opacity: 0.05;
  animation-duration: 58s;
  animation-delay: -8s;
}

.ambient-blob-3 {
  bottom: -15%;
  left: 20%;
  width: 560px;
  height: 560px;
  background: #E6AA5A;
  animation-duration: 48s;
  animation-delay: -16s;
}

@keyframes ambient-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, -30px) scale(1.05); }
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ── Header ── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(224, 209, 209, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(26, 39, 68, 0.06);
  transition: background 0.3s var(--ease);
}

.site-header.scrolled {
  background: rgba(224, 209, 209, 0.95);
  box-shadow: 0 1px 12px rgba(26, 39, 68, 0.06);
}

.header-inner {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.brand-name {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 980px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}

.header-cta:hover {
  background: var(--accent-light);
  text-decoration: none;
  transform: scale(1.02);
}

/* ── App Store badge ── */

.app-store-badge {
  display: inline-block;
  transition: transform 0.2s var(--ease), opacity 0.2s;
}

.app-store-badge:hover {
  transform: scale(1.03);
  opacity: 0.9;
}

.app-store-badge img {
  height: 44px;
  width: auto;
}

.app-store-badge.large img {
  height: 54px;
}

/* ── Hero ── */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-height) + 48px) 24px 80px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-brand-mobile {
  display: none;
  margin: 0;
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.hero-tagline {
  display: block;
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 420px;
  line-height: 1.5;
}

.hero-visual {
  display: flex;
  justify-content: center;
}

/* ── Device showcase ── */

.device-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 440px;
  padding: 32px 16px;
  isolation: isolate;
}

.device-stage-hero {
  min-height: 520px;
}

.device-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 72%;
  height: 68%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--device-glow, rgba(26, 39, 68, 0.35));
  filter: blur(56px);
  opacity: 0.6;
  pointer-events: none;
  transition: background 0.6s var(--ease);
}

.device-glass {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 88%;
  height: 78%;
  transform: translate(-50%, -50%) rotate(-2deg);
  border-radius: 36px;
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 20px 56px rgba(26, 39, 68, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  pointer-events: none;
}

.device-parallax {
  position: relative;
  z-index: 2;
  will-change: transform;
}

.device-stage > picture,
.device-parallax,
.showcase-screens {
  position: relative;
  z-index: 2;
}

.device-parallax picture,
.showcase-screens picture,
.device-stage > picture {
  display: block;
  background: transparent;
  line-height: 0;
}

.device-stage[data-glow="rose"] { --device-glow: rgba(190, 130, 150, 0.55); }
.device-stage[data-glow="teal"] { --device-glow: rgba(70, 150, 170, 0.5); }
.device-stage[data-glow="violet"] { --device-glow: rgba(130, 100, 190, 0.48); }
.device-stage[data-glow="indigo"] { --device-glow: rgba(40, 60, 110, 0.55); }
.device-stage[data-glow="amber"] { --device-glow: rgba(230, 170, 90, 0.5); }

.device-stage .screenshot-img {
  width: min(260px, 70vw);
}

.device-stage-hero .screenshot-img {
  width: min(300px, 78vw);
}

.screenshot-img {
  width: min(320px, 85vw);
  height: auto;
}

/* ── Sections ── */

.section {
  padding: 100px 24px;
}

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

.section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.6;
}

/* ── Features grid ── */

.features {
  background: transparent;
}

.showcase-pinned {
  background: rgba(255, 255, 255, 0.18);
  padding-left: 0;
  padding-right: 0;
}

.features-header {
  text-align: center;
  margin-bottom: 56px;
}

.features-header .section-desc {
  margin: 0 auto;
}

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

.feature-card {
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

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

.feature-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  color: var(--accent);
}

.feature-title {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.feature-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ── Pinned showcase ── */

.showcase-track {
  height: 400vh;
  position: relative;
}

.showcase-sticky {
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.showcase-layout {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.showcase-copy-panel {
  position: relative;
  min-height: 320px;
  padding-bottom: 36px;
}

.showcase-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  pointer-events: none;
}

.showcase-step.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.showcase-dots {
  position: absolute;
  bottom: 0;
  left: 0;
  display: flex;
  gap: 10px;
}

.showcase-dot {
  appearance: none;
  border: none;
  padding: 0;
  margin: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(26, 39, 68, 0.2);
  cursor: pointer;
  transition: width 0.3s var(--ease), background 0.3s var(--ease);
}

.showcase-dot:hover {
  background: rgba(26, 39, 68, 0.35);
}

.showcase-dot:focus {
  outline: none;
}

.showcase-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.showcase-dot.is-active {
  width: 24px;
  border-radius: 4px;
  background: var(--accent);
}

.showcase-dot.is-active:hover {
  background: var(--accent-light);
}

.showcase-pinned.is-navigating .showcase-step,
.showcase-pinned.is-navigating .showcase-screen {
  transition:
    opacity var(--showcase-nav-duration) var(--ease-in-out),
    transform var(--showcase-nav-duration) var(--ease-in-out);
}

.showcase-pinned.is-navigating .device-glow {
  transition: background var(--showcase-nav-duration) var(--ease-in-out);
}

.showcase-device-panel {
  display: flex;
  justify-content: center;
}

.showcase-screens {
  position: relative;
  z-index: 2;
  width: min(260px, 70vw);
}

.showcase-screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.98);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease), visibility 0.45s;
}

.showcase-screen.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.showcase-mobile {
  display: none;
}

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

.showcase-mobile-block + .showcase-mobile-block {
  border-top: 1px solid rgba(26, 39, 68, 0.08);
}

.showcase-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.showcase-visual {
  display: flex;
  justify-content: center;
}

/* ── Comparison table ── */

.compare {
  padding-top: 40px;
}

.compare-header {
  text-align: center;
  margin-bottom: 48px;
}

.compare-header .section-desc {
  margin: 0 auto;
}

.compare-card {
  background: rgba(255, 255, 255, 0.42);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.compare-table thead {
  background: rgba(26, 39, 68, 0.04);
}

.compare-table th,
.compare-table td {
  padding: 18px 24px;
  text-align: center;
  border-bottom: 1px solid rgba(26, 39, 68, 0.07);
}

.compare-table th[scope="row"] {
  text-align: left;
  font-weight: 500;
  color: var(--text);
}

.compare-table thead th {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  padding-top: 22px;
  padding-bottom: 22px;
}

.compare-col-highlight {
  background: rgba(26, 39, 68, 0.05);
}

.compare-table thead .compare-col-highlight {
  color: var(--accent);
  background: rgba(26, 39, 68, 0.08);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-yes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
}

.compare-muted {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ── Sleep insights ── */

.sleep-section {
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-light) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 72px 48px;
  text-align: center;
  margin: 0 auto;
  max-width: var(--max-width);
}

.sleep-section .section-label {
  color: rgba(255, 255, 255, 0.7);
}

.sleep-section .section-title {
  color: #fff;
  margin-bottom: 20px;
}

.sleep-section .section-desc {
  color: rgba(255, 255, 255, 0.8);
  margin: 0 auto;
  max-width: 640px;
}

.sleep-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 980px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.sleep-badge svg {
  width: 18px;
  height: 18px;
}

/* ── Final CTA ── */

.cta-section {
  text-align: center;
  padding: 120px 24px;
}

.cta-section .section-title {
  margin-bottom: 12px;
}

.cta-section .section-desc {
  margin: 0 auto 32px;
}

/* ── Footer ── */

.site-footer {
  padding: 48px 24px;
  border-top: 1px solid rgba(26, 39, 68, 0.08);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
}

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

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.footer-made {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ── Legal pages ── */

.legal-page {
  padding: calc(var(--header-height) + 48px) 24px 80px;
  min-height: 100vh;
}

.legal-inner {
  max-width: 720px;
  margin: 0 auto;
}

.legal-inner h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.legal-meta {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.legal-inner h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 36px 0 12px;
  letter-spacing: -0.01em;
}

.legal-inner h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 24px 0 8px;
}

.legal-inner p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 12px;
}

.legal-inner ul {
  margin: 8px 0 16px 24px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}

.legal-inner li {
  margin-bottom: 6px;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 32px;
  text-decoration: none;
}

.legal-back:hover {
  text-decoration: underline;
}

/* ── Skip link ── */

.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
}

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

/* ──  ── */

.who-for {
  padding-top: 0;
}

.who-for-inner {
  max-width: 640px;
}

.who-for-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.who-for-list li {
  position: relative;
  padding-left: 1.25em;
  color: var(--text-secondary);
  line-height: 1.5;
}

.who-for-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 500;
}

/* ── Scroll reveal ── */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

.reveal-scale {
  opacity: 0;
  transform: scale(0.94) translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

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

.stagger-item {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
  transition-delay: calc(var(--stagger-index, 0) * 70ms);
}

.reveal-stagger.is-visible .stagger-item {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body::after {
    opacity: 0;
  }

  .ambient-blob {
    animation: none;
  }

  .reveal,
  .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .stagger-item {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .device-parallax {
    transform: none !important;
  }

  .showcase-track {
    display: none;
  }

  .showcase-mobile {
    display: block;
  }

  .showcase-step,
  .showcase-screen {
    opacity: 1;
    transform: none;
    position: relative;
    pointer-events: auto;
  }

  .feature-card:hover,
  .header-cta:hover,
  .app-store-badge:hover {
    transform: none;
  }
}

/* ── Responsive ── */

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

@media (min-width: 769px) {
  .hero-brand-mobile {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-copy {
    align-items: center;
    order: 1;
  }

  .hero-subtitle {
    max-width: none;
  }

  .hero-visual {
    order: 2;
  }

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

  .showcase-track {
    display: none;
  }

  .showcase-mobile {
    display: block;
  }

  .showcase-mobile-block {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

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

  .showcase-copy .section-desc {
    max-width: none;
  }

  .device-stage {
    min-height: 380px;
    padding: 24px 8px;
  }

  .device-stage-hero {
    min-height: 420px;
  }

  .device-glass {
    width: 92%;
    height: 72%;
  }

  .compare-table th,
  .compare-table td {
    padding: 14px 12px;
    font-size: 0.8125rem;
  }

  .compare-table thead th {
    font-size: 0.75rem;
  }

  .sleep-section {
    padding: 48px 28px;
    border-radius: var(--radius);
  }

  .brand-name {
    display: none;
  }

  .hero-brand-mobile {
    display: block;
  }

  .section {
    padding: 72px 24px;
  }
}
