/* ============================================================
   Same Brain Productions — site.css
   Dark earthy palette | Raleway (headings) + Nunito (body)
   ============================================================ */

/* ── Variables ────────────────────────────────────────────── */
:root {
  --bg:        #1a1510;
  --bg2:       #241c14;
  --bg3:       #2e2418;
  --fg:        #ede5d8;
  --muted:     #9a8a76;
  --orange:    #e07830;
  --red:       #c23828;
  --border:    rgba(237, 229, 216, 0.1);
  --radius:    12px;
  --font-head: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, sans-serif;
  --max-w:     1100px;
  --still-img: url('/assets/img/SBP_Logo_PH.jpg'); /* homepage hero, video poster, inner-page backgrounds */
}

/* ── Page Background (non-index) ─────────────────────────── */
/* A fixed layer sized to the viewport (not the page), so long pages on phones don't blow the
   image up. Works on iOS, unlike background-attachment: fixed. */
body.page-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg);
  background-image: linear-gradient(rgba(26,21,16,0.75), rgba(26,21,16,0.75)),
                    var(--still-img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* Portrait screens: show the whole image at full width (no crop, no stretch) on the dark bg */
@media (max-aspect-ratio: 1/1) {
  body.page-bg::before { background-size: cover, 100% auto; }
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
}
img { display: block; max-width: 100%; }
a { color: var(--fg); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--orange); }

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
}
h1 { font-size: clamp(2rem,   5vw, 3.25rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem);  }
h3 { font-size: clamp(1.05rem,2vw, 1.4rem);  }
.muted { color: var(--muted); }

/* ── Utilities ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.btn {
  display: inline-block;
  padding: 10px 26px;
  background: var(--orange);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}
.btn:hover { background: var(--red); color: #fff; transform: translateY(-1px); }
.btn--outline {
  background: transparent;
  border: 2px solid var(--orange);
  color: var(--orange);
}
.btn--outline:hover { background: var(--orange); color: #fff; }

/* ── Navigation ───────────────────────────────────────────── */
.sbp-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: rgba(26, 21, 16, 0.94);
  backdrop-filter: blur(8px) saturate(130%);
  border-bottom: 1px solid var(--border);
}
.sbp-logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--fg);
  white-space: nowrap;
  flex-shrink: 0;
}
.sbp-logo:hover { color: var(--red); }
.sbp-logo { display: inline-flex; align-items: center; gap: 10px; }
.sbp-logo img { display: block; height: 40px; width: auto; }
@media (max-width: 480px) { .sbp-logo img { height: 32px; } }
.sbp-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
}
.sbp-nav ul a {
  display: block;
  padding: 7px 14px;
  border-radius: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  transition: color 0.15s, background 0.15s;
}
.sbp-nav ul a:hover     { color: var(--orange); background: rgba(224,120,48,0.08); }
.sbp-nav ul a.active    { color: var(--red); }
.sbp-burger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 7px 12px;
  color: var(--fg);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  /* Always full width at the video's 16:9: the whole frame shows at any screen size */
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-color: var(--bg);
  background-image: var(--still-img);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* Hero video plays clean (no overlay); fades in once it's actually playing */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-video.is-playing { opacity: 1; }

/* Invisible link over the whole hero (video, still, spinner) → Projects */
.hero-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: pointer;
}

/* Loading spinner shown while the video buffers */
.hero-loader {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  border-radius: var(--radius);
  background: rgba(26, 21, 16, 0.55);
}
.hero-loader[hidden] { display: none; }
.spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid rgba(237, 229, 216, 0.15);
  border-top-color: var(--orange);
  border-right-color: var(--red);
  animation: sbp-spin 0.9s linear infinite;
}
.hero-loader-text {
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
}
@keyframes sbp-spin { to { transform: rotate(360deg); } }

/* Tagline + CTA, moved below the video */
.tagline-band {
  padding: 36px 24px 8px;
  text-align: center;
}
.hero-tagline {
  margin-top: 0;
  font-family: var(--font-head);
  font-size: clamp(0.9rem, 2.2vw, 1.2rem);
  font-weight: 300;
  font-style: italic;
  color: var(--muted);
  letter-spacing: 0.1em;
  position: relative;
}
.hero-cta { margin-top: 30px; position: relative; }

/* ── Page Header ──────────────────────────────────────────── */
.page-header {
  padding: 56px 24px 16px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.page-header p { color: var(--muted); margin-top: 8px; }

/* ── Sections ─────────────────────────────────────────────── */
.section { padding: 64px 24px; }
.section--alt { background: var(--bg2); }
.section-inner { max-width: var(--max-w); margin: 0 auto; }
.section-label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}

