/* Night Tide, the same tokens as the Care4Her app (src/styles.css). */
:root {
  --bg: #0a0f22;
  --surface: rgb(20 27 50 / 0.82);
  --surface-2: rgb(44 54 88 / 0.85);
  --sheet: #141b32;
  --fg: #eef1fa;
  --muted: #a8b1c9;
  --subtle: #6b7591;
  --border: rgb(255 255 255 / 0.09);
  --accent: #e6ebfb;
  --accent-fg: #0b1230;
  --link: #a9bcf5;
  --her: #c97b5a;
  --her-soft: rgb(201 123 90 / 0.2);
  --cycle: #4fb3a7;
  --cycle-soft: rgb(79 179 167 / 0.18);
  --danger: #ff9e97;
  --display: "Newsreader", "Iowan Old Style", Palatino, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body { margin: 0; background: transparent; overflow-x: hidden; }

/* Scene: the WebGL ocean, a gradient fallback, and a band that keeps text readable. */
#ocean {
  position: fixed; inset: 0; z-index: -2; width: 100%; height: 100%;
  background: linear-gradient(180deg, #05081a 0%, #111a3a 45%, #04070f 100%);
}
.shade {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgb(4 7 18 / 0.15) 0%, rgb(4 7 18 / 0.55) 45%, rgb(4 7 18 / 0.7) 100%);
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 680px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--fg); text-decoration: none; font: 500 1.35rem/1 var(--display); letter-spacing: -0.02em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; margin-left: 20px; }
.top nav a:hover, .top nav a[aria-current] { color: var(--fg); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: -0.03em; line-height: 1.12; text-wrap: balance; margin: 0; }
p { text-wrap: pretty; }
a { color: var(--link); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 6px; }
.muted { color: var(--muted); }
.brass { color: var(--link); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; padding: 48px 0 72px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); }
.lede { font-size: 1.2rem; color: var(--muted); margin: 20px 0 32px; max-width: 30ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 600 1.02rem/1 var(--sans); text-decoration: none;
  transition: transform 160ms var(--ease), filter 160ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-her { background: var(--her-soft); color: var(--fg); box-shadow: inset 0 0 0 1px rgb(201 123 90 / 0.45); }
.btn-cycle { background: var(--cycle-soft); color: var(--fg); box-shadow: inset 0 0 0 1px rgb(79 179 167 / 0.45); }
.btn svg { width: 18px; height: 18px; }
.fine { font-size: 0.9rem; color: var(--subtle); margin-top: 16px; }

.phone {
  justify-self: center; width: min(320px, 78vw); aspect-ratio: 1320 / 2868;
  border-radius: 48px; padding: 10px; background: #1a2142;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 40px 80px -30px rgb(0 0 0 / 0.8), 0 0 120px -40px rgb(120 140 220 / 0.35);
}
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 39px; }

/* Sections */
section { padding: 56px 0; }
.eyebrow { font-size: 0.85rem; color: var(--subtle); text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 10px; }
section h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 14px; }
.section-head p { color: var(--muted); max-width: 52ch; margin: 0 0 32px; }

/* The day's move: the same do / say / avoid layout as Today in the app. */
.move { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.card { background: var(--surface); border-radius: 28px; padding: 28px; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.06), 0 12px 32px -16px rgb(0 0 0 / 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.card .day { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.ring { width: 52px; height: 52px; flex: none; }
.card .day b { display: block; font-weight: 500; }
.card .day span { color: var(--muted); font-size: 0.9rem; }
.card h3 { font-size: 1.6rem; margin-bottom: 18px; }
.lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.lines li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; }
.lines svg { width: 20px; height: 20px; margin-top: 3px; color: var(--muted); }
.lines .say q { font: italic 1.12rem/1.4 var(--display); quotes: "“" "”"; }
.lines .avoid svg { color: var(--danger); }
.lines .avoid { color: var(--muted); }
.card .why { margin-top: 20px; font-size: 0.92rem; color: var(--link); display: flex; justify-content: space-between; }
.dots { display: inline-flex; gap: 6px; align-items: center; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--subtle); }
.dots i:first-child { background: var(--fg); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 26px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; }
.steps li::before {
  counter-increment: s; content: counter(s);
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  font: 500 1.05rem/1 var(--display); color: var(--link); box-shadow: inset 0 0 0 1px rgb(169 188 245 / 0.5);
}
.steps h3 { font-size: 1.3rem; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--muted); }

/* iOS grouped lists, as in the app's Settings. */
.group-label { font-size: 0.9rem; color: var(--muted); margin: 28px 16px 8px; }
.group { background: var(--surface); border-radius: 16px; overflow: hidden; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.row { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 12px 18px; border-top: 1px solid var(--border); }
.row:first-child { border-top: 0; }
.row .label { flex: 1; }
.row .label small { display: block; color: var(--muted); font-size: 0.88rem; line-height: 1.4; margin-top: 2px; }
.switch { width: 51px; height: 31px; border-radius: 999px; background: #5f7fe0; position: relative; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgb(0 0 0 / 0.3); }
.check { width: 22px; height: 22px; color: var(--cycle); flex: none; }
.group-foot { font-size: 0.88rem; color: var(--muted); margin: 8px 16px 0; }

.privacy-grid { display: grid; grid-template-columns: 1fr 0.8fr; gap: 48px; align-items: center; }
.privacy-grid .phone { width: min(280px, 70vw); }

/* FAQ: grouped list rows that open like a disclosure. */
details { border-top: 1px solid var(--border); }
details:first-child { border-top: 0; }
summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 18px; }
summary::-webkit-details-marker { display: none; }
summary span { flex: 1; }
summary svg { width: 16px; height: 16px; color: var(--subtle); transition: transform 200ms var(--ease); flex: none; }
details[open] summary svg { transform: rotate(90deg); }
details p { margin: 0; padding: 0 18px 16px; color: var(--muted); }

.note { border-radius: 16px; padding: 18px 20px; background: var(--cycle-soft); box-shadow: inset 0 0 0 1px rgb(79 179 167 / 0.3); color: var(--fg); }
.note b { color: var(--cycle); font-weight: 600; }

/* Long-form text (privacy policy) */
.doc { padding: 32px 0 24px; }
.doc h1 { font-size: clamp(2.3rem, 5vw, 3.2rem); margin-bottom: 8px; }
.doc h2 { font-size: 1.5rem; margin: 40px 0 10px; }
.doc ul { padding-left: 20px; }
.doc li { margin: 6px 0; }
.doc .card { padding: 22px 24px; margin: 28px 0; }

footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 24px 0 48px; color: var(--subtle); font-size: 0.88rem; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
footer a { color: var(--muted); }

/* Entrance */
.rise { animation: rise 600ms var(--ease) both; }
.rise.d1 { animation-delay: 80ms; }
.rise.d2 { animation-delay: 160ms; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 820px) {
  .hero, .move, .privacy-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 24px 0 48px; text-align: left; }
  .privacy-grid .phone { display: none; }
  section { padding: 40px 0; }
  .card { padding: 22px; border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; }
  * { transition: none !important; }
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
