/* ============================================================
   GoodAlarm — Landing Page Styles
   Mobile-first · Modern · Light + Dark · System fonts (zero-loaders)
   Brand: amber accent on slate/dark — matches the app's dark-default UI.
   (Structure adapted from the shared WELLPEACH landing system.)
   ============================================================ */

/* --- Tokens (light = default) ---------------------------------- */
:root {
  /* Brand — amber */
  --accent: #d97706;          /* amber-600 */
  --accent-strong: #b45309;   /* amber-700 */
  --accent-soft: #f59e0b;     /* amber-500 */
  --accent-bg: rgba(245, 158, 11, 0.10);

  /* Surfaces */
  --bg: #ffffff;
  --bg-alt: #f8fafc;          /* slate-50 */
  --bg-card: #ffffff;
  --bg-elevated: #f1f5f9;     /* slate-100 */
  --bg-hero-start: #f8fafc;
  --bg-hero-end: #fffbeb;     /* amber-50 */
  --bg-spotlight: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  --bg-cta: linear-gradient(135deg, #0f172a 0%, #78350f 100%);

  /* Ink */
  --ink: #0f172a;             /* slate-900 */
  --ink-2: #334155;           /* slate-700 */
  --ink-3: #64748b;           /* slate-500 */
  --ink-muted: #94a3b8;       /* slate-400 */
  --on-accent: #ffffff;

  /* Border */
  --border: #e2e8f0;          /* slate-200 */
  --border-strong: #cbd5e1;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.1), 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-phone: 0 30px 60px -10px rgba(217, 119, 6, 0.25), 0 18px 30px -15px rgba(15, 23, 42, 0.2);

  /* Geometry */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Layout */
  --container: 1180px;
  --gutter: clamp(1rem, 4vw, 2rem);

  /* Typography */
  --font-sans:
    -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter",
    "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  --font-display:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter",
    "Segoe UI", Roboto, system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #020617;            /* slate-950 */
    --bg-alt: #0f172a;        /* slate-900 */
    --bg-card: #0f172a;
    --bg-elevated: #1e293b;   /* slate-800 */
    --bg-hero-start: #0f172a;
    --bg-hero-end: #1c1206;   /* warm dark */
    --bg-spotlight: linear-gradient(135deg, #b45309 0%, #78350f 100%);
    --bg-cta: linear-gradient(135deg, #1c1206 0%, #d97706 130%);

    --ink: #f8fafc;
    --ink-2: #e2e8f0;
    --ink-3: #cbd5e1;
    --ink-muted: #64748b;

    --border: #1e293b;
    --border-strong: #334155;

    --accent-bg: rgba(245, 158, 11, 0.14);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    --shadow-phone: 0 30px 60px -10px rgba(245, 158, 11, 0.25), 0 18px 30px -15px rgba(0, 0, 0, 0.6);
  }
}

/* --- Reset ---------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
section[id],
main[id] { scroll-margin-top: 80px; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; }

/* --- A11y ----------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-sm);
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* --- Container ------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --- Header --------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; }
.logo-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: linear-gradient(160deg, #f59e0b 0%, #d97706 100%);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  box-shadow: var(--shadow-sm);
}
.logo-text { font-size: 1.0625rem; letter-spacing: -0.01em; color: var(--ink); }
.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav-link {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--ink); background: var(--bg-elevated); }
.nav-link-cta { background: var(--accent); color: var(--on-accent); }
.nav-link-cta:hover { background: var(--accent-strong); color: var(--on-accent); }
@media (max-width: 480px) {
  .nav-link:not(.nav-link-cta) { display: none; }
}

/* --- Section labels & titles --------------------------------- */
.section-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
@media (prefers-color-scheme: dark) {
  .section-label { color: var(--accent-soft); }
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 3.2vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2rem;
  max-width: 32ch;
}

/* --- Hero ---------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(3.5rem, 8vw, 6rem);
  background:
    radial-gradient(60% 60% at 90% 10%, var(--accent-bg) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-hero-start) 0%, var(--bg) 100%);
  overflow: hidden;
}
.hero-content { max-width: 720px; margin: 0 auto; text-align: center; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.875rem 0.4375rem 0.625rem;
  background: var(--accent-bg);
  color: var(--accent-strong);
  border: 1px solid color-mix(in oklab, var(--accent) 28%, transparent);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1.5rem;
}
@media (prefers-color-scheme: dark) {
  .hero-badge { color: var(--accent-soft); }
}
.hero-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-soft);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent-soft) 25%, transparent);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin-bottom: 1.25rem;
}
.hero-title .accent {
  background: linear-gradient(120deg, #f59e0b 0%, #d97706 60%, #fbbf24 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}
.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.1875rem);
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 auto 1.5rem;
  max-width: 52ch;
}
.hero-subtitle strong { color: var(--ink); font-weight: 600; }
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.hero-meta { margin-top: 1rem; font-size: 0.8125rem; color: var(--ink-3); }

/* Store buttons */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
}
.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.125rem;
  background: #0f172a;
  color: #ffffff;
  border-radius: var(--radius);
  font-weight: 600;
  min-height: 56px;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s;
}
.btn-store:hover {
  background: #000000;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.btn-store:active { transform: translateY(0); }
.btn-store[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}
.btn-store svg { width: 24px; height: 24px; flex-shrink: 0; }
.btn-store-text { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.btn-store-label { font-size: 0.6875rem; opacity: 0.85; font-weight: 500; }
.btn-store-name { font-size: 1.0625rem; font-weight: 700; }

/* --- Spotlight (What's New) ---------------------------------- */
.spotlight {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  background: var(--bg-spotlight);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(45% 45% at 0% 0%, rgba(255, 255, 255, 0.12) 0%, transparent 60%),
    radial-gradient(40% 40% at 100% 100%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}
.spotlight .container { position: relative; max-width: 820px; text-align: center; }
.spotlight .section-label { color: rgba(255, 255, 255, 0.85); }
.spotlight .section-title { color: #fff; margin-left: auto; margin-right: auto; }
.spotlight-lead {
  font-size: clamp(1rem, 1.6vw, 1.125rem);
  color: rgba(255, 255, 255, 0.92);
  margin: 0 auto 1.75rem;
  line-height: 1.6;
  max-width: 56ch;
}
.spotlight-lead strong { color: #fff; font-weight: 700; }
.spotlight-list {
  display: grid;
  gap: 1rem;
  text-align: left;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.spotlight-list li {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
}
.spotlight-list strong { color: #fff; font-weight: 700; display: block; margin-bottom: 0.125rem; }
.spotlight-list div { color: rgba(255, 255, 255, 0.92); font-size: 0.9375rem; line-height: 1.5; }
.bullet {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 1.125rem;
}

/* --- Features grid ------------------------------------------- */
.features { padding: clamp(3.5rem, 8vw, 6rem) 0; background: var(--bg); }
.features .container { text-align: center; }
.features .section-title { margin-left: auto; margin-right: auto; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  text-align: left;
}
.feature-card {
  padding: 1.75rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.feature-icon.amber    { background: rgba(245,158,11,0.12);  color: #d97706; }
.feature-icon.violet   { background: rgba(139,92,246,0.12);  color: #7c3aed; }
.feature-icon.blue     { background: rgba(59,130,246,0.12);  color: #2563eb; }
.feature-icon.emerald  { background: rgba(16,185,129,0.12);  color: #059669; }
.feature-icon.rose     { background: rgba(244,63,94,0.12);   color: #e11d48; }
.feature-icon.slate    { background: rgba(100,116,139,0.12); color: #475569; }
.feature-icon.indigo   { background: rgba(99,102,241,0.12);  color: #4f46e5; }
.feature-icon.sky      { background: rgba(14,165,233,0.12);  color: #0284c7; }
@media (prefers-color-scheme: dark) {
  .feature-icon.amber   { color: #fbbf24; }
  .feature-icon.violet  { color: #a78bfa; }
  .feature-icon.blue    { color: #60a5fa; }
  .feature-icon.emerald { color: #34d399; }
  .feature-icon.rose    { color: #fb7185; }
  .feature-icon.slate   { color: #94a3b8; }
  .feature-icon.indigo  { color: #818cf8; }
  .feature-icon.sky     { color: #38bdf8; }
}
.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.feature-card p { font-size: 0.9375rem; line-height: 1.55; color: var(--ink-3); }

/* --- How It Works -------------------------------------------- */
.how-it-works { padding: clamp(3.5rem, 8vw, 6rem) 0; background: var(--bg-alt); }
.how-it-works .container { text-align: center; }
.how-it-works .section-title { margin-left: auto; margin-right: auto; }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  text-align: left;
}
.step-card {
  padding: 1.75rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 1rem;
  box-shadow: 0 6px 16px -4px color-mix(in oklab, var(--accent) 50%, transparent);
}
.step-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.step-card p { font-size: 0.9375rem; color: var(--ink-3); line-height: 1.55; }

/* --- FAQ ----------------------------------------------------- */
.faq { padding: clamp(3.5rem, 8vw, 6rem) 0; background: var(--bg); }
.faq .container { text-align: center; }
.faq .section-title { margin-left: auto; margin-right: auto; }
.faq-list { display: grid; gap: 0.75rem; max-width: 760px; margin: 0 auto; text-align: left; }
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.25rem 1.25rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.faq-item[open] { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 0;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--ink-3);
  transition: transform 0.2s;
  line-height: 1;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 0 1rem; font-size: 0.9375rem; line-height: 1.6; color: var(--ink-2); }

/* --- CTA ----------------------------------------------------- */
.cta {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  background: var(--bg-cta);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(50% 50% at 50% 0%, rgba(245, 158, 11, 0.25) 0%, transparent 70%);
  pointer-events: none;
}
.cta .container { position: relative; }
.cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 1rem;
  color: #fff;
}
.cta p { font-size: 1.0625rem; color: rgba(255, 255, 255, 0.88); margin-bottom: 2rem; }
.cta .store-buttons { justify-content: center; }
.cta .btn-store { background: #ffffff; color: #0f172a; }
.cta .btn-store:hover { background: #f1f5f9; color: #0f172a; }

/* --- Footer -------------------------------------------------- */
.footer { padding: 3rem 0 2rem; background: var(--bg-alt); border-top: 1px solid var(--border); }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 1fr auto auto; }
}
.footer-brand { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-logo { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 800; }
.footer-logo-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(160deg, #f59e0b 0%, #d97706 100%);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
}
.footer-logo-text { font-size: 1rem; color: var(--ink); }
.footer-tagline { font-size: 0.8125rem; color: var(--ink-3); }
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; }
.footer-link { font-size: 0.875rem; color: var(--ink-2); transition: color 0.15s; }
.footer-link:hover { color: var(--accent); }
.footer-meta { font-size: 0.8125rem; color: var(--ink-muted); }
.footer-meta p { white-space: nowrap; }

/* --- Legal pages (privacy / terms) --------------------------- */
.legal { padding: clamp(2.5rem, 6vw, 4rem) 0 4rem; background: var(--bg); }
.legal .container { max-width: 820px; }
.legal h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.legal .updated { font-size: 0.875rem; color: var(--ink-3); margin-bottom: 2rem; }
.legal h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 2rem 0 0.75rem;
  letter-spacing: -0.01em;
}
.legal p, .legal li { font-size: 0.9375rem; line-height: 1.65; color: var(--ink-2); }
.legal p { margin-bottom: 1rem; }
.legal ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.legal li { margin-bottom: 0.4rem; }
.legal a { color: var(--accent); text-decoration: underline; }
.legal .back { display: inline-block; margin-top: 2rem; font-weight: 600; color: var(--accent); }

/* --- Print --------------------------------------------------- */
@media print {
  .header, .cta, .store-buttons { display: none; }
  body { color: #000; background: #fff; }
}
