﻿/* ════════════════════════════════════════════════════════════
   ZeroHour RP: Fantasy - coming-soon (soft, magical, cinematic)
   ════════════════════════════════════════════════════════════ */

@property --bd { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

:root {
  /* modern sans pairing - clean & readable */
  --font-title: 'Space Grotesk', system-ui, sans-serif;  /* headings / display */
  --font-body: 'Inter', system-ui, sans-serif;           /* everything else */
  --font-mono: ui-monospace, 'Cascadia Code', Consolas, monospace; /* code snippets */

  --bg: #07060d;
  --bg-2: #0c0a16;
  --surface: rgba(20, 16, 36, 0.46);
  --hairline: rgba(170, 150, 235, 0.16);
  --hairline-strong: rgba(170, 150, 235, 0.3);

  --text: #f7f4ff;
  --muted: #d2cce4;
  --faint: #9b94b4;

  --accent: #9b6cff;
  --accent-soft: #bfa3ff;
  --accent-deep: #5b34c9;
  --accent-glow: rgba(155, 108, 255, 0.45);

  --fac: #9b6cff;
  --fac-soft: #bfa3ff;
  --fac-glow: rgba(155, 108, 255, 0.42);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --base: 2s;   /* when the page begins to reveal (after the intro) */
}

/* faction accents - canonical gang slugs */
[data-faction="vampires"]      { --fac:#e0123c; --fac-soft:#ff6f8a; --fac-glow:rgba(224,18,60,.4); }
[data-faction="werewolves"]    { --fac:#d98324; --fac-soft:#f0b06a; --fac-glow:rgba(217,131,36,.4); }
[data-faction="witches"]       { --fac:#9b6cff; --fac-soft:#bfa3ff; --fac-glow:rgba(155,108,255,.42); }
[data-faction="mermaids"]      { --fac:#1fb6c4; --fac-soft:#74e4ee; --fac-glow:rgba(31,182,196,.4); }
[data-faction="fairies"]       { --fac:#e94f9a; --fac-soft:#ff95cb; --fac-glow:rgba(233,79,154,.4); }
[data-faction="shapeshifters"] { --fac:#3fae6d; --fac-soft:#7fdfa6; --fac-glow:rgba(63,174,109,.4); }
[data-faction="hunters"]       { --fac:#8a93a6; --fac-soft:#c2c8d6; --fac-glow:rgba(138,147,166,.34); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;       /* vertical scroll allowed - just in case */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.locked { overflow: hidden; }

a { color: inherit; text-decoration: none; }
h1 { font-family: var(--font-title); font-weight: 600; line-height: 1.04; }
::selection { background: var(--accent); color: #fff; }

/* ════════════════════════════════════════════════════════
   CINEMATIC INTRO
   ════════════════════════════════════════════════════════ */
#intro {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 44%, #15102c 0%, #050410 74%);
  color: var(--accent-soft);
  animation: introOut 1.2s var(--ease) forwards 2.6s;
}
.intro-bloom {
  position: absolute; left: 50%; top: 46%; width: 42vmax; height: 42vmax; border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.2);
  background: radial-gradient(circle, var(--accent-soft), transparent 60%);
  filter: blur(26px); opacity: 0; animation: bloom 1.5s ease-out forwards 2.4s;
}
@keyframes bloom {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.2); }
  28% { opacity: 0.75; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.9); }
}
.intro-core { position: relative; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.intro-sigil { width: clamp(170px, 40vw, 280px); aspect-ratio: 1; filter: drop-shadow(0 0 20px var(--accent-glow)); }
.sigil-outer, .sigil-mid, .sigil-inner { transform-origin: 110px 110px; }
.sigil-outer { animation: spin 50s linear infinite; }
.sigil-mid { animation: spin 34s linear infinite reverse; }
.sigil-inner { animation: spin 24s linear infinite; }
.s-draw { stroke-dasharray: 760; stroke-dashoffset: 760; animation: draw 1.7s var(--ease) forwards; }
.s-d2 { animation-delay: 0.25s; }
.s-d3 { animation-delay: 0.5s; }
.s-d4 { animation-delay: 0.75s; }
.s-core { opacity: 0; animation: corePulse 1s ease forwards 1.5s; }
.intro-text {
  font-family: var(--font-title); letter-spacing: 0.42em; text-indent: 0.42em;
  text-transform: uppercase; font-size: clamp(0.78rem, 2vw, 1rem);
  opacity: 0; animation: fadeText 1.2s ease forwards 1.25s;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes corePulse { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes fadeText { from { opacity: 0; letter-spacing: 0.7em; } to { opacity: 0.85; letter-spacing: 0.42em; } }
@keyframes introOut { to { opacity: 0; visibility: hidden; transform: scale(1.05); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════
   SOFT BACKGROUND
   ════════════════════════════════════════════════════════ */
.bg-photo {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: url('../images/bg.jpg') center / cover no-repeat;
  opacity: 0.1; filter: saturate(0.7) brightness(0.85);
  transition: opacity 0.6s ease; will-change: opacity;
}

#fx-canvas { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; animation: fxIn 3.4s ease forwards 0.6s; }
#fx-motes { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; animation: fxIn 3.4s ease forwards 1s; }
@keyframes fxIn { to { opacity: 1; } }

.orb { position: fixed; z-index: 0; border-radius: 50%; pointer-events: none; filter: blur(70px); opacity: 0; will-change: transform; }
.orb-1 {
  width: 62vmax; height: 62vmax; top: -22vmax; left: -16vmax;
  background: radial-gradient(circle, var(--fac-glow), transparent 70%);
  transition: background 1.2s var(--ease);
  animation: orb1 24s ease-in-out infinite alternate, orbFade1 3.4s ease forwards 0.8s;
}
.orb-2 {
  width: 52vmax; height: 52vmax; bottom: -22vmax; right: -14vmax;
  background: radial-gradient(circle, rgba(91, 52, 201, 0.42), transparent 70%);
  animation: orb2 30s ease-in-out infinite alternate, orbFade2 3.4s ease forwards 1s;
}
@keyframes orb1 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); } }
@keyframes orb2 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-5vmax, -3vmax, 0) scale(1.1); } }
@keyframes orbFade1 { to { opacity: 0.5; } }
@keyframes orbFade2 { to { opacity: 0.45; } }

.bg-vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(46% 52% at 50% 46%, rgba(4,3,10,0.55), transparent 72%),
    radial-gradient(130% 100% at 50% 42%, transparent 44%, var(--bg) 94%);
}

/* ════════════════════════════════════════════════════════
   LAYOUT (one screen, scroll as a safety net)
   ════════════════════════════════════════════════════════ */
.soon {
  position: relative; z-index: 2;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  padding: clamp(36px, 6vh, 64px) clamp(18px, 5vw, 48px) clamp(20px, 3vh, 32px);
}
.soon-inner { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; max-width: 720px; width: 100%; margin: 0 auto; }

/* generic staged rise-in */
.rise { opacity: 0; animation: riseIn 1.05s var(--ease) forwards; animation-delay: calc(var(--d) * 0.16s + var(--base)); }
@keyframes riseIn { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px; border: 1px solid var(--hairline-strong); border-radius: 999px;
  font-size: clamp(0.64rem, 1.4vw, 0.75rem); letter-spacing: 0.24em; text-transform: uppercase; color: var(--text);
  background: rgba(10, 8, 20, 0.5); backdrop-filter: blur(8px); margin-bottom: clamp(14px, 2.6vh, 26px);
}
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-soft); box-shadow: 0 0 0 0 var(--accent-glow); animation: ping 2.6s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 var(--accent-glow); } 100% { box-shadow: 0 0 0 9px transparent; } }

