@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700;800&family=Inter:wght@400;500;600&display=swap");

:root {
  color-scheme: dark;
  --gold: #d8b875;
  --gold-bright: #f1d79a;
  --ink: #080a0b;
  --muted: #b7b2a7;
  --discord: #5865f2;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ink);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: #f7f2e8;
  background: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
}

.backdrop,
.backdrop__veil,
.backdrop__grain {
  position: fixed;
  inset: 0;
}

.backdrop {
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  filter: blur(8px) saturate(0.72) contrast(1.08);
  transform: scale(1.045);
}

.backdrop__panel {
  min-width: 0;
  background-position: 50% 30%;
  background-size: cover;
  opacity: 0.72;
  animation: breathe 14s ease-in-out infinite alternate;
}

.backdrop__panel--human {
  background-image: url("assets/warbound-art-human-dawnshield-paladin.png");
}

.backdrop__panel--infernal {
  background-image: url("assets/warbound-art-infernal-flame-tyrant.png");
  animation-delay: -3s;
}

.backdrop__panel--stormborn {
  background-image: url("assets/warbound-art-storm-arrow-mythic-v3.png");
  animation-delay: -7s;
}

.backdrop__panel--veiled {
  background-image: url("assets/warbound-art-veiled-puppet-hierophant.png");
  animation-delay: -10s;
}

