/*
 * Theme: Atmospheric Glow (reasons page)
 */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #1c1817;
  --bg2: #292220;
  --ink: #f5ede7;
  --ink-dim: #a89a91;
  --rose: #e4617e;
  --rose-soft: #f698ad;
  --rose-light: #3a2d31;
  --line: rgba(228, 97, 126, 0.10);
  --surf: #2f2825;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Lato', sans-serif;
  -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
  font-weight: 300;
}

body {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(228,97,126,0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(212,163,115,0.06) 0%, transparent 50%),
    var(--bg);
}

.back-link {
  position: fixed; top: 1.5rem; left: 1.5rem; z-index: 10;
  font-family: 'Playfair Display', serif;
  color: var(--rose);
  text-decoration: none;
  font-size: 1rem;
  background: rgba(47, 40, 37, 0.85);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(228, 97, 126, 0.08);
}
.back-link:hover { background: rgba(58, 49, 45, 0.95); }

#ghost-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.gate {
  position: fixed; inset: 0; z-index: 5;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 2rem;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}
.gate.hidden { opacity: 0; visibility: hidden; }

.gate-eyebrow {
  font-family: 'Lato', sans-serif; font-weight: 600;
  font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.2em; color: var(--rose-soft);
  margin-bottom: 1rem;
}

.gate-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 400;
  line-height: 1.25; color: var(--ink); margin-bottom: 1.5rem;
}
.gate-title i {
  color: var(--rose-soft);
  text-shadow: 0 0 16px rgba(228, 97, 126, 0.2);
}

.gate-subtitle { font-size: 1rem; color: var(--ink-dim); margin-bottom: 2.5rem; }

.gate-btn {
  display: inline-block;
  font-family: 'Lato', sans-serif; font-weight: 600;
  font-size: 0.95rem;
  color: var(--bg);
  background: linear-gradient(135deg, var(--rose-soft), var(--rose));
  border: none;
  padding: 0.75rem 2.5rem;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: transform 0.25s, box-shadow 0.25s;
  box-shadow: 0 4px 20px rgba(228, 97, 126, 0.25);
}
.gate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(228, 97, 126, 0.35);
}

.stage {
  position: fixed; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer;
}

.word-slot {
  position: relative;
  width: 90vw; max-width: 900px;
  height: 140px;
  display: flex; align-items: center; justify-content: center;
}

.reveal-word {
  position: absolute;
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.6rem, 8vw, 6rem);
  font-weight: 400;
  color: var(--ink);
  text-align: center; line-height: 1.15;
  text-wrap: balance; white-space: normal; word-break: break-word;
  opacity: 1; transform: translateY(0) scale(1);
  transition: opacity 0.55s cubic-bezier(.22,.61,.36,1), transform 0.55s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}

.reveal-word .hl {
  color: var(--rose-soft);
  font-style: italic;
  text-shadow: 0 0 16px rgba(228, 97, 126, 0.12);
}
.reveal-word.old { opacity: 0; transform: translateY(-12px) scale(1.015); pointer-events: none; }
.reveal-word.new { opacity: 0; transform: translateY(14px) scale(0.97); }
.reveal-word.hero .hl {
  text-shadow: 0 0 24px rgba(228, 97, 126, 0.25);
}

.hint {
  position: fixed; bottom: 1.2rem; left: 50%;
  transform: translateX(-50%); z-index: 3;
  font-size: 0.75rem; color: var(--ink-dim); opacity: 0.5;
  transition: opacity 0.3s; pointer-events: none;
}

.pause-badge {
  position: fixed; top: 1.5rem; right: 1.5rem; z-index: 4;
  font-size: 0.75rem; color: var(--rose-soft);
  background: var(--surf);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  border: 1px solid rgba(228, 97, 126, 0.1);
  pointer-events: none;
}
.pause-badge.visible { opacity: 1; visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  .reveal-word { transition: opacity 0.3s ease !important; }
  .reveal-word.old { transform: none !important; }
  .reveal-word.new { transform: none !important; }
}
