/* Nudge landing page — matches the app's palette (ui/theme/Color.kt). */
:root {
  --bg: #0F172A;        /* Slate900 */
  --bg-deep: #0B1120;   /* Slate950 */
  --card: #1E293B;      /* Slate800 */
  --line: #334155;      /* Slate700 */
  --text: #F8FAFC;      /* Slate50 */
  --muted: #94A3B8;     /* Slate400 */
  --accent: #34D399;    /* Emerald400 */
  --accent-ink: #06261B;
  --danger: #FCA5A5;
  --radius: 16px;
  --wrap: 68rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 7vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); font-weight: 750; text-align: center; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: 16px; padding-right: 16px; }

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

.skip {
  position: absolute; left: 8px; top: -100px; z-index: 10;
  background: var(--accent); color: var(--accent-ink); padding: 8px 14px;
  border-radius: 8px; font-weight: 700;
}
.skip:focus { top: 8px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.15rem; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; padding: 10px 8px; font-size: 0.95rem; }
nav a:hover { color: var(--text); }

/* Sections */
main > section { padding-top: 56px; padding-bottom: 56px; }
.hero { text-align: center; padding-top: 64px; }
.lede { text-wrap: balance; color: var(--muted); font-size: clamp(1.05rem, 2.6vw, 1.25rem); max-width: 40rem; margin: 0 auto 1.6em; }
.fine { color: var(--muted); font-size: 0.92rem; }
.center { text-align: center; }

/* Buttons */
.cta-row { display: flex; flex-direction: column; gap: 12px; align-items: center; margin-bottom: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 22px; border-radius: 999px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform .12s ease, background-color .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #6EE7B7; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--muted); }
.btn[disabled], fieldset[disabled] .btn { opacity: .6; cursor: not-allowed; }

/* Device-specific text (set by app.js; without JS nothing here is hidden) */
.ios-only { display: none; }
[data-device="ios"] .ios-only { display: block; }
[data-device="ios"] #hero-note { display: none; }

/* Demo */
.demo { padding-top: 8px; }
.demo-frame { margin: 0 auto; max-width: 300px; text-align: center; }
.demo-frame video, .demo-frame .phone-shot { width: 100%; aspect-ratio: 9 / 16; }
.phone-shot { border-radius: 24px; background: var(--bg-deep); border: 1px solid var(--line); }
.demo-frame video, .demo-frame .phone-shot { border-radius: 28px; }

.screens { display: grid; gap: 24px; margin-top: 40px; justify-items: center; }
.screens figure { margin: 0; max-width: 300px; text-align: center; }
.screens figcaption { color: var(--text); font-weight: 600; }
figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 12px; }
.autoplay-note { display: block; margin-top: 4px; }

/* Cards & grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card p:last-child { margin-bottom: 0; }

.feature-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.feature-grid h3 { color: var(--accent); }
.feature-grid p { color: var(--muted); }

.two-col { display: grid; gap: 16px; }
.checks { margin: 0; padding: 0; list-style: none; }
.checks li { position: relative; padding-left: 28px; margin-bottom: 12px; color: var(--muted); }
.checks li strong { color: var(--text); }
.checks li::before {
  content: ""; position: absolute; left: 4px; top: 0.45em;
  width: 12px; height: 7px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}
.privacy p { color: var(--muted); }
.privacy p strong, .privacy p em { color: var(--text); }

/* FAQ */
.faq-list { display: grid; gap: 16px; margin-top: 24px; }
.faq-list h3 { color: var(--accent); }
.faq-list p { color: var(--muted); margin: 0; }

/* Get Nudge */
.get-grid { display: grid; gap: 16px; margin-top: 24px; }
.get-grid .card { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.get-grid .card > .btn { width: 100%; }
.get-qr { align-items: center !important; }
.get-qr details { width: 100%; text-align: center; }
.get-qr summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.qr { margin: 16px auto 0; background: #fff; padding: 12px; border-radius: 12px; width: 200px; height: 200px; }
.stat { color: var(--text); font-weight: 600; }

/* Device ordering of the three Get cards: never hides any of them */
[data-device="ios"] .get-ios { order: -1; }
[data-device="android"] .get-qr { order: 2; }

/* Post-download panel: setup guide + 30-day challenge */
.after-download { margin-top: 16px; display: grid; gap: 28px; scroll-margin-top: 16px; }
.after-download:focus { outline: none; }
.after-download:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.after-download h3 { color: var(--accent); }
.steps { margin: 0; padding-left: 1.3em; color: var(--muted); }
.steps li { margin-bottom: 10px; padding-left: 4px; }
.steps li strong, .steps li em { color: var(--text); }
.ad-challenge { border-top: 1px solid var(--line); padding-top: 24px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--muted); margin: 14px 0 0; cursor: pointer; }
#challenge-form input[type="email"] { width: 100%; }
.ch-submit { margin-top: 16px; }
#ch-promise { margin-top: 10px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.linklike {
  background: none; border: 0; padding: 6px 0; font: inherit; font-size: 0.92rem;
  color: var(--accent); text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer;
}
.linklike[hidden] { display: none; }

/* Waitlist */
form { width: 100%; margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.field-row { display: flex; gap: 8px; flex-wrap: wrap; }
input[type="email"] {
  flex: 1 1 14rem; min-width: 0; min-height: 48px; padding: 10px 14px;
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 12px;
}
input[type="email"]:focus-visible { border-color: var(--accent); }
input[aria-invalid="true"] { border-color: var(--danger); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.status { margin: 0; min-height: 1.6em; font-weight: 600; }
.status.ok { color: var(--accent); }
.status.err { color: var(--danger); }

/* Content pages (about, accessibility-permission, wellness-score) */
.content { padding-top: 48px; padding-bottom: 56px; max-width: 42rem; }
.content h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); }
.content h2 { text-align: left; font-size: 1.35rem; margin-top: 1.6em; }
.content p, .content li { color: var(--muted); }
.content strong { color: var(--text); }
.content a { font-weight: 600; }
.breadcrumb { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.2em; }
.byline { color: var(--muted); font-size: 0.9rem; margin-top: -0.4em; margin-bottom: 1.6em; }
.content-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2em; }
.todo { border: 1px dashed var(--danger); border-radius: 10px; padding: 12px 16px; color: var(--danger); font-size: 0.92rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-deep); padding: 32px 0; color: var(--muted); font-size: 0.92rem; }
.footer-inner p { margin-bottom: 0.6em; }

/* Larger screens */
@media (min-width: 40rem) {
  .cta-row { flex-direction: row; justify-content: center; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .screens { grid-template-columns: repeat(3, 1fr); align-items: start; gap: 20px; }
}
@media (min-width: 56rem) {
  .two-col { grid-template-columns: 1fr 1fr; }
  .get-grid { grid-template-columns: repeat(3, 1fr); }
  .after-download { grid-template-columns: 1.1fr 1fr; gap: 40px; }
  .ad-challenge { border-top: 0; padding-top: 0; border-left: 1px solid var(--line); padding-left: 40px; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .faq-list { grid-template-columns: 1fr 1fr; }
}