.backdrop__veil {
  z-index: 1;
  background:
    radial-gradient(circle at 50% 42%, rgba(10, 15, 16, 0.3) 0, rgba(5, 7, 8, 0.76) 58%, #030506 100%),
    linear-gradient(90deg, rgba(2, 3, 3, 0.65), transparent 25%, transparent 75%, rgba(2, 3, 3, 0.65)),
    linear-gradient(180deg, rgba(2, 3, 3, 0.38), transparent 35%, rgba(2, 3, 3, 0.7));
}

.backdrop__grain {
  z-index: 2;
  pointer-events: none;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.hero {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: calc(100vh - 56px);
  min-height: calc(100svh - 56px);
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(28px, 5vh, 64px) 0 32px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.eyebrow {
  display: flex;
  margin: 0 0 clamp(4px, 1vh, 12px);
  align-items: center;
  gap: 14px;
  color: var(--gold);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(0.64rem, 1.2vw, 0.78rem);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow span {
  width: clamp(24px, 5vw, 58px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.eyebrow span:last-child {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.logo-stage {
  position: relative;
  width: clamp(220px, 36vmin, 420px);
  aspect-ratio: 1;
  margin: clamp(8px, 1.5vh, 16px) auto clamp(5px, 1vh, 12px);
  perspective: 900px;
  animation: reveal 900ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.logo-stage::before {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(83, 128, 255, 0.22), rgba(216, 184, 117, 0.08) 48%, transparent 73%);
  content: "";
  filter: blur(18px);
  opacity: 0.55;
  transform: translateZ(-40px) scale(0.9);
  transition: opacity 300ms ease, transform 300ms ease;
}

.logo-tilt {
  position: relative;
  width: 100%;
  height: 100%;
  transform: rotateX(var(--logo-rx, 0deg)) rotateY(var(--logo-ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 160ms cubic-bezier(0.2, 0.75, 0.25, 1);
  will-change: transform;
}

.logo {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: contain;
  filter: drop-shadow(0 15px 26px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 30px rgba(205, 164, 89, 0.12));
  transform: translateZ(26px);
  animation: logo-float 5s ease-in-out infinite;
  transition: filter 250ms ease;
  will-change: transform;
}

.logo-stage:hover::before {
  opacity: 0.9;
  transform: translateZ(-40px) scale(1.08);
}

.logo-stage:hover .logo {
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.88)) drop-shadow(0 0 28px rgba(88, 134, 255, 0.22)) drop-shadow(0 0 14px rgba(228, 184, 94, 0.22));
}

.logo-glint {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  transform: translateZ(38px);
  -webkit-mask: url("assets/warbound-realms-logo-transparent.png") center / contain no-repeat;
  mask: url("assets/warbound-realms-logo-transparent.png") center / contain no-repeat;
}

.logo-glint::before {
  position: absolute;
  inset: -25%;
  background: linear-gradient(108deg, transparent 34%, rgba(255, 241, 188, 0.08) 43%, rgba(255, 255, 255, 0.88) 49%, rgba(129, 178, 255, 0.35) 54%, transparent 64%);
  content: "";
  filter: blur(1px);
  transform: translateX(-125%);
  animation: logo-glint 6.5s ease-in-out 1.8s infinite;
}

.divider {
  display: flex;
  width: min(370px, 75vw);
  align-items: center;
  gap: 11px;
  color: var(--gold);
}

.divider i {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(216, 184, 117, 0.8));
}

.divider i:last-child {
  background: linear-gradient(90deg, rgba(216, 184, 117, 0.8), transparent);
}

.divider b {
  font-size: 0.55rem;
  text-shadow: 0 0 15px var(--gold);
}

.announcement h2 {
  margin: clamp(15px, 2.5vh, 25px) 0 8px;
  color: var(--gold-bright);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(1.7rem, 4.5vw, 3.3rem);
  font-weight: 600;
  letter-spacing: clamp(0.1em, 1vw, 0.22em);
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.9);
}

.announcement p {
  margin: 0;
  color: var(--muted);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(0.76rem, 1.7vw, 1rem);
  letter-spacing: 0.12em;
}

.factions {
  display: flex;
  margin: clamp(16px, 2.7vh, 27px) 0;
  align-items: center;
  gap: clamp(5px, 1vw, 10px);
}

.factions img {
  width: clamp(42px, 5.2vw, 58px);
  height: clamp(42px, 5.2vw, 58px);
  object-fit: contain;
  opacity: 0.84;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.75)) saturate(0.75);
  transition: 180ms ease;
}

.factions img:hover {
  opacity: 1;
  filter: drop-shadow(0 0 10px rgba(216, 184, 117, 0.35)) saturate(1);
  transform: translateY(-2px);
}

.discord-button {
  position: relative;
  display: inline-flex;
  min-width: 238px;
  padding: 14px 18px;
  border: 1px solid rgba(165, 175, 255, 0.52);
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  color: white;
  background: linear-gradient(135deg, #6672f2, #4652cf);
  box-shadow: 0 12px 34px rgba(21, 27, 82, 0.42), inset 0 1px rgba(255, 255, 255, 0.2);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}

.discord-button::before {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.18) 45%, transparent 65%);
  content: "";
  transform: translateX(-120%);
  transition: transform 500ms ease;
}

.discord-button:hover {
  border-color: #b9c0ff;
  box-shadow: 0 15px 42px rgba(38, 47, 138, 0.58), 0 0 22px rgba(88, 101, 242, 0.25);
  transform: translateY(-2px);
}

.discord-button:hover::before {
  transform: translateX(120%);
}

.discord-button:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 4px;
}

.discord-button svg {
  width: 23px;
  height: 19px;
}

.discord-button b {
  margin-left: 4px;
  font-size: 1.05rem;
}

.status {
  min-height: 1.2em;
  margin: 10px 0 -12px;
  color: var(--gold-bright);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

footer {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 56px;
  padding: 0 24px 18px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(220, 214, 201, 0.46);
  font-size: 0.62rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

footer p {
  margin: 0;
}

footer > span {
  color: rgba(216, 184, 117, 0.45);
  font-size: 0.38rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes logo-float {
  0%, 100% { transform: translateZ(26px) translateY(0); }
  50% { transform: translateZ(32px) translateY(-3px); }
}

@keyframes logo-glint {
  0%, 64% { transform: translateX(-125%); opacity: 0; }
  69% { opacity: 0.85; }
  82% { transform: translateX(125%); opacity: 0.8; }
  83%, 100% { transform: translateX(125%); opacity: 0; }
}

@keyframes breathe {
  from { transform: scale(1.02); }
  to { transform: scale(1.08); }
}

@media (max-width: 700px) {
  .backdrop {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    filter: blur(7px) saturate(0.68);
  }

  .backdrop__panel {
    background-position: 50% 24%;
  }

  .hero {
    min-height: calc(100svh - 44px);
    padding-top: 24px;
  }

  footer {
    min-height: 44px;
    padding-bottom: 14px;
  }
}

@media (max-height: 720px) and (min-width: 701px) {
  .hero {
    padding-top: 20px;
  }

  .logo-stage {
    width: clamp(200px, 30vh, 320px);
  }

  .factions {
    margin-block: 12px;
  }

  .announcement h2 {
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
