:root {
  --cream: #efe8dc;
  --paper: #f7f3eb;
  --ivory: #fffcf6;
  --blush: #f4d4dc;
  --pink: #e8b7c4;
  --olive: #5e6a4c;
  --rose: #8a9478;
  --dusty: #5e6a4c;
  --sage: #8a9478;
  --leaf: #6e7a5a;
  --moss: #4f5c40;
  --ink: #3d3834;
  --muted: #7a7068;
  --gold: #c9a227;
  --champagne: #d4c6a8;
  --btn: #e8b6b4;
  --btn-hover: #dba3a1;
  --line: rgba(94, 106, 76, 0.22);
  --shadow: 0 16px 40px rgba(79, 92, 64, 0.12);
  --gutter: 24px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --display: "Playfair Display", Georgia, serif;
  --caps: "Cormorant Garamond", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--serif);
  background: #d9d1c3;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 42% at 8% 0%, rgba(138, 148, 120, 0.28), transparent 58%),
    radial-gradient(ellipse 60% 38% at 100% 6%, rgba(94, 106, 76, 0.22), transparent 52%),
    radial-gradient(ellipse 80% 40% at 50% 100%, rgba(212, 198, 168, 0.4), transparent 55%),
    #e4dccf;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  opacity: 0.1;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%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='.55'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 10px 10px 32px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease 0.12s, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.12s;
}

.page.is-entering {
  opacity: 0;
  transform: translateY(24px);
}

.opened {
  position: relative;
}

.opened__env {
  position: absolute;
  z-index: 0;
  top: 0;
  right: 0;
  left: 0;
  height: 300px;
  pointer-events: none;
}

.opened__back {
  position: absolute;
  top: 102px;
  right: 0;
  left: 0;
  height: 198px;
  background-color: var(--olive);
  background-image: url("../img/papel.jpg");
  background-size: 220px;
  background-blend-mode: multiply;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 18px 36px rgba(45, 52, 38, 0.22);
}

.opened__flap {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 118px;
  background-color: var(--leaf);
  background-image: url("../img/papel.jpg");
  background-size: 220px;
  background-blend-mode: multiply;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

.opened__flap::after {
  content: "";
  position: absolute;
  top: 24%;
  right: 13%;
  bottom: 0;
  left: 13%;
  background: rgba(247, 241, 230, 0.42);
  clip-path: polygon(0 100%, 50% 8%, 100% 100%);
}

.card {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  margin: 94px 18px 0;
  padding: 56px 0 40px;
  overflow: visible;
  background-color: #fffdf8;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.42)),
    url("../img/papel.jpg");
  background-repeat: no-repeat, repeat;
  background-size: auto, 280px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 0 0 1px rgba(90, 76, 60, 0.08),
    0 14px 32px rgba(45, 38, 28, 0.16);
}

.floral {
  position: absolute;
  z-index: 4;
  width: 88px;
  height: 76px;
  pointer-events: none;
  background: url("../img/corner.svg") no-repeat center / contain;
}

.floral-tl {
  top: 12px;
  left: 8px;
}

.floral-tr {
  top: 12px;
  right: 8px;
  transform: scaleX(-1);
}

.floral-bl {
  bottom: 12px;
  left: 8px;
  transform: scaleY(-1);
}

.floral-br {
  bottom: 12px;
  right: 8px;
  transform: scale(-1);
}

.inner {
  position: relative;
  z-index: 3;
  padding: 0 var(--gutter) 36px;
}

.hero {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 4px 0 36px;
  color: var(--ink);
  background: none;
  text-align: center;
}

.crest {
  position: relative;
  z-index: 5;
  display: block;
  width: 76px;
  height: 80px;
  margin: -28px auto 10px;
  padding: 0;
  border: 0;
}

.crest img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(40, 32, 24, 0.28));
}

