/* The public pages: the landing page, privacy policy and terms. Colors and
   shapes come only from tokens.css, like the display and the phone. */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a { color: var(--accent); font-weight: 700; text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.15rem; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .moon { color: var(--accent); font-size: 1.6rem; line-height: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; border: 0;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.top .btn { min-height: 40px; padding: 0 18px; }

.hero { padding: 40px 0 28px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.1; font-weight: 800; margin: 0 0 16px; letter-spacing: -0.01em; }
.hero p { font-size: 1.15rem; color: var(--muted); margin: 0 0 24px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* A small picture of the display, drawn with the same tokens. */
.screen {
  background: var(--surface); border-radius: 22px; box-shadow: var(--shadow);
  padding: 18px; border: 8px solid var(--text); aspect-ratio: 16 / 10;
  display: flex; flex-direction: column; gap: 10px; overflow: hidden;
}
.screen-head { display: flex; justify-content: space-between; align-items: baseline; }
.screen-time { font-weight: 800; font-size: clamp(1.4rem, 3.4vw, 2rem); line-height: 1; }
.screen-date { color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.screen-weather { font-weight: 800; color: var(--hi); }
.screen-event {
  border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 0.85rem;
  background: rgba(var(--accent-rgb), var(--chip-alpha)); border-left: 4px solid var(--accent);
  display: flex; gap: 10px;
}
.screen-event span { color: var(--muted); min-width: 52px; }
.screen-event.blue { background: rgba(63, 127, 196, var(--chip-alpha)); border-left-color: var(--lo); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 12px 0 8px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 20px; }
.card h2, .card h3 { margin: 0 0 6px; font-size: 1.1rem; font-weight: 800; }
.card p { margin: 0; color: var(--muted); }

.setup { margin: 28px 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.setup ol { margin: 10px 0 0; padding-left: 1.2em; color: var(--muted); }
.setup li { margin: 4px 0; }
.code-form { display: flex; gap: 10px; margin-top: 14px; }
.code-form input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.code-form input:focus { outline: none; border-color: var(--accent); }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.92em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; }

footer { border-top: 1px solid var(--line); margin-top: 32px; padding: 20px 0 40px; color: var(--muted); font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { color: var(--muted); }

/* Policy pages */
.doc { max-width: 720px; padding-bottom: 8px; }
.doc h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.15; margin: 20px 0 4px; }
.doc .updated { color: var(--muted); margin: 0 0 28px; }
.doc h2 { font-size: 1.25rem; font-weight: 800; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc .callout { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin: 16px 0; }

@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 16px; }
  .features, .setup { grid-template-columns: minmax(0, 1fr); }
  .top .signin-link { display: none; }
}

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