/*
 * AoW Hub — Wuxia-inspired atmosphere (fan hub; not an official game site).
 * Palette: deep jianghu night, gold scroll accents, ember CTAs — all CSS-only for CSP.
 *
 * Fonts are self-hosted (assets/fonts/) because the site's CSP is font-src 'self'
 * — Google Fonts / @import would be blocked by the browser. Cinzel, Cinzel
 * Decorative, Cormorant Garamond and Noto Serif are all OFL-licensed. The three
 * variable fonts carry a weight range; Cinzel Decorative is a single 700 weight.
 */
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url("../fonts/cinzel.woff2") format("woff2");
}

@font-face {
  font-family: "Cinzel Decorative";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/cinzel-decorative-700.woff2") format("woff2");
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Noto Serif";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/noto-serif.woff2") format("woff2");
}

:root {
  --aow-bg-deep: #07090d;
  --aow-bg: #0c1018;
  --aow-bg-mist: rgba(45, 85, 95, 0.12);
  --aow-surface: #141c28;
  --aow-surface-2: #1a2434;
  --aow-border: #2a3548;
  --aow-border-gold: rgba(201, 162, 39, 0.35);
  --aow-text: #e8e4dc;
  --aow-muted: #9a9da8;
  --aow-gold: #d4af37;
  --aow-gold-dim: #8b6914;
  --aow-ember: #c45c2a;
  --aow-ember-deep: #6b1f0f;
  --aow-teal-glow: rgba(45, 120, 130, 0.15);
  --aow-font: system-ui, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", sans-serif;
  --aow-display: Georgia, "Times New Roman", "Noto Serif", Times, serif;

  /* Wuxia / Jianghu type system (self-hosted). */
  --aow-font-logo: "Cinzel Decorative", "Cinzel", Georgia, serif;
  --aow-font-heading: "Cinzel", Georgia, "Times New Roman", serif;
  --aow-font-poetic: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --aow-font-body: "Noto Serif", Georgia, "Times New Roman", serif;

  /* Cinematic gold ramp for the title. */
  --aow-gold-1: #fff0a8;
  --aow-gold-2: #d9a835;
  --aow-gold-3: #8d6418;
  --aow-text-soft: #c9ced8;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.aow-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--aow-font);
  color: var(--aow-text);
  background-color: var(--aow-bg-deep);
  /* Photo: public/assets/bg.jpg */
  background-image:
    linear-gradient(180deg, rgba(5, 7, 11, 0.78) 0%, rgba(10, 14, 22, 0.68) 45%, rgba(5, 7, 11, 0.88) 100%),
    radial-gradient(ellipse 90% 60% at 50% -10%, var(--aow-teal-glow), transparent 50%),
    radial-gradient(ellipse 70% 50% at 100% 30%, rgba(139, 40, 20, 0.12), transparent 50%),
    url("../bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Gate page: solid deep base; the cinematic backdrop lives in .aow-bg below. */
body.aow-body--gate {
  background: var(--aow-bg-deep);
}

/*
 * Cinematic background (gate page).
 * The static poster is painted as a CSS background so something is always
 * visible (before/without the video, and under prefers-reduced-motion). The
 * looping <video> sits on top and fades in once playback starts (see
 * assets/js/gate-bg.js). pointer-events are disabled across the whole layer so
 * the video exposes no native context menu and cannot be dragged.
 */
.aow-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background-color: var(--aow-bg-deep);
  /* ?v bump busts the browser cache when the poster art is replaced. */
  background-image: url("../images/aow/under-construction-poster.jpg?v=3");
  background-image: image-set(
    url("../images/aow/under-construction-poster.webp?v=3") type("image/webp"),
    url("../images/aow/under-construction-poster.jpg?v=3") type("image/jpeg")
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.aow-bg__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.aow-bg__video.is-playing {
  opacity: 1;
}

/* Readability overlay: gentle top/bottom darkening + a calmer, darker center. */
.aow-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 6, 10, 0.44) 0%, rgba(7, 10, 16, 0.2) 45%, rgba(4, 6, 10, 0.7) 100%),
    radial-gradient(ellipse 58% 50% at 50% 48%, rgba(3, 5, 8, 0.52), transparent 74%);
}