.kicker {
  margin: 16px 0 0;
  color: var(--olive);
  font-family: var(--caps);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.names {
  margin: 0;
  line-height: 0.92;
  text-align: center;
}

.names .name {
  display: block;
  font-family: var(--display);
  font-size: clamp(2.8rem, 12vw, 3.8rem);
  font-style: italic;
  font-weight: 500;
}

.amp {
  display: block;
  margin: 4px 0;
  color: var(--gold);
  font-family: var(--display);
  font-size: 1.6rem;
  font-style: italic;
  line-height: 1;
}

.names-compact .name {
  font-size: 2.8rem;
}

.surnames {
  margin: 14px 0 0;
  color: var(--muted);
  font-family: var(--caps);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 68px;
  height: 68px;
  margin: 24px auto 0;
  color: var(--ivory);
  background: radial-gradient(circle at 35% 30%, #d7b24a, var(--gold) 55%, #a9841c);
  border-radius: 50%;
}

.seal span,
.seal small {
  font-family: var(--caps);
  line-height: 1;
}

.seal span {
  font-size: 1.35rem;
  letter-spacing: 0.06em;
}

.seal small {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 8px;
  margin: 20px 0 4px;
  padding: 18px 0 10px;
  border-top: 1px solid var(--line);
}

.nav a {
  color: var(--muted);
  font-family: var(--caps);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--olive);
}

.block {
  margin: 0;
  padding: 38px 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  text-align: center;
}

.block h2 {
  margin: 0 0 20px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
}

.block-band {
  margin: 0 calc(-1 * var(--gutter));
  padding: 28px var(--gutter);
  color: var(--ivory);
  background: var(--olive);
  border-top: 0;
}

.block-band h2,
.block-band .countdown span {
  color: rgba(255, 252, 248, 0.8);
}

.block-band .countdown {
  gap: 0;
}

.block-band .countdown div {
  border-right: 1px solid rgba(255, 252, 248, 0.22);
}

.block-band .countdown div:last-child {
  border-right: 0;
}

.block-band .countdown strong {
  color: var(--ivory);
}

.letter-photo {
  margin: 0 calc(-1 * var(--gutter));
  padding: 0;
}

.letter-photo > img {
  display: block;
  width: 100%;
  height: 180px;
  cursor: default;
  object-fit: cover;
  object-position: center 30%;
  background: var(--blush);
  pointer-events: none;
  user-select: none;
}

.letter-photo--tall img {
  height: 250px;
}

.letter-photo--wide > img {
  height: 170px;
  object-position: center 40%;
}

.letter-photo--program > img {
  object-position: center 78%;
}

.letter-photo--couple > img {
  object-position: center 35%;
}

.letter-photo--reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.letter-photo--reveal.is-visible {
  opacity: 1;
  transform: none;
}

.insta {
  padding: 14px 14px 8px;
  overflow: hidden;
}

.insta-slide {
  width: 100%;
  margin: 0;
  padding: 9px 9px 24px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(61, 56, 52, 0.14);
  transform: rotate(-1deg);
}

.insta-frame {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--blush);
}

.insta-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.invite-copy,
.hint,
.year-words,
.time,
.venue,
.script-line,
.soon,
.thanks,
.note,
.footer-note {
  text-align: center;
}

.invite-copy {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 1.18rem;
  font-style: italic;
  line-height: 1.5;
}

.date-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin: 0 0 8px;
  font-family: var(--caps);
  font-size: 1rem;
  letter-spacing: 0.16em;
}

.date-row b {
  font-size: 1.85rem;
  font-weight: 500;
}

.year-words {
  margin: 0 0 10px;
  color: var(--ink);
  font-family: var(--caps);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.time {
  margin: 0 0 18px;
  color: var(--dusty);
  font-size: 1.22rem;
}

.venue {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.venue a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.venue a:hover {
  border-bottom-color: var(--rose);
}

.venue small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 1rem;
  font-style: italic;
  font-weight: 500;
}

.script-line {
  margin: 0;
  font-family: var(--display);
  font-size: 2.1rem;
  font-style: italic;
}

.toggle {
  display: block;
  margin: 0;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--ivory);
  font-size: 1.02rem;
  text-align: center;
  cursor: pointer;
}

.toggle input:focus-visible + span {
  outline: 2px solid var(--rose);
}

.toggle input:checked + span {
  color: var(--ink);
  background: var(--btn);
  border-color: var(--btn);
}

.person {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0 0 12px;
  border: 0;
}

.opt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  color: var(--ink);
  font-size: 1.05rem;
  text-align: left;
  cursor: pointer;
}

.opt input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--btn);
}

.stepper {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  gap: 8px;
  align-items: center;
}

.stepper button {
  height: 48px;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--line);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.stepper input {
  width: 100%;
  min-height: 48px;
  padding: 12px 8px;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 16px;
  text-align: center;
}

