/* Another Day, Another Portal - anotherdayanotherportal.com
   Dark, loud, and a little bit haunted.
   Survivors = portal green. The killer = red. */

:root {
  --bg: #0b0c10;
  --bg-raised: #14161c;
  --line: #262a33;
  --text: #f2f3f5;
  --muted: #9aa1ad;
  --green: #3ddc97;
  --red: #ff4655;
  --font-display: 'Anton', Impact, sans-serif;
  --font-body: 'Rubik', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.1; }

main, .nav, footer { max-width: 980px; margin: 0 auto; padding: 0 20px; }

.whisper { color: var(--muted); font-style: italic; font-size: 14px; }
.aside { color: var(--muted); font-style: italic; font-size: 14px; margin-top: 18px; }

/* ============ nav ============ */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 16px;
  padding-bottom: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 12, 16, 0.85);
  backdrop-filter: blur(8px);
}

.logo {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 3px;
  color: var(--green);
  text-decoration: none;
}

.nav nav { display: flex; flex-wrap: wrap; }
.nav nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 20px;
  font-size: 14px;
  font-weight: 500;
}
.nav nav a:hover { color: var(--green); }

/* ============ buttons ============ */
.button {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  background: var(--green);
  color: #08130e;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 8px;
  border: 2px solid var(--green);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.button:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 0 24px rgba(61, 220, 151, 0.45);
}
.button.big { padding: 14px 28px; font-size: 17px; }
.button.small { padding: 7px 16px; font-size: 14px; }
.button.ghost { background: none; color: var(--text); border-color: var(--line); }
.button.ghost:hover { border-color: var(--green); color: var(--green); box-shadow: 0 0 18px rgba(61, 220, 151, 0.25); }

/* ============ hero ============ */
.hero {
  text-align: center;
  padding: 60px 0 70px;
  position: relative;
}

/* the gate */
.gate {
  width: 200px;
  height: 270px;
  margin: 0 auto 40px;
  position: relative;
  cursor: pointer;
  perspective: 900px;
  border-radius: 100px 100px 6px 6px;
  transition: transform 0.2s ease;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.6));
}
.gate:hover { transform: scale(1.04); }
.gate:active { transform: scale(0.98); }

