/* m6movie.com: The First Genesis
   Palette drawn from the Night Tree cover: midnight sky, starlight gold, ember fire, parchment. */
:root {
  --night-900: #060b16;
  --night-800: #0a1222;
  --night-700: #101b33;
  --night-600: #1a2a4a;
  --gold: #e8b65a;
  --gold-bright: #f6d48a;
  --ember: #e0702c;
  --parchment: #ece4d0;
  --mist: #a9b3c7;
  --line: rgba(232, 182, 90, 0.22);

  --font-display: "Trade Winds", "Georgia", serif;
  --font-body: "EB Garamond", "Georgia", "Times New Roman", serif;

  --step--1: clamp(0.9rem, 0.86rem + 0.2vw, 1rem);
  --step-0: clamp(1.1rem, 1.04rem + 0.3vw, 1.25rem);
  --step-1: clamp(1.35rem, 1.2rem + 0.7vw, 1.75rem);
  --step-2: clamp(1.8rem, 1.5rem + 1.4vw, 2.6rem);
  --step-3: clamp(2.6rem, 1.9rem + 3.4vw, 5.2rem);

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1180px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night-900);
  color: var(--parchment);
  font: 400 var(--step-0)/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-bright); }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--gold);
  margin: 0 0 0.5em;
}
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1.1em; }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.eyebrow {
  font-size: var(--step--1);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 0.9em;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: absolute; inset: 0 0 auto; z-index: 10;
  padding-block: 18px;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--parchment);
  text-decoration: none;
  white-space: nowrap;
}
.brand span { color: var(--gold); }
.nav { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 32px); }
.nav a { color: var(--parchment); text-decoration: none; font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase; }
.nav a:hover { color: var(--gold-bright); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--night-900); }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.8em 1.5em;
  border-radius: var(--radius);
  border: 1px solid var(--gold);
  font: 400 1rem/1 var(--font-display);
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s, transform .2s;
}
.btn-primary {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--night-900);
  box-shadow: 0 0 0 rgba(232, 182, 90, 0);
}
.btn-primary:hover { color: var(--night-900); box-shadow: 0 0 28px rgba(232, 182, 90, 0.45); transform: translateY(-1px); }
.btn-ghost { background: rgba(6, 11, 22, 0.35); color: var(--parchment); border-color: rgba(236, 228, 208, 0.45); }
.btn-ghost:hover { color: var(--gold-bright); border-color: var(--gold); }
.btn-small { padding: 0.6em 1.1em; font-size: 0.9rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(100svh, 980px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.hero-art, .hero-art img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 30%;
  z-index: -2;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(6, 11, 22, 0.88) 0%, rgba(6, 11, 22, 0.55) 45%, rgba(6, 11, 22, 0.05) 75%),
    linear-gradient(0deg, var(--night-900) 0%, rgba(6, 11, 22, 0) 40%);
}
.hero-content { padding-block: 140px clamp(56px, 10vh, 120px); max-width: 640px; }
.hero h1 {
  font-size: var(--step-3);
  color: var(--gold);
  text-shadow: 0 0 24px rgba(232, 182, 90, 0.35), 0 2px 2px rgba(0, 0, 0, 0.6);
  margin-bottom: 0.15em;
}
.byline { font-family: var(--font-display); font-size: var(--step-1); color: var(--parchment); margin-bottom: 1.2em; }
.hook { font-size: var(--step-1); font-style: italic; line-height: 1.45; color: var(--parchment); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.8em; }
.trust { margin-top: 1.1em; font-size: var(--step--1); color: var(--mist); letter-spacing: 0.04em; }
.trust span + span::before { content: "·"; margin-inline: 0.6em; color: var(--gold); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 11vw, 132px); }
.section-alt { background: linear-gradient(180deg, var(--night-900), var(--night-800) 30%, var(--night-800) 70%, var(--night-900)); }
.section-head { text-align: center; max-width: 700px; margin: 0 auto clamp(36px, 6vw, 64px); }
.divider {
  width: 120px; height: 1px; margin: 18px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Book: cover + blurb */
.book-grid { display: grid; grid-template-columns: minmax(220px, 360px) 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.book-cover {
  border-radius: 3px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(236, 228, 208, 0.08);
  transform: perspective(1200px) rotateY(-6deg);
  transition: transform .5s;
}
.book-cover:hover { transform: perspective(1200px) rotateY(0); }
.blurb p:first-of-type::first-letter {
  font-family: var(--font-display); color: var(--gold);
  float: left; font-size: 3.4em; line-height: 0.9; padding: 0.06em 0.12em 0 0;
}
.buy-panel {
  margin-top: 1.8em; padding: 22px 24px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(16, 27, 51, 0.55);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.price { font-family: var(--font-display); font-size: var(--step-2); color: var(--gold); line-height: 1; }
.price small { display: block; font-family: var(--font-body); font-size: var(--step--1); color: var(--mist); margin-top: 6px; letter-spacing: 0.04em; }
.secure { flex-basis: 100%; font-size: 0.85rem; color: var(--mist); display: flex; align-items: center; gap: 8px; }
.secure svg { flex: none; }
@media (max-width: 760px) {
  .book-grid { grid-template-columns: 1fr; }
  .book-cover { max-width: 280px; margin-inline: auto; transform: none; }
}

/* Trailer */
.trailer {
  max-width: 980px; margin-inline: auto;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  background: #000;
}
.trailer video { width: 100%; aspect-ratio: 16 / 9; }

/* Galleries */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(12px, 2vw, 22px); }
.gallery-covers { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.tile {
  position: relative; margin: 0; padding: 0; border: 0; background: none; cursor: zoom-in;
  border-radius: var(--radius); overflow: hidden; color: inherit; text-align: left;
  box-shadow: 0 0 0 1px rgba(236, 228, 208, 0.08);
}
.tile img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .6s, filter .6s; filter: saturate(0.9); }
.tile:hover img { transform: scale(1.04); filter: saturate(1.1); }
.tile figcaption {
  position: absolute; inset: auto 0 0; padding: 36px 16px 12px;
  background: linear-gradient(0deg, rgba(6, 11, 22, 0.92), transparent);
  font-family: var(--font-display); font-size: 1.05rem; color: var(--parchment);
}

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(96vw, 1600px); max-height: 94vh; }
.lightbox::backdrop { background: rgba(3, 6, 12, 0.92); }
.lightbox img { max-height: 84vh; width: auto; margin-inline: auto; border-radius: 3px; }
.lightbox p { text-align: center; color: var(--parchment); font-family: var(--font-display); margin: 12px 0 0; }
.lightbox-close {
  position: fixed; top: 14px; right: 18px;
  background: none; border: 0; color: var(--parchment); font-size: 2.2rem; line-height: 1; cursor: pointer;
}

/* Signup */
.signup {
  position: relative; overflow: hidden; isolation: isolate;
  border: 1px solid var(--line); border-radius: 10px;
  padding: clamp(32px, 6vw, 72px) var(--gutter);
  text-align: center;
}
.signup::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(rgba(6, 11, 22, 0.82), rgba(6, 11, 22, 0.92)), url(../img/insert-gravity-well-1600.jpg) center/cover;
}
.signup p { max-width: 54ch; margin-inline: auto; color: var(--mist); }
.signup-form { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 1.6em; }
.signup-form input[type="email"] {
  flex: 1 1 280px; max-width: 380px;
  padding: 0.85em 1em; border-radius: var(--radius);
  border: 1px solid rgba(236, 228, 208, 0.3); background: rgba(6, 11, 22, 0.7);
  color: var(--parchment); font: inherit; font-size: 1rem;
}
.signup-form input[type="email"]::placeholder { color: #8791a6; }
.signup-form input[type="email"]:focus { border-color: var(--gold); outline: none; }
.form-note { font-size: 0.85rem; margin-top: 1em; }
.hp { position: absolute; left: -9999px; }

/* Author */
.author { display: grid; grid-template-columns: 1fr; max-width: 760px; margin-inline: auto; text-align: center; }
.author p { color: var(--parchment); }

/* Films teaser */
.films {
  position: relative; isolation: isolate; text-align: center;
  padding-block: clamp(80px, 14vw, 170px);
}
.films::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(var(--night-900), rgba(6, 11, 22, 0.55) 30%, rgba(6, 11, 22, 0.55) 70%, var(--night-900)),
              url(../img/gallery-moonfall-1872.jpg) center/cover;
}
.films p { max-width: 56ch; margin-inline: auto; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 40px; font-size: var(--step--1); color: var(--mist); }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--mist); text-decoration: none; }
.site-footer a:hover { color: var(--gold-bright); }

/* Scroll reveal */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .book-cover, .tile img, .btn { transition: none; }
}

/* ---------- Inner pages (success, legal, 404) ---------- */
.page .site-header { position: static; border-bottom: 1px solid var(--line); background: var(--night-800); }
.page main { min-height: 60vh; }
.prose { max-width: 760px; margin-inline: auto; }
.prose h1 { font-size: var(--step-2); }
.prose h2 { font-size: var(--step-1); margin-top: 1.6em; }
.prose li { margin-bottom: 0.4em; }
.download-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 14px; margin: 1.5em 0; }
.notice { padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(16, 27, 51, 0.55); color: var(--mist); }