.actions {
  display: grid;
  gap: 10px;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.countdown div {
  padding: 4px 2px;
  text-align: center;
}

.countdown strong {
  display: block;
  color: var(--dusty);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.1;
}

.countdown span {
  color: var(--muted);
  font-family: var(--caps);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline {
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  text-align: left;
}

.timeline li {
  position: relative;
  padding: 0 0 24px 48px;
}

.timeline li:last-child {
  padding-bottom: 0;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 36px;
  left: 16px;
  width: 1px;
  height: calc(100% - 36px);
  background: var(--rose);
  opacity: 0.35;
}

.timeline li:last-child::before {
  display: none;
}

.ico {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  margin: 9px;
  background: var(--rose);
  border: 3px solid var(--ivory);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}

.ico svg {
  display: none;
}

.when {
  margin: 0;
  color: var(--ink);
  font-family: var(--caps);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.what {
  margin: 4px 0 0;
  font-size: 1.25rem;
  font-weight: 600;
}

.detail {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.4;
}

.soon {
  padding: 0;
}

.soon p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  font-style: italic;
  line-height: 1.5;
}

.tables {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 0 0 14px;
  opacity: 0.5;
}

.tables span {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--rose);
  border-radius: 50%;
}

.seat-search {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.seat-search span {
  color: var(--ink);
  font-family: var(--caps);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.seat-search input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 16px;
}

.seat-msg {
  min-height: 1.4em;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1.02rem;
  font-style: italic;
  text-align: center;
}

.seat-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0 auto 18px;
  max-width: 320px;
}

.seat {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--ink);
  background: var(--ivory);
  border: 1.5px solid var(--sage);
  border-radius: 50%;
  font-family: var(--caps);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.seat.is-on {
  color: var(--ink);
  background: var(--btn);
  border-color: var(--btn);
}

.seat-card {
  padding: 16px 12px;
  background: var(--ivory);
  border: 1px solid var(--line);
  text-align: center;
}

.seat-card-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
}

.seat-list {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.seat-list li.is-match {
  color: var(--ink);
  font-weight: 600;
}

.hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.hero .hint {
  margin: 12px 0 0;
  color: var(--muted);
}

.form {
  display: grid;
  gap: 16px;
  text-align: center;
}

#rsvp-details,
#rsvp-decline,
#guests-wrap {
  display: grid;
  gap: 16px;
}

[hidden] {
  display: none !important;
}

.form label:not(.toggle):not(.opt) > span,
.form .lbl {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-family: var(--caps);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.form input[type="text"],
.form input[type="number"],
.form input[type="password"],
.form input[type="file"],
.form select,
.form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 16px;
}

.form textarea {
  min-height: 96px;
  resize: vertical;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.choices label {
  margin: 0;
}

.choices input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choices span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  background: var(--ivory);
  font-size: 1.02rem;
  text-align: center;
  cursor: pointer;
}

.choices input:focus-visible + span {
  outline: 2px solid var(--rose);
}

.choices input:checked + span {
  color: var(--ink);
  background: var(--btn);
  border-color: var(--btn);
}

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  color: var(--ink);
  background: var(--btn);
  border: 1px solid var(--btn);
  font-family: var(--caps);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.btn:hover,
.btn:focus-visible {
  background: var(--btn-hover);
  border-color: var(--btn-hover);
}

.btn-ghost {
  color: var(--btn-hover);
  background: transparent;
  border-color: var(--btn);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: var(--ink);
  background: var(--btn);
  border-color: var(--btn);
}

.btn-compact {
  min-height: 44px;
  padding: 10px 14px;
  font-size: 0.72rem;
}

.thanks,
.note {
  margin: 0;
  color: var(--dusty);
  font-size: 1.12rem;
  font-style: italic;
  line-height: 1.45;
}

.thanks a {
  color: var(--dusty);
}

.footer-note {
  margin: 8px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 1.1rem;
  font-style: italic;
}

.footer-link {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--caps);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.album-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.album-card {
  overflow: hidden;
  background: var(--ivory);
  border: 1px solid var(--line);
}

.album-card img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--blush);
}

.album-card p {
  margin: 0;
  padding: 12px 14px 14px;
  color: var(--muted);
  font-size: 1rem;
}

