:root {
  --paper: #f5f1ed;
  --white: #fffdfb;
  --ink: #171517;
  --muted: #777074;
  --line: #d8d0cc;
  --rose: #b87586;
  --soft-rose: #ead6da;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
}

body.locked > *:not(#accessGate) {
  display: none !important;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
textarea,
select {
  font: inherit;
}

/* ACCESS */

.access-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.access-card {
  max-width: 500px;
}

.access-card h1 {
  margin: 18px 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 10vw, 6rem);
  font-weight: 500;
  line-height: 0.95;
}

.access-card p:not(.eyebrow) {
  color: var(--muted);
}

.loading-dot {
  width: 9px;
  height: 9px;
  margin: 26px auto;
  border-radius: 50%;
  background: var(--rose);
  animation: blink 1s infinite alternate;
}

@keyframes blink {
  from {
    opacity: 0.3;
  }

  to {
    opacity: 1;
  }
}

/* NAVIGATION */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 241, 237, 0.95);
  backdrop-filter: blur(12px);
}

.nav-container {
  max-width: 1180px;
  margin: auto;
  padding: 22px 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.25em;
}

.nav-links {
  display: flex;
  gap: 25px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links a:hover {
  color: var(--rose);
}

.menu-toggle {
  display: none;
  border: 0;
  background: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

/* COMMON */

.section {
  max-width: 1180px;
  margin: auto;
  padding: 105px 7vw;
  border-top: 1px solid var(--line);
}

.section-heading {
  margin-bottom: 55px;
  text-align: center;
}

.eyebrow {
  margin: 0;
  color: var(--rose);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-heading h2,
.personal-section h2,
.location-content h2 {
  margin: 13px 0 0;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 6vw, 5rem);
  font-weight: 500;
  line-height: 1;
}

.outline-button,
.dark-button {
  display: inline-block;
  padding: 13px 22px;
  border: 1px solid var(--ink);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.25s ease;
}

.outline-button:hover {
  background: var(--ink);
  color: white;
}

.dark-button {
  background: var(--ink);
  color: white;
}

.dark-button:hover {
  background: var(--rose);
  border-color: var(--rose);
}

/* HERO */

.hero {
  min-height: 720px;
  padding: 100px 7vw;
  display: grid;
  place-items: center;
  text-align: center;
}

.hero-content {
  max-width: 820px;
}

.hero-title {
  margin: 26px 0 0;
  font-family: var(--serif);
  font-size: clamp(4.5rem, 13vw, 9rem);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 0.82;
}

.hero-title span {
  display: block;
  margin-top: 20px;
  font-size: 0.4em;
  font-style: italic;
  letter-spacing: 0;
}

.hero-line {
  width: 70px;
  height: 1px;
  margin: 28px auto;
  background: var(--ink);
}

.hero-date {
  font-family: var(--serif);
  font-size: 1.6rem;
}

.hero-welcome {
  max-width: 520px;
  margin: 24px auto 30px;
  color: var(--muted);
}

/* PERSONAL */

.personal-section {
  text-align: center;
}

.section-narrow {
  max-width: 700px;
  margin: auto;
}

.personal-section h2 span {
  color: var(--rose);
}

.personal-text {
  max-width: 570px;
  margin: 25px auto;
  color: var(--muted);
}

.invitation-info {
  max-width: 570px;
  margin: 35px auto 0;
  border-top: 1px solid var(--ink);
  text-align: left;
}

.invitation-info p {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.invitation-info span {
  color: var(--muted);
}

.guest-list {
  margin-top: 28px;
  text-align: left;
}

.authorized-guest,
.rsvp-guest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.authorized-guest span,
.authorized-guest small,
.rsvp-guest-info small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.authorized-guest small {
  color: var(--rose);
}

/* DARK SECTION */

.section-dark {
  max-width: none;
  padding-right: max(7vw, calc((100vw - 1040px) / 2));
  padding-left: max(7vw, calc((100vw - 1040px) / 2));
  background: var(--ink);
  color: white;
}

.section-dark .eyebrow {
  color: var(--soft-rose);
}

.details-grid {
  max-width: 1040px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #4f474b;
  border-left: 1px solid #4f474b;
}

.detail-card {
  min-height: 220px;
  padding: 24px;
  border-right: 1px solid #4f474b;
  border-bottom: 1px solid #4f474b;
}

.detail-number {
  color: var(--soft-rose);
  font-family: var(--serif);
  font-size: 2rem;
}

.detail-label {
  margin: 34px 0 8px;
  color: #aaa0a4;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.detail-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
}

/* COUNTDOWN */

.countdown-section {
  max-width: none;
  background: var(--soft-rose);
  text-align: center;
}

.countdown {
  max-width: 650px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.countdown-item {
  border-right: 1px solid rgba(23, 21, 23, 0.25);
}

.countdown-item:last-child {
  border-right: 0;
}

.countdown-item strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 500;
  line-height: 1;
}

.countdown-item span {
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* LOCATION */

.location-section {
  max-width: none;
  background: var(--white);
}

.location-content {
  max-width: 1040px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 45px;
}

.location-address {
  margin: 25px 0;
  color: var(--muted);
}

.location-mark {
  width: 215px;
  height: 215px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--rose);
  font-family: var(--serif);
  font-size: 3.8rem;
  font-style: italic;
}

/* TIMELINE */

.timeline {
  max-width: 820px;
  margin: auto;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 140px;
  width: 1px;
  background: var(--line);
}

.timeline-item {
  min-height: 130px;
  display: grid;
  grid-template-columns: 110px 60px 1fr;
}

.timeline-time {
  padding-top: 4px;
  color: var(--rose);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.timeline-dot {
  width: 13px;
  height: 13px;
  margin: 5px auto 0;
  border: 2px solid var(--rose);
  border-radius: 50%;
  background: var(--paper);
  z-index: 1;
}

.timeline-content {
  padding: 0 0 35px 20px;
}

.timeline-content h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 500;
}

.timeline-content p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* GALLERY */

.gallery-section {
  text-align: center;
}

.gallery-viewer {
  max-width: 600px;
  margin: auto;
  display: grid;
  grid-template-columns: 44px minmax(0, 390px) 44px;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.gallery-image-wrapper {
  width: 100%;
  aspect-ratio: 3 / 4;
  position: relative;
  overflow: hidden;
  background: #e6dbd8;
}

.gallery-image-wrapper img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.2s ease;
}

.gallery-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  font-size: 1.8rem;
  cursor: pointer;
}

.gallery-button:hover {
  background: var(--ink);
  color: white;
}

.gallery-counter {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 8px;
  background: rgba(23, 21, 23, 0.75);
  color: white;
  font-size: 0.65rem;
}

.gallery-thumbnails {
  max-width: 700px;
  margin: 24px auto 0;
  padding: 4px 8px 10px;
  display: flex;
  justify-content: center;
  gap: 9px;
  overflow-x: auto;
}

.gallery-thumbnail {
  flex: 0 0 56px;
  width: 56px;
  height: 75px;
  padding: 3px;
  border: 1px solid transparent;
  background: transparent;
  opacity: 0.5;
  cursor: pointer;
}

.gallery-thumbnail:hover,
.gallery-thumbnail.active {
  border-color: var(--rose);
  opacity: 1;
}

.gallery-thumbnail img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* SPECIALS */

.specials-grid {
  max-width: 1040px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.special-card {
  min-height: 240px;
  padding: 24px;
  border: 1px solid #51494d;
  background: #242022;
}

.special-number {
  color: var(--soft-rose);
  font-family: var(--serif);
  font-size: 2.2rem;
}

.special-card h3 {
  margin: 30px 0 8px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
}

.special-card p {
  color: #b7adb0;
  font-size: 0.83rem;
}

/* GIFTS */

.gifts-section {
  text-align: center;
}

.gifts-content {
  max-width: 620px;
  margin: auto;
}

.gifts-content > p {
  color: var(--muted);
}

.gift-note {
  margin-top: 30px;
  padding: 25px;
  border: 1px solid var(--line);
}

.gift-note span {
  color: var(--rose);
  font-size: 2rem;
}

.gift-note p {
  margin: 8px 0 0;
  font-family: var(--serif);
}

/* RSVP */

.section-pink {
  max-width: none;
  background: var(--soft-rose);
}

.rsvp-wrapper {
  max-width: 650px;
  margin: auto;
}

.rsvp-intro {
  color: var(--muted);
  text-align: center;
}

#rsvpForm {
  margin-top: 28px;
  padding: 30px;
  background: var(--white);
}

.rsvp-list-title {
  color: var(--muted);
  font-size: 0.85rem;
}

.rsvp-guest-row {
  align-items: center;
}

.rsvp-guest-info strong {
  display: block;
}

.guest-attendance {
  min-width: 125px;
  padding: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
}

#rsvpForm label {
  display: block;
  margin: 22px 0 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#message {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  background: var(--paper);
  resize: vertical;
  outline: none;
}

#message:focus {
  border-color: var(--rose);
}

