/* ============================================================
   One Year — editorial letterpress
   Ink on warm paper, one vermilion accent, nothing else.
   ============================================================ */

:root {
  --paper:      #F2EDE3;
  --paper-deep: #E8E0D1;
  --ink:        #17140F;
  --ink-soft:   #5A5248;
  --ink-faint:  #938978;
  --accent:     #C2452D;
  --accent-dim: #A03A24;

  --rule: rgba(23, 20, 15, 0.14);

  --display: "Fraunces", "Times New Roman", serif;
  --body:    "Spectral", Georgia, serif;
  --mono:    "DM Mono", ui-monospace, monospace;

  --pad: clamp(1.25rem, 5vw, 6rem);
  --measure: 62ch;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 300;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.15rem);
  line-height: 1.65;
  overflow-x: hidden;
  /* warm light falling from the top-left, like a window */
  background-image:
    radial-gradient(120% 80% at 10% -10%, rgba(255, 249, 235, 0.95) 0%, rgba(242, 237, 227, 0) 60%),
    radial-gradient(90% 60% at 100% 100%, rgba(194, 69, 45, 0.05) 0%, rgba(242, 237, 227, 0) 70%);
  background-attachment: fixed;
}

::selection { background: var(--accent); color: var(--paper); }

/* ---------- overlays ---------- */

.grain {
  position: fixed;
  inset: -50%;
  z-index: 9000;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 8999;
  pointer-events: none;
  box-shadow: inset 0 0 18vmax rgba(23, 20, 15, 0.14);
}

.scrollbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 9100;
  background: rgba(23, 20, 15, 0.07);
}
.scrollbar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

/* ---------- shared type ---------- */

.eyebrow,
.rule-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}

.rule-label {
  display: flex;
  align-items: center;
  gap: 1.25em;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}
.rule-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(5px);
  transition:
    opacity 1s var(--ease),
    transform 1.1s var(--ease),
    filter 1s var(--ease);
  transition-delay: var(--d, 0ms);
}
.reveal.in {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  padding: clamp(2rem, 6vh, 5rem) var(--pad) clamp(5rem, 10vh, 7rem);
  display: grid;
  align-content: center;
  overflow: hidden;
}

.hero__inner { max-width: 1400px; width: 100%; }

.hero .eyebrow { margin-bottom: clamp(2rem, 5vh, 3.5rem); }

