/* Cantera Media — global styles
   Brand palette: deep charcoal / near-black + warm gold, sampled from the
   supplied logo files (assets/logo-icon.png, assets/logo-lockup.png) and
   confirmed against the CanteraMediaLogoReveal animation source. */

:root {
  --bg: #0b0b0c;
  --bg-elevated: #141416;
  --bg-elevated-2: #1c1c1f;
  --fg: #f3f1ec;
  --fg-muted: #a8a5a0;
  --fg-faint: #6f6c68;
  --accent: #b89460;
  --accent-strong: #d4aa6e;
  --border: #28282b;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: "Georgia", "Iowan Old Style", serif;

  --container: 1160px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;

  --radius: 6px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1.15;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-2);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-2) 0;
  background: linear-gradient(to bottom, rgba(11, 11, 12, 0.9), transparent);
  transition: background 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(11, 11, 12, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

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

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.logo {
  display: flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
}

.logo-lockup {
  max-height: 36px;
  width: auto;
  display: block;
}

@media (max-width: 400px) {
  .logo-lockup { max-height: 30px; }
}

.nav-toggle {
  display: block;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.main-nav {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
  z-index: 99;
}

.main-nav.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.main-nav a {
  font-size: 1.5rem;
  color: var(--fg-muted);
  letter-spacing: 0.03em;
}

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

@media (min-width: 860px) {
  .nav-toggle { display: none; }

  .main-nav {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    background: none;
    flex-direction: row;
    gap: var(--space-4);
  }

  .main-nav a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: var(--space-6) 0 var(--space-5);
  background:
    linear-gradient(to top, rgba(10,10,10,1) 0%, rgba(10,10,10,0.6) 42%, rgba(10,10,10,0.3) 100%),
    radial-gradient(90% 70% at 50% 8%, rgba(184,148,96,0.08) 0%, transparent 60%),
    linear-gradient(165deg, #0a0a0a 0%, #1a1510 100%);
  overflow: hidden;
}

/* Fine diagonal linework — cinematic backlight texture */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,0.025) 0px, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 90px);
  pointer-events: none;
}

/* Film-grain noise + vignette, pure CSS (inline SVG data-uri, no network request) */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 720px;
}

/* ---------- Logo reveal (hero intro animation) ----------
   Plays once on load, adapted from CanteraMedia-LogoReveal.html.
   Pure CSS keyframes — no JS dependency, so it always runs. Sizes are
   fluid (clamp) to stay legible from small phones up to desktop; the
   rest of the hero content fades in staggered after it finishes (~2.6s+)
   via .hero-text-entrance so the sequence reads as one continuous beat. */

.logo-reveal {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 3vw, 2rem);
  margin-bottom: var(--space-4);
}

.lr-glow {
  position: absolute;
  left: -10%;
  top: 50%;
  transform: translateY(-50%);
  width: 70%;
  height: 220%;
  background: radial-gradient(ellipse at center, rgba(184, 148, 96, 0.1) 0%, transparent 70%);
  opacity: 0;
  animation: lrGlowFade 1.5s ease-out 0.5s forwards;
  pointer-events: none;
}

.lr-icon {
  width: clamp(48px, 11vw, 88px);
  height: clamp(48px, 11vw, 88px);
  object-fit: contain;
  opacity: 0;
  transform: scale(0.85);
  animation: lrIconReveal 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
  filter: drop-shadow(0 0 20px rgba(184, 148, 96, 0.3));
  flex-shrink: 0;
}

.lr-divider {
  width: 2px;
  height: clamp(56px, 11vw, 96px);
  background: linear-gradient(to bottom, transparent, var(--accent), var(--accent), transparent);
  flex-shrink: 0;
  transform: scaleY(0);
  transform-origin: center;
  animation: lrDividerGrow 0.8s cubic-bezier(0.22, 1, 0.36, 1) 1.1s forwards;
}

