/* =========================================================
   HeartxStruck — palette pulled from Banner1.jpg / logo gif
   ========================================================= */
:root {
  --red:        #7d0d19;
  --red-dark:   #4d0810;
  --red-bright: #a3141f;
  --ink:        #141110;
  --black:      #0b0a0a;
  --cream:      #faf7f4;
  --cream-dim:  #ece5df;
  --cyan:       #4fd8e0;
  --magenta:    #d84fa0;
  --yellow:     #e0b23f;

  --font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --header-h: 72px;
  --container-w: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow: hidden; /* released by JS once splash is dismissed */
}
body.is-unlocked { overflow: auto; }
body.lightbox-open { overflow: hidden; }

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

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   SPLASH
   ========================================================= */
#splash {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at center, var(--red-dark) 0%, var(--black) 78%);
  cursor: pointer;
  transition: opacity .6s ease, visibility .6s ease;
}
#splash.is-dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-inner {
  text-align: center;
  padding: 0 20px;
  animation: splash-in 1s ease both;
}
.splash-logo {
  width: min(640px, 86vw);
  filter: drop-shadow(0 0 28px rgba(0,0,0,.55));
  margin: 0 auto;
}
.splash-prompt {
  margin-top: 28px;
  font-family: var(--font-body);
  letter-spacing: .28em;
  text-transform: uppercase;
  font-size: .78rem;
  color: var(--cream-dim);
  opacity: .75;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: .4; }
  50% { opacity: .9; }
}
@keyframes splash-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   HEADER / NAV
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(11, 10, 10, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .06em;
  font-size: 1.25rem;
  color: var(--cream);
  text-decoration: none;
}
.brand-x { color: var(--red-bright); }

.site-nav { display: flex; gap: 8px; }
.nav-link {
  color: var(--cream-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  padding: 10px 16px;
  border-radius: 6px;
  transition: color .2s ease, background .2s ease;
}
.nav-link:hover,
.nav-link.is-active {
  color: var(--cream);
  background: rgba(163, 20, 31, .35);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--cream);
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   BANNER
   ========================================================= */
.banner {
  position: relative;
  width: 100%;
  line-height: 0;
  background: var(--black);
}
.banner-img { width: 100%; height: auto; }
.banner-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, var(--black) 100%);
  pointer-events: none;
}

/* =========================================================
   SIGNUP CTA
   ========================================================= */
.signup {
  /* starts black to pick up exactly where .banner-fade leaves off, blooms
     into red behind the CTA copy, then settles before the hard cut to cream */
  background: linear-gradient(
    180deg,
    var(--black) 0%,
    var(--red-dark) 22%,
    var(--red-bright) 55%,
    var(--red-dark) 100%
  );
  padding: 44px 0;
}
.signup-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.signup-eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .76rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--yellow);
  margin: 0 0 8px;
}
.signup-copy h2 {
  font-family: var(--font-display);
  color: var(--cream);
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  margin: 0 0 4px;
}
.signup-copy p {
  color: var(--cream-dim);
  margin: 0;
  font-size: .98rem;
}

.signup-form { flex: 0 1 auto; }
.signup-fields {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.signup-input {
  font-family: var(--font-body);
  font-size: .95rem;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1.5px solid rgba(250, 247, 244, .35);
  background: rgba(11, 10, 10, .25);
  color: var(--cream);
  min-width: 200px;
}
.signup-input::placeholder { color: rgba(250, 247, 244, .65); }
.signup-input:focus {
  outline: none;
  border-color: var(--cream);
  background: rgba(11, 10, 10, .4);
}

.signup-submit {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .95rem;
  padding: 12px 26px;
  border-radius: 8px;
  border: none;
  background: var(--ink);
  color: var(--cream);
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}
.signup-submit:hover { background: var(--black); }
.signup-submit:active { transform: scale(.97); }
.signup-submit:disabled { opacity: .6; cursor: not-allowed; }

.signup-status {
  margin: 10px 0 0;
  font-size: .85rem;
  color: var(--cream);
  min-height: 1.2em;
}
.signup-status.is-error { color: #ffd7d7; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   SECTIONS (general)
   ========================================================= */
.section { padding: 96px 0; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 20px;
}
.title-line {
  width: 46px;
  height: 4px;
  background: var(--red);
  border-radius: 2px;
  flex-shrink: 0;
}
.section-lede {
  max-width: 62ch;
  color: #4a3f3c;
  font-size: 1.05rem;
  margin: 0 0 44px;
}

/* ABOUT */
.section-about { background: var(--cream); }
.about-copy { max-width: 74ch; }
.about-copy p {
  font-size: 1.08rem;
  color: #2c2422;
  margin: 0 0 22px;
}
.about-copy .about-hook {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--red);
  font-weight: 600;
  line-height: 1.5;
  margin-top: 32px;
}

/* =========================================================
   CHARACTERS
   ========================================================= */
.section-characters { background: var(--cream-dim); }

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}
.filter-btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .88rem;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid rgba(20,17,16,.18);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: all .2s ease;
}
.filter-btn:hover { border-color: var(--red); color: var(--red); }
.filter-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.char-card {
  background: var(--cream);
  border: 1px solid rgba(20,17,16,.08);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, opacity .2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.char-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(20,10,10,.12);
}
.char-card[open] { box-shadow: 0 14px 30px rgba(20,10,10,.14); }
.char-card.is-hidden { display: none; }

