:root {
  --paper: #fbf8f3;
  --paper-field: #fffdf8;
  --ink: #2c2723;
  --ink-secondary: #5c554b;
  --ink-muted: #8f867a;
  --gold: #b0872b;
  --gold-border: #cbb06a;
  --page-background: #211e19;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Cormorant Garamond", Georgia, serif;
  --font-script: "Marck Script", cursive;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 280px;
  background: var(--page-background);
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--page-background);
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.wedding-page {
  display: flex;
  min-height: 100vh;
  align-items: flex-start;
  justify-content: center;
  background: var(--page-background);
}

.flash-notice {
  position: fixed;
  z-index: 50;
  top: 18px;
  left: 50%;
  width: min(386px, calc(100vw - 44px));
  padding: 12px 16px;
  border: 1px solid var(--gold-border);
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  transform: translateX(-50%);
}

.invitation-canvas {
  position: relative;
  width: 100%;
  max-width: 430px;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}

.wedding-section {
  position: relative;
  z-index: 5;
}

.canvas-frame {
  position: absolute;
  z-index: 14;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.canvas-frame__line {
  position: absolute;
  display: block;
}

.canvas-frame__line--outer {
  inset: 9px;
  border: 1.5px solid rgba(176, 135, 43, 0.75);
}

.canvas-frame__line--inner {
  inset: 14px;
  border: 1px solid rgba(176, 135, 43, 0.35);
}

.canvas-frame__corner {
  position: absolute;
  object-fit: contain;
}

.canvas-frame__corner--top-left,
.canvas-frame__corner--top-right {
  top: 4px;
  width: 64px;
  height: 64px;
  opacity: 0.88;
}

.canvas-frame__corner--top-left {
  left: 4px;
}

.canvas-frame__corner--top-right {
  right: 4px;
  transform: scaleX(-1);
}

.canvas-frame__corner--bottom-left,
.canvas-frame__corner--bottom-right {
  bottom: 2px;
  width: 100px;
  height: 100px;
  opacity: 0.92;
}

.canvas-frame__corner--bottom-left {
  left: 2px;
  transform: scaleY(-1);
}

.canvas-frame__corner--bottom-right {
  right: 2px;
  transform: scale(-1, -1);
}

.hero__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 86px 22px 6px;
}

.hero__script {
  line-height: 0.9;
}

.hero__script-small,
.hero__script-large {
  display: block;
  font-family: var(--font-script);
  font-weight: 400;
}

.hero__script-small {
  margin-left: 30px;
  color: #3a352d;
  font-size: 23px;
  transform: rotate(-7deg);
  transform-origin: center;
}

.hero__script-large {
  margin-top: 2px;
  color: var(--gold);
  font-size: 44px;
  text-shadow: 0 1px 1px rgba(176, 135, 43, 0.25);
  white-space: nowrap;
}

.hero__names {
  margin: 0;
  padding-top: 16px;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 1.5px;
  text-align: right;
}

.ornate-frame {
  position: relative;
  margin: 0;
  padding: 5px;
  border: 1.5px solid rgba(176, 135, 43, 0.8);
}

.ornate-frame--hero {
  margin: 6px 22px 0;
}

.ornate-frame__image {
  width: 100%;
  object-fit: cover;
}

.ornate-frame--hero .ornate-frame__image {
  height: 430px;
}

.ornate-frame--invitation {
  margin: 0 30px;
}

.ornate-frame--invitation .ornate-frame__image {
  height: 360px;
}

.ornate-frame__corner {
  position: absolute;
  z-index: 3;
  width: 42px;
  height: 42px;
  pointer-events: none;
}

.ornate-frame--hero .ornate-frame__corner {
  width: 44px;
  height: 44px;
}

.ornate-frame__corner--top-left {
  top: -3px;
  left: -3px;
}

.ornate-frame__corner--top-right {
  top: -3px;
  right: -3px;
  transform: scaleX(-1);
}

.ornate-frame__corner--bottom-left {
  bottom: -3px;
  left: -3px;
  transform: scaleY(-1);
}

.ornate-frame__corner--bottom-right {
  right: -3px;
  bottom: -3px;
  transform: scale(-1, -1);
}

.hero__date-block {
  padding: 16px 22px 0;
  text-align: right;
}

.hero__date,
.hero__subtitle {
  margin: 0;
}

.hero__date {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 3px;
}

