:root {
  --bg: #f7f2eb;
  --surface: rgba(255, 252, 247, 0.8);
  --surface-strong: #fffaf3;
  --text: #2d241f;
  --muted: #675951;
  --line: rgba(82, 60, 45, 0.12);
  --accent: #b75d4b;
  --accent-dark: #914736;
  --accent-soft: #ead4ca;
  --shadow: 0 18px 50px rgba(81, 53, 40, 0.12);
  --max-width: 1100px;
  --hero-image: url("/images/hero-background.jpg");
}

html[data-theme="dark"] {
  --bg: #151210;
  --surface: rgba(33, 28, 24, 0.82);
  --surface-strong: #211c18;
  --text: #f4ede3;
  --muted: #cfbfb2;
  --line: rgba(245, 233, 222, 0.12);
  --accent: #cf735f;
  --accent-dark: #e18a77;
  --accent-soft: #3b2c25;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(183, 93, 75, 0.15), transparent 28%),
    radial-gradient(circle at top right, rgba(203, 171, 132, 0.18), transparent 24%),
    linear-gradient(180deg, #fbf7f1 0%, var(--bg) 100%);
  line-height: 1.6;
  transition: background-color 180ms ease, color 180ms ease;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(207, 115, 95, 0.18), transparent 28%),
    radial-gradient(circle at top right, rgba(172, 148, 110, 0.14), transparent 24%),
    linear-gradient(180deg, #191411 0%, var(--bg) 100%);
}

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

img {
  max-width: 100%;
}

.hero {
  min-height: 100vh;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.hero-with-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(28, 20, 16, 0.4) 0%, rgba(28, 20, 16, 0.22) 18%, rgba(28, 20, 16, 0.12) 34%, rgba(247, 242, 235, 0.55) 72%, rgba(247, 242, 235, 0.96) 100%),
    var(--hero-image) center 34% / cover no-repeat;
  transform: scale(1.02);
  z-index: 0;
}

html[data-theme="dark"] .hero-with-image::before {
  background:
    linear-gradient(180deg, rgba(10, 9, 8, 0.52) 0%, rgba(10, 9, 8, 0.28) 18%, rgba(10, 9, 8, 0.18) 36%, rgba(21, 18, 16, 0.5) 74%, rgba(21, 18, 16, 0.96) 100%),
    var(--hero-image) center 34% / cover no-repeat;
}

.hero-with-image::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  background: linear-gradient(180deg, rgba(247, 242, 235, 0) 0%, var(--bg) 100%);
  z-index: 0;
}

.site-nav,
.hero-content,
.section,
.site-footer {
  width: min(100%, var(--max-width));
  margin: 0 auto;
}

.site-nav,
.hero-content {
  position: relative;
  z-index: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand,
h1,
h2,
h3,
summary {
  font-family: "Cormorant Garamond", serif;
}

.brand {
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fffaf3;
  text-shadow: 0 2px 16px rgba(28, 20, 16, 0.45);
}

.nav-actions,
.guest-page-tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-link-utilities {
  display: none;
}

.nav-utility {
  border: 1px solid rgba(255, 250, 243, 0.24);
  background: rgba(44, 31, 24, 0.2);
  color: #fffaf3;
  border-radius: 999px;
  padding: 0.72rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.nav-utility:hover,
.nav-utility:focus-visible {
  transform: translateY(-1px);
  background: rgba(44, 31, 24, 0.34);
}

@media (min-width: 721px) {
  .nav-actions {
    order: 3;
    margin-left: 1rem;
    gap: 0.45rem;
  }

  .nav-links {
    order: 2;
    margin-left: auto;
    gap: 1rem;
  }

  .nav-utility {
    padding: 0.18rem 0.25rem;
    font-size: 0.84rem;
    font-weight: 600;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 250, 243, 0.82);
    text-decoration: underline;
    text-underline-offset: 0.18em;
    backdrop-filter: none;
  }

  .nav-utility:hover,
  .nav-utility:focus-visible {
    background: transparent;
    color: #fffaf3;
  }
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.8rem 1rem;
  font: inherit;
}

.nav-links {
  display: flex;
  gap: 1.2rem;
  font-size: 0.95rem;
}

.nav-links a {
  color: #fffaf3;
  opacity: 0.92;
  text-shadow: 0 2px 14px rgba(28, 20, 16, 0.42);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  opacity: 1;
}

.hero-content {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem 0 9rem;
  transform: translateY(-10rem);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.8rem;
  text-shadow: none;
}

.hero .eyebrow {
  color: rgba(255, 250, 243, 0.96);
  text-shadow: 0 3px 16px rgba(28, 20, 16, 0.48);
}

h1 {
  font-size: clamp(4rem, 12vw, 7rem);
  line-height: 0.9;
  margin: 0;
  font-weight: 600;
  color: #fffaf3;
  text-shadow: 0 10px 30px rgba(28, 20, 16, 0.35);
}

.hero-copy {
  margin: 1.25rem 0 0;
  font-size: 1.1rem;
  color: rgba(255, 250, 243, 0.98);
  font-weight: 600;
  text-shadow: 0 6px 20px rgba(28, 20, 16, 0.5);
}

.hero-actions,
.registry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.35rem;
}

