:root {
  color-scheme: light;
  --ink: #132237;
  --paper: #f3efe6;
  --muted: #5f625f;
  --focus: #ff2e78;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--paper);
  color: var(--ink);
}

button, a { -webkit-tap-highlight-color: transparent; }

button { font: inherit; }

#app {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 420px;
  isolation: isolate;
  overflow: hidden;
}

#field {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--paper);
}

.masthead {
  position: absolute;
  z-index: 3;
  top: max(22px, env(safe-area-inset-top));
  left: clamp(20px, 3.4vw, 54px);
  right: clamp(20px, 3.4vw, 54px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  pointer-events: none;
  color: var(--ink);
  mix-blend-mode: multiply;
}

.series,
.phase-mark {
  font-size: clamp(.68rem, .65rem + .14vw, .8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.series {
  display: inline-flex;
  min-height: 44px;
  margin: -15px 0;
  align-items: center;
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}

.phase-mark { opacity: .58; text-align: right; }

#app[data-phase="focus"] .masthead,
#app[data-phase="reveal"] .masthead {
  opacity: 0;
  pointer-events: none;
}

.copy {
  position: absolute;
  z-index: 2;
  left: clamp(22px, 5.4vw, 86px);
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 20px));
  width: min(650px, calc(100vw - 44px));
  transition: opacity .45s ease, transform .45s ease;
}

.copy.top {
  top: clamp(92px, 16vh, 170px);
  bottom: auto;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }

h1 {
  max-width: 9ch;
  margin-bottom: 18px;
  font-size: clamp(3.5rem, 10.8vw, 10.8rem);
  font-weight: 850;
  line-height: .78;
  letter-spacing: -.078em;
}

h2 {
  max-width: 13ch;
  margin-bottom: 16px;
  font-size: clamp(2.15rem, 5.3vw, 5.8rem);
  font-weight: 760;
  line-height: .92;
  letter-spacing: -.052em;
}

.lede {
  max-width: 37ch;
  margin-bottom: 22px;
  font-size: clamp(1rem, .95rem + .4vw, 1.35rem);
  line-height: 1.35;
}

.fineprint {
  max-width: 54ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.action {
  display: inline-flex;
  min-height: 48px;
  padding: 12px 18px 11px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  text-decoration: none;
  font-size: .84rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}

.action.secondary {
  background: color-mix(in srgb, var(--paper) 76%, transparent);
  color: var(--ink);
  backdrop-filter: blur(8px);
}

.action:hover { transform: translateY(-2px); }
.action:active { transform: translateY(0); }

.action:focus-visible,
.series:focus-visible {
  outline: 4px solid #ffd321;
  outline-offset: 4px;
}

.hold-target:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .88);
  outline-offset: 4px;
}

.hold-target {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: clamp(82px, 10vw, 114px);
  height: clamp(82px, 10vw, 114px);
  padding: 0;
  transform: translate(-50%, -50%);
  border: 1px solid color-mix(in srgb, var(--ink) 36%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--paper) 4%, transparent);
  color: var(--ink);
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.hold-target::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: currentColor;
}

.hold-label {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
}

#app[data-phase="focus"] .masthead,
#app[data-phase="focus"] .copy,
#app[data-phase="reveal"] .masthead,
#app[data-phase="reveal"] .copy { color: var(--ink); }

#app[data-phase="focus"] .copy {
  left: 50%;
  bottom: max(22px, calc(env(safe-area-inset-bottom) + 16px));
  width: min(460px, calc(100vw - 44px));
  transform: translateX(-50%);
  text-align: center;
}

.ritual-instruction {
  margin: 0;
  font-size: clamp(.82rem, .78rem + .22vw, 1rem);
  font-weight: 650;
  letter-spacing: .02em;
}

#app[data-holding="true"] .hold-target {
  color: #fff;
  border-color: color-mix(in srgb, #fff 74%, transparent);
}

.reveal-copy {
  width: min(720px, calc(100vw - 44px));
}

.reveal-copy h2 { max-width: 15ch; }

.word-readout {
  display: inline-block;
  margin-bottom: 13px;
  padding: 6px 9px 5px;
  border: 1px solid currentColor;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 700px) {
  #app { min-height: 500px; }
  .phase-mark { max-width: 15ch; line-height: 1.3; }
  .copy { bottom: max(20px, calc(env(safe-area-inset-bottom) + 14px)); }
  .copy.top { top: 100px; }
  h1 { font-size: clamp(3.7rem, 20vw, 6.8rem); }
  h2 { font-size: clamp(2.25rem, 11vw, 4rem); }
  .lede { max-width: 31ch; }
  #app[data-phase="focus"] .copy { max-width: 28ch; }
  #app[data-phase="focus"] .lede { font-size: .94rem; }
  #app[data-phase="reveal"] .copy { bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px)); }
}

@media (max-height: 620px) and (orientation: landscape) {
  .copy { bottom: 18px; left: 26px; }
  .copy.top { top: 76px; }
  h1 { font-size: clamp(3.2rem, 12vh, 5.6rem); }
  h2 { font-size: clamp(2rem, 9vh, 3.4rem); }
  .lede { margin-bottom: 12px; font-size: .92rem; }
  .fineprint { display: none; }
}

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