.hero__subtitle {
  margin-top: 9px;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 11.5px;
  line-height: 1.9;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.countdown {
  display: flex;
  justify-content: space-between;
  padding: 24px 20px 30px;
  text-align: center;
}

.countdown__unit {
  min-width: 54px;
}

.countdown__number,
.countdown__label {
  display: block;
}

.countdown__number {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown__label {
  margin-top: 6px;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-style: italic;
}

.invitation-message {
  padding: 14px 0 0;
  text-align: center;
}

.invitation-message__crest {
  width: 120px;
  margin: 0 auto 6px;
}

.invitation-message__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.15;
}

.invitation-message__copy {
  margin: 18px 30px 20px;
  color: var(--ink-secondary);
  font-size: 17px;
  font-style: italic;
  line-height: 1.65;
  text-wrap: pretty;
}

.invitation-message__quote {
  margin: 0;
  padding: 20px 34px 0;
  font-size: 19px;
  font-style: italic;
  font-weight: 600;
  line-height: 1.5;
}

.section-divider {
  display: block;
  width: 230px;
  max-width: 62%;
  margin: 24px auto;
}

.details {
  padding: 4px 34px 0;
  text-align: center;
}

.details__heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
}

.details__heading--menu {
  font-size: 22px;
}

.details__heading--note {
  margin-top: 34px;
}

.details__heading--confirmation {
  margin-top: 14px;
}

.details__copy {
  margin: 12px 0 0;
  color: var(--ink-secondary);
  font-size: 16px;
  font-style: italic;
  line-height: 1.6;
  text-wrap: pretty;
}

.details__place-setting {
  display: block;
  width: 96px;
  height: 72px;
  margin: 0 auto;
  fill: none;
  stroke: var(--gold);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.calendar-card {
  margin: 4px 22px 0;
  padding: 22px 20px 24px;
  border: 1.5px solid var(--gold);
}

.calendar-card__corner {
  position: absolute;
  z-index: 2;
  width: 46px;
  height: 46px;
  pointer-events: none;
}

.calendar-card__corner--top-left {
  top: -2px;
  left: -2px;
}

.calendar-card__corner--top-right {
  top: -2px;
  right: -2px;
  transform: scaleX(-1);
}

.calendar-card__corner--bottom-left {
  bottom: -2px;
  left: -2px;
  transform: scaleY(-1);
}

.calendar-card__corner--bottom-right {
  right: -2px;
  bottom: -2px;
  transform: scale(-1, -1);
}

.calendar-card__title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 5px;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 14px;
  text-align: center;
}

.calendar-grid__weekday {
  color: #a49a8b;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 1px;
}

.calendar-grid__day {
  position: relative;
  display: flex;
  height: 28px;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  line-height: 1;
}

.calendar-grid__number {
  position: relative;
  z-index: 2;
}

.calendar-grid__heart {
  position: absolute;
  z-index: 1;
  top: 2px;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 34px;
  line-height: 1;
}

.confirmation__heading {
  margin: 24px 0 16px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 3px;
  text-align: center;
}

.confirmation__button-wrap {
  padding: 0 22px;
}