/* —— Atmosphere layers (gate page): drifting mist, rising motes, vignette —— */
.aow-fx {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.aow-fx__mist {
  position: absolute;
  inset: -14% -20%;
  background:
    radial-gradient(ellipse 55% 38% at 22% 62%, rgba(160, 190, 205, 0.09), transparent 65%),
    radial-gradient(ellipse 65% 42% at 78% 36%, rgba(120, 155, 175, 0.07), transparent 65%);
  animation: aow-mist-drift 85s ease-in-out infinite alternate;
  will-change: transform;
}

.aow-fx__mist--near {
  background:
    radial-gradient(ellipse 70% 45% at 55% 82%, rgba(140, 170, 190, 0.08), transparent 60%),
    radial-gradient(ellipse 40% 30% at 12% 20%, rgba(150, 180, 195, 0.05), transparent 65%);
  animation-duration: 55s;
  animation-direction: alternate-reverse;
}

@keyframes aow-mist-drift {
  from { transform: translate3d(-3.5%, 0, 0); }
  to   { transform: translate3d(3.5%, 0, 0); }
}

/* Gold dust: dot pattern tiles every 620px; translating exactly one tile loops seamlessly. */
.aow-fx__motes {
  position: absolute;
  inset: 0 0 -1240px 0;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(233, 200, 116, 0.75), transparent 100%),
    radial-gradient(1px 1px at 34% 62%, rgba(233, 200, 116, 0.6), transparent 100%),
    radial-gradient(2px 2px at 58% 34%, rgba(212, 175, 55, 0.45), transparent 100%),
    radial-gradient(1px 1px at 71% 78%, rgba(233, 200, 116, 0.55), transparent 100%),
    radial-gradient(1.5px 1.5px at 88% 52%, rgba(212, 175, 55, 0.5), transparent 100%),
    radial-gradient(1px 1px at 45% 92%, rgba(233, 200, 116, 0.4), transparent 100%);
  background-size: 620px 620px;
  opacity: 0.26;
  animation: aow-motes-rise 70s linear infinite;
  will-change: transform;
}

@keyframes aow-motes-rise {
  to { transform: translate3d(0, -620px, 0); }
}

/* Faint warm lantern glow that breathes slowly, placed off-centre where the
   scene's lanterns sit so the text area stays clean. */
.aow-fx__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 34% 30% at 82% 62%, rgba(232, 152, 74, 0.1), transparent 60%),
    radial-gradient(ellipse 26% 26% at 15% 74%, rgba(224, 142, 62, 0.06), transparent 60%);
  animation: aow-glow-pulse 9s ease-in-out infinite alternate;
  will-change: opacity;
}

@keyframes aow-glow-pulse {
  from { opacity: 0.5; }
  to   { opacity: 1; }
}

.aow-fx__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 116% 88% at 50% 42%, transparent 46%, rgba(2, 4, 7, 0.74) 100%),
    linear-gradient(180deg, transparent 60%, rgba(3, 5, 8, 0.55) 100%);
}

.aow-skip {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 0.5rem 1rem;
  background: var(--aow-ember);
  color: #fff;
  text-decoration: none;
}

.aow-skip:focus {
  left: 1rem;
  top: 1rem;
}

/* —— Header (dark bar, gold edge) —— */
.aow-header {
  background: rgba(5, 7, 11, 0.92);
  border-bottom: 1px solid var(--aow-border);
  box-shadow:
    0 1px 0 0 var(--aow-border-gold),
    0 8px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

.aow-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.aow-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}

.aow-brand__mark {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 0.35rem;
  /* Jianghu gate emblem on a dark lacquer tile. */
  background:
    linear-gradient(160deg, rgba(26, 36, 52, 0.9), rgba(12, 16, 24, 0.95)),
    var(--aow-bg-deep);
  border: 1px solid var(--aow-border-gold);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 0 24px rgba(212, 175, 55, 0.18);
  position: relative;
}

