:root {
  --bg: #060404;
  --bg-strong: #0e0807;
  --surface: rgba(21, 12, 10, 0.84);
  --surface-strong: rgba(16, 10, 8, 0.96);
  --surface-soft: rgba(32, 18, 14, 0.7);
  --line: rgba(254, 214, 135, 0.16);
  --line-strong: rgba(254, 214, 135, 0.32);
  --text: #f3ede3;
  --muted: #c9b59a;
  --gold: #fed687;
  --gold-deep: #9a7340;
  --gold-soft: #ffecc7;
  --crimson: #a9261c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(169, 38, 28, 0.26), transparent 34%),
    radial-gradient(circle at top right, rgba(154, 115, 64, 0.15), transparent 28%),
    linear-gradient(180deg, #140b09 0%, #060404 28%, #080504 100%);
  font-family: 'Lora', serif;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(254, 214, 135, 0.08), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 20%);
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url('/games/rogue-reigns/imgs/bg-hero.webp');
  background-size: cover;
  background-position: center top;
  opacity: 0.09;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: -3;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 50%;
  top: -4rem;
  transform: translateX(-50%);
  background: var(--gold);
  color: #100a07;
  padding: 0.9rem 1.2rem;
  border-radius: 0 0 14px 14px;
  text-decoration: none;
  z-index: 50;
}

.skip-link:focus {
  top: 0;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(16px);
  background: rgba(8, 5, 4, 0.76);
  border-bottom: 1px solid rgba(254, 214, 135, 0.08);
}

.topbar__inner,
.section__inner,
.page-footer__inner {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 84px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
}

.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(254, 214, 135, 0.18), rgba(154, 115, 64, 0.12));
  border: 1px solid rgba(254, 214, 135, 0.18);
  padding: 0.45rem;
}

.brand__copy {
  display: flex;
  flex-direction: column;
}

.brand__title,
.section-title,
.hero__title,
.gallery__copy h3,
.pillar-card h3,
.playtest-card h3,
.metric-card strong {
  font-family: 'Cinzel', serif;
}

.brand__title {
  font-size: 0.98rem;
  letter-spacing: 0.06em;
}

.brand__tag {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.topbar__nav a,
.page-footer__links a {
  color: var(--muted);
  text-decoration: none;
}

.topbar__nav a:hover,
.page-footer__links a:hover {
  color: var(--gold-soft);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 50px;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--compact {
  min-height: 44px;
  padding-inline: 1.1rem;
}

.button--primary {
  color: #120b07;
  background: linear-gradient(180deg, var(--gold-soft) 0%, var(--gold) 42%, var(--gold-deep) 100%);
  border-color: rgba(254, 214, 135, 0.4);
  box-shadow: 0 18px 38px rgba(154, 115, 64, 0.3);
}

.button--ghost {
  color: var(--gold-soft);
  background: rgba(18, 11, 8, 0.52);
  border-color: var(--line);
}

.section {
  position: relative;
  padding: 5.5rem 0;
}

.section--surface {
  background:
    linear-gradient(180deg, rgba(17, 10, 8, 0.86), rgba(8, 5, 4, 0.92)),
    radial-gradient(circle at center, rgba(169, 38, 28, 0.18), transparent 45%);
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--gold);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 600;
}

.hero {
  padding-top: 3.5rem;
}

.hero__inner,
.split-layout,
.join__inner,
.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
  align-items: center;
}

.hero__copy,
.gallery__spotlight,
.waitlist-card,
.playtest-card,
.pillar-card,
.metric-card,
.gallery__thumb,
.panel-image,
.section-heading,
.split-layout__copy {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 12, 10, 0.9), rgba(12, 8, 7, 0.92));
  box-shadow: var(--shadow);
}

.hero__copy,
.gallery__spotlight,
.split-layout__copy,
.waitlist-card,
.section-heading {
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.hero__logo {
  width: min(400px, 100%);
  margin-bottom: 1.5rem;
}

.hero__title {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.9rem);
  line-height: 0.97;
  max-width: 12ch;
}

.hero__lede,
.section-body,
.split-layout__copy p,
.gallery__copy p,
.playtest-card p,
.pillar-card p,
.page-footer__body,
.waitlist-form__hint {
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.02rem;
}

.hero__actions,
.link-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 0.95rem;
  margin-top: 1.8rem;
}

.hero__stats,
.metric-grid,
.pillar-grid,
.playtest-grid {
  display: grid;
  gap: 1rem;
}

.hero__stats,
.metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2rem;
}

.hero__stats div,
.metric-card {
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(254, 214, 135, 0.08);
}

