:root {
  --brown: #9e8675;
  --brown-dark: #6f5b4e;
  --cream: #f8f5f0;
  --white: #ffffff;
  --line: rgba(255, 255, 255, 0.72);
  --ink-on-dark: #ffffff;
  --ink-on-light: #5a4d45;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink-on-light);
  font-family: Arial, Helvetica, sans-serif;
  background: #e7ded5;
  text-rendering: optimizeLegibility;
}

body.gate-open {
  overflow: hidden;
}

.invite-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--ink-on-dark);
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(rgba(73, 54, 42, 0.5), rgba(73, 54, 42, 0.68)),
    url("assets/pinterest-hero.jpg") center / cover no-repeat;
  transition: opacity 900ms ease, visibility 900ms ease, transform 900ms ease;
  cursor: pointer;
}

.invite-gate::before,
.invite-gate::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  pointer-events: none;
}

.invite-gate::before {
  top: -160px;
  right: -120px;
  width: 360px;
  height: 360px;
  animation: gate-orbit 8s ease-in-out infinite;
}

.invite-gate::after {
  bottom: -190px;
  left: -150px;
  width: 430px;
  height: 430px;
  animation: gate-orbit 9s ease-in-out infinite reverse;
}

.invite-gate.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.invite-gate.is-opening {
  opacity: 0;
  transform: scale(1.018);
}

.invite-gate__panel {
  position: relative;
  width: min(390px, 100%);
  padding: 28px 20px;
  border: 0;
  border-radius: 0;
  text-align: center;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  animation: gate-card 900ms ease both, gate-float 4.8s ease-in-out 900ms infinite;
  cursor: pointer;
}

.invite-gate__panel::before {
  display: none;
}

.invite-gate__panel p {
  position: relative;
  z-index: 1;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.94);
  font-family: "Monotype Corsiva", "Segoe Script", "Palatino Linotype", Georgia, serif;
  font-size: clamp(47px, 14vw, 72px);
  font-weight: 300;
  line-height: 0.94;
  text-transform: none;
  text-shadow: 0 10px 26px rgba(35, 22, 15, 0.28);
}

.invite-gate__panel button {
  position: relative;
  z-index: 1;
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--white);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  text-shadow: 0 8px 22px rgba(40, 28, 22, 0.42);
  transition: opacity 220ms ease, transform 220ms ease;
}

.invite-gate__panel button:hover {
  opacity: 0.78;
  transform: translateY(-1px);
}

.invite-gate.is-opening .invite-gate__panel {
  animation: none;
  transform: translateY(-18px) scale(0.96);
}

.phone-invite {
  width: min(100%, 430px);
  margin: 0 auto;
  overflow: hidden;
  background: var(--cream);
  box-shadow: 0 0 70px rgba(55, 38, 28, 0.14);
}

.hero-screen {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: var(--ink-on-dark);
  background: #b7a59a;
}

.hero-photo {
  position: absolute;
  inset: 118px 0 0;
  background:
    linear-gradient(rgba(95, 75, 62, 0.05), rgba(37, 28, 23, 0.28)),
    url("assets/pinterest-hero.jpg")
      center 38% / cover no-repeat;
  filter: saturate(0.8) contrast(0.96);
}

.hero-screen::after {
  position: absolute;
  right: -54px;
  bottom: -84px;
  width: 300px;
  height: 300px;
  content: "";
  border: 1px solid var(--line);
  border-radius: 50%;
}

.wedding-word {
  position: relative;
  z-index: 2;
  margin: 0;
  padding-top: 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 60px;
  line-height: 0.9;
  text-align: center;
  text-transform: uppercase;
}