.char-card summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  -webkit-tap-highlight-color: transparent;
}
.char-card summary::-webkit-details-marker { display: none; }

.char-avatar {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .92rem;
  color: var(--black);
  background: var(--yellow);
}
[data-group~="cryptic-vision"] .char-avatar { background: var(--cyan); }
[data-group~="ravens-crown"] .char-avatar { background: var(--magenta); color: var(--cream); }
[data-group="allies"] .char-avatar { background: var(--yellow); }

.char-heading { flex: 1; min-width: 0; }
.char-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}
.char-name em { font-style: italic; color: var(--red); font-size: .92em; }
.char-role {
  display: block;
  font-size: .85rem;
  color: #6b5f5c;
  margin-top: 2px;
}

.char-chevron {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  position: relative;
}
.char-chevron::before,
.char-chevron::after {
  content: "";
  position: absolute;
  background: var(--ink);
  border-radius: 2px;
}
.char-chevron::before { width: 12px; height: 2px; top: 10px; left: 5px; }
.char-chevron::after { width: 2px; height: 12px; top: 5px; left: 10px; transition: transform .22s ease; }
.char-card[open] .char-chevron::after { transform: rotate(90deg); }

.char-body {
  padding: 0 20px 22px;
  border-top: 1px solid rgba(20,17,16,.08);
  margin-top: 2px;
  padding-top: 16px;
}
.char-subrole {
  font-size: .88rem;
  font-style: italic;
  color: var(--red);
  margin: -6px 0 14px;
}
.char-stats {
  display: flex;
  gap: 22px;
  margin: 0 0 16px;
  flex-wrap: wrap;
}
.char-stats > div { text-align: left; }
.char-stats dt {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #8a7d79;
}
.char-stats dd {
  margin: 2px 0 0;
  font-weight: 600;
  color: var(--ink);
}
.char-lists p {
  font-size: .92rem;
  color: #3a312e;
  margin: 0 0 10px;
}
.char-lists strong { color: var(--red); }

/* =========================================================
   GALLERY
   ========================================================= */
.section-gallery { background: var(--cream); }

.gallery-grid {
  column-count: 4;
  column-gap: 16px;
}
.gallery-item {
  display: block;
  width: 100%;
  break-inside: avoid;
  margin: 0 0 16px;
  padding: 0;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--cream-dim);
  line-height: 0;
  position: relative;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .35s ease, filter .35s ease;
}
.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px rgba(20,10,10,.18);
}
.gallery-item:hover img {
  transform: scale(1.04);
}
.gallery-item:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
}

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 10, 10, .94);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.lightbox-figure {
  margin: 0;
  max-width: min(88vw, 1100px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox-caption {
  color: var(--cream-dim);
  font-family: var(--font-display);
  font-size: 1.02rem;
  text-align: center;
}

.lightbox-btn {
  position: absolute;
  z-index: 2;
  border: none;
  background: rgba(250, 247, 244, .14);
  color: var(--cream);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, transform .15s ease;
}
.lightbox-btn:hover { background: rgba(250, 247, 244, .26); }
.lightbox-btn:active { transform: scale(.94); }

.lightbox-close {
  top: 22px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
}
.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

/* =========================================================
   CREATORS
   ========================================================= */
.section-creators { background: var(--ink); color: var(--cream-dim); }
.section-creators .section-title { color: var(--cream); }
.section-creators .title-line { background: var(--red-bright); }
.creators-copy { max-width: 74ch; }
.creators-copy p {
  font-size: 1.05rem;
  color: #d7cdc9;
  margin: 0 0 20px;
}
.creators-copy .creators-tagline {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--cream);
  border-left: 3px solid var(--red-bright);
  padding-left: 18px;
  margin-top: 30px;
}

.creator-cards {
  display: flex;
  gap: 20px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.creator-card {
  flex: 1 1 200px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  padding: 28px 24px;
}
.creator-initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--red-bright);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 14px;
}
.creator-card h3 {
  font-family: var(--font-display);
  margin: 0 0 4px;
  color: var(--cream);
}
.creator-card p { margin: 0; color: #b9adaa; font-size: .92rem; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--black);
  color: #a89c98;
  padding: 40px 0;
  font-size: .88rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.brand-footer { font-size: 1.05rem; }
.back-to-top { color: #a89c98; text-decoration: none; }
.back-to-top:hover { color: var(--cream); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1000px) {
  .gallery-grid { column-count: 3; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(11,10,10,.98);
    flex-direction: column;
    padding: 10px 16px 18px;
    gap: 2px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-link { width: 100%; }
  .section { padding: 64px 0; }
  .footer-inner { flex-direction: column; text-align: center; }

  .signup-inner { flex-direction: column; align-items: stretch; text-align: center; }
  .signup-fields { flex-direction: column; }
  .signup-input, .signup-submit { min-width: 0; width: 100%; }

  .gallery-grid { column-count: 2; column-gap: 10px; }
  .gallery-item { margin-bottom: 10px; border-radius: 8px; }

  .lightbox-figure { max-width: 94vw; }
  .lightbox-prev, .lightbox-next { width: 42px; height: 42px; font-size: 1.6rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: 12px; right: 12px; width: 38px; height: 38px; font-size: 1.4rem; }
}
