:root {
  --ink: #38292b;
  --wine: #8f3f4b;
  --wine-dark: #71303a;
  --blush: #f1d8d5;
  --cream: #fbf5eb;
  --paper: #fffdf8;
  --sage: #778172;
  --white: #fff;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--sans);
  overflow-x: hidden;
}

body:not(:has(#sorpresa:target)) {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--wine);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 1.8rem;
  height: 1px;
  background: currentColor;
  content: "";
}

.eyebrow--light {
  color: #f9e6e3;
}

.cover {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 1.25rem;
  overflow: hidden;
  background:
    linear-gradient(rgba(72, 33, 39, 0.73), rgba(72, 33, 39, 0.83)),
    url("assets/2.jpg") center 42% / cover;
  transition:
    opacity 0.8s ease,
    visibility 0.8s ease,
    transform 1s cubic-bezier(0.65, 0, 0.35, 1);
}

.cover__glow {
  position: absolute;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  background: rgba(255, 220, 201, 0.13);
  filter: blur(1px);
}

.cover__glow--one {
  top: -13rem;
  left: -8rem;
}

.cover__glow--two {
  right: -9rem;
  bottom: -15rem;
}

.heart-trail span {
  position: absolute;
  z-index: 0;
  color: rgba(255, 229, 222, 0.72);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3vw, 2.4rem);
  animation: heart-float 5s ease-in-out infinite;
}

.heart-trail span:nth-child(1) {
  top: 13%;
  left: 9%;
}

.heart-trail span:nth-child(2) {
  top: 20%;
  right: 12%;
  animation-delay: -1.2s;
}

.heart-trail span:nth-child(3) {
  right: 7%;
  bottom: 17%;
  animation-delay: -2.4s;
}

.heart-trail span:nth-child(4) {
  bottom: 12%;
  left: 14%;
  animation-delay: -3.6s;
}

.heart-trail span:nth-child(5) {
  top: 47%;
  left: 4%;
  animation-delay: -0.8s;
}

.envelope {
  position: relative;
  width: min(38rem, 100%);
  padding: clamp(2.5rem, 7vw, 4.8rem) clamp(1.5rem, 7vw, 4.5rem);
  border: 1px solid rgba(143, 63, 75, 0.18);
  border-radius: 0.2rem;
  background:
    linear-gradient(135deg, transparent 48%, rgba(143, 63, 75, 0.035) 49%, rgba(143, 63, 75, 0.035) 51%, transparent 52%),
    var(--paper);
  box-shadow: 0 2rem 6rem rgba(32, 15, 18, 0.35);
  text-align: center;
  animation: float-in 1s both;
}

.envelope::after {
  position: absolute;
  inset: 0.7rem;
  border: 1px solid rgba(143, 63, 75, 0.12);
  content: "";
  pointer-events: none;
}

.envelope .eyebrow {
  justify-content: center;
}

.envelope .eyebrow::before {
  display: none;
}

.heart {
  display: grid;
  place-items: center;
  width: 3.65rem;
  height: 3.65rem;
  margin: 1.3rem auto;
  border-radius: 50%;
  color: #fff6ed;
  background: var(--wine);
  box-shadow: 0 0 0 0.45rem var(--blush);
  font-size: 1.25rem;
  transform: rotate(-5deg);
}

.envelope h1 {
  max-width: 11ch;
  margin: 0 auto 1rem;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 7vw, 4rem);
  font-weight: 400;
  line-height: 0.98;
}

.envelope p {
  max-width: 26rem;
  margin: 0 auto 1.35rem;
  color: #766267;
  line-height: 1.7;
}

.access-form {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  margin: 0 auto;
  text-align: left;
}