.lr-text {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.lr-line-top {
  width: 0;
  height: 2px;
  background: linear-gradient(to right, var(--accent), var(--accent-strong), var(--accent));
  animation: lrLineExpand 0.7s ease-out 1.5s forwards;
}

.lr-cantera {
  font-family: var(--font-body);
  font-size: clamp(1.5rem, 6.5vw, 2.75rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--fg);
  text-transform: uppercase;
  line-height: 1;
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  animation: lrTextReveal 1s cubic-bezier(0.22, 1, 0.36, 1) 1.4s forwards;
  white-space: nowrap;
}

.lr-media {
  font-family: var(--font-body);
  font-size: clamp(0.7rem, 2vw, 0.95rem);
  font-weight: 300;
  letter-spacing: 0.4em;
  color: var(--fg-muted);
  text-transform: uppercase;
  opacity: 0;
  animation: lrMediaFade 0.8s ease-out 2.1s forwards;
  white-space: nowrap;
}

.lr-lines-bottom {
  display: flex;
  align-items: center;
  height: 2px;
  overflow: hidden;
}

.lr-line-bl {
  height: 2px;
  width: 0;
  background: linear-gradient(to right, var(--accent), var(--accent-strong));
  animation: lrBLeft 0.6s ease-out 2.4s forwards;
}

.lr-gap { width: clamp(24px, 6vw, 60px); flex-shrink: 0; }

.lr-line-br {
  height: 2px;
  width: 0;
  background: linear-gradient(to left, var(--accent), var(--accent-strong));
  animation: lrBRight 0.6s ease-out 2.4s forwards;
}

@keyframes lrGlowFade { to { opacity: 1; } }
@keyframes lrIconReveal { to { opacity: 1; transform: scale(1); } }
@keyframes lrDividerGrow { to { transform: scaleY(1); } }
@keyframes lrLineExpand { to { width: clamp(160px, 32vw, 300px); } }
@keyframes lrTextReveal { to { opacity: 1; clip-path: inset(0 0% 0 0); } }
@keyframes lrMediaFade { to { opacity: 1; } }
@keyframes lrBLeft { to { width: clamp(48px, 9vw, 100px); } }
@keyframes lrBRight { to { width: clamp(56px, 11vw, 120px); } }

/* Hero eyebrow/heading/lede/actions fade in after the logo reveal settles
   (~2.6s+) so the two moments read as one sequence, not a collision. */
.hero-text-entrance {
  opacity: 0;
  transform: translateY(14px);
  animation: heroFadeUp 0.7s ease-out forwards;
}

.hero-text-entrance.entrance-1 { animation-delay: 2.6s; }
.hero-text-entrance.entrance-2 { animation-delay: 2.75s; }
.hero-text-entrance.entrance-3 { animation-delay: 2.9s; }
.hero-text-entrance.entrance-4 { animation-delay: 3.05s; }

@keyframes heroFadeUp { to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .lr-glow, .lr-icon, .lr-divider, .lr-line-top, .lr-cantera, .lr-media,
  .lr-line-bl, .lr-line-br, .hero-text-entrance {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  .lr-line-top { width: clamp(160px, 32vw, 300px) !important; }
  .lr-line-bl { width: clamp(48px, 9vw, 100px) !important; }
  .lr-line-br { width: clamp(56px, 11vw, 120px) !important; }
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.75rem, 9.5vw, 6.25rem);
  line-height: 0.98;
  margin: 0 0 var(--space-3);
  letter-spacing: -0.02em;
  max-width: 16ch;
}

.hero p.lede {
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  font-weight: 300;
  color: var(--fg-muted);
  max-width: 46ch;
  margin: 0 0 var(--space-4);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #14110a;
  font-weight: 600;
}

.btn-primary:hover { background: var(--accent-strong); transform: translateY(-1px); }

.btn-ghost {
  border-color: rgba(184, 148, 96, 0.4);
  color: var(--fg);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: rgba(184, 148, 96, 0.08);
  transform: translateY(-1px);
}

/* ---------- Sections ---------- */

section { padding: var(--space-6) 0; }

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-4);
}

.section-head .eyebrow { margin-bottom: var(--space-1); }

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
}

.section-head p {
  color: var(--fg-muted);
  margin: 0;
}

/* ---------- Featured series card ---------- */

.series-feature {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(184,148,96,0.14) 0%, transparent 60%),
    linear-gradient(165deg, var(--bg-elevated) 0%, #17130f 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  box-shadow: var(--shadow), 0 0 100px -25px rgba(184,148,96,0.35);
}

.series-feature .media {
  aspect-ratio: 9 / 12;
  background:
    linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0.1)),
    radial-gradient(140% 100% at 30% 0%, #2b2620 0%, #0b0b0c 65%);
  position: relative;
}

.series-feature .media .badge {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  border: none;
  color: #14110a;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  box-shadow: 0 6px 20px -4px rgba(184,148,96,0.5);
}

.series-feature .body {
  padding: var(--space-4);
  position: relative;
}

.series-feature h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
}

.series-feature p {
  color: var(--fg-muted);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 var(--space-3);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--fg-faint);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

@media (min-width: 760px) {
  .series-feature { grid-template-columns: 0.85fr 1.15fr; }
  .series-feature .media { aspect-ratio: auto; }
}

/* ---------- Stat / value strip ---------- */

.value-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.value-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: var(--space-3);
  background: var(--bg-elevated);
}

.value-card .num {
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 1.75rem;
  display: block;
  margin-bottom: 0.4rem;
}

.value-card h4 { margin: 0 0 0.4rem; font-size: 1rem; font-weight: 800; }
.value-card p { margin: 0; color: var(--fg-muted); font-size: 0.9rem; line-height: 1.6; }

@media (min-width: 700px) {
  .value-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- CTA band ---------- */

.cta-band {
  background: linear-gradient(120deg, var(--bg-elevated), var(--bg-elevated-2));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.cta-band h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 5vw, 2.75rem);
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
}

.cta-band p {
  color: var(--fg-muted);
  max-width: 50ch;
  margin: 0 auto var(--space-3);
}

/* ---------- Gold rule (thin divider used for premium callouts) ---------- */

.gold-rule {
  border: none;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--accent-strong) 50%, transparent);
  margin: var(--space-4) 0;
}

/* ---------- Notify form ---------- */

.notify-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  max-width: 420px;
  margin: 0 auto;
}

.notify-form input[type="email"] {
  flex: 1 1 220px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  color: var(--fg);
  font-size: 0.95rem;
}

.notify-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
}

.form-note {
  font-size: 0.8rem;
  color: var(--fg-faint);
  margin-top: var(--space-2);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-4) 0;
  color: var(--fg-faint);
  font-size: 0.85rem;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-email {
  color: var(--fg-muted);
  font-size: 0.85rem;
}

.footer-email:hover { color: var(--accent); }

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.social-links a {
  color: var(--fg-muted);
  border: none;
  border-radius: 0;
  padding: 0;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.social-links a:hover { color: var(--accent); }

@media (min-width: 480px) {
  .footer-meta {
    flex-direction: row;
    align-items: baseline;
    gap: var(--space-3);
  }
}

@media (min-width: 700px) {
  .footer-grid {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---------- Utility ---------- */

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

/* Reveal-on-scroll is a progressive enhancement: elements are hidden only
   once main.js confirms it's running (html.js) and IntersectionObserver
   exists. No-JS visitors, and the moment before main.js executes, always
   see full content. */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
