/* ============================================================================
   DIVINE X - HOMEPAGE (v2, 2026-08-15)
   ============================================================================
   Rebuilt to the owner's mockup: dark teal-black page, gold headings, a
   full-bleed status/competitions banner, a video + pitch row, a purple
   content-creator block, a feature tile strip, and a closing CTA band.

   Replaces the old homepage, which layered three visual languages on one page
   (tropical sunset hero, dark gold competitions banner, parchment panels) and
   led with a launch countdown that had already expired.

   LOAD ORDER MATTERS. header.php emits, in this order:
       cosmic-theme.css -> codex.css -> $extraStyles -> launch-theme.css
   ...and launch-theme.css forces dark text onto .osrs-panel/.parchment. This
   file is linked AFTER that one, which is why none of the rules below need
   !important - the old inline <style> block had to spray it everywhere.

   Everything is scoped under .home-v2 so no other page is affected.

   ARTWORK SLOTS: the banner's left/right art panels are driven by the
   --art-left / --art-right custom properties near the top of .dx-banner.
   Drop images into images/ and point those at them; until then they render
   as a clean gradient. Do NOT use official Jagex artwork here.
   ---------------------------------------------------------------------- */

.home-v2 {
  --gold:       #e0a83c;
  --gold-lt:    #f2c76b;
  --gold-dk:    #b07f22;
  --teal:       #2ec4b6;
  --teal-lt:    #5fe0d2;
  --purple:     #a78bfa;
  --purple-dk:  #7c5cf0;
  --green:      #4ade80;

  --ink:        #071012;
  --surface:    #0d2024;
  --surface-2:  #102a2e;
  --line:       rgba(46, 196, 182, .16);
  --line-gold:  rgba(224, 168, 60, .32);
  --text:       #dcebe9;
  --dim:        #96b0ae;

  color: var(--text);
  padding-bottom: 0;
}

.home-v2 .dx-wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* Shared card surface */
.home-v2 .dx-card {
  border-radius: 10px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--line);
}

/* Section heading: CINZEL uppercase, accent word coloured via <em>. */
.home-v2 .dx-title {
  margin: 0 0 18px;
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.16;
}
.home-v2 .dx-title em { font-style: normal; color: var(--gold); }
.home-v2 .dx-title em.p { color: var(--purple); }

.home-v2 p { line-height: 1.68; }

