:root {
  --bg: #07090c;
  --bg-elevated: #10151c;
  --bg-soft: #151c26;
  --text: #f4f7fb;
  --text-muted: #9aa8b8;
  --gold: #f5c518;
  --coral: #e23b2f;
  --teal: #3ec9b8;
  --line: rgba(255, 255, 255, 0.08);
  --radius: 4px;
  --font-sans: "Outfit", system-ui, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(62, 201, 184, 0.12), transparent 55%),
    radial-gradient(900px 500px at -10% 20%, rgba(245, 197, 24, 0.08), transparent 50%),
    linear-gradient(180deg, #0a0e14 0%, var(--bg) 40%, #05070a 100%);
  line-height: 1.6;
}

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

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  color: #ffd95a;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: #111;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(7, 9, 12, 0.82);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand img {
  width: clamp(70px, 18vw, 100px);
  height: auto;
  border-radius: 2px;
}

.site-header--home {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  backdrop-filter: none;
  border-bottom: none;
}

.site-header--home .header-inner {
  padding: 0.45rem 0;
  justify-content: flex-end;
}

.site-header--home .brand--spacer {
  display: none;
}

.site-header--home .site-nav a {
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.site-header--home .site-nav a:hover,
.site-header--home .site-nav a.is-active {
  color: #fff;
}

.site-header--home .nav-toggle {
  border-color: rgba(255, 255, 255, 0.35);
}

.site-header--home .nav-toggle span {
  background: #fff;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--text);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  background: transparent;
  padding: 0.55rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: var(--text);
}

/* Full-bleed hero with parallax scroll */
.hero-stage {
  position: relative;
  height: min(100vh, 920px);
  min-height: 420px;
  overflow: hidden;
  isolation: isolate;
  background: #05070a;
}

.hero-parallax {
  position: absolute;
  inset: 0;
}

.hero-parallax-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  animation: hero-reveal 1.2s ease forwards;
}

.hero-fade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 9, 12, 0.22) 0%, transparent 18%),
    linear-gradient(180deg, transparent 82%, rgba(7, 9, 12, 0.55) 93%, var(--bg) 100%);
}

.pitch {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
}

.pitch-inner {
  max-width: 40rem;
  margin-inline: auto;
  opacity: 0;
  animation: rise-in 0.85s ease 0.15s forwards;
}

.pitch h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.2vw, 2.85rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.9rem;
}

.pitch p {
  color: var(--text-muted);
  font-size: clamp(1.02rem, 2vw, 1.15rem);
  margin: 0 auto 1.6rem;
  max-width: 36rem;
}

.pitch .cta-row {
  justify-content: center;
  gap: 1.5rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

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

.btn-primary {
  background: var(--gold);
  color: #14110a;
}

.btn-primary:hover {
  background: #ffd95a;
  color: #14110a;
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--teal);
  color: var(--text);
}

.btn-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}

.btn-youtube,
.btn-instagram {
  background: #444;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.58rem 1rem;
}

.btn-youtube:hover,
.btn-instagram:hover {
  background: #555;
  color: #fff;
}

.btn-coral {
  background: var(--coral);
  color: #fff;
}

.btn-coral:hover {
  background: #f14a3d;
  color: #fff;
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Sections */
.section {
  padding: 4rem 0;
}

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

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 0.5rem;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
  max-width: 40rem;
}

.eyebrow {
  display: inline-block;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

/* Video / character grids — interaction containers */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.media-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(12px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.media-card.is-visible {
  opacity: 1;
  transform: none;
  animation: card-in 0.55s ease forwards;
}

.media-card:hover {
  border-color: rgba(245, 197, 24, 0.35);
}

.media-card .thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-soft);
}

.media-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.media-card:hover .thumb img {
  transform: scale(1.04);
}

.media-card .body {
  padding: 1.1rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.media-card .type {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  font-weight: 600;
}

.media-card h3 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
}

.media-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  flex: 1;
}

.media-card .actions {
  margin-top: 0.5rem;
}

/* Story */
.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 2.5rem;
  align-items: start;
}

.story-media {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  position: sticky;
  top: 5rem;
}

.story-media img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.solarpunk {
  padding-top: 1.5rem;
}

.solarpunk-inner {
  max-width: 40rem;
  text-align: center;
}

.solarpunk-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 0.85rem;
}

.solarpunk-inner p {
  margin: 0;
  color: var(--text-muted);
}

.article {
  max-width: none;
}

.article h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0 0 1rem;
}

.article .lede {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 1.75rem;
}

.prose {
  color: #d5dde8;
}

.prose p {
  margin: 0 0 1.1rem;
}

.prose h2 {
  font-family: var(--font-display);
  margin: 2rem 0 0.75rem;
}

/* Character detail */
.character-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2rem;
  align-items: center;
  padding: 3rem 0;
}

.character-hero .portrait {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.character-hero .portrait img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.character-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0.35rem 0 0.75rem;
}

.character-hero .role {
  color: var(--gold);
  font-weight: 600;
}