/* logo - slow materialise + glow bloom + float */
.logo-wrap { position: relative; display: grid; place-items: center; margin-bottom: clamp(12px, 2.4vh, 26px); }
.logo-halo {
  position: absolute; width: 128%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 66%);
  filter: blur(22px); opacity: 0; transition: background 1.2s var(--ease);
  animation: haloIn 1.2s ease forwards 2.9s, halo 5.5s ease-in-out infinite 4.1s;
}
.soon-logo { position: relative; width: clamp(118px, 18vh, 200px); opacity: 0; animation: logoIn 1.7s var(--ease) forwards 2.1s, floaty 7s ease-in-out infinite 3.8s; }
@keyframes logoIn { from { opacity: 0; transform: scale(0.84) translateY(12px); filter: blur(16px) brightness(1.8); } to { opacity: 1; transform: none; filter: blur(0) brightness(1); } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes haloIn { to { opacity: 0.5; } }
@keyframes halo { 0%,100% { opacity: 0.4; transform: scale(1); } 50% { opacity: 0.7; transform: scale(1.06); } }

/* title - line-by-line cinematic reveal */
.soon-title { font-size: clamp(1.85rem, 5.4vw, 3.4rem); margin-bottom: clamp(10px, 1.8vh, 18px); letter-spacing: 0.01em; }
.soon-title .line { display: block; overflow: hidden; padding: 0.04em 0; }
.soon-title .line > span { display: block; transform: translateY(115%); opacity: 0; text-shadow: 0 2px 30px rgba(0,0,0,0.7); animation: lineUp 1.15s var(--ease) forwards; animation-delay: calc(var(--ld) * 0.26s + 2.5s); }
.soon-title .accent { color: var(--accent-soft); }
@keyframes lineUp { to { transform: none; opacity: 1; } }

.soon-sub { max-width: 520px; color: var(--muted); font-size: clamp(0.96rem, 2vw, 1.1rem); margin-bottom: clamp(18px, 3vh, 36px); text-shadow: 0 1px 14px rgba(0, 0, 0, 0.6); }

/* ─── countdown (soft glass, popping in) ──────────────── */
.countdown { display: flex; flex-wrap: wrap; align-items: stretch; justify-content: center; gap: clamp(8px, 1.8vw, 14px); margin-bottom: clamp(8px, 1.4vh, 14px); }
.cd-unit {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: clamp(62px, 15vw, 88px);
  padding: clamp(12px, 2vh, 18px) clamp(8px, 2vw, 14px) clamp(9px, 1.4vh, 12px);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(28, 22, 50, 0.5), rgba(12, 10, 24, 0.42));
  border: 1px solid var(--hairline); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}