/* ---------------------------------------------------------------- BUTTONS */
.home-v2 .dx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s cubic-bezier(.2,.8,.3,1), box-shadow .18s, filter .18s;
}
.home-v2 .dx-btn-gold {
  color: #23180a;
  background: linear-gradient(180deg, var(--gold-lt) 0%, var(--gold) 55%, var(--gold-dk) 100%);
  box-shadow: 0 6px 18px rgba(224, 168, 60, .3);
}
.home-v2 .dx-btn-purple {
  color: #fff;
  background: linear-gradient(180deg, var(--purple) 0%, var(--purple-dk) 100%);
  box-shadow: 0 6px 18px rgba(124, 92, 240, .34);
}
.home-v2 .dx-btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .16);
}
.home-v2 .dx-btn:hover { transform: translateY(-2px); filter: brightness(1.07); }
.home-v2 .dx-btn-ghost:hover { border-color: var(--teal); color: #fff; }

/* ===================================================================== BANNER
   Full-bleed strip. 100vw pull-out works regardless of the parent's width
   because the margin is calculated from the viewport, not the container. */
.home-v2 .dx-banner {
  --art-left:  none;
  --art-right: none;

  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-bottom: 34px;
  padding: 30px 0;
  background: linear-gradient(180deg, #0a1a1d 0%, #081416 100%);
  border-top: 1px solid rgba(224, 168, 60, .18);
  border-bottom: 1px solid rgba(224, 168, 60, .18);
  overflow: hidden;
}
/* Side artwork panels. They fade into the background so a hard image edge
   never shows, and they sit behind the cards at all times. */
.home-v2 .dx-banner::before,
.home-v2 .dx-banner::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 22%;
  background-size: cover;
  background-position: center;
  pointer-events: none;
  z-index: 0;
}
.home-v2 .dx-banner::before {
  left: 0;
  background-image: var(--art-left);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, transparent 100%);
          mask-image: linear-gradient(90deg, #000 0%, transparent 100%);
}
.home-v2 .dx-banner::after {
  right: 0;
  background-image: var(--art-right);
  -webkit-mask-image: linear-gradient(270deg, #000 0%, transparent 100%);
          mask-image: linear-gradient(270deg, #000 0%, transparent 100%);
}
@media (max-width: 900px) {
  .home-v2 .dx-banner::before, .home-v2 .dx-banner::after { display: none; }
}

.home-v2 .dx-banner-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 18px;
  align-items: stretch;
}
@media (max-width: 860px) { .home-v2 .dx-banner-grid { grid-template-columns: 1fr; } }

/* --- LIVE card --- */
.home-v2 .dx-live {
  padding: 26px 24px;
  text-align: center;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(18, 46, 50, .92), rgba(11, 30, 33, .92));
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.home-v2 .dx-live h2 {
  display: flex; align-items: center; gap: 11px;
  margin: 0 0 10px;
  font-family: "Cinzel", serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--gold);
}
.home-v2 .dx-live h2 i { color: var(--green); font-size: .85em; }
.home-v2 .dx-live p { margin: 0 0 18px; font-size: 13.5px; color: var(--dim); }
/* Offline state - flipped by JS, so the card can never claim the world is up
   while the API says it is down. */
.home-v2 .dx-live.is-down h2 { color: #ff8f8f; }
.home-v2 .dx-live.is-down h2 i { color: #ff5a5a; }

/* --- Competitions card --- */
.home-v2 .dx-comp {
  display: block;
  position: relative;
  overflow: hidden;
  padding: 24px 28px;
  border-radius: 10px;
  text-decoration: none;
  background:
    radial-gradient(560px 220px at 22% 30%, rgba(224, 168, 60, .12), transparent 70%),
    linear-gradient(180deg, rgba(24, 32, 22, .95), rgba(12, 24, 26, .95));
  border: 1px solid var(--line-gold);
  transition: transform .2s cubic-bezier(.2,.8,.3,1), border-color .2s, box-shadow .2s;
}
.home-v2 .dx-comp:hover {
  transform: translateY(-3px);
  border-color: rgba(224, 168, 60, .7);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
}
.home-v2 .dx-badge {
  display: inline-block;
  padding: 5px 13px;
  margin-bottom: 11px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #23180a;
  background: linear-gradient(135deg, var(--gold-lt), var(--gold-dk));
}
.home-v2 .dx-comp h3 {
  margin: 0 0 9px;
  font-family: "Cinzel", serif;
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  text-transform: uppercase;
  color: #fff;
  line-height: 1.2;
}
.home-v2 .dx-comp h3 b { color: var(--gold); }
.home-v2 .dx-comp p { margin: 0 0 13px; font-size: 13px; color: var(--dim); max-width: 60ch; }
.home-v2 .dx-comp .go {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--teal-lt);
  transition: gap .2s;
}
.home-v2 .dx-comp:hover .go { gap: 14px; }

/* ================================================================ FIGHT ROW */
.home-v2 .dx-fight {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 34px;
  align-items: center;
  padding: 30px 32px;
  margin-bottom: 26px;
}
@media (max-width: 950px) { .home-v2 .dx-fight { grid-template-columns: 1fr; gap: 26px; } }

/* 16:9 via padding-bottom: the wrapper has zero height and its padding scales
   off WIDTH, so the frame holds ratio at every breakpoint. aspect-ratio is
   tidier but still wants a fallback on older mobile browsers. */
.home-v2 .dx-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.home-v2 .dx-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.home-v2 .dx-fight p { margin: 0 0 13px; font-size: 14px; color: var(--dim); }
.home-v2 .dx-fight .accent { color: var(--teal-lt); font-weight: 600; }

/* Small gold rule under the heading, as in the mockup. */
.home-v2 .dx-rule {
  display: flex; align-items: center; gap: 10px;
  margin: -8px 0 18px;
}
.home-v2 .dx-rule::before,
.home-v2 .dx-rule::after { content: ""; height: 1px; background: var(--line-gold); }
.home-v2 .dx-rule::before { width: 46px; }
.home-v2 .dx-rule::after  { flex: 1; }
.home-v2 .dx-rule i { color: var(--gold); font-size: 9px; }

/* ================================================================= CREATORS */
.home-v2 .dx-creators {
  display: grid;
  grid-template-columns: .8fr 1.6fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 30px 32px;
  margin-bottom: 26px;
  background:
    radial-gradient(600px 300px at 12% 50%, rgba(167, 139, 250, .1), transparent 68%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid rgba(167, 139, 250, .2);
  border-radius: 10px;
}
@media (max-width: 1020px) {
  .home-v2 .dx-creators { grid-template-columns: 1fr; gap: 24px; }
  .home-v2 .dx-creator-art { display: none; }
}

/* Line-art camera badge, drawn in CSS so it needs no asset. */
.home-v2 .dx-creator-art {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 14px;
  border: 2px solid rgba(167, 139, 250, .38);
  background: radial-gradient(circle at 50% 40%, rgba(167, 139, 250, .13), transparent 70%);
  color: var(--purple);
  font-size: 62px;
  box-shadow: inset 0 0 40px rgba(167, 139, 250, .12);
}

.home-v2 .dx-creators p { margin: 0 0 12px; font-size: 13.4px; color: var(--dim); }
.home-v2 .dx-benefits-label {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text);
}
.home-v2 .dx-benefits { list-style: none; margin: 0; padding: 0; }
.home-v2 .dx-benefits li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 5px 0;
  font-size: 13.2px;
  color: var(--dim);
}
.home-v2 .dx-benefits i { color: var(--green); font-size: 13px; margin-top: 3px; flex: none; }

.home-v2 .dx-interested {
  text-align: center;
  padding: 24px 20px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .3);
  border: 1px solid rgba(167, 139, 250, .3);
}
.home-v2 .dx-interested .disc {
  width: 44px; height: 44px;
  margin: 0 auto 12px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 21px; color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--purple-dk));
}
.home-v2 .dx-interested h4 {
  margin: 0 0 9px;
  font-family: "Cinzel", serif;
  font-size: 17px;
  text-transform: uppercase;
  color: #fff;
}
.home-v2 .dx-interested p { margin: 0 0 16px; font-size: 12.8px; color: var(--dim); }

