:root {
  --choco-900: #2b1715;
  --choco-800: #3d211f;
  --choco-700: #4b2a27;
  --gold-400: #cfac65;
  --gold-500: #b88b45;
  --cream: #f6f0e5;
  --cream-soft: #f9f4eb;
  --text-dark: #352421;
  --text-light: #f4e7d5;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Montserrat", Arial, sans-serif;
  color: var(--text-dark);
  background:
    radial-gradient(circle at 10% 0%, #5c3531 0%, transparent 35%),
    radial-gradient(circle at 90% 90%, #3c201d 0%, transparent 35%),
    linear-gradient(170deg, #201110 0%, #140a09 100%);
}

.page {
  width: 100%;
}

.hero-gates {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  background:
    linear-gradient(rgba(22, 10, 9, 0.55), rgba(22, 10, 9, 0.55)),
    url("https://images.pexels.com/photos/1460890/pexels-photo-1460890.jpeg?auto=compress&cs=tinysrgb&w=1600");
  background-size: cover;
  background-position: center;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.gate {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  transition: transform 1.1s cubic-bezier(0.2, 0.72, 0.2, 1);
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.12), transparent 45%),
    repeating-linear-gradient(
      130deg,
      rgba(255, 255, 255, 0.06) 0 7px,
      rgba(0, 0, 0, 0.07) 7px 16px
    ),
    linear-gradient(180deg, var(--choco-700) 0%, var(--choco-900) 100%);
}

.gate-left {
  left: 0;
  border-right: 1px solid rgba(207, 172, 101, 0.25);
}

.gate-right {
  right: 0;
  border-left: 1px solid rgba(207, 172, 101, 0.25);
}

.open-btn {
  appearance: none;
  border: none;
  cursor: pointer;
}

.open-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(132px, 20vw, 178px);
  height: clamp(132px, 20vw, 178px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 25%, #ffefcf 0%, #dec291 45%, #b88b45 100%);
  color: #3f2915;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(28px, 4vw, 36px);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.02em;
  padding: 0 10px;
  box-shadow: 0 0 0 3px rgba(207, 172, 101, 0.4), 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: transform 0.22s ease, opacity 0.35s ease;
}

.open-circle:hover {
  transform: translate(-50%, -50%) scale(1.04);
}

.open-circle:focus-visible,
.submit-btn:focus-visible,
.map-btn:focus-visible,
input:focus-visible {
  outline: 3px solid #ffd58f;
  outline-offset: 3px;
}

.invitation-content {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 24px 14px 36px;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.ornate-block {
  background: var(--cream-soft);
  border: 1px solid rgba(184, 139, 69, 0.45);
  border-radius: 28px;
  padding: 20px 18px;
  margin-bottom: 20px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
}

.chocolate-texture {
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.09), transparent 38%),
    radial-gradient(circle at 90% 85%, rgba(255, 255, 255, 0.06), transparent 32%),
    repeating-linear-gradient(
      130deg,
      rgba(255, 255, 255, 0.04) 0 9px,
      rgba(0, 0, 0, 0.08) 9px 20px
    ),
    linear-gradient(170deg, var(--choco-700), var(--choco-800) 55%, var(--choco-900));
  color: var(--text-light);
}

.arched-top {
  position: relative;
  border-radius: 180px 180px 24px 24px;
  padding: clamp(24px, 5vw, 40px) clamp(16px, 5vw, 34px);
  text-align: center;
  overflow: hidden;
}

.banner-block h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: "Great Vibes", cursive;
  font-size: clamp(50px, 9vw, 82px);
  line-height: 1.08;
  font-weight: 500;
  color: #f6e1b5;
  text-align: center;
  max-width: 12ch;
  transform: translateY(24px);
}

.banner-block {
  position: relative;
  min-height: clamp(460px, 70vh, 660px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: clamp(34px, 6vw, 64px) clamp(18px, 5vw, 34px) clamp(80px, 10vw, 114px);
  border-radius: 12px 12px 170px 170px;
  border: none;
  background:
    linear-gradient(rgba(28, 14, 12, 0.34), rgba(28, 14, 12, 0.68)),
    url("./images/background.jpg");
  background-size: cover;
  background-position: center;
  background-clip: padding-box;
}

.banner-block::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(184, 139, 69, 0.45);
  pointer-events: none;
}

