/* Azeroth Codex — fan tribute static site */
:root {
  --bg: #0a0908;
  --bg-elevated: #141210;
  --ink: #f2e8d5;
  --ink-muted: #a89878;
  --gold: #d4a84b;
  --gold-dim: #8a6a2e;
  --alliance: #4a7ab0;
  --alliance-deep: #1e3a5f;
  --horde: #b33a2e;
  --horde-deep: #5c1812;
  --line: rgba(212, 168, 75, 0.22);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Source Serif 4", "Georgia", serif;
  --max: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* Atmosphere */
.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(74, 122, 176, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 85% 60%, rgba(179, 58, 46, 0.08), transparent 50%),
    linear-gradient(180deg, #0a0908 0%, #100e0c 40%, #0a0908 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.wrap {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 1rem 0;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease), border-color 0.4s;
  border-bottom: 1px solid transparent;
}

.nav.is-solid {
  background: rgba(10, 9, 8, 0.88);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.nav__brand {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}

.nav__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.nav__links a {
  transition: color 0.25s;
}

.nav__links a:hover {
  color: var(--gold);
}

.nav__toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--gold);
}

.nav__toggle span {
  display: block;
  width: 1.1rem;
  height: 1px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 -5px 0 currentColor;
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  animation: heroDrift 28s ease-in-out infinite alternate;
}

@keyframes heroDrift {
  from { transform: scale(1.05) translate3d(0, 0, 0); }
  to { transform: scale(1.12) translate3d(-1.5%, -1%, 0); }
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 9, 8, 0.35) 0%, rgba(10, 9, 8, 0.15) 35%, rgba(10, 9, 8, 0.92) 88%, var(--bg) 100%),
    linear-gradient(90deg, rgba(10, 9, 8, 0.55) 0%, transparent 45%);
}

.hero__content {
  position: relative;
  padding: 0 0 5.5rem;
  max-width: 38rem;
}

.hero__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.2rem, 9vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.65);
  opacity: 0;
  animation: riseIn 1s var(--ease) 0.15s forwards;
}

.hero__brand span {
  display: block;
  font-size: 0.28em;
  letter-spacing: 0.45em;
  color: var(--gold);
  margin-bottom: 0.85rem;
  font-weight: 500;
}

.hero__lead {
  margin-top: 1.25rem;
  color: var(--ink-muted);
  font-size: 1.1rem;
  max-width: 28rem;
  opacity: 0;
  animation: riseIn 1s var(--ease) 0.4s forwards;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
  opacity: 0;
  animation: riseIn 1s var(--ease) 0.65s forwards;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--gold-dim);
  transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--gold {
  background: linear-gradient(180deg, #e0b85a, #b8892f);
  color: #1a1408;
  border-color: transparent;
}

.btn--gold:hover {
  background: linear-gradient(180deg, #f0c86a, #c9993a);
}

.btn--ghost {
  color: var(--ink);
  background: rgba(10, 9, 8, 0.35);
}

.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--ink-muted);
  opacity: 0;
  animation: riseIn 1s var(--ease) 1.1s forwards, hintBob 2.4s ease-in-out 2s infinite;
}

@keyframes hintBob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

/* Sections */
section {
  padding: 5.5rem 0;
}