.access-form > label {
  display: block;
  margin: 0 0 0.45rem 0.8rem;
  color: var(--wine);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.access-form__row {
  display: flex;
  gap: 0.55rem;
}

.access-form input {
  min-width: 0;
  flex: 1;
  min-height: 3.25rem;
  padding: 0.8rem 1.1rem;
  border: 1px solid #d8c3c0;
  border-radius: 999px;
  outline: none;
  color: var(--ink);
  background: #fff;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.access-form input:focus {
  border-color: var(--wine);
  box-shadow: 0 0 0 0.22rem rgba(143, 63, 75, 0.12);
}

.access-form input:not(:placeholder-shown):invalid {
  border-color: #ba6571;
}

.access-form input:valid {
  border-color: #7d9a7f;
}

.access-form .button {
  border: 0;
  font-family: inherit;
}

.button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 3.25rem;
  padding: 0.9rem 1.35rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: transform 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button--primary {
  color: var(--white);
  background: var(--wine);
}

.button--primary:hover {
  background: var(--wine-dark);
}

.tiny-note {
  display: block;
  margin-top: 1rem;
  color: #a18d91;
  font-family: var(--serif);
  font-size: 0.8rem;
  font-style: italic;
}

.surprise {
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 1s 0.35s ease, transform 1s 0.35s ease;
}

body:has(#sorpresa:target) .cover {
  visibility: hidden;
  opacity: 0;
  transform: translateY(-100%);
}

#sorpresa:target {
  opacity: 1;
  transform: none;
}

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 6rem 1.5rem;
  color: var(--white);
  isolation: isolate;
  text-align: center;
}

.hero__image,
.hero__veil {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  object-fit: cover;
}

.hero__veil {
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(31, 18, 20, 0.48), rgba(63, 26, 32, 0.65)),
    radial-gradient(circle at 50% 38%, transparent 0, rgba(24, 9, 12, 0.22) 70%);
}

.hero__content {
  display: flex;
  align-items: center;
  flex-direction: column;
}

.hero__intro {
  margin: 1.3rem 0 0;
  font-family: var(--serif);
  font-size: clamp(1rem, 3vw, 1.3rem);
  font-style: italic;
}

.hero h1 {
  margin: 0.2rem 0 1.6rem;
  font-family: var(--serif);
  font-size: clamp(3.6rem, 10vw, 7.6rem);
  font-weight: 400;
  line-height: 0.95;
  text-shadow: 0 0.4rem 2rem rgba(0, 0, 0, 0.26);
}

.date-pill {
  display: inline-grid;
  grid-template-columns: auto auto auto auto auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.date-pill__day {
  font-family: var(--serif);
  font-size: 1.9rem;
  line-height: 1;
}

.date-pill__month {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.date-pill__arrow {
  margin: 0 0.25rem;
  opacity: 0.7;
}

.hero__love {
  margin: 1.3rem 0 0;
  font-size: 0.92rem;
}

.scroll-cue {
  position: absolute;
  bottom: 1.8rem;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--white);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
}

.scroll-cue span:last-child {
  font-size: 1rem;
  animation: bob 1.5s infinite;
}

.section {
  width: min(74rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 9rem) 0;
}

.section__heading {
  max-width: 43rem;
  margin: 0 auto clamp(2.5rem, 6vw, 5rem);
  text-align: center;
}

.section h2 {
  margin: 0.8rem 0 1.1rem;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  font-weight: 400;
  line-height: 1;
}

.section__heading p {
  max-width: 37rem;
  margin: 0 auto;
  color: #756265;
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.8;
}

.photo-card {
  overflow: hidden;
  border-radius: 0.35rem;
  background: var(--paper);
  box-shadow: 0 1.5rem 4rem rgba(74, 46, 49, 0.12);
}

.photo-card img {
  width: 100%;
  object-fit: cover;
}

.photo-card--room {
  max-width: 62rem;
  margin: 0 auto;
  transform: rotate(-0.8deg);
}

.photo-card--room img {
  aspect-ratio: 16 / 9;
}

.photo-card__caption {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.4rem;
}

.caption-number {
  color: var(--wine);
  font-family: var(--serif);
  font-size: 1.6rem;
}

.photo-card__caption h3 {
  margin: 0 0 0.3rem;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
}

.photo-card__caption p {
  margin: 0;
  color: #817075;
  font-size: 0.9rem;
  line-height: 1.55;
}

.memories {
  width: 100%;
  max-width: none;
  padding-right: max(1rem, calc((100vw - 74rem) / 2));
  padding-left: max(1rem, calc((100vw - 74rem) / 2));
  background:
    radial-gradient(circle at 18% 12%, rgba(241, 216, 213, 0.7), transparent 28rem),
    #fffaf2;
}

.memories .section__heading h2 {
  max-width: 15ch;
  margin-right: auto;
  margin-left: auto;
}

.memory-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  width: min(74rem, 100%);
  margin: 0 auto;
}

