/* ============================================================
   Landing Fernando Inigo · Life Planner
   Identidad: monocromo editorial (tarjeta final del video).
   Mobile-first.
   ============================================================ */

:root {
  --paper: #F4F3F1;
  --paper-2: #ECEAE6;
  --ink: #141414;
  --ink-soft: #3d3d3a;
  --muted: #6b6a65;
  --line: #DDDBD5;
  --white: #ffffff;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --radius: 4px;
  color-scheme: light;
}

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

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

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Regla de QA: ninguna imagen se deforma jamás.
   height:auto anula el hint presentacional del atributo height,
   preservando siempre la proporcion intrinseca del archivo. */
img, video { max-width: 100%; height: auto; display: block; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.center { text-align: center; }

/* ---------- tipografía ---------- */
h1, h2, .final-title {
  font-family: var(--serif);
  font-weight: 560;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 6.4vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4.6vw, 2.6rem); margin-bottom: 0.6em; }
h1 em, h2 em, .final-title em { font-style: italic; font-weight: 400; }
h3 { font-size: 1.06rem; font-weight: 700; letter-spacing: 0.01em; margin-bottom: 0.4em; }

.eyebrow, .kicker {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.1em;
}
.kicker.center { text-align: center; }

.lead { font-size: clamp(1.05rem, 2.6vw, 1.2rem); color: var(--ink-soft); margin-top: 1.1em; max-width: 34em; }
.body-lg { font-size: clamp(1.02rem, 2.4vw, 1.15rem); color: var(--ink-soft); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
/* logo oficial (PNG con transparencia) */
.brand { text-decoration: none; display: inline-flex; align-items: center; }
.brand-img { height: 34px; width: auto; }
.brand-img-footer { height: 40px; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--white);
  text-decoration: none; border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-weight: 600; letter-spacing: 0.02em;
  padding: 14px 26px; min-height: 48px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(20,20,20,0.18); background: #000; }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn-small { padding: 10px 16px; min-height: 42px; font-size: 0.88rem; }
.btn-lg { padding: 17px 34px; font-size: 1.06rem; }
.btn-primary { }

.cta-block { margin-top: 2em; }
.cta-note { font-size: 0.85rem; color: var(--muted); margin-top: 0.9em; }

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-copy { max-width: 560px; }

.hero-media { display: flex; justify-content: center; }
.video-frame {
  position: relative;
  width: min(320px, 78vw);
  /* ratio exacto del archivo (1080x1936), no 9:16 nominal: cero recorte */
  aspect-ratio: 1080 / 1936;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 60px rgba(20,20,20,0.22);
}
.video-frame video { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
/* video de reconocimiento: ratio exacto del archivo 480x1040 */
.video-frame--tall { aspect-ratio: 480 / 1040; margin: 0 auto; }
.media-caption {
  text-align: center;
  font-size: 0.8rem;
  color: #a3a29c;
  margin-top: 14px;
  letter-spacing: 0.04em;
}
.video-play {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  width: 100%; border: 0; cursor: pointer;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.45));
  color: #fff; font-family: var(--sans); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.04em;
  transition: background 0.2s ease;
}
.video-play svg {
  width: 62px; height: 62px; padding: 17px;
  background: rgba(255,255,255,0.16);
  border: 1.5px solid rgba(255,255,255,0.85);
  border-radius: 50%;
  backdrop-filter: blur(4px);
}
.video-play:hover { background: linear-gradient(180deg, rgba(0,0,0,0.08) 40%, rgba(0,0,0,0.55)); }
.video-play.is-hidden { display: none; }

/* ---------- secciones ---------- */
.section { padding: clamp(56px, 9vw, 110px) 0; }
.section-line { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-2); }

.section-dark { background: var(--ink); color: var(--paper); }
.section-dark .kicker { color: #a3a29c; }
.section-dark .body-lg, .section-dark p { color: #d8d6d0; }
.section-dark h2 { color: var(--white); }

/* split (imagen + texto) */
.split { display: grid; gap: 40px; align-items: center; }
.split-media img { border-radius: 10px; width: min(360px, 100%); margin: 0 auto; }
.split-copy p + p { margin-top: 1em; }

/* la comparación */
.question-line {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3.4vw, 1.8rem);
  margin-top: 1.2em !important;
  color: var(--white) !important;
}
.question-line em { font-style: italic; }

/* autorreflexión */
.reflection-note { font-size: 0.85rem; color: var(--muted); margin-top: -0.4em; margin-bottom: 2em; }
.reflection { list-style: none; display: grid; gap: 16px; }
.reflection-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  display: flex; flex-direction: column; gap: 16px;
}
.reflection-item > p {
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--ink);
}
.reflection-toggle { display: flex; gap: 10px; }
.rbtn {
  flex: 1;
  min-height: 46px;
  padding: 10px 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.rbtn:hover { border-color: var(--ink-soft); color: var(--ink); }
.rbtn:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.rbtn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.reflection-close { margin-top: 2em; font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--ink-soft); }

/* CTA final */
.final .btn { margin-top: 1.6em; }
.btn-light { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-light:hover { background: var(--paper); box-shadow: 0 6px 18px rgba(0,0,0,0.35); }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 110px; }
.footer-brand { font-weight: 800; letter-spacing: 0.14em; font-size: 0.85rem; margin-bottom: 14px; }
.legal { font-size: 0.8rem; color: var(--muted); max-width: 60em; }
.copy { font-size: 0.8rem; color: var(--muted); margin-top: 10px; }

/* sticky CTA móvil */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.25s ease;
}
.sticky-cta.is-visible { transform: translateY(0); }
.sticky-cta .btn { width: 100%; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- breakpoints ---------- */
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 56px; }
  .split { grid-template-columns: 0.9fr 1.1fr; gap: 64px; }
  .split-rev { grid-template-columns: 1.1fr 0.9fr; }
  .split-media img { width: min(400px, 100%); }
  .sticky-cta { display: none; }
}

@media (max-width: 899px) {
  .hero-media { order: 2; }
}
