/*
Theme Name: Four Kingdoms
Theme URI: https://fourkingdoms.dustinlabs.com
Author: Dustin Labs
Description: Premium dark-fantasy MMORPG launch theme for the Four Kingdoms multiplayer game.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
Text Domain: four-kingdoms-theme
*/

:root {
  --fk-bg: #070403;
  --fk-void: #0d0805;
  --fk-stone: #18120d;
  --fk-leather: #24170d;
  --fk-parchment: #d7bd83;
  --fk-parchment-dark: #9c7740;
  --fk-line: #7c5523;
  --fk-line-bright: #e3b24d;
  --fk-ink: #fff3d0;
  --fk-muted: #c9ae79;
  --fk-gold: #f0c35a;
  --fk-red: #c0392f;
  --fk-blue: #2f72d6;
  --fk-green: #3fad62;
  --fk-purple: #8f55d6;
  --fk-shadow: rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 16% 4%, rgba(192, 57, 47, 0.22), transparent 30%),
    radial-gradient(circle at 86% 8%, rgba(47, 114, 214, 0.2), transparent 34%),
    radial-gradient(circle at 52% 34%, rgba(240, 195, 90, 0.12), transparent 34%),
    linear-gradient(180deg, #1a1009 0%, var(--fk-bg) 44%, #050302 100%);
  color: var(--fk-ink);
  font-family: Georgia, "Times New Roman", serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(240, 195, 90, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 195, 90, 0.03) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(255, 231, 163, 0.08), transparent 45%);
  background-size: 74px 74px, 74px 74px, auto;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 80%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 9px);
  opacity: 0.5;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(227, 178, 77, 0.45);
  background:
    linear-gradient(180deg, rgba(49, 31, 15, 0.96), rgba(10, 6, 4, 0.94)),
    var(--fk-void);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(14px);
}

.site-nav,
.section-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffe7a3;
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 900;
  text-shadow: 0 2px 0 #3a1c09, 0 0 18px rgba(240, 195, 90, 0.26);
}

.brand img {
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 0 14px rgba(240, 195, 90, 0.32));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--fk-muted);
  font-size: 0.95rem;
  font-weight: 800;
}

.nav-links a {
  position: relative;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.nav-links a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  transform: scaleX(0);
  background: var(--fk-gold);
  box-shadow: 0 0 14px rgba(240, 195, 90, 0.55);
  transition: transform 180ms ease;
}

.nav-links a:hover {
  color: #ffe7a3;
  transform: translateY(-1px);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-button {
  display: none;
  width: 46px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--fk-line);
  border-radius: 4px;
  background: linear-gradient(180deg, #2b1a0d, #0e0805);
  cursor: pointer;
}

.nav-toggle-button span,
.nav-toggle-button span::before,
.nav-toggle-button span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--fk-gold);
  box-shadow: 0 0 10px rgba(240, 195, 90, 0.45);
}

.nav-toggle-button span {
  position: relative;
}

.nav-toggle-button span::before,
.nav-toggle-button span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-button span::before {
  top: -7px;
}

.nav-toggle-button span::after {
  top: 7px;
}

.nav-cta,
.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid #f7dd90;
  border-radius: 4px;
  background:
    linear-gradient(180deg, #ffe08a, #c8832d 54%, #633010),
    #c8832d;
  color: #211104;
  padding: 0 20px;
  text-decoration: none;
  font-weight: 900;
  text-shadow: 0 1px rgba(255, 244, 210, 0.6);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.55), 0 3px 0 #2d1709, 0 0 22px rgba(240, 195, 90, 0.2);
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.nav-cta:hover,
.hero-cta:hover {
  transform: translateY(-2px);
  filter: brightness(1.08) saturate(1.08);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.55), 0 5px 0 #2d1709, 0 0 32px rgba(240, 195, 90, 0.34);
}

.hero {
  position: relative;
  min-height: calc(100vh - 78px);
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 64px 0 42px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7, 4, 3, 0.25), rgba(7, 4, 3, 0.02) 45%, rgba(7, 4, 3, 0.5)),
    radial-gradient(circle at 68% 18%, rgba(240, 195, 90, 0.13), transparent 26%),
    radial-gradient(circle at 34% 18%, rgba(192, 57, 47, 0.22), transparent 30%);
}

.hero::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -170px;
  width: 900px;
  height: 340px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(216, 109, 47, 0.22), transparent 66%);
  pointer-events: none;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.floating-rune {
  position: absolute;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(240, 195, 90, 0.18);
  transform: rotate(45deg);
  box-shadow: 0 0 50px rgba(240, 195, 90, 0.08), inset 0 0 30px rgba(240, 195, 90, 0.04);
}

.rune-one {
  left: -70px;
  top: 110px;
}

.rune-two {
  right: 6%;
  top: 20%;
  width: 130px;
  height: 130px;
  border-color: rgba(47, 114, 214, 0.22);
}

.rune-three {
  right: -90px;
  bottom: 100px;
  border-color: rgba(143, 85, 214, 0.22);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(390px, 1.1fr);
  gap: 34px;
  align-items: center;
}

