@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

@font-face {
  font-family: "KZ Ceremonious";
  src: url("fonts/KZ Ceremonious Two.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #253750;
  --navy-deep: #18283d;
  --navy-soft: #334a67;
  --cream: #fbf8ef;
  --cream-strong: #fffdf7;
  --paper: rgba(251, 248, 239, 0.965);
  --gold: #c49362;
  --gold-dark: #a9784d;
  --gold-soft: #e4c39f;
  --white-ornament: #fffdf5;
  --shadow: 0 34px 70px rgba(9, 18, 32, 0.42);
  --section-shadow: 0 24px 58px rgba(7, 15, 26, 0.30);
  --display-font: "KZ Ceremonious", Georgia, "Noto Serif", serif;
  --body-font: "Cormorant Garamond", Georgia, "Noto Serif", serif;
}

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

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  padding-bottom: 160px;
  overflow-x: hidden;
  color: var(--navy);
  background: var(--navy);
  font-family: var(--body-font);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-color: var(--navy);
  background-image: url("photos/bg-desktop.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: translateZ(0);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 250, 238, 0.08), transparent 28%),
    radial-gradient(circle at 50% 85%, rgba(0, 0, 0, 0.28), transparent 36%);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: 100%;
  min-height: 100vh;
  isolation: isolate;
}

.invitation-template {
  width: 100%;
}

.hero {
  min-height: 100svh;
  width: 100%;
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 70px) 16px clamp(46px, 7vw, 82px);
}

.hero-card {
  width: min(820px, calc(100vw - 32px));
  position: relative;
  overflow: hidden;
  background: var(--cream);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(20px) scale(0.985);
  animation: heroEnter 950ms ease forwards;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 16px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  z-index: 4;
}

.hero-photo {
  position: relative;
  min-height: clamp(280px, 49vw, 555px);
  background-color: var(--navy-soft);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(37, 55, 80, 0.18)),
    url("photos/hero-default.webp");
  background-size: cover;
  background-position: center 42%;
  filter: saturate(0.88) sepia(0.12) brightness(1.04);
}

.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 50%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.20), transparent 38%);
}

.hero-card.no-hero-photo .hero-photo {
  min-height: 180px;
  background-image:
    radial-gradient(circle at 50% 30%, rgba(255,255,255,.10), transparent 34%),
    linear-gradient(135deg, #314967, #18283d);
}

.hero-body {
  position: relative;
  background: var(--cream);
  margin-top: -1px;
  padding: 82px clamp(22px, 8vw, 82px) 56px;
  text-align: center;
}

.hero-body::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -96px;
  left: -12%;
  width: 124%;
  height: 155px;
  background: var(--cream);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.hero-ornament {
  position: absolute;
  z-index: 2;
  top: -106px;
  left: 50%;
  width: min(760px, 108%);
  transform: translateX(-50%);
  color: var(--white-ornament);
  opacity: 0;
  animation: ornamentFloatIn 1100ms 260ms ease forwards;
}

.hero-ornament svg {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.12));
}

.inner-frame {
  position: relative;
  z-index: 1;
  padding: 42px clamp(14px, 5vw, 42px) 38px;
  border-left: 4px solid var(--gold);
  border-right: 4px solid var(--gold);
  border-bottom: 4px solid var(--gold);
}

.inner-frame::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -13px;
  width: 16px;
  height: 16px;
  background: var(--gold);
  transform: translateX(-50%) rotate(45deg);
  box-shadow:
    -22px 22px 0 -1px var(--gold),
    22px -22px 0 -1px var(--gold);
}

.kicker,
.section-kicker {
  display: block;
  color: var(--gold);
  font-family: var(--body-font);
  font-size: clamp(12px, 1.7vw, 15px);
  line-height: 1.65;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 600;
}

