@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Space+Mono:wght@400;700&display=swap');

:root {
  --ink: #32232c;
  --ink-soft: #725a62;
  --plum: #4b2038;
  --wine: #6c2942;
  --copper: #b97859;
  --coral: #d28a72;
  --paper: #f4ede1;
  --paper-deep: #e8dbc9;
  --paper-light: #fbf7f0;
  --night: #291b29;
  --line: rgba(75, 32, 56, .18);
  --shadow: rgba(64, 30, 45, .16);
  --app-font-sans: 'DM Sans', sans-serif;
  --app-font-serif: 'Fraunces', Georgia, serif;
  --app-font-mono: 'Space Mono', monospace;
  --radius: .75rem;
  --background: 35 38% 92%;
  --foreground: 330 19% 17%;
  --border: 33 24% 81%;
  --card: 36 43% 95%;
  --card-foreground: 330 19% 17%;
  --card-border: 33 24% 81%;
  --primary: 331 40% 21%;
  --primary-foreground: 35 38% 92%;
  --secondary: 31 39% 87%;
  --secondary-foreground: 330 19% 17%;
  --muted: 32 29% 87%;
  --muted-foreground: 330 14% 38%;
  --accent: 17 42% 58%;
  --accent-foreground: 330 19% 17%;
  --input: 33 24% 81%;
  --ring: 17 42% 58%;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--app-font-sans);
  -webkit-font-smoothing: antialiased;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; }

