:root {
  --bg: #07090f;
  --ink: #efe6cf;
  --gold: #e2b84a;
  --laser: #ff2a4a;
  --muted: #8b93a7;
}
html, body {
  margin: 0; padding: 0;
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  overflow: hidden;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-height: 100dvh;
  background:
    radial-gradient(80vw 50vh at 50% 46%, #1c0c14 0%, transparent 58%),
    #07090f;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  box-sizing: border-box;
}

#mast {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 10px;
  z-index: 4;
}
#brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: lowercase;
  opacity: 0.72;
}
#nav {
  display: flex;
  gap: 18px;
  align-items: center;
}
#nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
#nav a:hover { color: var(--gold); }

#hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 8px 16px 24px;
}

.mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.02em;
  color: #f2e6c4;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
  user-select: none;
}
.letter {
  font-size: clamp(84px, 18vw, 210px);
  text-shadow: 0 10px 28px #00000088;
}
.aperture {
  position: relative;
  width: min(44vw, 48vh, 340px);
  height: min(44vw, 48vh, 340px);
  min-width: 148px;
  min-height: 148px;
  margin: 0 0.08em;
  flex: none;
  z-index: 2;
  overflow: visible;
}
.barrel {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 58%, #1a140c 59%, #c8b48a 64%, #3a3020 70%, #0a0806 74%);
  box-shadow:
    0 18px 40px #000000aa,
    0 0 40px #ff2a4a33;
  pointer-events: none;
}
.glass {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background: #05070c;
  box-shadow:
    inset 0 0 0 1px #f2e6c4cc,
    inset 0 0 0 7px #12080acc,
    inset 0 18px 28px #ffffff14,
    inset 0 -22px 36px #000000aa;
}
.glass iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  filter: contrast(1.08) saturate(1.12) brightness(1.04);
}
.refract {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.16) 0 8%, transparent 28%),
    radial-gradient(circle at 70% 74%, rgba(90,214,255,0.08) 0 12%, transparent 34%);
  box-shadow:
    inset 3px 0 0 rgba(90, 214, 255, 0.18),
    inset -3px 0 0 rgba(255, 42, 74, 0.16);
  mix-blend-mode: screen;
}
.vignette {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 42%, rgba(4, 6, 10, 0.55) 78%, rgba(4, 6, 10, 0.92) 100%);
}
.iris {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 2px #f2e6c4ee,
    inset 0 0 0 5px #1a1008cc,
    inset 0 0 0 8px #8a7a58aa,
    inset 0 0 24px #00000066;
}
.gleam {
  position: absolute;
  left: 14%;
  top: 10%;
  width: 38%;
  height: 22%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.28), transparent);
  pointer-events: none;
  transform: rotate(-18deg);
}
.beam {
  position: absolute;
  left: 50%;
  top: -38%;
  width: 14px;
  height: 176%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 4;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 42, 74, 0) 8%,
    rgba(255, 42, 74, 0.55) 28%,
    rgba(255, 220, 220, 0.95) 50%,
    rgba(255, 42, 74, 0.55) 72%,
    rgba(255, 42, 74, 0) 92%,
    transparent 100%
  );
  filter: blur(0.2px);
  animation: laser-beat 2.7s ease-in-out infinite;
}
.beam::before,
.beam::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 28px;
  height: 28px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 18%, rgba(255, 42, 74, 0.7) 40%, transparent 70%);
  pointer-events: none;
}
.beam::before { top: 46%; }
.beam::after { top: 8%; opacity: 0.55; width: 16px; height: 16px; }
.beam-core {
  position: absolute;
  left: 50%;
  top: 0;
  width: 3px;
  height: 100%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, #fff 20%, #ffe8e8 50%, #fff 80%, transparent);
  box-shadow: 0 0 10px #ff2a4a, 0 0 28px #ff2a4acc, 0 0 60px #ff2a4a88;
}
@keyframes laser-beat {
  0%, 64%, 100% { opacity: 0.55; filter: blur(0.3px) brightness(0.95); }
  72% { opacity: 1; filter: blur(0) brightness(1.35); }
  82% { opacity: 0.72; }
}
#enter {
  position: absolute;
  inset: 0;
  z-index: 6;
  border-radius: 50%;
  cursor: pointer;
}
.tag {
  margin: 32px 0 0;
  color: var(--gold);
  letter-spacing: 0.22em;
  font-size: 13px;
  text-align: center;
}

#colophon {
  flex: none;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 16px 16px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
  z-index: 4;
}
#colophon .sep { color: #3a3348; }

body.entering .letter,
body.entering .tag,
body.entering #mast,
body.entering #colophon,
body.entering .barrel,
body.entering .iris,
body.entering .gleam,
body.entering .beam,
body.entering .refract {
  opacity: 0;
  transition: opacity 0.28s linear;
}
body.entering .aperture {
  position: fixed;
  left: 0; top: 0;
  width: 100vw;
  height: 100vh;
  min-width: 0;
  min-height: 0;
  margin: 0;
  z-index: 30;
}
body.entering .glass {
  inset: 0;
  border-radius: 0;
  box-shadow: none;
  transition: border-radius 0.5s ease, box-shadow 0.4s linear;
}
body.entering .glass iframe {
  width: 100%;
  height: 100%;
  filter: none;
  inset: 0;
}

@media (max-width: 640px) {
  #mast { padding: 12px 12px 4px; }
  #nav { gap: 11px; }
  #nav a { font-size: 11px; padding: 8px 0; }
  .letter { font-size: clamp(52px, 15vw, 96px); }
  .aperture {
    width: min(58vw, 44vh, 240px);
    height: min(58vw, 44vh, 240px);
    min-width: 168px;
    min-height: 168px;
  }
  .tag { font-size: 12px; margin-top: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .beam { animation: none; opacity: 0.8; }
  body.entering .glass { transition: none; }
}