.contact-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  text-align: center;
}

.contact-label {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.contact-link {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 5vw, 2.8rem);
  color: var(--accent-dark);
}

.guest-page-tools {
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.hero-actions {
  transform: translateY(-1rem);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  font-weight: 700;
  font: inherit;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease;
}

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

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent-dark);
}

.button-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
}

html[data-theme="dark"] .button-secondary {
  background: rgba(34, 29, 25, 0.88);
}

.section {
  padding: 5rem 1.5rem;
}

.section-heading {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2.5rem;
}

.section-copy {
  color: var(--muted);
}

h2 {
  font-size: clamp(2.4rem, 5vw, 3.7rem);
  line-height: 0.95;
  margin: 0;
  font-weight: 600;
}

h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.9rem;
  font-weight: 600;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card,
.rsvp-form,
.faq-item,
.timeline-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.card {
  padding: 2rem;
}

.card-actions {
  margin-top: 1.35rem;
}

.accent-section {
  background: linear-gradient(180deg, rgba(234, 212, 202, 0.35), rgba(255, 255, 255, 0));
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  padding: 1.4rem;
  align-items: start;
}

.timeline-item span {
  font-weight: 700;
  color: var(--accent-dark);
}

.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-item {
  padding: 1.2rem 1.4rem;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-size: 1.6rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.rsvp-section {
  padding-bottom: 2rem;
}

.rsvp-deadline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 1rem auto 0;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: rgba(183, 93, 75, 0.1);
  color: var(--accent-dark);
  font-weight: 700;
}

.rsvp-form {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  gap: 1rem;
}

.rsvp-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(76, 57, 47, 0.16);
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  outline: 2px solid rgba(183, 93, 75, 0.22);
  border-color: var(--accent);
}

.form-note,
.form-status,
.site-footer {
  color: var(--muted);
}

.rsvp-help {
  margin: -0.15rem 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.rsvp-success-card {
  max-width: 760px;
  margin: 1.25rem auto 0;
  padding: 1.6rem 1.75rem;
  background: rgba(255, 250, 243, 0.92);
  border: 1px solid rgba(76, 57, 47, 0.14);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.rsvp-success-card h3 {
  margin-bottom: 0.35rem;
}

.rsvp-success-card p:last-child {
  margin-bottom: 0;
}

.map-chooser-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(45, 36, 31, 0.36);
  display: grid;
  place-items: center;
  padding: 1.5rem;
  z-index: 1000;
}

.map-chooser-dialog {
  width: min(100%, 460px);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 2rem;
  text-align: center;
}

.map-chooser-dialog h2 {
  margin-bottom: 0.5rem;
}

.map-chooser-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin: 1.4rem 0 1rem;
}

.form-status {
  min-height: 1.5rem;
  margin: 0;
  font-weight: 600;
}

.website-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

.form-status.is-error {
  color: #a22c2c;
}

.form-status.is-success {
  color: #2e6a43;
}

.site-footer {
  text-align: center;
  padding: 2rem 1.5rem 3rem;
}

.hidden {
  display: none !important;
}

.admin-body {
  min-height: 100vh;
  padding: 1.5rem;
}

.admin-shell {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 3rem 0;
}

.admin-auth-card,
.admin-stat-card,
.admin-toolbar,
.admin-table-wrap,
.admin-editor,
.admin-reminder-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.admin-auth-card,
.admin-toolbar,
.admin-table-wrap,
.admin-editor,
.admin-reminder-card {
  padding: 2rem;
}

.admin-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 0.95;
  color: var(--text);
  text-shadow: none;
}

.admin-copy {
  max-width: 760px;
  color: var(--muted);
}

.admin-body .eyebrow {
  color: var(--muted);
  text-shadow: none;
}

.admin-login-form {
  display: grid;
  gap: 1rem;
  max-width: 420px;
}

.admin-login-form label,
.sort-controls label {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
}

.admin-login-form input,
.sort-controls select,
.sort-controls input {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(76, 57, 47, 0.16);
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
}

.admin-dashboard {
  display: grid;
  gap: 1.5rem;
}

.admin-reminder-card.is-warning {
  border-color: rgba(183, 93, 75, 0.36);
  box-shadow: 0 18px 50px rgba(183, 93, 75, 0.12);
}

.admin-reminder-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1;
}

.admin-reminder-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.admin-editor-head,
.admin-topbar,
.admin-toolbar,
.sort-controls,
.export-controls {
  display: flex;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
}

.sort-controls {
  align-items: end;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.admin-stat-card {
  padding: 1.5rem;
}

.admin-stat-label,
.admin-stat-meta {
  margin: 0;
  color: var(--muted);
}

.admin-stat-value {
  margin: 0.25rem 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 0.95rem 0.8rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.admin-table th {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.admin-row-actions,
.admin-editor-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-link-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(45, 36, 31, 0.36);
  display: grid;
  place-items: center;
  padding: 1.5rem;
  z-index: 1000;
}

.admin-link-dialog {
  width: min(100%, 640px);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 2rem;
}

.admin-link-output {
  width: 100%;
  min-height: 110px;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(76, 57, 47, 0.16);
  background: #fffdf9;
  color: var(--text);
  font: inherit;
  resize: vertical;
  margin: 1rem 0 1.25rem;
}

.button-small {
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
}

.admin-editor-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1;
}

.admin-editor-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.admin-editor-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 600;
}