.rise-pop { opacity: 0; animation: popIn 0.95s var(--ease) forwards; }
.countdown .cd-unit:nth-child(1) { animation-delay: 3.0s; }
.countdown .cd-unit:nth-child(2) { animation-delay: 3.16s; }
.countdown .cd-unit:nth-child(3) { animation-delay: 3.32s; }
.countdown .cd-unit:nth-child(4) { animation-delay: 3.48s; }
@keyframes popIn { from { opacity: 0; transform: translateY(16px) scale(0.78) rotate(-4deg); filter: blur(4px); } to { opacity: 1; transform: none; filter: blur(0); } }
.cd-val { font-family: var(--font-title); font-weight: 600; font-size: clamp(1.7rem, 6.2vw, 2.9rem); line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; text-shadow: 0 0 18px var(--accent-glow); }
.cd-val.pulse { animation: secPulse 0.6s var(--ease); }
@keyframes secPulse {
  0% { transform: scale(1); text-shadow: 0 0 18px var(--accent-glow); }
  35% { transform: scale(1.16); text-shadow: 0 0 26px var(--accent-soft); color: var(--accent-soft); }
  100% { transform: scale(1); text-shadow: 0 0 18px var(--accent-glow); }
}
.cd-label { font-size: clamp(0.58rem, 1.3vw, 0.66rem); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

.cd-when { font-family: var(--font-title); letter-spacing: 0.1em; color: var(--accent-soft); font-size: clamp(0.84rem, 1.8vw, 0.96rem); margin-bottom: clamp(20px, 3.4vh, 40px); }
.cd-live { color: #84e9ab !important; }

/* ─── magical buttons ─────────────────────────────────── */
.soon-actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-bottom: clamp(26px, 4.6vh, 56px); }
.btn {
  position: relative; isolation: isolate; cursor: pointer;
  border-radius: 999px; border: 1px solid transparent;
  padding: 14px 28px; font-family: var(--font-body); font-weight: 600;
  font-size: clamp(0.92rem, 1.8vw, 1rem); color: #fff;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, border-color 0.25s;
}
.btn-label { position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: center; gap: 11px; }
.btn svg { width: 20px; height: 20px; }

.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-deep)); overflow: hidden; box-shadow: 0 8px 30px var(--accent-glow); }
.btn-primary::after { content: ''; position: absolute; top: -20%; left: -65%; width: 45%; height: 140%; z-index: 1; transform: skewX(-22deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); }
.btn-primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 14px 46px var(--accent-glow), 0 0 26px var(--accent-glow); }
@keyframes sheen { 0% { left: -65%; } 38%, 100% { left: 150%; } }
@keyframes glowBreath { 0%,100% { box-shadow: 0 8px 30px var(--accent-glow); } 50% { box-shadow: 0 10px 46px var(--accent-glow), 0 0 22px var(--accent-glow); } }