.submit-button {
  margin-top: 22px;
}

.confirmation {
  margin-top: 20px;
  color: var(--rose);
  text-align: center;
}

.qr-section {
  margin-top: 25px;
  padding: 28px;
  background: var(--white);
  text-align: center;
}

.qr-section h3 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
}

.qr-section p {
  color: var(--muted);
  font-size: 0.85rem;
}

#qrcode {
  width: 220px;
  min-height: 220px;
  margin: 20px auto;
  padding: 10px;
  background: white;
}

/* FOOTER */

.site-footer {
  padding: 45px 7vw;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-mark {
  font-family: var(--serif);
  font-size: 3rem;
  font-style: italic;
}

.site-footer p {
  margin: 5px 0;
  font-family: var(--serif);
  font-size: 1.15rem;
}

.site-footer small {
  color: var(--muted);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* MOBILE */

@media (max-width: 700px) {
  .nav-container {
    padding: 18px 6vw;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    width: 100%;
    padding: 20px 6vw;
    flex-direction: column;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    min-height: 630px;
    padding: 80px 6vw;
  }

  .hero-title {
    font-size: clamp(4.2rem, 19vw, 7rem);
  }

  .section {
    padding: 75px 6vw;
  }

  .details-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-card {
    min-height: 185px;
    padding: 18px;
  }

  .detail-card h3 {
    font-size: 1.1rem;
  }

  .location-content {
    display: block;
  }

  .location-mark {
    width: 145px;
    height: 145px;
    margin: 40px auto 0;
    font-size: 2.7rem;
  }

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

  .timeline-item {
    grid-template-columns: 52px 40px 1fr;
  }

  .timeline-time {
    font-size: 0.58rem;
  }

  .timeline-content {
    padding-left: 8px;
  }

  .timeline-content h3 {
    font-size: 1.22rem;
  }

  .gallery-viewer {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 8px;
  }

  .gallery-button {
    width: 34px;
    height: 34px;
    font-size: 1.4rem;
  }

  .gallery-thumbnails {
    justify-content: flex-start;
  }

  .gallery-thumbnail {
    flex-basis: 53px;
    width: 53px;
    height: 71px;
  }

  .specials-grid {
    grid-template-columns: 1fr 1fr;
  }

  .special-card {
    min-height: 220px;
    padding: 18px;
  }

  .special-card h3 {
    margin-top: 23px;
    font-size: 1.1rem;
  }

  #rsvpForm {
    padding: 21px;
  }

  .invitation-info p {
    display: block;
  }

  .invitation-info strong {
    display: block;
    margin-top: 4px;
  }

  .rsvp-guest-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .guest-attendance {
    width: 100%;
  }
}

/* Remove the extra decorative 18s */
.hero-decoration {
  display: none !important;
}

/* Fix countdown layout */
.countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 4vw, 42px);
  max-width: 760px;
  margin: 45px auto 0;
}

