:root {
  --ink: #eef1e6;
  --muted: rgba(229, 237, 222, 0.54);
  --dim: rgba(229, 237, 222, 0.22);
  --ground: #07100d;
  --living: #95ffd1;
  --ember: #ffb06a;
  color-scheme: dark;
  font-synthesis: none;
}

* { box-sizing: border-box; }

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

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

body {
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 43%, rgba(15, 52, 39, 0.42), transparent 37%),
    radial-gradient(circle at 18% 90%, rgba(65, 38, 19, 0.16), transparent 42%),
    var(--ground);
  color: var(--ink);
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", "Roboto Mono", monospace;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  content: "";
  opacity: 0.11;
  background-image:
    repeating-radial-gradient(circle at 30% 20%, transparent 0, rgba(255,255,255,.08) .45px, transparent .8px, transparent 4px);
  mix-blend-mode: soft-light;
}

a, button { color: inherit; }
button { font: inherit; }

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

.veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(7,16,13,.72) 0, rgba(7,16,13,.15) 48%, rgba(7,16,13,.02) 100%);
}

.site-head,
.site-foot,
main {
  position: relative;
  z-index: 3;
}

.site-head {
  position: fixed;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(24px, env(safe-area-inset-top)) clamp(24px, 4vw, 64px) 0;
  font-size: 10px;
  letter-spacing: .2em;
}

.wordmark {
  text-decoration: none;
  letter-spacing: .34em;
  font-weight: 600;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.status__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--living);
  box-shadow: 0 0 14px rgba(149,255,209,.82);
  animation: status-pulse 12.7s ease-in-out infinite;
}

.status[data-state="delayed"] { color: rgba(255,176,106,.74); }
.status[data-state="delayed"] .status__dot {
  background: var(--ember);
  box-shadow: 0 0 14px rgba(255,176,106,.72);
  animation: none;
}
.status[data-state="unverified"] .status__dot {
  background: rgba(229,237,222,.35);
  box-shadow: none;
  animation: none;
}

