@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/newsreader-latin-opsz-italic.woff2") format("woff2");
}

:root {
  --brick: #3b1410;
  --plaster: #f1e8d9;
  --plaster-dim: #cdbda9;
  --brass: #e2b873;
  --line: rgba(241, 232, 217, 0.22);
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --pad: clamp(24px, 4.5vw, 64px);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { background: var(--brick); }

body {
  min-height: 100svh;
  background: var(--brick);
  color: var(--plaster);
  font-family: var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--pad);
}

.brand {
  font-size: clamp(1.2rem, 1.7vw, 1.5rem);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.stage {
  align-self: center;
  padding-block: clamp(32px, 8vh, 96px);
}

.timer {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  justify-content: start;
  column-gap: clamp(1.75rem, 5.5vw, 6rem);
  animation: arrive 1100ms ease-out both;
}

.unit { display: flex; flex-direction: column; }

.num {
  font-size: clamp(4.25rem, 14.5vw, 12.5rem);
  font-weight: 300;
  line-height: 0.88;
  letter-spacing: -0.025em;
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "lnum" 1, "tnum" 1;
}

.unit--live .num { color: var(--brass); }

.label {
  margin-top: clamp(0.6rem, 1.2vw, 1rem);
  font-size: clamp(1rem, 1.45vw, 1.3rem);
  font-style: italic;
  color: var(--plaster-dim);
}

.arrived {
  font-size: clamp(3rem, 11vw, 9rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.02em;
  animation: arrive 1100ms ease-out both;
}

.progress {
  height: 1px;
  background: var(--line);
  margin-bottom: clamp(0.9rem, 1.6vw, 1.4rem);
}
.progress__fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brass);
}

.when {
  font-size: clamp(1.05rem, 1.55vw, 1.3rem);
  line-height: 1.5;
  color: var(--plaster);
  max-width: 66ch;
  text-wrap: pretty;
}

.foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 28rem);
  column-gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
}

.notify { min-height: 8.5rem; }

.notify__ask {
  display: block;
  text-wrap: balance;
  font-size: clamp(1.05rem, 1.55vw, 1.3rem);
  line-height: 1.5;
  margin-bottom: 0.9rem;
}

.notify__row {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}

.notify input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--plaster-dim);
  border-radius: 0;
  color: var(--plaster);
  font: inherit;
  font-size: 1.15rem;
  padding: 0.55rem 0;
}
.notify input[type="email"]::placeholder { color: rgba(205, 189, 169, 0.65); }
.notify input[type="email"]:focus { border-bottom-color: var(--brass); outline: none; }

.notify button {
  flex: none;
  background: transparent;
  border: 1px solid var(--brass);
  border-radius: 0;
  color: var(--brass);
  cursor: pointer;
  font: inherit;
  font-size: 1.05rem;
  padding: 0.6rem 1.4rem;
  transition: background-color 160ms ease, color 160ms ease;
}
.notify button:hover { background: var(--brass); color: var(--brick); }
.notify button:disabled { opacity: 0.55; cursor: progress; }

.notify input:focus-visible,
.notify button:focus-visible {
  outline: 2px solid var(--plaster);
  outline-offset: 4px;
}

.notify__fine {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--plaster-dim);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.status {
  min-height: 1.5em;
  margin-top: 0.8rem;
  font-size: 1.05rem;
}
.status--error { color: #ffd3c4; }
.status--target { display: none; }
.status--target:target { display: block; }

@keyframes arrive {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 860px) {
  .foot {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.75rem;
  }
  .notify { min-height: 0; }
}

@media (max-width: 640px) {
  .notify__row { flex-wrap: wrap; }
  .notify button { width: 100%; }
  .timer {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, max-content);
    column-gap: clamp(2.5rem, 14vw, 5rem);
    row-gap: clamp(2rem, 7vw, 3rem);
  }
  .num { font-size: clamp(4.5rem, 24vw, 7rem); }
}

@media (prefers-reduced-motion: reduce) {
  .timer, .arrived { animation: none; }
}
