/* ============================================================
   AVE MARIA (The Second Wind) — cinematic site
   ============================================================ */
:root {
  --bg: #0a0a0b;
  --bg-2: #100f11;
  --bg-3: #161318;
  --ink: #f1e7d8;
  --muted: #9a9184;
  --line: rgba(241, 231, 216, 0.12);
  --ember: #e0853a;
  --ember-2: #f2a85c;
  --ember-deep: #b9622a;
  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --serif: "Cinzel", Georgia, serif;
  --quote: "Cormorant Garamond", Georgia, serif;
  --body: "Inter", system-ui, sans-serif;
  /* per-world accent (overridden via [data-world]) */
  --world: #8aa0a0;
}
[data-world="guadalupe"] { --world: #7f9a98; }
[data-world="breezing"]  { --world: #e6bd6a; }
[data-world="secondwind"]{ --world: #e0853a; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--ember-2); }
.wrap { width: min(100% - 44px, var(--maxw)); margin-inline: auto; }
.narrow { max-width: 760px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none; }

h2.display, .display {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0.01em;
  font-size: clamp(2rem, 5vw, 3.6rem);
}
.eyebrow {
  font-family: var(--serif);
  font-size: 0.74rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ember);
  margin-bottom: 1.1rem;
}
.lead { font-size: clamp(1.05rem, 1.7vw, 1.28rem); color: var(--muted); max-width: 60ch; }

/* ---- ember-glow title (the "alive, barely moving" rule) ---- */
.glow { animation: breathe 6s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { text-shadow: 0 0 18px rgba(224, 133, 58, 0.10), 0 0 2px rgba(224, 133, 58, 0.10); }
  50%      { text-shadow: 0 0 42px rgba(224, 133, 58, 0.42), 0 0 12px rgba(224, 133, 58, 0.22); }
}

/* ---------- overlays: grain + vignette ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 9000; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  animation: grainshift 0.5s steps(2) infinite;
}
@keyframes grainshift {
  0% { transform: translate(0, 0); } 50% { transform: translate(-6px, 4px); } 100% { transform: translate(4px, -5px); }
}
.vignette {
  position: fixed; inset: 0; z-index: 8999; pointer-events: none;
  background: radial-gradient(120% 100% at 50% 45%, transparent 55%, rgba(0,0,0,0.55) 100%);
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(8, 8, 9, 0.78); backdrop-filter: blur(12px); border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { font-family: var(--serif); font-weight: 600; letter-spacing: 0.14em; font-size: 1rem; color: var(--ink); }
.brand span { color: var(--muted); font-family: var(--quote); font-style: italic; letter-spacing: 0.02em; font-size: 0.9rem; margin-left: 0.5rem; }
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a { font-size: 0.82rem; letter-spacing: 0.04em; color: var(--muted); transition: color 0.25s; }
.nav__links a:hover { color: var(--ink); }
.nav__cta { font-family: var(--serif); font-size: 0.74rem !important; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ember) !important; border: 1px solid rgba(224,133,58,0.4); padding: 0.6rem 1.1rem; border-radius: 2px; }
.nav__cta:hover { background: rgba(224,133,58,0.12); }
.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__burger span { width: 24px; height: 1.5px; background: var(--ink); transition: 0.3s; }

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.hero__media { position: absolute; inset: 0; background: #000; }
.hero__media video { width: 100%; height: 100%; object-fit: cover; }
.hero__fade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,8,9,0.35) 0%, transparent 22%, transparent 72%, rgba(10,10,11,0.85) 92%, var(--bg) 100%); }
.hero__scroll {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 3;
  font-family: var(--serif); font-size: 0.66rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--ink); opacity: 0.7;
}
.hero__scroll::after { content: ""; display: block; width: 1px; height: 40px; margin: 10px auto 0; background: linear-gradient(var(--ember), transparent); animation: scrollpulse 2s var(--ease) infinite; }
@keyframes scrollpulse { 0% { transform: scaleY(0); transform-origin: top; } 45% { transform: scaleY(1); transform-origin: top; } 55% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- bands / sections ---------- */
.band { padding: clamp(80px, 13vw, 170px) 0; }
.band--center { text-align: center; }
.section { padding: clamp(72px, 11vw, 150px) 0; }
.section--alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 50%, var(--bg) 100%); }
.section__head { max-width: 720px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__head .display { margin-bottom: 1rem; }

/* logline */
.logline { font-family: var(--quote); font-size: clamp(1.4rem, 3.2vw, 2.3rem); line-height: 1.4; font-weight: 500; margin-bottom: 1.4rem; }
.logline__sub { font-family: var(--quote); font-style: italic; font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--ember-2); margin-bottom: 2.6rem; }
.credit { font-family: var(--serif); font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); line-height: 2; }
.credit span { color: var(--muted); font-family: var(--quote); font-style: italic; text-transform: none; letter-spacing: 0; font-size: 1.05rem; }

