:root {
  --gift-wine: #5a1f2e;
  --gift-garnet: #7d3946;
  --gift-paper: #f2ecd9;
  --gift-ink: #332923;
  --gift-leaf: #626b4d;
  --gift-gold: #a27a43;
  --gift-fresco: #aab29a;
  --gift-lace: rgba(255, 253, 240, .88);
}

body.gift-route-active {
  margin: 0;
  overflow-x: hidden;
  background: #756f5a;
}

body.gift-route-active > .skip-link,
body.gift-route-active > .site-header,
body.gift-route-active > #contenido,
body.gift-route-active > .site-footer {
  display: none !important;
}

.gift-experience {
  min-height: 100vh;
  color: var(--gift-ink);
  font-family: Archivo, Arial, sans-serif;
  isolation: isolate;
}

.gift-experience[hidden],
.gift-experience [hidden] {
  display: none !important;
}

.gift-stage {
  position: relative;
  min-height: 100vh;
  padding: clamp(.75rem, 3vw, 2.75rem);
  overflow: hidden;
  background:
    linear-gradient(rgba(44, 38, 29, .08), rgba(44, 38, 29, .22)),
    url('../img/gift-renaissance-background.png') center top / max(100%, 60rem) auto repeat-y,
    #d6d0b9;
}

.gift-stage::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(90deg, rgba(43, 35, 27, .18), transparent 24%, transparent 76%, rgba(43, 35, 27, .18));
  content: "";
}

.gift-stage::after {
  position: fixed;
  inset: .55rem;
  z-index: -1;
  border: 1px solid rgba(250, 239, 203, .4);
  pointer-events: none;
  content: "";
}

.gift-botanical {
  position: fixed;
  width: min(30vw, 25rem);
  aspect-ratio: .72;
  display: none;
  pointer-events: none;
}

.gift-botanical::before,
.gift-botanical::after {
  position: absolute;
  width: 45%;
  height: 24%;
  border: 2px solid rgba(224, 205, 160, .54);
  border-left: 0;
  border-radius: 0 100% 0 100%;
  content: "";
}

.gift-botanical-left {
  left: -4rem;
  bottom: -5rem;
  transform: rotate(-22deg);
  border-right: 2px solid rgba(224, 205, 160, .5);
}

.gift-botanical-left::before { right: 0; top: 14%; transform: rotate(-25deg); }
.gift-botanical-left::after { right: 7%; top: 47%; transform: rotate(18deg) scale(.82); }

.gift-botanical-right {
  top: -7rem;
  right: -3rem;
  transform: rotate(155deg);
  border-right: 2px solid rgba(224, 205, 160, .5);
}

.gift-botanical-right::before { right: 0; top: 18%; transform: rotate(-18deg); }
.gift-botanical-right::after { right: 5%; top: 49%; transform: rotate(21deg) scale(.76); }

.gift-status {
  position: relative;
  z-index: 5;
  width: fit-content;
  max-width: 32rem;
  margin: 0 auto 1rem;
  color: #fff9e9;
  font-size: .9rem;
  line-height: 1.5;
  text-align: center;
}

[data-state="ready"] .gift-status,
[data-state="opening"] .gift-status,
[data-state="open"] .gift-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

[data-state="error"] .gift-status {
  margin-top: 35vh;
  padding: 1rem 1.25rem;
  color: var(--gift-paper);
  background: rgba(44, 33, 30, .72);
  border: 1px solid rgba(243, 233, 210, .32);
  border-radius: .25rem;
}