.aow-brand__mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: url("../brand-mark.svg") center / 72% no-repeat;
  pointer-events: none;
}

.aow-brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.aow-brand__name {
  font-family: var(--aow-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #f5e6b8 0%, var(--aow-gold) 45%, var(--aow-gold-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.aow-brand__tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--aow-muted);
}

.aow-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.5rem;
}

.aow-nav a {
  color: #c8cbd4;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.aow-nav a:hover,
.aow-nav a:focus-visible {
  color: var(--aow-text);
  border-color: var(--aow-gold);
}

/* —— Main —— */
.aow-main {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

/* —— Hero —— */
.aow-hero {
  position: relative;
  padding: 3rem 0 2.5rem;
  overflow: hidden;
}

.aow-hero::before {
  content: "";
  position: absolute;
  top: 15%;
  left: -10%;
  width: 55%;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgba(196, 92, 42, 0.5), transparent);
  transform: rotate(-12deg);
  pointer-events: none;
}

.aow-hero::after {
  content: "";
  position: absolute;
  bottom: 25%;
  right: -5%;
  width: 45%;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.25), transparent);
  transform: rotate(-8deg);
  pointer-events: none;
}

.aow-hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
}

.aow-hero__kicker {
  margin: 0 0 0.75rem;
  font-family: var(--aow-display);
  font-size: clamp(0.75rem, 1.5vw, 0.85rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--aow-muted);
}

.aow-hero__title {
  margin: 0 0 1rem;
  font-family: var(--aow-display);
  font-size: clamp(1.85rem, 5vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff8e0 0%, var(--aow-gold) 42%, var(--aow-gold-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.5));
}

.aow-hero__lead {
  margin: 0 0 1.85rem;
  font-size: 1.02rem;
  line-height: 1.65;
  color: #b8bcc8;
}

.aow-hero__lead strong {
  color: var(--aow-text);
  font-weight: 600;
}

.aow-hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

/* —— Buttons (ember gradient, ref-style CTA) —— */
.aow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.6rem;
  border-radius: 2px;
  font-family: var(--aow-font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    filter 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    color 0.18s ease;
}

.aow-btn:focus-visible {
  outline: 2px solid var(--aow-gold);
  outline-offset: 2px;
}

.aow-btn--primary {
  color: #fff;
  background: linear-gradient(180deg, #e8894a 0%, var(--aow-ember) 48%, var(--aow-ember-deep) 100%);
  border-color: rgba(0, 0, 0, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 200, 0.26),
    inset 0 0 0 1px rgba(217, 168, 53, 0.18),
    0 2px 14px rgba(196, 92, 42, 0.32),
    0 0 20px rgba(217, 168, 53, 0.1);
}

.aow-btn--primary:hover,
.aow-btn--primary:focus-visible {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 200, 0.34),
    inset 0 0 0 1px rgba(217, 168, 53, 0.32),
    0 6px 26px rgba(196, 92, 42, 0.42),
    0 0 26px rgba(217, 168, 53, 0.24);
}

.aow-btn--ghost {
  background: linear-gradient(180deg, rgba(26, 36, 52, 0.55) 0%, rgba(11, 16, 24, 0.65) 100%);
  color: var(--aow-text);
  border-color: rgba(212, 175, 55, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 2px 10px rgba(0, 0, 0, 0.26);
}

.aow-btn--ghost:hover,
.aow-btn--ghost:focus-visible {
  border-color: var(--aow-border-gold);
  color: #f0e6c8;
  background: linear-gradient(180deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 18px rgba(0, 0, 0, 0.4),
    0 0 16px rgba(212, 175, 55, 0.14);
}

/* —— Feature grid —— */
.aow-section-head {
  margin: 2.5rem 0 1.25rem;
  text-align: center;
}

.aow-section-head__label {
  margin: 0;
  font-family: var(--aow-display);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--aow-muted);
}

.aow-section-head__label::before,
.aow-section-head__label::after {
  content: " · ";
  opacity: 0.7;
}

.aow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}

