:root {
  color-scheme: light;
  --ink: #2c2527;
  --muted: #76686d;
  --paper: #fff9f2;
  --paper-soft: #f7efe7;
  --line: #dbcfc5;
  --rose: #b64d63;
  --rose-dark: #863746;
  --green: #38635a;
  --gold: #b98235;
  --shadow: 0 24px 70px rgba(52, 37, 31, 0.18);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 249, 242, 0.96), rgba(247, 239, 231, 0.98)),
    var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

a {
  color: inherit;
}

.page-shell {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 92svh;
  display: grid;
  align-items: center;
  isolation: isolate;
  color: #fffaf7;
  background: #2c2527;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at center, rgba(31, 24, 25, 0.22), rgba(31, 24, 25, 0.58) 62%, rgba(31, 24, 25, 0.82)),
    linear-gradient(180deg, rgba(31, 24, 25, 0.2), rgba(31, 24, 25, 0.68));
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition:
    opacity 1200ms ease,
    transform 6500ms ease;
}

.hero__media img.is-active {
  opacity: 1;
  transform: scale(1);
}

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 5vw, 70px);
}

.brand,
.topbar__link,
.hero__button {
  text-decoration: none;
}

.brand {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 700;
}

.topbar__link {
  border: 1px solid rgba(255, 250, 247, 0.5);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero__content {
  width: min(760px, calc(100% - 36px));
  margin: 80px auto 0;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #f0c98f;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 0.96;
}

h1 {
  margin-inline: auto;
  max-width: 650px;
  font-size: clamp(4rem, 10vw, 8.6rem);
}

.hero__content p:not(.eyebrow) {
  margin-inline: auto;
  max-width: 620px;
  margin-top: 24px;
  color: rgba(255, 250, 247, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.7;
}

.hero__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 30px;
  border-radius: 999px;
  background: #fff8f1;
  color: var(--rose-dark);
  padding: 0 22px;
  font-weight: 800;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.intro {
  width: min(860px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(54px, 9vw, 92px) 0 clamp(18px, 4vw, 44px);
}

.intro p {
  margin: 0;
  color: var(--muted);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.85rem, 4vw, 3.35rem);
  line-height: 1.12;
  text-align: center;
}

.timeline-section {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(46px, 8vw, 90px) 0;
}

.section-heading {
  max-width: 720px;
  margin-bottom: clamp(38px, 6vw, 72px);
}

.section-heading h2 {
  color: var(--ink);
  font-size: clamp(2.7rem, 6vw, 5.4rem);
}

.timeline {
  position: relative;
  display: grid;
  gap: clamp(40px, 7vw, 86px);
}

.timeline::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 50%;
  width: 1px;
  background: linear-gradient(var(--line), var(--rose), var(--line));
}

.moment {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 74px);
  align-items: center;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.moment.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.moment:nth-child(even) .moment__media {
  order: 2;
}

.moment::before {
  content: attr(data-number);
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--rose-dark);
  font-size: 0.82rem;
  font-weight: 800;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 10px var(--paper);
}

.moment__media {
  display: grid;
  gap: 12px;
}

.moment__media--double {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.photo-button {
  appearance: none;
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  background: #efe2d8;
  box-shadow: var(--shadow);
  cursor: zoom-in;
}

.photo-button img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 500ms ease;
}

.moment__media--wide .photo-button img {
  aspect-ratio: 16 / 10;
}

.moment__media--double .photo-button:first-child img {
  aspect-ratio: 16 / 11;
}

.moment__media--double .photo-button:last-child img {
  aspect-ratio: 16 / 11;
}

.photo-button:hover img,
.photo-button:focus-visible img {
  transform: scale(1.035);
}

.photo-placeholder {
  min-height: 420px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(134, 55, 70, 0.45);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(182, 77, 99, 0.1), rgba(56, 99, 90, 0.1)),
    #fff7ef;
  color: var(--rose-dark);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  box-shadow: var(--shadow);
  text-align: center;
}

