/* Felek's first birthday invitation — static export */

:root {
  --invitation-frame: oklch(0.893 0.037 278.2);
  --invitation-paper: oklch(0.948 0.014 54.6);
  --invitation-ink: oklch(0.478 0.075 37.8);
  --invitation-green: oklch(0.735 0.111 127.3);
  --invitation-green-deep: oklch(0.49 0.09 127.3);
  --invitation-overlay: oklch(0.18 0.025 120 / 92%);
  --font-invitation: "Quicksand", sans-serif;
  --font-handwritten: "Delius Swash Caps", cursive;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
img {
  display: block;
}

.invitation-page {
  min-height: 100svh;
  display: grid;
  place-items: start center;
  overflow-x: hidden;
  background: var(--invitation-frame);
}

.invitation-card {
  position: relative;
  width: min(100vw, 760px);
  min-height: calc(min(100vw, 760px) * 2.04);
  overflow: hidden;
  border-radius: 0 0 22px 22px;
  background: var(--invitation-paper);
  color: var(--invitation-ink);
  font-family: var(--font-invitation);
}

.corner-leaf {
  position: absolute;
  top: 0;
  width: 20.4%;
  height: auto;
  pointer-events: none;
}
.corner-leaf-left {
  left: 0;
}
.corner-leaf-right {
  right: 0;
}

.side-vine {
  position: absolute;
  top: 32.4%;
  width: 11%;
  height: 72%;
  object-fit: cover;
  pointer-events: none;
}
.side-vine-left {
  left: 0;
  object-position: left center;
}
.side-vine-right {
  right: 0;
  object-position: right center;
}

.invitation-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10.3% 12% 74%;
  text-align: center;
}

.invitation-kicker {
  margin: 0;
  font-size: clamp(45px, 2.08vw, 22px);
  font-weight: 400;
  line-height: 1.2;
}

.invitation-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 3.2% 0 0;
  line-height: 1;
}
.invitation-title span {
  font-size: clamp(2px, 4.85vw, 51px);
  font-weight: 600;
}

@media (width <= 1000px) {
  .invitation-kicker {
    font-size: clamp(30px, 2.08vw, 22px);
  }
  .invitation-title span {
    font-size: clamp(32px, 4.85vw, 51px);
    font-weight: 600;
  }
}

.invitation-title strong {
  margin-top: 0.5%;
  font-family: var(--font-handwritten);
  font-size: clamp(47px, 10.7vw, 112px);
  font-weight: 400;
  line-height: 0.96;
  white-space: nowrap;
}

.invitation-date {
  margin: 4.3% 0 0;
  border-radius: 15px;
  background: #7b776f;
  padding: 0.8% 1.8% 1.15%;
  font-size: clamp(16px, 3.75vw, 39px);
  font-weight: 500;
  line-height: 1;
  min-width: 90%;
  color: white;
}

.invitation-address {
  margin-top: 1.3%;
  font-size: clamp(13px, 2.72vw, 28px);
  font-style: normal;
  font-weight: 400;
  line-height: 1.2;
}
.invitation-map-link {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35em;
  color: var(--invitation-green-deep);
  vertical-align: baseline;
  transition: transform 0.15s ease;
}
.invitation-map-link svg {
  width: 1em;
  height: 1em;
}
.invitation-map-link:hover {
  transform: scale(1.12);
}