/* ---------- scene (full-bleed image bands) ---------- */
.scene { position: relative; min-height: 78vh; display: flex; align-items: center; overflow: hidden; padding: 90px 0; }
.scene--tall { min-height: 92vh; }
.scene__bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; }
.scene__veil { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(8,8,9,0.92) 0%, rgba(8,8,9,0.7) 45%, rgba(8,8,9,0.35) 100%), linear-gradient(0deg, var(--bg), transparent 40%, transparent 70%, var(--bg)); }
.scene__content { position: relative; z-index: 2; max-width: 680px; }
.scene__content .display { margin-bottom: 1.4rem; }
.scene__content .lead { color: #d9cdba; }

/* Ken Burns — very slow, never "arrives" */
.kenburns { animation: ken 32s ease-in-out infinite alternate; transform-origin: center; will-change: transform; }
@keyframes ken { from { transform: scale(1.02) translate(0,0); } to { transform: scale(1.09) translate(-1.5%, 1.2%); } }

/* ---------- three worlds ---------- */
.worlds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.world { border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: var(--bg-2); transition: transform 0.5s var(--ease), border-color 0.4s; }
.world:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--world) 55%, transparent); }
.world__img { aspect-ratio: 4 / 3; background-size: cover; background-position: center; filter: saturate(0.92); }
.world__body { padding: 1.5rem 1.6rem 1.8rem; }
.world__body h3 { font-family: var(--serif); font-size: 1.35rem; color: var(--world); }
.world__yr { display: block; font-family: var(--quote); font-style: italic; color: var(--muted); margin: 0.2rem 0 0.9rem; }
.world__body p { font-size: 0.95rem; color: var(--muted); }

/* ---------- pull quotes ---------- */
.quote { position: relative; min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; padding: 100px 22px; }
.quote--book { min-height: 80vh; }
.quote__bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; filter: brightness(0.6); }
.quote__veil { position: absolute; inset: 0; z-index: 1; background: radial-gradient(circle at 50% 50%, rgba(8,8,9,0.55), rgba(8,8,9,0.86)); }
.quote blockquote { position: relative; z-index: 2; font-family: var(--quote); font-style: italic; font-weight: 500; font-size: clamp(1.7rem, 4.4vw, 3.1rem); line-height: 1.3; max-width: 16ch; color: var(--ink); text-shadow: 0 2px 30px rgba(0,0,0,0.6); }
.quote--book blockquote { max-width: 22ch; }
.quote cite { display: block; margin-top: 1.6rem; font-family: var(--serif); font-style: normal; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ember); max-width: 30ch; margin-inline: auto; line-height: 1.8; }

/* ---------- beats ---------- */
.beats { display: flex; flex-direction: column; gap: clamp(2rem, 5vw, 4.5rem); margin-top: 1rem; }
.beat { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.wrap > .section__head + .beats, .beats { width: min(100% - 44px, var(--maxw)); margin-inline: auto; }
.beat--rev { direction: rtl; }
.beat--rev > * { direction: ltr; }
.beat__img { aspect-ratio: 2.39 / 1; background-size: cover; background-position: center; border-radius: 3px; border: 1px solid var(--line); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.8); }
.beat__no { font-family: var(--serif); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ember); }
.beat__text h3 { font-family: var(--quote); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.2; margin: 0.6rem 0 0.9rem; }
.beat__text p { color: var(--muted); }

/* ---------- characters ---------- */
.cast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.cast__card { border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: var(--bg-2); transition: transform 0.5s var(--ease), border-color 0.4s; }
.cast__card:hover { transform: translateY(-5px); border-color: rgba(224,133,58,0.4); }
.cast__img { aspect-ratio: 3 / 2; background-size: cover; background-position: center top; filter: grayscale(0.15) contrast(1.02); transition: filter 0.5s; }
.cast__card:hover .cast__img { filter: none; }
.cast figcaption { padding: 1.3rem 1.4rem 1.6rem; }
.cast figcaption h3 { font-family: var(--serif); font-size: 1.2rem; }
.cast figcaption span { display: block; font-family: var(--quote); font-style: italic; color: var(--ember); margin: 0.1rem 0 0.7rem; }
.cast figcaption p { font-size: 0.92rem; color: var(--muted); }
.cast__note { margin-top: 2.5rem; font-family: var(--quote); font-style: italic; font-size: 1.25rem; color: var(--muted); max-width: 60ch; }

