:root {
  --ink: #171717;
  --muted: #666666;
  --line: #dddddd;
  --paper: #ffffff;
  --soft: #f6f6f6;
  --radius-lg: 32px;
  --radius-md: 24px;
  --radius-sm: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--ink);
  color: white;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  top: 1rem;
}

.intro,
.section,
.site-footer {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}

.intro,
.section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}

.intro p,
.section-heading p,
.label {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1.2rem;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.05;
}

.intro-headline {
  max-width: 680px;
  margin-bottom: 1.4rem;
}

h2 {
  margin-bottom: 1rem;
  font-size: 1.8rem;
  line-height: 1.1;
}

h3 {
  margin-bottom: 0.4rem;
  font-size: 1.2rem;
}

.fact-list,
.guest-details,
.note-list,
.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.fact-list,
.guest-details,
.note-list {
  display: grid;
  gap: 0.35rem;
}

.fact-list li,
.guest-details li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--line);
}

.fact-list span,
.guest-details span {
  color: var(--muted);
}

.guest-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 0.8rem;
}

.guest-panel {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--soft);
}

.guest-panel p {
  color: var(--muted);
}

.guest-details {
  margin-top: 1rem;
}

.rsvp-card {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: white;
}

.rsvp-card > span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
}

.rsvp-card > strong {
  font-size: 1.4rem;
}

.rsvp-loading {
  display: grid;
  min-height: 180px;
  align-content: center;
  justify-items: center;
  gap: 0.65rem;
}

.rsvp-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: rsvp-spin 850ms linear infinite;
}

.rsvp-loading-lines {
  display: grid;
  width: min(100%, 220px);
  gap: 0.45rem;
}

.rsvp-loading-lines span {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8e8e8 0%, #f7f7f7 45%, #e8e8e8 100%);
  background-size: 180% 100%;
  animation: rsvp-skeleton 1.1s ease-in-out infinite;
}

.rsvp-loading-lines span:nth-child(2) {
  width: 78%;
  justify-self: center;
  animation-delay: 120ms;
}

.rsvp-loading-lines span:nth-child(3) {
  width: 56%;
  justify-self: center;
  animation-delay: 240ms;
}

.rsvp-summary {
  display: grid;
  gap: 0.7rem;
}

.rsvp-summary > strong {
  font-size: 1.4rem;
  line-height: 1.2;
}

.rsvp-summary dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem 1rem;
  margin: 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}

.rsvp-summary dt {
  color: var(--muted);
}

.rsvp-summary dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.rsvp-options {
  display: grid;
  gap: 0.9rem;
}

.choice-group {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group legend,
.field-label {
  margin-bottom: 0.15rem;
  color: var(--ink);
  font-weight: 700;
}

.choice-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 36px;
  color: var(--ink);
  cursor: pointer;
}

.choice-option input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: var(--ink);
}

.children-options {
  display: grid;
  gap: 0.45rem;
}

.children-options select {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.custom-select {
  position: relative;
  min-width: 0;
}

.custom-select-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
  min-height: 46px;
  padding: 0.66rem 2.7rem 0.66rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%);
  box-shadow: inset 0 -1px 0 rgba(23, 23, 23, 0.05);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.custom-select-button::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-65%) rotate(45deg);
  transition: transform 160ms ease;
}

.custom-select.is-open .custom-select-button::after {
  transform: translateY(-35%) rotate(225deg);
}

.custom-select-button:focus-visible,
.custom-select-option:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #bdbdbd;
}

.custom-select-value.is-placeholder {
  color: var(--muted);
}

.custom-select.is-disabled .custom-select-button {
  cursor: progress;
  opacity: 0.55;
}

.custom-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 5;
  display: grid;
  gap: 0.2rem;
  max-height: 220px;
  margin: 0;
  padding: 0.35rem;
  overflow-y: auto;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  box-shadow: 0 16px 36px rgba(23, 23, 23, 0.14);
}

.custom-select-option {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  padding: 0.5rem 0.65rem;
  border: 0;
  border-radius: calc(var(--radius-sm) - 6px);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.custom-select-option:hover,
.custom-select-option[aria-selected="true"] {
  background: var(--soft);
}

.rsvp-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

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

.button[aria-pressed="true"] {
  box-shadow: 0 0 0 3px #bdbdbd;
}

.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #bdbdbd;
}

.button:disabled {
  cursor: progress;
  opacity: 0.55;
}

.form-status {
  min-height: 1.4rem;
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.form-status.is-warning {
  color: #b42318;
}

@keyframes rsvp-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rsvp-skeleton {
  0% {
    background-position: 120% 0;
  }

  100% {
    background-position: -120% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rsvp-spinner,
  .rsvp-loading-lines span {
    animation: none;
  }
}

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

.timeline li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--line);
}

.timeline time {
  color: var(--muted);
  font-weight: 700;
}

.timeline span {
  font-weight: 700;
}

.note-list {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.note-list li {
  color: var(--muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 2rem;
  color: var(--muted);
}

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

  .fact-list li,
  .guest-details li,
  .site-footer {
    display: grid;
  }

  .guest-links {
    justify-content: start;
  }

  .timeline li {
    grid-template-columns: 64px 1fr;
    gap: 0.75rem;
  }
}
