/* Bagani: War of Isles — landing page only (index.php). Extends theme.css. */

/* Custom sword cursor now lives in theme.css (site-wide) instead of here --
   see that file for the rule and the reasoning. */

/* content that should reach screen readers but never render visually --
   standard clip-based technique (display:none would remove it from the
   accessibility tree too) */
.dv-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- ember field (signature) ---------- */

.dv-embers {
  position: absolute;
  inset: 0;
  height: 640px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.dv-embers span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px 2px rgba(201, 162, 39, 0.55);
  opacity: 0;
  animation: dv-flicker 6s ease-in-out infinite;
}

@keyframes dv-flicker {
  0%, 100% { opacity: 0; transform: translateY(0) scale(0.8); }
  15% { opacity: .9; }
  50% { opacity: .35; transform: translateY(-6px) scale(1.1); }
  85% { opacity: .8; }
}

@media (prefers-reduced-motion: reduce) {
  .dv-embers span { animation: none; opacity: .5; }
}

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

.dv-hero {
  position: relative;
  z-index: 1;
  padding: clamp(3.5rem, 10vw, 7rem) 1.5rem clamp(3rem, 8vw, 5rem);
  text-align: center;
  /* soft warm glow radiating from behind the headline -- flat black behind
     the hero read dead; this gives the "war has come" framing some depth
     without competing with the text (the gradient sits behind everything,
     .dv-hero's own content is normal-flow DOM so it paints on top). */
  background: radial-gradient(ellipse 900px 480px at 50% -8%, rgba(184, 70, 31, 0.16), transparent 68%);
}

/* swap just the leading diamond of the hero's own eyebrow for crossed swords
   -- scoped to .dv-hero so every other page's .dv-eyebrow (shared via
   theme.css) is untouched */
.dv-hero .dv-eyebrow::before { content: "\2694"; }

.dv-h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  line-height: 1.06;
  letter-spacing: .01em;
  color: var(--parchment);
  margin: 0 auto .9rem;
  max-width: 18ch;
  text-wrap: balance;
}

/* currentColor picks up whichever ember-bright the active theme defines, so
   the glow stays correct through the light/dark toggle without a second rule */
.dv-h1 em { font-style: normal; color: var(--ember-bright); text-shadow: 0 0 30px currentColor; }

.dv-announce {
  max-width: 46ch;
  margin: 0 auto .35rem;
  font-size: 1.15rem;
  color: var(--parchment-dim);
}

.dv-sub {
  max-width: 46ch;
  margin: 0 auto 2.4rem;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--bone);
}

.dv-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* Scoped to the hero CTA only, not theme.css's shared .dv-btn-primary --
   every drawer built today reuses that same class, and a glow tuned for a
   dark hero background is not something to risk on dense in-scene UI sight
   unseen. */
.dv-ctas .dv-btn-primary { box-shadow: 0 6px 24px rgba(184, 70, 31, 0.35); }
.dv-ctas .dv-btn-primary:hover { box-shadow: 0 8px 32px rgba(150, 52, 21, 0.5); }

/* stat strip */

.dv-stats {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  max-width: 640px;
  margin: 0 auto;
}

.dv-stat { text-align: center; }

.dv-stat b {
  display: block;
  font-family: var(--mono);
  font-size: 1.7rem;
  color: var(--parchment);
  font-weight: 500;
}

/* standalone highlight badge, not a 4th flex item in .dv-stats -- see the
   comment in index.php for why it was pulled out */
.dv-spotlight {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  margin: 1.4rem auto 0;
  padding: .55rem 1.2rem;
  max-width: 90%;
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 999px;
  background: rgba(201, 162, 39, 0.08);
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .01em;
  color: var(--bone);
}

.dv-spotlight b { color: var(--gold); font-weight: 600; }

.dv-stat span {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bone);
}

/* ---------- scene preview ---------- */

.dv-preview {
  margin: 2.6rem auto 0;
  max-width: 340px;
}

.dv-preview-frame {
  width: 320px;
  height: 240px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: .6rem;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}