.names {
  font-family: var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 144;
  font-weight: 300;
  font-size: clamp(3.4rem, 13.5vw, 12rem);
  line-height: 0.84;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.names__line { display: block; }
.names__line--2 { padding-left: clamp(1rem, 9vw, 9rem); }

.names__amp {
  display: inline-block;
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  font-size: 0.78em;
  padding: 0 0.12em;
  transform: translateY(0.04em);
}

/* the counter */
.counter { margin-top: clamp(3rem, 8vh, 5.5rem); }

.counter__units {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: baseline;
  border-top: 1px solid var(--rule);
  padding-top: 1.4rem;
}

.unit { display: grid; gap: 0.35rem; }
.unit__n {
  font-family: var(--mono);
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.unit:first-child .unit__n { color: var(--accent); }
.unit__l {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.counter__note {
  font-family: var(--body);
  font-style: italic;
  color: var(--ink-soft);
  margin: 1.4rem 0 0;
  font-size: 0.95rem;
}

/* rotating seal */
.seal {
  position: absolute;
  top: clamp(1.5rem, 6vh, 5rem);
  right: clamp(1rem, 5vw, 5rem);
  width: clamp(104px, 15vw, 190px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  opacity: 0.9;
}
.seal svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  animation: spin 54s linear infinite;
}
.seal__ring { fill: none; stroke: var(--rule); stroke-width: 1; }
.seal__ring--in { stroke: rgba(194, 69, 45, 0.3); }
.seal__text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  fill: var(--ink-faint);
  text-transform: uppercase;
}
.seal__mark {
  font-family: var(--display);
  font-variation-settings: "WONK" 1, "SOFT" 80;
  font-style: italic;
  font-size: clamp(1.6rem, 4vw, 3rem);
  color: var(--accent);
  line-height: 1;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* scroll cue */
.cue {
  position: absolute;
  left: 50%;
  bottom: clamp(1.5rem, 4vh, 2.5rem);
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink-faint);
}
.cue__line {
  width: 1px;
  height: clamp(32px, 6vh, 56px);
  background: linear-gradient(var(--rule), transparent);
  animation: drip 2.6s var(--ease) infinite;
  transform-origin: top;
}
.cue__word {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
@keyframes drip {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

/* ============================================================
   INTRO
   ============================================================ */

.intro {
  padding: clamp(6rem, 18vh, 14rem) var(--pad);
  display: grid;
  justify-items: center;
}
.intro__text {
  font-family: var(--display);
  font-variation-settings: "SOFT" 70, "WONK" 1, "opsz" 100;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.7rem, 4.4vw, 3.6rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  text-align: center;
  max-width: 24ch;
  margin: 0;
  text-wrap: balance;
}

/* ============================================================
   STATS
   ============================================================ */

.stats { padding: 0 var(--pad) clamp(5rem, 14vh, 10rem); max-width: 1400px; margin-inline: auto; }

.stats__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(2rem, 5vw, 3rem);
}
.stat { border-top: 1px solid var(--rule); padding-top: 1.1rem; }
.stat__v {
  font-family: var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 144;
  font-weight: 300;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  display: block;
}
.stat:nth-child(odd) .stat__v { color: var(--accent); }
.stat__l {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.8rem;
  display: block;
}

/* ============================================================
   TIMELINE
   ============================================================ */

.tl {
  position: relative;
  padding: 0 var(--pad) clamp(6rem, 16vh, 12rem);
  max-width: 1280px;
  margin-inline: auto;
}

.tl__spine {
  position: absolute;
  top: 7rem;
  bottom: clamp(6rem, 16vh, 12rem);
  left: calc(var(--pad) + 7px);
  width: 1px;
  background: var(--rule);
}
.tl__spine span {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 0;
  background: var(--accent);
}

.tl__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(5rem, 14vh, 11rem);
}

.ev {
  position: relative;
  padding-left: calc(1.5rem + 14px);
}
.ev::before {                 /* node on the spine */
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink-faint);
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease), transform 0.5s var(--ease);
}
.ev.in::before {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.12);
}

.ev__date {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.9rem;
}
.ev__title {
  font-family: var(--display);
  font-variation-settings: "SOFT" 50, "WONK" 1, "opsz" 72;
  font-weight: 400;
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 1.1rem;
  max-width: 22ch;
  text-wrap: balance;
}
.ev__body {
  margin: 0;
  max-width: 44ch;
  color: var(--ink-soft);
}

/* photo frame — taped-in print */
.frame {
  margin: 0;
  background: #FCFAF5;
  padding: 11px 11px 0;
  box-shadow:
    0 1px 1px rgba(23, 20, 15, 0.09),
    0 14px 28px -14px rgba(23, 20, 15, 0.3);
  transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
  width: fit-content;
  max-width: 100%;
}
.frame img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.92) contrast(1.03);
}
.frame figcaption {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0.95rem 0.1rem 1rem;
  text-align: center;
  min-height: 1rem;
}

