:root {
  --paper: #f9f4ec;
  --paper-deep: #efe3d1;
  --ink: #241f1b;
  --muted: #6e6258;
  --sage: #637565;
  --sage-dark: #314338;
  --burgundy: #7d263a;
  --gold: #b58a4b;
  --graphite: #2f3430;
  --brown: #604334;
  --deep-green: #223d32;
  --line: rgba(36, 31, 27, 0.15);
  --white: #fffaf3;
  --shadow: 0 18px 50px rgba(36, 31, 27, 0.14);
  --radius: 8px;
  --topbar-space: 96px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-space) + env(safe-area-inset-top, 0px));
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

body::selection {
  background: rgba(125, 38, 58, 0.22);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: fixed;
  z-index: 10;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 50%;
  display: flex;
  width: min(1120px, calc(100% - 32px));
  align-items: center;
  justify-content: space-between;
  transform: translate3d(-50%, 0, 0);
  border: 1px solid rgba(255, 250, 243, 0.26);
  border-radius: var(--radius);
  background: rgba(36, 31, 27, 0.34);
  color: var(--white);
  padding: 10px 14px;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.nav {
  display: flex;
  gap: 18px;
  font-size: 0.9rem;
}

.nav a {
  opacity: 0.82;
}

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

.music-toggle {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 250, 243, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 250, 243, 0.08);
  color: inherit;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 7px 10px;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.music-toggle:hover,
.music-toggle:focus-visible,
.music-toggle.is-playing {
  border-color: rgba(255, 250, 243, 0.42);
  background: rgba(255, 250, 243, 0.16);
}

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

.hero {
  position: relative;
  display: grid;
  min-height: 92svh;
  align-items: center;
  overflow: hidden;
  padding: 104px max(24px, calc((100vw - 1120px) / 2)) 72px;
  color: var(--white);
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 0%;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(18, 17, 16, 0.82) 0%, rgba(18, 17, 16, 0.58) 38%, rgba(18, 17, 16, 0.2) 72%),
    linear-gradient(180deg, rgba(18, 17, 16, 0.18), rgba(18, 17, 16, 0.62));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1,
.section h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  line-height: 1.04;
}

.hero h1 {
  font-size: 4.8rem;
}

.hero-lead {
  max-width: 560px;
  margin: 22px 0 0;
  color: rgba(255, 250, 243, 0.88);
  font-size: 1.18rem;
}

.countdown {
  display: grid;
  width: min(560px, 100%);
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 34px 0 0;
}

.countdown-cell {
  min-width: 0;
  border: 1px solid rgba(255, 250, 243, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 250, 243, 0.1);
  padding: 14px 12px;
  text-align: center;
  backdrop-filter: blur(12px);
}

.countdown-cell strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}

.countdown-cell span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 250, 243, 0.78);
  font-size: 0.78rem;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 700;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

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

.button-primary {
  background: var(--burgundy);
  color: var(--white);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: #691e30;
}

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

.button-ghost {
  border-color: rgba(255, 250, 243, 0.34);
  background: rgba(255, 250, 243, 0.08);
  color: inherit;
}

.scroll-cue {
  position: absolute;
  right: max(24px, calc((100vw - 1120px) / 2));
  bottom: 24px;
  color: rgba(255, 250, 243, 0.78);
  font-size: 0.9rem;
}

.section {
  padding: 86px max(24px, calc((100vw - 1120px) / 2));
  scroll-margin-top: calc(var(--topbar-space) + env(safe-area-inset-top, 0px));
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.65fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 40px;
}

.section-heading.compact {
  grid-template-columns: 1fr;
  max-width: 660px;
}

.section h2 {
  font-size: 3rem;
}

.section-heading p,
.intro-copy p,
.detail-card p,
.wish-card p,
.dress-slide-copy p,
.dress-code-group p,
.outfit-figure figcaption,
.timeline-item p,
.rsvp-section > .section-heading p,
.dress-carousel-header h2 {
  color: var(--muted);
}

.intro-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 34px;
  font-size: 1.05rem;
}

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

.detail-card,
.wish-card,
.timeline-item,
.rsvp-form,
.response-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 243, 0.74);
  box-shadow: var(--shadow);
}

.detail-card {
  padding: 22px;
}

.wishes-section {
  background: var(--white);
}

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

.wish-card {
  padding: 24px;
}

.wish-card p {
  margin: 0;
  font-size: 1.03rem;
}

