/* ═══════════════════════════════════════════════════════════════════════
   SONORIX PUBLIC — Premium light theme
   Apple-inspired, matches mobile app theme
   ═══════════════════════════════════════════════════════════════════════ */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Backgrounds */
  --bg: #FBFBFD;
  --bg-card: #FFFFFF;
  --bg-subtle: #F5F5F7;
  --bg-hover: #EFEFF2;

  /* Text */
  --ink: #1D1D1F;
  --ink-soft: #6E6E73;
  --ink-faint: #86868B;
  --ink-on-accent: #FFFFFF;

  /* Borders */
  --line: #E5E5EA;
  --line-strong: #D1D1D6;

  /* Accent — Apple blue */
  --accent: #0071E3;
  --accent-hover: #0077ED;
  --accent-subtle: #E5F1FE;
  --accent-pressed: #0058B0;

  /* Status */
  --success: #30D158;
  --error: #FF3B30;
  --warning: #FF9F0A;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08), 0 20px 40px rgba(0,0,0,0.06);
  --shadow-focus: 0 0 0 4px rgba(0,113,227,0.15);

  /* Typography */
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
  --font-mono: 'SF Mono', Menlo, Monaco, 'Cascadia Mono', monospace;

  /* Motion */
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --dur-fast: 150ms;
  --dur: 250ms;
}

html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  letter-spacing: -0.01em;
}
::selection { background: var(--accent); color: var(--ink-on-accent); }
a { color: var(--accent); text-decoration: none; transition: color var(--dur-fast) var(--ease); }
a:hover { color: var(--accent-hover); }

/* ═══ Ambient — subtle, premium ═══════════════════════════════════════ */
.ambient {
  position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none;
}
.ambient::before {
  content: ''; position: absolute;
  top: -30%; right: -20%; width: 70%; height: 70%;
  background: radial-gradient(closest-side, rgba(0,113,227,0.05), transparent 70%);
  filter: blur(80px);
}
.ambient::after {
  content: ''; position: absolute;
  bottom: -20%; left: -10%; width: 60%; height: 60%;
  background: radial-gradient(closest-side, rgba(0,113,227,0.04), transparent 70%);
  filter: blur(100px);
}
.grain { display: none; } /* no grain on premium light */

/* ═══ Navigation ═══════════════════════════════════════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 18px 40px;
  display: flex; align-items: center; justify-content: space-between;
  transition: backdrop-filter var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(251,251,253,0.85);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border-bottom-color: var(--line);
}
.nav-brand {
  font-family: var(--font-display); font-weight: 600;
  font-size: 20px; letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 10px;
  color: var(--ink);
}
.nav-brand .mark {
  width: 8px; height: 8px; background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
  transition: box-shadow var(--dur) var(--ease);
}
.nav-brand:hover .mark { box-shadow: 0 0 0 5px rgba(0,113,227,0.2); }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  color: var(--ink-soft); font-size: 14px; font-weight: 500;
  transition: color var(--dur-fast) var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--accent); color: var(--ink-on-accent) !important;
  padding: 10px 18px; border-radius: 8px;
  font-weight: 500; font-size: 14px;
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-fast) var(--ease);
}
.nav-cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* ═══ Typography ═══════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: clamp(20px, 2.5vw, 28px); }
h4 { font-size: 18px; font-weight: 600; }
p { font-size: 16px; color: var(--ink-soft); line-height: 1.65; }
p.lead { font-size: 19px; color: var(--ink); }
strong { color: var(--ink); font-weight: 600; }
em { font-style: italic; }
code, pre, .mono { font-family: var(--font-mono); font-size: 0.9em; }
code {
  background: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ink);
  border: 1px solid var(--line);
}

/* ═══ Buttons ═══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 8px;
  font-family: var(--font-body); font-weight: 500; font-size: 15px;
  border: none; cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  gap: 8px;
}
.btn-primary {
  background: var(--accent); color: var(--ink-on-accent);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--bg-card); color: var(--ink);
  border: 1px solid var(--line);
}
.btn-secondary:hover { background: var(--bg-subtle); }
.btn-text {
  background: transparent; color: var(--accent);
}
.btn-text:hover { background: var(--accent-subtle); }
.btn-lg { padding: 16px 32px; font-size: 17px; border-radius: 10px; }

/* ═══ Cards ═══════════════════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* ═══ Pills / Badges ═══════════════════════════════════════════════ */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 100px;
  font-size: 13px; font-weight: 500;
  background: var(--accent-subtle); color: var(--accent);
}
.pill-success { background: rgba(48,209,88,0.1); color: var(--success); }
.pill-warning { background: rgba(255,159,10,0.1); color: var(--warning); }

/* ═══ Inputs ═══════════════════════════════════════════════════════ */
input[type="text"], input[type="email"], input[type="password"], textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }

/* ═══ Layout helpers ═══════════════════════════════════════════════════ */
.container {
  max-width: 1120px; margin: 0 auto; padding: 0 24px;
}
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section-sm { padding: 48px 0; }

/* ═══ Footer ═══════════════════════════════════════════════════════ */
footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--line);
  padding: 72px 40px 40px;
  margin-top: 96px;
}
.footer-grid {
  max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 64px;
}
.footer-brand {
  font-family: var(--font-display); font-weight: 600;
  font-size: 22px; letter-spacing: -0.02em;
  color: var(--ink); margin-bottom: 12px;
}
.footer-desc { color: var(--ink-soft); font-size: 15px; max-width: 300px; }
.footer-col h4 {
  font-size: 13px; font-weight: 600;
  color: var(--ink-faint); margin-bottom: 16px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: var(--ink-soft); font-size: 15px; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  max-width: 1120px; margin: 48px auto 0;
  padding-top: 32px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--ink-faint);
}

/* ═══ Legal pages (privacy, terms, refund, contact) ═══════════════════ */
.legal {
  max-width: 720px; margin: 120px auto 64px;
  padding: 0 24px;
}
.legal h1 {
  font-size: 40px; margin-bottom: 24px;
  padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.legal h2 {
  font-size: 22px; margin-top: 48px; margin-bottom: 12px;
}
.legal h3 { font-size: 17px; margin-top: 24px; margin-bottom: 8px; }
.legal p { margin-bottom: 16px; }
.legal ul, .legal ol {
  margin: 16px 0; padding-left: 28px;
}
.legal li {
  margin-bottom: 8px; color: var(--ink-soft);
  line-height: 1.65;
}
.legal a { color: var(--accent); text-decoration: underline; }
.legal .beta-note, .legal .callout {
  background: var(--accent-subtle);
  border-left: 3px solid var(--accent);
  padding: 20px; margin: 32px 0;
  border-radius: 8px;
  color: var(--ink);
}
.legal .updated {
  color: var(--ink-faint); font-size: 14px;
  margin-top: 64px; padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ═══ Responsive ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav { padding: 14px 20px; }
  .nav-links { display: none; }
  .section { padding: 64px 0; }
  footer { padding: 48px 24px 32px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ═══ Motion helpers ═══════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 500ms var(--ease-out) both; }
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