/* missing-photo placeholder, so the layout never breaks */
.frame--missing { width: min(100%, 30rem); }
.frame--missing img { display: none; }
.frame--missing .ph {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(45deg, var(--paper-deep) 0 10px, #EFE7D9 10px 20px);
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  padding: 1rem;
  text-align: center;
  word-break: break-all;
}
.frame .ph { display: none; }

/* desktop: alternating two-column with the spine down the middle */
@media (min-width: 900px) {
  .tl__spine { left: 50%; }

  .ev {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
    padding-left: 0;
  }
  .ev::before { left: 50%; margin-left: -7.5px; }

  .ev__text { grid-column: 1; text-align: right; padding-right: 2.5rem; }
  .ev__text .ev__title,
  .ev__text .ev__body { margin-left: auto; }
  .ev__media { grid-column: 2; padding-left: 2.5rem; }

  .ev:nth-child(even) .ev__text { grid-column: 2; text-align: left; padding: 0 0 0 2.5rem; }
  .ev:nth-child(even) .ev__text .ev__title,
  .ev:nth-child(even) .ev__text .ev__body { margin-left: 0; margin-right: auto; }
  .ev:nth-child(even) .ev__media { grid-column: 1; padding: 0 2.5rem 0 0; display: flex; justify-content: flex-end; }

  /* Cap how tall a timeline photo can get. Without this a portrait shot
     towers over its own paragraph and leaves a dead gap beside the text.
     Landscape photos are unaffected. */
  .ev__media .frame img { max-height: 30rem; width: auto; max-width: 100%; }

  .ev:nth-child(odd)  .frame { transform: rotate(1.3deg); }
  .ev:nth-child(even) .frame { transform: rotate(-1.6deg); }
  .frame:hover {
    transform: rotate(0deg) scale(1.025) !important;
    box-shadow:
      0 2px 2px rgba(23, 20, 15, 0.1),
      0 30px 60px -22px rgba(23, 20, 15, 0.42);
  }

  /* text-only entries centre themselves */
  .ev--notext-media .ev__text { padding-right: 2.5rem; }
}

@media (max-width: 899px) {
  .ev__media { margin-top: 1.8rem; }
  .frame { transform: rotate(-1.2deg); }
}

/* ============================================================
   GALLERY
   ============================================================ */

.gal {
  padding: 0 var(--pad) clamp(6rem, 16vh, 12rem);
  max-width: 1400px;
  margin-inline: auto;
}

.gal__grid {
  columns: 3;
  column-gap: clamp(0.75rem, 1.6vw, 1.5rem);
}
/* Four columns once there is room. With a mostly-portrait gallery, three
   columns run very long, and the letter at the end is the thing she should
   still have the patience to reach. */
@media (min-width: 1200px) { .gal__grid { columns: 4; } }
@media (max-width: 900px) { .gal__grid { columns: 2; } }
@media (max-width: 520px) { .gal__grid { columns: 1; } }

.shot {
  position: relative;
  break-inside: avoid;
  margin: 0 0 clamp(0.75rem, 1.6vw, 1.5rem);
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--paper-deep);
  cursor: pointer;
  overflow: hidden;
  font: inherit;
  color: inherit;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.9) contrast(1.02);
  transition: transform 1.1s var(--ease), filter 0.6s var(--ease);
}
.shot:hover img,
.shot:focus-visible img { transform: scale(1.045); filter: saturate(1) contrast(1.04); }