.memory-card {
  position: relative;
  margin: 0;
  padding: 0.65rem 0.65rem 1.15rem;
  background: #fff;
  box-shadow: 0 1.2rem 3rem rgba(66, 38, 42, 0.15);
}

.memory-card::before {
  position: absolute;
  top: -0.9rem;
  left: 50%;
  width: 5.2rem;
  height: 1.7rem;
  background: rgba(227, 196, 157, 0.68);
  content: "";
  transform: translateX(-50%) rotate(-2deg);
}

.memory-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.memory-card figcaption {
  padding: 1rem 0.55rem 0.1rem;
  color: #6f5b60;
  font-family: var(--serif);
  font-size: clamp(0.92rem, 1.5vw, 1.08rem);
  font-style: italic;
  line-height: 1.4;
  text-align: center;
}

.memory-card--one {
  transform: rotate(-2deg) translateY(0.8rem);
}

.memory-card--two {
  z-index: 1;
  transform: translateY(-0.7rem);
}

.memory-card--three {
  transform: rotate(2deg) translateY(1rem);
}

.memories__promise {
  max-width: 38rem;
  margin: 3.8rem auto 0;
  color: var(--wine);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}

.memories__promise span {
  display: block;
  margin-top: 0.7rem;
  font-style: normal;
  animation: heartbeat 1.8s ease-in-out infinite;
}

.hotel {
  width: 100%;
  max-width: none;
  padding-right: max(1rem, calc((100vw - 74rem) / 2));
  padding-left: max(1rem, calc((100vw - 74rem) / 2));
  background: #ede4d8;
}

.hotel__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(18rem, 0.75fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 6rem);
  width: min(74rem, 100%);
  margin: 0 auto;
}

.photo-card--hotel {
  transform: rotate(1deg);
}

.photo-card--hotel img {
  min-height: 27rem;
  object-fit: cover;
}

.hotel__copy p {
  max-width: 29rem;
  margin-bottom: 2rem;
  color: #6f5e60;
  line-height: 1.75;
}

.facts {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  display: grid;
  grid-template-columns: 2.8rem 1fr;
  align-items: center;
  gap: 0.8rem;
}

.facts li > span {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid rgba(143, 63, 75, 0.28);
  border-radius: 50%;
  color: var(--wine);
  font-size: 1.1rem;
}

.facts strong,
.facts small {
  display: block;
}

.facts strong {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 400;
}

.facts small {
  margin-top: 0.2rem;
  color: #8d797b;
}

