@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

:root {
  --ivory: #f5ede8;
  --paper: #fbf8f4;
  --rose: #e7d1ce;
  --rose-dark: #b99191;
  --taupe: #806b67;
  --ink: #443936;
  --muted: #9a8580;
  --line: rgba(128, 107, 103, .24);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 85px; }
body { margin: 0; background: var(--ivory); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.7; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 20; opacity: .13; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E"); }
.site-header { height: 76px; padding: 0 7vw; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: absolute; inset: 0 0 auto; z-index: 30; }
.brand { font-family: var(--serif); font-size: 25px; letter-spacing: -.08em; }
.brand span { color: var(--rose-dark); padding: 0 3px; }
.desktop-nav { display: flex; gap: 38px; color: var(--taupe); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.desktop-nav a, .header-date { transition: color .2s; }
.desktop-nav a:hover, .header-date:hover { color: var(--rose-dark); }
.header-date { font-size: 10px; letter-spacing: .16em; color: var(--taupe); }
.menu-toggle { display: none; background: none; border: 0; padding: 10px; }
.menu-toggle span { display: block; width: 23px; height: 1px; background: var(--ink); margin: 6px; }
.section { position: relative; padding: 130px 12vw; }
.hero { min-height: 850px; height: 100svh; max-height: 1050px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-top: 125px; overflow: hidden; }
.eyebrow, .section-kicker { font-size: 9px; letter-spacing: .22em; color: var(--muted); font-weight: 600; }
.hero-frame { width: min(590px, 85vw); min-height: 430px; border: 1px solid rgba(185,145,145,.65); outline: 1px solid rgba(185,145,145,.35); outline-offset: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 35px 0 27px; position: relative; }
.hero-overline { font-family: var(--serif); font-style: italic; color: var(--taupe); font-size: 21px; margin: 0 0 -12px; }
.hero h1 { font-family: var(--serif); font-size: clamp(76px, 12vw, 135px); line-height: 1.2; font-weight: 400; letter-spacing: -.065em; margin: 0; }
.hero-period { color: var(--rose-dark); }
.hero-rule { display: flex; align-items: center; gap: 13px; margin-top: 4px; color: var(--muted); }
.hero-rule span { width: 42px; height: 1px; background: var(--rose-dark); }
.hero-rule small { font-size: 8px; letter-spacing: .25em; }
.hero-number { font-family: var(--serif); font-size: 75px; font-weight: 400; color: var(--rose-dark); line-height: 1; margin: 7px 0 0; }
.hero-copy { font-family: var(--serif); font-size: clamp(17px, 2vw, 21px); line-height: 1.65; color: var(--taupe); }
.scroll-link { display: flex; align-items: center; flex-direction: column; gap: 12px; font-size: 8px; letter-spacing: .2em; color: var(--taupe); margin-top: 38px; }
.scroll-line { height: 38px; width: 1px; background: var(--rose-dark); transform-origin: top; animation: linePulse 2s infinite; }
.hero-side-note { position: absolute; right: 3vw; bottom: 60px; writing-mode: vertical-rl; font-size: 8px; letter-spacing: .2em; color: var(--muted); }
.hero-flower { position: absolute; color: rgba(185,145,145,.28); font-size: 150px; font-weight: 200; }
.flower-one { top: 18%; left: 8%; transform: rotate(20deg); }
.flower-two { right: 9%; bottom: 15%; font-size: 110px; transform: rotate(-15deg); }
.intro { background: var(--paper); display: grid; grid-template-columns: 1fr 2fr; gap: 7vw; }
.section-kicker { display: flex; align-items: center; gap: 13px; white-space: nowrap; }
.section-kicker span { color: var(--rose-dark); }
.intro-content { max-width: 700px; }
.large-quote { font-family: var(--serif); font-size: clamp(30px, 4.3vw, 55px); line-height: 1.25; margin: 0 0 28px; letter-spacing: -.035em; }
.large-quote em, h2 em { color: var(--rose-dark); font-weight: 400; }
.body-copy { max-width: 490px; color: var(--taupe); font-size: 13px; line-height: 2; }
.text-link { display: inline-flex; gap: 20px; margin-top: 25px; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; border-bottom: 1px solid var(--rose-dark); padding-bottom: 8px; }
.text-link span { color: var(--rose-dark); }
.memories { background: var(--ivory); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin: 55px 0 65px; }
h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 6vw, 72px); line-height: 1.12; letter-spacing: -.045em; margin: 0; }
.section-heading p { max-width: 280px; color: var(--taupe); font-size: 12px; line-height: 1.9; margin: 0 0 8px; }
.photo-grid { display: grid; grid-template-columns: 1.05fr .85fr 1fr; align-items: start; gap: 4.5vw; }
.photo-card { margin: 0; }
.photo-offset { margin-top: 90px; }
.photo-placeholder { min-height: 320px; aspect-ratio: 4 / 5; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; position: relative; overflow: hidden; border: 10px solid #fbf8f4; box-shadow: 0 12px 35px rgba(80,55,50,.07); }
.photo-tall .photo-placeholder { min-height: 390px; }
.placeholder-rose { background: linear-gradient(145deg, #e6d1ce, #c9aaa5); }
.placeholder-sand { background: linear-gradient(145deg, #e7ded2, #c9b9a7); }
.placeholder-blush { background: linear-gradient(145deg, #eadbd7, #d6bfc0); }
.photo-placeholder::before, .photo-placeholder::after { content: ''; position: absolute; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; width: 210px; height: 210px; }
.photo-placeholder::after { width: 270px; height: 270px; }
.photo-placeholder span { z-index: 1; font-family: var(--serif); font-size: 32px; color: rgba(255,255,255,.85); }
.photo-placeholder small { z-index: 1; font-size: 8px; letter-spacing: .15em; color: rgba(255,255,255,.9); text-transform: uppercase; }
.photo-card figcaption { font-family: var(--serif); font-style: italic; font-size: 15px; color: var(--taupe); padding: 15px 3px; }
.gallery-note { text-align: center; color: var(--muted); font-size: 8px; letter-spacing: .2em; margin-top: 70px; }
.letter-section { background: var(--paper); }
.letter-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 8vw; margin-top: 65px; }
.letter-intro h2 { margin: 20px 0; }
.letter-intro > p:last-child { color: var(--taupe); font-size: 12px; max-width: 310px; }
.envelope { border: 0; background: transparent; position: relative; width: min(390px, 100%); aspect-ratio: 1.45; margin: auto; cursor: pointer; perspective: 900px; filter: drop-shadow(0 18px 22px rgba(70,50,45,.12)); }
.envelope-letter { position: absolute; width: 82%; height: 83%; left: 9%; top: 3%; background: #fffdf9; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: transform .8s ease; }
.letter-to { font-family: var(--serif); font-size: 25px; color: var(--taupe); }
.letter-hint { font-size: 9px; color: var(--muted); letter-spacing: .1em; margin-top: 7px; }
.envelope-front { position: absolute; inset: 0; z-index: 3; background: #dfc5c1; clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%); }
.envelope-flap { position: absolute; inset: 0; z-index: 4; background: #ead7d2; clip-path: polygon(0 0, 100% 0, 50% 58%); transform-origin: top; transition: transform .65s ease; }
.envelope-seal { position: absolute; z-index: 5; top: 48%; left: 50%; transform: translate(-50%,-50%); width: 39px; height: 39px; border-radius: 50%; background: #b99191; color: white; display: grid; place-items: center; font-family: var(--serif); font-size: 23px; transition: opacity .3s; }
.envelope-caption { position: absolute; top: calc(100% + 19px); left: 0; width: 100%; color: var(--muted); font-size: 8px; letter-spacing: .2em; }
.envelope.open .envelope-flap { transform: rotateX(180deg); z-index: 0; }
.envelope.open .envelope-letter { transform: translateY(-45%); }
.envelope.open .envelope-seal { opacity: 0; }
.letter-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 22px; opacity: 0; visibility: hidden; transition: .35s; }
.letter-modal.visible { opacity: 1; visibility: visible; }
.letter-backdrop { position: absolute; inset: 0; background: rgba(48,38,35,.58); backdrop-filter: blur(5px); }
.letter-paper { position: relative; background: #fffdf9; width: min(590px, 100%); max-height: 85svh; overflow-y: auto; padding: clamp(30px, 6vw, 65px); box-shadow: 0 25px 80px rgba(0,0,0,.2); transform: translateY(20px); transition: transform .4s; }
.letter-modal.visible .letter-paper { transform: translateY(0); }
.letter-paper h3 { font-family: var(--serif); font-size: 32px; font-weight: 400; margin: 24px 0; }
.letter-paper p:not(.eyebrow) { font-family: var(--serif); color: #75645f; font-size: 15px; line-height: 1.9; }
.letter-paper .letter-signoff { margin-top: 30px; }
.letter-signoff em { color: var(--rose-dark); font-size: 20px; }
.close-letter { position: absolute; top: 14px; right: 19px; border: 0; background: none; font-size: 30px; color: var(--taupe); cursor: pointer; }
.chapter { background: #eadbd6; min-height: 680px; display: flex; align-items: center; overflow: hidden; }
.chapter .section-kicker { position: absolute; top: 100px; left: 12vw; }
.chapter-decoration { position: absolute; right: 5vw; top: 5%; font-family: var(--serif); font-size: clamp(260px, 42vw, 570px); line-height: 1; color: rgba(255,255,255,.28); letter-spacing: -.1em; }
.chapter-content { position: relative; z-index: 1; max-width: 650px; margin: 50px auto; text-align: center; }
.chapter-content h2 { font-size: clamp(52px, 8vw, 94px); margin: 20px 0 25px; }
.chapter-content > p:last-child { max-width: 470px; margin: auto; color: #786662; font-size: 12px; line-height: 2; }
.final-section { background: var(--paper); padding-bottom: 0; }
.final-content { max-width: 780px; text-align: center; margin: 65px auto 0; }
.final-content h2 { margin: 20px 0; }
.final-content > p:not(.eyebrow) { color: var(--taupe); max-width: 450px; margin: 0 auto 40px; font-size: 12px; }
.video-placeholder { width: min(680px, 100%); margin: auto; aspect-ratio: 16/9; background: linear-gradient(135deg, #e8d8d2, #c8aaa5); display: grid; place-items: center; position: relative; overflow: hidden; }
.video-poster { display: flex; flex-direction: column; align-items: center; gap: 12px; color: #fffaf7; }
.play-icon { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.8); border-radius: 50%; padding-left: 4px; font-size: 17px; }
.video-label { font-size: 9px; letter-spacing: .2em; }
.video-poster small { font-size: 9px; opacity: .8; }
.footer { margin: 120px -12vw 0; padding: 45px 20px 35px; border-top: 1px solid var(--line); text-align: center; }
.footer-heart { font-family: var(--serif); font-size: 30px; color: var(--rose-dark); margin: 0 0 10px; }
.footer > p:not(.footer-heart) { font-size: 9px; letter-spacing: .2em; }
.footer span { display: block; color: var(--muted); font-family: var(--serif); font-style: italic; font-size: 14px; }
.footer a { display: inline-block; font-size: 8px; letter-spacing: .18em; margin-top: 25px; color: var(--taupe); }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
@keyframes linePulse { 0%,100% { transform: scaleY(.55); opacity: .5; } 50% { transform: scaleY(1); opacity: 1; } }

@media (max-width: 760px) {
  .site-header { height: 66px; padding: 0 6vw; }
  .desktop-nav { display: none; position: absolute; top: 65px; left: 0; right: 0; padding: 24px; background: var(--paper); flex-direction: column; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
  .desktop-nav.open { display: flex; }
  .header-date { margin-left: auto; margin-right: 12px; font-size: 8px; }
  .menu-toggle { display: block; }
  .section { padding: 90px 7vw; }
  .hero { min-height: 760px; height: 100svh; padding-top: 100px; }
  .hero-frame { min-height: 350px; margin: 30px 0 22px; }
  .hero-overline { font-size: 18px; }
  .hero-number { font-size: 60px; }
  .hero-flower { font-size: 90px; }
  .flower-one { top: 15%; left: -3%; }
  .flower-two { right: -2%; bottom: 13%; }
  .hero-side-note { display: none; }
  .intro { display: block; }
  .intro-content { margin-top: 45px; }
  .large-quote { font-size: 37px; }
  .section-heading { display: block; margin: 40px 0; }
  .section-heading p { margin-top: 20px; }
  .photo-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .photo-offset { margin-top: 45px; }
  .photo-card:last-child { grid-column: 1 / -1; width: 72%; margin: 5px auto 0; }
  .photo-placeholder { min-height: 220px; border-width: 7px; }
  .photo-tall .photo-placeholder { min-height: 270px; }
  .photo-card figcaption { font-size: 13px; }
  .gallery-note { margin-top: 45px; line-height: 1.8; }
  .letter-layout { grid-template-columns: 1fr; gap: 65px; margin-top: 45px; }
  .letter-intro { text-align: center; }
  .letter-intro > p:last-child { margin-left: auto; margin-right: auto; }
  .envelope { width: min(370px, 90%); }
  .chapter { min-height: 620px; }
  .chapter .section-kicker { top: 55px; left: 7vw; }
  .chapter-content h2 { font-size: clamp(48px, 12vw, 76px); }
  .chapter-decoration { top: 20%; right: -8%; }
  .final-content { margin-top: 45px; }
  .footer { margin: 85px -7vw 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Galería real: composición editorial adaptable a fotos verticales y horizontales */
.photo-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; gap:48px 4.2vw; }
.photo-card { min-width:0; margin:0; }
.photo-card:nth-child(3n + 2) { margin-top:82px; }
.photo-card:nth-child(5n + 1) { margin-top:18px; }
.photo-button { width:100%; padding:9px; border:0; background:#fbf8f4; box-shadow:0 12px 35px rgba(80,55,50,.09); position:relative; display:block; cursor:zoom-in; overflow:hidden; }
.photo-button img { display:block; width:100%; height:auto; aspect-ratio:4/5; object-fit:cover; background:#e7d1ce; transition:transform .7s ease; }
.photo-card:nth-child(4n) .photo-button img,.photo-card:nth-child(4n + 3) .photo-button img { aspect-ratio:5/4; }
.photo-button:hover img { transform:scale(1.035); }
.photo-missing { position:absolute; inset:9px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; padding:15px; color:#806b67; background:linear-gradient(145deg,#eadbd6,#d9c0ba); font-size:10px; text-align:center; letter-spacing:.04em; }
.photo-missing strong { font-family:var(--serif); font-size:15px; font-weight:400; }
.photo-button.has-image .photo-missing { display:none; }
.photo-zoom { position:absolute; right:17px; bottom:17px; width:30px; height:30px; border-radius:50%; display:grid; place-items:center; color:white; background:rgba(68,57,54,.55); opacity:0; transition:opacity .25s; }
.photo-button:hover .photo-zoom,.photo-button:focus-visible .photo-zoom { opacity:1; }
.photo-card figcaption { padding:13px 4px 0; }
.gallery-note { margin-top:72px; }
.image-lightbox { position:fixed; inset:0; z-index:80; display:grid; place-items:center; padding:55px 24px 35px; background:rgba(35,27,25,.94); opacity:0; visibility:hidden; transition:opacity .25s,visibility .25s; }
.image-lightbox.visible { opacity:1; visibility:visible; }
.lightbox-backdrop { position:absolute; inset:0; border:0; background:transparent; cursor:zoom-out; }
.image-lightbox > img { position:relative; z-index:1; max-width:min(90vw,1100px); max-height:78svh; object-fit:contain; box-shadow:0 15px 60px rgba(0,0,0,.3); }
.lightbox-close { position:absolute; z-index:2; top:13px; right:22px; border:0; background:none; color:#fff; font-size:38px; cursor:pointer; }
.lightbox-caption { position:relative; z-index:1; color:#f5ede8; font-family:var(--serif); font-style:italic; margin:13px 0 0; }
.video-wrap { width:min(760px,100%); margin:0 auto; display:flex; flex-direction:column; align-items:center; }
/* El vídeo de Denise es vertical: conserva su proporción y limita su altura en pantalla. */
.memory-video { display:block; width:auto; height:auto; max-width:100%; max-height:78svh; aspect-ratio:auto; background:transparent; object-fit:contain; box-shadow:0 15px 45px rgba(80,55,50,.12); }
.video-help { margin:12px 0 0; color:var(--muted); font-size:10px; letter-spacing:.04em; }
.video-help code { color:var(--taupe); }
@media (max-width:760px) {
 .photo-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px 17px; }
 .photo-card:nth-child(3n + 2),.photo-card:nth-child(5n + 1) { margin-top:0; }
 .photo-card:nth-child(even) { margin-top:38px; }
 .photo-button { padding:6px; }
 .photo-missing { inset:6px; font-size:8px; }
 .photo-missing strong { font-size:12px; }
 .photo-zoom { display:none; }
 .photo-card figcaption { font-size:12px; line-height:1.5; padding-top:9px; }
 .gallery-note { margin-top:45px; }
 .image-lightbox { padding-left:12px; padding-right:12px; }
 .memory-video { max-height:70svh; }
}
@media (prefers-reduced-motion:reduce) { .photo-button img { transition:none; } }

/* Pantalla de acceso con contraseña */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.is-locked {
  overflow: hidden;
}

.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--ivory);
  transition: opacity .45s ease, visibility .45s ease;
}

.lock-screen.is-unlocked {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lock-card {
  width: min(430px, 100%);
  padding: clamp(32px, 6vw, 48px) clamp(24px, 5vw, 38px);
  text-align: center;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 20px 55px rgba(80, 55, 50, .1);
}

.lock-card h2 {
  font-size: clamp(30px, 6vw, 42px);
  margin: 14px 0 12px;
}

.lock-copy {
  margin: 0 auto 24px;
  max-width: 310px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--taupe);
}

.lock-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lock-form input {
  width: 100%;
  padding: 13px 15px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: #fffdf9;
  border: 1px solid var(--line);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.lock-form input:focus {
  border-color: var(--rose-dark);
  box-shadow: 0 0 0 3px rgba(185, 145, 145, .18);
}

.lock-submit {
  padding: 13px 18px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}

.lock-submit:hover {
  background: var(--rose-dark);
}

.lock-submit:active {
  transform: scale(.99);
}

.lock-error {
  min-height: 20px;
  margin: 12px 0 0;
  font-size: 12px;
  color: #9e3b3b;
}