:root {
  --ground: #f5f3ee;
  --ink: #1b2126;
  --muted: #5b646b;
  --accent: #1f6f68;
  --line: #dcd8cf;
  --card: #fbfaf7;
  --on-accent: #ffffff;
  --danger: #a8322a;
  /* Vertical rhythm shrinks on short screens so the page fits without scrolling. */
  --gap: clamp(0.75rem, 2.6vh, 1.75rem);
}
@media (prefers-color-scheme: dark) {
  :root { --ground: #14181c; --ink: #eef0ee; --muted: #a3acb2; --accent: #6cc3b8; --line: #2a3137; --card: #1b2025; --on-accent: #10201e; --danger: #ff9a8f; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--ink);
  font: 400 1rem/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
}
.hold {
  flex: 1;
  width: min(100% - 2.5rem, 70rem);
  margin: 0 auto;
  padding: clamp(1rem, 3vh, 2.5rem) 0 var(--gap);
  display: grid;
  align-content: center;
  gap: var(--gap);
}
.intro > * { margin: 0; }
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin-bottom: var(--gap) !important;
}
.mark { color: var(--accent); flex: none; }
.brand span { color: var(--accent); }
h1 {
  font: 700 clamp(2rem, 5.2vw, 3.5rem)/1.05 -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lede { margin-top: 0.6rem !important; color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.2rem); max-width: 32rem; text-wrap: pretty; }
.soon { margin-top: 0.6rem !important; font-weight: 600; font-size: 0.95rem; }
.notify { margin-top: var(--gap) !important; max-width: 30rem; }
.notify > * { margin: 0; }
.notify__label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.4rem; }
.notify__row { display: flex; gap: 0.5rem; }
.notify input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 1rem; /* 16px stops iOS zooming into the field */
  padding: 0.65rem 0.85rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
}
.notify input::placeholder { color: var(--muted); opacity: 0.8; }
.notify button {
  flex: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.1rem;
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: 0.6rem;
  cursor: pointer;
}
.notify button:hover { filter: brightness(1.08); }
.notify button:disabled { opacity: 0.7; cursor: progress; }
.notify input:focus-visible, .notify button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.notify__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notify__msg { margin-top: 0.45rem !important; font-size: 0.85rem; font-weight: 600; color: var(--accent); }
.notify__msg.is-error { color: var(--danger); }
.notify__small { margin-top: 0.35rem !important; font-size: 0.78rem; color: var(--muted); }
.notify__msg:not([hidden]) + .notify__small { display: none; }
.pillars {
  list-style: none;
  margin-top: var(--gap) !important;
  padding: var(--gap) 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--muted);
}
.pillars strong { display: block; color: var(--accent); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.09em; margin-bottom: 0.1rem; }

.countdown {
  container-type: inline-size;
  padding: clamp(1rem, 2.4vh, 1.75rem) clamp(1rem, 2.5vw, 1.75rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
}
.countdown > * { margin: 0; }
.countdown__title { font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 1.3; text-wrap: balance; }
.countdown__eve { margin-top: 0.2rem !important; color: var(--muted); font-size: 0.88rem; }
/* One row always: numbers scale with the card's own width, not the window's. */
.countdown__units { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 clamp(0.4rem, 3cqi, 1.25rem); margin: var(--gap) 0 !important; }
.unit { margin: 0; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.unit__n {
  font: 700 2.2rem/1 -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  font-size: clamp(1.7rem, 12.5cqi, 3.75rem);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}
.unit__l { color: var(--muted); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.07em; margin-top: 0.3rem; }
.countdown__note { padding-top: 0.8rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; line-height: 1.45; }

.foot { width: min(100% - 2.5rem, 70rem); margin: 0 auto; padding: 0 0 max(0.9rem, env(safe-area-inset-bottom)); color: var(--muted); font-size: 0.78rem; }
.foot p { margin: 0; }

/* Wide screens: intro and countdown side by side. */
@media (min-width: 880px) {
  .hold { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; column-gap: clamp(2.5rem, 6vw, 6rem); }
}
/* Short phones: tighten further. */
@media (max-width: 879px) and (max-height: 720px) {
  :root { --gap: clamp(0.6rem, 2vh, 1rem); }
  h1 { font-size: 1.75rem; }
  .lede { font-size: 0.95rem; }
  .soon { font-size: 0.85rem; }
  .pillars { font-size: 0.82rem; gap: 0.5rem 1rem; }
  .countdown__eve { display: none; }
  .countdown__note { font-size: 0.74rem; }
}
/* Phones with browser bars: the four points go so the form and countdown fit. */
@media (max-width: 879px) and (max-height: 880px) {
  .pillars { display: none; }
}
/* Very short screens: keep the essentials only. The label stays for screen readers. */
@media (max-width: 879px) and (max-height: 600px) {
  .soon, .notify__small { display: none; }
  .notify__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