.dv-preview-stage {
  position: relative;
  width: 640px;
  height: 480px;
  transform: scale(.5);
  transform-origin: top left;
}

.dv-preview-bg, .dv-preview-bld { position: absolute; }

/* Matches the exact same cap .dv-bld img:not([width]) uses in map.css for
   the real town scene -- this preview reuses building_layout()'s own dx/dy
   (see the PHP comment above the loop that renders it), which assumes that
   cap. Without it, these five buildings rendered at native sprite
   resolution instead, uncapped, quietly making "not a mockup" not quite
   true. */
.dv-preview-bld:not([width]) { max-width: 27px; height: auto; }

.dv-preview-cap {
  margin: .8rem 0 0;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .03em;
  color: var(--bone);
  text-align: center;
}

/* ---------- factions ---------- */

.dv-factions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.dv-faction {
  position: relative;
  padding: 2.6rem 1.6rem 1.9rem;
  transition: border-color .2s ease, transform .2s ease;
}

.dv-faction:hover { border-top-color: var(--ember); transform: translateY(-3px); }

/* wax-seal medallion pinned to the card's top edge, over the .dv-card accent
   border -- the banner-and-crest framing "choose your banner" was already
   asking for, without needing new art assets. */
.dv-fbanner {
  position: absolute;
  top: -1.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2.7rem;
  height: 2.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--ink-2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
}

.dv-fbanner svg { width: 17px; height: 17px; }

.dv-fbanner-aggressive { background: var(--ember); color: var(--ink-2); }
.dv-fbanner-defensive { background: var(--moss-bright); color: var(--ink-2); }
.dv-fbanner-balanced { background: var(--gold); color: var(--parchment); }

.dv-faction .dv-fname {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--parchment);
  margin: 0 0 .3rem;
}

.dv-faction .dv-ftag {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--gold);
  text-transform: uppercase;
  margin: 0 0 0;
}

.dv-fstats { margin: 1rem 0 1.2rem; display: flex; flex-direction: column; gap: .45rem; }

.dv-fstat-row { display: flex; align-items: center; gap: .6rem; }

.dv-fstat-row span {
  width: 2.4em;
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--bone);
}

.dv-fbar { flex: 1; height: 4px; background: rgba(201, 162, 39, 0.14); overflow: hidden; }
.dv-fbar i { display: block; height: 100%; background: var(--moss-bright); }

.dv-faction p { font-size: .95rem; line-height: 1.55; margin: 0; color: var(--parchment-dim); }

/* ---------- how it works ---------- */

.dv-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  counter-reset: dv-step;
}

.dv-step { position: relative; padding-top: 2.6rem; border-top: 1px solid var(--line); }

.dv-step::before {
  counter-increment: dv-step;
  content: counter(dv-step, decimal-leading-zero);
  position: absolute;
  top: -.05em;
  left: 0;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--ember-bright);
  background: var(--ink);
  padding-right: .6rem;
}

.dv-step h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--parchment);
  margin: 0 0 .5rem;
}

.dv-step p { font-size: .92rem; line-height: 1.55; margin: 0; color: var(--parchment-dim); }

/* ---------- features ---------- */

.dv-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.dv-feature {
  padding: 1.6rem 1.4rem;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: .4rem;
}

.dv-feature svg {
  width: 22px;
  height: 22px;
  color: var(--gold);
  margin-bottom: .8rem;
}

.dv-feature h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--parchment);
  margin: 0 0 .4rem;
}

.dv-feature p { font-size: .88rem; line-height: 1.5; margin: 0; color: var(--parchment-dim); }

.dv-reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.dv-reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .dv-reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- language ---------- */

.dv-lang { text-align: center; }

.dv-flags { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }

.dv-flags a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 30px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  transition: border-color .15s ease, transform .15s ease;
}

.dv-flags a:hover { border-color: var(--gold); transform: translateY(-2px); }
.dv-flags img { max-width: 22px; max-height: 16px; }

@media (max-width: 760px) {
  .dv-factions, .dv-steps, .dv-features { grid-template-columns: 1fr; }
}