.invitation {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 2%, rgba(210,138,114,.18), transparent 25rem),
    var(--paper);
}
.invitation::before {
  content: "";
  position: fixed;
  z-index: 20;
  inset: 0;
  opacity: .035;
  pointer-events: none;
  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='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}
.serif { font-family: var(--app-font-serif); }
.mono {
  font-family: var(--app-font-mono);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .66rem;
}
.eyebrow {
  color: var(--copper);
  font-family: var(--app-font-mono);
  font-size: .63rem;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.section {
  position: relative;
  padding: 5.5rem 1.25rem;
}
.section-inner { max-width: 1120px; margin: 0 auto; }
.section-label {
  display: flex;
  gap: .8rem;
  align-items: center;
  color: var(--copper);
  font-family: var(--app-font-mono);
  font-size: .64rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.section-label::before {
  content: "";
  display: inline-block;
  width: 2.5rem;
  height: 1px;
  background: var(--copper);
}
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .12s; }
.delay-2 { transition-delay: .24s; }
.delay-3 { transition-delay: .36s; }

/* Opening envelope */
.opening {
  position: fixed;
  z-index: 50;
  inset: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(210,138,114,.24), transparent 24rem),
    linear-gradient(145deg, #f5eee4 0%, #ead9cc 52%, #e4c9bd 100%);
  transition: opacity .75s ease .75s, visibility .75s ease .75s;
}
.opening::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .06;
  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='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
  pointer-events: none;
}
.opening.is-open { opacity: 0; visibility: hidden; pointer-events: none; }
.opening-glow {
  position: absolute;
  width: min(76vw, 34rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255,255,255,.34);
  filter: blur(34px);
}
.envelope-stage {
  position: relative;
  z-index: 1;
  width: min(82vw, 31rem);
  perspective: 1200px;
  transform: translateY(-1rem);
}
.envelope {
  position: relative;
  width: 100%;
  aspect-ratio: 1.48 / 1;
  filter: drop-shadow(0 28px 30px rgba(75,32,56,.17));
  transform-style: preserve-3d;
  animation: envelopeFloat 3.6s ease-in-out infinite;
}
.envelope-back {
  position: absolute;
  inset: 0;
  border-radius: .7rem;
  background: #d99a87;
  border: 1px solid rgba(75,32,56,.12);
}
.invitation-card {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 8%;
  height: 78%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  border: 1px solid rgba(75,32,56,.16);
  border-radius: .45rem;
  background: var(--paper-light);
  color: var(--plum);
  box-shadow: 0 8px 18px rgba(75,32,56,.08);
  transition: transform .85s cubic-bezier(.2,.75,.2,1) .18s;
}
.invitation-card::before,
.invitation-card::after {
  content: "";
  position: absolute;
  left: 12%; right: 12%;
  height: 1px;
  background: rgba(185,120,89,.4);
}
.invitation-card::before { top: 18%; }
.invitation-card::after { bottom: 18%; }
.card-small,
.card-place {
  font-family: var(--app-font-mono);
  font-size: clamp(.55rem, 2.3vw, .72rem);
  letter-spacing: .18em;
  text-transform: uppercase;
}
.invitation-card strong {
  font-family: var(--app-font-serif);
  font-size: clamp(1.55rem, 6vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -.03em;
}
.envelope-left,
.envelope-right,
.envelope-bottom,
.envelope-flap { position: absolute; inset: 0; }
.envelope-left {
  z-index: 4;
  clip-path: polygon(0 0, 53% 50%, 0 100%);
  background: #e8b19f;
}
.envelope-right {
  z-index: 4;
  clip-path: polygon(100% 0, 47% 50%, 100% 100%);
  background: #e3aa98;
}
.envelope-bottom {
  z-index: 5;
  clip-path: polygon(0 100%, 50% 46%, 100% 100%);
  background: #efc1b0;
}
.envelope-flap {
  z-index: 7;
  clip-path: polygon(0 0, 100% 0, 50% 58%);
  background: #c97969;
  transform-origin: top center;
  backface-visibility: hidden;
  transition: transform .72s cubic-bezier(.2,.72,.18,1);
}
.envelope-seal {
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 48%;
  width: clamp(3.4rem, 14vw, 4.6rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  background: var(--plum);
  color: var(--paper);
  box-shadow: 0 7px 16px rgba(75,32,56,.22);
  font-family: var(--app-font-serif);
  font-size: clamp(.95rem, 4vw, 1.35rem);
  letter-spacing: -.08em;
  transition: opacity .25s ease, transform .4s ease;
}
.envelope-seal span { color: var(--coral); font-style: italic; }
.opening.is-opening .envelope { animation-play-state: paused; }
.opening.is-opening .envelope-flap { transform: rotateX(180deg); z-index: 1; }
.opening.is-opening .envelope-seal { opacity: 0; transform: translate(-50%,-70%) scale(.78); }
.opening.is-opening .invitation-card { transform: translateY(-50%); }
.opening.is-opening .opening-pill { opacity: 0; transform: translateY(8px); }
.opening-fullscreen-button {
  position: absolute;
  inset: 0;
  z-index: 12;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.opening-minimal-ui {
  position: absolute;
  left: 50%;
  bottom: max(2rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 13;
  pointer-events: none;
}
.opening-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-width: 11.8rem;
  min-height: 3rem;
  padding: .85rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(75,32,56,.17);
  background: rgba(251,247,240,.72);
  color: var(--plum);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(75,32,56,.12);
  font-family: var(--app-font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: opacity .25s ease, transform .25s ease;
}
.tap-dot {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 0 rgba(210,138,114,.38);
  animation: tapPulse 1.8s ease-out infinite;
}
@keyframes envelopeFloat { 0%,100% { transform: translateY(0) rotate(-.4deg); } 50% { transform: translateY(-8px) rotate(.4deg); } }
@keyframes tapPulse { 0% { box-shadow: 0 0 0 0 rgba(210,138,114,.4); } 70%,100% { box-shadow: 0 0 0 9px rgba(210,138,114,0); } }
.opening-note { display:none; }
.open-button, .primary-button, .outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 3.2rem;
  padding: .8rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .25s ease, background-color .25s ease, color .25s ease, border-color .25s ease;
}
.open-button { background: var(--coral); color: var(--night); }
.open-button:hover, .primary-button:hover, .outline-button:hover, .utility-button:hover { transform: translateY(-2px); }
.open-button:active, .primary-button:active, .outline-button:active, .utility-button:active { transform: translateY(0); }
/* Floating controls */
.floating-controls {
  position: fixed;
  z-index: 15;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  gap: .5rem;
}
.utility-button {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251,247,240,.82);
  color: var(--plum);
  box-shadow: 0 8px 24px rgba(64,30,45,.1);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform .25s ease, background-color .25s ease;
}
.utility-button.active { background: var(--plum); color: var(--paper); }
.utility-button:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.music-note { position: fixed; right: 1rem; bottom: 4.25rem; z-index: 15; color: var(--ink-soft); font-size: .65rem; }

/* Hero */
.hero {
  min-height: max(46rem, 100svh);
  display: flex;
  align-items: center;
  position: relative;
  padding: 5rem 1.25rem 3rem;
  background: var(--paper);
}
.hero-inner { width: 100%; max-width: 1120px; margin: 0 auto; }
.hero-grid { display: grid; gap: 3.5rem; align-items: center; }
.hero-copy { position: relative; z-index: 1; }
.hero-kicker { margin-bottom: 1.4rem; }
.hero h2 {
  margin: 0;
  color: var(--plum);
  font-family: var(--app-font-serif);
  font-size: clamp(4.2rem, 18vw, 10.4rem);
  font-weight: 400;
  line-height: .78;
  letter-spacing: -.085em;
}
.hero h2 span { display: block; margin-left: 1.8rem; color: var(--wine); font-style: italic; }
.hero-date {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.2rem;
  color: var(--ink-soft);
  font-family: var(--app-font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero-date::before { content: ""; width: 3rem; height: 1px; background: var(--copper); }
.hero-side { align-self: end; max-width: 24rem; margin-left: auto; }
.hero-side p { margin: 0 0 1.7rem; color: var(--ink-soft); font-size: 1rem; line-height: 1.7; }
.text-link {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  color: var(--plum);
  font-weight: 700;
  font-size: .82rem;
  text-decoration: none;
}
.text-link svg { transition: transform .2s ease; }
.text-link:hover svg { transform: translateX(4px); }
.hero-ornament { display: none; }
.scroll-cue {
  position: absolute;
  bottom: 1.2rem;
  left: 1.25rem;
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--ink-soft);
}
.scroll-cue span { writing-mode: vertical-rl; transform: rotate(180deg); }
.scroll-line { display: block; width: 1px; height: 3.8rem; background: var(--copper); transform-origin: top; animation: lineDrop 2s ease-in-out infinite; }
@keyframes lineDrop { 0%,100% { transform: scaleY(.3); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* Story */
.story { background: var(--plum); color: var(--paper); }
.story .section-label { color: var(--coral); }
.story .section-label::before { background: var(--coral); }
.story-grid { display: grid; gap: 2.8rem; }
.story-quote {
  margin: 0;
  font-family: var(--app-font-serif);
  font-size: clamp(2.4rem, 8vw, 5.8rem);
  line-height: 1.01;
  letter-spacing: -.06em;
}
.story-quote em { color: var(--coral); font-style: italic; }
.story-copy { max-width: 25rem; margin-left: auto; color: rgba(244,237,225,.72); font-size: .98rem; line-height: 1.8; }
.story-copy p { margin: 0 0 1.5rem; }
.signature { color: var(--coral); font-family: var(--app-font-serif); font-size: 1.5rem; font-style: italic; }

/* Details */
.details { background: var(--paper-light); }
.details-heading { display: grid; gap: 1.4rem; margin-bottom: 3rem; }
.details h3, .rsvp h3, .closing h3 {
  margin: 0;
  color: var(--plum);
  font-family: var(--app-font-serif);
  font-size: clamp(2.4rem, 8vw, 5.2rem);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.06em;
}
.details-intro { max-width: 22rem; margin: 0; color: var(--ink-soft); line-height: 1.65; }
.detail-layout { display: grid; gap: 1.3rem; }
.detail-feature {
  position: relative;
  min-height: 20rem;
  padding: 2rem;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--night);
  color: var(--paper);
}
.detail-feature::after {
  content: "16";
  position: absolute;
  right: -1rem;
  bottom: -2.2rem;
  color: rgba(210,138,114,.16);
  font-family: var(--app-font-serif);
  font-size: 16rem;
  line-height: 1;
}
.detail-feature .eyebrow { color: var(--coral); }
.detail-feature h4 { max-width: 13rem; margin: 4.2rem 0 0; font-family: var(--app-font-serif); font-size: 2rem; font-weight: 400; line-height: 1; }
.detail-feature p { margin: .7rem 0 0; color: rgba(244,237,225,.62); }
.detail-stack { display: grid; gap: 1.3rem; }
.detail-card {
  min-height: 9.4rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
}
.detail-card-head { display: flex; justify-content: space-between; align-items: flex-start; color: var(--copper); }
.detail-card h4 { margin: 1.2rem 0 .25rem; color: var(--plum); font-family: var(--app-font-serif); font-size: 1.5rem; font-weight: 500; }
.detail-card p { margin: 0; color: var(--ink-soft); font-size: .87rem; line-height: 1.45; }
.map-card { display: flex; flex-direction: column; justify-content: space-between; background: var(--paper-deep); }
.map-link { align-self: flex-start; margin-top: 1.2rem; }
.action-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.2rem; }
.outline-button { border-color: var(--line); color: var(--plum); background: transparent; font-size: .78rem; }
.outline-button:hover { background: var(--paper-deep); }
.primary-button { background: var(--plum); color: var(--paper); font-size: .78rem; }
.primary-button:hover { background: var(--wine); }

/* RSVP */
.rsvp { background: var(--coral); color: var(--night); }
.rsvp .section-label { color: var(--plum); }
.rsvp .section-label::before { background: var(--plum); }
.rsvp-layout { display: grid; gap: 2rem; }
.rsvp h3 { color: var(--night); }
.rsvp-copy { max-width: 28rem; margin: 0; color: rgba(41,27,41,.7); line-height: 1.7; }
.rsvp-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.rsvp .primary-button { background: var(--night); color: var(--paper); }
.rsvp .outline-button { border-color: rgba(41,27,41,.3); color: var(--night); }
.microcopy { width: 100%; margin: 0; color: rgba(41,27,41,.62); font-size: .73rem; }

/* Closing */
.closing { padding-bottom: 6rem; background: var(--night); color: var(--paper); text-align: center; }
.closing::before, .closing::after {
  content: "";
  position: absolute;
  left: 50%;
  width: min(80vw, 33rem);
  height: 1px;
  background: rgba(210,138,114,.45);
  transform: translateX(-50%);
}
.closing::before { top: 2.6rem; }
.closing::after { bottom: 2.6rem; }
.closing .section-inner { display: flex; flex-direction: column; align-items: center; }
.closing h3 { max-width: 37rem; color: var(--paper); }
.closing h3 em { color: var(--coral); font-style: italic; }
.closing p { max-width: 25rem; margin: 1.6rem auto 2rem; color: rgba(244,237,225,.65); line-height: 1.7; }
.closing .eyebrow { margin-top: 2.5rem; color: var(--coral); }
.closing-mark { color: var(--coral); font-family: var(--app-font-serif); font-size: 2rem; font-style: italic; }
.footer-line { margin-top: 3.5rem; color: rgba(244,237,225,.35); font-family: var(--app-font-mono); font-size: .56rem; letter-spacing: .18em; text-transform: uppercase; }

@media (min-width: 700px) {
  .section { padding: 8rem 2.5rem; }
  .hero { padding: 6rem 2.5rem 4rem; }
  .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(15rem, .7fr); gap: 4rem; }
  .hero h2 span { margin-left: 5rem; }
  .hero-ornament {
    display: block;
    position: absolute;
    top: 13%;
    right: 9%;
    width: 18rem;
    height: 26rem;
    border: 1px solid var(--line);
    border-radius: 12rem 12rem 0 0;
    transform: rotate(14deg);
  }
  .hero-ornament::before, .hero-ornament::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(185,120,89,.48);
    border-radius: 50%;
  }
  .hero-ornament::before { inset: 2.5rem; }
  .hero-ornament::after { inset: 5rem; }
  .scroll-cue { left: 2.5rem; }
  .story-grid { grid-template-columns: 1.2fr .65fr; align-items: end; gap: 5rem; }
  .details-heading { grid-template-columns: 1fr 1fr; align-items: end; }
  .detail-layout { grid-template-columns: 1.15fr .85fr; }
  .detail-feature { min-height: 25rem; padding: 2.5rem; }
  .detail-feature h4 { margin-top: 7rem; font-size: 2.5rem; }
  .rsvp-layout { grid-template-columns: .9fr 1.1fr; align-items: end; gap: 6rem; }
  .rsvp-actions { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}


@media (min-width: 900px) {
  .envelope-stage { width: min(42vw, 33rem); transform: translateY(-.5rem); }
  .opening-minimal-ui { bottom: 2.5rem; }
}

/* ===== Abertura premium — paleta vinho, bege e rosa salmão ===== */
:root {
  --ink: #35272c;
  --ink-soft: #78636a;
  --plum: #5b1724;
  --wine: #741e2f;
  --copper: #b96f62;
  --coral: #df9a86;
  --paper: #f3e8d9;
  --paper-deep: #ead9c2;
  --paper-light: #fbf5eb;
  --night: #2b1720;
  --line: rgba(91, 23, 36, .18);
  --shadow: rgba(54, 18, 30, .18);
}

.opening {
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  padding: max(1.5rem, env(safe-area-inset-top)) 1rem max(1.5rem, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 20%, rgba(223,154,134,.15), transparent 27rem),
    linear-gradient(145deg, #6b1727 0%, #571420 54%, #43101a 100%);
  color: var(--paper);
  transition: opacity .65s ease .72s, visibility .65s ease .72s;
}
.opening::before {
  opacity: .09;
  mix-blend-mode: soft-light;
}
.opening-content {
  position: relative;
  z-index: 3;
  width: min(100%, 43rem);
  min-height: calc(100% - 1rem);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2.7vh, 1.75rem);
  text-align: center;
}
.opening-decor {
  position: absolute;
  z-index: 1;
  width: 19rem;
  height: 19rem;
  border-radius: 50%;
  opacity: .26;
  filter: blur(1px);
  pointer-events: none;
}
.opening-decor::before,
.opening-decor::after {
  content: "";
  position: absolute;
  width: 11rem;
  height: 4.8rem;
  border: 1px solid rgba(223,154,134,.45);
  border-radius: 100% 0 100% 0;
  transform: rotate(32deg);
}
.opening-decor::after { transform: translate(4.8rem, 5.8rem) rotate(-18deg); }
.opening-decor-left { left: -10rem; bottom: -4rem; }
.opening-decor-right { right: -10rem; top: -5rem; transform: rotate(180deg); }

.opening-countdown { width: min(100%, 39rem); }
.countdown-heart {
  color: var(--coral);
  font-family: var(--app-font-serif);
  font-size: 1.65rem;
  line-height: 1;
}
.countdown-kicker {
  margin: .55rem 0 1rem;
  color: #efb7a4;
  font-family: var(--app-font-mono);
  font-size: clamp(.58rem, 1.9vw, .72rem);
  letter-spacing: .24em;
  text-transform: uppercase;
}
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(243,232,217,.23);
  border-bottom: 1px solid rgba(243,232,217,.23);
  padding: .8rem 0 .72rem;
}
.countdown-unit {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
}
.countdown-unit + .countdown-unit::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14%;
  bottom: 14%;
  width: 1px;
  background: rgba(243,232,217,.22);
}
.countdown-unit strong {
  color: #f3b39d;
  font-family: var(--app-font-serif);
  font-size: clamp(1.65rem, 7vw, 3rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.04em;
}
.countdown-unit span {
  color: rgba(243,232,217,.78);
  font-family: var(--app-font-mono);
  font-size: clamp(.43rem, 1.7vw, .62rem);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.opening-copy { display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.opening-invite-label {
  color: #f0b29f;
  font-family: var(--app-font-mono);
  font-size: clamp(.62rem, 2.2vw, .77rem);
  letter-spacing: .27em;
  text-transform: uppercase;
}
.opening-invite-action {
  color: var(--paper);
  font-family: var(--app-font-serif);
  font-size: clamp(2rem, 8vw, 3.85rem);
  font-style: italic;
  line-height: 1;
  letter-spacing: -.035em;
}

.envelope-stage {
  width: min(82vw, 31rem);
  max-width: 31rem;
  perspective: 1400px;
  transform: none;
}
.envelope {
  aspect-ratio: 1.52 / 1;
  animation: none;
  filter: drop-shadow(0 20px 24px rgba(18, 4, 9, .28));
  transform: rotate(0deg);
  will-change: transform;
}
.envelope-back {
  border-radius: .45rem;
  background: #d7b18f;
  border: 1px solid rgba(71,33,24,.14);
}
.invitation-card {
  left: 6%; right: 6%; top: 7%; height: 79%;
  border-radius: .3rem;
  background: #fbf3e7;
  border-color: rgba(91,23,36,.18);
  box-shadow: 0 7px 15px rgba(63,30,20,.08);
}
.envelope-left { background: #e4c09e; }
.envelope-right { background: #dfb995; }
.envelope-bottom { background: #ecc9a8; }
.envelope-flap {
  background: #f1d1b0;
  border-top: 1px solid rgba(96,55,39,.12);
}
.envelope-seal {
  width: clamp(3.15rem, 13vw, 4.15rem);
  background: #6d1424;
  color: #f5d9c7;
  box-shadow: 0 6px 14px rgba(42,7,14,.3), inset 0 0 0 3px rgba(229,143,118,.16);
}
.envelope-seal span { color: #e6a18e; }
.envelope::after {
  content: "";
  position: absolute;
  z-index: 9;
  inset: 0;
  border-radius: .45rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
  pointer-events: none;
}

.opening-tap-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .15rem;
  color: rgba(243,232,217,.76);
  font-family: var(--app-font-mono);
  text-transform: uppercase;
  letter-spacing: .18em;
}
.opening-tap-hint span {
  color: var(--coral);
  font-size: 1.35rem;
  line-height: 1;
  animation: openingNudge 1.8s ease-in-out infinite;
}
.opening-tap-hint small { font-size: .52rem; }

.opening.is-opening .envelope {
  animation: envelopeLift .82s cubic-bezier(.2,.75,.2,1) both;
}
.opening.is-opening .envelope-flap { transform: rotateX(180deg); z-index: 1; }
.opening.is-opening .envelope-seal { opacity: 0; transform: translate(-50%,-68%) scale(.76); }
.opening.is-opening .invitation-card { transform: translateY(-42%); }
.opening.is-opening .opening-copy,
.opening.is-opening .opening-countdown,
.opening.is-opening .opening-tap-hint {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .28s ease, transform .28s ease;
}
.opening-fullscreen-button { z-index: 12; }

@keyframes openingNudge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@keyframes envelopeLift { 0% { transform: translateY(0) scale(1); } 55% { transform: translateY(-5px) scale(1.01); } 100% { transform: translateY(-2px) scale(1); } }

/* Paleta aplicada às seções do convite */
.story { background: var(--plum); }
.details { background: var(--paper-light); }
.detail-feature { background: var(--night); }
.rsvp { background: var(--coral); }
.closing { background: var(--night); }

@media (max-width: 640px) {
  .opening { padding-left: .9rem; padding-right: .9rem; }
  .opening-content { justify-content: flex-start; padding-top: .35rem; gap: .95rem; }
  .opening-countdown { margin-top: .1rem; }
  .countdown-kicker { margin-bottom: .75rem; }
  .countdown-grid { padding: .65rem 0 .58rem; }
  .opening-copy { gap: .1rem; }
  .envelope-stage { width: min(91vw, 28rem); }
  .opening-invite-action { font-size: clamp(2rem, 11vw, 3rem); }
  .opening-tap-hint { margin-top: -.2rem; padding-bottom: .35rem; }
}

@media (max-height: 720px) and (max-width: 640px) {
  .opening { padding-top: .7rem; padding-bottom: .7rem; }
  .opening-content { gap: .55rem; }
  .countdown-heart { display: none; }
  .countdown-kicker { margin: 0 0 .45rem; }
  .countdown-grid { padding: .45rem 0; }
  .countdown-unit strong { font-size: 1.65rem; }
  .opening-invite-action { font-size: 2.15rem; }
  .envelope-stage { width: min(78vw, 24rem); }
  .opening-tap-hint small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .opening-tap-hint span { animation: none; }
  .opening.is-opening .envelope { animation: none; }
}
