/* Queens Alliance visual system.
 * Loaded after theme.css so these rules can refine the original layout without
 * changing the shared colour and accessibility foundations.
 */

:root {
  --max-width: 1180px;
  --radius: 14px;
  --radius-sm: 8px;
  --section-gap: clamp(1rem, 2vw, 1.5rem);
}

img {
  max-width: 100%;
}

/* ── Header / navigation ─────────────────────────────────── */

.page-header {
  border-bottom: 2px solid var(--color-red);
  background: rgba(30, 37, 48, 0.97);
  backdrop-filter: blur(14px);
}

.page-header .header-shell {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem 1.25rem;
  min-height: 72px;
  padding: 0.55rem 1rem;
}

.crown-logo {
  display: block;
  flex-shrink: 0;
  border-radius: 50%;
}

.brand-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.55));
}

.page-header .nav {
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
}

.page-header .nav-link {
  padding: 0.5rem 0.6rem;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.2;
  white-space: nowrap;
}

.page-header .nav-link:hover,
.page-header .nav-link:focus-visible,
.page-header .nav-link[aria-current='page'] {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.07);
}

.page-header .nav-link[aria-current='page'] {
  box-shadow: inset 0 -2px 0 var(--color-accent);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  min-width: 0;
}

.page-header .header-discord {
  min-height: 38px;
  flex: 0 0 auto;
  padding: 0.42rem 0.78rem;
  border-width: 1px;
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
}

.header-discord-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-steel-2);
  color: var(--color-text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle:hover,
.nav-toggle:focus-visible,
.nav-toggle[aria-expanded='true'] {
  border-color: var(--color-accent);
  background: rgba(201, 162, 39, 0.12);
  color: #fff;
  outline: none;
}

.nav-toggle:focus-visible {
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.35);
}

.nav-toggle-icon {
  display: grid;
  gap: 3px;
  width: 17px;
}

.nav-toggle-icon span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded='true'] .nav-toggle-icon span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded='true'] .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded='true'] .nav-toggle-icon span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* ── Language switcher ───────────────────────────────────── */

.lang-switcher {
  position: relative;
  margin: 0;
  flex: 0 0 auto;
}

.lang-switcher summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0.35rem 0.62rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-steel-2);
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  font-size: 0.82rem;
  white-space: nowrap;
}

.lang-switcher summary::-webkit-details-marker {
  display: none;
}

.lang-switcher summary::after {
  content: '▾';
  color: var(--color-text-muted);
  font-size: 0.7rem;
}

.lang-switcher summary:hover,
.lang-switcher summary:focus-visible {
  background: var(--color-steel);
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.lang-options {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 100;
  min-width: 172px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-steel);
  box-shadow: var(--shadow-lg);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  color: var(--color-text);
  font-size: 0.875rem;
}

.lang-option:hover,
.lang-option:focus-visible {
  background: var(--color-steel-2);
  outline: none;
}

.lang-option:focus-visible {
  box-shadow: inset 0 0 0 2px var(--color-accent);
}

.flag {
  width: 20px;
  height: 15px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 2px;
}

/* ── Hero ────────────────────────────────────────────────── */

.hero-section {
  position: relative;
  min-height: clamp(320px, 40vw, 470px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-img-fallback);
  background-position: center;
  background-size: cover;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(6, 8, 12, 0.9) 0%, rgba(6, 8, 12, 0.58) 48%, rgba(6, 8, 12, 0.25) 100%),
    linear-gradient(0deg, rgba(6, 8, 12, 0.72), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 1rem;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 660px;
  text-align: left;
}

.hero-section--with-foreground .hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
}

.hero-section--with-foreground .hero-copy {
  width: auto;
  max-width: 620px;
}

.hero-logo {
  width: 76px;
  height: auto;
  margin-bottom: 0.8rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
}

.hero-title {
  max-width: 760px;
  margin-bottom: 0.65rem;
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.9);
}

