:root {
  color-scheme: dark;
  --black: #000000;
  --tan: #d8bd8a;
  --tan-soft: rgba(216, 189, 138, 0.34);
  --cream: #fff3dc;
  --max-width: 980px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--black);
  color: var(--tan);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 22% 12%, rgba(216, 189, 138, 0.08), transparent 26%),
    radial-gradient(circle at 80% 76%, rgba(116, 82, 40, 0.14), transparent 30%),
    var(--black);
  color: var(--tan);
  font-family: Norwester, Norwestern, Impact, Haettenschweiler, "Arial Narrow Bold", "Arial Narrow", Arial, sans-serif;
  letter-spacing: 0;
}

a,
button {
  font: inherit;
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: clamp(18px, 4vw, 48px) clamp(14px, 4vw, 40px) 48px;
}

.hero {
  display: grid;
  gap: clamp(16px, 3vw, 30px);
  justify-items: center;
}

.title-capsule {
  width: min(100%, 900px);
  margin: 0;
  padding: clamp(14px, 3vw, 28px) clamp(16px, 4vw, 38px);
  border: clamp(5px, 1vw, 10px) solid var(--tan);
  border-radius: 999px;
  background: var(--black);
  color: var(--tan);
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  font-weight: 900;
  line-height: 0.92;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
  box-shadow:
    inset 0 0 0 5px #000,
    0 0 28px rgba(216, 189, 138, 0.18);
}

.hero-frame {
  width: min(88vw, 540px);
  border: clamp(5px, 1vw, 10px) solid var(--tan);
  border-radius: 18px;
  background: var(--black);
  box-shadow: 0 0 32px rgba(216, 189, 138, 0.18);
  overflow: hidden;
  isolation: isolate;
}

.hero-frame video {
  width: 100%;
  height: auto;
  display: block;
  background: var(--black);
  opacity: 0;
  transform: translateZ(0);
  transition: opacity 220ms ease;
  backface-visibility: hidden;
}

.hero-frame.is-video-ready video {
  opacity: 1;
}

.story-card {
  width: min(100%, 900px);
  margin: clamp(20px, 5vw, 48px) auto 0;
  padding: clamp(18px, 4vw, 34px);
  border: clamp(5px, 1vw, 8px) solid var(--tan);
  border-radius: clamp(22px, 5vw, 42px);
  background: rgba(0, 0, 0, 0.72);
  box-shadow:
    inset 0 0 0 5px #000,
    0 0 26px rgba(216, 189, 138, 0.13);
  color: var(--cream);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1rem, 2.2vw, 1.28rem);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.story-card p {
  margin: 0;
}

.story-card p + p {
  margin-top: 0.82rem;
}

.action-grid {
  width: min(100%, 860px);
  margin: clamp(24px, 5vw, 58px) auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 3vw, 24px);
}

.action-button {
  min-height: clamp(58px, 9vw, 82px);
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: clamp(4px, 0.8vw, 7px) solid var(--tan);
  border-radius: 999px;
  background: #000;
  color: var(--tan);
  font-size: clamp(1.05rem, 2.8vw, 1.65rem);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow:
    inset 0 0 0 4px #000,
    0 0 22px rgba(216, 189, 138, 0.13);
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.action-button:hover {
  transform: translateY(-2px);
  background: var(--tan);
  color: var(--black);
}

.action-button:focus-visible,
.site-footer a:focus-visible {
  outline: 4px solid #ffffff;
  outline-offset: 5px;
  box-shadow: 0 0 0 10px rgba(216, 189, 138, 0.4);
}

.gallery {
  width: min(100%, 900px);
  margin: clamp(24px, 5vw, 52px) auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 4vw, 32px);
  align-items: center;
}

.gallery img {
  width: 100%;
  height: auto;
  display: block;
  border: clamp(4px, 0.8vw, 7px) solid var(--tan);
  border-radius: 12px;
  background: var(--black);
  box-shadow: 0 0 18px rgba(216, 189, 138, 0.14);
}

.site-footer {
  width: min(100%, 620px);
  margin: clamp(42px, 9vw, 96px) auto 0;
  padding: 0 0 10px;
  color: var(--tan);
  font-size: clamp(1.2rem, 3.4vw, 2rem);
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.site-footer a {
  color: var(--cream);
  text-decoration-color: var(--tan);
  text-underline-offset: 0.14em;
}

.code-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  width: min(100%, 960px);
  margin: 0 auto;
  padding: clamp(24px, 8vw, 72px) 18px;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 28px;
  text-align: center;
}

.code-string {
  width: min(100%, 800px);
  margin: 0;
  padding: clamp(18px, 4vw, 30px);
  border: clamp(5px, 1vw, 8px) solid var(--tan);
  border-radius: 28px;
  background: rgba(0, 0, 0, 0.74);
  color: var(--cream);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1rem, 3vw, 1.6rem);
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
  box-shadow:
    inset 0 0 0 5px #000,
    0 0 26px rgba(216, 189, 138, 0.14);
}

@media (max-width: 760px) {
  .page-shell {
    padding-inline: 10px;
  }

  .title-capsule {
    border-radius: 34px;
  }

  .hero-frame {
    width: min(96vw, 640px);
  }

  .action-grid {
    width: min(100%, 430px);
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 380px) {
  .gallery {
    grid-template-columns: 1fr;
    width: min(88%, 290px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