.hero-names {
  margin: 18px 0 14px;
  color: var(--navy);
  font-family: var(--display-font);
  font-size: clamp(42px, 10vw, 76px);
  line-height: 0.98;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero-names .name-part,
.hero-names .amp {
  display: inline-block;
  opacity: 0;
  transform: translateY(16px);
  animation: nameReveal 720ms ease forwards;
}

.hero-names .amp {
  color: var(--gold);
  font-style: italic;
  padding: 0 0.04em;
  animation-delay: 160ms;
}

.hero-names .name-part:last-child {
  animation-delay: 290ms;
}

.hero-date-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: clamp(12px, 3.5vw, 24px);
  max-width: 520px;
  margin: 22px auto 20px;
  color: var(--gold);
  font-family: var(--body-font);
  font-weight: 600;
  text-transform: uppercase;
}

.hero-date-row .date-piece {
  font-size: clamp(21px, 4.5vw, 35px);
  white-space: nowrap;
}

.hero-date-row .date-line {
  width: 2px;
  height: clamp(42px, 7vw, 64px);
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
}

.hero-time {
  margin: 14px 0 12px;
  color: var(--navy);
  font-family: var(--body-font);
  font-size: clamp(32px, 7vw, 56px);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-title-text {
  margin-top: 6px;
  font-family: var(--display-font);
  font-size: clamp(18px, 3vw, 24px);
  letter-spacing: 0.03em;
  color: var(--navy);
  text-transform: none;
}

.content-section {
  width: min(760px, calc(100vw - 32px));
  margin: clamp(38px, 8vw, 76px) auto;
  padding: clamp(30px, 6vw, 56px) clamp(22px, 6vw, 58px);
  position: relative;
  color: var(--navy);
  background: var(--paper);
  border: 2px solid rgba(196, 147, 98, 0.54);
  box-shadow: var(--section-shadow);
  overflow: hidden;
}

.content-section::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(196, 147, 98, 0.34);
  pointer-events: none;
}

.content-section::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 220px;
  height: 5px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.72;
}

.section-title {
  margin: 0 0 28px;
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--navy);
  font-family: var(--body-font);
  font-size: clamp(28px, 6vw, 44px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.section-title::after {
  content: "◆ ◆ ◆";
  display: block;
  margin-top: 12px;
  color: var(--gold);
  font-family: var(--body-font);
  font-size: 10px;
  letter-spacing: 0.7em;
  font-weight: 700;
}

.invitation-copy {
  position: relative;
  z-index: 1;
  max-width: 610px;
  margin: 0 auto;
  color: rgba(37, 55, 80, 0.92);
  font-size: clamp(17px, 2.5vw, 22px);
  line-height: 1.85;
  text-align: center;
  white-space: pre-line;
  letter-spacing: 0.005em;
}

.calendar-card {
  position: relative;
  z-index: 1;
  max-width: 580px;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 30px);
  background: rgba(255, 253, 247, 0.78);
  border: 1px solid rgba(196, 147, 98, 0.42);
}