.countdown-item {
  min-width: 95px;
  border-right: 0 !important;
  text-align: center;
}

.countdown-item strong {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

.countdown-divider {
  display: block !important;
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--ink);
}

/* Make the mobile countdown fit properly */
@media (max-width: 700px) {
  .countdown {
    gap: 7px;
    width: 100%;
  }

  .countdown-item {
    min-width: 0;
    flex: 1;
  }

  .countdown-item strong {
    font-size: 2rem;
  }

  .countdown-item span {
    font-size: 0.52rem;
  }

  .countdown-divider {
    font-size: 1.2rem;
  }
}

.rsvp-list-title {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 0.85rem;
}

.rsvp-guest-row {
  display: block;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.rsvp-guest-info strong {
  display: block;
  font-size: 1.05rem;
}

.rsvp-guest-info small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.8rem;
}

.attendance-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 15px;
}

.attendance-option {
  position: relative;
  margin: 0 !important;
  cursor: pointer;
}

.attendance-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.attendance-option span {
  display: block;
  padding: 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  transition: 0.2s ease;
}

.attendance-option span:hover {
  border-color: var(--rose);
  color: var(--rose);
}

.attendance-option input:checked + span {
  border-color: var(--rose);
  background: var(--rose);
  color: white;
}

@media (max-width: 600px) {
  .attendance-options {
    grid-template-columns: 1fr;
  }
}

.special-guidelines {
  margin-top: 55px;
  text-align: left;
}

.special-guidelines-heading {
  margin-bottom: 20px;
}

.special-guidelines-heading h3 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
}

.guidelines-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}

.guideline-card {
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--white);
}

.guideline-card h3 {
  margin: 0 0 15px;
  color: var(--rose);
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
}

.guideline-card ul {
  margin: 0;
  padding-left: 20px;
}

.guideline-card li {
  margin: 8px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 700px) {
  .guidelines-grid {
    grid-template-columns: 1fr;
  }
}