:root {
  --night: #000000;
  --ember: #d8914f;
  --ember-dim: #9c6a3e;
  --ash: #a39b92;
  --linen: #ede7dc;
  --ink: #2c2620;
  --clock: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif;
  --text: "Newsreader", "Iowan Old Style", Georgia, serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--night);
  color: var(--ash);
  font: 400 1.1875rem/1.6 var(--text);
}

a { color: var(--ember); text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

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

h1, h2, h3 { color: #f3eee6; font-weight: 400; line-height: 1.15; margin: 0; }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.75rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; }

.wrap { width: min(100% - 32px, 68rem); margin-inline: auto; }
.measure { max-width: 34rem; }
.stack > * + * { margin-top: 1.1rem; }

/* Home: the hero is the nightstand screen itself. */
.hero {
  min-height: min(100svh, 62rem);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 0 4rem;
}
.clock {
  font: 200 clamp(5.5rem, 24vw, 15rem)/0.9 var(--clock);
  color: var(--ember);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.clock small { font-size: 0.18em; font-weight: 500; letter-spacing: 0; margin-left: 0.15em; }
.clock-date { font: 500 clamp(1rem, 2.6vw, 1.35rem) var(--clock); color: var(--ember-dim); margin-top: 1rem; }
.clock-note { font: 500 clamp(0.9rem, 2.2vw, 1.1rem) var(--clock); color: #6f6862; margin-top: 0.35rem; }
.machine { width: min(62vw, 330px); margin: 2.5rem auto 0; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-top: 2.5rem; }
.hero .lede { margin: 0.75rem auto 0; max-width: 30rem; }
.store {
  display: inline-block;
  margin-top: 1.75rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  background: var(--ember);
  color: var(--night);
  font: 600 1rem var(--clock);
  text-decoration: none;
}
.store:hover { background: #e5a266; }

.day { background: var(--linen); color: #5d554c; padding: clamp(4rem, 10vw, 7rem) 0; }
.day h2 { color: var(--ink); }
.night { padding: clamp(4rem, 10vw, 7rem) 0; }

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 760px) {
  .split { grid-template-columns: 1.1fr 0.9fr; }
  .split.flip > :first-child { order: 2; }
}
.phone { width: min(100%, 300px); border-radius: 36px; justify-self: center; box-shadow: 0 30px 60px rgba(60, 40, 20, 0.18); }
.duo { border-radius: 28px; justify-self: center; border: 1px solid #1d1a17; }

.facts { color: #6f6862; font: 500 1rem var(--clock); text-align: center; padding: 0 0 4rem; }

footer { border-top: 1px solid #1d1a17; padding: 2rem 0 3rem; font: 500 0.95rem var(--clock); color: #6f6862; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
footer nav { display: flex; gap: 1.5rem; }

/* Support and privacy pages */
.page header { padding: 2rem 0; }
.brand { display: inline-flex; align-items: center; gap: 0.75rem; color: #f3eee6; text-decoration: none; font: 500 1.05rem var(--clock); }
.brand img { width: 40px; border-radius: 10px; }
.page main { padding: 2rem 0 5rem; }
.page h1 { font-size: clamp(2.2rem, 6vw, 3.25rem); margin-bottom: 1.5rem; }
.page h2 { font-size: 1.6rem; margin-top: 3rem; }
.page h3 { margin-top: 2rem; }
.page main p + p { margin-top: 1rem; }
.page ul { padding-left: 1.2rem; }
.page li + li { margin-top: 0.5rem; }

form { display: grid; gap: 1.1rem; margin-top: 1.5rem; }
label { display: grid; gap: 0.35rem; font: 500 0.95rem var(--clock); color: #cfc7bd; }
input, textarea {
  font: 400 1.05rem/1.5 var(--text);
  color: #f3eee6;
  background: #12100e;
  border: 1px solid #2e2924;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  width: 100%;
}
textarea { min-height: 9rem; resize: vertical; }
.trap { position: absolute; left: -9999px; }
form button {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1.5rem;
  background: var(--ember);
  color: var(--night);
  font: 600 1rem var(--clock);
  cursor: pointer;
}
form button[disabled] { opacity: 0.6; cursor: default; }
.status { font: 500 1rem var(--clock); min-height: 1.5em; }
.status.error { color: #e48a7a; }
.status.done { color: var(--ember); }

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