:root {
  --bg: #0f0a1f;
  --bg-soft: rgba(23, 16, 45, 0.72);
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --text: #f8efff;
  --text-soft: #d7caee;
  --purple: #a35dff;
  --purple-strong: #c884ff;
  --pink: #ff98e9;
  --gold: #f6dfa0;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 40px rgba(5, 0, 15, 0.34);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 1180px;
  --header-height: 90px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
  background:
    linear-gradient(180deg, rgba(8, 5, 19, 0.32), rgba(8, 5, 19, 0.74)),
    url("../images/background.svg") center center / cover fixed no-repeat,
    var(--bg);
  min-height: 100vh;
}

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

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

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin: 0 auto;
}

.page-bg-orb {
  position: fixed;
  inset: auto;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(163, 93, 255, 0.22), rgba(163, 93, 255, 0));
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}

.orb-left {
  left: -8rem;
  top: 8rem;
}

.orb-right {
  right: -6rem;
  bottom: 4rem;
  background: radial-gradient(circle, rgba(255, 152, 233, 0.18), rgba(255, 152, 233, 0));
}

.site-header,
.site-footer,
main {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(20px);
  background: rgba(8, 6, 20, 0.56);
  border-bottom: 1px solid var(--line);
}

.nav-shell {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}

.brand strong,
.hero-copy h1,
.hero-card h2,
.section-heading h2,
.royal-copy h2,
.page-hero h1,
.timeline-card h2,
.poi-details h2,
h3 {
  font-family: "Cinzel", Georgia, serif;
}

.brand strong {
  display: block;
  font-size: 1.15rem;
}

.brand small {
  color: var(--text-soft);
}

.brand-mark {
  width: 2.8rem;
  height: 2.8rem;
  display: inline-grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 152, 233, 0.32), rgba(163, 93, 255, 0.7));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-family: "Cinzel", serif;
  font-size: 1.4rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.site-nav a,
.discord-button,
.btn,
.tiny-btn,
.text-link,
.map-point,
.poi {
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.site-nav a {
  padding: 0.72rem 1rem;
  color: var(--text-soft);
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
}

.discord-button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.92), rgba(130, 142, 255, 0.9));
  box-shadow: 0 12px 30px rgba(88, 101, 242, 0.3);
}

.discord-button svg {
  width: 1.15rem;
  height: 1.15rem;
}

.discord-button:hover,
.btn:hover,
.tiny-btn:hover,
.text-link:hover,
.map-point:hover,
.poi:hover {
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.7rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.hero-section,
.page-hero {
  padding: 4.8rem 0 2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1.4rem;
  align-items: stretch;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(2.7rem, 5vw, 4.7rem);
  line-height: 1.04;
}

.hero-text,
.page-hero p,
.hero-card p,
.section-heading p,
.glass-card p,
.clean-list,
.poi-details p {
  color: var(--text-soft);
}

.eyebrow,
.panel-kicker,
.mini-tag,
.timeline-date {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.74rem;
  color: var(--gold);
}

.hero-actions,
.status-controls,
.royal-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.btn-primary {
  color: #160b2d;
  background: linear-gradient(135deg, var(--gold), #fff1cb);
  box-shadow: 0 12px 30px rgba(246, 223, 160, 0.22);
}

.btn-secondary,
.tiny-btn {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tiny-btn {
  min-height: 2.6rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
}

.tiny-btn.is-active {
  background: rgba(163, 93, 255, 0.28);
  border-color: rgba(200, 132, 255, 0.5);
}

.glass-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 1.5rem;
}

.hero-card,
.frontier-panel {
  position: relative;
  overflow: hidden;
}

.hero-card::before,
.frontier-panel::before,
.royal-copy::before,
.map-card::before {
  content: "";
  position: absolute;
  inset: -20% auto auto -15%;
  width: 12rem;
  height: 12rem;
  background: radial-gradient(circle, rgba(255, 152, 233, 0.18), rgba(255, 152, 233, 0));
  pointer-events: none;
}

.frontier-panel {
  margin-top: 1.5rem;
}

.panel-head,
.hero-card-top,
.footer-shell,
.map-toolbar,
.toolbar-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.status-pill {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.88rem;
  background: rgba(76, 230, 175, 0.18);
  border: 1px solid rgba(76, 230, 175, 0.32);
  color: #c4ffe9;
}

.status-pill.closed {
  background: rgba(255, 110, 163, 0.16);
  border-color: rgba(255, 110, 163, 0.32);
  color: #ffd4e1;
}

.pulse-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: #7cffc8;
  box-shadow: 0 0 0 0 rgba(124, 255, 200, 0.7);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(124, 255, 200, 0.6); }
  70% { box-shadow: 0 0 0 18px rgba(124, 255, 200, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 255, 200, 0); }
}