/* ── Company Statement ────────────────────────────────────── */
.statement {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.statement h2 { margin-bottom: 18px; }
.statement p  { color: var(--muted); font-size: 1.05rem; }

/* ── Featured Card ────────────────────────────────────────── */
.featured-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 28px 32px;
  overflow: hidden;
}
.featured-card h3   { margin: 10px 0 10px; }
.featured-card p    { color: var(--muted); margin-bottom: 22px; line-height: 1.6; }
.featured-card-thumb {
  display: block;
  width: calc(100% + 64px);
  margin: -28px -32px 20px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.badge--outnow        { background: rgba(212,160,23,0.14);  color: #d4a017;     border: 1px solid rgba(212,160,23,0.32); }
.badge--post          { background: rgba(74,170,136,0.13);  color: #4aaa88;     border: 1px solid rgba(74,170,136,0.30); }
.badge--production    { background: rgba(224,120,48,0.14); color: var(--orange); border: 1px solid rgba(224,120,48,0.28); }
.badge--preproduction { background: rgba(194, 56,40,0.11); color: var(--red);    border: 1px solid rgba(194, 56,40,0.24); }
.badge--default       { background: rgba(154,138,118,0.13); color: var(--muted); border: 1px solid rgba(154,138,118,0.22); }

/* ── Mood Image Section ───────────────────────────────────── */
.section--mood {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* ── Projects Grid ────────────────────────────────────────── */
.projects-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.project-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.project-card:hover { border-color: rgba(194,56,40,0.45); transform: translateY(-2px); }
.project-card h3    { font-size: 1.1rem; }
.project-actions {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
/* Round project icon beside "Visit Site": whole artwork fits inside the circle */
.project-icon {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  padding: 9px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--bg3);
  border: 2px solid rgba(194,56,40,0.45);
}
.project-card-thumb {
  display: block;
  width: calc(100% + 48px);
  margin: -24px -24px 8px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Buttons on a project card: Learn More / Visit Site (wrap on narrow cards) */
.project-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.btn--sm { padding: 6px 16px; font-size: 0.82rem; }

/* ── In the works: Secret projects (code names only) ─────── */
.works-intro { text-align: center; margin: -4px auto 28px; max-width: 520px; }
.project-card--secret {
  background: repeating-linear-gradient(135deg, rgba(237,229,216,0.025) 0 12px, transparent 12px 24px), var(--bg3);
  border-style: dashed;
}
.secret-name {
  font-family: var(--font-head);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.secret-format  { color: var(--orange); font-size: 0.85rem; font-weight: 600; }
.secret-tagline { color: var(--muted); font-style: italic; }

/* ── One project's page (project.cfm) ───────────────────── */
.project-page { max-width: 860px; }
.project-format { color: var(--muted); margin-left: 10px; font-size: 0.9rem; }
.project-key-image {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 28px;
}
.project-logline { font-size: 1.2rem; text-align: center; margin: 0 auto 32px; max-width: 680px; }
.project-trailer { position: relative; aspect-ratio: 16 / 9; margin-bottom: 36px; }
.project-trailer iframe {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; border-radius: var(--radius);
}
.project-story { margin-bottom: 36px; }
.project-story p { margin-bottom: 1em; line-height: 1.7; }
.project-gallery {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin-bottom: 36px;
}
.project-gallery img {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--border);
}
.project-page-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,8,6,0.92); padding: 16px; cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lightbox button {
  position: absolute; top: 12px; right: 16px;
  background: none; border: 0; color: var(--fg); font-size: 2.2rem; line-height: 1; cursor: pointer;
}

/* ── Team Grid ────────────────────────────────────────────── */
.team-grid {
  display: grid;
  gap: 48px 40px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  max-width: 680px;
  margin: 0 auto;
}
.member-card { text-align: center; }

.member-photo-link {
  display: block;
  margin-bottom: 18px;
  transition: transform 0.22s;
}
.member-photo-link:hover { transform: translateY(-4px); }
/* drop-shadow follows the picture's own shape, so round see-through PNGs glow as circles */
.member-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
  transition: filter 0.22s;
}
.member-photo-link:hover .member-photo { filter: drop-shadow(0 10px 18px rgba(194,56,40,0.35)); }
.member-photo--placeholder {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg3);
  position: relative;
  overflow: hidden;
}
.member-photo--placeholder::before {
  content: '';
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  aspect-ratio: 1 / 1;
  background: var(--muted);
  opacity: 0.32;
  border-radius: 50%;
}
.member-photo--placeholder::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 40%;
  background: var(--muted);
  opacity: 0.32;
  border-radius: 50% 50% 0 0;
}
.member-name {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.member-role {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}
.member-bio          { color: var(--muted); font-size: 0.94rem; line-height: 1.6; }
.member-contact-hint { margin-top: 12px; font-size: 0.83rem; }
.member-contact-hint a { color: var(--orange); }
.member-contact-hint a:hover { color: var(--red); }

/* ── Contact Form ─────────────────────────────────────────── */
.contact-wrap { max-width: 540px; margin: 0 auto; }
.contact-recipient {
  margin-bottom: 26px;
  padding: 12px 18px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--muted);
}
.contact-recipient strong { color: var(--fg); }
.contact form  { display: flex; flex-direction: column; gap: 20px; }
.contact label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact input,
.contact textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color 0.18s;
}
.contact input:focus,
.contact textarea:focus {
  outline: none;
  border-color: var(--orange);
  background: var(--bg3);
}
.contact textarea { resize: vertical; min-height: 140px; }
.form-msg {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 22px;
  font-size: 0.93rem;
  line-height: 1.5;
}
.form-msg--success { background: rgba(74,170,136,0.12); border: 1px solid rgba(74,170,136,0.32); color: #4aaa88; }
.form-msg--error   { background: rgba(194, 56,40,0.1); border: 1px solid rgba(194, 56,40,0.25); color: var(--red);    }
.form-note { margin-top: 20px; font-size: 0.85rem; color: var(--muted); }

/* ── Footer ───────────────────────────────────────────────── */
.sbp-footer {
  padding: 32px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.88rem;
}
.sbp-social { margin-top: 10px; display: flex; gap: 20px; justify-content: center; }
.sbp-social a { color: var(--muted); transition: color 0.15s; }
.sbp-social a:hover { color: var(--orange); }

/* Legal links in the footer */
.sbp-legal { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: center; }
.sbp-legal a { color: var(--muted); transition: color 0.15s; }
.sbp-legal a:hover { color: var(--orange); }

/* ── Legal pages ──────────────────────────────────────────── */
.legal { max-width: 760px; }
.legal h2 { margin: 32px 0 12px; }
.legal p, .legal li { color: var(--muted); line-height: 1.7; }
.legal ul { padding-left: 22px; }
.legal-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 0.92rem; }
.legal-table th, .legal-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal-table th { color: var(--fg); font-family: var(--font-head); font-weight: 600; }
.legal-table td { color: var(--muted); }
.legal-notice {
  padding: 14px 18px;
  border-left: 3px solid var(--orange);
  background: var(--bg2);
  border-radius: 6px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 820px) {
  .sbp-nav { position: relative; }
  .sbp-burger { display: block; }
  .sbp-nav ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(26,21,16,0.97);
    padding: 10px 16px 16px;
    border-bottom: 1px solid var(--border);
    gap: 2px;
  }
  .sbp-nav ul.open { display: flex; }
  .sbp-nav ul a { padding: 11px 14px; font-size: 1rem; }
}

