/* =====================================================
   Memograf · Landing — diseño desde Figma
   ===================================================== */
:root {
  --paper: #ebe3da;
  --ink: #29231a;
  --olive: #706b56;
  --cream: #fbf9f4;
  --sand: #d0cec5;
  --white: #ffffff;
  --font-display: 'Cormorant', Georgia, serif;
  --font-body: 'Manrope', 'Helvetica Neue', sans-serif;
  --container: 1280px;
  --gutter: clamp(20px, 5.5vw, 80px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: initial; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- tipografía base ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; }

h2 {
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.kicker {
  font-size: clamp(12px, 1.1vw, 15px);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 14px;
}
.kicker--light { color: var(--paper); opacity: 0.85; }
.kicker--muted { color: var(--sand); }
.kicker--sm { font-size: 12px; }

.section-head { margin-bottom: clamp(40px, 6vw, 72px); }
.section-head--center { text-align: center; }
.section-head__note { margin-top: 18px; font-size: clamp(16px, 1.4vw, 20px); font-weight: 500; }

.rule {
  width: 186px;
  height: 1px;
  background: color-mix(in srgb, var(--olive) 45%, transparent);
  margin: clamp(40px, 6vw, 64px) auto 0;
}

/* mask reveal por líneas */
[data-lines] .line-mask { display: block; overflow: hidden; }
[data-lines] .line-mask > span { display: block; will-change: transform; }

/* ---------- botones ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 17px 34px;
  border-radius: 2px;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.35s ease, color 0.35s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--light { background: var(--white); color: #1e1e1e; }
.btn--light:hover { box-shadow: 0 18px 40px -18px rgba(0,0,0,0.55); }
.btn--dark { background: var(--ink); color: var(--cream); }
.btn--dark:hover { box-shadow: 0 18px 40px -20px rgba(41,35,26,0.7); }

/* ---------- nav flotante ---------- */
.nav {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%) translateY(-140%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: clamp(24px, 6vw, 64px);
  padding: 10px 12px 10px 26px;
  border-radius: 100px;
  background: rgba(30, 26, 19, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
  opacity: 0;
}
.nav.is-visible { transform: translateX(-50%) translateY(0); opacity: 1; }
.nav__brand {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
}
.nav__brand sup { font-size: 9px; }
.nav__cta {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: #1e1e1e;
  background: var(--cream);
  padding: 10px 22px;
  border-radius: 100px;
  transition: background-color 0.3s ease;
}
.nav__cta:hover { background: var(--white); }

/* =====================================================
   HERO — loop + scrub
   ===================================================== */
.hero-track { position: relative; height: 420vh; background: #0d0c0a; }

.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.hero-stage__video,
.hero-stage__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-stage__canvas { opacity: 0; }

.hero-stage__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.08) 34%, rgba(0,0,0,0.02) 60%, rgba(0,0,0,0.25) 100%);
  pointer-events: none;
}

.hero-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-inline: var(--gutter);
  color: var(--white);
  z-index: 2;
}
.hero-copy__logo { margin-bottom: clamp(20px, 4vh, 44px); }
.hero-copy__logo img { width: clamp(120px, 12vw, 170px); height: auto; }
.hero-copy__title {
  font-size: clamp(42px, 5.6vw, 76px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.02em;
}
.hero-copy__sub {
  max-width: 640px;
  margin: 22px 0 40px;
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.55;
  opacity: 0.9;
}

/* Copy 2 — sobre el frame final de la transición */
.hero-copy2 {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(20,15,8,0.5) 0%, rgba(20,15,8,0.18) 48%, rgba(20,15,8,0) 75%);
}
.hero-copy2 .container { width: 100%; }
.hero-copy2__inner { max-width: 640px; color: var(--white); }