.detail-label {
  display: block;
  margin-bottom: 18px;
  color: var(--burgundy);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-card strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  line-height: 1.08;
}

.palette-section {
  background: #3a3a3a;
  color: var(--ink);
}

.dress-carousel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 250, 243, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 250, 243, 0.96), rgba(239, 227, 209, 0.94));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
  padding: 34px;
}

.dress-carousel::before {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(96, 67, 52, 0.24);
  border-radius: calc(var(--radius) + 2px);
  content: "";
  pointer-events: none;
}

.dress-carousel-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
  margin-bottom: 28px;
}

.dress-carousel-header h2 {
  max-width: 760px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.6rem;
  font-weight: 500;
  line-height: 1.08;
}

.dress-controls {
  display: flex;
  gap: 8px;
}

.dress-arrow {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(36, 31, 27, 0.18);
  border-radius: 50%;
  background: var(--white);
  color: var(--brown);
  cursor: pointer;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.dress-arrow:hover,
.dress-arrow:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(96, 67, 52, 0.46);
  background: #fff7ec;
}

.dress-slides {
  position: relative;
  z-index: 1;
}

.dress-slide {
  display: none;
}

.dress-slide.is-active {
  display: grid;
  grid-template-columns: minmax(220px, 0.48fr) minmax(0, 1fr);
  gap: 30px;
  align-items: center;
}

.dress-slide-copy {
  display: grid;
  gap: 12px;
}

.dress-step {
  color: var(--burgundy);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dress-slide-copy h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.08;
}

.dress-slide-copy p {
  max-width: 380px;
  margin: 0;
}

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

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dress-code-group {
  display: grid;
  gap: 12px;
  min-height: 210px;
  align-content: center;
  border: 1px solid rgba(36, 31, 27, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 250, 243, 0.62);
  padding: 22px;
}

.dress-code-group h4 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 500;
}

.dress-code-group p {
  margin: 0;
}

.swatch {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 250, 243, 0.3);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.swatch-ivory {
  background: #f5eee2;
}

.swatch-sage {
  background: #8a9b81;
}

.swatch-graphite {
  background: #303631;
}

.swatch-burgundy {
  background: #7d263a;
}

.swatch-gold {
  background: #c4a05c;
}

.swatch-black {
  background: #12110f;
}

.swatch-deep-green {
  background: var(--deep-green);
}

.swatch-brown {
  background: var(--brown);
}

.swatch-white {
  background: #fffaf3;
  border-color: rgba(36, 31, 27, 0.22);
}

.outfit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: end;
}

.outfit-figure {
  display: grid;
  gap: 10px;
  justify-items: center;
  margin: 0;
}

.outfit-art {
  width: min(100%, 170px);
  height: 230px;
  overflow: visible;
}

.outfit-figure figcaption {
  min-height: 42px;
  margin: 0;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
}

.outfit-black {
  fill: #151413;
}

.outfit-brown {
  fill: var(--brown);
}

.outfit-green {
  fill: var(--deep-green);
}

.outfit-white {
  fill: #fffaf3;
}

.dress-body,
.dress-sleeve,
.shirt,
.jacket,
.trousers {
  stroke: rgba(36, 31, 27, 0.28);
  stroke-width: 2;
}

.shirt,
.shirt-inset {
  stroke: rgba(36, 31, 27, 0.18);
}

.dress-strap,
.dress-fold,
.dress-belt,
.dress-neck,
.dress-shoulder,
.shirt-line,
.lapel {
  fill: none;
  stroke: rgba(255, 250, 243, 0.34);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.dress-fold.strong,
.dress-belt,
.dress-neck,
.dress-shoulder,
.shirt-line,
.lapel {
  stroke: rgba(36, 31, 27, 0.26);
  stroke-width: 2;
}

.dress-strap {
  stroke: rgba(36, 31, 27, 0.52);
  stroke-width: 2;
}

.dress-dots {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 26px;
}

.dress-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 50%;
  background: rgba(96, 67, 52, 0.28);
  cursor: pointer;
  padding: 0;
}

.dress-dot.is-active {
  background: var(--burgundy);
}

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

.timeline-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 22px;
}