@media (max-width: 600px) {
  .team-grid     { grid-template-columns: 1fr; max-width: 320px; }
  .projects-grid { grid-template-columns: 1fr; }
  .section       { padding: 44px 20px; }
  .featured-card { padding: 22px 18px; }
  .page-header   { padding: 40px 20px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  a, .btn, .project-card, .member-photo-link,
  .contact input, .contact textarea { transition: none; }
  html { scroll-behavior: auto; }
}

/* Legal pages text from the admin editor (headings, lists, tables, notice boxes) */
.legal-page-date { color: var(--muted); }
.legal h3 { margin: 24px 0 10px; font-size: 1.15rem; }
.legal h4 { margin: 20px 0 8px; font-size: 1rem; }
.legal p, .legal ul, .legal ol, .legal .legal-notice, .legal .legal-table-wrap { margin-bottom: 14px; }
.legal ol { padding-left: 22px; }
.legal li { margin: 4px 0; }
.legal li > ul, .legal li > ol { margin: 4px 0 0; }
.legal strong { color: var(--fg); }
.legal a { color: var(--orange); }
.legal hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
.legal .legal-notice p:last-child { margin-bottom: 0; }
.legal-table-wrap { overflow-x: auto; }

/* ── About page (Step 21) ─────────────────────────────────── */
.about-story { max-width: 760px; }
.about-story h2 { margin: 28px 0 12px; }
.about-story h3 { margin: 22px 0 10px; font-size: 1.15rem; }
.about-story p, .about-story li { color: var(--muted); line-height: 1.75; }
.about-story p, .about-story ul, .about-story ol, .about-story .legal-notice { margin-bottom: 14px; }
.about-story ul, .about-story ol { padding-left: 22px; }
.about-story strong { color: var(--fg); }
.about-story a { color: var(--orange); }
.about-team { display: flex; flex-wrap: wrap; gap: 18px; margin: 18px 0 8px; }
.about-team-member { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.about-team-member img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.about-team-member strong { display: block; color: var(--fg); }
.about-team-member span { color: var(--muted); font-size: 0.9rem; }
.about-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.about-list li { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; display: flex; gap: 14px; align-items: flex-start; }
.about-list img { width: 64px; height: 64px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; flex-shrink: 0; }
.about-list a { color: var(--fg); font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; }
.about-list a:hover { color: var(--orange); }
.about-list p { color: var(--muted); font-size: 0.92rem; margin-top: 4px; line-height: 1.55; }
.about-more { margin-top: 18px; }

/* Footer: "Our shows" row */
.sbp-shows { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; font-size: 0.9rem; }
.sbp-shows span { color: var(--muted); }
.sbp-shows a { color: var(--fg); }
.sbp-shows a:hover { color: var(--orange); }