.hero-hint {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  opacity: 0.75;
  z-index: 2;
}
.hero-hint i {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(255,255,255,0));
  animation: hint-drop 2.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  transform-origin: top;
}
@keyframes hint-drop {
  0% { transform: scaleY(0); opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  70%, 100% { transform: scaleY(1) translateY(18px); opacity: 0; }
}

/* =====================================================
   2 · Memorias — continúa el último frame de la transición
   ===================================================== */
.memories {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: #3a3128;
  isolation: isolate;
}
/* La imagen solo se carga cuando esta sección fallback realmente se muestra
   (reduced motion); con scrub activo el JS elimina la sección sin costo. */
@media (prefers-reduced-motion: reduce) {
  .memories { background: url('../assets/img/memories-bg.webp') center / cover no-repeat; }
}
.memories::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(20,15,8,0.5) 0%, rgba(20,15,8,0.18) 48%, rgba(20,15,8,0) 75%);
}
.memories__inner { width: 100%; }
.memories__copy { max-width: 640px; color: var(--white); }
.memories__title {
  font-size: clamp(44px, 5vw, 72px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--white);
}
.memories__sub { margin-top: 24px; font-size: clamp(15px, 1.35vw, 18px); line-height: 1.55; }

/* =====================================================
   secciones papel (beige con textura)
   ===================================================== */
.section-paper {
  position: relative;
  background-color: var(--paper);
}
.section-paper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/img/paper-beige.webp') center / 900px repeat;
  opacity: 0.15; /* Figma: 15% */
  pointer-events: none;
}
.section-paper > .container { position: relative; }

/* ---------- 3 · diferencia + polaroids ---------- */
.difference { padding-block: clamp(80px, 11vw, 150px) clamp(90px, 12vw, 160px); }

.polaroids {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(8px, 1.6vw, 20px);
  margin-top: clamp(30px, 5vw, 60px);
}
.polaroid {
  background: #fdfcf9 url('../assets/img/paper-polaroid.webp') center / cover;
  padding: 4.2% 4.2% 6%;
  box-shadow: 0 24px 50px -22px rgba(41, 35, 26, 0.45);
  rotate: var(--r, 0deg);
}
.polaroids .polaroid { width: clamp(150px, 23%, 330px); flex-shrink: 0; padding: 14px 14px 16px; }
.polaroids .polaroid:nth-child(2) { margin-top: 44px; }
.polaroids .polaroid:nth-child(3) { margin-top: 12px; }
.polaroids .polaroid:nth-child(4) { margin-top: 52px; }
.polaroid img { width: 100%; aspect-ratio: 6 / 5; object-fit: cover; }
.polaroids .polaroid figcaption {
  padding-top: 12px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(13px, 1.3vw, 18px);
  line-height: 1.2;
  color: rgba(73, 66, 54, 0.8);
}