.calendar-block h2,
.location-block h2,
.dresscode-block h2,
.rsvp-block h2,
.closing-block h2 {
  margin: 0 0 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(36px, 6vw, 50px);
  text-align: center;
}

.dresscode-block {
  background: var(--cream-soft);
  border: 1px solid rgba(184, 139, 69, 0.45);
  border-radius: 32px;
  padding: clamp(24px, 5vw, 36px) clamp(16px, 4vw, 28px);
  margin-bottom: 20px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.calendar-block {
  border-radius: 170px 170px 42px 42px;
  padding: clamp(28px, 5vw, 42px) clamp(18px, 5vw, 34px) clamp(24px, 4vw, 34px);
  margin-bottom: 20px;
  border: 1px solid rgba(184, 139, 69, 0.45);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
}

.location-block {
  border-radius: 20px 20px 170px 170px;
  padding: clamp(28px, 5vw, 42px) clamp(18px, 5vw, 34px) clamp(30px, 6vw, 48px);
  margin-bottom: 20px;
  border: 1px solid rgba(184, 139, 69, 0.45);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.25);
  background:
    linear-gradient(rgba(28, 14, 12, 0.64), rgba(28, 14, 12, 0.64)),
    url("https://images.pexels.com/photos/1460890/pexels-photo-1460890.jpeg?auto=compress&cs=tinysrgb&w=1500");
  background-size: cover;
  background-position: center;
}

.calendar-block p,
.location-block p,
.dresscode-block p,
.rsvp-block p,
.closing-block p {
  margin: 0 0 12px;
  text-align: center;
  line-height: 1.5;
}

.dresscode-block h2,
.dresscode-block p {
  grid-column: 1 / -1;
}

.with-lights {
  position: relative;
}

.with-lights::before {
  content: "";
  display: block;
  width: 72%;
  height: 7px;
  border-radius: 999px;
  margin: 0 auto 16px;
  background: radial-gradient(circle, #f9dca4 0 2px, transparent 3px) 0 0 / 20px 7px repeat-x;
  opacity: 0.95;
}

.calendar-grid {
  margin: 16px auto 4px;
  width: min(100%, 420px);
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  font-size: 13px;
}

.calendar-grid span {
  text-align: center;
  padding: 3px 0;
}

.day-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(160deg, #f0d69d, #bf8d42);
  color: #2f1b15;
  font-weight: 700;
  padding: 0;
}

.timer-wrap {
  margin-top: 18px;
  text-align: center;
  border-top: 1px solid rgba(239, 217, 174, 0.25);
  padding-top: 14px;
}

.timer-wrap h3 {
  margin: 0 0 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(30px, 5vw, 40px);
}

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

.timer div {
  background: var(--cream);
  border: 1px solid #d8bc84;
  border-radius: 14px;
  padding: 10px 6px;
}

.timer strong {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(30px, 5vw, 44px);
  color: #3f2917;
  line-height: 1;
}

.timer span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #735130;
}

