:root {
  --bg: #08090b;
  --ink: #ece6dc;
  --muted: rgba(236, 230, 220, 0.58);
  --faint: rgba(236, 230, 220, 0.24);
  --accent: #f0a95b;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --gutter: clamp(16px, 3.5vw, 40px);
  --inset: calc(var(--gutter) + clamp(12px, 1.6vw, 20px));
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; }

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

body {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Projector light: a warm pool behind the name, drifting slowly. */
.beam {
  position: fixed;
  inset: -25%;
  pointer-events: none;
  background:
    radial-gradient(32% 30% at 50% 44%, rgba(240, 169, 91, 0.17), transparent 72%),
    radial-gradient(45% 40% at 28% 72%, rgba(110, 130, 255, 0.07), transparent 72%),
    radial-gradient(40% 36% at 76% 24%, rgba(240, 169, 91, 0.05), transparent 72%);
  filter: blur(24px);
  animation: drift 22s ease-in-out infinite alternate;
}

/* Film grain. */
.grain {
  position: fixed;
  inset: -50%;
  pointer-events: none;
  opacity: 0.07;
  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='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite;
}

/* Viewfinder corners. */
.frame {
  position: fixed;
  inset: var(--gutter);
  pointer-events: none;
}
.frame span {
  position: absolute;
  width: clamp(16px, 2vw, 26px);
  height: clamp(16px, 2vw, 26px);
  border: 0 solid var(--faint);
}
.frame .tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.frame .tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.frame .bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.frame .br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.hud {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: var(--inset) var(--inset) 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.hud.bottom { padding: 0 var(--inset) var(--inset); }
.hud a { color: inherit; text-decoration: none; }
.hud a:hover, .hud a:focus-visible { color: var(--ink); }

.rec { display: inline-flex; align-items: center; gap: 0.75em; }
.rec i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(240, 169, 91, 0.8);
  animation: blink 1.8s ease-in-out infinite;
}

.tc { font-variant-numeric: tabular-nums; }

main {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: clamp(10px, 1.6vw, 18px);
  padding: 48px var(--inset);
  text-align: center;
}

.mark {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(88px, 19vw, 248px);
  line-height: 0.88;
  letter-spacing: -0.025em;
  animation: reveal 1.8s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}

.line {
  font-family: var(--serif);
  font-size: clamp(22px, 3.2vw, 34px);
  line-height: 1.2;
  color: var(--muted);
  animation: reveal 1.8s 0.25s cubic-bezier(0.2, 0.7, 0.1, 1) both;
}
.line em { font-style: italic; color: var(--ink); }

.back {
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}
.back:hover, .back:focus-visible { text-decoration: underline; text-underline-offset: 4px; }

@keyframes drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to { transform: translate3d(3%, 2%, 0) scale(1.08); }
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
@keyframes reveal {
  from { opacity: 0; transform: translateY(14px); filter: blur(10px); }
  to { opacity: 1; transform: none; filter: none; }
}

@media (max-width: 480px) {
  .hud { font-size: 10px; letter-spacing: 0.12em; }
}

/* Phones turned sideways: less padding so the page fits without scrolling. */
@media (max-height: 480px) {
  main { padding-top: 16px; padding-bottom: 16px; }
  .mark { font-size: clamp(64px, 22vh, 120px); }
}

@media (prefers-reduced-motion: reduce) {
  .beam, .grain, .rec i, .mark, .line { animation: none; }
}
