/* layout.css — page scaffolding, grids, responsive rules */

body {
  display: flex;
  flex-direction: column;
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 7, 10, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 0.55rem + 0.5vw, 0.95rem);
  color: var(--bone);
  white-space: nowrap;
}

.brand__mark {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--red);
  filter: drop-shadow(0 0 6px rgba(255, 47, 47, 0.6));
}

.brand__accent {
  color: var(--red);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 0.2rem + 1.4vw, 1.6rem);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ---------- ticker ---------- */

.ticker {
  overflow: hidden;
  border-bottom: 2px solid var(--line-hot);
  background: #0b0709;
  padding-block: 0.45rem;
}

.ticker__track {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  width: max-content;
  animation: ticker-roll 26s linear infinite;
}

.ticker__item,
.ticker__sep {
  font-family: var(--font-display);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.ticker__item {
  color: var(--red);
}

.ticker__sep {
  color: var(--line);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding-block: clamp(2.5rem, 1rem + 7vw, 6rem);
  border-bottom: 2px solid var(--line);
  overflow: hidden;
}

.hero .fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(1.5rem, 0.5rem + 4vw, 4rem);
  align-items: center;
}

.hero__copy > * + * {
  margin-top: 1.1rem;
}

.hero__title {
  color: var(--bone);
  text-shadow: 0 0 18px rgba(255, 47, 47, 0.45), 4px 4px 0 var(--red-deep);
}

.hero__sub {
  max-width: 42ch;
  font-size: 1.1em;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__stats {
  display: flex;
  gap: 1.5rem;
  padding-top: 0.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* ---------- stage ---------- */

.hero__stage {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.stage-frame {
  position: relative;
  border: 3px solid var(--line);
  background: #050507;
  padding: 0.5rem;
}

.stage-frame canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.stage-frame__scan {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 47, 47, 0.5);
  box-shadow: 0 0 14px rgba(255, 47, 47, 0.7);
  animation: frame-scan 3.4s linear infinite;
}

.stage-frame__corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 3px solid var(--amber);
}

.stage-frame__corner--tl { top: -3px; left: -3px; border-right: 0; border-bottom: 0; }
.stage-frame__corner--tr { top: -3px; right: -3px; border-left: 0; border-bottom: 0; }
.stage-frame__corner--bl { bottom: -3px; left: -3px; border-right: 0; border-top: 0; }
.stage-frame__corner--br { bottom: -3px; right: -3px; border-left: 0; border-top: 0; }

.stage-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ---------- sections ---------- */

.section {
  padding-block: clamp(3rem, 1.5rem + 6vw, 6rem);
  border-bottom: 2px solid var(--line);
}

.section__head {
  max-width: 60ch;
  margin-bottom: clamp(1.5rem, 0.8rem + 2vw, 2.75rem);
}

.section__head > * + * {
  margin-top: 0.7rem;
}

.section__index {
  font-family: var(--font-display);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: var(--orange);
  text-transform: uppercase;
}

.section__title {
  color: var(--bone);
}

.section__lead {
  font-size: 1.08em;
}

/* lore */
.lore__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.25rem, 0.5rem + 3vw, 3rem);
  align-items: start;
}

.lore__text p + p {
  margin-top: 1rem;
}

.lore-card {
  border: 2px solid var(--line);
  background: var(--panel);
  padding: 1.1rem 1.2rem;
}

/* powers */
.powers__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15.5rem, 100%), 1fr));
  gap: var(--gap);
}

/* moves */
.moves__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  gap: var(--gap);
}

/* summon */
.summon__inner {
  max-width: 46rem;
}

.form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  padding: 1.4rem;
  border: 2px solid var(--line);
  background: var(--panel);
}

.field--wide,
.form__actions {
  grid-column: 1 / -1;
}

/* ---------- footer ---------- */

.site-footer {
  margin-top: auto;
  padding-block: 2rem;
  background: var(--bg-soft);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--red);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__note {
  flex: 1 1 100%;
  font-size: 0.85em;
  color: var(--bone-faint);
}

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero__stage {
    order: -1;
    max-width: 26rem;
    margin-inline: auto;
    width: 100%;
  }

  .lore__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .form {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer__inner {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .hero__stats {
    gap: 1rem;
  }
}