.gold-button {
  display: flex;
  width: 100%;
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border: 1px solid var(--gold-border);
  border-radius: 0;
  color: var(--ink);
  background: linear-gradient(#fdfaf2, #efe6d2);
  box-shadow:
    0 2px 6px rgba(120, 95, 40, 0.18),
    inset 0 0 0 3px rgba(203, 176, 106, 0.28);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.gold-button:focus-visible,
.rsvp-modal__close:focus-visible,
.rsvp-form__text:focus-visible,
.rsvp-radio__input:focus-visible + .rsvp-radio__control {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.gold-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.gold-button--submitted {
  cursor: default;
}

.confirmation__saved-copy {
  margin: 10px 0 0;
  color: var(--ink-secondary);
  font-size: 16px;
  font-style: italic;
}

.section-divider--after-confirm {
  margin: 30px auto 18px;
}

.schedule {
  padding: 14px 0 0;
}

.schedule__title {
  margin: 0;
  padding: 0 22px;
  font-family: var(--font-script);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
}

.schedule__canvas {
  position: relative;
  height: 600px;
  margin: 6px 22px 0;
}

.schedule__path {
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
  overflow: visible;
}

.schedule__path path {
  fill: none;
  stroke: #a89f8f;
  stroke-dasharray: 1 8;
  stroke-linecap: round;
  stroke-width: 2;
}

.schedule__marker {
  position: absolute;
  z-index: 2;
  transform: translateX(-50%);
}

.schedule__marker--first,
.schedule__marker--last {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
}

.schedule__marker--first {
  top: 145px;
  left: 62%;
}

.schedule__marker--heart {
  top: 288px;
  left: 31%;
  color: #9a9186;
  font-family: Georgia, serif;
  font-size: 22px;
  line-height: 1;
}

.schedule__marker--last {
  top: 500px;
  left: 56%;
}

.schedule-event {
  position: absolute;
  margin: 0;
}

.schedule-event--ceremony {
  top: 58px;
  left: 2%;
  width: 58%;
}

.schedule-event--reception {
  top: 300px;
  left: 44%;
  width: 54%;
}

.schedule-event--banquet {
  top: 470px;
  left: 2%;
  width: 58%;
}

.schedule-event__time {
  display: block;
  font-family: var(--font-script);
  font-size: 36px;
  line-height: 1;
}

.schedule-event__title {
  margin: 2px 0 0;
  font-family: var(--font-script);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.15;
}

.schedule-event__copy {
  margin: 6px 0 0;
  color: #6a6357;
  font-size: 11px;
  font-style: italic;
  line-height: 1.4;
  text-wrap: pretty;
}

.ornate-frame--map {
  margin: 8px 22px 0;
}

.venue__map {
  display: block;
  width: 100%;
  height: 300px;
  border: 0;
}

.venue__details {
  padding: 16px 22px 0;
  text-align: center;
}

.venue__heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
}

.venue__address {
  margin-top: 6px;
  color: var(--ink-secondary);
  font-size: 16px;
  font-style: normal;
}

.gold-button--route {
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  font-size: 18px;
}

.gold-button__marker {
  color: #d96a4a;
}

.wedding-footer {
  padding: 34px 22px 56px;
  text-align: center;
}

.wedding-footer p {
  margin-right: 0;
  margin-left: 0;
}

.wedding-footer__dove {
  width: 74px;
  margin: 0 auto 2px;
}

.wedding-footer__names {
  margin-top: 0;
  margin-bottom: 0;
  font-family: var(--font-script);
  font-size: 30px;
  line-height: 1.2;
}

.wedding-footer__date {
  margin-top: 2px;
  margin-bottom: 0;
  color: var(--ink-muted);
  font-size: 13px;
  letter-spacing: 2px;
}

.wedding-footer__love {
  margin-top: 16px;
  margin-bottom: 0;
  color: #b0a89a;
  font-size: 13px;
  font-style: italic;
}

.modal-overlay {
  position: fixed;
  z-index: 60;
  display: flex;
  overflow-y: auto;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 14px;
  background: rgba(33, 30, 25, 0.62);
  inset: 0;
  overscroll-behavior: contain;
}

.rsvp-modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 26px 24px 28px;
  border: 1.5px solid var(--gold);
  border-radius: 0;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.rsvp-modal__inner-line {
  position: absolute;
  border: 1px solid rgba(176, 135, 43, 0.35);
  inset: 5px;
  pointer-events: none;
}

.rsvp-modal__corner {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.rsvp-modal__corner--top-left,
.rsvp-modal__corner--top-right {
  top: 2px;
  width: 44px;
  height: 44px;
}

.rsvp-modal__corner--top-left {
  left: 2px;
}

.rsvp-modal__corner--top-right {
  right: 2px;
  transform: scaleX(-1);
}

.rsvp-modal__corner--bottom-left,
.rsvp-modal__corner--bottom-right {
  bottom: -2px;
  width: 52px;
  height: 52px;
}

.rsvp-modal__corner--bottom-left {
  left: -2px;
  transform: scaleY(-1);
}

.rsvp-modal__corner--bottom-right {
  right: -2px;
  transform: scale(-1, -1);
}

.rsvp-modal__close {
  position: absolute;
  z-index: 4;
  top: 52px;
  right: 14px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(176, 135, 43, 0.6);
  border-radius: 50%;
  color: #7a1f2b;
  background: var(--paper);
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 26px;
  text-align: center;
}

.rsvp-modal__header {
  position: relative;
  z-index: 3;
  text-align: center;
}

.rsvp-modal__crest {
  width: 112px;
  margin: 0 auto;
}

.rsvp-modal__title {
  margin: -2px 0 0;
  color: var(--gold);
  font-family: var(--font-script);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.2;
}

.rsvp-modal__divider {
  width: 170px;
  margin: 10px auto 16px;
}

.rsvp-modal__intro {
  margin: 0 0 22px;
  color: var(--ink-secondary);
  font-size: 16px;
  font-style: italic;
  line-height: 1.45;
}

.rsvp-modal__intro strong {
  font-weight: 600;
}

.rsvp-modal__lock-note {
  margin: -10px 14px 20px;
  color: #7a1f2b;
  font-size: 14px;
  font-style: italic;
  line-height: 1.35;
}

.rsvp-form-panel,
.rsvp-form {
  position: relative;
  z-index: 3;
}

.form-errors {
  margin: 0 0 18px;
  padding: 10px 12px;
  border: 1px solid rgba(122, 31, 43, 0.45);
  color: #7a1f2b;
  background: rgba(122, 31, 43, 0.04);
  font-size: 16px;
  line-height: 1.35;
}

.form-errors p,
.form-errors ul {
  margin-top: 0;
}

.form-errors p {
  margin-bottom: 4px;
  font-weight: 600;
}

.form-errors ul {
  margin-bottom: 0;
  padding-left: 18px;
}

.rsvp-form__field {
  margin: 0;
}

.rsvp-form__label,
.rsvp-form__legend {
  display: block;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
}

.rsvp-form__label {
  margin-bottom: 10px;
}

.rsvp-form__text {
  display: block;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--gold-border);
  border-radius: 0;
  color: var(--ink);
  background: var(--paper-field);
  box-shadow: inset 0 1px 3px rgba(120, 95, 40, 0.1);
  font-size: 18px;
}

.rsvp-form__text::placeholder {
  color: #9c9285;
  opacity: 1;
}

.rsvp-form__field-error {
  margin: 7px 0 0;
  color: #7a1f2b;
  font-size: 15px;
  line-height: 1.3;
}

.rsvp-form__group {
  min-width: 0;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.rsvp-form__legend {
  width: 100%;
  margin: 0 0 10px;
}

.rsvp-form__required {
  color: #7a1f2b;
}

.rsvp-radio {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 7px 0;
  cursor: pointer;
}

.rsvp-radio__input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.rsvp-radio__control {
  position: relative;
  display: inline-flex;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: transparent;
}

.rsvp-radio__input:checked + .rsvp-radio__control::after {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.rsvp-radio__label {
  font-size: 18px;
  line-height: 1.2;
}

.rsvp-form__submit {
  margin-top: 26px;
  padding: 15px;
}

.rsvp-form__status {
  margin: 20px 0 0;
  padding: 9px 11px;
  border: 1px solid rgba(122, 31, 43, 0.45);
  color: #7a1f2b;
  font-size: 16px;
  line-height: 1.35;
}

.rsvp-form__privacy {
  margin: 20px 4px 0;
  color: var(--ink-muted);
  font-size: 13px;
  font-style: italic;
  line-height: 1.35;
  text-align: center;
}

.rsvp-success {
  position: relative;
  z-index: 3;
  padding: 8px 0 2px;
  text-align: center;
}

.rsvp-success__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}

.rsvp-success__copy,
.rsvp-success__message {
  margin: 12px 0 22px;
  color: var(--ink-secondary);
  font-size: 18px;
  font-style: italic;
  line-height: 1.5;
}

@media (max-width: 429px) {
  .ornate-frame--hero .ornate-frame__image {
    height: calc((100vw - 57px) * 1.153);
  }

  .ornate-frame--invitation .ornate-frame__image {
    height: calc((100vw - 73px) * 1.0084);
  }

  .venue__map {
    height: clamp(240px, 70vw, 300px);
  }

  .schedule__canvas {
    height: clamp(540px, 139.5vw, 600px);
  }

  .schedule__marker--first {
    top: 24.16%;
  }

  .schedule__marker--heart {
    top: 48%;
  }

  .schedule__marker--last {
    top: 83.33%;
  }

  .schedule-event--ceremony {
    top: 9.67%;
  }

  .schedule-event--reception {
    top: 50%;
  }

  .schedule-event--banquet {
    top: 78.33%;
  }
}

@media (max-width: 359px) {
  .hero__heading {
    padding-right: 19px;
    padding-left: 19px;
  }

  .hero__script-small {
    margin-left: 22px;
    font-size: 21px;
  }

  .hero__script-large {
    font-size: 39px;
  }

  .hero__names {
    font-size: 16px;
  }

  .countdown {
    padding-right: 15px;
    padding-left: 15px;
  }

  .countdown__unit {
    min-width: 44px;
  }

  .countdown__number {
    font-size: 30px;
  }

  .countdown__label {
    font-size: 13px;
  }

  .details {
    padding-right: 28px;
    padding-left: 28px;
  }

  .calendar-card {
    padding-right: 14px;
    padding-left: 14px;
  }

  .schedule-event__copy {
    font-size: 10.5px;
  }

  .rsvp-modal {
    padding-right: 20px;
    padding-left: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
