/* Rise of Kingdoms landing — rise.energydriveco.com
   gold / charcoal epic; Exo 2 display + Source Sans body
*/

@font-face {
  font-family: "Exo 2";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/Exo2-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Exo 2";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/Exo2-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Exo 2";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/Exo2-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/SourceSans3-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/SourceSans3-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/SourceSans3-Bold.woff2") format("woff2");
}

:root {
  --bg: #0a0a0c;
  --bg-panel: #12141a;
  --bg-elev: #181b22;
  --border: #2c2f38;
  --text: #f2f0ea;
  --text-muted: #a8a39a;
  --gold: #d4a017;
  --gold-hi: #f0c040;
  --gold-lo: #b8860b;
  --focus: #e8c868;
  --font-d: "Exo 2", sans-serif;
  --font-b: "Source Sans 3", sans-serif;
  --header-h: 4.5rem;
  --max: 1180px;
  --ease: 0.28s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.5rem);
}

body {
  font-family: var(--font-b);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--gold-hi);
  text-decoration: none;
}
a:hover {
  color: var(--gold);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

ul {
  list-style: none;
}

h1,
h2,
h3 {
  font-family: var(--font-d);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: var(--gold);
  color: #1a1204;
  font-weight: 700;
}
.skip-link:focus {
  top: 1rem;
}

/* ——— header ——— */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.brand-logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 1.5rem;
}
.nav-desktop a {
  color: var(--text);
  font-family: var(--font-d);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-desktop a:hover {
  color: var(--gold-hi);
}

.btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1a1204 !important;
  background: linear-gradient(
    180deg,
    var(--gold-hi) 0%,
    var(--gold) 50%,
    var(--gold-lo) 100%
  );
  border: 1px solid #e8c04a;
  box-shadow: 0 0 20px rgba(212, 160, 23, 0.45);
  cursor: pointer;
  transition:
    filter var(--ease),
    box-shadow var(--ease);
}
.btn-play:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 28px rgba(240, 192, 64, 0.55);
}

.btn-play--lg {
  padding: 1rem 2.2rem;
  font-size: 0.9rem;
}

.btn-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}
.btn-menu .icon-close {
  display: none;
}
.btn-menu[aria-expanded="true"] .icon-open {
  display: none;
}
.btn-menu[aria-expanded="true"] .icon-close {
  display: block;
}

@media (min-width: 900px) {
  .nav-desktop {
    display: flex;
  }
  .btn-menu {
    display: none;
  }
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--ease),
    visibility var(--ease);
}
.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(20rem, 88vw);
  height: 100%;
  background: var(--bg-elev);
  border-left: 1px solid var(--border);
  z-index: 1200;
  transform: translateX(100%);
  transition: transform var(--ease);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.nav-drawer.is-open {
  transform: translateX(0);
}
.nav-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-d);
  font-weight: 700;
  text-transform: uppercase;
}
.nav-drawer-close {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}
.nav-mobile {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.nav-mobile a {
  display: block;
  padding: 0.9rem 0.5rem;
  color: var(--text);
  font-family: var(--font-d);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
body.nav-open {
  overflow: hidden;
}

/* ——— hero ——— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media picture,
.hero-media img,
.hero-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-video {
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-video.is-ready {
  opacity: 1;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(6, 6, 8, 0.92) 0%,
    rgba(6, 6, 8, 0.72) 38%,
    rgba(6, 6, 8, 0.25) 70%,
    rgba(6, 6, 8, 0.15) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: calc(var(--header-h) + 2.5rem) 0 3.5rem;
  max-width: 36rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin-bottom: 1rem;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.6);
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.75rem;
  max-width: 32rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.platforms {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.platforms span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.platforms svg {
  opacity: 0.85;
}

.hero-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  margin-top: 0.5rem;
}
.hero-perks li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-d);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}
.hero-perks svg {
  color: var(--gold);
  flex-shrink: 0;
}

/* ——— commanders ——— */
/* @tom: Lootday bg + left veil — don't use CSS bg-image, SEO/a11y want real <img> */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-commanders {
  position: relative;
  overflow: hidden;
  background: #0a0a0c;
}

.cmd-bgMedia {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.cmd-bgMedia img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.cmd-bgVeil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(6, 6, 8, 0.94) 0%,
    rgba(6, 6, 8, 0.88) 28%,
    rgba(6, 6, 8, 0.72) 55%,
    rgba(6, 6, 8, 0.58) 100%
  );
}

.cmd-grid {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 1079px) {
  .cmd-grid {
    grid-template-columns: 1fr 1.15fr;
    gap: 3rem;
  }
}

.cmd-copy h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: 1rem;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.75);
}

.cmd-copy p {
  color: #c8c4ba;
  margin-bottom: 1.5rem;
  max-width: 34rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.65);
}

.cmd-intro {
  margin-top: 2px;
}

.cmd-copy .cmd-list li {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
}

.cmd-panel,
.ui-cmdPanel {
  background: rgba(18, 20, 26, 0.92);
}

.cmd-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
.cmd-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-d);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cmd-list svg {
  color: var(--gold);
}