.aow-card {
  padding: 1.4rem 1.35rem;
  background: linear-gradient(165deg, var(--aow-surface-2) 0%, var(--aow-surface) 100%);
  border: 1px solid var(--aow-border);
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.25);
  position: relative;
}

.aow-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.08);
}

.aow-card h2 {
  margin: 0 0 0.65rem;
  font-family: var(--aow-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #eee9df;
}

.aow-card p {
  margin: 0;
  color: var(--aow-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* —— Inner pages —— */
.aow-page {
  padding-top: 2rem;
}

.aow-page--news {
  max-width: 38rem;
  margin: 0 auto;
}

.aow-page__title {
  margin: 0 0 1.75rem;
  font-family: var(--aow-display);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  color: #d5d0c8;
}

.aow-page__title--rule {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.aow-page p {
  color: var(--aow-muted);
  line-height: 1.7;
  max-width: 42rem;
}

.aow-page a {
  color: var(--aow-gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
}

.aow-page a:hover,
.aow-page a:focus-visible {
  color: #f0e6c8;
  border-bottom-color: var(--aow-gold);
}

.aow-legal p + p {
  margin-top: 0.85rem;
}

.aow-news {
  list-style: none;
  margin: 0;
  padding: 0;
}

.aow-news__item {
  padding: 1.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.aow-news__item:last-child {
  border-bottom: none;
}

.aow-news__date {
  display: block;
  font-family: var(--aow-display);
  font-size: 0.8rem;
  color: var(--aow-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.06em;
}

.aow-news__headline {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--aow-text);
  letter-spacing: 0.02em;
}

.aow-news__body {
  margin: 0;
  color: var(--aow-muted);
  line-height: 1.65;
  font-size: 0.92rem;
}

/* —— Footer —— */
.aow-footer {
  margin-top: auto;
  padding: 2rem 1.25rem;
  background: rgba(4, 6, 10, 0.85);
  border-top: 1px solid var(--aow-border);
}

.aow-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
}

.aow-footer p {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  line-height: 1.65;
  color: #6d7380;
  max-width: none;
}

.aow-footer p:last-child {
  margin-bottom: 0;
}

/* —— Under construction (single full-page) —— */
.aow-soon {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.aow-soon__inner {
  text-align: center;
  max-width: 28rem;
}

.aow-soon__kicker {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--aow-muted);
}

.aow-soon__title {
  margin: 0 0 1.25rem;
  font-family: var(--aow-display);
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff8e0 0%, var(--aow-gold) 42%, var(--aow-gold-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.aow-soon__msg {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--aow-text);
}

.aow-soon__sub {
  margin: 0;
  font-size: 0.92rem;
  color: var(--aow-muted);
  line-height: 1.55;
}

/* —— Homepage sections (news / features / guides / events / CTA) —— */
.aow-section {
  margin-top: 3.5rem;
  scroll-margin-top: 5rem;
}

.aow-section__head {
  text-align: center;
  margin-bottom: 1.5rem;
}

.aow-section__label {
  margin: 0 0 0.4rem;
  font-family: var(--aow-display);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--aow-gold);
}

.aow-section__label::before,
.aow-section__label::after {
  content: " · ";
  opacity: 0.6;
}

.aow-section__title {
  margin: 0;
  font-family: var(--aow-display);
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e5e0d6;
}

.aow-section__note {
  margin: 0.75rem auto 0;
  max-width: 34rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--aow-muted);
}

.aow-section__more {
  margin: 1.25rem 0 0;
  text-align: center;
}

.aow-section__more a {
  color: var(--aow-gold);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
  padding-bottom: 0.15rem;
}

.aow-section__more a:hover,
.aow-section__more a:focus-visible {
  color: #f0e6c8;
  border-bottom-color: var(--aow-gold);
}

/* News preview cards */
.aow-newsgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.1rem;
}

.aow-newscard {
  padding: 1.35rem 1.3rem;
  background: linear-gradient(165deg, var(--aow-surface-2) 0%, var(--aow-surface) 100%);
  border: 1px solid var(--aow-border);
  border-top: 2px solid var(--aow-border-gold);
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.25);
}

.aow-newscard__date {
  display: block;
  font-family: var(--aow-display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--aow-muted);
  margin-bottom: 0.45rem;
}

.aow-newscard__headline {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--aow-text);
}

.aow-newscard__excerpt {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--aow-muted);
}

