/* CD Cinema · Carpe Diem Cinema
   Marca: papel, tinta y barro del kit de logo; Cormorant Garamond para mostrar, Jost para leer.
   Capítulos oscuros (la sala de cine) y capítulos claros (el papel). */

:root {
  --paper: #f3ebdf;
  --paper-2: #e9decd;
  --ink: #2a1d17;
  --ink-soft: #5b4a3f;
  --night: #1c1411;
  --night-2: #2a1d17;
  --cream: #f3ebdf;
  --cream-soft: #cbbfae;
  --barro: #ae4f2c;
  --barro-light: #d9825b;

  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Jost", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  /* tamaños */
  --t-display: clamp(64px, 11vw, 188px);
  --t-h2: clamp(46px, 6.6vw, 112px);
  --t-h3: clamp(30px, 2.9vw, 46px);
  --t-lead: clamp(19px, 1.5vw, 22px);
  --t-body: 17px;
  --t-small: 14px;

  --m: clamp(20px, 4.4vw, 72px);
  --section: clamp(96px, 11vw, 176px);
  --nav-h: 84px;

  /* curvas (Emil: ease-out fuerte para entrar, ease-in-out para lo que viaja en pantalla) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-exit: cubic-bezier(0.55, 0.055, 0.675, 0.19);

  --ground: var(--paper);
  --accent: var(--barro);
  --font-display: var(--serif);
  --font-text: var(--sans);
}

/* ---------- Transición entre páginas: el telón sube ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 520ms var(--ease-exit) both vt-out; }
::view-transition-new(root) { animation: 1000ms var(--ease-in-out) both vt-in; }
::view-transition-group(nav) { animation-duration: 0s; }
@keyframes vt-out { to { opacity: 0.4; transform: scale(0.97); } }
@keyframes vt-in { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, figure, ul, ol, dl, dd, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
::selection { background: var(--barro); color: var(--cream); }

.wrap { padding-inline: var(--m); max-width: 1720px; margin-inline: auto; }
.night { background: var(--night); color: var(--cream); }
.paper { background: var(--paper); color: var(--ink); }
.paper-2 { background: var(--paper-2); color: var(--ink); }

/* ---------- Tipografía ---------- */
.display, .h2, .h3, .serif {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: -0.02em;
}
.display { font-size: var(--t-display); line-height: 0.86; letter-spacing: -0.035em; }
.h2 { font-size: var(--t-h2); line-height: 0.94; letter-spacing: -0.03em; }
.h3 { font-size: var(--t-h3); line-height: 1.04; font-weight: 400; }
.it { font-style: italic; }
.lead { font-size: var(--t-lead); line-height: 1.55; font-weight: 300; max-width: 44ch; }
.small { font-size: var(--t-small); }
.soft { color: var(--ink-soft); }
.night .soft { color: var(--cream-soft); }

/* ---------- Botones y enlaces ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 54px; padding: 16px 30px; overflow: hidden; isolation: isolate;
  background: var(--ink); color: var(--cream);
  font-family: var(--sans); font-size: 14px; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; border: 0; cursor: pointer;
  transition: transform 160ms var(--ease-out), color 300ms ease;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--barro);
  clip-path: inset(100% 0 0 0);
  transition: clip-path 450ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn--cream { background: var(--cream); color: var(--ink); }
.btn--cream::before { background: var(--paper-2); } /* el texto sigue en tinta: nunca crema sobre crema */
.btn svg { width: 16px; height: 16px; transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover::before { clip-path: inset(0 0 0 0); }
  .btn:hover svg { transform: translateX(4px); }
}

.link {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--t-body); font-weight: 400; text-decoration: none; padding-bottom: 6px;
}
.link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; /* taste-skill-ignore: subrayado del enlace */
  transform-origin: right; transition: transform 500ms var(--ease-out);
}
.link svg { width: 14px; height: 14px; transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .link:hover::after { transform: scaleX(0); }
  .link:hover svg { transform: translateX(4px); }
}

