:root {
  --bg: #f2f4f8;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --accent: #2563eb;
  --line: #e2e8f0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --card: #151b2e;
    --text: #f1f5f9;
    --muted: #a3b0c4;
    --accent: #60a5fa;
    --line: #26304a;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 ui-rounded, -apple-system, BlinkMacSystemFont, "SF Pro Rounded", system-ui, sans-serif;
}
main { max-width: 680px; margin: 0 auto; padding: 40px 16px 64px; }
header { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
header img { width: 56px; height: 56px; border-radius: 13px; }
header a { color: inherit; text-decoration: none; font-weight: 800; font-size: 22px; }
/* Logo lockup (Brand Board): icon, the name in heavy rounded type, "Family Alarm Clock" beneath. */
header.lockup a { display: flex; align-items: center; gap: 14px; }
header.lockup a > span { display: flex; flex-direction: column; }
header.lockup .name { font-size: 30px; font-weight: 900; letter-spacing: -0.5px; line-height: 1.05; }
header.lockup .tag { font-size: 15px; font-weight: 700; color: var(--muted); }
h1 { font-size: 32px; line-height: 1.15; letter-spacing: -0.4px; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 32px 0 8px; }
p, li { color: var(--muted); }
strong { color: var(--text); }
a { color: var(--accent); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 4px 20px; margin: 16px 0; }
.card h2 { margin-top: 20px; }
.meta { font-size: 15px; }
footer { margin-top: 40px; font-size: 14px; color: var(--muted); }

/* Main page */
main.wide { max-width: 1040px; }
main.wide > section { max-width: 680px; margin: 0 auto 8px; }
main.wide > section.hero, main.wide > section.shots { max-width: none; }
main.wide > header, main.wide > footer { max-width: 680px; margin-left: auto; margin-right: auto; }
.hero { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; margin: 8px 0 40px; }
.hero h1 { font-size: clamp(34px, 6vw, 52px); letter-spacing: -1px; margin-bottom: 14px; }
.lede { font-size: 19px; }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.badge { display: inline-block; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 700; color: var(--text); font-size: 15px; }
.phone { margin: 0; text-align: center; }
/* Screenshots are pre-framed in an iPhone (transparent PNG), so no border or rounded corners here. */
.phone img { width: 100%; max-width: 300px; height: auto; filter: drop-shadow(0 18px 28px rgba(20, 30, 50, 0.18)); }
.phone figcaption { margin-top: 12px; font-weight: 700; color: var(--muted); font-size: 15px; }
.badge-link { color: var(--accent); text-decoration: none; }
.badge-link:hover { border-color: var(--accent); }
.shots { margin: 40px 0; }
.shots .phone img { max-width: 260px; }
.view-iphone { display: grid; grid-template-columns: 1fr; gap: 28px; }

/* iPhone / iPhone Duo switch under the screenshots */
.view { transition: opacity 0.28s ease, transform 0.28s ease; }
.view[hidden] { display: none; }
.view.leaving, .view.entering { opacity: 0; transform: translateY(14px) scale(0.98); }
.device-switch { text-align: center; margin: 22px 0 0; color: var(--muted); font-size: 15px; }
.device-switch span { margin: 0 6px; }
.device-switch button { font: inherit; font-weight: 700; background: none; border: 0; padding: 4px 2px; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.device-switch button[aria-pressed="true"] { color: var(--text); text-decoration: none; cursor: default; }

/* iPhone Duo carousel: each slide pairs the Duo unfolded (Book) with it folded, at the same scale */
.carousel { overflow: hidden; touch-action: pan-y; }
.track { display: flex; transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1); }
.slide { flex: 0 0 100%; margin: 0; text-align: center; }
.pair { display: flex; align-items: flex-end; justify-content: center; gap: 4%; max-width: 760px; margin: 0 auto; padding: 0 8px; }
.pair img { height: auto; filter: drop-shadow(0 18px 28px rgba(20, 30, 50, 0.18)); }
.pair .book { width: 62%; }
.pair .closed { width: 33%; }
.slide figcaption { margin-top: 12px; font-weight: 700; color: var(--muted); font-size: 15px; }
.dots { display: flex; justify-content: center; gap: 4px; margin-top: 14px; }
.dots button { width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.dots button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--line); border: 1px solid var(--muted); opacity: 0.6; transition: background 0.2s, transform 0.2s, opacity 0.2s; }
.dots button[aria-current="true"]::before { background: var(--accent); border-color: var(--accent); opacity: 1; transform: scale(1.15); }
.dots button:focus-visible { outline: 2px solid var(--accent); border-radius: 50%; }
@media (prefers-reduced-motion: reduce) {
  .view, .track, .dots button::before { transition: none; }
}
.steps { padding-left: 22px; }
.steps li { margin-bottom: 10px; }
.why { padding: 8px 24px 12px; margin: 40px auto; }
@media (min-width: 760px) {
  .hero { grid-template-columns: 1.15fr 0.85fr; }
  .view-iphone { grid-template-columns: repeat(3, 1fr); }
}

/* Support page */
h3 { font-size: 17px; margin: 18px 0 4px; }
.card h3:first-child { margin-top: 18px; }
.card ol, .card ul { padding-left: 22px; }
.card li { margin-bottom: 6px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 8px; }
.toc a { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 15px; text-decoration: none; }
.note { border-left: 3px solid var(--accent); padding-left: 12px; }
h2[id] { scroll-margin-top: 16px; }
.hero .why { margin: 28px 0 0; }
.scenarios h3 { font-size: 20px; margin: 28px 0 8px; }
.closer { margin-bottom: 56px; }
.shots, .view-duo { min-width: 0; }