.timeline-item time {
  color: var(--burgundy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.65rem;
}

.timeline-item h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.timeline-item p {
  margin: 0;
}

.rsvp-section {
  background: var(--paper-deep);
}

.rsvp-form {
  display: grid;
  gap: 24px;
  padding: 26px;
}

fieldset {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

legend {
  margin-bottom: 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.choice-grid,
.form-grid,
.alcohol-grid {
  display: grid;
  gap: 14px;
}

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

.choice-card {
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 14px;
  cursor: pointer;
  font-weight: 700;
}

.choice-card:has(input:checked) {
  border-color: var(--burgundy);
  box-shadow: inset 0 0 0 1px var(--burgundy);
}

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

.rsvp-details {
  transition: opacity 180ms ease;
}

.rsvp-details.is-disabled label:has(:disabled) {
  opacity: 0.48;
}

.alcohol-section {
  display: grid;
  gap: 14px;
  transition: opacity 180ms ease;
}

.alcohol-section.is-disabled {
  opacity: 0.48;
}

.alcohol-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.alcohol-option {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 12px 14px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
}

.alcohol-option:has(input:checked) {
  border-color: var(--burgundy);
  box-shadow: inset 0 0 0 1px var(--burgundy);
  color: var(--ink);
}

.alcohol-option input {
  width: auto;
  accent-color: var(--burgundy);
}

.strong-alcohol-note {
  max-width: 560px;
}

.strong-alcohol-note[hidden] {
  display: none;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(36, 31, 27, 0.18);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  padding: 13px 14px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(99, 117, 101, 0.16);
}

.choice-card input {
  width: auto;
  accent-color: var(--burgundy);
}

.full {
  grid-column: 1 / -1;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--sage-dark);
  font-weight: 700;
}

.response-panel {
  margin-top: 18px;
  padding: 22px;
}

.response-panel h3 {
  margin: 0 0 6px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
}

.response-panel pre {
  overflow: auto;
  max-height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 250, 243, 0.78);
  padding: 14px;
  white-space: pre-wrap;
}

.footer {
  padding: 28px 24px 42px;
  background: #3a3a3a;
  color: rgba(255, 250, 243, 0.76);
  text-align: center;
}

@media (max-width: 840px) {
  .nav {
    gap: 10px;
    font-size: 0.82rem;
  }

  .hero {
    min-height: 88svh;
    padding-top: 96px;
  }

  .hero-media {
    object-position: 40% center;
  }

  .hero h1 {
    font-size: 3.2rem;
  }

  .hero-lead {
    font-size: 1.05rem;
  }

  .section,
  .hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-heading,
  .intro-copy,
  .detail-grid,
  .wishes-grid,
  .dress-carousel-header,
  .dress-slide.is-active,
  .dress-palette-grid,
  .alcohol-grid,
  .choice-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .section h2,
  .dress-carousel-header h2 {
    font-size: 2.25rem;
  }

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

  .dress-carousel {
    padding: 28px 22px;
  }

  .dress-carousel::before {
    inset: 12px;
  }

  .dress-controls {
    justify-content: flex-start;
  }

  .dress-slide.is-active {
    gap: 24px;
  }

  .dress-slide-copy p {
    max-width: none;
  }

}

@media (max-width: 560px) {
  :root {
    --topbar-space: 82px;
  }

  .topbar {
    top: calc(10px + env(safe-area-inset-top, 0px));
    width: calc(100% - 20px);
  }

  .nav a {
    display: none;
  }

  .nav a:last-child {
    display: inline;
  }

  .music-toggle {
    min-width: 40px;
    padding: 7px 9px;
  }

  .music-toggle [data-music-label] {
    display: none;
  }

  .hero {
    min-height: 86svh;
  }

  .hero h1 {
    font-size: 2.55rem;
  }

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

  .dress-carousel {
    padding: 24px 18px;
  }

  .dress-carousel-header {
    gap: 18px;
    margin-bottom: 22px;
  }

  .dress-controls {
    width: 100%;
    justify-content: space-between;
  }

  .dress-arrow {
    width: 42px;
    height: 42px;
  }

  .dress-palette-grid,
  .choice-grid {
    grid-template-columns: 1fr;
  }

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

  .dress-code-group {
    min-height: 0;
    padding: 18px;
  }

  .outfit-grid {
    gap: 8px;
  }

  .outfit-art {
    height: 176px;
  }

  .outfit-figure figcaption {
    min-height: 38px;
    font-size: 0.78rem;
  }

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

  .rsvp-form {
    padding: 18px;
  }

  .button {
    width: 100%;
  }

  .scroll-cue {
    right: 18px;
  }
}