.info-grid,
.card-grid,
.contact-grid,
.map-grid,
.academy-grid,
.village-layout,
.royal-grid {
  display: grid;
  gap: 1.4rem;
}

.info-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.info-grid article {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.info-grid strong {
  display: block;
  margin-bottom: 0.45rem;
}

.section-shell {
  padding: 1.6rem 0 3rem;
}

.section-heading {
  max-width: 52rem;
  margin-bottom: 1.4rem;
}

.countdown-shell {
  padding-top: 0.3rem;
}

.countdown-shell-top {
  padding-top: 1.35rem;
  padding-bottom: 2.2rem;
}

.countdown-panel {
  position: relative;
  overflow: hidden;
}

.countdown-panel-top {
  padding: 2.2rem;
  border-radius: 2.2rem;
  background:
    linear-gradient(180deg, rgba(10, 8, 24, 0.94), rgba(9, 7, 21, 0.88)),
    radial-gradient(circle at top left, rgba(139, 83, 214, 0.24), transparent 34%),
    radial-gradient(circle at bottom right, rgba(246, 223, 160, 0.09), transparent 28%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 34px 80px rgba(3, 1, 10, 0.5);
}

.countdown-panel::after {
  content: "";
  position: absolute;
  inset: auto -12% -28% auto;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 223, 160, 0.12), rgba(246, 223, 160, 0));
  pointer-events: none;
}

.countdown-heading {
  margin-bottom: 2rem;
}

.countdown-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.countdown-date-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  color: #fff8df;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 24px rgba(2, 1, 10, 0.26);
}

.countdown-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.8rem;
  align-items: stretch;
}

.countdown-copy h2 {
  margin: 0 0 0.8rem;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(2.9rem, 6vw, 5.4rem);
  line-height: 0.95;
  text-transform: capitalize;
  color: #fff7df;
  text-shadow: 0 0 24px rgba(246, 223, 160, 0.18);
}

.countdown-copy p {
  margin: 0 auto;
  max-width: 52rem;
  font-size: 1.08rem;
  text-align: center;
}

.countdown-copy {
  text-align: center;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 1.2rem;
}

.countdown-unit {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 1.3rem;
  border-radius: 1.8rem;
  background:
    linear-gradient(180deg, rgba(24, 19, 45, 0.94), rgba(14, 11, 28, 0.92)),
    radial-gradient(circle at top, rgba(200, 132, 255, 0.14), transparent 58%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 28px 44px rgba(3, 1, 12, 0.34);
  text-align: center;
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.countdown-unit::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.countdown-unit:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 32px 52px rgba(3, 1, 12, 0.4);
}

.countdown-value {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 9rem;
  padding: 0 0.18em;
  overflow: hidden;
  border-radius: 1.35rem;
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: 1;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  color: #fff7df;
  background:
    linear-gradient(180deg, rgba(112, 98, 165, 0.48), rgba(56, 44, 93, 0.5)),
    linear-gradient(135deg, rgba(255, 152, 233, 0.08), rgba(163, 93, 255, 0.12));
  text-shadow: 0 0 18px rgba(246, 223, 160, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 20px 32px rgba(4, 2, 12, 0.26);
}

.countdown-value::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 26%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), transparent);
  pointer-events: none;
}