.details__heading {
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.details__gallery {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  align-items: end;
  gap: clamp(1rem, 3vw, 2rem);
}

.gallery-item {
  margin: 0;
}

.gallery-item img {
  width: 100%;
  border-radius: 0.3rem;
  object-fit: cover;
  box-shadow: 0 1rem 3rem rgba(65, 39, 42, 0.12);
}

.gallery-item--wide img {
  aspect-ratio: 1.35 / 1;
}

.gallery-item--tall {
  transform: translateY(-2rem) rotate(1.3deg);
}

.gallery-item--tall img {
  aspect-ratio: 0.68 / 1;
}

.gallery-item figcaption {
  max-width: 27rem;
  margin-top: 0.85rem;
  color: #806e71;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-style: italic;
}

.note {
  width: 100%;
  max-width: none;
  padding-right: 1rem;
  padding-left: 1rem;
  background:
    linear-gradient(rgba(78, 35, 42, 0.8), rgba(78, 35, 42, 0.84)),
    url("assets/habitacion.jpg") center / cover fixed;
}

.note__paper {
  position: relative;
  width: min(44rem, 100%);
  margin: 0 auto;
  padding: clamp(2.4rem, 7vw, 5rem);
  border-radius: 0.2rem;
  background: var(--paper);
  box-shadow: 0 2rem 5rem rgba(32, 12, 15, 0.3);
  text-align: center;
  transform: rotate(-0.6deg);
}

.note__tape {
  position: absolute;
  top: -1rem;
  left: 50%;
  width: 7rem;
  height: 2.2rem;
  background: rgba(237, 211, 177, 0.75);
  transform: translateX(-50%) rotate(1deg);
}

.note__paper .eyebrow {
  justify-content: center;
}

.note__paper .eyebrow::before {
  display: none;
}

.note__paper h2 {
  font-size: clamp(2.2rem, 6vw, 4rem);
}

.note__paper > p {
  max-width: 34rem;
  margin: 0 auto;
  color: #715e62;
  line-height: 1.8;
}

.note__paper .note__closing {
  margin-top: 1.8rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  font-style: italic;
  line-height: 1.45;
}

.signature {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 2.2rem;
  color: var(--wine);
  font-family: var(--serif);
}

.signature span {
  font-size: 0.9rem;
  font-style: italic;
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 8rem;
  padding: 2rem 1rem;
  color: #e9cbc8;
  background: #48252b;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-align: center;
  text-transform: uppercase;
}

.footer__heart {
  color: #d98b91;
  font-size: 1rem;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(1.5rem) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bob {
  50% {
    transform: translateY(0.35rem);
  }
}

@keyframes heart-float {
  50% {
    opacity: 0.45;
    transform: translateY(-0.8rem) rotate(8deg) scale(1.12);
  }
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  15% {
    transform: scale(1.25);
  }
  30% {
    transform: scale(1);
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 100svh;
  }

  .hero__image {
    object-position: 47% center;
  }

  .date-pill {
    gap: 0.35rem;
    padding: 0.7rem 0.8rem;
  }

  .date-pill__day {
    font-size: 1.45rem;
  }

  .date-pill__month {
    font-size: 0.62rem;
  }

  .hotel__grid {
    grid-template-columns: 1fr;
  }

  .memory-wall {
    grid-template-columns: 1fr 1fr;
    max-width: 43rem;
  }

  .memory-card--three {
    width: calc(50% - 0.6rem);
    margin: 0 auto;
    grid-column: 1 / -1;
  }

  .photo-card--hotel {
    order: 2;
  }

  .photo-card--hotel img {
    min-height: 20rem;
  }

  .details__gallery {
    grid-template-columns: 1fr 0.62fr;
    align-items: center;
  }

  .gallery-item--tall {
    transform: translateY(1.5rem) rotate(1.3deg);
  }

  .note {
    background-attachment: scroll;
  }

  footer {
    gap: 0.65rem;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 460px) {
  .envelope {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .envelope h1 {
    font-size: 2.65rem;
  }

  .access-form__row {
    flex-direction: column;
  }

  .access-form .button {
    width: 100%;
  }

  .hero h1 {
    font-size: 3.75rem;
  }

  .details__gallery {
    grid-template-columns: 1fr;
  }

  .gallery-item--tall {
    width: 72%;
    margin-top: -1rem;
    margin-left: auto;
    transform: rotate(1.3deg);
  }

  .photo-card__caption {
    grid-template-columns: 1fr;
  }

  .memory-wall {
    display: block;
  }

  .memory-card {
    width: 92%;
    margin: 0 auto 2.4rem;
  }

  .memory-card--one,
  .memory-card--two,
  .memory-card--three {
    transform: none;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