.party-timeline {
  width: min(100%, 530px);
  margin-top: 4.5%;
}
.party-timeline h2 {
  margin: 0 0 3%;

  font-size: clamp(25px, 5.1vw, 48px);
  font-weight: 600;
  line-height: 1;
}
.party-timeline ol {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 2vw, 18px) clamp(14px, 2.8vw, 26px);
  margin: 0;
  padding: 0 0 0 clamp(20px, 4vw, 34px);
  list-style: none;
  text-align: left;
}
.party-timeline ol::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: clamp(5px, 1vw, 9px);
  width: 4px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--invitation-green) 35%, transparent);
}
.party-timeline li {
  position: relative;
}
.party-timeline li::before {
  content: "";
  position: absolute;
  top: clamp(10px, 2vw, 16px);
  left: calc(-1 * clamp(20px, 4vw, 34px) + clamp(5px, 1vw, 9px) - 6px);
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--invitation-green);
  border: 3px solid var(--invitation-paper);
}
.party-timeline li:nth-child(even)::before {
  background: var(--invitation-green-deep);
}
.timeline-card {
  height: 100%;
  padding: clamp(9px, 1.8vw, 15px) clamp(11px, 2.2vw, 18px);
  border-radius: clamp(10px, 2vw, 16px);
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 6%);
  outline: 1px solid rgb(0 0 0 / 5%);
  outline-offset: -1px;
  transition: box-shadow 160ms ease;
}
.timeline-card:hover {
  box-shadow: 0 4px 12px rgb(0 0 0 / 10%);
}
.party-timeline time {
  display: block;
  color: var(--invitation-green-deep);
  font-size: clamp(10px, 1.8vw, 14px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.timeline-activity {
  margin: 1px 0 0;
  font-size: clamp(12px, 2.3vw, 18px);
  font-weight: 600;
  line-height: 1.2;
}
.timeline-detail {
  margin: 2px 0 0;
  color: color-mix(in oklch, var(--invitation-ink) 60%, transparent);
  font-size: clamp(10px, 1.9vw, 14px);
  line-height: 1.3;
}

.party-gallery {
  width: min(100%, 530px);
  margin-top: 5%;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(7px, 1.5vw, 14px);
}
.gallery-thumbnail {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: clamp(2px, 0.45vw, 4px) solid var(--invitation-green);
  border-radius: 6px;
  background: var(--invitation-paper);
  padding: 0;
  cursor: pointer;
}
.gallery-thumbnail:hover {
  filter: brightness(1.04);
}
.gallery-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.invitation-rsvp-note {
  margin: 4.2% 0 0;
  font-size: clamp(11px, 2.15vw, 22px);
  font-weight: 400;
  line-height: 1.2;
}

.safari-party {
  position: absolute;
  z-index: 1;
  left: 9.45%;
  bottom: 0;
  width: 81.1%;
  height: auto;
  pointer-events: none;
}

/* Photo viewer */
.gallery-lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(0 0 0 / 80%);
}
.gallery-lightbox-backdrop[hidden] {
  display: none;
}
.gallery-lightbox {
  position: relative;
  width: min(92vw, 900px);
  max-height: 92svh;
  border-radius: clamp(10px, 2vw, 18px);
  background: var(--invitation-overlay);
  padding: clamp(40px, 7vw, 64px) clamp(44px, 8vw, 72px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-lightbox-image {
  max-width: 100%;
  max-height: calc(92svh - 128px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: clamp(6px, 1.2vw, 10px);
}
.gallery-lightbox button {
  appearance: none;
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  color: var(--invitation-paper);
}
.gallery-lightbox button:hover {
  background: rgb(255 255 255 / 12%);
}
.gallery-lightbox button svg {
  width: 20px;
  height: 20px;
}
.lightbox-close {
  position: absolute;
  top: clamp(8px, 1.6vw, 14px);
  right: clamp(8px, 1.6vw, 14px);
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-arrow-left {
  left: clamp(6px, 1.4vw, 14px);
}
.lightbox-arrow-right {
  right: clamp(6px, 1.4vw, 14px);
}
.lightbox-count {
  position: absolute;
  bottom: clamp(8px, 1.6vw, 14px);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: var(--invitation-paper);
  font-family: var(--font-invitation);
  font-size: clamp(11px, 1.8vw, 14px);
}

@media (max-width: 520px) {
  .party-timeline ol {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .invitation-card {
    min-height: calc(100vw * 2.34);
  }
  .invitation-copy {
    padding-right: 10%;
    padding-bottom: 76%;
    padding-left: 10%;
  }
  .gallery-lightbox {
    width: 100vw;
    height: 100svh;
    max-height: none;
    border-radius: 0;
    padding: 58px 45px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-thumbnail,
  .invitation-map-link,
  .timeline-card {
    transition: none;
  }
}