.hero-copy {
  max-width: 640px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--fk-gold);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.hero h1 {
  margin: 0 0 16px;
  color: #ffd979;
  font-size: clamp(3.5rem, 8vw, 8.2rem);
  line-height: 0.86;
  text-shadow: 0 5px 0 #3a1c09, 0 0 38px rgba(240, 195, 90, 0.32);
}

.hero-crest {
  width: min(190px, 45vw);
  height: auto;
  margin: 4px 0 16px;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.58));
}

.hero-tagline {
  margin-bottom: 12px;
  color: #fff1c5;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  line-height: 1.35;
  font-weight: 800;
}

.hero-intro,
.site-section p {
  color: var(--fk-muted);
  font-size: 1.08rem;
  line-height: 1.65;
  max-width: 64ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--fk-line);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(49, 31, 15, 0.82), rgba(14, 8, 5, 0.88));
  color: #ffe7a3;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 900;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.38);
  transition: transform 160ms ease, border-color 160ms ease;
}

.secondary-link:hover {
  transform: translateY(-2px);
  border-color: var(--fk-line-bright);
}

.game-frame {
  border: 2px solid var(--fk-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 229, 150, 0.08), transparent 26%),
    radial-gradient(circle at 50% 0%, rgba(240, 195, 90, 0.12), transparent 40%),
    var(--fk-stone);
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52), inset 0 0 0 1px #2f1d0d, 0 0 36px rgba(240, 195, 90, 0.08);
}

.game-frame .fk-app {
  width: 100%;
}

.missing-plugin {
  padding: 30px;
}

.site-section {
  position: relative;
  padding: 86px 0;
  border-top: 1px solid rgba(124, 85, 35, 0.7);
}

.site-section h2 {
  margin: 0 0 18px;
  color: #ffe7a3;
  font-size: clamp(2.15rem, 4vw, 3.8rem);
  line-height: 1.02;
  text-shadow: 0 3px 0 #3a1c09;
}

.section-divider {
  display: block;
  width: min(660px, 100%);
  height: auto;
  margin: 4px auto 28px;
  opacity: 0.94;
}

.kingdom-grid,
.class-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.class-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kingdom-card,
.class-card,
.callout,
.war-map-panel {
  border: 1px solid var(--fk-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 231, 163, 0.1), transparent 30%),
    radial-gradient(circle at 50% 0%, rgba(240, 195, 90, 0.08), transparent 48%),
    var(--fk-leather);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.42), 0 20px 48px rgba(0, 0, 0, 0.28);
}

.kingdom-card {
  position: relative;
  min-height: 310px;
  overflow: hidden;
  padding: 22px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.kingdom-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--kingdom-glow), transparent 48%);
  opacity: 0.4;
  pointer-events: none;
}

.kingdom-card:hover,
.class-card:hover {
  transform: translateY(-5px);
  border-color: var(--fk-line-bright);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.42), 0 28px 58px rgba(0, 0, 0, 0.36), 0 0 28px rgba(240, 195, 90, 0.12);
}

.kingdom-red {
  --kingdom-glow: rgba(192, 57, 47, 0.52);
}

.kingdom-blue {
  --kingdom-glow: rgba(47, 114, 214, 0.5);
}

.kingdom-green {
  --kingdom-glow: rgba(63, 173, 98, 0.46);
}

.kingdom-purple {
  --kingdom-glow: rgba(143, 85, 214, 0.5);
}

.kingdom-sigil {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 98px;
  margin-bottom: 18px;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 50% 100%, 0 72%);
  background: linear-gradient(180deg, #ffe7a3, #8c6229);
  box-shadow: 0 0 28px rgba(240, 195, 90, 0.28);
}

.kingdom-sigil span {
  width: 56px;
  height: 74px;
  clip-path: inherit;
  background: linear-gradient(180deg, var(--sigil-a), var(--sigil-b));
}

.kingdom-red .kingdom-sigil {
  --sigil-a: #ef604f;
  --sigil-b: #721713;
}

.kingdom-blue .kingdom-sigil {
  --sigil-a: #68a3ff;
  --sigil-b: #193d86;
}

.kingdom-green .kingdom-sigil {
  --sigil-a: #7ae39a;
  --sigil-b: #1f6535;
}

.kingdom-purple .kingdom-sigil {
  --sigil-a: #bd8bff;
  --sigil-b: #4f247b;
}

