/* ==========================================================================
   Sheldon Brown Ministries
   Dark, cinematic, black + gold. One theme, one accent, locked page-wide.
   Edit colors and spacing here; everything reads from these variables.
   ========================================================================== */

@font-face {
  font-family: 'Archivo Black';
  src: url('../fonts/archivo-black-latin.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0e0e10;
  --surface: #17171b;
  --surface-2: #1e1e23;
  --line: rgba(244, 241, 234, 0.12);
  --text: #f4f1ea;
  --muted: #aaa69c;
  --gold: #e4b54a;
  --gold-deep: #c9971f;
  --ink: #131310;           /* text on gold buttons */
  --display: 'Archivo Black', 'Arial Black', sans-serif;
  --body: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --radius: 14px;           /* one radius system, page-wide */
  --container: 1200px;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; letter-spacing: -0.01em; }

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

::selection { background: var(--gold); color: var(--ink); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--gold); color: var(--ink); padding: 0.6rem 1rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--gold-deep); color: var(--ink); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-wide { width: 100%; text-align: center; }
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
}

.section-title { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 0.5em; }

/* ---------- Navigation ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14, 14, 16, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; padding: 0 var(--pad);
}
.nav-brand { font-family: var(--display); font-size: 1.15rem; color: var(--text); }
.nav-brand span { color: var(--gold); }
.nav-menu { display: flex; gap: 2rem; list-style: none; }
.nav-menu a { color: var(--text); font-weight: 500; font-size: 0.95rem; }
.nav-menu a:hover { color: var(--gold); }
.nav-toggle { display: none; }

@media (max-width: 768px) {
  .nav-toggle {
    display: grid; gap: 5px; background: none; border: 0; padding: 0.5rem; cursor: pointer;
  }
  .nav-toggle span { width: 24px; height: 2px; background: var(--text); transition: transform 0.2s ease; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .nav-menu {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 0.5rem 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { display: block; padding: 0.9rem var(--pad); }
}

/* ---------- Hero (full-bleed muted video loop with poster fallback) ---------- */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  min-height: calc(100dvh - 68px);
}
.hero-bg { position: absolute; inset: 0; }
.hero-poster {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-bg iframe {
  /* 16:9 frame sized to cover the viewport, centered; decorative only */
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: max(100vw, 178vh); height: max(100vh, 56.25vw);
  border: 0; pointer-events: none;
  opacity: 0; transition: opacity 1.2s ease;
}
.hero-bg iframe.playing { opacity: 1; }
.hero-bg::after {
  /* scrim: keeps overlay text readable against bright footage */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(14, 14, 16, 0.88) 0%, rgba(14, 14, 16, 0.55) 45%, rgba(14, 14, 16, 0.25) 100%),
    linear-gradient(to top, rgba(14, 14, 16, 0.9) 0%, transparent 35%);
}
.hero-text {
  position: relative; z-index: 1;
  width: 100%; max-width: var(--container); margin: 0 auto;
  padding: clamp(2rem, 5vh, 4rem) var(--pad) clamp(3rem, 8vh, 5rem);
}
.hero h1 {
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  margin: 0.18em 0 0.25em;
}
.hero-sub { color: var(--text); opacity: 0.85; font-size: 1.15rem; max-width: 26em; }
.hero-cta { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

@media (max-width: 768px) {
  .hero { min-height: calc(92dvh - 68px); }
}

/* ---------- About ---------- */
.about { max-width: var(--container); margin: 0 auto; padding: clamp(4rem, 10vh, 7rem) var(--pad); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
}
.about-offset { margin-top: clamp(2rem, 6vw, 5rem); }
.about-block h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin: 1.2rem 0 0.8rem; }
.about-block p { color: var(--muted); margin-bottom: 1rem; max-width: 60ch; }
.about-img { position: relative; }
.about-img img { border-radius: var(--radius); border: 1px solid var(--line); }
.frame-gold::before {
  content: ""; position: absolute; left: -12px; top: -12px; width: 30%; height: 30%;
  border-left: 2px solid var(--gold); border-top: 2px solid var(--gold);
  border-radius: var(--radius) 0 0 0;
  pointer-events: none;
}