.album-toolbar {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

@media (min-width: 480px) {
  .page {
    width: min(400px, calc(100% - 24px));
    margin: 24px auto 40px;
    padding: 8px 0 0;
  }

  .card {
    min-height: unset;
  }
}

body.intro-active {
  overflow: hidden;
  height: 100dvh;
}

.envelope-intro {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: safe center;
  justify-content: center;
  overflow: auto;
  padding: 20px 12px;
  background:
    radial-gradient(ellipse 80% 50% at 50% 100%, rgba(94, 106, 76, 0.18), transparent 60%),
    #d4c9b8;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.envelope-intro.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: min(360px, 88vw);
  padding: 24px 0;
}

.envelope-stage {
  position: relative;
  width: 100%;
  height: 210px;
  margin-top: 0;
  overflow: visible;
  transition: margin-top 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.35s;
}

.envelope-intro.is-opening .envelope-stage {
  margin-top: min(340px, 46vh);
}

.envelope {
  position: relative;
  width: 100%;
  height: 210px;
  overflow: visible;
}

.envelope__back {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: var(--olive);
  background-image: url("../img/papel.jpg");
  background-size: 220px;
  background-blend-mode: multiply;
  border-radius: 4px;
  box-shadow: 0 24px 48px rgba(45, 52, 38, 0.28);
}

.envelope__paper {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 8%;
  left: 8%;
  padding: 26px 16px 20px;
  color: var(--ink);
  text-align: center;
  background-color: #f6efe3;
  background-image: url("../img/papel.jpg");
  background-repeat: repeat;
  background-size: 180px;
  border-radius: 2px;
  box-shadow: 0 10px 28px rgba(61, 56, 52, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8%);
}

.envelope.is-opening .envelope__paper {
  z-index: 8;
  pointer-events: auto;
  animation: letter-rise 2.2s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

@keyframes letter-rise {
  from {
    opacity: 0.4;
    transform: translateY(12%);
  }
  to {
    opacity: 1;
    transform: translateY(-110%);
  }
}

.envelope__kicker {
  margin: 14px 0 0;
  color: var(--olive);
  font-family: var(--caps);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.envelope__names {
  margin: 0;
  font-family: var(--display);
  font-size: 1.7rem;
  font-style: italic;
  font-weight: 600;
  line-height: 1.2;
}

.envelope__names span {
  color: var(--gold);
}

.envelope__surnames {
  margin: 10px 0 0;
  color: var(--muted);
  font-family: var(--caps);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.envelope__when {
  margin: 18px 0 0;
  font-family: var(--caps);
  font-size: 1.02rem;
  font-weight: 600;
}

.envelope__time {
  margin: 6px 0 0;
  color: var(--olive);
  font-size: 1.15rem;
}

.envelope__place {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.4;
}

.envelope__pocket {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  height: 62%;
  background-color: var(--moss);
  background-image: url("../img/papel.jpg");
  background-size: 220px;
  background-blend-mode: multiply;
  clip-path: polygon(0 0, 50% 40%, 100% 0, 100% 100%, 0 100%);
}

.envelope__seal {
  position: absolute;
  z-index: 6;
  top: 54%;
  left: 50%;
  display: block;
  width: 76px;
  height: 80px;
  padding: 0;
  overflow: visible;
  appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  filter: drop-shadow(0 5px 8px rgba(45, 38, 28, 0.24));
  transform: translate(-50%, -50%) rotate(-6deg);
  transition: opacity 0.45s ease 0.1s, transform 0.45s ease 0.1s;
}

.envelope__seal img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.envelope__flap {
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  left: 0;
  height: 56%;
  background-color: var(--leaf);
  background-image: url("../img/papel.jpg");
  background-size: 220px;
  background-blend-mode: multiply;
  transform-origin: top center;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform: perspective(900px) rotateX(0deg);
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.envelope.is-opening .envelope__flap {
  z-index: 0;
  transform: perspective(900px) rotateX(-165deg);
}

.envelope.is-opening .envelope__seal {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(-6deg) scale(0.7);
}

.envelope__more {
  margin-top: 20px;
  min-height: 46px;
  padding: 10px 22px;
  color: var(--ink);
  background: var(--btn);
  border: 1px solid var(--btn);
  font-family: var(--caps);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.5s ease 1.3s;
}

.envelope-intro.is-opening .envelope__more {
  opacity: 1;
}

.envelope__cta {
  min-height: 48px;
  padding: 12px 28px;
  color: var(--ink);
  background: var(--btn);
  border: 1px solid var(--btn);
  font-family: var(--caps);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.envelope__cta:disabled {
  opacity: 0.5;
  cursor: default;
}

.envelope-intro.is-opening .envelope__cta,
.envelope-intro.is-opening .envelope__hint {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.envelope__hint {
  margin: 0;
  color: var(--ink);
  font-family: var(--caps);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.72;
}

@media (max-width: 479px) {
  .page {
    width: 100%;
    margin: 0;
  }

  .card {
    min-height: unset;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .envelope-intro,
  .letter-photo--reveal {
    transition: none;
  }
}