/* ---------- Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: var(--m);
  color: var(--ink);
  view-transition-name: nav;
  transition: transform 500ms var(--ease-out), color 300ms ease;
}
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--paper);
  opacity: 0; transition: opacity 300ms ease, background-color 300ms ease;
}
.nav.is-solid::before { opacity: 1; }
.nav.is-hidden { transform: translateY(-100%); }
.nav.on-night { color: var(--cream); }
.nav.on-night::before { background: var(--night); }
.nav__logo { display: block; width: 172px; height: 60px; position: relative; flex: none; }
.nav__logo img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 300ms ease; }
.nav__logo .on-dark { opacity: 0; }
.nav.on-night .nav__logo .on-dark { opacity: 1; }
.nav.on-night .nav__logo .on-light { opacity: 0; }
.nav__links { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 44px); }
.nav__links a:not(.btn) {
  font-size: 14px; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none;
  position: relative; padding: 8px 0;
}
.nav__links a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor; /* taste-skill-ignore: subrayado del enlace */
  transform: scaleX(0); transform-origin: left; transition: transform 400ms var(--ease-out);
}
.nav__links a[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .nav__links a:not(.btn):hover::after { transform: scaleX(1); } }
.nav .btn { min-height: 44px; padding: 12px 22px; font-size: 13px; }
.nav.on-night .btn { background: var(--cream); color: var(--ink); }
.nav__menu { display: none; }

.menu {
  position: fixed; inset: 0; z-index: 60; background: var(--night); color: var(--cream);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--nav-h) + 24px) var(--m) 32px;
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path 700ms var(--ease-in-out), visibility 0s linear 700ms;
}
.menu.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 700ms var(--ease-in-out), visibility 0s; }
.menu__close {
  position: absolute; top: 20px; right: var(--m); min-height: 44px; padding: 10px 0;
  background: none; border: 0; cursor: pointer;
  font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase;
}
.menu ul { display: grid; gap: 6px; }
.menu li { overflow: hidden; }
.menu li a {
  display: block; font-family: var(--serif); font-weight: 300; font-size: 13vw; line-height: 1.05; text-decoration: none;
  transform: translateY(100%); transition: transform 700ms var(--ease-expo);
}
.menu.is-open li a { transform: none; }
.menu.is-open li:nth-child(2) a { transition-delay: 60ms; }
.menu.is-open li:nth-child(3) a { transition-delay: 120ms; }
.menu.is-open li:nth-child(4) a { transition-delay: 180ms; }
.menu.is-open li:nth-child(5) a { transition-delay: 240ms; }
.menu__foot { display: grid; gap: 8px; font-size: 16px; }
.menu__foot a { text-decoration: none; }

/* ---------- Imágenes ---------- */
.pic { position: relative; overflow: hidden; background: var(--paper-2); }
.night .pic { background: #2b211c; }
.pic img, .pic video { width: 100%; height: 100%; object-fit: cover; }
.pic--par img { height: 118%; margin-top: -9%; }

/* ---------- Encabezado de sección ---------- */
.head-row { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; }

/* ---------- Banda final ---------- */
.cta { padding: var(--section) 0; }
.cta__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: end; }
.cta__text { grid-column: 1 / 8; }
.cta__text .lead { margin-top: 32px; }
.cta__acts { margin-top: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }
.cta__pic { grid-column: 9 / 13; aspect-ratio: 4 / 5; }

/* ---------- Pie ---------- */
.foot { background: var(--night); color: var(--cream); padding: 120px 0 36px; }
.foot__top { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: start; }
.foot__brand { grid-column: 1 / 5; }
.foot__brand img { width: 210px; height: auto; }
.foot__tag { margin-top: 36px; font-family: var(--serif); font-style: italic; font-weight: 300; font-size: var(--t-h3); line-height: 1.05; }
.foot__col { grid-column: span 2; display: grid; gap: 10px; align-content: start; }
.foot__col:first-of-type { grid-column: 7 / 9; }
.foot__col h2 { font-family: var(--sans); font-size: 14px; font-weight: 400; color: var(--cream-soft); margin-bottom: 8px; }
.foot__col a { text-decoration: none; font-size: 17px; width: fit-content; position: relative; }
.foot__col a::after { /* taste-skill-ignore: subrayado del enlace */ content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 400ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .foot__col a:hover::after { transform: scaleX(1); } }
.foot__name { margin-top: 120px; font-family: var(--serif); font-weight: 300; font-size: clamp(64px, 17.5vw, 330px); line-height: 0.8; letter-spacing: -0.04em; white-space: nowrap; }
.foot__legal { margin-top: 40px; display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--cream-soft); }
.foot__legal a { text-decoration: none; }