/* Community features */
.aow-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
}

.aow-feature h3 {
  margin: 0 0 0.6rem;
  font-family: var(--aow-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #eee9df;
  padding-left: 0.85rem;
  position: relative;
}

.aow-feature h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 3px;
  background: linear-gradient(180deg, var(--aow-gold), var(--aow-gold-dim));
  border-radius: 1px;
}

/* Guides */
.aow-guides {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.1rem;
}

.aow-guide h3 {
  margin: 0 0 0.6rem;
  font-family: var(--aow-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #eee9df;
}

.aow-guide__meta {
  margin: 0 0 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.aow-guide__tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--aow-gold);
  border: 1px solid var(--aow-border-gold);
  border-radius: 2px;
  background: rgba(212, 175, 55, 0.06);
}

.aow-guide__status {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #6d7380;
}

/* Events */
.aow-eventlist {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 46rem;
  margin-inline: auto;
}

.aow-event {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 1.15rem 1.2rem;
  background: linear-gradient(165deg, var(--aow-surface-2) 0%, var(--aow-surface) 100%);
  border: 1px solid var(--aow-border);
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.25);
}

.aow-event + .aow-event {
  margin-top: 0.85rem;
}

.aow-event__day {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.1rem;
  padding: 0.5rem 0.4rem;
  font-family: var(--aow-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #1a1408;
  background: linear-gradient(145deg, #f0d78c 0%, var(--aow-gold) 40%, var(--aow-gold-dim) 100%);
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.aow-event__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--aow-text);
}

.aow-event__desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--aow-muted);
}

/* Call to action */
.aow-cta {
  padding: 2.75rem 1.5rem;
  text-align: center;
  background:
    linear-gradient(165deg, rgba(26, 36, 52, 0.9) 0%, rgba(20, 28, 40, 0.9) 100%);
  border: 1px solid var(--aow-border-gold);
  border-radius: 2px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 40px rgba(212, 175, 55, 0.07),
    0 12px 32px rgba(0, 0, 0, 0.35);
}

.aow-cta__inner {
  max-width: 36rem;
  margin: 0 auto;
}

.aow-cta__title {
  margin: 0 0 0.85rem;
  font-family: var(--aow-display);
  font-size: clamp(1.3rem, 3.5vw, 1.7rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff8e0 0%, var(--aow-gold) 42%, var(--aow-gold-dim) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.aow-cta__body {
  margin: 0 0 1.6rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #b8bcc8;
}

.aow-cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

/* —— Maintenance gate (cinematic full-page card) —— */
.aow-gate {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.25rem;
  padding: 2.5rem 1.25rem 1.75rem;
}

/* Jianghu announcement panel: translucent lacquer, thin gold frame, inner glow. */
.aow-gate__card {
  position: relative;
  width: 100%;
  max-width: 41rem;
  padding: clamp(1.7rem, 4.5vw, 2.7rem) clamp(1.4rem, 5vw, 2.9rem);
  text-align: center;
  background: linear-gradient(172deg, rgba(13, 20, 31, 0.72) 0%, rgba(7, 11, 18, 0.82) 100%);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 224, 0.06),
    inset 0 2px 24px rgba(0, 0, 0, 0.4),
    inset 0 0 40px rgba(212, 175, 55, 0.045),
    0 0 44px rgba(212, 175, 55, 0.07),
    0 22px 54px rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(12px) saturate(1.06);
  -webkit-backdrop-filter: blur(12px) saturate(1.06);
}

/*
 * Texture stack: fine silk weave + top gold sheen + base darkening + a very
 * light film-grain (inline SVG turbulence data-URI, allowed by img-src data:).
 * Kept low-opacity so body text stays perfectly legible.
 */
.aow-gate__card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E"),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.013) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.007) 0 1px, transparent 1px 4px),
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(212, 175, 55, 0.05), transparent 62%),
    radial-gradient(ellipse 90% 60% at 50% 100%, rgba(6, 9, 14, 0.32), transparent 60%);
  background-size: 120px 120px, auto, auto, auto, auto;
}