main {
  min-height: 100svh;
  padding: clamp(100px, 16vh, 170px) clamp(24px, 6vw, 92px) max(86px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.opening { max-width: 760px; }

.kicker {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .19em;
}

h1, h2 {
  font-family: Iowan Old Style, Baskerville, "Times New Roman", serif;
  font-weight: 400;
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: clamp(58px, 9.3vw, 150px);
  line-height: .82;
  letter-spacing: -.065em;
}

h1 span { display: block; }
h1 span:last-child { color: rgba(238,241,230,.72); font-style: italic; }

.instruction {
  margin: clamp(28px, 5vh, 52px) 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: .06em;
}

.leave {
  margin: 21px 0 0;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid rgba(149,255,209,.28);
  background: transparent;
  color: rgba(229,237,222,.66);
  cursor: pointer;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.leave:hover,
.leave:focus-visible { color: var(--ink); border-color: var(--living); }

.transmission {
  min-height: 1.5em;
  margin: 14px 0 0;
  color: rgba(229,237,222,.58);
  font-size: 9px;
  letter-spacing: .14em;
}

.transmission[data-state="retained"] { color: var(--living); }
.transmission[data-state="refused"] { color: var(--ember); }

.measure {
  position: fixed;
  z-index: 3;
  top: 50%;
  right: clamp(24px, 4vw, 64px);
  width: min(190px, 23vw);
  margin: 0;
  transform: translateY(-50%);
}

.measure div {
  padding: 15px 0;
  border-top: 1px solid var(--dim);
}

.measure div:last-child { border-bottom: 1px solid var(--dim); }

.measure dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.measure dd {
  margin: 0;
  font-size: 10px;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}

.threshold,
.listen {
  position: fixed;
  left: clamp(24px, 6vw, 92px);
  bottom: max(44px, calc(env(safe-area-inset-bottom) + 26px));
  width: min(270px, 52vw);
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid var(--dim);
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: color .3s ease, border-color .3s ease;
}

.listen { bottom: max(91px, calc(env(safe-area-inset-bottom) + 73px)); }

.threshold i,
.listen i {
  position: absolute;
  right: 0;
  bottom: -1px;
  width: 28%;
  height: 1px;
  background: var(--living);
  transform: scaleX(.08);
  transform-origin: right;
  box-shadow: 0 0 9px rgba(149,255,209,.45);
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
}

.threshold:hover,
.threshold:focus-visible,
.listen:hover,
.listen:focus-visible { color: var(--ink); border-color: rgba(149,255,209,.4); }
.threshold:hover i,
.threshold:focus-visible i,
.listen:hover i,
.listen:focus-visible i { transform: scaleX(1); }

.listen[aria-pressed="true"] { color: var(--ember); border-color: rgba(255,176,106,.34); }
.listen[aria-pressed="true"] i { background: var(--ember); box-shadow: 0 0 9px rgba(255,176,106,.4); transform: scaleX(1); }
.listen:disabled { opacity: .32; cursor: default; }

.field-note {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 8;
  width: min(610px, 100%);
  padding: max(82px, env(safe-area-inset-top)) clamp(30px, 7vw, 88px) max(50px, env(safe-area-inset-bottom));
  overflow-y: auto;
  background: rgba(9, 18, 15, .94);
  border-left: 1px solid rgba(149,255,209,.13);
  box-shadow: -40px 0 100px rgba(0,0,0,.28);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transform: translateX(102%);
  visibility: hidden;
  transition: transform .75s cubic-bezier(.2,.8,.2,1), visibility 0s linear .75s;
}

.field-note.is-open {
  transform: translateX(0);
  visibility: visible;
  transition-delay: 0s;
}

.field-note__close {
  position: absolute;
  top: max(26px, env(safe-area-inset-top));
  right: clamp(30px, 7vw, 88px);
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.field-note__close:hover,
.field-note__close:focus-visible { color: var(--ink); }

.field-note__body { margin: auto 0; }

.field-note h2 {
  max-width: 420px;
  margin: 0 0 clamp(42px, 8vh, 74px);
  font-size: clamp(42px, 6vw, 76px);
  line-height: .96;
  letter-spacing: -.045em;
}

.field-note p:not(.kicker) {
  max-width: 430px;
  margin: 0 0 1.4em;
  color: rgba(238,241,230,.69);
  font-family: Iowan Old Style, Baskerville, "Times New Roman", serif;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.52;
}

.field-note footer {
  margin-top: 52px;
  padding-top: 15px;
  border-top: 1px solid var(--dim);
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.site-foot {
  position: fixed;
  right: clamp(24px, 4vw, 64px);
  bottom: max(24px, env(safe-area-inset-bottom));
  left: auto;
  display: flex;
  gap: 22px;
  color: rgba(229,237,222,.58);
  font-size: 10px;
  letter-spacing: .16em;
  font-variant-numeric: tabular-nums;
}

.site-foot a { color: inherit; text-decoration: none; transition: color .25s ease; }
.site-foot a:hover,
.site-foot a:focus-visible { color: var(--ink); }

.pointer {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid rgba(149,255,209,.35);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-100px,-100px,0) scale(.75);
  transition: opacity .2s ease, width .2s ease, height .2s ease, margin .2s ease, border-color .2s ease;
}

.pointer.is-visible { opacity: 1; }
.pointer.is-pressed { width: 18px; height: 18px; margin: -9px 0 0 -9px; border-color: var(--ember); }

.no-script {
  position: fixed;
  z-index: 12;
  inset: auto 24px 24px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

:focus-visible { outline: 1px solid var(--living); outline-offset: 5px; }

@keyframes status-pulse {
  0%, 100% { opacity: .42; transform: scale(.72); }
  44% { opacity: .48; transform: scale(.78); }
  50% { opacity: 1; transform: scale(1.25); }
  58% { opacity: .48; transform: scale(.78); }
}

@media (max-width: 760px) {
  .site-head { align-items: flex-start; }
  .status span:last-child { display: none; }
  main { justify-content: flex-start; padding-top: 24vh; }
  .opening { max-width: 94%; }
  h1 { font-size: clamp(56px, 18vw, 90px); line-height: .87; }
  .instruction { max-width: 210px; }
  .measure {
    top: auto;
    right: 24px;
    bottom: max(86px, calc(env(safe-area-inset-bottom) + 68px));
    width: 130px;
    transform: none;
  }
  .measure div { padding: 10px 0; }
  .measure div:nth-child(1),
  .measure div:nth-child(2) { display: none; }
  .threshold,
  .listen { width: 42vw; }
  .site-foot {
    right: 24px;
    bottom: max(24px, env(safe-area-inset-bottom));
    left: 24px;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }
  .site-foot time { display: none; }
  .veil { background: linear-gradient(180deg, rgba(7,16,13,.35), transparent 62%); }
}

@media (hover: none), (pointer: coarse) {
  .pointer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