.map-btn,
.submit-btn {
  display: inline-block;
  border-radius: 999px;
  padding: 10px 24px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.map-btn {
  display: block;
  width: fit-content;
  margin: 10px auto 0;
  background: #ffffff;
  color: #5b391f;
  border: 1px solid #d7b77a;
  padding: 14px 34px;
  font-size: 20px;
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.03em;
}

.map-btn:hover {
  transform: translateY(-1px);
  background: #fff4dc;
}

.location-photo {
  margin: 8px auto 14px;
  width: min(100%, 380px);
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  border: 1px solid rgba(228, 196, 141, 0.6);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  background:
    linear-gradient(rgba(14, 9, 8, 0.35), rgba(14, 9, 8, 0.35)),
    url("./images/image.png");
  background-size: cover;
  background-position: center;
}

.dresscode-item {
  background: #fbf7ef;
  border: 1px solid #d8c19a;
  border-radius: 18px;
  padding: 16px 10px 14px;
  text-align: center;
  box-shadow: 0 8px 16px rgba(77, 48, 24, 0.1);
}

.dresscode-item:nth-of-type(1) {
  grid-column: 3 / 5;
}

.dresscode-item:nth-of-type(2) {
  grid-column: 2 / 4;
}

.dresscode-item:nth-of-type(3) {
  grid-column: 4 / 6;
}

.dot {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: block;
  margin: 0 auto 8px;
  border: 1px solid #b79b71;
}

.dot.white {
  background: #ffffff;
}

.dot.black {
  background: #1d1f27;
}

.dot.brown {
  background: #5b4438;
}

.dresscode-item em {
  font-style: normal;
  font-size: 14px;
  font-weight: 600;
  color: #6a4a2e;
}

.rsvp-form {
  display: grid;
  gap: 14px;
}

.rsvp-form fieldset {
  margin: 0;
  border: 1px solid #d6bb85;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
}

.rsvp-form legend {
  padding: 0 6px;
  font-weight: 600;
  color: #5e3f21;
}

.rsvp-form label {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rsvp-form input {
  accent-color: #7f5528;
}

.rsvp-form input[type="text"] {
  width: 100%;
  border: 1px solid #d6bb85;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  color: #3d2918;
  background: #fffdf7;
}

.name-label {
  display: block;
  margin-bottom: 8px;
}

.submit-btn {
  border: none;
  background: linear-gradient(145deg, #d8b777, #b98c47);
  color: #2f1c12;
  font-size: 22px;
  font-family: "Cormorant Garamond", serif;
  letter-spacing: 0.02em;
}

.submit-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(145deg, #e6c98d, #c39550);
}

.rsvp-message {
  min-height: 22px;
  margin: 8px 0 0;
  text-align: center;
  color: #603d20;
  font-weight: 600;
}

.closing-block {
  position: relative;
  min-height: clamp(320px, 48vh, 500px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  border-radius: 170px 170px 16px 16px;
  border: none;
  padding: clamp(34px, 6vw, 64px) clamp(18px, 5vw, 34px);
  background:
    linear-gradient(rgba(28, 14, 12, 0.34), rgba(28, 14, 12, 0.68)),
    url("./images/background.jpg");
  background-size: cover;
  background-position: center;
  background-clip: padding-box;
}

.closing-block::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(184, 139, 69, 0.45);
  pointer-events: none;
}

.closing-block h2 {
  margin: 0 0 12px;
  color: #f6e1b5;
  font-family: "Great Vibes", cursive;
  font-size: clamp(52px, 9vw, 86px);
  line-height: 1.05;
}

.closing-block p {
  margin: 0;
  color: #f2e5d6;
  font-size: clamp(16px, 2.6vw, 22px);
}

.photo-note {
  margin: 2px 0 0;
  text-align: center;
  font-size: 12px;
  color: #d6bf98;
}

.popup-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 10, 9, 0.65);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 40;
}

.popup-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.thanks-popup {
  width: min(100%, 460px);
  border: 1px solid rgba(184, 139, 69, 0.6);
  border-radius: 24px;
  padding: 22px 20px;
  text-align: center;
  color: #f4e6d4;
  background:
    linear-gradient(rgba(24, 12, 11, 0.65), rgba(24, 12, 11, 0.8)),
    url("./images/background.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.42);
}

.popup-eyebrow {
  margin: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
  color: #e7c688;
}

.thanks-popup h3 {
  margin: 8px 0 10px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(34px, 6vw, 44px);
  line-height: 1;
}

.thanks-popup p {
  margin: 0;
  line-height: 1.45;
}

.popup-close {
  margin-top: 16px;
  border: none;
  border-radius: 999px;
  padding: 11px 24px;
  font-weight: 600;
  color: #2f1c12;
  cursor: pointer;
  background: linear-gradient(145deg, #e4c98d, #ba8f4b);
}

.opening-complete .gate-left {
  transform: translateX(-102%);
}

.opening-complete .gate-right {
  transform: translateX(102%);
}

.opening-complete .open-circle {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  pointer-events: none;
}

.opening-complete .hero-gates {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.opening-complete .invitation-content {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 700px) {
  .timer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dresscode-block h2,
  .dresscode-block p {
    grid-column: 1 / -1;
  }
}