/* ---------- 4 · personalizar ---------- */
.tailored { padding-block: 0 clamp(80px, 11vw, 140px); }
.tailored__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 64px);
}
.tailored__icon { color: var(--olive); margin-bottom: 26px; }
.tailored__icon svg { width: 44px; height: 44px; }
.tailored__kicker {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--olive);
  margin-bottom: 8px;
}
.tailored__title {
  font-family: var(--font-display);
  font-size: clamp(19px, 1.7vw, 24px);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.tailored__body { font-size: 15.5px; line-height: 1.5; color: rgba(41, 35, 26, 0.8); }

/* ---------- 5 · método intro ---------- */
.method-intro {
  /* Figma: fill sólido #706b56, sin textura */
  background: var(--olive);
  padding-block: clamp(70px, 9vw, 120px);
}
.method-intro .section-head { margin-bottom: 0; }
.method-intro__title { color: var(--cream); }
.method-intro__sub {
  max-width: 660px;
  margin: 22px auto 0;
  font-size: clamp(15px, 1.5vw, 20px);
  line-height: 1.45;
  color: rgba(235, 227, 218, 0.85);
}

/* ---------- 6 · pasos ---------- */
.step {
  position: relative;
  min-height: clamp(520px, 78vh, 760px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.step__bg { position: absolute; inset: 0; z-index: -2; }
.step__bg img {
  width: 100%;
  height: 116%;
  object-fit: cover;
  will-change: transform;
}
.step::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(15, 12, 8, 0.22);
}

.step__inner {
  width: 100%;
  display: grid;
  align-items: center;
  gap: clamp(36px, 6vw, 96px);
  padding-block: clamp(60px, 8vw, 90px);
}
.step__inner--pol-left  { grid-template-columns: minmax(260px, 420px) 1fr; }
.step__inner--pol-right { grid-template-columns: 1fr minmax(260px, 420px); }

.polaroid--step { justify-self: center; width: clamp(250px, 28vw, 400px); padding: 16px 16px 44px; rotate: 0deg; will-change: transform; }
.polaroid--step img { aspect-ratio: 371 / 348; }

.step__copy { color: var(--white); max-width: 700px; }
.step__num {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: rgba(236, 230, 230, 0.9);
}
.step__line {
  display: block;
  width: 70px;
  height: 1px;
  background: rgba(255, 255, 255, 0.55);
  margin: 16px 0 18px;
  transform-origin: left;
}
.step__title {
  font-size: clamp(52px, 5.6vw, 80px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #f6f6f6;
  margin-bottom: 22px;
}
.step__body {
  font-size: clamp(16px, 1.65vw, 23px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  max-width: 620px;
}

/* ---------- 7 · atelier ---------- */
.atelier {
  position: relative;
  background: #f4efe8 url('../assets/img/bg-leaves.webp') center / cover no-repeat;
  padding-block: clamp(80px, 11vw, 150px);
}
.atelier__grid {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 560px) 1fr;
  gap: clamp(28px, 4vw, 60px);
  align-items: center;
}
.atelier__col { display: flex; flex-direction: column; gap: clamp(40px, 6vw, 90px); }
.atelier__col:first-child { text-align: left; }
.atelier__item h3 {
  font-size: clamp(24px, 2.3vw, 32px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 14px;
}
.atelier__item p { font-size: 15.5px; line-height: 1.5; color: rgba(41, 35, 26, 0.6); max-width: 320px; }
.atelier__col:last-child .atelier__item p { }
.polaroid--atelier { width: 100%; max-width: 560px; padding: 16px 16px 48px; justify-self: center; rotate: 0deg; }
.polaroid--atelier img { aspect-ratio: 595 / 585; }

/* ---------- 8 · legado viacon ---------- */
.legacy {
  /* Figma: #706b56 + textura al 5% en modo cover */
  position: relative;
  background: var(--olive);
  padding-block: clamp(80px, 10vw, 130px);
}
.legacy::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/img/texture-green.webp') center / cover no-repeat;
  opacity: 0.05;
  pointer-events: none;
}
.legacy > .container { position: relative; }
.legacy__title { color: var(--white); }
.legacy__sub {
  max-width: 640px;
  margin: 22px auto 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: #d8d8d8;
}
.legacy__strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(12px, 1.9vw, 24px);
  align-items: start;
}
.legacy__strip img {
  width: 100%;
  aspect-ratio: 237 / 252;
  object-fit: cover;
}
.legacy__strip img.tall { aspect-ratio: 237 / 323; }
.legacy__sign {
  margin-top: clamp(40px, 5vw, 64px);
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.8vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--white);
}

/* ---------- 9 · CTA conversación ---------- */
.cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(80px, 11vw, 150px);
}
.cta__bg { position: absolute; inset: 0; z-index: -1; }
.cta__bg img { width: 100%; height: 112%; object-fit: cover; will-change: transform; }
.cta__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(94deg, rgba(240,233,223,0) 38%, rgba(240,233,223,0.55) 52%, rgba(240,233,223,0.78) 68%, rgba(240,233,223,0.62) 100%);
}
.cta__inner { display: flex; justify-content: flex-end; }
.cta__panel { max-width: 620px; }
.cta__body { margin: 20px 0 34px; font-size: 15.5px; line-height: 1.55; color: rgba(41, 35, 26, 0.65); max-width: 540px; }
.cta__know { margin-top: clamp(44px, 5vw, 64px); }
.cta__know ul { list-style: none; margin-top: 10px; }
.cta__know li {
  position: relative;
  padding: 13px 0 13px 26px;
  font-size: 15.5px;
  font-weight: 500;
  color: rgba(41, 35, 26, 0.65);
  border-bottom: 1px solid rgba(41, 35, 26, 0.1);
}
.cta__know li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 1px;
  background: var(--olive);
}

