/* ═══════ INDEX PAGE ═══════ */
body {
  font-family: 'Azeret Mono', monospace;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  transition: filter 1.8s ease;
}

body.ripple {
  filter: invert(0.06) brightness(1.2) saturate(0.5);
  transition: filter 0.08s ease;
}

/* ═══════ POEM WALL ═══════ */
.poem-wall {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.poem-wall-inner {
  position: absolute;
  top: 0;
  left: -5vw;
  width: 110vw;
}

.poem-wall-word {
  font-family: 'Caveat', cursive;
  font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 1.1;
  color: var(--fg);
  opacity: 0.03;
  white-space: nowrap;
  display: block;
  letter-spacing: 0.01em;
  padding: 0.15em 0;
  transition: opacity 0.6s ease, text-shadow 0.6s ease;
}

.poem-wall-word:nth-child(even) {
  text-align: right;
  padding-right: 5vw;
}
.poem-wall-word:nth-child(odd) {
  text-align: left;
  padding-left: 3vw;
}

.poem-wall-word:nth-child(5n) { opacity: 0.045; }
.poem-wall-word:nth-child(7n) { opacity: 0.02; }
.poem-wall-word:nth-child(11n) { opacity: 0.05; }

.poem-wall-word.illuminated {
  opacity: 0.12 !important;
  text-shadow: 0 0 40px var(--accent-glow);
  transition: opacity 0.15s ease, text-shadow 0.15s ease;
}


/* ═══════ MAIN CONTENT ═══════ */
.main {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

/* ═══════ SVG TITLE ═══════ */
.title-wrap {
  margin-bottom: 2.5rem;
  pointer-events: auto;
  user-select: none;
}

.title-wrap--wide {
  width: min(94vw, 900px);
  display: block;
}

.title-wrap--stacked {
  width: 94vw;
  max-width: 500px;
  display: none;
}

.title-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.title-text {
  fill: none;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-dasharray: 70 310;
  stroke-dashoffset: 0;
  animation: strokeAnim 24s infinite linear;
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: 72px;
  will-change: stroke-dashoffset;
}

.title-text:nth-child(5n+1) {
  stroke: #f8b703;
  animation-delay: -0s;
}
.title-text:nth-child(5n+2) {
  stroke: #657078;
  animation-delay: -4.8s;
}
.title-text:nth-child(5n+3) {
  stroke: #d0d0d0;
  animation-delay: -9.6s;
}
.title-text:nth-child(5n+4) {
  stroke: #8a8a8a;
  animation-delay: -14.4s;
}
.title-text:nth-child(5n+5) {
  stroke: #f8b703;
  opacity: 0.4;
  animation-delay: -19.2s;
}

@keyframes strokeAnim {
  100% {
    stroke-dashoffset: -380;
  }
}

/* ═══════ NAVIGATION ═══════ */
.nav {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  pointer-events: auto;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-link {
  font-family: 'Azeret Mono', monospace;
  font-weight: 400;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  position: relative;
  transition: color 0.3s ease, text-shadow 0.3s ease, opacity 0.3s ease;
  padding: 0.3rem 0;
}

.nav-link:hover {
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--accent);
  transition: width 0.4s ease;
}
.nav-link:hover::after { width: 100%; }

.nav-link.blinked {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.nav-link.glowing {
  color: var(--blue-gray);
  text-shadow: 0 0 12px rgba(101,112,120,0.3);
  transition: color 2s ease, text-shadow 2s ease;
}

.nav-sep {
  width: 3px;
  height: 3px;
  background: var(--muted);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ═══════ CLICK RIPPLE RINGS ═══════ */
.ripple-ring {
  position: fixed;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  pointer-events: none;
  z-index: 4;
  opacity: 0;
  transform: scale(0);
}

.ripple-ring--1 { animation: rippleOut 2s ease-out forwards; }
.ripple-ring--2 { animation: rippleOut 2s ease-out 0.12s forwards; }
.ripple-ring--3 { animation: rippleOut 2s ease-out 0.25s forwards; }

@keyframes rippleOut {
  0%   { transform: scale(0); opacity: 0.45; }
  30%  { opacity: 0.2; }
  100% { transform: scale(1); opacity: 0; }
}

/* ═══════ CORNER MARKS ═══════ */
.corner {
  position: fixed;
  font-family: 'Azeret Mono', monospace;
  font-size: 0.5rem;
  color: var(--dim);
  letter-spacing: 0.15em;
  z-index: 6;
  opacity: 0.4;
}
.corner--tl { top: 1.2rem; left: 1.5rem; }
.corner--br { bottom: 1.2rem; right: 1.5rem; }

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 600px) {
  .title-wrap--wide { display: none; }
  .title-wrap--stacked { display: block; width: 96vw; }
  .title-wrap { margin-bottom: 2rem; }
  .nav { gap: 1rem; }
  .nav-sep { display: none; }
  .corner { display: none; }
}