.section-head {
  margin-bottom: 2.75rem;
  max-width: 36rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.section-head p {
  margin-top: 0.75rem;
  color: var(--ink-muted);
}

.section-head .eyebrow {
  display: block;
  margin-bottom: 0.65rem;
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Factions */
.factions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.faction {
  position: relative;
  min-height: 28rem;
  overflow: hidden;
  isolation: isolate;
}

.faction img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.faction:hover img {
  transform: scale(1.06);
}

.faction__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.faction--alliance .faction__veil {
  background: linear-gradient(180deg, rgba(30, 58, 95, 0.15) 0%, rgba(10, 9, 8, 0.88) 78%);
}

.faction--horde .faction__veil {
  background: linear-gradient(180deg, rgba(92, 24, 18, 0.2) 0%, rgba(10, 9, 8, 0.9) 78%);
}

.faction__body {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 1.75rem;
}

.faction__body h3 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.faction--alliance h3 { color: #9ec0e8; }
.faction--horde h3 { color: #e89a8e; }

.faction__body p {
  margin-top: 0.55rem;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

/* Lands mosaic */
.lands {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 11rem;
  gap: 0.85rem;
}

.land {
  position: relative;
  overflow: hidden;
  grid-column: span 4;
}

.land:nth-child(1) { grid-column: span 7; grid-row: span 2; }
.land:nth-child(2) { grid-column: span 5; grid-row: span 2; }
.land:nth-child(3),
.land:nth-child(4),
.land:nth-child(5) { grid-column: span 4; }
.land:nth-child(6) { grid-column: span 8; }
.land:nth-child(7) { grid-column: span 4; }
.land:nth-child(8) { grid-column: span 12; min-height: 14rem; }

.land img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease), filter 0.5s;
  filter: saturate(0.92) contrast(1.05);
}

.land:hover img {
  transform: scale(1.05);
  filter: saturate(1.05) contrast(1.08);
}

.land__label {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.8);
}

.land::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(10, 9, 8, 0.75) 100%);
  pointer-events: none;
}

/* Expansions */
.chronicle {
  display: grid;
  gap: 1.5rem;
}

.exp {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  overflow: hidden;
  min-height: 16rem;
}

.exp:nth-child(even) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
}

.exp:nth-child(even) .exp__media {
  order: 2;
}

.exp__media {
  min-height: 16rem;
  overflow: hidden;
}

.exp__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}

.exp:hover .exp__media img {
  transform: scale(1.04);
}

.exp__body {
  padding: 1.75rem 1.85rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.exp__year {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.exp__body h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.exp__body p {
  margin-top: 0.65rem;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.7rem;
}

.gallery__item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid transparent;
  transition: border-color 0.3s, transform 0.4s var(--ease);
}

.gallery__item:nth-child(5n + 1) {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: auto;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), filter 0.4s;
  filter: brightness(0.92);
}

.gallery__item:hover {
  border-color: var(--gold-dim);
  transform: translateY(-3px);
}

.gallery__item:hover img {
  transform: scale(1.06);
  filter: brightness(1.05);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(5, 4, 3, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
  padding: 1.5rem;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: min(96vw, 1100px);
  max-height: 86vh;
  object-fit: contain;
  box-shadow: var(--shadow);
  transform: scale(0.96);
  transition: transform 0.4s var(--ease);
}

.lightbox.is-open img {
  transform: scale(1);
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  color: var(--ink);
  border: 1px solid var(--line);
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  background: rgba(10, 9, 8, 0.6);
  transition: border-color 0.25s, color 0.25s;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.lightbox__close {
  top: 1.25rem;
  right: 1.25rem;
  font-size: 1.4rem;
  line-height: 1;
}

.lightbox__nav--prev { left: 1rem; }
.lightbox__nav--next { right: 1rem; }
.lightbox__caption {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer strong {
  font-family: var(--font-display);
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer p {
  max-width: 36rem;
  margin-top: 0.5rem;
}

/* Mobile */
@media (max-width: 900px) {
  .factions {
    grid-template-columns: 1fr;
  }

  .lands {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 10rem;
  }

  .land,
  .land:nth-child(n) {
    grid-column: span 1;
    grid-row: span 1;
  }

  .land:nth-child(1),
  .land:nth-child(8) {
    grid-column: span 2;
  }

  .exp,
  .exp:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .exp:nth-child(even) .exp__media {
    order: 0;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .gallery__item:nth-child(5n + 1) {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .nav__toggle {
    display: grid;
  }

  .nav__links {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 1.25rem;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    background: rgba(14, 12, 10, 0.96);
    border: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: 0.3s var(--ease);
  }

  .nav__links.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .lightbox__nav--prev { left: 0.4rem; }
  .lightbox__nav--next { right: 0.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .hero__media img {
    transform: none;
  }
}
