@charset "UTF-8";
:root {
  --wine: #6e1420;
  --wine-deep: #3a0d12;
  --wine-darker: #24080b;
  --rose: #8f1d2c;
  --paper: #f3e8da;
  --paper-2: #efe1cf;
  --card: #ead9c4;
  --ink: #4a2a24;
  --ink-soft: #7a5a50;
  --gold: #e9c9a0;
  --serif: "Playfair Display", Georgia, serif;
  --script: "Homemade Apple", cursive;
  --type: "Special Elite", "Courier New", monospace;
  --sans: "Lato", system-ui, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 60px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
}
body.locked, body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
svg { width: 1em; height: 1em; display: block; }

section { position: relative; padding: 84px 22px 64px; overflow: hidden; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.2; }
h2 { font-size: clamp(1.9rem, 7.5vw, 2.6rem); color: var(--wine); margin-bottom: 26px; }
.h-heart { font-size: .6em; vertical-align: middle; }
.eyebrow { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--rose); font-weight: 700; margin-bottom: 6px; }
.eyebrow.light { color: var(--gold); }
.script { font-family: var(--script); font-size: .95rem; line-height: 1.9; color: var(--rose); }
.closing { margin-top: 34px; text-align: center; transform: rotate(-3deg); }
.closing.light { color: var(--gold); }
.muted { color: #cdb3a8; font-size: .9rem; }

/* Texturas */
.paper {
  background:
    radial-gradient(circle at 15% 10%, rgba(255,255,255,.55), transparent 45%),
    radial-gradient(circle at 90% 90%, rgba(160,110,80,.12), transparent 50%),
    var(--paper);
}
.paper.alt { background-color: var(--paper-2); }
.dark { color: #f6e9dc; background: var(--wine-deep); }
.dark h2 { color: #fbefe3; }
.wine { background: radial-gradient(circle at 50% 0%, #5a1119, var(--wine-darker) 75%); }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; font-size: .95rem; letter-spacing: .02em;
  transition: transform .2s, background .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn-outline { border: 1px solid rgba(255,240,225,.75); color: #fff5ea; backdrop-filter: blur(4px); }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.btn-solid { width: 100%; background: var(--rose); color: #fff; box-shadow: 0 8px 22px rgba(143,29,44,.35); }
.btn-solid:hover { background: #a3243a; }

/* Fotos / placeholders */
.ph {
  position: relative;
  background: linear-gradient(135deg, #c98a6a, #7d2532 60%, #3b0f16);
  background-size: cover; background-position: center;
}
.ph:not(.loaded)::after {
  content: "\2661"; position: absolute; inset: 0; display: grid; place-items: center;
  color: rgba(255,235,220,.7); font-size: 1.8rem;
}

/* ---------- Login ---------- */
.login {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px;
  background: var(--wine-darker); transition: opacity .8s, visibility .8s;
}
.login.hide { opacity: 0; visibility: hidden; }
.login-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(233,140,90,.35), transparent 40%),
    radial-gradient(circle at 80% 85%, rgba(143,29,44,.55), transparent 50%),
    linear-gradient(160deg, #2b0a0f, #120405);
}
.login-script {
  position: absolute; top: max(48px, 8vh); left: 28px; font-family: var(--script);
  color: var(--gold); font-size: 1.05rem; line-height: 2; transform: rotate(-6deg); opacity: .9;
}
.login-card {
  position: relative; width: min(100%, 360px); padding: 34px 26px 28px; border-radius: 18px;
  background: rgba(58,13,18,.78); border: 1px solid rgba(233,201,160,.18);
  backdrop-filter: blur(10px); box-shadow: 0 30px 60px rgba(0,0,0,.5); color: #fbefe3;
  margin-top: 90px;
}
.login-card h1 { font-size: 2rem; }
.field {
  display: flex; align-items: center; gap: 10px; margin: 22px 0 8px; padding: 0 14px;
  border: 1px solid rgba(233,201,160,.25); border-radius: 10px; background: rgba(0,0,0,.25);
}
.field svg { width: 18px; height: 18px; color: var(--gold); }
.field input {
  flex: 1; padding: 14px 0; background: none; border: 0; outline: 0; color: #fff;
  font-size: 16px; letter-spacing: .2em;
}
.field input::placeholder { color: #b89b90; letter-spacing: normal; }
.hint { font-size: .8rem; color: #cdb3a8; min-height: 1.4em; margin-bottom: 18px; }
.shake { animation: shake .45s; }
@keyframes shake { 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }

/* ---------- Topbar / menu ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 58px; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between; color: #fff3e6;
  transition: background .3s, color .3s, box-shadow .3s;
}
.topbar.scrolled { background: rgba(36,8,11,.82); backdrop-filter: blur(10px); }
.topbar.scrolled.on-paper { background: rgba(243,232,218,.88); color: var(--wine); box-shadow: 0 1px 0 rgba(110,20,32,.1); }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.15rem; }
.brand svg { width: 24px; height: 24px; }
.desk-nav { display: none; }
.menu-btn { width: 40px; height: 40px; display: grid; place-content: center; gap: 5px; }
.menu-btn span { width: 22px; height: 1.5px; background: currentColor; transition: transform .3s, opacity .3s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.menu-open .menu-btn { color: var(--wine); }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 45; width: min(78vw, 300px);
  padding: 86px 28px 28px; background: var(--paper); box-shadow: -20px 0 40px rgba(0,0,0,.25);
  transform: translateX(105%); transition: transform .4s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column; justify-content: space-between;
}
.menu-open .drawer { transform: none; }
#drawer-nav a {
  display: flex; align-items: center; gap: 14px; padding: 13px 4px; color: var(--ink);
  border-bottom: 1px solid rgba(110,20,32,.08); font-size: 1.02rem;
}
#drawer-nav a svg { width: 20px; height: 20px; color: var(--rose); }
#drawer-nav a.active { color: var(--rose); font-weight: 700; }
.drawer-script { transform: rotate(-5deg); margin-bottom: calc(80px + var(--safe-b)); }
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(20,4,6,.5); opacity: 0; visibility: hidden; transition: .3s; }
.menu-open .scrim { opacity: 1; visibility: visible; }

/* ---------- Hero ---------- */
.hero, .final {
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center; text-align: center;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 70% 25%, rgba(240,150,90,.55), transparent 45%),
    radial-gradient(ellipse at 20% 80%, rgba(143,29,44,.7), transparent 55%),
    linear-gradient(180deg, #4a1a1c, #1b0507);
}
.hero-bg.loaded { background-size: cover; background-position: center; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,4,6,.45), rgba(20,4,6,.35) 40%, rgba(20,4,6,.85));
}
.hero-content, .final-content { position: relative; z-index: 1; max-width: 520px; margin: 0 auto; }
.hero .note {
  display: inline-block; color: var(--gold); transform: rotate(-4deg); margin-bottom: 18px; font-size: .9rem;
}
.hero h1 { font-size: clamp(2.6rem, 12vw, 4.2rem); color: #fff5ea; text-shadow: 0 4px 30px rgba(0,0,0,.4); }
.heart-small { display: block; margin: 14px 0; color: #fff; animation: beat 1.6s infinite; }
@keyframes beat { 0%,100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.15); } }
.hero-content > p:not(.note), .final-content > p:not(.eyebrow) { color: #efdccd; font-size: 1rem; max-width: 34ch; margin: 0 auto 26px; }
.counter { display: flex; justify-content: center; gap: 8px; margin: 0 auto 30px; max-width: 320px; }
.counter div {
  flex: 1; min-width: 0; padding: 10px 4px; border-radius: 12px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(233,201,160,.2); backdrop-filter: blur(6px);
}
.counter strong { display: block; font-family: var(--serif); font-size: 1.6rem; line-height: 1; color: #fff; }
.counter small { font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.hero-foot { position: relative; z-index: 1; margin-top: 40px; font-size: .78rem; color: #e6cfc0; }
.hero { padding-bottom: 110px; }

/* ---------- História ---------- */
.hist-grid { display: grid; gap: 40px; }
#hist-text p { margin-bottom: 14px; color: var(--ink); font-size: 1.02rem; }
.polaroid {
  position: relative; width: min(78%, 300px); margin: 0 auto; padding: 12px 12px 14px; background: #fbf6ee;
  box-shadow: 0 18px 40px rgba(60,20,10,.22);
}
.polaroid .ph { aspect-ratio: 4/5; }
.polaroid figcaption { text-align: center; margin-top: 8px; font-size: .8rem; }
.tilt-r { transform: rotate(4deg); }
.tape {
  position: absolute; top: -12px; left: 50%; width: 90px; height: 26px; transform: translateX(-50%) rotate(-4deg);
  background: rgba(220,200,170,.75); box-shadow: 0 1px 2px rgba(0,0,0,.08); z-index: 2;
}

/* ---------- Momentos ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
.moment { text-align: left; }
.moment .ph { aspect-ratio: 1; border-radius: 6px; margin-bottom: 8px; box-shadow: 0 10px 24px rgba(0,0,0,.35); transition: transform .3s; }
.moment:hover .ph { transform: scale(1.03); }
.moment strong { display: block; font-size: .88rem; font-weight: 400; color: #fbefe3; }
.moment small { font-size: .74rem; color: #c9a99a; }

.lightbox {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px;
  background: rgba(15,3,5,.92); opacity: 0; visibility: hidden; transition: .3s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox figure { width: min(100%, 560px); background: #fbf6ee; padding: 12px 12px 18px; transform: rotate(-1.5deg); }
.lb-photo { aspect-ratio: 4/5; background-size: contain; background-repeat: no-repeat; background-color: #1b0507; }
.lightbox figcaption { margin-top: 10px; text-align: center; color: var(--ink); font-family: var(--serif); font-size: 1.15rem; }
.lb-close { position: absolute; top: 14px; right: 18px; font-size: 2.2rem; color: #fff; line-height: 1; }

/* ---------- Carta ---------- */
.envelope { position: relative; max-width: 560px; margin: 0 auto; }
.envelope-closed {
  width: 100%; aspect-ratio: 16/10; border-radius: 6px; position: relative;
  background: linear-gradient(160deg, #ecdcc5, #dcc6a8); box-shadow: 0 18px 36px rgba(60,20,10,.2);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 18px; overflow: hidden;
}
.envelope-closed::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 62%;
  background: linear-gradient(160deg, #e5d2b6, #d2b994);
  clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 2px 2px rgba(0,0,0,.1));
}
.envelope-closed .seal { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: beat 2s infinite; }
.envelope-closed .script { font-size: .8rem; }
.seal {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #f3c9bd; font-size: 1.2rem;
  background: radial-gradient(circle at 35% 30%, #b2384a, #7a1322 60%, #5a0d18); box-shadow: 0 4px 10px rgba(90,13,24,.45), inset 0 0 0 4px rgba(0,0,0,.12);
}
.letter {
  display: none; position: relative; padding: 30px 22px 90px; font-family: var(--type); font-size: .94rem; line-height: 1.95; color: #3d2621;
  background:
    repeating-linear-gradient(transparent 0 29px, rgba(110,60,40,.07) 29px 30px),
    linear-gradient(170deg, #f8efe1, #ead9bf);
  box-shadow: 0 20px 40px rgba(60,20,10,.22); transform: rotate(-1deg);
}
.envelope.open .envelope-closed { display: none; }
.envelope.open .letter { display: block; animation: unfold .9s cubic-bezier(.2,.8,.2,1); }
@keyframes unfold { from { opacity: 0; transform: translateY(30px) rotate(-1deg) scaleY(.6); } }
.letter p { margin-bottom: 14px; }
.letter .sign { font-family: var(--script); color: var(--rose); font-size: 1.1rem; }
.seal-letter { position: absolute; left: 20px; bottom: 22px; }
.sticky {
  position: absolute; right: 14px; bottom: -22px; width: 150px; padding: 14px; font-size: .74rem; line-height: 1.8;
  background: #f6ead4; box-shadow: 0 8px 18px rgba(60,20,10,.2); transform: rotate(5deg);
}

/* ---------- Planos ---------- */
.plans { list-style: none; display: grid; gap: 12px; max-width: 640px; margin: 0 auto; }
.plan {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px;
  background: rgba(234,217,196,.7); border: 1px solid rgba(110,20,32,.08);
}
.plan-icon {
  flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(110,20,32,.35); color: var(--wine);
}
.plan-icon svg { width: 22px; height: 22px; }
.plan strong { display: block; font-weight: 400; color: var(--wine); font-size: 1rem; }
.plan small { display: block; color: var(--ink-soft); font-size: .8rem; line-height: 1.45; }
.plan-arrow { margin-left: auto; color: var(--rose); opacity: .6; }

/* ---------- Coisas que amo ---------- */
.loves { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 640px; margin: 0 auto; }
.love {
  padding: 22px 12px; text-align: center; border-radius: 12px; background: rgba(234,217,196,.65);
  border: 1px solid rgba(110,20,32,.08); transition: transform .25s, background .25s;
}
.love:active, .love:hover { transform: translateY(-3px); background: #ecd6c2; }
.love span { display: grid; place-items: center; margin-bottom: 10px; color: var(--wine); }
.love svg { width: 28px; height: 28px; }
.love strong { display: block; font-weight: 400; color: var(--wine); }
.love small { color: var(--ink-soft); font-size: .78rem; line-height: 1.4; display: block; margin-top: 2px; }

/* ---------- Final ---------- */
.final { padding-bottom: 140px; }
.final h2 { font-size: clamp(3rem, 15vw, 5rem); color: #fff5ea; margin: 6px 0 0; }
.final-script { position: absolute; left: 0; right: 0; bottom: calc(100px + var(--safe-b)); z-index: 1; text-align: center; color: var(--gold); transform: rotate(-3deg); }

/* ---------- Player ---------- */
.player {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--safe-b)); z-index: 30;
  display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; border-radius: 16px;
  background: rgba(243,232,218,.92); backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(30,6,9,.3); border: 1px solid rgba(110,20,32,.1);
}
.player-cover { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.player-cover::after { font-size: 1rem !important; }
.playing .player-cover { animation: spin 8s linear infinite; border-radius: 50%; }
@keyframes spin { to { transform: rotate(360deg); } }
.player-info { flex: 1; min-width: 0; }
.player-info strong { display: block; font-size: .88rem; color: var(--wine); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-info small { display: block; font-size: .74rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-bar { height: 3px; border-radius: 3px; background: rgba(110,20,32,.12); margin-top: 6px; overflow: hidden; }
.player-bar span { display: block; height: 100%; width: 0; background: var(--rose); }
.player-btn { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--rose); color: #fff; flex: none; }
.player-btn svg { width: 18px; height: 18px; }

/* ---------- Corações ---------- */
.hearts-layer { position: fixed; inset: 0; pointer-events: none; z-index: 200; overflow: hidden; }
.hearts-layer span { position: absolute; bottom: -40px; color: #d23a52; animation: floatUp linear forwards; opacity: 0; }
@keyframes floatUp {
  10% { opacity: 1; }
  100% { transform: translate(calc(var(--x, 0) * 1px), -110vh) rotate(25deg); opacity: 0; }
}

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.polaroid.reveal.in { transform: rotate(4deg); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Tablet / Desktop ---------- */
@media (min-width: 760px) {
  section { padding: 110px 6vw 90px; }
  .topbar { padding: 0 4vw; height: 64px; }
  .desk-nav { display: flex; gap: 26px; font-size: .88rem; }
  .desk-nav a { padding: 4px 0; border-bottom: 1px solid transparent; opacity: .85; }
  .desk-nav a.active, .desk-nav a:hover { border-color: currentColor; opacity: 1; }
  .menu-btn { display: none; }
  .hist-grid { grid-template-columns: 1.2fr 1fr; align-items: center; max-width: 1000px; }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1000px; margin: 0 auto; }
  .loves { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .letter { padding: 46px 48px 100px; }
  .player { left: auto; right: 24px; bottom: 24px; width: 320px; }
  .hero-foot { position: absolute; margin: 0; bottom: 30px; left: 4vw; }
  .final-script { bottom: 40px; }
  .login-script { left: 8vw; top: 20vh; font-size: 1.5rem; }
}