/* ============================================================ FEATURE TILES */
.home-v2 .dx-tiles {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 34px;
}
@media (max-width: 1020px) { .home-v2 .dx-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .home-v2 .dx-tiles { grid-template-columns: 1fr; } }

.home-v2 .dx-tile {
  display: flex;
  gap: 12px;
  padding: 16px 15px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  transition: transform .16s, border-color .2s;
}
.home-v2 .dx-tile:hover { transform: translateY(-3px); border-color: rgba(46, 196, 182, .45); }
.home-v2 .dx-tile > i { font-size: 20px; color: var(--teal); margin-top: 2px; flex: none; }
.home-v2 .dx-tile.gold > i { color: var(--gold); }
.home-v2 .dx-tile h5 {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal-lt);
}
.home-v2 .dx-tile.gold h5 { color: var(--gold-lt); }
.home-v2 .dx-tile p { margin: 0; font-size: 12.2px; line-height: 1.5; color: var(--dim); }

/* ================================================== LIVE FEED + TOP VOTERS */
.home-v2 .dx-split { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; margin-bottom: 34px; }
@media (max-width: 950px) { .home-v2 .dx-split { grid-template-columns: 1fr; } }
.home-v2 .dx-pad { padding: 22px 24px; }
.home-v2 .dx-sub-head {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 14px;
  font-family: "Cinzel", serif;
  font-size: 12px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold);
}

/* The feed JS writes .line/.ts/.name/.msg-* markup - those class names are
   load-bearing. Restyle them, never rename them. */