/* Inner hairline frame. */
.aow-gate__card::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(212, 175, 55, 0.16);
  border-radius: 2px;
  pointer-events: none;
}

/* Gold corner brackets sitting on the hairline frame. */
.aow-gate__corner {
  position: absolute;
  width: 1.35rem;
  height: 1.35rem;
  border: 0 solid rgba(212, 175, 55, 0.55);
  pointer-events: none;
  z-index: 1;
}

.aow-gate__corner--tl { top: 8px; left: 8px; border-top-width: 1px; border-left-width: 1px; }
.aow-gate__corner--tr { top: 8px; right: 8px; border-top-width: 1px; border-right-width: 1px; }
.aow-gate__corner--bl { bottom: 8px; left: 8px; border-bottom-width: 1px; border-left-width: 1px; }
.aow-gate__corner--br { bottom: 8px; right: 8px; border-bottom-width: 1px; border-right-width: 1px; }

/* Tiny gold diamond seal at each bracket elbow — subtle Jianghu ornament. */
.aow-gate__corner::after {
  content: "";
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--aow-gold-2);
  transform: rotate(45deg);
  opacity: 0.7;
}

.aow-gate__corner--tl::after { top: -1px; left: -1px; }
.aow-gate__corner--tr::after { top: -1px; right: -1px; }
.aow-gate__corner--bl::after { bottom: -1px; left: -1px; }
.aow-gate__corner--br::after { bottom: -1px; right: -1px; }

.aow-gate__crest {
  display: block;
  width: clamp(4.5rem, 15vw, 6.25rem);
  margin: 0 auto 0.85rem;
  filter:
    drop-shadow(0 3px 12px rgba(0, 0, 0, 0.55))
    drop-shadow(0 0 16px rgba(212, 175, 55, 0.15));
}

.aow-gate__crest img {
  display: block;
  width: 100%;
  height: auto;
}

/* Logo: majestic ancient-sect title. */
.aow-gate__brand {
  position: relative;
  margin: 0 0 0.55rem;
  font-family: var(--aow-font-logo);
  font-size: clamp(2.05rem, 6.4vw, 2.95rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-indent: 0.2em; /* recenters letter-spaced uppercase */
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--aow-gold-1) 0%, #f2cf74 34%, var(--aow-gold-2) 62%, var(--aow-gold-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.1))
    drop-shadow(0 5px 18px rgba(190, 139, 32, 0.26))
    drop-shadow(0 0 30px rgba(217, 168, 53, 0.14));
}

/* Tagline: poetic parchment italic. */
.aow-gate__tagline {
  position: relative;
  margin: 0;
  font-family: var(--aow-font-poetic);
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #d7d0c2;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

/* Gold divider with centered diamond seal. */
.aow-gate__rule {
  position: relative;
  width: 7rem;
  height: 1px;
  margin: 1.7rem auto;
  border: 0;
  overflow: visible;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.75), transparent);
}

.aow-gate__rule::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: linear-gradient(135deg, #f0d78c 0%, var(--aow-gold) 55%, var(--aow-gold-dim) 100%);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.55);
}