.btn-ghost { background: rgba(14, 11, 26, 0.55); color: var(--text); border-color: var(--hairline-strong); backdrop-filter: blur(8px); }
.btn-ghost::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.4px; z-index: 1; pointer-events: none;
  background: conic-gradient(from var(--bd), transparent 0 52%, var(--accent-soft) 70%, #ffffff 80%, var(--accent-soft) 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.btn-ghost:hover { transform: translateY(-3px) scale(1.02); border-color: var(--accent); box-shadow: 0 0 28px var(--accent-glow); }
@keyframes bdSpin { to { --bd: 360deg; } }
/* start the looping button magic only after they've risen in */
.btn-primary.lit { opacity: 1; animation: glowBreath 3.8s ease-in-out infinite; }
.btn-primary.lit::after { animation: sheen 5s ease-in-out infinite; }
.btn-ghost.lit::before { animation: bdSpin 5s linear infinite; }

/* ─── class teaser ────────────────────────────────────── */
.teaser { width: 100%; }
.teaser-head { font-family: var(--font-title); font-size: clamp(0.9rem, 1.9vw, 1.04rem); letter-spacing: 0.04em; color: var(--muted); margin-bottom: clamp(12px, 2vh, 20px); }
.teaser-head span { color: var(--accent-soft); }
.teaser-grid {
  display: flex; flex-wrap: nowrap; justify-content: center; gap: clamp(6px, 1vw, 10px);
  max-width: 100%; margin: 0 auto;
}
.teaser-chip {
  display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: default; flex: 0 0 auto;
  width: clamp(66px, 12vw, 94px); padding: clamp(11px, 1.8vh, 15px) 6px clamp(9px, 1.4vh, 12px);
  border-radius: 14px; background: rgba(14, 11, 26, 0.5); border: 1px solid var(--hairline);
  backdrop-filter: blur(8px); opacity: 0;
  animation: riseIn 0.9s var(--ease) forwards; animation-delay: calc(var(--i) * 0.07s + 4.1s);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.teaser-chip:hover { transform: translateY(-6px); border-color: var(--fc); box-shadow: 0 14px 34px rgba(0,0,0,.45), 0 0 22px var(--fc-glow); }
.teaser-chip:hover .teaser-emblem { color: var(--fc); filter: drop-shadow(0 0 10px var(--fc-glow)); }
.teaser-emblem { width: clamp(26px, 6vw, 36px); height: clamp(26px, 6vw, 36px); color: var(--muted); transition: color 0.3s, filter 0.3s; }
.teaser-emblem svg { width: 100%; height: 100%; }
.teaser-name { font-size: clamp(0.62rem, 1.4vw, 0.78rem); letter-spacing: 0.02em; color: var(--text); white-space: nowrap; }

/* ════════════════════════════════════════════════════════
   MOBILE
   ════════════════════════════════════════════════════════ */
@media (max-width: 560px) {
  .soon { padding: clamp(28px, 5vh, 48px) 16px clamp(20px, 3vh, 28px); }
  .eyebrow { margin-bottom: 16px; padding: 6px 14px; letter-spacing: 0.18em; }
  .logo-wrap { margin-bottom: 14px; }
  .soon-logo { width: min(40vw, 150px); }
  .soon-title { font-size: clamp(1.6rem, 8.5vw, 2.3rem); margin-bottom: 12px; }
  .soon-sub { font-size: 0.95rem; margin-bottom: 22px; line-height: 1.5; }

  .countdown { gap: 7px; width: 100%; }
  .cd-unit { min-width: 0; flex: 1 1 0; padding: 12px 4px 10px; border-radius: 13px; backdrop-filter: none; background: rgba(20, 16, 38, 0.7); }
  .cd-val { font-size: clamp(1.5rem, 9vw, 2.2rem); }
  .cd-label { font-size: 0.56rem; letter-spacing: 0.12em; }
  .cd-when { margin-bottom: 26px; }

  .soon-actions { flex-direction: column; width: 100%; max-width: 320px; gap: 12px; margin-bottom: 30px; }
  .btn { width: 100%; padding: 15px 22px; font-size: 1rem; }

  .teaser-head { font-size: 0.9rem; }
  .teaser-grid { flex-wrap: wrap; gap: 8px; max-width: 340px; }
  .teaser-chip { width: clamp(62px, 20vw, 76px); backdrop-filter: none; background: rgba(20, 16, 38, 0.66); }
  .teaser-emblem { width: 28px; height: 28px; }
  .teaser-name { font-size: 0.66rem; }
}

@media (max-width: 380px) {
  .soon-logo { width: min(44vw, 132px); }
  .soon-title { font-size: 1.5rem; }
  .cd-val { font-size: 1.4rem; }
}

@media (max-height: 560px) and (orientation: landscape) {
  .soon { min-height: auto; padding-top: 70px; }
  .soon-logo { width: clamp(96px, 16vh, 132px); }
  .soon-title { font-size: clamp(1.4rem, 4.5vw, 2rem); }
  .soon-sub { display: none; }
}

/* ─── reduced motion - skip the show, show everything ──── */
@media (prefers-reduced-motion: reduce) {
  #intro { display: none; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.1ms !important; }
  .rise, .rise-pop, .teaser-chip, .soon-logo, .soon-title .line > span, #fx-canvas, .orb { opacity: 1 !important; transform: none !important; filter: none !important; }
  #fx-canvas, #fx-motes { display: none; }
}
