:root {
  --paper: #07110e;
  --ink: #e8f3ee;
  --muted: #93aaa0;
  --line: rgba(232, 243, 238, 0.16);
  --mint: #c8f6e4;
  --mint-hover: #dafbed;
  --danger: #e08a82;
  color-scheme: dark;
  --serif: "Instrument Serif", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Instrument Sans", "Avenir Next", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 17, 14, 0.92), rgba(7, 17, 14, 0) 132px),
    linear-gradient(
      90deg,
      rgba(7, 17, 14, 0) 0%,
      rgba(7, 17, 14, 0) 32%,
      rgba(7, 17, 14, 0.55) 48%,
      rgba(7, 17, 14, 0.9) 68%
    ),
    radial-gradient(
      closest-side at 22% 52%,
      rgba(7, 17, 14, 0.78),
      rgba(7, 17, 14, 0) 100%
    );
}

.topbar,
.hero {
  position: relative;
  z-index: 2;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
}

.mark {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  gap: 0.05rem;
}

.mark-name {
  font-family: var(--serif);
  font-size: 1.65rem;
  line-height: 1;
}

.mark-domain {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.pill-link,
.button,
.text-link {
  text-decoration: none;
}

.pill-link {
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(7, 17, 14, 0.62);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.pill-link:hover,
.text-link:hover {
  color: #b7f3de;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(320px, 1.15fr);
  align-items: center;
  gap: 4vw;
  padding: 7.5rem 7vw 4.5rem 6vw;
}

.clock-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.35rem;
  user-select: none;
}

.clock {
  width: min(300px, 68vw);
  height: auto;
  overflow: visible;
}

.clock-face {
  fill: rgba(7, 17, 14, 0.35);
  stroke: rgba(232, 243, 238, 0.2);
  stroke-width: 1;
}

.timer-track,
.timer-remaining {
  fill: none;
  stroke-width: 1.5;
}

.timer-track {
  stroke: rgba(232, 243, 238, 0.14);
}

.timer-remaining {
  stroke: #8ee0c4;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 100px 100px;
  transform-box: view-box;
}

.tick {
  stroke: rgba(232, 243, 238, 0.28);
  stroke-linecap: round;
}

.tick.major {
  stroke: rgba(232, 243, 238, 0.72);
}

.hand {
  stroke: #8ee0c4;
  stroke-width: 1.4;
  stroke-linecap: round;
  transform-origin: 100px 100px;
  transform-box: view-box;
}

.cap {
  fill: var(--ink);
  transition: fill 160ms ease;
}

.clock.is-ticking .cap {
  fill: #8ee0c4;
}

.copy h1 {
  margin: 0;
  max-width: 11ch;
  font-family: var(--serif);
  font-size: clamp(3.3rem, 5.5vw, 5.7rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.94;
  text-wrap: balance;
}

.subhead {
  margin: 1.35rem 0 0;
  max-width: 26rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.45;
  text-wrap: balance;
}

.actions {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  margin-top: 1.85rem;
}

.button {
  appearance: none;
  border: 0;
  background: var(--mint);
  color: #10241c;
  border-radius: 999px;
  padding: 0.95rem 1.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
}

.button:hover {
  background: var(--mint-hover);
}

.button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.text-link {
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

:focus-visible {
  outline: 2px solid #8ee0c4;
  outline-offset: 3px;
}

dialog {
  width: min(440px, calc(100vw - 2rem));
  padding: 1.5rem 1.5rem 1.35rem;
  border: 0;
  border-radius: 22px;
  background: #101a16;
  color: var(--ink);
  border: 1px solid rgba(232, 243, 238, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

dialog[open] {
  animation: rise 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(7px);
}

dialog[open]::backdrop {
  animation: fade 220ms ease;
}

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

dialog h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2.15rem;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}

.lede {
  margin: 0.7rem 0 0;
  color: var(--muted);
}

form {
  display: grid;
}

label {
  margin-top: 1.15rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

input {
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0b1411;
  color: var(--ink);
  font-size: 1rem;
}

input:focus {
  border-color: #8ee0c4;
  outline: none;
  box-shadow: 0 0 0 3px rgba(142, 224, 196, 0.18);
}

.form-error {
  margin: 0.7rem 0 0;
  color: var(--danger);
  font-size: 0.92rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 1.15rem;
}

.icon-button {
  appearance: none;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.icon-button:hover {
  background: rgba(232, 243, 238, 0.08);
}

input::placeholder {
  color: #6e857c;
}

.success .lede {
  margin-top: 0.8rem;
}

.noscript {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 3;
  margin: 0;
  padding: 0.7rem 0.9rem;
  background: #101a16;
  border-radius: 10px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 2.2rem;
    padding: 7rem 1.35rem 3rem;
  }

  .clock-block {
    align-items: flex-start;
  }

  .clock {
    width: min(210px, 58vw);
  }

  .copy h1 {
    max-width: 12ch;
  }

  .actions {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog[open],
  dialog[open]::backdrop,
  .cap {
    animation: none;
    transition: none;
  }
}
