@charset "UTF-8";
/*
 * NEA AION - atmosphere, depth and motion layer.
 * Loads after site.css / portal.css and upgrades the flat surfaces into
 * something that reads as a game site: layered light, grain, ember drift,
 * scroll reveals and hover physics. Everything here degrades to a static
 * page under prefers-reduced-motion.
 */

:root {
  --fx-ember: linear-gradient(135deg, #ff3d54 0%, #ff8a3d 48%, #ffcf7a 100%);
  --fx-gold-sheen: linear-gradient(100deg, transparent 20%, #ffe9c2aa 48%, transparent 76%);
  --fx-glow-gold: 0 0 0 1px #eac58833, 0 14px 40px -12px #eac58855;
  --fx-glow-cyan: 0 0 0 1px #87d6de33, 0 14px 40px -12px #87d6de55;
  --fx-lift: cubic-bezier(.2, .7, .3, 1);
}

/* ------------------------------------------------------------------ */
/* Global material: grain + vignette + breathing ambient light         */
/* ------------------------------------------------------------------ */

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* Film grain keeps the large dark fields from looking like flat paint. */
body::before {
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Corner vignette + a slow aurora that keeps the page feeling alive. */
body::after {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, #eac5880e, transparent 70%),
    radial-gradient(ellipse 60% 50% at 100% 30%, #87d6de0a, transparent 70%),
    radial-gradient(ellipse 60% 50% at 0% 70%, #ff3d540a, transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 50%, transparent 55%, #05080b99 100%);
}

@media (prefers-reduced-motion: no-preference) {
  body::after { animation: fx-ambient 22s ease-in-out infinite alternate; }
}

@keyframes fx-ambient {
  0% { opacity: .75; transform: translate3d(0, 0, 0) scale(1); }
  100% { opacity: 1; transform: translate3d(0, -1.5%, 0) scale(1.05); }
}

/* ------------------------------------------------------------------ */
/* Scroll reveal                                                       */
/* ------------------------------------------------------------------ */

/* Scoped to .js-fx (set by an inline script in the head) so a failed or
   blocked fx.js can never leave the page blank. */
@media (prefers-reduced-motion: no-preference) {
  .js-fx [data-reveal] {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
    transition:
      opacity .75s var(--fx-lift),
      transform .75s var(--fx-lift);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
  }

  .js-fx [data-reveal="left"] { transform: translate3d(-28px, 0, 0); }
  .js-fx [data-reveal="right"] { transform: translate3d(28px, 0, 0); }
  .js-fx [data-reveal="scale"] { transform: scale(.955); }

  .js-fx [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
  }
}

/* ------------------------------------------------------------------ */
/* Cinematic hero                                                      */
/* ------------------------------------------------------------------ */

.hero-cinematic {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(86vh, 800px);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.hero-stage {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

/* Layer 1: colour mesh */
.hero-aurora {
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(circle 40% at 22% 32%, #ff8a3d2e, transparent 60%),
    radial-gradient(circle 38% at 76% 26%, #87d6de24, transparent 62%),
    radial-gradient(circle 46% at 58% 82%, #c5abe820, transparent 64%),
    radial-gradient(circle 34% at 12% 78%, #ff3d5420, transparent 60%);
  filter: blur(38px);
}

/* Layer 2: drifting cartography grid */
.hero-grid-layer {
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(#bfa98014 1px, transparent 1px),
    linear-gradient(90deg, #bfa98014 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 45%, #000 20%, transparent 78%);
}

/* Layer 3: the map plate, pushed far back */
.hero-plate {
  position: absolute;
  inset: 0;
  background-image: url("../img/quest-maps/oasis.webp");
  background-size: cover;
  background-position: 62% 40%;
  opacity: .19;
  filter: saturate(.5) contrast(1.1);
  mask-image: linear-gradient(95deg, transparent 8%, #000 55%, transparent 96%);
  -webkit-mask-image: linear-gradient(95deg, transparent 8%, #000 55%, transparent 96%);
}

/* Layer 4: god rays */
.hero-rays {
  position: absolute;
  top: -40%;
  left: 50%;
  width: 150%;
  height: 160%;
  transform: translateX(-50%);
  background: repeating-conic-gradient(
    from 190deg at 50% 0%,
    #eac58800 0deg,
    #eac5880e 3deg,
    #eac58800 9deg
  );
  mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000 10%, transparent 72%);
  opacity: .8;
}

/* Layer 4b: oversized crest watermark anchoring the right side */
.hero-crest {
  position: absolute;
  top: 50%;
  right: -4%;
  width: min(46vw, 620px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  background: url("../img/notevenaion-left-logo.png") center / contain no-repeat;
  opacity: .07;
  filter: grayscale(.45) drop-shadow(0 0 60px #eac58833);
  mask-image: radial-gradient(circle at 50% 50%, #000 42%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 42%, transparent 72%);
}

.hero-crest::after {
  content: "";
  position: absolute;
  inset: 8%;
  border: 1px solid #eac58822;
  border-radius: 50%;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-crest { animation: fx-crest 26s ease-in-out infinite alternate; }
}

@keyframes fx-crest {
  0% { transform: translateY(-50%) rotate(-4deg) scale(1); opacity: .05; }
  100% { transform: translateY(-53%) rotate(4deg) scale(1.06); opacity: .1; }
}

/* Layer 5: floor glow + vignette */
.hero-floor {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 42% at 50% 104%, #ff8a3d1f, transparent 70%),
    linear-gradient(180deg, #0c1015cc 0%, transparent 26%, transparent 62%, #0c1015 100%);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-aurora { animation: fx-aurora 26s ease-in-out infinite alternate; }
  .hero-grid-layer { animation: fx-grid 60s linear infinite; }
  .hero-rays { animation: fx-rays 34s ease-in-out infinite alternate; }
}

@keyframes fx-aurora {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); }
  50% { transform: translate3d(2%, 2%, 0) scale(1.08); }
  100% { transform: translate3d(-1%, 1%, 0) scale(1.03); }
}

@keyframes fx-grid {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 54px 54px, 54px 54px; }
}

@keyframes fx-rays {
  0% { opacity: .45; transform: translateX(-50%) rotate(-3deg); }
  100% { opacity: .95; transform: translateX(-50%) rotate(3deg); }
}

/* Parallax offsets written by fx.js. */
.hero-aurora,
.hero-plate,
.hero-grid-layer {
  transform-origin: center;
}

/* Uses the standalone `translate` property, not `transform`, so pointer
   parallax composes with the drift/float animations instead of fighting
   them for the same declaration. */
.hero-parallax {
  translate:
    calc(var(--px, 0) * var(--depth, 1) * 1px)
    calc(var(--py, 0) * var(--depth, 1) * 1px);
  transition: translate .5s cubic-bezier(.2, .7, .3, 1);
}

/* Ember particles ------------------------------------------------- */

.ember-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.ember {
  position: absolute;
  bottom: -20px;
  width: var(--size, 3px);
  height: var(--size, 3px);
  border-radius: 50%;
  background: var(--ember-color, #ffb15e);
  box-shadow: 0 0 8px 1px var(--ember-color, #ffb15e);
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .ember {
    animation: fx-ember-rise var(--dur, 12s) linear var(--delay, 0s) infinite;
  }
}

@keyframes fx-ember-rise {
  0% { opacity: 0; transform: translate3d(0, 0, 0) scale(.6); }
  12% { opacity: var(--peak, .8); }
  70% { opacity: var(--peak, .8); }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift, 30px), calc(var(--rise, 70vh) * -1), 0) scale(1.15);
  }
}

/* Hero content ---------------------------------------------------- */

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: var(--shell);
  margin: 0 auto;
  width: 100%;
  padding: 76px var(--gutter) 84px;
}

.hero-lede { max-width: 760px; }

/* Masthead with a slow light sweep across the gold. */
.hero-mark {
  position: relative;
  display: inline-block;
  margin: 22px 0 10px -8px;
  max-width: min(520px, 100%);
}

.hero-mark img {
  display: block;
  width: 100%;
  filter: drop-shadow(0 18px 46px #00000099) drop-shadow(0 0 28px #eac5881f);
}

.hero-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fx-gold-sheen);
  mix-blend-mode: overlay;
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-mark::after { animation: fx-sweep 7s ease-in-out 1.2s infinite; }
}

@keyframes fx-sweep {
  0%, 62% { opacity: 0; transform: translateX(-60%) skewX(-12deg); }
  70% { opacity: 1; }
  86% { opacity: 0; transform: translateX(60%) skewX(-12deg); }
  100% { opacity: 0; transform: translateX(60%) skewX(-12deg); }
}

.hero-cinematic h1 {
  font-size: clamp(44px, 6.2vw, 92px);
  font-weight: 600;
  letter-spacing: -.05em;
  line-height: .98;
  margin: 14px 0 30px;
}

.hero-cinematic h1 em {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(100deg, #ffe7b8 0%, #eac588 26%, #ffb45c 52%, #ff8a3d 70%, #ffe7b8 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* The gradient run is not word-split (see fx.js), so it fades in as one
   unit just after the split words have landed. */
@media (prefers-reduced-motion: no-preference) {
  .js-fx .hero-cinematic h1 em {
    animation:
      fx-em-in .85s var(--fx-lift) .42s backwards,
      fx-gold-flow 9s ease-in-out infinite;
  }
}

@keyframes fx-em-in {
  from { opacity: 0; transform: translate3d(0, .45em, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes fx-gold-flow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Word-by-word entrance. */
@media (prefers-reduced-motion: no-preference) {
  .js-fx .hero-cinematic h1 .word {
    display: inline-block;
    opacity: 0;
    transform: translate3d(0, .5em, 0) rotate(1.4deg);
    animation: fx-word-in .85s var(--fx-lift) forwards;
    animation-delay: calc(var(--i, 0) * 85ms + 150ms);
  }
}

@keyframes fx-word-in {
  to { opacity: 1; transform: none; }
}

.hero-cinematic .hero-description {
  font-size: 15px;
  max-width: 540px;
  color: #b9c5d0;
}

.hero-cinematic .hero-actions { margin-top: 32px; gap: 14px; }

/* Stats become a bordered plinth. */
.hero-plinth {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 44px;
  border: 1px solid var(--line);
  background: #0b1016a6;
  backdrop-filter: blur(8px);
  max-width: 720px;
}

.hero-plinth > div {
  flex: 1 1 150px;
  padding: 16px 20px;
  min-width: 0;
}

.hero-plinth > div + div { border-left: 1px solid var(--line); }

.hero-plinth strong {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Direct child only: the count-up value lives in its own span inside
   <strong> and must not pick up the label styling. */
.hero-plinth > div > span {
  display: block;
  margin-top: 5px;
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Scroll cue ------------------------------------------------------ */

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 1;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 8px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted-dim);
}

.scroll-cue i {
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, transparent, var(--gold));
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-cue i { animation: fx-cue 2.4s ease-in-out infinite; transform-origin: top; }
}

@keyframes fx-cue {
  0%, 100% { transform: scaleY(.35); opacity: .35; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ------------------------------------------------------------------ */
/* Depth: panels, cards, buttons                                       */
/* ------------------------------------------------------------------ */

.panel,
.card,
.news-card,
.signal-panel,
.shop-app {
  position: relative;
}

/* A one-pixel top highlight reads as a bevel and lifts flat surfaces. */
.panel::after,
.signal-panel::after,
.shop-app::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ffffff1c 30%, #ffffff1c 70%, transparent);
  pointer-events: none;
}

.panel,
.signal-panel {
  background-image: linear-gradient(170deg, #ffffff06, transparent 42%);
  box-shadow: 0 22px 50px -30px #000000cc;
}

/* Cards get real hover physics. */
.card {
  transition:
    border-color .28s var(--fx-lift),
    box-shadow .34s var(--fx-lift),
    transform .34s var(--fx-lift),
    background .28s;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .34s;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 0%),
    #eac5880f,
    transparent 62%
  );
}

.card:hover,
.card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 28px 56px -28px #000, 0 0 0 1px var(--edge, var(--gold));
}

.card:hover::after { opacity: 1; }

.card::before { transition: width .34s var(--fx-lift), box-shadow .34s; }
.card:hover::before { width: 86px; box-shadow: 0 0 18px var(--edge, var(--gold)); }

/* News cards are injected after the feed resolves, so they animate in on
   insertion rather than through the IntersectionObserver. */
@media (prefers-reduced-motion: no-preference) {
  /* "backwards" (not "both") so the finished animation does not pin
     transform and swallow the hover lift below. */
  .news-card { animation: fx-card-in .6s var(--fx-lift) backwards; }
  .news-card:nth-child(2) { animation-delay: .07s; }
  .news-card:nth-child(3) { animation-delay: .14s; }
  .news-card:nth-child(4) { animation-delay: .21s; }
}

@keyframes fx-card-in {
  from { opacity: 0; transform: translate3d(0, 20px, 0); }
  to { opacity: 1; transform: none; }
}

/* News cards lift and warm on hover. */
.news-card {
  transition:
    border-color .28s var(--fx-lift),
    transform .34s var(--fx-lift),
    box-shadow .34s var(--fx-lift);
}

.news-card:hover,
.news-card:focus-within {
  transform: translateY(-5px);
  box-shadow: 0 30px 58px -30px #000;
}

.news-card::before { transition: width .34s var(--fx-lift), box-shadow .34s; }
.news-card:hover::before { width: 100%; box-shadow: 0 0 16px var(--tone); }

/* Primary buttons: gold with a travelling sheen. */
.button.primary,
.cta-button {
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 26px -12px #eac58877;
  transition:
    background .2s,
    border-color .2s,
    transform .2s var(--fx-lift),
    box-shadow .3s var(--fx-lift);
}

.button.primary::after,
.cta-button::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -70%;
  width: 55%;
  background: linear-gradient(100deg, transparent, #ffffffb0, transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .button.primary::after,
  .cta-button::after { animation: fx-btn-sheen 5.5s ease-in-out infinite; }
}

@keyframes fx-btn-sheen {
  0%, 72% { left: -70%; }
  92%, 100% { left: 130%; }
}

.button.primary:hover,
.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -12px #eac588aa;
}

.button.primary:active,
.cta-button:active { transform: translateY(0); }

.button.outline,
.ghost-button,
.button.cyan {
  position: relative;
  transition:
    background .2s,
    border-color .2s,
    color .2s,
    transform .2s var(--fx-lift),
    box-shadow .3s;
}

.button.outline:hover,
.ghost-button:hover { transform: translateY(-2px); box-shadow: var(--fx-glow-gold); }
.button.cyan:hover { transform: translateY(-2px); box-shadow: var(--fx-glow-cyan); }

/* ------------------------------------------------------------------ */
/* Top bar                                                             */
/* ------------------------------------------------------------------ */

.site-topbar {
  transition: padding .3s var(--fx-lift), background .3s, box-shadow .3s;
}

.site-topbar.is-stuck {
  background: #080c11f7;
  box-shadow: 0 14px 34px -22px #000, inset 0 -1px 0 #eac58822;
}

.site-topbar.is-stuck .site-topbar-inner { padding-top: 10px; padding-bottom: 10px; }
.site-topbar.is-stuck .brand img { width: 34px; height: 34px; }

.site-topbar-inner,
.brand img { transition: all .3s var(--fx-lift); }

/* Animated nav underline. */
.site-nav a:not(.account-link)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .3s var(--fx-lift);
}

.site-nav a:not(.account-link):hover::after,
.site-nav a.active::after { transform: scaleX(1); transform-origin: left; }
.site-nav a.active { border-bottom: 0; }

.site-nav .account-link { position: relative; overflow: hidden; }

.site-nav .account-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fx-gold-sheen);
  opacity: 0;
  transform: translateX(-100%);
  transition: transform .6s var(--fx-lift), opacity .3s;
}

.site-nav .account-link:hover::after { opacity: .5; transform: translateX(100%); }

.brand img { transition: transform .4s var(--fx-lift), filter .4s; }
.brand:hover img { transform: rotate(-6deg) scale(1.08); filter: drop-shadow(0 0 14px #eac58866); }

/* ------------------------------------------------------------------ */
/* Faction showcase                                                    */
/* ------------------------------------------------------------------ */

.faction-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.faction-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 330px;
  padding: 30px;
  border: 1px solid var(--line);
  --f1: #eac588;
  --f2: #ff8a3d;
  transition: border-color .4s, transform .5s var(--fx-lift), box-shadow .5s;
}

.faction-card.asmodian { --f1: #c5abe8; --f2: #6f5bd6; }

.faction-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  /* Fallback first for engines without color-mix(); the richer stack
     below simply replaces it where supported. */
  background: linear-gradient(165deg, #1b242e, #0d1319);
  background:
    radial-gradient(ellipse 95% 72% at 50% 118%, color-mix(in srgb, var(--f2) 55%, transparent), transparent 68%),
    radial-gradient(ellipse 72% 62% at 18% -12%, color-mix(in srgb, var(--f1) 34%, transparent), transparent 64%),
    linear-gradient(165deg, #1a232c, #0b1016);
  transition: transform .8s var(--fx-lift);
}

.faction-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(color-mix(in srgb, var(--f1) 10%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--f1) 10%, transparent) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(0deg, #000, transparent 75%);
  -webkit-mask-image: linear-gradient(0deg, #000, transparent 75%);
  opacity: .55;
}

.faction-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--f1) 55%, transparent);
  box-shadow: 0 34px 70px -34px #000;
}

.faction-card:hover::before { transform: scale(1.08); }

/* A thin halo ring, not a filled disc - a disc reads as a grey blob
   sitting on top of the panel. */
.faction-sigil {
  position: absolute;
  top: -70px;
  right: -70px;
  z-index: -1;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--f1) 30%, transparent);
  box-shadow:
    inset 0 0 60px color-mix(in srgb, var(--f1) 16%, transparent),
    0 0 80px color-mix(in srgb, var(--f1) 12%, transparent);
  transition: transform .8s var(--fx-lift);
}

.faction-sigil::after {
  content: "";
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  border: 1px dashed color-mix(in srgb, var(--f1) 18%, transparent);
}

.faction-card:hover .faction-sigil { transform: scale(1.12) rotate(18deg); }

.faction-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--f1);
}

.faction-card h3 {
  font-family: var(--serif);
  text-shadow: 0 2px 26px color-mix(in srgb, var(--f1) 40%, transparent);
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 400;
  line-height: 1.05;
  margin: 12px 0 14px;
  color: #fff;
}

.faction-card p {
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--muted);
  max-width: 420px;
}

.faction-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.faction-traits span {
  padding: 6px 11px;
  border: 1px solid color-mix(in srgb, var(--f1) 26%, transparent);
  background: color-mix(in srgb, var(--f1) 7%, transparent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--f1);
}

/* ------------------------------------------------------------------ */
/* Section headings                                                    */
/* ------------------------------------------------------------------ */

.section-head h2 { position: relative; }

.section-head h2 span {
  display: inline-block;
  background: var(--fx-ember);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Diagonal rule under major sections. */
.fx-divider {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--line) 12%, var(--line) 88%, transparent);
  position: relative;
}

.fx-divider::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  width: 5px;
  height: 5px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 14px #eac588aa;
}

/* ------------------------------------------------------------------ */
/* Leaderboards                                                        */
/* ------------------------------------------------------------------ */

.ranking-row {
  position: relative;
  transition: background .25s, transform .25s var(--fx-lift);
}

.ranking-row:hover {
  background: #ffffff05;
  transform: translateX(3px);
}

.ranking-placement span { transition: box-shadow .3s, transform .3s var(--fx-lift); }
.ranking-row:hover .ranking-placement span { transform: scale(1.08); }

/* Podium glow for the top three. */
.ranking-row:nth-child(1) .ranking-placement span { box-shadow: 0 0 18px -2px #eac58899; }
.ranking-row:nth-child(2) .ranking-placement span { box-shadow: 0 0 16px -3px #d3dce477; }
.ranking-row:nth-child(3) .ranking-placement span { box-shadow: 0 0 16px -3px #d09a6377; }

/* The leader's row carries a slow travelling shine. */
.ranking-row:nth-child(1)::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 35%, #eac5881f 50%, transparent 65%);
  background-size: 220% 100%;
}

@media (prefers-reduced-motion: no-preference) {
  .ranking-row:nth-child(1)::after { animation: fx-row-shine 6s ease-in-out infinite; }
}

@keyframes fx-row-shine {
  0%, 60% { background-position: 200% 0; }
  100% { background-position: -60% 0; }
}

/* Relative-strength track under each leaderboard name. */
.ranking-bar {
  position: relative;
  height: 3px;
  margin-top: 7px;
  background: #ffffff0d;
  overflow: hidden;
}

.ranking-bar > span {
  display: block;
  height: 100%;
  background: var(--fx-ember);
  box-shadow: 0 0 12px -2px #ff8a3daa;
  transform-origin: left;
}

@media (prefers-reduced-motion: no-preference) {
  .ranking-bar > span { animation: fx-bar-grow 1.1s var(--fx-lift) backwards; }
}

@keyframes fx-bar-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Podium rows get the gold treatment, the rest stay cool. */
.ranking-row:nth-child(n + 4) .ranking-bar > span {
  background: linear-gradient(90deg, #4b7f93, #87d6de);
  box-shadow: 0 0 12px -3px #87d6de88;
}

.pvp-rank-badge { transition: box-shadow .3s, transform .3s var(--fx-lift); }
.ranking-row:hover .pvp-rank-badge {
  transform: translateY(-1px);
  box-shadow: 0 0 20px -6px var(--badge);
}

/* ------------------------------------------------------------------ */
/* Shop                                                                */
/* ------------------------------------------------------------------ */

.shop-card {
  position: relative;
  overflow: hidden;
  transition:
    border-color .26s,
    background .26s,
    transform .28s var(--fx-lift),
    box-shadow .3s var(--fx-lift);
}

.shop-card::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 30%, #eac5881a, transparent 62%);
  transition: opacity .3s;
}

.shop-card:hover { box-shadow: 0 20px 40px -22px #000, 0 0 0 1px #eac58844; }
.shop-card:hover::after,
.shop-card.is-active::after { opacity: 1; }

.shop-card-icon { transition: transform .32s var(--fx-lift), filter .32s; }
.shop-card:hover .shop-card-icon {
  transform: scale(1.12) translateY(-2px);
  filter: drop-shadow(0 8px 16px #000) drop-shadow(0 0 12px #eac58866);
}

.shop-detail-icon-frame { position: relative; overflow: hidden; }

.shop-detail-icon-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(from 0deg, transparent, #eac58814, transparent 42%);
}

@media (prefers-reduced-motion: no-preference) {
  .shop-detail-icon-frame::after { animation: fx-spin 9s linear infinite; }
  .shop-detail-icon { animation: fx-bob 4.5s ease-in-out infinite; }
}

@keyframes fx-spin { to { transform: rotate(1turn); } }

@keyframes fx-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.shop-sidebar-item { transition: color .2s, background .2s, padding-left .25s var(--fx-lift); }
.shop-sidebar-item:hover { padding-left: 22px; }

/* ------------------------------------------------------------------ */
/* Page hero (interior pages) gets a lighter version of the stage      */
/* ------------------------------------------------------------------ */

.page-hero { isolation: isolate; }

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 120% at 8% 50%, #eac5880f, transparent 65%),
    radial-gradient(ellipse 40% 100% at 92% 20%, #87d6de0a, transparent 66%);
}

@media (prefers-reduced-motion: no-preference) {
  .page-hero::after { animation: fx-ambient 18s ease-in-out infinite alternate; }
}

.page-hero h1 em {
  background: linear-gradient(100deg, #f7e2ba, #eac588 42%, #ff9c4d 70%, #f7e2ba);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (prefers-reduced-motion: no-preference) {
  .page-hero h1 em { animation: fx-gold-flow 9s ease-in-out infinite; }
}

/* ------------------------------------------------------------------ */
/* Route + info tiles                                                  */
/* ------------------------------------------------------------------ */

.route-card-foot .q-icon { transition: transform .3s var(--fx-lift); }
.route-card:hover .route-card-foot .q-icon { transform: translateX(6px); }

.route-link { position: relative; transition: background .22s, padding-left .28s var(--fx-lift); }
.route-link:hover { padding-left: 24px; }

.route-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gold);
  transform: scaleY(0);
  transition: transform .28s var(--fx-lift);
}

.route-link:hover::before { transform: scaleY(1); }

/* Modal entrance --------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .portal-backdrop:not([hidden]) { animation: fx-fade .3s ease both; }
  .portal-shell:not([hidden]) { animation: fx-modal-in .42s var(--fx-lift) both; }
}

@keyframes fx-fade { from { opacity: 0; } to { opacity: 1; } }

@keyframes fx-modal-in {
  from { opacity: 0; transform: translate(-50%, -46%) scale(.97); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */

@media (max-width: 1000px) {
  .faction-split { grid-template-columns: 1fr; }
  .faction-card { min-height: 300px; }
}

@media (max-width: 720px) {
  .hero-cinematic { min-height: 0; }
  .hero-inner { padding: 54px var(--gutter) 64px; }
  .hero-cinematic h1 { font-size: clamp(38px, 11vw, 56px); }
  .hero-mark { margin-left: 0; max-width: 100%; }
  .hero-plinth > div { flex: 1 1 100%; }
  .hero-plinth > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .hero-plinth strong { font-size: 26px; }
  .scroll-cue { display: none; }
  .faction-card { padding: 24px; min-height: 260px; }
  /* Touch devices never hover: drop the lift so nothing feels stuck. */
  .card:hover,
  .news-card:hover,
  .faction-card:hover,
  .shop-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mark::after,
  .ranking-row:nth-child(1)::after,
  .button.primary::after,
  .cta-button::after { display: none; }
}