.cmd-panel {
  background: var(--bg-panel);
  border: 1px solid rgba(212, 160, 23, 0.28);
  box-shadow:
    0 0 40px rgba(212, 160, 23, 0.08),
    inset 0 0 60px rgba(0, 0, 0, 0.35);
  padding: 1.25rem;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .cmd-panel {
    grid-template-columns: 1.1fr 1fr;
    padding: 1.5rem;
  }
}

.cmd-featured {
  position: relative;
  overflow: hidden;
  background: #0d0f14;
  border: 1px solid var(--border);
}

/* shared frame — keeps PNG crops consistent (hero + thumbs) */
.cmd-imgWrap,
.edc-portraitFrame {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  position: relative;
  background: #0d0f14;
  height: 100%;
}
.cmd-imgWrap img,
.edc-portraitFrame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.cmd-featured .cmd-imgWrap {
  aspect-ratio: 3 / 4;
}

.cmd-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cmd-stats h3 {
  font-size: 1.35rem;
  color: var(--gold-hi);
  letter-spacing: 0.06em;
}

.cmd-origin {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: -0.35rem;
}

.cmd-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tag {
  font-family: var(--font-d);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(212, 160, 23, 0.4);
  color: var(--gold-hi);
  background: rgba(212, 160, 23, 0.08);
}

.cmd-stars {
  color: var(--gold-hi);
  letter-spacing: 0.15em;
  font-size: 1.1rem;
}

.cmd-blurb {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.cmd-best {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
  padding: 0.55rem 0.65rem;
  border-left: 2px solid var(--gold);
  background: rgba(212, 160, 23, 0.06);
}
.cmd-best strong {
  color: var(--gold-hi);
  font-family: var(--font-d);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.2rem;
}

.cmd-skillText {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.cmd-skillText p strong {
  color: var(--gold-hi);
  font-weight: 600;
}

.cmd-portraits,
.app-cmdThumbs {
  grid-column: 1 / -1;
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.cmd-thumb {
  width: 72px;
  padding: 0;
  border: 2px solid var(--border);
  background: #0d0f14;
  cursor: pointer;
  overflow: hidden;
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0 50%);
  transition:
    border-color var(--ease),
    box-shadow var(--ease);
}
.cmd-thumb .cmd-imgWrap,
.cmd-thumb .edc-portraitFrame {
  aspect-ratio: 1 / 1;
  width: 72px;
}
.cmd-thumb.is-active,
.cmd-thumb:hover {
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(212, 160, 23, 0.45);
}

/* leftover from v1 skill dots — keep class so old CSS caches don't 404 mentally */
.cmd-skills {
  display: none;
}

/* ——— features ——— */
.section-features {
  background: linear-gradient(180deg, #0c0d10 0%, #10131a 100%);
  text-align: center;
}

.section-features h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.section-lead {
  color: var(--text-muted);
  max-width: 40rem;
  margin: 0 auto 2.35rem;
}

.feat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  text-align: left;
  margin-bottom: 2.25rem;
}

@media (min-width: 640px) {
  .feat-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1024px) {
  .feat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feat-card {
  background: rgba(18, 20, 26, 0.85);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    border-color var(--ease),
    box-shadow var(--ease);
}
.feat-card:hover {
  border-color: rgba(212, 160, 23, 0.45);
  box-shadow: 0 0 24px rgba(212, 160, 23, 0.12);
}

.feat-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.feat-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feat-card-body {
  padding: 1.1rem 1.15rem 1.35rem;
}
.feat-card-body h3 {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.feat-card-body h3 svg {
  color: var(--gold);
  flex-shrink: 0;
}
.feat-card-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ——— final CTA ——— */
.final-cta {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.final-cta-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.final-cta-media picture,
.final-cta-media img {
  display: block;
  width: 100%;
  height: 115%;
  object-fit: cover;
  transform: scaleX(-1) scale(1.08);
  will-change: transform;
}
.final-cta-media picture {
  height: 115%;
}
.final-cta-media picture img {
  height: 100%;
}
.final-cta-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(6, 6, 8, 0.55) 0%,
    rgba(6, 6, 8, 0.45) 40%,
    rgba(6, 6, 8, 0.75) 100%
  );
}
.final-cta-content {
  position: relative;
  z-index: 2;
  padding: 4rem 1rem;
}
.final-cta h2 {
  font-size: clamp(2.2rem, 6vw, 3.75rem);
  color: var(--gold-hi);
  margin-bottom: 0.65rem;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.7);
}
.final-sub {
  font-family: var(--font-d);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 1.75rem;
}

/* ——— footer ——— */
.site-footer {
  background: #050608;
  border-top: 1px solid var(--border);
  padding: 2rem 0 1.5rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.25rem;
}
.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-family: var(--font-d);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.footer-links a:hover {
  color: var(--gold-hi);
}
.footer-meta {
  color: #a8a39a;
  font-size: 0.8rem;
  max-width: 48rem;
  line-height: 1.55;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5000;
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  padding: 1rem 0;
}
.cookie-banner[hidden] {
  display: none;
}
.cookie-inner {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
@media (min-width: 720px) {
  .cookie-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.cookie-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 40rem;
}
.cookie-actions {
  display: flex;
  gap: 0.5rem;
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.1rem;
  font-family: var(--font-d);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero-video {
    display: none !important;
  }
  .final-cta-media picture,
  .final-cta-media img {
    transform: scaleX(-1) !important;
  }
}