/* ---------- 10 · FAQ ---------- */
.faq { padding-block: clamp(80px, 10vw, 130px); }
.faq__inner { max-width: 786px; }
.faq__inner > h2 { text-align: center; }
.faq .rule { margin-bottom: clamp(30px, 4vw, 48px); }

.faq__item { border-bottom: 1px solid rgba(41, 35, 26, 0.16); }
.faq__item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary span {
  font-family: var(--font-display);
  font-size: clamp(19px, 1.8vw, 24px);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.faq__plus { position: relative; width: 16px; height: 16px; flex-shrink: 0; transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.faq__plus::before, .faq__plus::after {
  content: '';
  position: absolute;
  background: var(--ink);
  transition: opacity 0.3s;
}
.faq__plus::before { left: 50%; top: 0; width: 1.5px; height: 100%; transform: translateX(-50%); }
.faq__plus::after { top: 50%; left: 0; height: 1.5px; width: 100%; transform: translateY(-50%); }
.faq__item[open] .faq__plus { transform: rotate(45deg); }
.faq__answer { overflow: hidden; }
.faq__answer p {
  padding: 0 0 24px;
  max-width: 560px;
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.55;
  color: rgba(41, 35, 26, 0.6);
}

/* ---------- 11 · cierre ---------- */
.closing {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(90px, 12vw, 160px);
  text-align: center;
}
.closing__bg { position: absolute; inset: 0; z-index: -1; }
.closing__bg img { width: 100%; height: 112%; object-fit: cover; will-change: transform; }
.closing__note {
  margin: 14px 0 40px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--olive);
}

/* ---------- footer ---------- */
.footer { background: var(--olive); color: var(--paper); }
.footer__inner {
  display: flex;
  justify-content: space-between;
  padding-block: 16px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* =====================================================
   responsive
   ===================================================== */
@media (max-width: 900px) {
  .tailored__grid { grid-template-columns: 1fr; gap: 44px; }
  .atelier__grid { grid-template-columns: 1fr; }
  .atelier__col { gap: 36px; }
  .atelier__item p { max-width: none; }
  .step__inner--pol-left, .step__inner--pol-right { grid-template-columns: 1fr; gap: 40px; }
  .step__inner--pol-left .polaroid--step { order: 2; }
  .cta__inner { justify-content: flex-start; }
  .cta__bg::after { background: rgba(240, 233, 223, 0.72); }
}

@media (max-width: 640px) {
  .hero-track { height: 380vh; }
  .polaroids { flex-wrap: wrap; gap: 18px; }
  .polaroids .polaroid { width: 42%; }
  .polaroids .polaroid:nth-child(2) { margin-top: 26px; }
  .polaroids .polaroid:nth-child(4) { margin-top: 10px; }
  .legacy__strip { grid-template-columns: repeat(5, 62vw); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .legacy__strip img { scroll-snap-align: center; }
  .memories::after { background: linear-gradient(180deg, rgba(20,15,8,0.45) 0%, rgba(20,15,8,0.1) 100%); }
  .footer__inner { flex-direction: column; gap: 6px; align-items: center; }
  .nav { gap: 16px; padding: 8px 10px 8px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-track { height: auto; }
  .hero-hint i { animation: none; }
}