.countdown-value.is-ticking {
  animation: countdown-flash 520ms ease;
}

.countdown-unit span {
  display: inline-block;
  margin-top: 1rem;
  color: #d9caee;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.82rem;
}

.countdown-finish {
  padding: 2.2rem 1rem 1rem;
  text-align: center;
}

.countdown-finish h3 {
  margin: 0 0 0.8rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.countdown-finish p {
  max-width: 42rem;
  margin: 0 auto;
}

.countdown-panel.is-finished .countdown-heading {
  margin-bottom: 1rem;
}

@keyframes countdown-flash {
  0% {
    transform: translateY(16px) scale(0.97);
    opacity: 0.45;
    filter: blur(4px);
  }
  55% {
    transform: translateY(-3px) scale(1.02);
    opacity: 1;
    filter: blur(0);
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.gallery-marquee {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.gallery-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: gallery-scroll 28s linear infinite;
}

.gallery-track:hover {
  animation-play-state: paused;
}

.gallery-item {
  width: min(22rem, 75vw);
  flex: 0 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
}

.gallery-item img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.gallery-caption {
  position: absolute;
  inset: auto 1rem 1rem 1rem;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: rgba(10, 7, 20, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@keyframes gallery-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.royal-grid {
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
}

.royal-image img {
  width: 100%;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

.royal-points span {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
}

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

.card-grid.two,
.contact-grid,
.map-grid,
.academy-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.text-link {
  color: var(--gold);
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form label {
  display: grid;
  gap: 0.5rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 6, 20, 0.4);
  color: var(--text);
  border-radius: 18px;
  padding: 0.95rem 1rem;
  resize: vertical;
}

.form-feedback {
  min-height: 1.5rem;
  margin: 0;
}

.page-main {
  padding-bottom: 2rem;
}

.timeline-grid {
  display: grid;
  gap: 1.2rem;
}

.timeline-card {
  position: relative;
  padding-left: 1.8rem;
}

.timeline-card::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 1.85rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 0 0 8px rgba(163, 93, 255, 0.12);
}

.village-layout {
  grid-template-columns: 1.2fr 0.8fr;
  align-items: start;
}

.village-side {
  display: grid;
  gap: 1.4rem;
}

.map-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.village-plan-frame img {
  width: 100%;
  min-height: 30rem;
  object-fit: cover;
}

.map-point {
  position: absolute;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(17, 12, 34, 0.9);
  color: var(--text);
}

.map-point.warning {
  background: rgba(127, 37, 71, 0.92);
}

.point-1 { top: 18%; left: 34%; }
.point-2 { top: 38%; right: 16%; }
.point-3 { top: 56%; left: 40%; }
.point-4 { bottom: 18%; left: 20%; }
.point-5 { bottom: 24%; right: 18%; }

.clean-list {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.8;
}

.map-card {
  padding: 1rem;
}

.coords-display {
  color: var(--text-soft);
  font-size: 0.95rem;
}

.interactive-map {
  position: relative;
  margin-top: 1rem;
  border-radius: 1.5rem;
  overflow: hidden;
  min-height: 38rem;
  background: linear-gradient(180deg, rgba(8, 6, 20, 0.6), rgba(8, 6, 20, 0.85));
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
}

.interactive-map.is-dragging {
  cursor: grabbing;
}

.map-layer {
  position: absolute;
  inset: 0;
  transform-origin: center center;
  will-change: transform;
}

.map-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.poi {
  position: absolute;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  background: rgba(17, 12, 34, 0.92);
}

.poi::before {
  content: "";
  width: 0.65rem;
  height: 0.65rem;
  display: inline-block;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  box-shadow: 0 0 0 6px rgba(163, 93, 255, 0.12);
}

.poi-capital { top: 42%; left: 47%; }
.poi-village { top: 60%; left: 56%; }
.poi-border { top: 25%; left: 52%; }
.poi-academy { top: 53%; left: 37%; }

.site-footer {
  padding: 1rem 0 2rem;
}

.footer-shell {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-soft);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.is-loading {
  overflow: hidden;
}

.site-loader {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(79, 38, 125, 0.34), rgba(10, 7, 18, 0.94)),
    linear-gradient(180deg, rgba(12, 8, 24, 0.98), rgba(8, 5, 16, 0.98));
  transition: opacity 450ms ease, visibility 450ms ease;
}

.site-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.site-loader-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image:
    radial-gradient(circle at 20% 20%, #d2a4ff 0 12px, transparent 13px),
    radial-gradient(circle at 80% 30%, #d2a4ff 0 8px, transparent 9px),
    radial-gradient(circle at 30% 80%, #ff98e9 0 10px, transparent 11px);
  background-size: 180px 180px;
}

.site-loader-inner {
  position: relative;
  text-align: center;
  padding: 2rem;
}

.loader-sigil {
  width: min(16rem, 45vw);
  height: auto;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 28px rgba(255, 255, 255, 0.14));
}

.loader-sigil path {
  fill: transparent;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: sigil-draw 2.4s ease forwards, sigil-glow 2.2s ease-in-out infinite 0.4s;
}

@keyframes sigil-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes sigil-glow {
  0%, 100% {
    filter: drop-shadow(0 0 0 rgba(255, 255, 255, 0.1));
    opacity: 0.76;
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.38));
    opacity: 1;
  }
}

.site-loader p {
  margin: 0;
  color: var(--text);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.86rem;
}

.alert-marquee {
  position: sticky;
  top: 0;
  z-index: 36;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(90, 18, 44, 0.96), rgba(131, 28, 75, 0.96));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.alert-marquee.closed {
  box-shadow: 0 10px 30px rgba(131, 28, 75, 0.28);
}

.alert-track {
  display: flex;
  gap: 2.5rem;
  width: max-content;
  white-space: nowrap;
  padding: 0.75rem 0;
  color: #ffe1eb;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.72rem;
  animation: banner-slide 24s linear infinite;
}

.alert-track span::before {
  content: "✦";
  margin-right: 0.8rem;
}

@keyframes banner-slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 30px rgba(6, 3, 16, 0.24);
}

.hero-badge.closed {
  background: rgba(155, 39, 89, 0.22);
  border-color: rgba(255, 164, 196, 0.24);
  color: #ffe2ec;
}

.status-meta {
  margin: 1rem 0 0;
  color: var(--gold);
  font-size: 0.9rem;
}

.essentials-grid,
.stats-grid,
.project-board,
.news-grid,
.catalogue-grid {
  display: grid;
  gap: 1.4rem;
}

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

.essential-card,
.stat-card,
.project-card,
.news-card,
.news-featured-card,
.commerce-card {
  position: relative;
  overflow: hidden;
}

.essential-card,
.stat-card {
  padding: 1.45rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.essential-card::before,
.stat-card::before,
.project-card::before,
.news-card::before,
.commerce-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 45%);
  pointer-events: none;
}

.stat-card strong {
  display: block;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-family: "Cinzel", Georgia, serif;
}

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

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

.project-card {
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

.project-head,
.project-progress,
.commerce-top,
.commerce-meta,
.news-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.project-status,
.stock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.86rem;
}

.project-status.encours {
  background: rgba(95, 112, 255, 0.18);
  color: #dbe0ff;
}

.project-status.etude {
  background: rgba(255, 220, 119, 0.16);
  color: #ffefbf;
}

.project-status.prioritaire {
  background: rgba(255, 121, 167, 0.18);
  color: #ffdbe8;
}

.project-status.finition {
  background: rgba(97, 234, 176, 0.16);
  color: #c9ffea;
}

.project-progress-bar {
  position: relative;
  flex: 1;
  height: 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.project-progress-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--purple), #7ec9ff);
  box-shadow: 0 0 18px rgba(163, 93, 255, 0.26);
}

