/* ==========================================================================
   ODDOX 3D STUDIO — Noir Graphic-Novel Theme
   Palette locked to CHANNEL_BIBLE.md: Midnight Indigo, Warm Amber-Gold,
   Brainwave Cyan, Terracotta & Crisp Comic Ink Outlines (#0b0e16)
   ========================================================================== */
:root {
  --bg-deep: #0b101d;
  --bg-indigo: #101726;
  --bg-slate: #182338;
  --bg-card: #1b273e;
  --bg-card-hover: #21304d;
  --ink: #070a11;
  --border-ink: #0a0d16;
  --border-subtle: rgba(245, 209, 128, 0.22);

  --amber: #e89b3c;
  --gold: #f5c76b;
  --cream: #fff3d6;
  --cyan: #4ce0e8;
  --cyan-glow: rgba(76, 224, 232, 0.35);
  --terracotta: #c85b3d;
  --mustard: #d99b26;

  --text-main: #f3f5fa;
  --text-muted: #b1bdd3;
  --text-dim: #7f8fa9;

  --shadow-comic: 5px 5px 0px #060910;
  --shadow-comic-sm: 3px 3px 0px #060910;
  --radius-panel: 14px;
  --radius-btn: 10px;
}

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

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

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(76, 224, 232, 0.11), transparent 65%),
    radial-gradient(ellipse 60% 45% at 90% 25%, rgba(232, 155, 60, 0.10), transparent 60%),
    linear-gradient(180deg, #0b101d 0%, #101726 55%, #0c1220 100%);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-wordmark {
  font-family: "Rubik", "Space Grotesk", "Segoe UI", sans-serif;
  letter-spacing: -0.015em;
  margin: 0;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.18s ease, opacity 0.18s ease;
}

a:hover {
  color: var(--gold);
}

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

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

/* ---------- Header / Navbar ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 16, 29, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 3px solid var(--border-ink);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 10px 0;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
}

.brand-avatar {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  border: 2.5px solid var(--ink);
  box-shadow: var(--shadow-comic-sm);
}

.brand-wordmark {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--ink);
}

.brand-wordmark .cyan-o {
  color: var(--cyan);
  text-shadow: 0 0 12px var(--cyan-glow), 2px 2px 0 var(--ink);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.lang-switch {
  display: inline-flex;
  background: var(--bg-slate);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 3px;
  box-shadow: var(--shadow-comic-sm);
  gap: 2px;
}

.lang-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: "Rubik", sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 5px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.lang-btn.active {
  background: var(--amber);
  color: var(--ink);
  box-shadow: 0 0 0 2px var(--ink);
}

.lang-btn:hover:not(.active) {
  color: var(--cream);
}

/* ---------- Hero Section ---------- */
.hero {
  padding: 38px 0 46px;
}

.hero-frame {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 3.5px solid var(--ink);
  box-shadow: 8px 8px 0px #060910, 0 22px 50px rgba(0, 0, 0, 0.55);
  background: #0d1424;
}

.hero-banner-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-content {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 24px;
  align-items: center;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(76, 224, 232, 0.12);
  color: var(--cyan);
  border: 2px solid rgba(76, 224, 232, 0.45);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.hero-title {
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  line-height: 1.15;
  color: var(--cream);
  text-shadow: 3px 3px 0 var(--ink);
  margin-bottom: 14px;
}

.hero-title .accent-gold {
  color: var(--gold);
}

.hero-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0;
  max-width: 60ch;
}

.channel-cta-card {
  background: var(--bg-card);
  border: 3px solid var(--ink);
  border-radius: var(--radius-panel);
  padding: 20px;
  box-shadow: var(--shadow-comic);
}

.channel-cta-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 12px;
}

.cta-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-btn);
  border: 2.5px solid var(--ink);
  font-family: "Rubik", sans-serif;
  font-weight: 700;
  font-size: 0.96rem;
  box-shadow: var(--shadow-comic-sm);
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px #060910;
}

.btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px #060910;
}

.btn-primary {
  background: linear-gradient(180deg, #f3ba57 0%, #df922f 100%);
  color: var(--ink);
}

.btn-primary:hover {
  color: var(--ink);
  filter: brightness(1.05);
}

.btn-secondary {
  background: linear-gradient(180deg, #273959 0%, #1c2a44 100%);
  color: var(--cream);
}

.btn-secondary:hover {
  color: var(--gold);
}

.btn-tag {
  font-size: 0.74rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(7, 10, 17, 0.28);
  border: 1.5px solid rgba(7, 10, 17, 0.45);
  letter-spacing: 0.04em;
}

.btn-secondary .btn-tag {
  background: rgba(76, 224, 232, 0.14);
  border-color: rgba(76, 224, 232, 0.4);
  color: var(--cyan);
}

/* ---------- Brainwave Divider ---------- */
.wave-divider {
  margin: 12px 0 6px;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0.85;
}

.wave-divider::before,
.wave-divider::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(76, 224, 232, 0.35), transparent);
}

/* ---------- Sections ---------- */
.section {
  padding: 44px 0;
}

.section-head {
  margin-bottom: 24px;
}

