:root {
  --bg: #f7f2ea;
  --paper: rgba(255, 255, 255, 0.78);
  --paper-strong: rgba(255, 255, 255, 0.92);
  --text: #2f261d;
  --muted: #7a6d61;
  --line: rgba(68, 50, 34, 0.12);
  --accent: #b08b68;
  --accent-soft: #e8ddd1;
  --shadow: 0 24px 60px rgba(59, 43, 29, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.85), transparent 42%),
    linear-gradient(180deg, #efe4d8 0%, var(--bg) 30%, #f8f4ee 100%);
}

body.is-locked {
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.08), rgba(255,255,255,0.08));
  opacity: 0.55;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.password-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(247, 242, 234, 0.9);
  backdrop-filter: blur(14px);
}

.password-overlay.hidden {
  display: none;
}

.password-card {
  width: min(100%, 520px);
  padding: 36px 28px;
  border-radius: 32px;
  text-align: center;
  background: var(--paper-strong);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: var(--shadow);
}

.password-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  text-align: left;
}

.top-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.top-nav a,
.text-link {
  color: var(--muted);
  text-decoration: none;
}

.top-nav a:hover,
.text-link:hover {
  color: var(--text);
}

.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-card,
.card {
  backdrop-filter: blur(14px);
  background: var(--paper);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: var(--shadow);
}

.hero-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 48px;
  text-align: center;
  border-radius: 32px;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.74rem;
  color: var(--muted);
}

h1,
h2,
h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  margin: 0;
}

h1 {
  font-size: clamp(3.2rem, 8vw, 6rem);
  line-height: 0.95;
}

h1 span {
  font-style: italic;
  font-size: 0.8em;
}

.hero-copy,
.section-heading p,
.card p,
li,
label,
input,
select,
textarea,
button {
  font-size: 1rem;
  line-height: 1.75;
}

.hero-copy {
  max-width: 540px;
  margin: 24px auto 0;
  color: var(--muted);
}

.hero-meta {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.hero-meta div {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.58);
  border: 1px solid var(--line);
}

.hero-meta span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.hero-meta strong {
  font-size: 1.05rem;
  font-weight: 600;
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: white;
  background: linear-gradient(135deg, #b8926c, #9d7551);
  box-shadow: 0 14px 28px rgba(157, 117, 81, 0.24);
}

.button.secondary {
  color: var(--text);
  background: rgba(255,255,255,0.6);
  border-color: var(--line);
}

.section {
  padding: 48px 0;
}

.section-heading {
  max-width: 720px;
  margin: 0 auto 28px;
  text-align: center;
}

.section-heading.left {
  margin-inline: 0;
  text-align: left;
}

.section-heading h2 {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
}

.text-card,
.note-card,
.location-card,
.details-card,
.rsvp-form,
.gallery-upload-card {
  border-radius: 28px;
  padding: 30px;
}

.text-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--paper-strong);
}

.two-column {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  align-items: start;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255,255,255,0.62);
}

.timeline-item.muted {
  opacity: 0.85;
}

.time {
  font-weight: 600;
  color: var(--accent);
}

.note-card,
.location-card,
.details-card,
.rsvp-form,
.gallery-upload-card {
  background: var(--paper-strong);
}

ul {
  margin: 16px 0 0;
  padding-left: 18px;
}

.rsvp-form {
  max-width: 920px;
  margin: 0 auto;
}

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

label {
  display: grid;
  gap: 8px;
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  background: rgba(255,255,255,0.8);
}

button:disabled,
input:disabled {
  opacity: 0.7;
  cursor: wait;
}

textarea {
  resize: vertical;
  margin-top: 18px;
}

.form-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.form-status {
  min-height: 28px;
  margin: 14px 0 0;
  color: var(--muted);
}

.form-status.success {
  color: #2f6a43;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(89, 149, 107, 0.12);
  border: 1px solid rgba(89, 149, 107, 0.18);
}

.form-status.error {
  color: #9d3c34;
}

.gallery-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.gallery-copy {
  color: var(--muted);
  margin: 8px 0 18px;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.gallery-count {
  margin: 0;
  color: var(--muted);
}

.gallery-setup-hint,
.gallery-empty {
  border-radius: 22px;
  border: 1px dashed rgba(176, 139, 104, 0.45);
  background: linear-gradient(180deg, rgba(255,255,255,0.68), rgba(232, 221, 209, 0.48));
  color: var(--muted);
}

.gallery-setup-hint {
  margin-top: 16px;
  padding: 16px 18px;
}

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

.gallery-empty {
  grid-column: 1 / -1;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
}

.gallery-item {
  margin: 0;
  overflow: hidden;
  border-radius: 26px;
  background: rgba(255,255,255,0.76);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: var(--shadow);
}

.gallery-item a {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item a:hover img {
  transform: scale(1.04);
}

.gallery-item figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 16px;
  color: var(--muted);
}

.gallery-item span {
  color: var(--text);
  font-weight: 500;
}

.gallery-item small {
  white-space: nowrap;
}

.footer {
  text-align: center;
  color: var(--muted);
  padding-top: 20px;
}

code {
  background: rgba(255,255,255,0.72);
  padding: 2px 8px;
  border-radius: 999px;
}

@media (max-width: 900px) {
  .hero-card {
    padding: 56px 24px;
  }

  .two-column,
  .form-grid,
  .hero-meta,
  .gallery-layout,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
  }

  .top-nav {
    gap: 12px 18px;
    font-size: 0.88rem;
  }

  .section {
    padding: 36px 0;
  }

  .text-card,
  .note-card,
  .location-card,
  .details-card,
  .rsvp-form,
  .gallery-upload-card {
    padding: 22px;
    border-radius: 22px;
  }

  .gallery-toolbar,
  .gallery-item figcaption {
    flex-direction: column;
    align-items: flex-start;
  }
}
