/* ==========================================================================
   BALERIFT shared stylesheet
   Dark medieval-fantasy palette: charcoal, deep brown, gold/amber accents.
   Mobile-first; layout scales up at 640px and 960px breakpoints.
   ========================================================================== */

:root {
  --bg: #131008;
  --bg-raised: #1c1710;
  --bg-panel: #221b12;
  --border: #3a2f1e;
  --border-bright: #57462a;
  --text: #e6dcc3;
  --text-muted: #a3956f;
  --gold: #d4a017;
  --gold-bright: #f0c75e;
  --ember: #b3541e;
  --font-display: "Cinzel Decorative", serif;
  --font-heading: "Cinzel", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max-width: 72rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  /* Subtle stone/parchment texture: layered radial glows over a faint
     diagonal weave. Pure CSS, no texture image required. */
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(212, 160, 23, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(179, 84, 30, 0.05), transparent),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.012) 0 2px, transparent 2px 6px);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gold-bright);
  margin: 0 0 0.75rem;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

p {
  margin: 0 0 1rem;
}

a {
  color: var(--gold-bright);
  text-decoration-color: rgba(212, 160, 23, 0.4);
  text-underline-offset: 3px;
}

a:hover {
  color: #fff;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 3.5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-intro {
  text-align: center;
  color: var(--text-muted);
  max-width: 44rem;
  margin: 0 auto 2.5rem;
}

/* Ornamental divider under section titles */
.rule {
  width: 7rem;
  height: 2px;
  margin: 1rem auto 2rem;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* --------------------------------------------------------------------------
   Header & navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(19, 16, 8, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  text-decoration: none;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 1px solid var(--border-bright);
  border-radius: 4px;
  padding: 9px 8px;
  cursor: pointer;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--gold-bright);
}

.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
}

.site-nav.open {
  display: block;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem 1.25rem 1rem;
}

.site-nav a {
  display: block;
  padding: 0.6rem 0;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--gold-bright);
}

@media (min-width: 640px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: block;
    position: static;
    background: none;
    border: 0;
  }

  .site-nav ul {
    display: flex;
    gap: 1.75rem;
    padding: 0;
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  padding: 0.85rem 1.75rem;
  border-radius: 4px;
  border: 1px solid var(--gold);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #1a1408;
  box-shadow: 0 0 24px rgba(212, 160, 23, 0.25);
}

.btn-primary:hover {
  color: #000;
  box-shadow: 0 0 32px rgba(212, 160, 23, 0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--gold-bright);
}

.btn-secondary:hover {
  background: rgba(212, 160, 23, 0.1);
  color: var(--gold-bright);
}

/* --------------------------------------------------------------------------
   Hero (home page)
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 82vh;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(19, 16, 8, 0.55) 0%, rgba(19, 16, 8, 0.75) 60%, var(--bg) 100%),
    url("/images/art-pending.svg") center / cover no-repeat; /* swap to /images/hero-key-art.png */
}

.hero-inner {
  width: 100%;
  padding: 5rem 1.25rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 10vw, 5.5rem);
  letter-spacing: 0.12em;
  margin: 0 0 1rem;
  color: var(--gold-bright);
  text-shadow: 0 0 40px rgba(212, 160, 23, 0.35), 0 4px 12px rgba(0, 0, 0, 0.8);
}

.hero-genre {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.hero-tagline {
  font-size: 1.15rem;
  max-width: 38rem;
  margin: 0 auto 2.25rem;
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: center;
}

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   Cards & feature layouts
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem;
}

.card h3 {
  margin-top: 0;
}

.card p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Alternating image/text rows on the Features page */
.feature-row {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.feature-row:last-of-type {
  border-bottom: 0;
}

.feature-row img {
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  width: 100%;
}

.feature-row p {
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .feature-row {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .feature-row:nth-of-type(even) .feature-media {
    order: 2;
  }
}

/* --------------------------------------------------------------------------
   Media page: gallery + trailer
   -------------------------------------------------------------------------- */

.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.gallery-grid img:hover {
  border-color: var(--gold);
  transform: scale(1.02);
}

.trailer-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 56rem;
  margin: 0 auto;
  background: var(--bg-panel);
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  overflow: hidden;
}

.trailer-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.trailer-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-family: var(--font-heading);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.trailer-placeholder::before {
  content: "▶";
  font-size: 3rem;
  color: var(--gold);
}

/* --------------------------------------------------------------------------
   Newsletter
   -------------------------------------------------------------------------- */

.newsletter {
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 28rem;
  margin: 1.5rem auto 0;
}

.newsletter-form input[type="email"] {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border-bright);
  border-radius: 4px;
  color: var(--text);
}

.newsletter-form input[type="email"]:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

@media (min-width: 640px) {
  .newsletter-form {
    flex-direction: row;
  }

  .newsletter-form input[type="email"] {
    flex: 1;
  }
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* --------------------------------------------------------------------------
   About page
   -------------------------------------------------------------------------- */

.about-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2rem;
  max-width: 46rem;
  margin: 0 auto;
}

.social-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.social-list a {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--border-bright);
  border-radius: 4px;
}

.social-list a:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

/* --------------------------------------------------------------------------
   404 page
   -------------------------------------------------------------------------- */

.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  text-align: center;
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 18vw, 8rem);
  color: var(--gold);
  margin: 0;
  line-height: 1;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 3rem;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: center;
  text-align: center;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.footer-nav a {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
}

.footer-nav a:hover {
  color: var(--gold-bright);
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}