.calendar-month {
  color: var(--gold-dark);
  text-align: center;
  font-family: var(--body-font);
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.weekday,
.day-cell {
  min-width: 0;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 600;
}

.weekday {
  aspect-ratio: auto;
  min-height: 30px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.day-cell {
  position: relative;
  color: rgba(37, 55, 80, 0.82);
  border: 1px solid rgba(196, 147, 98, 0.16);
  background: rgba(255, 255, 255, 0.28);
  font-size: clamp(13px, 2.8vw, 16px);
  font-family: var(--body-font);
}

.day-cell.empty {
  border-color: transparent;
  background: transparent;
}

.day-cell.selected {
  color: var(--cream-strong);
  border-color: transparent;
  background: transparent;
  font-weight: 800;
  z-index: 1;
}

.day-cell.selected::before {
  content: "";
  position: absolute;
  width: 76%;
  height: 76%;
  left: 12%;
  top: 8%;
  background: var(--gold);
  transform: rotate(45deg);
  border-radius: 46% 46% 8% 46%;
  box-shadow: 0 6px 16px rgba(164, 117, 72, 0.34);
  z-index: -1;
  animation: heartPulse 2.2s ease-in-out infinite;
}

.day-cell.selected::after {
  content: "";
  position: absolute;
  width: 60%;
  height: 60%;
  left: 20%;
  top: 18%;
  border: 1px solid rgba(255, 253, 247, 0.64);
  transform: rotate(45deg);
  border-radius: 46% 46% 8% 46%;
  z-index: -1;
}

.calendar-time {
  margin-top: 22px;
  text-align: center;
  color: var(--navy);
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hosts-line {
  position: relative;
  z-index: 1;
  margin: 0;
  text-align: center;
  color: var(--navy);
  font-family: var(--display-font);
  font-size: clamp(30px, 6.2vw, 46px);
  line-height: 1.25;
  font-weight: 700;
}

.program-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  max-width: 610px;
  margin: 0 auto;
  padding: 8px 0;
}

.program-list::before {
  content: "";
  position: absolute;
  left: 52px;
  top: 26px;
  bottom: 26px;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
}

.program-heart {
  position: absolute;
  left: 44px;
  top: 24px;
  width: 18px;
  height: 18px;
  background: var(--gold);
  transform: rotate(45deg);
  border-radius: 45% 45% 8% 45%;
  box-shadow: 0 4px 14px rgba(164, 117, 72, 0.35);
  z-index: 2;
  will-change: transform;
}

.program-item {
  position: relative;
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 18px;
  align-items: center;
  min-height: 72px;
}

.program-time {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 52px;
  color: var(--cream-strong);
  background: var(--navy);
  border: 1px solid rgba(196, 147, 98, 0.48);
  box-shadow: 0 10px 24px rgba(24, 40, 61, 0.16);
  font-family: var(--body-font);
  font-size: 22px;
  font-weight: 700;
}

.program-title {
  position: relative;
  padding: 18px 20px;
  color: var(--navy);
  background: rgba(255, 253, 247, 0.72);
  border: 1px solid rgba(196, 147, 98, 0.34);
  font-size: clamp(16px, 3vw, 19px);
  line-height: 1.45;
  font-weight: 600;
}

.photo-frame {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(12px, 3vw, 18px);
  background: var(--cream-strong);
  border: 2px solid rgba(196, 147, 98, 0.58);
  box-shadow: 0 16px 42px rgba(24, 40, 61, 0.18);
}

.photo-frame::before,
.photo-frame::after {
  content: "";
  position: absolute;
  width: 52px;
  height: 52px;
  border-color: var(--gold);
  opacity: 0.86;
  pointer-events: none;
}

.photo-frame::before {
  left: 9px;
  top: 9px;
  border-left: 3px solid;
  border-top: 3px solid;
}

.photo-frame::after {
  right: 9px;
  bottom: 9px;
  border-right: 3px solid;
  border-bottom: 3px solid;
}

.photo-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 760px;
  object-fit: cover;
  filter: saturate(0.92) sepia(0.08) brightness(1.02);
}

.venue-card {
  position: relative;
  z-index: 1;
  max-width: 610px;
  margin: 0 auto;
  text-align: center;
}

.venue-city {
  color: var(--gold-dark);
  font-size: clamp(16px, 3.2vw, 20px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.venue-hall {
  margin: 0 0 8px;
  color: var(--navy);
  font-family: var(--display-font);
  font-size: clamp(30px, 6.2vw, 44px);
  line-height: 1.08;
  font-weight: 700;
}

.venue-street {
  margin: 0 auto 26px;
  color: rgba(37, 55, 80, 0.86);
  font-size: clamp(16px, 3vw, 19px);
  line-height: 1.55;
}

.map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  color: var(--cream-strong);
  background: var(--navy);
  border: 1px solid rgba(196, 147, 98, 0.7);
  box-shadow: 0 12px 28px rgba(24, 40, 61, 0.20);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: transform 180ms ease, background 180ms ease;
}

.map-button:hover {
  transform: translateY(-2px);
  background: var(--navy-deep);
}

.audio-player {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 40;
}

.audio-toggle {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 253, 247, 0.7);
  border-radius: 50%;
  cursor: pointer;
  color: var(--cream-strong);
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.22), transparent 34%),
    var(--gold);
  box-shadow: 0 14px 30px rgba(9, 18, 32, 0.36);
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: transform 180ms ease, filter 180ms ease;
}