/* Main heading: ceremonial Jianghu announcement. */
.aow-gate__heading {
  position: relative;
  margin: 0 0 1.2rem;
  font-family: var(--aow-font-heading);
  font-size: clamp(1.15rem, 3.6vw, 1.48rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  text-transform: uppercase;
  color: #eee8dc;
  line-height: 1.28;
  text-shadow:
    0 2px 0 rgba(0, 0, 0, 0.5),
    0 0 18px rgba(230, 199, 120, 0.09);
}

/* Body: readable refined serif, soft grey. */
.aow-gate__line {
  position: relative;
  margin: 0 auto 0.95rem;
  max-width: 31rem;
  font-family: var(--aow-font-body);
  font-size: 0.98rem;
  font-weight: 400;
  line-height: 1.78;
  letter-spacing: 0.01em;
  color: var(--aow-text-soft);
}

.aow-gate__line:last-of-type {
  font-family: var(--aow-font-poetic);
  font-size: 1.12rem;
  font-style: italic;
  font-weight: 500;
  color: #e2dccd;
}

.aow-gate__status {
  position: relative;
  margin: 1.5rem 0 1.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 1.15rem;
  font-family: var(--aow-font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #e9c874;
  border: 1px solid var(--aow-border-gold);
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.07);
  box-shadow: inset 0 0 12px rgba(212, 175, 55, 0.07);
}

.aow-gate__status-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--aow-gold);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.7);
  animation: aow-gate-pulse 3.6s ease-in-out infinite;
}

/* Slow, refined breathing — opacity + a whisper of scale, never distracting. */
@keyframes aow-gate-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

.aow-gate__actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
}

.aow-gate__footer {
  text-align: center;
  max-width: 40rem;
}

.aow-gate__footer p {
  margin: 0 0 0.5rem;
  font-family: var(--aow-font-body);
  font-size: 0.82rem;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: #a6acb8;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75);
}

.aow-gate__footer-links a {
  color: #b6bcc7;
  text-decoration: none;
  border-bottom: 1px solid rgba(141, 147, 160, 0.35);
  padding-bottom: 0.1rem;
  transition: color 0.15s, border-color 0.15s;
}

.aow-gate__footer-links a:hover,
.aow-gate__footer-links a:focus-visible {
  color: var(--aow-gold);
  border-bottom-color: var(--aow-gold);
}

@media (max-width: 768px) {
  /* fixed attachment is unreliable / janky on mobile browsers */
  body.aow-body--gate {
    background-attachment: scroll;
  }
}

/* Short/laptop viewports: tighten vertical rhythm so the footer stays in view. */
@media (min-width: 561px) and (max-height: 820px) {
  .aow-gate {
    gap: 1.5rem;
    padding-top: 1.75rem;
    padding-bottom: 1.5rem;
  }

  .aow-gate__card {
    padding-top: clamp(1.5rem, 4vh, 2.25rem);
    padding-bottom: clamp(1.5rem, 4vh, 2.25rem);
  }

  .aow-gate__crest {
    margin-bottom: 0.85rem;
  }

  .aow-gate__rule {
    margin: 1.25rem auto;
  }

  .aow-gate__status {
    margin: 1.15rem 0 1.4rem;
  }
}

@media (max-width: 560px) {
  /* Side padding of 4vw makes the panel (width:100%) sit at ~92vw. */
  .aow-gate {
    padding: 2rem 4vw 1.5rem;
    gap: 1.75rem;
  }

  /* Smaller logo + eased tracking so it never crowds the card edges on phones. */
  .aow-gate__brand {
    font-size: clamp(1.7rem, 8vw, 2.1rem);
    letter-spacing: 0.14em;
    text-indent: 0.14em;
  }

  .aow-gate__heading {
    letter-spacing: 0.1em;
    text-indent: 0.1em;
  }

  .aow-gate__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .aow-gate__actions .aow-btn {
    width: 100%;
  }

  .aow-gate__line {
    font-size: 0.92rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  body.aow-body {
    background-attachment: scroll;
  }

  .aow-btn {
    transition: none;
  }

  .aow-btn:hover,
  .aow-btn:focus-visible {
    transform: none;
  }

  .aow-gate__status-dot {
    animation: none;
  }

  .aow-fx__mist,
  .aow-fx__motes,
  .aow-fx__glow {
    animation: none;
  }

  /* Reduced motion: never show the video; the static poster remains. */
  .aow-bg__video {
    display: none;
  }
}

/* On small screens, skip the video entirely — poster only (data/battery). */
@media (max-width: 768px) {
  .aow-bg__video {
    display: none;
  }
}