/* ---------- Reproductor ---------- */
.player { width: min(1400px, calc(100vw - 2 * var(--m))); max-width: none; padding: 0; border: 0; background: transparent; color: var(--cream); }
.player::backdrop { background: rgba(14, 10, 8, 0.94); }
.player[open] { animation: player-in 500ms var(--ease-out); }
@keyframes player-in { from { opacity: 0; transform: translateY(20px) scale(0.98); } }
.player__bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.player__title { font-family: var(--serif); font-size: 30px; font-weight: 300; }
.player__close { min-height: 44px; padding: 10px 22px; background: var(--cream); color: var(--ink); border: 0; cursor: pointer; font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; transition: transform 160ms var(--ease-out); }
.player__close:active { transform: scale(0.97); }
.player__video { width: 100%; aspect-ratio: 2.35 / 1; background: #000; }

/* ---------- Preguntas (compartido) ---------- */
.qa details { border-top: 1px solid rgba(42, 29, 23, 0.18); } /* taste-skill-ignore: renglones del acordeón, como en el PDF */
.qa details:last-child { border-bottom: 1px solid rgba(42, 29, 23, 0.18); } /* taste-skill-ignore */
.qa summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 0; min-height: 44px;
  font-family: var(--serif); font-size: clamp(22px, 1.9vw, 30px); font-weight: 400; line-height: 1.15;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary .pm { position: relative; width: 18px; height: 18px; flex: none; }
.qa summary .pm::before, .qa summary .pm::after { /* taste-skill-ignore: el signo + */ content: ""; position: absolute; left: 0; top: 50%; width: 18px; height: 1px; background: currentColor; transition: transform 300ms var(--ease-out); }
.qa summary .pm::after { transform: rotate(90deg); }
.qa details[open] summary .pm::after { transform: rotate(0deg); }
.qa .ans { padding: 0 0 28px; max-width: 60ch; }
.qa details[open] .ans { animation: ans 420ms var(--ease-out); }
@keyframes ans { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Entradas (las controla site.js; sin script todo está visible) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(28px); }
.js [data-shutter] { clip-path: inset(0 0 100% 0); }
.js [data-shutter] img, .js [data-shutter] video { transform: scale(1.18); }
.js [data-split] { visibility: hidden; }
.split-line { display: block; }

/* ---------- Teléfono ---------- */
@media (max-width: 900px) {
  :root { --nav-h: 68px; --section: 112px; }
  .nav__logo { width: 140px; height: 49px; }
  .nav__links { display: none; }
  .nav__menu {
    display: block; min-height: 44px; padding: 10px 0; background: none; border: 0; cursor: pointer;
    font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
  }
  .cta__grid { display: flex; flex-direction: column; align-items: stretch; gap: 48px; }
  .cta__pic { width: 72%; align-self: flex-end; }
  .foot { padding-top: 88px; }
  .foot__top { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 16px; }
  .foot__brand { grid-column: 1 / 3; }
  .foot__col, .foot__col:first-of-type { grid-column: span 1; }
  .foot__name { margin-top: 80px; }
  .foot__legal { flex-direction: column; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .js [data-reveal], .js [data-shutter], .js [data-split] { opacity: 1 !important; transform: none !important; clip-path: none !important; visibility: visible !important; }
  .js [data-shutter] img, .js [data-shutter] video { transform: none !important; }
  .menu, .menu li a, .nav, .btn::before { transition: none; }
}