/* what's behind the doors */
.gate-void {
  position: absolute;
  inset: 0;
  border-radius: 100px 100px 6px 6px;
  background: radial-gradient(circle at 50% 42%, #241a3d 0%, #120d20 55%, #05040a 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 40px rgba(140, 120, 200, 0.25);
}

/* the eye behind the doors */
.truth-eye {
  width: 120px;
  height: 120px;
  border-radius: 78% 22%;
  transform: rotate(45deg) scale(0);
  background: #efeef5;
  box-shadow: 0 0 45px rgba(239, 238, 245, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) 0.4s;
}
.gate.open .truth-eye { transform: rotate(45deg) scale(1); }

.truth-eye .iris {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle, #3a2f57 30%, #191227 100%);
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.truth-eye .pupil {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #05040a;
  transition: transform 0.08s linear;
}

/* the doors */
.gate-door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: linear-gradient(150deg, #2b2f38 0%, #1a1d24 55%, #12141a 100%);
  border: 1px solid #383d48;
  transition: transform 0.8s cubic-bezier(0.6, 0, 0.3, 1);
  backface-visibility: hidden;
}
.gate-door.left {
  left: 0;
  border-radius: 100px 0 0 6px;
  transform-origin: left center;
  border-right: 1px solid #0b0c10;
}
.gate-door.right {
  right: 0;
  border-radius: 0 100px 6px 0;
  transform-origin: right center;
  border-left: none;
}
.gate.open .gate-door.left { transform: rotateY(-108deg); }
.gate.open .gate-door.right { transform: rotateY(108deg); }

/* door engravings */
.engrave {
  position: absolute;
  inset: 12px 8px 10px;
  border: 1px solid rgba(220, 225, 235, 0.14);
  pointer-events: none;
}
.gate-door.left .engrave { border-radius: 88px 0 0 4px; border-right: none; }
.gate-door.right .engrave { border-radius: 0 88px 4px 0; border-left: none; }
.engrave::before {
  content: '';
  position: absolute;
  top: 34%;
  width: 78px;
  height: 78px;
  border: 1px solid rgba(220, 225, 235, 0.14);
  border-radius: 50%;
}
.gate-door.left .engrave::before { right: -39px; }
.gate-door.right .engrave::before { left: -39px; }
.engrave::after {
  content: '';
  position: absolute;
  left: 12%;
  right: 12%;
  top: 72%;
  border-top: 1px solid rgba(220, 225, 235, 0.1);
}

/* ============ watcher eyes (the deeper you go, the more of them there are) ============ */
.watcher {
  position: absolute; /* anchored to the page, scrolls with it */
  width: 44px;
  height: 24px;
  z-index: 40;
  pointer-events: none;
  animation: watcherTwitch 5.5s ease-in-out infinite;
}
.w-sclera {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  /* bloodshot: pale center fading into raw pink at the rim */
  background: radial-gradient(circle at 50% 45%, #f4f0f1 45%, #e8d4d7 72%, #c99aa2 100%);
  box-shadow:
    0 0 16px rgba(210, 80, 90, 0.35),
    inset 0 0 7px rgba(160, 40, 50, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: watcherIn 0.25s cubic-bezier(0.2, 1.4, 0.4, 1), watcherBlink 4.2s ease-in-out 1.6s infinite;
}
.watcher.bye .w-sclera { animation: watcherOut 0.25s ease forwards; }
.w-pupil {
  /* vertical slit, not a dot */
  width: 22%;
  height: 58%;
  border-radius: 50%;
  background: #180508;
  box-shadow: 0 0 6px rgba(255, 60, 60, 0.55);
  transition: transform 0.09s linear;
}

/* the ones that show up near the bottom of the page */
.watcher.deep .w-sclera {
  background: radial-gradient(circle at 50% 45%, #f1e6e6 40%, #dbb3b8 70%, #b16b76 100%);
  box-shadow:
    0 0 26px rgba(255, 60, 70, 0.5),
    inset 0 0 10px rgba(150, 25, 35, 0.6);
  animation: watcherIn 0.25s cubic-bezier(0.2, 1.4, 0.4, 1); /* deep ones don't blink. */
}
.watcher.deep .w-pupil { box-shadow: 0 0 10px rgba(255, 50, 60, 0.8); }

@keyframes watcherIn { from { transform: scaleY(0); } }
@keyframes watcherOut { to { transform: scaleY(0); opacity: 0; } }
@keyframes watcherBlink {
  0%, 91%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.06); }
}
@keyframes watcherTwitch {
  0%, 88%, 100% { margin-top: 0; }
  92% { margin-top: -3px; }
  96% { margin-top: 2px; }
}

/* ============ side whispers (the walls talk too) ============ */
.side-whisper {
  position: absolute; /* anchored to the page, scrolls with it */
  z-index: 39;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.22);
  font-style: italic;
  letter-spacing: 2px;
  white-space: nowrap;
  animation: whisperDrift 6s ease-out forwards;
}
.side-whisper.deep {
  color: rgba(255, 255, 255, 0.34);
  letter-spacing: 4px;
}
@keyframes whisperDrift {
  0% { opacity: 0; transform: translateY(14px); }
  12% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-22px); }
}

/* title */
.title {
  font-family: var(--font-display);
  font-size: clamp(44px, 9vw, 88px);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 18px;
}
.title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(24px);
  animation: rise 0.5s ease forwards;
}
.title span:nth-child(1) { animation-delay: 0.05s; }
.title span:nth-child(2) { animation-delay: 0.15s; }
.title span:nth-child(3) { animation-delay: 0.25s; }
.title span:nth-child(4) { animation-delay: 0.35s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.title .accent {
  color: var(--green);
  text-shadow: 0 0 30px rgba(61, 220, 151, 0.5);
}

.lead { color: var(--muted); font-size: 18px; margin-bottom: 10px; }
.hero .whisper { margin-bottom: 30px; }

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ============ ticker ============ */
.ticker {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 12px 0;
  background: var(--bg-raised);
  margin: 0 -20px;
}
.ticker-track {
  display: flex;
  gap: 28px;
  white-space: nowrap;
  width: max-content;
  animation: scroll 22s linear infinite;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 15px;
  color: var(--muted);
}
.ticker-track b { color: var(--green); }
@keyframes scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .ticker-track, .title span, .w-sclera { animation: none !important; }
  .title span { opacity: 1; transform: none; }
  .gate-door, .truth-eye { transition-duration: 0.01s; }
}