.detail-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.news-featured-shell {
  display: grid;
}

.news-featured-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  border-radius: 2rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.news-featured-media img,
.news-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-featured-copy {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-featured-copy h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3rem);
  font-family: "Cinzel", Georgia, serif;
}

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

.news-card {
  border-radius: 0;
  background: rgba(248, 239, 255, 0.94);
  color: #12081d;
  border: 1px solid rgba(26, 12, 30, 0.38);
  box-shadow: 0 20px 40px rgba(6, 2, 10, 0.22);
  transform-origin: center top;
}

.news-card:hover {
  transform: translateY(-6px) scale(1.01);
}

.news-media {
  aspect-ratio: 16 / 9;
  background: #1f1734;
}

.news-content {
  padding: 1rem;
}

.news-content h3 {
  margin: 0.4rem 0;
  color: #12081d;
  font-size: 1.35rem;
  text-transform: uppercase;
}

.news-date {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #3a2844;
}

.news-card p,
.news-featured-copy p {
  color: inherit;
}

.news-button {
  margin-top: 1rem;
  display: inline-flex;
  width: 100%;
  justify-content: center;
  padding: 0.9rem 1rem;
  background: #15070e;
  color: #fff5f9;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.76rem;
}

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

.commerce-card {
  padding: 1.5rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
}