.shot__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(23, 20, 15, 0.6), rgba(23, 20, 15, 0) 55%);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  display: flex;
  align-items: flex-end;
  padding: 1rem 1.1rem;
}
.shot:hover .shot__veil,
.shot:focus-visible .shot__veil { opacity: 1; }
.shot__cap {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #F7F2E8;
  text-align: left;
}
.shot--missing {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: repeating-linear-gradient(45deg, var(--paper-deep) 0 10px, #EFE7D9 10px 20px);
  cursor: default;
}
.shot--missing img, .shot--missing .shot__veil { display: none; }
.shot--missing .ph {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  padding: 1rem;
  text-align: center;
  word-break: break-all;
}
.shot .ph { display: none; }

/* ============================================================
   LETTER
   ============================================================ */

.letter {
  padding: 0 var(--pad) clamp(7rem, 18vh, 13rem);
  display: grid;
  justify-items: center;
}

.letter__paper {
  position: relative;
  background: #FBF7EE;
  padding: clamp(2.5rem, 7vw, 6rem) clamp(1.75rem, 6vw, 5.5rem);
  max-width: 68ch;
  box-shadow:
    0 1px 1px rgba(23, 20, 15, 0.08),
    0 40px 70px -40px rgba(23, 20, 15, 0.38);
}
.letter__paper::before {   /* hairline inner border */
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(23, 20, 15, 0.09);
  pointer-events: none;
}

.letter__heading {
  font-family: var(--display);
  font-variation-settings: "SOFT" 70, "WONK" 1, "opsz" 100;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 clamp(1.75rem, 4vw, 2.75rem);
  text-align: center;
  color: var(--accent);
}

.letter__body p {
  margin: 0 0 1.5em;
  font-size: clamp(1.02rem, 1vw + 0.8rem, 1.2rem);
  line-height: 1.78;
  max-width: var(--measure);
}
.letter__body p:first-child::first-letter {
  font-family: var(--display);
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 144;
  font-weight: 400;
  font-size: 3.5em;
  float: left;
  line-height: 0.82;
  padding: 0.06em 0.1em 0 0;
  color: var(--accent);
}
.letter__body p:last-child { margin-bottom: 0; }

.letter__signoff {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: clamp(2.5rem, 6vw, 3.5rem) 0 0.6rem;
}
.letter__from {
  font-family: var(--display);
  font-variation-settings: "SOFT" 90, "WONK" 1, "opsz" 100;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1;
  margin: 0;
  letter-spacing: -0.02em;
}

/* ============================================================
   FOOTER
   ============================================================ */

.foot {
  border-top: 1px solid var(--rule);
  margin: 0 var(--pad);
  padding: 2rem 0 3rem;
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.foot__dot { opacity: 0.5; }

/* ============================================================
   LIGHTBOX
   ============================================================ */

.lb {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(15, 13, 10, 0.94);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 2rem);
  padding: clamp(3rem, 8vh, 5rem) clamp(0.75rem, 3vw, 3rem);
  animation: fade 0.35s var(--ease);
}
.lb[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }

.lb__fig {
  grid-column: 2;
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 1rem;
  min-width: 0;
}
.lb__fig img {
  max-width: 100%;
  max-height: 78svh;
  width: auto;
  object-fit: contain;
  background: #0F0D0A;
  animation: pop 0.45s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: scale(0.97); } }
.lb__fig figcaption {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(247, 242, 232, 0.6);
  text-align: center;
}

.lb__nav, .lb__close {
  background: none;
  border: 1px solid rgba(247, 242, 232, 0.22);
  color: rgba(247, 242, 232, 0.8);
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.lb__nav:hover, .lb__close:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #FBF7EE;
}
.lb__nav {
  width: clamp(2.5rem, 5vw, 3.4rem);
  aspect-ratio: 1;
  font-size: 1.6rem;
  line-height: 1;
  border-radius: 50%;
}
.lb__nav--prev { grid-column: 1; }
.lb__nav--next { grid-column: 3; }
.lb__close {
  position: absolute;
  top: clamp(1rem, 3vh, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
}

/* ============================================================
   THE GATE
   ============================================================ */

html.locked { overflow: hidden; }
html.locked main,
html.locked .scrollbar { display: none; }

.gate {
  position: fixed;
  inset: 0;
  z-index: 9400;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 5vw, 3rem);
  background: var(--paper);
  background-image:
    radial-gradient(130% 90% at 50% -20%, rgba(255, 250, 238, 1) 0%, rgba(242, 237, 227, 0) 65%),
    radial-gradient(80% 60% at 50% 120%, rgba(194, 69, 45, 0.07) 0%, rgba(242, 237, 227, 0) 70%);
  transition: opacity 0.9s var(--ease), filter 0.9s var(--ease);
}

.gate__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

.gate--open {
  opacity: 0;
  filter: blur(14px);
  pointer-events: none;
}