/* ============ sections ============ */
section { padding: 60px 0; }

section h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 42px);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 24px;
}

section > p { color: var(--muted); max-width: 600px; margin-bottom: 16px; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ============ about ============ */
.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 36px;
  align-items: start;
}
.split p { color: var(--muted); margin-bottom: 14px; }
.split strong { color: var(--text); }

.screenshot-slot {
  aspect-ratio: 16 / 9;
  border: 2px dashed var(--line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-style: italic;
  font-size: 14px;
  background: var(--bg-raised);
}
.split img { width: 100%; border-radius: 14px; border: 1px solid var(--line); }

/* subtle mouse tilt (JS adds transform) */
.tilt { transition: transform 0.15s ease; will-change: transform; }

/* ============ roles toggle ============ */
.role-toggle { display: flex; gap: 10px; margin-bottom: 22px; }

.role-tab {
  font-family: var(--font-display);
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 26px;
  background: var(--bg-raised);
  color: var(--muted);
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.role-tab:hover { transform: translateY(-2px); }
.role-tab.active { background: var(--green); border-color: var(--green); color: #08130e; box-shadow: 0 0 22px rgba(61, 220, 151, 0.4); }
.role-tab.killer.active { background: var(--red); border-color: var(--red); color: #1a0507; box-shadow: 0 0 22px rgba(255, 70, 85, 0.4); }

.role-panel {
  display: none;
  border: 2px solid var(--green);
  border-radius: 14px;
  padding: 28px 26px;
  background: linear-gradient(160deg, rgba(61, 220, 151, 0.07), transparent 55%), var(--bg-raised);
}
.role-panel.active { display: block; animation: panelIn 0.3s ease; }
.role-panel.killer {
  border-color: var(--red);
  background: linear-gradient(160deg, rgba(255, 70, 85, 0.08), transparent 55%), var(--bg-raised);
}
@keyframes panelIn { from { opacity: 0; transform: translateY(10px); } }

.role-panel h3 { font-family: var(--font-display); font-size: 24px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 14px; }
.role-panel p { color: var(--muted); margin-bottom: 12px; max-width: 640px; }
.role-panel .count { color: var(--green); }
.role-panel.killer .count { color: var(--red); }

.tag-row { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag-row li {
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}
.tag-row li:hover { border-color: var(--green); color: var(--green); transform: translateY(-2px); }

/* ============ characters ============ */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.char-card {
  background: var(--bg-raised);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.char-card:hover {
  transform: translateY(-5px) rotate(-0.5deg);
  border-color: var(--green);
  box-shadow: 0 10px 30px rgba(61, 220, 151, 0.15);
}
.char-card.killer:hover {
  border-color: var(--red);
  box-shadow: 0 10px 30px rgba(255, 70, 85, 0.18);
  transform: translateY(-5px) rotate(0.5deg);
}

.char-art {
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--line);
  margin-bottom: 12px;
  overflow: hidden;
}
.char-art img { width: 100%; height: 100%; object-fit: cover; }

.char-type {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--green);
}
.char-card.killer .char-type { color: var(--red); }

.char-card h3 { font-family: var(--font-display); font-size: 22px; letter-spacing: 1px; margin: 4px 0 8px; }
.char-card p { color: var(--muted); font-size: 14px; }

/* ============ items ============ */
.item-row { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.item-row li {
  background: var(--bg-raised);
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 500;
  font-size: 15px;
  cursor: default;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.item-row li:hover { transform: translateY(-4px) scale(1.05); border-color: var(--green); }

.item-row .crazy { border-color: #b8860b; }
.item-row .crazy:hover {
  animation: wiggle 0.35s ease infinite;
  border-color: #ffd700;
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.35);
}
@keyframes wiggle {
  0%, 100% { transform: rotate(-3deg) scale(1.06); }
  50% { transform: rotate(3deg) scale(1.06); }
}

/* ============ community ============ */
.social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

.social-card {
  position: relative;
  display: block;
  background: var(--bg-raised);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 20px 18px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}
.social-card h3 { font-family: var(--font-display); letter-spacing: 1px; font-size: 20px; margin-bottom: 4px; }
.social-card p { color: var(--muted); font-size: 13px; }

.social-card .arrow {
  position: absolute;
  right: 16px;
  top: 16px;
  font-size: 20px;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.15s ease;
}
.social-card:hover .arrow { opacity: 1; transform: none; }
.social-card:hover { transform: translateY(-4px); }

.social-card.discord:hover { border-color: #5865f2; box-shadow: 0 8px 26px rgba(88, 101, 242, 0.25); }
.social-card.roblox:hover  { border-color: #ff4655; box-shadow: 0 8px 26px rgba(255, 70, 85, 0.2); }
.social-card.tiktok:hover  { border-color: #00f2ea; box-shadow: 0 8px 26px rgba(0, 242, 234, 0.2); }
.social-card.twitter:hover { border-color: #9aa1ad; box-shadow: 0 8px 26px rgba(154, 161, 173, 0.2); }

/* ============ team ============ */
.team-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 200px));
  gap: 20px;
}
.team-list li { text-align: center; }
.team-list h3 { font-size: 16px; margin-top: 10px; font-weight: 700; }
.team-list p { color: var(--muted); font-size: 13px; }

.face {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-raised);
  border: 2px solid var(--line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 30px;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.team-list li:hover .face { transform: translateY(-4px); border-color: var(--green); }
.face img { width: 100%; height: 100%; object-fit: cover; }

/* ============ footer ============ */
footer {
  border-top: 1px solid var(--line);
  padding-top: 26px;
  padding-bottom: 46px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
footer a { color: var(--muted); }
footer a:hover { color: var(--green); }
.footer-whisper { width: 100%; font-style: italic; font-size: 12px; color: #565c66; }

/* ============ click flash ============ */
.flash {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 200;
}
.flash.go { animation: flash 0.45s ease; }
@keyframes flash {
  0% { opacity: 0; }
  15% { opacity: 0.9; }
  100% { opacity: 0; }
}

/* ============ portal summon ============ */
.summon {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 150;
  pointer-events: none;
}
.summon.show { display: flex; }

.summon-card {
  pointer-events: auto;
  cursor: pointer;
  text-align: center;
  background: var(--bg-raised);
  border: 2px solid #ffffff;
  border-radius: 16px;
  padding: 30px 40px;
  max-width: 340px;
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.25), 0 20px 50px rgba(0, 0, 0, 0.6);
  animation: summonPop 0.5s cubic-bezier(0.2, 1.5, 0.4, 1);
}
@keyframes summonPop {
  0% { transform: scale(0.1) rotate(-16deg); opacity: 0; }
  60% { transform: scale(1.08) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); }
}
.summon.leaving .summon-card {
  animation: summonLeave 0.3s ease forwards;
}
@keyframes summonLeave {
  to { transform: scale(0.1) rotate(14deg); opacity: 0; }
}

.summon-card h3 {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 6px 0 10px;
}
.summon-card p { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.summon-hint { font-size: 11px; color: #565c66; font-style: italic; }

/* faction flavors */
.summon-card.survivor { border-color: var(--green); box-shadow: 0 0 60px rgba(61, 220, 151, 0.35), 0 20px 50px rgba(0, 0, 0, 0.6); }
.summon-card.survivor .char-type { color: var(--green); }
.summon-card.killer { border-color: var(--red); box-shadow: 0 0 60px rgba(255, 70, 85, 0.4), 0 20px 50px rgba(0, 0, 0, 0.6); }
.summon-card.killer .char-type { color: var(--red); }
.summon-card.crazy { border-color: #ffd700; box-shadow: 0 0 70px rgba(255, 215, 0, 0.45), 0 20px 50px rgba(0, 0, 0, 0.6); }
.summon-card.crazy .char-type { color: #ffd700; }
.summon-card.crazy h3 { animation: wiggle 0.35s ease infinite; }

/* ============ small screens ============ */
@media (max-width: 720px) {
  .nav nav { display: none; }
  .split { grid-template-columns: 1fr; }
  .team-list { grid-template-columns: repeat(3, 1fr); }
  .role-tab { flex: 1; padding: 12px 10px; }
}