.hero-tagline {
  max-width: 620px;
  color: #f0c94a;
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  line-height: 1.5;
  text-wrap: balance;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* ── Page rhythm / shared surfaces ───────────────────────── */

.main-container {
  padding-top: clamp(1.25rem, 3vw, 2.25rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

.page-flow {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.page-flow > * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.card,
.onboarding-section,
.guide-item,
.promo-card,
.rules-card,
.pandora-card {
  border-color: #313c4c;
  background: linear-gradient(145deg, rgba(34, 42, 54, 0.98), rgba(24, 29, 38, 0.98));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
}

.card {
  margin-top: 0;
  padding: clamp(1rem, 2.5vw, 1.5rem);
}

.home-section {
  position: relative;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
  margin-bottom: 1rem;
}

.section-heading .card-title,
.section-heading .rules-title {
  margin: 0;
}

.card-title,
.rules-title,
.pandora-title,
.promo-card-title {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  letter-spacing: -0.01em;
}

.page-flow > h1.card-title {
  font-size: clamp(1.55rem, 3vw, 2.1rem);
}

.page-intro {
  max-width: 72ch;
  color: var(--color-text-muted);
}

.snapshot-status {
  min-height: 110px;
}

/* ── Existing art blocks ─────────────────────────────────── */

.events-explainer {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.events-explainer-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--color-img-fallback);
  background-image: url('/img/building.webp');
  background-position: center;
  background-size: cover;
}

.events-explainer-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.events-explainer-summary {
  position: relative;
  z-index: 1;
  padding: 1.5rem;
}

.zombie3d-accent {
  position: relative;
  min-height: 200px;
  background: transparent url('/img/zombie3d.webp') no-repeat right center / contain;
}

@media (max-width: 1020px) {
  .page-header .header-shell {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .page-header .nav {
    grid-row: 2;
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
  }

  .header-actions {
    grid-column: 3;
  }
}

@media (max-width: 700px) {
  .page-header .header-shell {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.4rem 0.6rem;
    min-height: 0;
    padding-block: 0.45rem;
  }

  .brand-logo {
    width: 46px;
    height: 46px;
  }

  .header-actions {
    grid-column: 2;
    gap: 0.4rem;
  }

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

  .page-header .nav {
    display: none;
    grid-row: 2;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    overflow: visible;
    gap: 0.4rem;
    padding: 0.55rem 0 0.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .page-header .nav[data-mobile-open='true'] {
    display: grid;
  }

  .page-header .nav-link {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.035);
    white-space: normal;
  }

  .page-header .nav-link[aria-current='page'] {
    border-color: rgba(201, 162, 39, 0.45);
    background: rgba(201, 162, 39, 0.13);
    box-shadow: inset 3px 0 0 var(--color-accent);
  }

  .page-header .header-discord,
  .lang-switcher summary {
    min-height: 36px;
  }

  .hero-section {
    min-height: 300px;
  }

  .hero-section--with-foreground .hero-content {
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 2rem;
    padding-bottom: 0;
  }

  .hero-section--with-foreground .hero-copy {
    width: 100%;
    max-width: 100%;
  }

  .hero-title {
    max-width: 12ch;
  }
}

@media (max-width: 460px) {
  .page-header .header-discord {
    width: 38px;
    justify-content: center;
    padding-inline: 0;
  }

  .header-discord-label,
  .lang-label,
  .lang-switcher summary::after {
    display: none;
  }

  .nav-toggle {
    width: 40px;
    padding-inline: 0;
  }

  .nav-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .lang-switcher summary {
    width: 38px;
    justify-content: center;
    padding-inline: 0;
  }

  .page-header .nav-link {
    padding: 0.42rem 0.52rem;
    font-size: 0.8rem;
  }

  .hero-title {
    font-size: clamp(1.8rem, 10vw, 2.5rem);
  }
}