.moment__copy {
  max-width: 500px;
}

.moment:nth-child(even) .moment__copy {
  justify-self: end;
}

.moment__title {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border-bottom: 2px solid rgba(182, 77, 99, 0.32);
  color: var(--green);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.85rem, 3.2vw, 2.8rem);
  font-weight: 700;
  line-height: 1.05;
}

.moment p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.72;
}

.footer {
  padding: 42px 18px 54px;
  background: #30282a;
  color: #fff7ef;
  text-align: center;
}

.footer p {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.continuara {
  width: min(860px, calc(100% - 36px));
  margin: 0 auto;
  padding: clamp(34px, 7vw, 80px) 0 clamp(70px, 10vw, 120px);
  text-align: center;
}

.continuara h2 {
  color: var(--ink);
  font-size: clamp(3.8rem, 8vw, 7.4rem);
}

.continuara p:not(.eyebrow) {
  max-width: 680px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.75;
}

.continuara__button,
.clue__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
}

.continuara__button {
  margin-top: 30px;
  background: var(--rose-dark);
  color: #fff9f2;
  padding: 0 24px;
  box-shadow: 0 16px 34px rgba(134, 55, 70, 0.22);
}

.clue-page {
  min-height: 100svh;
  background:
    linear-gradient(rgba(37, 30, 31, 0.68), rgba(37, 30, 31, 0.82)),
    url("portada.jpg") center / cover fixed;
  color: #fff9f2;
}

.clue {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.clue__back {
  position: fixed;
  top: 24px;
  left: 24px;
  border: 1px solid rgba(255, 249, 242, 0.44);
  color: #fff9f2;
  padding: 0 18px;
  backdrop-filter: blur(10px);
}

.clue__content {
  width: min(760px, 100%);
  text-align: center;
}

.clue__content h1 {
  font-size: clamp(3.4rem, 8vw, 7.4rem);
}

.clue__content p:not(.eyebrow) {
  max-width: 640px;
  margin: 24px auto 0;
  color: rgba(255, 249, 242, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.75;
}

.clue__hint {
  padding-top: 22px;
  border-top: 1px solid rgba(255, 249, 242, 0.26);
}

.lightbox {
  width: min(980px, calc(100vw - 28px));
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(25, 20, 21, 0.82);
  backdrop-filter: blur(8px);
}

.lightbox img {
  width: 100%;
  max-height: 86svh;
  object-fit: contain;
  border-radius: var(--radius);
  background: #1f1819;
}

.lightbox__close {
  position: fixed;
  top: 18px;
  right: 18px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(255, 249, 242, 0.12);
  color: #fffaf7;
  padding: 0 16px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

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

  .topbar {
    padding: 18px;
  }

  .topbar__link {
    padding: 9px 12px;
    font-size: 0.78rem;
  }

  .hero__content {
    width: min(100% - 36px, 760px);
    margin: 72px auto 0;
  }

  .timeline::before {
    left: 18px;
  }

  .moment,
  .moment:nth-child(even) {
    grid-template-columns: 1fr;
    padding-left: 44px;
  }

  .moment:nth-child(even) .moment__media {
    order: 0;
  }

  .moment:nth-child(even) .moment__copy {
    justify-self: start;
  }

  .moment::before {
    left: 18px;
    top: 24px;
    width: 34px;
    height: 34px;
    box-shadow: 0 0 0 8px var(--paper);
  }

  .moment__media--double {
    grid-template-columns: 1fr;
  }

  .moment__copy {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 1.25rem;
  }

  .intro,
  .timeline-section {
    width: min(100% - 28px, 1180px);
  }

  .moment,
  .moment:nth-child(even) {
    padding-left: 38px;
  }

  .photo-button img,
  .moment__media--wide .photo-button img,
  .moment__media--double .photo-button img {
    aspect-ratio: 4 / 5;
  }
}