.home-v2 .chatbox {
  height: 290px; max-height: 290px; overflow-y: auto;
  padding: 13px 15px;
  border-radius: 7px;
  background: rgba(0, 0, 0, .36);
  border: 1px solid rgba(255, 255, 255, .06);
  font-family: "Courier New", monospace;
  font-size: 12.5px;
  line-height: 1.66;
}
.home-v2 .chatbox .line { margin: 2px 0; text-shadow: none; }
.home-v2 .chatbox .ts { color: #5c7a79; margin-right: 6px; }
.home-v2 .chatbox .name { color: var(--teal-lt); font-weight: 700; margin-right: 5px; }
.home-v2 .chatbox .name.system { color: var(--gold); }
.home-v2 .chatbox .msg-yellow { color: #f2d98a; }
.home-v2 .chatbox .msg-orange { color: #ffb27a; }
.home-v2 .chatbox .msg-cyan   { color: #8ee3ff; }
.home-v2 .chatbox .msg-green  { color: #8fe6a4; }
.home-v2 .chatbox .msg-red    { color: #ff9a9a; }
.home-v2 .chatbox::-webkit-scrollbar { width: 8px; }
.home-v2 .chatbox::-webkit-scrollbar-track { background: rgba(0,0,0,.3); border-radius: 8px; }
.home-v2 .chatbox::-webkit-scrollbar-thumb { background: rgba(46,196,182,.3); border-radius: 8px; }
.home-v2 .chatbox::-webkit-scrollbar-thumb:hover { background: rgba(46,196,182,.55); }

.home-v2 .dx-voters { list-style: none; margin: 0; padding: 0; }
.home-v2 .dx-voters li {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 7px; font-size: 13.5px;
}
.home-v2 .dx-voters li + li { margin-top: 5px; }
.home-v2 .dx-voters li:nth-child(odd) { background: rgba(255, 255, 255, .035); }
.home-v2 .dx-voters .pos {
  width: 23px; height: 23px; flex: none;
  border-radius: 6px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 800;
  color: var(--dim); background: rgba(255, 255, 255, .07);
}
.home-v2 .dx-voters li:nth-child(1) .pos { color: #23180a; background: linear-gradient(135deg, var(--gold-lt), var(--gold-dk)); }
.home-v2 .dx-voters li:nth-child(2) .pos { color: #101f1e; background: linear-gradient(135deg, #dceae8, #93aeae); }
.home-v2 .dx-voters li:nth-child(3) .pos { color: #2a1408; background: linear-gradient(135deg, #f0a877, #b56a3a); }
.home-v2 .dx-voters .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-v2 .dx-voters .num { font-weight: 700; color: var(--gold); }
.home-v2 .dx-empty { text-align: center; color: var(--dim); font-style: italic; padding: 22px 0; font-size: 13.5px; }

/* Monthly rewards podium */
.home-v2 .dx-podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 760px) { .home-v2 .dx-podium { grid-template-columns: 1fr; } }
.home-v2 .dx-plaque {
  padding: 20px 16px 16px; text-align: center; border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid var(--line);
  border-top: 3px solid var(--band, var(--teal));
}
.home-v2 .dx-plaque .gem {
  width: 38px; height: 38px; margin: 0 auto 9px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: "Cinzel", serif; font-weight: 800; font-size: 16px; color: #23180a;
  background: linear-gradient(135deg, var(--gem-a), var(--gem-b));
}
.home-v2 .dx-plaque .place {
  font-family: "Cinzel", serif; font-weight: 700; font-size: 11.5px;
  letter-spacing: .13em; text-transform: uppercase; color: #fff; margin-bottom: 11px;
}
.home-v2 .dx-plaque .row {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 4px 0; font-size: 12.8px; color: var(--dim);
}
.home-v2 .dx-plaque .row i { color: var(--band, var(--teal)); width: 14px; }
.home-v2 .dx-plaque.g1 { --band: var(--gold); --gem-a: #f6da96; --gem-b: #b07f22; }
.home-v2 .dx-plaque.g2 { --band: #b9cecd; --gem-a: #eef6f5; --gem-b: #93aeae; }
.home-v2 .dx-plaque.g3 { --band: #f0a877; --gem-a: #ffc9a3; --gem-b: #b56a3a; }
.home-v2 .dx-note { text-align: center; margin: 18px 0 0; font-size: 12.2px; color: var(--dim); }
.home-v2 .dx-note code {
  padding: 3px 9px; border-radius: 5px;
  background: rgba(46, 196, 182, .12);
  border: 1px solid rgba(46, 196, 182, .3);
  color: var(--teal-lt); font-family: "Courier New", monospace;
}

/* ================================================================ CTA BAND */
.home-v2 .dx-band {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 40px 22px;
  text-align: center;
  background: linear-gradient(180deg, #081517 0%, #050e10 100%);
  border-top: 1px solid var(--line-gold);
}
.home-v2 .dx-band-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; gap: 28px;
}
.home-v2 .dx-band .crest { flex: none; width: 54px; opacity: .85; }
.home-v2 .dx-band .crest img { width: 100%; display: block; }
@media (max-width: 780px) { .home-v2 .dx-band .crest { display: none; } }
.home-v2 .dx-band h2 {
  margin: 0 0 6px;
  font-family: "Cinzel", serif;
  font-size: clamp(1.1rem, 2.6vw, 1.6rem);
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1.3;
}
.home-v2 .dx-band p {
  margin: 0 0 20px;
  font-family: "Cinzel", serif;
  font-size: clamp(.95rem, 2vw, 1.2rem);
  text-transform: uppercase;
  color: var(--gold-lt);
  letter-spacing: .02em;
}
.home-v2 .dx-band .acts { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Respect a reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
  .home-v2 * { animation: none !important; transition: none !important; }
  .home-v2 .dx-btn:hover, .home-v2 .dx-tile:hover, .home-v2 .dx-comp:hover { transform: none; }
}