.gate__card {
  position: relative;
  z-index: 1;
  width: min(100%, 44rem);
  text-align: center;
  padding: clamp(2.5rem, 7vw, 4.5rem) clamp(1.5rem, 5vw, 3.5rem);
}
.gate__card::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--rule);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.97);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease);
}
.gate--ready .gate__card::before { opacity: 1; transform: none; }

/* staggered entrance */
.gate__card > * {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.gate--ready .gate__card > *            { opacity: 1; transform: none; }
.gate--ready .gate__eyebrow             { transition-delay: 120ms; }
.gate--ready .gate__prompt              { transition-delay: 280ms; }
.gate--ready .gate__label               { transition-delay: 460ms; }
.gate--ready .gate__form                { transition-delay: 600ms; }
.gate--ready .gate__msg                 { transition-delay: 740ms; }

.gate__eyebrow {
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 clamp(1.5rem, 4vw, 2.25rem);
}

.gate__prompt {
  font-family: var(--display);
  font-variation-settings: "SOFT" 70, "WONK" 1, "opsz" 100;
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.75rem, 5.5vw, 3.4rem);
  line-height: 1.14;
  letter-spacing: -0.025em;
  margin: 0 auto clamp(2.25rem, 6vw, 3.25rem);
  max-width: 22ch;
  text-wrap: balance;
}

.gate__label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1.5rem;
}

.gate__form {
  display: grid;
  justify-items: center;
  gap: clamp(2rem, 5vw, 2.75rem);
}

.gate__row {
  display: flex;
  align-items: flex-end;
  gap: clamp(0.4rem, 1.5vw, 0.9rem);
}

.gate__box,
.gate__text {
  font-family: var(--mono);
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 0.2em 0.1em 0.3em;
  border-radius: 0;
  outline: none;
  transition: border-color 0.4s var(--ease), background 0.4s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.gate__box--2 { width: 3.2em; }
.gate__box--4 { width: 5.2em; }
.gate__text {
  width: min(100%, 15em);
  letter-spacing: 0.22em;
  text-align: center;
}

.gate__box::placeholder,
.gate__text::placeholder { color: rgba(23, 20, 15, 0.18); letter-spacing: 0.1em; }

/* the accent underline + tint IS the focus indicator — a box outline
   on top of it just looks like a form error */
.gate__box:focus,
.gate__text:focus,
.gate__box:focus-visible,
.gate__text:focus-visible {
  border-bottom-color: var(--accent);
  border-bottom-width: 2px;
  background: rgba(194, 69, 45, 0.05);
  outline: none;
}

.gate__slash {
  font-family: var(--display);
  font-size: clamp(1.3rem, 4vw, 2rem);
  color: var(--ink-faint);
  padding-bottom: 0.35em;
  user-select: none;
}

.gate__go {
  font-family: var(--mono);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  padding: 1.05em 2.6em;
  cursor: pointer;
  transition: background 0.45s var(--ease), color 0.45s var(--ease),
    border-color 0.45s var(--ease), letter-spacing 0.45s var(--ease);
}
.gate__go:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
  letter-spacing: 0.36em;
}
.gate__go:disabled { opacity: 0.4; cursor: progress; }

.gate__msg {
  font-family: var(--body);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
  min-height: 1.6em;
  margin: clamp(1.75rem, 4vw, 2.25rem) auto 0;
  max-width: 34ch;
  line-height: 1.5;
}
.gate__msg--bad  { color: var(--accent); }
.gate__msg--hint { color: var(--ink-soft); }
.gate__msg--work { color: var(--ink-faint); font-style: normal; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.26em; text-transform: uppercase; }
.gate__msg--good { color: var(--accent); }

.shake { animation: shake 0.52s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

.gate__fatal {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.9;
  text-align: center;
  padding: 5rem 1.5rem;
  color: var(--accent);
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; filter: none; }
  .frame { transform: none !important; }
}

@media print {
  .grain, .vignette, .scrollbar, .cue, .seal, .lb { display: none !important; }
  body { background: #fff; }
}