/* Producers */
.producers-layout {
  padding: 3rem 0 4rem;
}

.producer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.producer-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.producer-photo {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  margin-bottom: 0.35rem;
}

.producer-photo img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.producer-card h2 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 1.5rem;
}

.producer-card .role {
  color: var(--teal);
  font-weight: 600;
}

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

.page-intro {
  padding: 2.5rem 0 0.5rem;
}

.page-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0.2rem 0 0.6rem;
}

.page-intro p {
  margin: 0;
  color: var(--text-muted);
  max-width: 38rem;
}

.empty-state {
  color: var(--text-muted);
  padding: 2rem 0;
}

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

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

.footer-left {
  display: grid;
  gap: 0.35rem;
}

.footer-brand {
  font-family: var(--font-display);
  margin: 0;
  font-size: 1.15rem;
}

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

.footer-disclaimer {
  margin: 0;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-align: right;
  max-width: 18rem;
}

.footer-right {
  display: grid;
  gap: 0.4rem;
  justify-items: end;
  text-align: right;
}

.footer-contact {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-contact:hover {
  color: var(--gold);
}

/* Admin */
.admin-body {
  background: #0b1017;
  color: var(--text);
  font-family: var(--font-sans);
  margin: 0;
  min-height: 100vh;
}

.admin-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.admin-side {
  background: #0e141d;
  border-right: 1px solid var(--line);
  padding: 1.5rem 1rem;
}

.admin-side a {
  display: block;
  color: var(--text-muted);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 0.2rem;
}

.admin-side a:hover,
.admin-side a.is-active {
  background: rgba(245, 197, 24, 0.1);
  color: var(--text);
}

.admin-main {
  padding: 1.5rem;
}

.admin-main h1 {
  margin-top: 0;
  font-family: var(--font-display);
}

.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.admin-login form {
  width: min(100%, 380px);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-row input[type="text"],
.form-row input[type="password"],
.form-row input[type="url"],
.form-row input[type="number"],
.form-row select,
.form-row textarea {
  width: 100%;
  background: #0a0f16;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.form-row textarea {
  min-height: 140px;
  resize: vertical;
}

.form-row textarea.tall {
  min-height: 280px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.table th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85rem;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.flash-ok {
  background: rgba(62, 201, 184, 0.15);
  border: 1px solid rgba(62, 201, 184, 0.35);
}

.flash-err {
  background: rgba(226, 59, 47, 0.15);
  border: 1px solid rgba(226, 59, 47, 0.35);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.stat strong {
  display: block;
  font-size: 1.6rem;
  font-family: var(--font-display);
}

.thumb-sm {
  width: 72px;
  height: 40px;
  object-fit: cover;
  border-radius: 2px;
}

.inline-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes hero-reveal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-parallax-img {
    animation: none;
    opacity: 1;
  }

  .pitch-inner {
    animation: none;
    opacity: 1;
  }
}

@media (max-width: 800px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    right: 1rem;
    top: 4.2rem;
    flex-direction: column;
    align-items: flex-start;
    background: #0e141d;
    border: 1px solid var(--line);
    padding: 1rem;
    min-width: 180px;
  }

  .site-nav.is-open {
    display: flex;
  }

  .character-hero {
    grid-template-columns: 1fr;
  }

  .story-layout {
    grid-template-columns: 1fr;
  }

  .story-media {
    position: static;
    order: -1;
  }

  .producer-grid {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    height: auto;
    min-height: 0;
    aspect-ratio: 2048 / 1143;
  }

  .hero-parallax-img {
    object-fit: contain;
    object-position: center center;
  }

  .hero-fade {
    background:
      linear-gradient(180deg, rgba(7, 9, 12, 0.18) 0%, transparent 14%),
      linear-gradient(180deg, transparent 78%, rgba(7, 9, 12, 0.5) 92%, var(--bg) 100%);
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-side {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  html,
  body {
    background: #fff !important;
    color: #000 !important;
    min-height: 0;
  }

  body:has(.character-hero) .skip-link,
  body:has(.character-hero) .site-header,
  body:has(.character-hero) .site-footer,
  body:has(.character-hero) .character-hero p:has(.btn) {
    display: none !important;
  }

  body:has(.character-hero),
  body:has(.character-hero) * {
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  .character-hero {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 6mm;
    padding: 0;
    width: 100%;
    max-width: none;
  }

  .character-hero .portrait {
    width: 80mm;
    max-width: 80mm;
    margin-inline: auto;
    background: #fff;
    border-color: #bbb;
  }

  .character-hero .portrait img {
    width: 100%;
    max-width: 80mm;
    max-height: 107mm;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
  }

  .character-hero h1 {
    font-size: 18pt;
    line-height: 1.15;
    margin: 0.1rem 0 0.45rem;
  }

  .character-hero .eyebrow {
    font-size: 8pt;
    margin-bottom: 0.2rem;
  }

  .character-hero .prose p {
    font-size: 10.5pt;
    line-height: 1.4;
    margin: 0 0 0.55rem;
  }

  .character-hero a {
    text-decoration: none;
  }
}