.gift-envelope-button {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(88vw, 30rem);
  padding: 3rem 1rem 1rem;
  color: #fff7e7;
  background: transparent;
  border: 0;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.gift-envelope-button:focus-visible {
  outline: 3px solid #f7d989;
  outline-offset: .6rem;
  border-radius: .25rem;
}

.gift-envelope-object {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.55;
  filter: drop-shadow(0 1.7rem 1.5rem rgba(43, 28, 21, .5));
  perspective: 900px;
}

.gift-envelope-back,
.gift-envelope-front,
.gift-envelope-flap,
.gift-envelope-paper {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: .35rem;
}

.gift-envelope-back {
  background: linear-gradient(145deg, #762d3d, var(--gift-wine));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
}

.gift-envelope-paper {
  top: 8%;
  right: 7%;
  bottom: 7%;
  left: 7%;
  display: grid;
  place-items: start center;
  padding-top: 2.3rem;
  color: var(--gift-wine);
  font: italic 500 clamp(1.15rem, 3vw, 1.7rem)/1 'Cormorant Garamond', Georgia, serif;
  background: var(--gift-paper);
  transform: translateY(0);
}

.gift-envelope-front {
  z-index: 3;
  background:
    linear-gradient(32deg, var(--gift-wine) 49.3%, transparent 50%) bottom left / 51% 100% no-repeat,
    linear-gradient(-32deg, var(--gift-garnet) 49.3%, transparent 50%) bottom right / 51% 100% no-repeat,
    linear-gradient(0deg, #682337, #682337) bottom / 100% 54% no-repeat;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.16);
}

.gift-envelope-flap {
  z-index: 4;
  height: 58%;
  background: linear-gradient(160deg, #87384b, var(--gift-wine));
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  backface-visibility: hidden;
}

.gift-envelope-seal {
  position: absolute;
  top: 45%;
  left: 50%;
  z-index: 5;
  display: grid;
  width: clamp(3.25rem, 12vw, 4.8rem);
  aspect-ratio: 1;
  place-items: center;
  color: #f7deb0;
  font: 700 clamp(.8rem, 2.5vw, 1.1rem)/1 Georgia, serif;
  letter-spacing: .08em;
  background:
    radial-gradient(circle at 38% 30%, #d3ad63, transparent 8%),
    radial-gradient(circle, #a77632 0 57%, #c8a255 59% 65%, #815622 67%);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-7deg);
  box-shadow: 0 .35rem .55rem rgba(37, 12, 18, .4);
}

.gift-envelope-prompt {
  display: inline-block;
  margin-top: 1.7rem;
  padding: .7rem 1rem;
  font: 600 1.08rem/1.2 'Cormorant Garamond', Georgia, serif;
  letter-spacing: .025em;
  text-shadow: 0 1px 1px rgba(0,0,0,.35);
}

[data-state="opening"] .gift-envelope-seal {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(12deg) scale(.45);
  transition: transform .24s ease, opacity .22s ease;
}

[data-state="opening"] .gift-envelope-flap {
  z-index: 1;
  transform: rotateX(178deg);
  transition: transform .45s cubic-bezier(.4, 0, .2, 1) .16s, z-index 0s .38s;
}

[data-state="opening"] .gift-envelope-paper {
  z-index: 2;
  transform: translateY(-42%);
  transition: transform .52s cubic-bezier(.2, .72, .22, 1) .48s;
}

[data-state="opening"] .gift-envelope-prompt {
  opacity: 0;
  transition: opacity .2s ease;
}

.gift-letter {
  width: min(100%, 58rem);
  margin: 0 auto;
  padding: 0;
  color: var(--gift-ink);
  font-family: 'Cormorant Garamond', Georgia, serif;
  background:
    radial-gradient(circle at 16% 38%, rgba(125, 108, 73, .08), transparent 22rem),
    repeating-linear-gradient(5deg, transparent 0 6px, rgba(96, 78, 52, .025) 7px 8px),
    var(--gift-paper);
  border: 1px solid rgba(89, 72, 48, .28);
  box-shadow: 0 2rem 5rem rgba(36, 27, 20, .45);
}

.gift-letter-header {
  position: relative;
  display: grid;
  min-height: clamp(15rem, 34vw, 23rem);
  padding: clamp(3rem, 8vw, 6rem) 1.5rem;
  place-content: center;
  text-align: center;
  background:
    linear-gradient(rgba(35, 31, 23, .08), rgba(29, 27, 21, .34)),
    url('../img/gift-renaissance-background.png') center top / 100% auto no-repeat;
  border-bottom: .8rem solid var(--gift-lace);
  isolation: isolate;
}

.gift-letter-header::after,
.gift-letter-closing::before {
  position: absolute;
  right: 0;
  left: 0;
  height: .8rem;
  background:
    radial-gradient(circle at 50% 0, transparent 33%, var(--gift-lace) 36% 62%, transparent 65%) 0 0 / 1rem .8rem repeat-x,
    linear-gradient(var(--gift-lace), var(--gift-lace)) center top / 100% .18rem no-repeat;
  content: "";
}

.gift-letter-header::after {
  bottom: -.8rem;
}

.gift-letter-subtitle {
  margin: 0 0 .65rem;
  color: #fff8df;
  font: italic 500 clamp(1rem, 2vw, 1.35rem)/1.4 'Cormorant Garamond', Georgia, serif;
  letter-spacing: .04em;
  text-shadow: 0 1px .35rem rgba(30, 22, 15, .9);
}

.gift-letter h1 {
  max-width: none;
  margin: 0;
  color: #fffbea;
  font: 400 clamp(2.65rem, 7vw, 5.6rem)/.96 Italiana, Georgia, serif;
  letter-spacing: -.025em;
  text-wrap: balance;
  text-shadow: 0 2px .6rem rgba(28, 20, 14, .88);
}

.gift-letter h1:focus { outline: none; }

.gift-intro,
.gift-memory {
  display: grid;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4.5rem);
}

.gift-intro {
  grid-template-columns: minmax(0, .9fr) minmax(18rem, 1.1fr);
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 7vw, 5.5rem);
}

.gift-intro-copy,
.gift-prose {
  max-width: 38rem;
}

.gift-salutation {
  margin-bottom: .75rem !important;
  color: var(--gift-wine);
  font: italic 500 clamp(1.85rem, 3vw, 2.7rem)/1 'Cormorant Garamond', Georgia, serif !important;
  font-style: italic;
}

.gift-letter p {
  margin: 0;
  font-size: clamp(1.04rem, 1.65vw, 1.2rem);
  line-height: 1.68;
}

.gift-prose h2 {
  margin: 0 0 .8rem;
  color: var(--gift-wine);
  font: italic 500 clamp(1.75rem, 3vw, 2.5rem)/1.05 'Cormorant Garamond', Georgia, serif;
}

.gift-prose-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 6vw, 4.5rem);
  padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 7vw, 5.5rem);
  border-top: 1px solid rgba(90, 31, 46, .2);
  border-bottom: 1px solid rgba(90, 31, 46, .2);
}

.gift-memory {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.5rem, 7vw, 5.5rem);
}