.hero__stats dt,
.metric-card__label {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero__stats dd,
.metric-card strong {
  margin: 0.55rem 0 0;
  font-size: 1rem;
  color: var(--gold-soft);
  line-height: 1.35;
}

.hero__art {
  position: relative;
  min-height: 34rem;
}

.hero__glow {
  position: absolute;
  inset: 8% 16% 10% 16%;
  background:
    radial-gradient(circle at center, rgba(254, 214, 135, 0.12), transparent 46%),
    radial-gradient(circle at center, rgba(169, 38, 28, 0.3), transparent 68%);
  filter: blur(28px);
}

.media-card,
.panel-image {
  overflow: hidden;
}

.media-card {
  position: absolute;
  border-radius: var(--radius-lg);
}

.media-card img,
.panel-image img,
.playtest-card img,
.gallery__image-frame img,
.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card--back {
  inset: 8% 34% auto 0;
  transform: rotate(-7deg);
  aspect-ratio: 16 / 10;
  animation: driftBack 9s ease-in-out infinite;
}

.media-card--front {
  inset: 0 0 auto 18%;
  transform: rotate(6deg);
  aspect-ratio: 16 / 10;
  animation: driftFront 11s ease-in-out infinite;
}

@keyframes driftBack {
  0%, 100% { transform: rotate(-7deg) translateY(0); }
  50% { transform: rotate(-5deg) translateY(10px); }
}

@keyframes driftFront {
  0%, 100% { transform: rotate(6deg) translateY(0); }
  50% { transform: rotate(4deg) translateY(-12px); }
}

.section-heading {
  margin-bottom: 1.75rem;
}

.section-title {
  margin: 0;
  font-size: clamp(1.95rem, 4vw, 3.2rem);
  line-height: 1.08;
}

.section-body {
  max-width: 52rem;
  margin: 1.05rem 0 0;
}

.pillar-grid,
.playtest-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pillar-card,
.playtest-card {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.pillar-card {
  padding: 1.7rem;
}

.pillar-card__index {
  margin: 0 0 1rem;
  color: rgba(254, 214, 135, 0.55);
  font-size: 0.84rem;
  letter-spacing: 0.24em;
}

.pillar-card h3,
.playtest-card h3,
.gallery__copy h3 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
}

.split-layout__media {
  position: relative;
  min-height: 100%;
}

.panel-image {
  border-radius: var(--radius-lg);
}

.panel-image--large {
  aspect-ratio: 4 / 5;
}

.panel-image--accent {
  position: absolute;
  width: 56%;
  right: -3%;
  bottom: -5%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  border-color: rgba(254, 214, 135, 0.28);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0;
  display: grid;
  gap: 0.9rem;
}

.feature-list li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text);
  line-height: 1.7;
}

.feature-list li::before {
  content: '◆';
  position: absolute;
  left: 0;
  top: 0.02rem;
  color: var(--gold);
  font-size: 0.8rem;
}

.gallery {
  align-items: stretch;
}

.gallery__spotlight {
  display: grid;
  gap: 1.2rem;
}

.gallery__image-frame {
  aspect-ratio: 16 / 10;
  border-radius: calc(var(--radius-lg) - 8px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.gallery__thumbs {
  display: grid;
  gap: 0.9rem;
}

.gallery__thumb {
  display: grid;
  grid-template-columns: 6.6rem 1fr;
  gap: 0.95rem;
  align-items: center;
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.gallery__thumb img {
  aspect-ratio: 16 / 10;
  border-radius: 14px;
}

.gallery__thumb span {
  display: grid;
  gap: 0.2rem;
}

.gallery__thumb strong {
  font-size: 1rem;
  font-weight: 600;
}

.gallery__thumb small {
  color: var(--muted);
  font-size: 0.86rem;
}

.gallery__thumb[aria-pressed='true'] {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(40, 22, 16, 0.96), rgba(17, 11, 9, 0.96));
  transform: translateY(-2px);
}

.playtest-card img {
  aspect-ratio: 16 / 11;
}

.playtest-card__copy {
  padding: 1.35rem 1.35rem 1.5rem;
}

.join__inner {
  align-items: start;
}

.waitlist-card {
  display: block;
}

.waitlist-form {
  display: grid;
  gap: 1rem;
}

.waitlist-form__field {
  display: grid;
  gap: 0.55rem;
}

.waitlist-form__field span {
  color: var(--gold-soft);
  font-size: 0.92rem;
}

.waitlist-form__field input {
  width: 100%;
  min-height: 3.4rem;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.waitlist-form__field input::placeholder {
  color: rgba(201, 181, 154, 0.7);
}

.waitlist-form__button {
  width: 100%;
}

.waitlist-form__hint {
  margin: 0;
  font-size: 0.92rem;
}

.waitlist-form__status {
  margin: 0;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid transparent;
  line-height: 1.6;
}

.waitlist-form__status--visible,
.waitlist-form__status:not([hidden]) {
  display: block;
}

.waitlist-form__status[data-state='success'] {
  background: rgba(75, 112, 55, 0.18);
  color: #d7f0c6;
  border-color: rgba(178, 223, 143, 0.22);
}

.waitlist-form__status[data-state='error'] {
  background: rgba(169, 38, 28, 0.18);
  color: #ffd3cf;
  border-color: rgba(255, 152, 140, 0.28);
}

.page-footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid rgba(254, 214, 135, 0.08);
}

.page-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
}

.page-footer__body {
  max-width: 26rem;
  margin: 0;
}

.page-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .hero__inner,
  .split-layout,
  .gallery,
  .join__inner {
    grid-template-columns: 1fr;
  }

  .hero__art {
    min-height: 30rem;
    order: -1;
  }

  .panel-image--large {
    aspect-ratio: 16 / 11;
  }

  .panel-image--accent {
    width: 48%;
    bottom: -4%;
  }

  .pillar-grid,
  .playtest-grid,
  .hero__stats,
  .metric-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 740px) {
  .topbar__inner {
    min-height: 76px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.85rem 0;
  }

  .topbar__nav {
    order: 3;
    width: 100%;
    justify-content: center;
    padding-bottom: 0.15rem;
  }

  .section {
    padding: 4.4rem 0;
  }

  .hero__copy,
  .gallery__spotlight,
  .split-layout__copy,
  .waitlist-card,
  .section-heading {
    padding: 1.5rem;
  }

  .hero__title {
    max-width: none;
  }

  .hero__art {
    min-height: 24rem;
  }

  .media-card--back {
    inset: 10% 22% auto 0;
  }

  .media-card--front {
    inset: 4% 0 auto 12%;
  }

  .gallery__thumb {
    grid-template-columns: 5.2rem 1fr;
  }

  .page-footer__inner {
    align-items: start;
  }
}