.section-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 6px;
}

.section-title {
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
  color: var(--cream);
  text-shadow: 2px 2px 0 var(--ink);
}

.section-sub {
  color: var(--text-muted);
  margin: 8px 0 0;
  max-width: 68ch;
}

/* ---------- Episodes Grid ---------- */
.episodes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.panel-card {
  background: var(--bg-card);
  border: 3px solid var(--ink);
  border-radius: var(--radius-panel);
  overflow: hidden;
  box-shadow: var(--shadow-comic);
  transition: transform 0.16s ease, background-color 0.16s ease;
}

.panel-card:hover {
  transform: translateY(-3px);
  background: var(--bg-card-hover);
}

.ep-thumb-wrap {
  position: relative;
  border-bottom: 3px solid var(--ink);
  background: #0b101d;
}

.ep-thumb-wrap img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.ep-format-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(11, 16, 29, 0.9);
  color: var(--gold);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ep-body {
  padding: 18px 20px 20px;
}

.ep-body h3 {
  font-size: 1.2rem;
  color: var(--cream);
  margin-bottom: 8px;
}

.ep-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* ---------- Cast Grid ---------- */
.cast-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.cast-card {
  background: var(--bg-card);
  border: 3px solid var(--ink);
  border-radius: var(--radius-panel);
  overflow: hidden;
  box-shadow: var(--shadow-comic);
  display: flex;
  flex-direction: column;
  transition: transform 0.16s ease;
}

.cast-card:hover {
  transform: translateY(-4px);
}

.cast-portrait-wrap {
  border-bottom: 3px solid var(--ink);
  background: #4d5c75;
}

.cast-portrait-wrap img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.cast-info {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.cast-role {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 6px;
  border: 2px solid var(--ink);
  color: var(--ink);
}

.role-leo { background: var(--gold); }
.role-arthur { background: var(--cyan); }
.role-zoe { background: #ef8a6c; }
.role-sam { background: #74c9b8; }

.cast-info h3 {
  font-size: 1.25rem;
  color: var(--cream);
  margin-top: 2px;
}

.cast-info p {
  margin: 0;
  font-size: 0.89rem;
  color: var(--text-muted);
}

/* ---------- Rubrics Grid ---------- */
.rubrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.rubric-card {
  background: var(--bg-card);
  border: 3px solid var(--ink);
  border-radius: var(--radius-panel);
  padding: 20px 22px;
  box-shadow: var(--shadow-comic);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.rubric-num {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--bg-indigo);
  border: 2.5px solid var(--ink);
  color: var(--gold);
  font-family: "Rubik", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-comic-sm);
}

.rubric-card h3 {
  font-size: 1.1rem;
  color: var(--cream);
  margin-bottom: 6px;
}

.rubric-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.93rem;
}

/* ---------- Studio Publisher / API Compliance Section ---------- */
.api-box {
  background:
    linear-gradient(135deg, rgba(24, 35, 56, 0.95), rgba(16, 23, 38, 0.98)),
    url("./assets/noir_lab_bg.jpg") center/cover no-repeat;
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-comic);
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: center;
}

.api-box h2 {
  font-size: 1.5rem;
  color: var(--cream);
  margin-bottom: 10px;
}

.api-box p {
  color: var(--text-muted);
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.scope-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scope-list li {
  background: rgba(11, 16, 29, 0.72);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.87rem;
  color: var(--text-muted);
}

.scope-list code {
  display: inline-block;
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  margin-bottom: 3px;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.inline-links a {
  font-weight: 700;
  font-size: 0.92rem;
  border-bottom: 2px solid rgba(76, 224, 232, 0.45);
  padding-bottom: 2px;
}

/* ---------- Legal Document Pages (Privacy / Terms) ---------- */
.legal-wrap {
  padding: 42px 0 64px;
}

.legal-card {
  max-width: 860px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 36px 40px;
  box-shadow: 7px 7px 0 #060910;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 10px 0 24px;
  padding-bottom: 18px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.legal-card h1 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  color: var(--gold);
  text-shadow: 2px 2px 0 var(--ink);
}

.legal-card h2 {
  font-size: 1.2rem;
  color: var(--cream);
  margin-top: 26px;
  margin-bottom: 10px;
  padding-left: 12px;
  border-left: 4px solid var(--cyan);
}

.legal-card p,
.legal-card li {
  color: var(--text-muted);
  font-size: 0.96rem;
}

.legal-card ul {
  padding-left: 20px;
  margin: 8px 0 14px;
}

.legal-card li {
  margin-bottom: 6px;
}

.highlight-callout {
  background: rgba(76, 224, 232, 0.08);
  border: 2px solid rgba(76, 224, 232, 0.38);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 16px 0;
  color: var(--text-main);
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 32px;
  border-top: 3px solid var(--ink);
  background: #080c16;
  padding: 28px 0 36px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.footer-copy {
  color: var(--text-dim);
  font-size: 0.88rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-content,
  .api-box {
    grid-template-columns: 1fr;
  }
  .cast-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .episodes-grid,
  .rubrics-grid,
  .cast-grid {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
  .legal-card {
    padding: 24px 20px;
  }
}
