:root {
  --stone: #EDE8E0;
  --ink: #22262E;
  --lilac: #C9B8D8;
  --brass: #A98B57;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--stone);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Nav */
.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  position: relative;
}
.site-nav .mark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
}
.site-nav .links { display: flex; gap: 36px; }
.site-nav a {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.7;
}
.site-nav a:hover { opacity: 1; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--ink);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 82vh;
}
.hero-image {
  background-size: cover;
  background-position: center;
}
.hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 64px;
}
.hero-note {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 20px;
}
.hero-text h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(44px, 6vw, 84px);
  line-height: 0.98;
}
.hero-text h1 .amp {
  display: block;
  font-style: italic;
  font-weight: 400;
  color: var(--lilac);
  font-size: 0.6em;
  margin: 6px 0;
}
.hero-text .meta {
  margin-top: 28px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  line-height: 1.9;
  opacity: 0.75;
}
.countdown { display: flex; gap: 32px; margin-top: 40px; }
.countdown div { text-align: left; }
.countdown .num {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 32px;
}
.countdown .label {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-top: 4px;
}

/* Enter gate */
.enter-form {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 44px;
}
.enter-form input[type="password"] {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(34, 38, 46, 0.3);
  padding: 12px 4px;
  width: 160px;
}
.enter-form input[type="password"]:focus-visible {
  outline: none;
  border-bottom-color: var(--ink);
}
.enter-btn {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--brass);
  padding: 14px 34px;
  cursor: pointer;
}
.enter-btn:hover { background: var(--brass); color: var(--stone); }
.enter-error {
  flex-basis: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #a33b3b;
}

.pre-enter .enter-form { display: flex; }
.pre-enter .hero { min-height: 100vh; }
.pre-enter .site-nav .links,
.pre-enter .nav-toggle,
.pre-enter .site-content,
.pre-enter .site-footer {
  display: none;
}

/* Motif divider */
.motif {
  display: flex;
  justify-content: center;
  padding: 44px 0;
}
.motif svg { width: 220px; height: auto; }

/* Section shell */
.section { padding: 90px 24px; }
.section-inner { max-width: 640px; margin: 0 auto; }
.section-inner--wide { max-width: 960px; }
.section .eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 14px;
  text-align: center;
}
.section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 38px;
  text-align: center;
}
.section .rule {
  width: 28px;
  height: 2px;
  background: var(--lilac);
  margin: 22px auto 36px;
}
.section p {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.85;
  color: rgba(34,38,46,0.75);
}
.section .subhead {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 22px;
  margin-top: 40px;
  margin-bottom: 10px;
}
.section .subhead:first-of-type { margin-top: 0; }

/* Schedule */
.event { margin-bottom: 40px; }
.event:last-child { margin-bottom: 0; }
.event-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.event-heading h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 26px;
}
.event-dress {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  white-space: nowrap;
}
.event-meta {
  font-size: 13px;
  letter-spacing: 0.04em;
  opacity: 0.7;
  margin: 8px 0 12px;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.gallery-item {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}
.gallery-item:first-child { grid-row: span 2; }
.gallery-item:first-child img {
  aspect-ratio: 4 / 6.2;
}
.gallery-item:hover img { opacity: 0.85; }
.gallery-item:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(34, 38, 46, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.lightbox[hidden] { display: none; }
.lightbox-image {
  max-width: 88vw;
  max-height: 86vh;
  object-fit: contain;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: none;
  border: none;
  color: var(--stone);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  line-height: 1;
}
.lightbox-close {
  top: 24px;
  right: 28px;
  font-size: 32px;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  font-size: 28px;
  padding: 12px;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-close:hover,
.lightbox-nav:hover { opacity: 0.7; }
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 2px solid var(--stone);
  outline-offset: 2px;
}

/* Travel */
.hotel-list, .plain-list {
  list-style: none;
  margin: 18px 0 0;
}
.hotel-list li, .plain-list li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(34,38,46,0.12);
  font-size: 15px;
  line-height: 1.7;
}
.hotel-list li:first-child, .plain-list li:first-child { padding-top: 0; }
.hotel-name { font-weight: 500; margin-right: 10px; }
.hotel-link {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brass);
  text-decoration: none;
  border-bottom: 1px solid var(--brass);
  padding-bottom: 2px;
}
.hotel-link:hover { opacity: 0.75; }
.hotel-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.plain-list li { border-bottom: none; padding: 8px 0; }

/* FAQ */
.faq-list { margin-top: 8px; }
.faq-item {
  border-bottom: 1px solid rgba(34,38,46,0.12);
  padding: 18px 0;
}
.faq-item summary {
  font-family: 'Cormorant Garamond', serif;
  font-size: 19px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  float: right;
  font-family: 'Inter', sans-serif;
  color: var(--brass);
}
.faq-item[open] summary::after { content: '–'; }
.faq-item p { margin-top: 12px; font-size: 15px; }

/* Standalone pages (RSVP / Registry) */
.standalone { min-height: 60vh; display: flex; align-items: center; }
.standalone .section-inner { text-align: center; }
.cta-wrap { margin-top: 28px; }
.btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--stone);
  background: var(--brass);
  text-decoration: none;
  padding: 16px 38px;
}
.btn:hover { opacity: 0.88; }
.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.standalone .motif { padding-top: 44px; padding-bottom: 0; }

/* Footer */
.site-footer {
  text-align: center;
  padding-bottom: 60px;
}
.footer-note {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  opacity: 0.55;
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .site-nav a { transition: opacity 0.2s ease; }
  .enter-btn, .btn { transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease; }
  .gallery-item img { transition: opacity 0.2s ease; }
  .lightbox-close, .lightbox-nav { transition: opacity 0.2s ease; }
  .hotel-link { transition: opacity 0.2s ease; }
  .enter-form.shake { animation: shake 0.3s ease; }
}
@keyframes shake {
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Responsive */
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
  .hero-image { min-height: 46vh; order: -1; }
  .hero-text { padding: 48px 28px; }

  .site-nav { padding: 20px 24px; }
  .nav-toggle { display: flex; }
  .site-nav .links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--stone);
    border-top: 1px solid rgba(34,38,46,0.1);
  }
  .site-nav .links.open { display: flex; }
  .site-nav .links a { padding: 16px 24px; border-bottom: 1px solid rgba(34,38,46,0.08); }

  .section { padding: 64px 20px; }

  .lightbox-close { top: 16px; right: 16px; font-size: 28px; }
  .lightbox-nav { font-size: 22px; padding: 8px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

@media (max-width: 520px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .countdown { gap: 20px; }
}