.audio-toggle:hover {
  transform: translateY(-2px) scale(1.03);
}

.audio-toggle.is-playing {
  filter: brightness(1.05);
  animation: audioPulse 1.7s ease-in-out infinite;
}

.hidden {
  display: none !important;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 760ms ease, transform 760ms ease;
}

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

@keyframes heroEnter {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ornamentFloatIn {
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
  }
}

@keyframes nameReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heartPulse {
  0%, 100% {
    transform: rotate(45deg) scale(1);
  }
  50% {
    transform: rotate(45deg) scale(1.08);
  }
}

@keyframes audioPulse {
  0%, 100% {
    box-shadow: 0 14px 30px rgba(9, 18, 32, 0.36);
  }
  50% {
    box-shadow: 0 14px 34px rgba(9, 18, 32, 0.38), 0 0 0 9px rgba(196, 147, 98, 0.18);
  }
}

@media (max-width: 680px) {
  body::before {
    background-image: url("photos/bg-mobile.webp");
  }

  body::after {
    background:
      radial-gradient(circle at 50% 10%, rgba(255, 250, 238, 0.05), transparent 34%),
      radial-gradient(circle at 50% 90%, rgba(0, 0, 0, 0.26), transparent 42%);
  }

  .hero {
    padding: 18px 12px 40px;
    align-items: start;
  }

  .hero-card,
  .content-section {
    width: min(100%, calc(100vw - 24px));
  }

  .hero-card::before {
    inset: 10px;
  }

  .hero-photo {
    min-height: clamp(255px, 76vw, 390px);
  }

  .hero-body {
    padding: 64px 18px 42px;
  }

  .hero-body::before {
    top: -74px;
    height: 118px;
    left: -18%;
    width: 136%;
  }

  .hero-ornament {
    top: -84px;
    width: 122%;
  }

  .inner-frame {
    padding: 34px 12px 32px;
    border-left-width: 3px;
    border-right-width: 3px;
    border-bottom-width: 3px;
  }

  .hero-names {
    font-size: clamp(42px, 15vw, 62px);
  }

  .hero-date-row {
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 10px;
  }

  .hero-date-row .date-piece {
    font-size: clamp(20px, 7vw, 29px);
  }

  .hero-date-row .date-line {
    height: 48px;
  }

  .kicker,
  .section-kicker,
  .hero-time {
    letter-spacing: 0.16em;
  }

  .content-section {
    margin: 42px auto;
    padding: 32px 20px;
  }

  .calendar-grid {
    gap: 5px;
  }

  .program-list::before {
    left: 34px;
  }

  .program-heart {
    left: 26px;
  }

  .program-item {
    grid-template-columns: 72px 1fr;
    gap: 12px;
  }

  .program-time {
    min-height: 46px;
    font-size: 17px;
  }

  .program-title {
    padding: 14px 14px;
  }
}

@media (max-width: 420px) {
  .hero {
    padding-left: 8px;
    padding-right: 8px;
  }

  .hero-card,
  .content-section {
    width: calc(100vw - 16px);
  }

  .inner-frame {
    padding-left: 9px;
    padding-right: 9px;
  }

  .hero-date-row {
    gap: 8px;
  }

  .calendar-card {
    padding: 14px;
  }

  .weekday {
    font-size: 10px;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .program-heart {
    transform: rotate(45deg) !important;
  }
}