.verse {
  position: relative; margin-top: clamp(3rem, 8vh, 6rem);
  border-radius: var(--radius); overflow: hidden;
}
.verse img { width: 100%; height: 480px; object-fit: cover; object-position: 50% 25%; }
.verse figcaption {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  background: linear-gradient(to top, rgba(14, 14, 16, 0.92) 0%, rgba(14, 14, 16, 0.35) 55%, transparent 100%);
}
.verse blockquote {
  font-family: var(--display);
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  line-height: 1.25; max-width: 22em;
}
.verse cite { font-style: normal; color: var(--gold); margin-top: 0.8rem; font-size: 0.95rem; }

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-offset { margin-top: 0; }
  .verse img { height: 380px; }
}

/* ---------- Music ---------- */
.music { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.music { padding: clamp(4rem, 10vh, 7rem) var(--pad); }
.music > * { max-width: var(--container); margin-left: auto; margin-right: auto; }
.music-grid {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.5rem;
  margin-top: 2.5rem;
}
.track {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.track:hover { transform: translateY(-4px); border-color: rgba(228, 181, 74, 0.5); }
.track-featured { grid-row: span 2; flex-direction: column; }
.track-featured img { width: 100%; flex: 1; min-height: 0; object-fit: cover; object-position: 50% 30%; }
.track:not(.track-featured) img { width: 44%; aspect-ratio: 1 / 1; object-fit: cover; }
.track:not(.track-featured) .track-meta { display: flex; flex-direction: column; justify-content: center; }
.track-meta { padding: 1.25rem 1.4rem 1.5rem; }
.track-meta h3 { font-size: 1.35rem; margin-bottom: 0.15rem; }
.track-meta p { color: var(--muted); font-size: 0.92rem; margin-bottom: 0.9rem; }
.platforms { display: flex; gap: 0.6rem; }
.platforms a {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.platforms a:hover { border-color: var(--gold); background: rgba(228, 181, 74, 0.08); }
.platforms img { width: 17px; height: 17px; }
.music-note { color: var(--muted); margin-top: 2rem; font-size: 0.95rem; }

@media (max-width: 768px) {
  .music-grid { grid-template-columns: 1fr; }
  .track-featured { grid-row: auto; }
  .track-featured img { aspect-ratio: 16 / 11; flex: none; }
}
@media (max-width: 480px) {
  .track:not(.track-featured) { flex-direction: column; }
  .track:not(.track-featured) img { width: 100%; }
}

/* ---------- Books ---------- */
.books { max-width: var(--container); margin: 0 auto; padding: clamp(4rem, 10vh, 7rem) var(--pad); }
.book-flagship {
  display: grid; grid-template-columns: 6fr 5fr; align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}
.book-copy h2 { font-size: clamp(2.4rem, 6vw, 4rem); color: var(--gold); }
.book-lede { font-weight: 700; font-size: 1.2rem; margin: 1.2rem 0 1rem; }
.book-copy p { max-width: 55ch; }
.book-copy p + p { color: var(--muted); }
.book-cta { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.book-cover img {
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  transform: rotate(2deg);
}
.book-shelf { margin-top: clamp(3.5rem, 9vh, 6rem); border-top: 1px solid var(--line); padding-top: 2.5rem; }
.book-shelf h3 { font-size: 1.25rem; margin-bottom: 1.5rem; }
.shelf-row { display: flex; gap: 1.5rem; }
.shelf-row figure { max-width: 220px; }
.shelf-row img { border-radius: var(--radius); border: 1px solid var(--line); }
.shelf-row figcaption { margin-top: 0.7rem; font-size: 0.92rem; color: var(--muted); }

@media (max-width: 768px) {
  .book-flagship { grid-template-columns: 1fr; }
  .book-cover { max-width: 340px; }
  .shelf-row figure { max-width: 160px; }
}

/* ---------- Events ---------- */
.events { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(4rem, 10vh, 7rem) var(--pad); }
.events > * { max-width: 900px; margin-left: auto; margin-right: auto; }
.events-header { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.fnl-mark {
  width: clamp(120px, 15vw, 170px); flex-shrink: 0;
  /* fade the photo's edges into the page so it reads as a mark, not a rectangle */
  -webkit-mask-image: radial-gradient(ellipse at center, #000 58%, transparent 94%);
  mask-image: radial-gradient(ellipse at center, #000 58%, transparent 94%);
}
.events-sub { color: var(--muted); margin-top: -0.5rem; }
.events-list { margin-top: 2.5rem; display: grid; gap: 1rem; }
.event-card {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  transition: border-color 0.25s ease;
}
.event-card:hover { border-color: rgba(228, 181, 74, 0.5); }
.event-date { text-align: center; min-width: 64px; }
.event-date .month { display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); }
.event-date .day { display: block; font-family: var(--display); font-size: 2rem; line-height: 1.1; }
.event-info h3 { font-size: 1.15rem; font-family: var(--body); font-weight: 700; }
.event-info p { color: var(--muted); font-size: 0.92rem; margin-top: 0.2rem; }
.event-card .btn { padding: 0.6rem 1.2rem; font-size: 0.85rem; }
.events-empty { text-align: center; color: var(--muted); padding: 3rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); }

@media (max-width: 600px) {
  .events-header { flex-direction: column-reverse; align-items: flex-start; }
  .fnl-mark { width: 120px; }
  .event-card { grid-template-columns: auto 1fr; }
  .event-card .btn { grid-column: 2; justify-self: start; }
}

/* ---------- Watch ---------- */
.watch { max-width: var(--container); margin: 0 auto; padding: clamp(4rem, 10vh, 7rem) var(--pad); }
.watch-inner {
  display: grid; grid-template-columns: 2fr 3fr; gap: clamp(2rem, 6vw, 4rem); align-items: center;
}
.watch-copy h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 0.6rem; }
.watch-copy p { color: var(--muted); margin-bottom: 1.8rem; max-width: 38ch; }
.watch-player { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.yt-lite {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  background-size: cover; background-position: center;
  border: 0; cursor: pointer; display: block; padding: 0;
}
.yt-lite::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(14, 14, 16, 0.25); transition: background-color 0.2s ease;
}
.yt-lite:hover::before { background: rgba(14, 14, 16, 0.05); }
.yt-lite .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 72px; height: 50px; border-radius: var(--radius);
  background: var(--gold); display: grid; place-items: center;
}
.yt-lite .play::after {
  content: ""; border-style: solid; border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent var(--ink);
}
.watch-player iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; display: block; }
.channel-card { position: relative; }
.channel-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 20%; }
.channel-card figcaption {
  position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 1.5rem;
  background: linear-gradient(to top, rgba(14, 14, 16, 0.9), transparent 60%);
  font-weight: 700;
}

@media (max-width: 768px) {
  .watch-inner { grid-template-columns: 1fr; }
}

/* ---------- Merch strip ---------- */
.merch {
  max-width: var(--container); margin: 0 auto clamp(4rem, 10vh, 7rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem var(--pad);
  background: linear-gradient(100deg, var(--surface) 0%, var(--surface-2) 100%);
  margin-left: auto; margin-right: auto;
}
.merch p { font-size: 1.05rem; }
.merch strong { color: var(--gold); }

@media (max-width: 1260px) { .merch { margin-left: var(--pad); margin-right: var(--pad); } }

/* ---------- Connect ---------- */
.connect { background: var(--surface); border-top: 1px solid var(--line); padding: clamp(4rem, 10vh, 7rem) var(--pad); }
.connect-grid {
  max-width: var(--container); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 3fr; gap: clamp(2.5rem, 7vw, 6rem);
}
.connect-info h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 0.8rem; }
.connect-info p { color: var(--muted); max-width: 40ch; }
.connect-list { list-style: none; margin-top: 2rem; display: grid; gap: 0.7rem; }
.connect-list li { color: var(--muted); }

.connect-form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.45rem; }
.field label { font-weight: 700; font-size: 0.92rem; }
.field .optional { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.8rem 1rem; font-family: var(--body); font-size: 1rem;
  width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent;
}
.field-error { color: #e89a9a; font-size: 0.85rem; }
.field.invalid input, .field.invalid textarea { border-color: #b25555; }
.form-status { color: var(--gold); font-size: 0.95rem; min-height: 1.4em; }

@media (max-width: 768px) {
  .connect-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem var(--pad); }
.footer-inner {
  max-width: var(--container); margin: 0 auto;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.footer-logo { width: 92px; border-radius: var(--radius); border: 1px solid var(--line); }
.footer-meta { flex: 1; color: var(--muted); font-size: 0.9rem; }
.footer-social { display: flex; gap: 0.7rem; list-style: none; }
.footer-social a {
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color 0.18s ease;
}
.footer-social a:hover { border-color: var(--gold); }
.footer-social img { width: 18px; height: 18px; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .track, .event-card { transition: none; }
}