.hero-names-top {
  position: relative;
  z-index: 2;
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.monogram {
  position: absolute;
  right: 50%;
  bottom: 92px;
  z-index: 2;
  color: var(--ink-on-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 58px;
  line-height: 1;
  text-transform: uppercase;
  transform: translateX(50%);
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.scroll-mark {
  position: absolute;
  right: 50%;
  bottom: 58px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: translateX(50%) rotate(45deg);
}

.sound-button {
  position: fixed;
  right: max(18px, calc((100vw - min(100vw, 430px)) / 2 + 18px));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  width: 68px;
  height: 68px;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  background: rgba(133, 109, 92, 0.88);
  box-shadow: 0 14px 30px rgba(69, 48, 36, 0.25);
  cursor: pointer;
}

.sound-button.is-playing {
  background: rgba(133, 109, 92, 0.88);
}

.sound-button.is-missing {
  opacity: 0.72;
}

.sound-button svg {
  display: block;
  width: 31px;
  height: 31px;
  fill: none;
  stroke: var(--white);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.sound-wave {
  display: none;
}

.sound-muted {
  display: block;
}

.sound-button.is-playing .sound-wave {
  display: block;
}

.sound-button.is-playing .sound-muted {
  display: none;
}

.pearl-section {
  position: relative;
  overflow: hidden;
  padding: 92px 28px;
  color: var(--ink-on-dark);
  text-align: center;
  background:
    radial-gradient(circle at 15% 16%, rgba(255, 255, 255, 0.28), transparent 20%),
    radial-gradient(circle at 82% 68%, rgba(255, 255, 255, 0.2), transparent 22%),
    linear-gradient(rgba(162, 136, 118, 0.78), rgba(165, 140, 122, 0.82)),
    url("assets/elleven-interer-4.webp")
      center / cover no-repeat;
}

.program-section {
  background:
    radial-gradient(circle at 15% 16%, rgba(255, 255, 255, 0.22), transparent 20%),
    radial-gradient(circle at 82% 68%, rgba(255, 255, 255, 0.18), transparent 22%),
    linear-gradient(rgba(72, 51, 38, 0.7), rgba(118, 92, 74, 0.82)),
    url("assets/restaurant-entrance.avif")
      center / cover no-repeat;
}

.dress-section {
  background:
    radial-gradient(circle at 15% 16%, rgba(255, 255, 255, 0.2), transparent 20%),
    radial-gradient(circle at 82% 68%, rgba(255, 255, 255, 0.16), transparent 22%),
    linear-gradient(rgba(94, 75, 62, 0.7), rgba(157, 131, 111, 0.84)),
    url("assets/restaurant-bar.jpg")
      center / cover no-repeat;
}

.pearl-section::before,
.white-curve::before {
  position: absolute;
  top: -190px;
  left: -165px;
  width: 390px;
  height: 390px;
  content: "";
  border: 1px solid var(--line);
  border-radius: 50%;
}

.pearl-section::after {
  position: absolute;
  right: -185px;
  bottom: -210px;
  width: 430px;
  height: 430px;
  content: "";
  border: 1px solid var(--line);
  border-radius: 50%;
}

.circle-dot {
  position: absolute;
  top: 42px;
  left: 50%;
  width: 78px;
  height: 78px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--brown);
  transform: translateX(-50%);
}

h1,
h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  text-transform: uppercase;
}

h1 {
  margin-top: 84px;
  font-size: 44px;
  line-height: 1.12;
}

h2 {
  margin-bottom: 28px;
  font-size: 32px;
}

.date-line {
  position: relative;
  z-index: 1;
  margin: 34px 0 34px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  line-height: 1;
}

.pearl-section p,
.white-section p {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-width: 330px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pearl-section p + p,
.white-section p + p {
  margin-top: 24px;
}

.white-curve {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  background: var(--white);
}

.photo-curve img {
  position: absolute;
  top: 150px;
  left: -84px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(118, 94, 78, 0.52);
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.white-section {
  position: relative;
  padding: 74px 28px;
  text-align: center;
  background: var(--white);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  width: min(360px, 100%);
  margin: 10px auto 0;
}

.countdown div {
  display: grid;
  min-height: 86px;
  align-content: center;
  border-left: 1px solid rgba(111, 91, 78, 0.2);
}

.countdown div:first-child {
  border-left: 0;
}

.countdown span {
  color: var(--brown-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 36px;
  line-height: 1;
}

.countdown small {
  margin-top: 8px;
  color: var(--brown-dark);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.program-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  width: min(320px, 100%);
  margin: 0 auto;
}

.program-list article {
  display: grid;
  gap: 7px;
  justify-items: center;
}

.program-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: rgba(255, 255, 255, 0.76);
}

.program-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.program-list time {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  line-height: 1;
}

.program-list p {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.map-frame {
  position: relative;
  z-index: 1;
  width: min(340px, 100%);
  margin: 28px auto 0;
  overflow: hidden;
  border-radius: 160px 160px 0 0;
  background: #f4efe9;
  box-shadow: 0 18px 40px rgba(67, 49, 36, 0.16);
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
}

.pill-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  margin-top: 26px;
  padding: 13px 28px;
  border: 1px solid var(--brown-dark);
  border-radius: 999px;
  color: var(--brown-dark);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.palette {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: min(330px, 100%);
  margin: 30px auto 0;
}

.palette span {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 10px 18px rgba(70, 49, 36, 0.14);
}

.host-photo {
  position: relative;
  z-index: 1;
  display: block;
  width: 118px;
  height: 118px;
  margin: 0 auto 26px;
  border: 1px solid rgba(111, 91, 78, 0.24);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 12%;
  box-shadow: 0 18px 38px rgba(67, 49, 36, 0.18);
}

.finale {
  min-height: 430px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 30px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.18), transparent 24%),
    linear-gradient(rgba(58, 43, 34, 0.62), rgba(82, 60, 47, 0.78)),
    url("assets/restaurant-hall.webp")
      center / cover no-repeat;
}

.monogram--small {
  position: static;
  margin: 0;
  transform: none;
  font-size: 64px;
}

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

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

.program-list article,
.palette span,
.host-photo {
  transition: transform 700ms ease, opacity 700ms ease;
}

.reveal:not(.is-visible) .program-list article,
.reveal:not(.is-visible) .palette span,
.reveal:not(.is-visible) .host-photo {
  opacity: 0;
  transform: translateY(18px);
}

@media (min-width: 760px) {
  body {
    padding: 24px 0;
  }

  .phone-invite {
    border-radius: 28px;
  }
}

@media (min-width: 900px) {
  body {
    padding: 0;
    background:
      radial-gradient(circle at 10% 12%, rgba(255, 255, 255, 0.7), transparent 26%),
      linear-gradient(135deg, #ded1c7, #f5eee7 45%, #c8b4a4);
  }

  .phone-invite {
    width: min(100%, 1180px);
    border-radius: 0;
  }

  .invite-gate {
    background:
      radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.18), transparent 24%),
      linear-gradient(rgba(73, 54, 42, 0.5), rgba(73, 54, 42, 0.68)),
      url("assets/pinterest-hero.jpg") center / cover no-repeat;
  }

  .invite-gate__panel {
    width: min(620px, 100%);
  }

  .invite-gate__panel p {
    font-size: 82px;
  }

  .hero-screen {
    min-height: 760px;
  }

  .hero-photo {
    inset: 0 0 0 44%;
    background-position: center 34%;
  }

  .hero-screen::after {
    right: -120px;
    bottom: -210px;
    width: 620px;
    height: 620px;
  }

  .wedding-word {
    position: absolute;
    top: 46px;
    left: 6%;
    font-size: 108px;
    text-align: left;
  }

  .hero-names-top {
    position: absolute;
    top: 150px;
    left: 7%;
    font-size: 16px;
    text-align: left;
  }

  .monogram {
    right: 28%;
    bottom: 116px;
    font-size: 78px;
  }

  .scroll-mark {
    right: 28%;
    bottom: 74px;
  }

  .sound-button {
    right: calc((100vw - min(100vw, 1180px)) / 2 + 28px);
  }

  .pearl-section,
  .white-section {
    padding: 104px 72px;
  }

  .intro-section {
    min-height: 640px;
    display: grid;
    align-content: center;
  }

  h1 {
    font-size: 72px;
  }

  h2 {
    font-size: 54px;
  }

  .date-line {
    font-size: 54px;
  }

  .pearl-section p,
  .white-section p {
    max-width: 620px;
    font-size: 17px;
    line-height: 1.7;
  }

  .white-curve {
    min-height: 640px;
  }

  .photo-curve img {
    top: 70px;
    left: 50%;
    width: 620px;
    height: 620px;
    transform: translateX(-50%);
  }

  .countdown {
    max-width: 620px;
  }

  .program-list {
    grid-template-columns: repeat(4, 1fr);
    width: min(820px, 100%);
    gap: 26px;
  }

  .map-frame {
    width: min(760px, 100%);
    border-radius: 260px 260px 0 0;
  }

  .map-frame iframe {
    height: 420px;
  }

  .host-section {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    align-items: center;
    column-gap: 42px;
    text-align: left;
  }

  .host-section h2,
  .host-section p,
  .host-section .pill-link {
    grid-column: 2;
  }

  .host-photo {
    grid-row: 1 / span 3;
    width: 160px;
    height: 160px;
    margin: 0;
  }

  .host-section p {
    margin-left: 0;
  }

  .finale {
    min-height: 520px;
  }
}

@keyframes gate-card {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }

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

@keyframes gate-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes gate-orbit {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(18px) scale(1.04);
  }
}

@media (max-width: 390px) {
  .invite-gate {
    background:
      radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.18), transparent 24%),
      linear-gradient(rgba(73, 54, 42, 0.5), rgba(73, 54, 42, 0.68)),
      url("assets/pinterest-hero.jpg") center / cover no-repeat;
  }

  .invite-gate__panel p {
    font-size: 44px;
  }

  .wedding-word {
    font-size: 56px;
  }

  h1 {
    font-size: 40px;
  }

  .date-line {
    font-size: 33px;
  }
}

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

  .invite-gate,
  .invite-gate::before,
  .invite-gate::after,
  .invite-gate__panel,
  .reveal,
  .program-list article,
  .palette span,
  .host-photo {
    transition: none;
  }
}