.kingdom-type {
  margin: 0 0 8px;
  color: var(--fk-gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.kingdom-card h3,
.class-card h3 {
  position: relative;
  margin: 0 0 10px;
  color: #ffe7a3;
  font-size: 1.45rem;
}

.kingdom-card p,
.class-card p {
  position: relative;
  font-size: 1rem;
}

.class-card {
  padding: 24px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.class-icon {
  position: relative;
  width: 78px;
  height: 78px;
  margin-bottom: 18px;
  border: 1px solid var(--fk-line-bright);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(240, 195, 90, 0.26), transparent 58%),
    linear-gradient(180deg, #33200f, #0c0704);
  box-shadow: 0 0 30px rgba(240, 195, 90, 0.18), inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.class-icon::before,
.class-icon::after {
  content: "";
  position: absolute;
  background: #ffe7a3;
  box-shadow: 0 0 12px rgba(240, 195, 90, 0.4);
}

.sword-icon::before {
  width: 8px;
  height: 48px;
  left: 35px;
  top: 12px;
  transform: rotate(38deg);
}

.sword-icon::after {
  width: 34px;
  height: 6px;
  left: 22px;
  top: 41px;
  transform: rotate(38deg);
}

.mage-icon::before {
  width: 42px;
  height: 42px;
  left: 18px;
  top: 18px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff3d0, #8f55d6 58%, transparent 60%);
}

.mage-icon::after {
  width: 4px;
  height: 58px;
  left: 37px;
  top: 10px;
}

.bow-icon::before {
  width: 44px;
  height: 56px;
  left: 17px;
  top: 10px;
  border: 5px solid #ffe7a3;
  border-left: 0;
  border-radius: 0 50px 50px 0;
  background: transparent;
}

.bow-icon::after {
  width: 4px;
  height: 54px;
  left: 37px;
  top: 12px;
}

.stat-lines {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.stat-lines span {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--fk-muted);
  font-size: 0.86rem;
  text-transform: uppercase;
}

.stat-lines i {
  height: 8px;
  overflow: hidden;
  border: 1px solid #5b3d1b;
  border-radius: 999px;
  background: #0b0604;
}

.stat-lines i::before {
  content: "";
  display: block;
  width: var(--value);
  height: 100%;
  background: linear-gradient(90deg, #9c5b24, var(--fk-gold));
  box-shadow: 0 0 14px rgba(240, 195, 90, 0.38);
}

.war-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(390px, 1.15fr);
  gap: 34px;
  align-items: center;
}

.war-points {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.war-points span {
  position: relative;
  border: 1px solid rgba(124, 85, 35, 0.72);
  border-radius: 6px;
  background: rgba(24, 18, 13, 0.72);
  color: #ffe7a3;
  padding: 12px 14px 12px 38px;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.35);
}

.war-points span::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translateY(-50%) rotate(45deg);
  background: var(--fk-gold);
  box-shadow: 0 0 14px rgba(240, 195, 90, 0.45);
}

.war-map-panel {
  position: relative;
  overflow: hidden;
  padding: 14px;
}

.realm-map {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid var(--fk-line);
  border-radius: 8px;
  background: #100905;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

.tile-preview {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: grid;
  width: 156px;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  border: 1px solid var(--fk-line-bright);
  border-radius: 6px;
  background: rgba(8, 5, 3, 0.84);
  padding: 8px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.42);
}

.tile-preview span {
  aspect-ratio: 1;
  border: 1px solid #5b3d1b;
  border-radius: 3px;
  background: linear-gradient(180deg, #4f381c, #191008);
}

.tile-preview .tile-red {
  background: linear-gradient(180deg, #df5348, #6c1713);
}

.tile-preview .tile-blue {
  background: linear-gradient(180deg, #5c97ef, #173b82);
}

.tile-preview .tile-green {
  background: linear-gradient(180deg, #65d483, #1c5c32);
}

.tile-preview .tile-purple {
  background: linear-gradient(180deg, #ad7bf0, #4f247a);
}

.callout {
  border: 2px solid var(--fk-line-bright);
  padding: 38px;
  text-align: center;
  background:
    radial-gradient(circle at 20% 0%, rgba(192, 57, 47, 0.22), transparent 38%),
    radial-gradient(circle at 80% 20%, rgba(240, 195, 90, 0.18), transparent 34%),
    #120b06;
}

.callout p {
  margin-left: auto;
  margin-right: auto;
}

.site-footer {
  border-top: 1px solid var(--fk-line);
  color: var(--fk-muted);
  padding: 28px 0;
  background: #070503;
}

@media (max-width: 1040px) {
  .hero-grid,
  .war-grid {
    grid-template-columns: 1fr;
  }

  .kingdom-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-nav {
    min-height: 70px;
  }

  .nav-toggle-button {
    display: grid;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(100% + 10px);
    display: none;
    border: 1px solid var(--fk-line);
    border-radius: 8px;
    background: linear-gradient(180deg, #24170d, #090604);
    padding: 14px;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.48);
  }

  .nav-toggle:checked ~ .nav-links {
    display: grid;
    gap: 12px;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
  }

  .kingdom-grid,
  .class-grid {
    grid-template-columns: 1fr;
  }

  .tile-preview {
    position: static;
    width: 100%;
    margin-top: 12px;
  }
}

@media (max-width: 560px) {
  .site-nav,
  .section-inner {
    width: min(100% - 22px, 1220px);
  }

  .hero h1 {
    font-size: clamp(3rem, 18vw, 5rem);
  }

  .site-section {
    padding: 58px 0;
  }

  .kingdom-card,
  .class-card,
  .callout {
    padding: 18px;
  }
}