.admin-editor-form input,
.admin-editor-form select,
.admin-editor-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(76, 57, 47, 0.16);
  background: var(--surface-strong);
  color: var(--text);
  font: inherit;
}

.admin-editor-wide {
  grid-column: 1 / -1;
}

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

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

@media (max-width: 840px) {
  .two-up,
  .three-up,
  .timeline-item,
  .admin-summary-grid,
  .admin-editor-form {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }
}

@media (min-width: 721px) and (max-width: 1024px) {
  .hero {
    min-height: 100svh;
    padding: 1.25rem;
    justify-content: flex-start;
  }

  .hero-with-image::before {
    background:
      linear-gradient(180deg, rgba(28, 20, 16, 0.42) 0%, rgba(28, 20, 16, 0.24) 18%, rgba(28, 20, 16, 0.12) 34%, rgba(247, 242, 235, 0.56) 72%, rgba(247, 242, 235, 0.96) 100%),
      var(--hero-image) center 12% / cover no-repeat;
  }

  .hero-with-image::after {
    height: 92px;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 5rem 0 0;
    transform: none;
  }

  h1 {
    font-size: clamp(3.8rem, 10vw, 5.8rem);
  }

  .hero-copy {
    max-width: 28ch;
    margin-top: 0.95rem;
    font-size: 1.02rem;
    line-height: 1.35;
  }

  .hero-actions {
    margin-top: 1.15rem;
    transform: none;
  }
}

@media (max-width: 720px) {
  .site-nav {
    align-items: flex-start;
    flex-wrap: wrap;
    position: relative;
    z-index: 6;
  }

  .nav-actions {
    display: none;
  }

  .hero {
    min-height: 100svh;
    padding: 1rem;
    justify-content: flex-start;
  }

  .hero-with-image::before {
    background:
      linear-gradient(180deg, rgba(28, 20, 16, 0.5) 0%, rgba(28, 20, 16, 0.28) 18%, rgba(28, 20, 16, 0.14) 36%, rgba(247, 242, 235, 0.6) 74%, rgba(247, 242, 235, 0.96) 100%),
      var(--hero-image) 56% 0% / cover no-repeat;
  }

  .hero-with-image::after {
    height: 96px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    order: 2;
    border-color: rgba(255, 250, 243, 0.28);
    background: rgba(44, 31, 24, 0.26);
    color: #fffaf3;
    backdrop-filter: blur(10px);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 3.4rem);
    right: 0;
    left: 0;
    width: 100%;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.5rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 250, 243, 0.2);
    background: rgba(44, 31, 24, 0.72);
    box-shadow: 0 18px 40px rgba(28, 20, 16, 0.22);
    backdrop-filter: blur(16px);
    z-index: 7;
  }

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

  .nav-links a {
    display: block;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    color: #fffaf3;
    background: rgba(255, 250, 243, 0.05);
  }

  .nav-links a:hover,
  .nav-links a:focus-visible {
    background: rgba(255, 250, 243, 0.12);
  }

  .nav-link-utilities {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    padding: 0.35rem 0.15rem 0.15rem;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 4.5rem 0 0;
    transform: none;
    z-index: 1;
  }

  .section {
    padding: 4rem 1.1rem;
  }

  h1 {
    font-size: clamp(2.8rem, 13vw, 4.2rem);
    line-height: 0.92;
  }

  .eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.18em;
  }

  .hero-copy {
    max-width: 22ch;
    margin-top: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.3;
  }

  .hero-actions {
    width: auto;
    flex-direction: row;
    gap: 0.75rem;
    margin-top: 1rem;
    transform: none;
  }

  .hero-actions .button {
    min-width: 140px;
    padding: 0.85rem 1rem;
  }

  .nav-utility {
    width: 100%;
    justify-content: center;
    padding: 0.62rem 0.88rem;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 250, 243, 0.24);
    border-radius: 999px;
    background: rgba(44, 31, 24, 0.2);
    color: #fffaf3;
    text-decoration: none;
    text-underline-offset: 0;
    backdrop-filter: blur(12px);
  }

  .nav-utility:hover,
  .nav-utility:focus-visible {
    background: rgba(44, 31, 24, 0.34);
    color: #fffaf3;
  }

  h3,
  .faq-item summary {
    font-size: 1.5rem;
  }

  .rsvp-form,
  .card,
  .timeline-item,
  .faq-item,
  .admin-auth-card,
  .admin-toolbar,
  .admin-table-wrap,
  .admin-stat-card,
  .admin-editor {
    border-radius: 22px;
  }

  .admin-shell {
    padding: 1.5rem 0;
  }

  .admin-table-wrap {
    overflow-x: auto;
  }

  .guest-page-tools {
    justify-content: center;
  }
}