.item-art {
  width: 4.25rem;
  height: 4.25rem;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, rgba(255, 216, 165, 0.26), rgba(163, 93, 255, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.15rem;
  color: var(--gold);
}

.stock-badge.low {
  background: rgba(255, 121, 167, 0.18);
  color: #ffd9e8;
}

.stock-badge.medium {
  background: rgba(255, 220, 119, 0.16);
  color: #fff1c8;
}

.stock-badge.high {
  background: rgba(97, 234, 176, 0.16);
  color: #c9ffea;
}

.commerce-feedback {
  min-height: 1.4rem;
  margin: 0 0 1rem;
  color: var(--gold);
}

.map-link-button {
  margin-top: 1.2rem;
}

.poi-commerce {
  top: 68%;
  left: 28%;
}

.interactive-map::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}

.glass-card:hover,
.essential-card:hover,
.stat-card:hover,
.project-card:hover,
.commerce-card:hover,
.news-featured-card:hover {
  box-shadow: 0 26px 52px rgba(5, 0, 15, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .gallery-track,
  .pulse-dot,
  .reveal,
  .loader-sigil path,
  .alert-track {
    animation: none;
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1040px) {
  .hero-grid,
  .royal-grid,
  .card-grid.three,
  .contact-grid,
  .map-grid,
  .academy-grid,
  .village-layout,
  .news-featured-card,
  .essentials-grid,
  .stats-grid,
  .project-board,
  .catalogue-grid {
    grid-template-columns: 1fr;
  }

  .card-grid.two {
    grid-template-columns: 1fr;
  }

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

  .countdown-hero {
    grid-template-columns: 1fr;
  }

  .countdown-grid {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border-radius: 1.5rem;
    padding: 0.8rem;
    background: rgba(11, 8, 23, 0.95);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    border-radius: 16px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .discord-button {
    margin-left: auto;
  }
}

@media (max-width: 720px) {
  :root {
    --header-height: 84px;
  }

  body {
    background-attachment: scroll, scroll, scroll;
  }

  .discord-button span {
    display: none;
  }

  .hero-section,
  .page-hero {
    padding-top: 3.8rem;
  }

  .glass-card,
  .map-card {
    padding: 1.2rem;
  }

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

  .news-grid,
  .catalogue-grid {
    grid-template-columns: 1fr;
  }

  .countdown-topline {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .countdown-value {
    min-height: 7rem;
    font-size: clamp(2.8rem, 12vw, 4.2rem);
  }

  .interactive-map {
    min-height: 24rem;
  }

  .village-plan-frame img {
    min-height: 22rem;
  }

  .alert-track {
    gap: 1.4rem;
    letter-spacing: 0.14em;
  }
}