/* ---------- themes ---------- */
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.theme { border-left: 2px solid var(--ember-deep); padding: 0.4rem 0 0.4rem 1.6rem; }
.theme h3 { font-family: var(--quote); font-weight: 600; font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.25; margin-bottom: 0.6rem; }
.theme p { color: var(--muted); font-size: 0.98rem; }

/* ---------- filmmakers stat ---------- */
.stat { margin-top: 2.2rem; font-family: var(--quote); font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-style: italic; color: #d9cdba; max-width: 54ch; }
.stat strong { color: var(--ember-2); font-style: normal; font-weight: 600; }

/* ---------- contact form ---------- */
.contact { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.form { display: grid; gap: 1.1rem; max-width: 640px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form label { display: grid; gap: 0.4rem; font-family: var(--serif); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.form label span { text-transform: none; letter-spacing: 0; font-family: var(--quote); font-style: italic; }
.form input, .form textarea {
  font-family: var(--body); font-size: 0.98rem; color: var(--ink);
  background: rgba(241,231,216,0.04); border: 1px solid var(--line); border-radius: 2px;
  padding: 0.8rem 0.95rem; outline: none; transition: border-color 0.25s, background 0.25s;
}
.form input:focus, .form textarea:focus { border-color: var(--ember); background: rgba(241,231,216,0.07); }
.btn {
  justify-self: start; cursor: pointer; font-family: var(--serif); font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--bg); background: linear-gradient(120deg, var(--ember-2), var(--ember-deep)); border: 0; border-radius: 2px;
  padding: 0.95rem 1.8rem; transition: transform 0.25s var(--ease), box-shadow 0.25s; box-shadow: 0 14px 34px -14px rgba(224,133,58,0.8);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 20px 44px -14px rgba(224,133,58,0.95); }
.form__alt { font-family: var(--quote); font-style: italic; color: var(--muted); }
.form__alt a { color: var(--ember-2); border-bottom: 1px solid rgba(242,168,92,0.4); }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: clamp(3rem, 6vw, 5rem) 0 3rem; }
.footer__inner { display: flex; justify-content: space-between; gap: 2.5rem; flex-wrap: wrap; }
.footer__title { font-family: var(--serif); font-size: 1.8rem; letter-spacing: 0.18em; color: var(--ink); }
.footer__sub { font-family: var(--quote); font-style: italic; color: var(--ember); letter-spacing: 0.1em; margin: 0.2rem 0 1rem; }
.footer__based { font-family: var(--quote); font-style: italic; color: var(--muted); max-width: 36ch; }
.footer__meta { text-align: right; color: var(--muted); font-size: 0.85rem; line-height: 2; }
.footer__meta a { color: var(--ember-2); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .worlds { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .cast { grid-template-columns: 1fr 1fr; }
  .themes { grid-template-columns: 1fr; }
  .beat, .beat--rev { grid-template-columns: 1fr; direction: ltr; gap: 1.2rem; }
  .beat__text { order: 2; }
  .scene__veil { background: linear-gradient(0deg, var(--bg) 0%, rgba(8,8,9,0.72) 36%, rgba(8,8,9,0.9) 100%); }
  .scene__content .lead { text-shadow: 0 2px 18px rgba(0,0,0,0.7); }
}

/* Portrait phones/tablets: show the FULL title-card frame (no side-crop of
   the baked "AVE MARIA" title) by letting the cinemagraph flow at its
   natural 2:1 ratio instead of cover-cropping a tall viewport. */
@media (orientation: portrait) and (max-width: 900px) {
  .hero { height: auto; min-height: 0; padding-top: 70px; background: var(--bg); overflow: visible; }
  .hero__media { position: relative; inset: auto; height: auto; }
  .hero__media video { height: auto; }
  .hero__fade { display: none; }
  .hero__scroll { position: static; transform: none; display: block; text-align: center; padding: 1.1rem 0 0.3rem; opacity: 0.7; }
}
@media (max-width: 820px) {
  .nav__links {
    position: fixed; inset: 70px 0 auto 0; flex-direction: column; gap: 1.4rem; align-items: flex-start;
    background: rgba(8,8,9,0.97); backdrop-filter: blur(14px); padding: 1.6rem 22px 2rem; border-bottom: 1px solid var(--line);
    transform: translateY(-120%); transition: transform 0.4s var(--ease); height: auto;
  }
  .nav__links.is-open { transform: none; }
  .nav__cta { align-self: flex-start; }
  .nav__burger { display: flex; }
}
@media (max-width: 640px) {
  .cast { grid-template-columns: 1fr; max-width: 380px; margin-inline: auto; }
  .form__row { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; }
  .footer__meta { text-align: left; }
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: opacity 0.4s ease !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .kenburns { transform: none; }
  .grain { display: none; }
}