.gift-memory-daily {
  background:
    radial-gradient(ellipse at 14% 12%, rgba(250, 242, 207, .48), transparent 18rem),
    radial-gradient(circle at 83% 64%, rgba(92, 106, 71, .12), transparent 17rem),
    var(--gift-fresco);
  border-top: .8rem solid var(--gift-lace);
  border-bottom: 1px solid rgba(74, 80, 60, .25);
}

.gift-memory-evening,
.gift-memory-promise {
  background: rgba(170, 178, 154, .74);
  border-bottom: 1px solid rgba(74, 80, 60, .22);
}

.gift-memory-evening { grid-template-columns: minmax(18rem, .85fr) minmax(0, 1.15fr); }
.gift-memory-promise { grid-template-columns: minmax(0, 1.1fr) minmax(18rem, .9fr); }

.gift-photo {
  position: relative;
  align-self: start;
  margin: 0;
  padding: clamp(.65rem, 1.5vw, 1rem);
  background:
    linear-gradient(135deg, rgba(255, 241, 192, .52), transparent 38%, rgba(62, 41, 22, .32)),
    repeating-linear-gradient(92deg, rgba(83, 55, 29, .12) 0 1px, transparent 1px 5px),
    #b69a61;
  border: 3px ridge #c9ad74;
  box-shadow:
    inset 0 0 0 2px #715536,
    inset 0 0 0 4px rgba(243, 220, 163, .65),
    0 .35rem .5rem rgba(58, 40, 22, .16),
    0 1rem 1.8rem rgba(63, 42, 31, .27);
}

.gift-photo::after {
  position: absolute;
  inset: .3rem;
  border: 1px solid rgba(255, 232, 178, .72);
  box-shadow: inset 0 0 0 1px rgba(77, 54, 28, .45);
  pointer-events: none;
  content: "";
}

.gift-photo img {
  display: block;
  width: 100%;
  height: auto;
  outline: 2px ridge #dcc79b;
}

.gift-photo-sea { transform: rotate(-1.5deg); }
.gift-photo-daily { transform: rotate(.6deg); }
.gift-photo-evening { transform: rotate(1.2deg); }
.gift-photo-promise { transform: rotate(-1deg); }

.gift-letter-closing {
  position: relative;
  display: grid;
  min-height: clamp(25rem, 58vw, 38rem);
  max-width: none;
  margin: 0;
  padding: clamp(9rem, 25vw, 17rem) clamp(2rem, 9vw, 7rem) clamp(3rem, 8vw, 5.5rem);
  place-content: end center;
  color: #fff9e6;
  text-align: center;
  background:
    linear-gradient(0deg, rgba(67, 31, 33, .78), rgba(54, 47, 37, .08) 72%),
    url('../img/gift-renaissance-background.png') center bottom / 100% auto no-repeat,
    var(--gift-fresco);
  text-shadow: 0 1px .4rem rgba(35, 21, 18, .92);
}

.gift-letter-closing::before { top: 0; }

.gift-letter-closing p {
  max-width: 37rem;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
}

.gift-signature {
  margin-top: 1.25rem !important;
  color: #f2d4ba;
  font: italic 500 clamp(2.3rem, 5vw, 4rem)/1 'Cormorant Garamond', Georgia, serif !important;
}

@media (max-width: 720px) {
  .gift-stage {
    padding: .45rem;
    background-size: auto 74rem;
  }
  .gift-stage::after { inset: .45rem; }
  .gift-botanical { width: 48vw; opacity: .28; }
  .gift-envelope-button { width: min(94vw, 32rem); }
  .gift-letter-header {
    min-height: 15rem;
    padding: 3.5rem 1rem;
    background-size: auto 23rem;
  }
  .gift-intro,
  .gift-memory,
  .gift-memory-evening,
  .gift-memory-promise,
  .gift-prose-pair {
    grid-template-columns: 1fr;
  }
  .gift-intro { gap: 2rem; }
  .gift-intro-copy { order: -1; }
  .gift-memory-evening .gift-prose { order: 2; }
  .gift-letter-closing {
    min-height: 27rem;
    padding: 12rem 1.35rem 2.5rem;
    background-size: auto 38rem;
  }
}

@media (max-height: 450px) and (orientation: landscape) {
  .gift-envelope-button { width: min(68vw, 28rem); padding-top: 1rem; }
  .gift-envelope-prompt { margin-top: .7rem; }
  .gift-letter { padding-top: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gift-experience *,
  .gift-experience *::before,
  .gift-experience *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
