:root {
  --black: #111111;
  --charcoal: #1b1b1b;
  --ink: #161616;
  --cream: #f4efe8;
  --ivory: #fbf8f3;
  --muted: #6f675f;
  --line: rgba(17, 17, 17, 0.18);
  --script: "Miama Nueva", cursive;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --pad: clamp(20px, 5vw, 56px);
  --content: 34rem;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@font-face {
  font-family: "Miama Nueva";
  src: url("../fonts/MiamaNueva.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/CormorantGaramond-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/CormorantGaramond-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/CormorantGaramond-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/CormorantGaramond-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--serif);
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

legend {
  padding: 0;
}

#plus-fields[hidden] {
  display: none;
}

#plus-fields:not([hidden]) {
  display: grid;
  gap: 26px;
}

.page {
  width: 100%;
  min-height: 100dvh;
  background: var(--ivory);
}

.inner {
  width: min(calc(100% - var(--pad) * 2), var(--content));
  margin-inline: auto;
}

.section {
  padding: clamp(56px, 9vw, 120px) 0;
  text-align: center;
}

.script {
  font-family: var(--script);
  font-weight: 400;
  line-height: 1;
}

.caps {
  font-family: var(--serif);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.kicker {
  margin: 0 0 18px;
  font-size: clamp(11px, 2.8vw, 14px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.lead {
  margin: 0 auto;
  max-width: 36ch;
  font-size: clamp(16px, 2.4vw, 19px);
  line-height: 1.7;
  letter-spacing: 0.04em;
}

.title-script {
  margin: 0 0 28px;
  font-family: var(--script);
  font-size: clamp(44px, 12vw, 72px);
  line-height: 1.25;
}

/* Hero */
.hero {
  background: #000;
  color: #fff;
  padding-top: var(--safe-top);
  text-align: center;
}

.hero-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  padding: 0;
}

.hero-photo img {
  display: block;
  width: 100%;
  max-width: 682px;
  height: auto;
  object-fit: contain;
}

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

/* Day */
.day {
  background: var(--ivory);
  padding: clamp(56px, 9vw, 104px) 0;
  text-align: center;
}

.day-script {
  margin: 0 0 28px;
  font-family: var(--script);
  font-size: clamp(30px, 7vw, 44px);
}

.day img {
  width: min(100%, 460px);
  height: auto;
  margin: 0 auto;
}

/* Invite */
.invite {
  background: var(--charcoal);
  color: #f7f3ed;
}

.invite .kicker {
  font-size: clamp(12px, 2.6vw, 15px);
  letter-spacing: 0.2em;
  font-weight: 500;
}

.invite .lead {
  font-size: clamp(15px, 2.3vw, 18px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.85;
  opacity: 0.92;
}

.invite-date {
  margin: 40px 0 0;
  font-size: clamp(24px, 6vw, 36px);
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Location */
.location {
  background: var(--cream);
}

.location .lead {
  margin-bottom: 8px;
}

.location-place + .location-place {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.location-address {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: clamp(15px, 2.2vw, 18px);
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 56px, 0);
  transition:
    opacity 1.05s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.05s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal-group.is-in .reveal {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.reveal-group .reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal-group .reveal:nth-child(2) { transition-delay: 0.18s; }
.reveal-group .reveal:nth-child(3) { transition-delay: 0.3s; }
.reveal-group .reveal:nth-child(4) { transition-delay: 0.42s; }
.reveal-group .reveal:nth-child(5) { transition-delay: 0.54s; }
.reveal-group .reveal:nth-child(6) { transition-delay: 0.66s; }
.reveal-group .schedule .reveal:nth-child(1) { transition-delay: 0.22s; }
.reveal-group .schedule .reveal:nth-child(2) { transition-delay: 0.34s; }
.reveal-group .schedule .reveal:nth-child(3) { transition-delay: 0.46s; }
.reveal-group .schedule .reveal:nth-child(4) { transition-delay: 0.58s; }

.day,
.invite,
.location,
.timing,
.details,
.dress,
.footer {
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 280px);
  min-height: 48px;
  padding: 13px 22px;
  border: 1px solid var(--black);
  background: transparent;
  color: var(--black);
  text-decoration: none;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  background: var(--black);
  color: #fff;
}

/* Timing */
.timing {
  position: relative;
  color: #f4efe8;
  background-color: #0e0e0e;
  background-position: center 42%;
  background-size: cover;
  background-repeat: no-repeat;
  isolation: isolate;
  min-height: min(70vh, 640px);
  display: grid;
  align-items: center;
}

.timing::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 8, 8, 0.42), rgba(8, 8, 8, 0.7));
  z-index: -1;
}

.timing-frame {
  display: inline-block;
  margin: 0 0 40px;
  padding: 18px 36px 14px;
  border: 1px solid rgba(244, 239, 232, 0.55);
  box-shadow: inset 0 0 0 4px rgba(244, 239, 232, 0.12);
}

.timing-frame .script {
  margin: 0;
  font-family: var(--script);
  font-size: clamp(40px, 10vw, 56px);
}

.schedule {
  margin: 0;
  padding: 0;
  list-style: none;
}

.schedule li {
  display: grid;
  grid-template-columns: 4.6em 1fr;
  gap: 18px;
  max-width: 280px;
  margin: 0 auto;
  padding: 14px 0;
  text-align: left;
  font-size: clamp(17px, 2.6vw, 22px);
  letter-spacing: 0.04em;
}

.schedule time {
  font-variant-numeric: tabular-nums;
  opacity: 0.9;
}

/* Form */
.rsvp {
  background: var(--ivory);
}

.rsvp .lead {
  margin-bottom: 28px;
}

.tag {
  width: 88px;
  margin: 0 auto 36px;
}

.form {
  display: grid;
  gap: 26px;
  text-align: left;
}

.form-stack {
  display: grid;
  gap: 26px;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field:not([hidden]) {
  display: grid;
  gap: 10px;
}

.temporarily-hidden {
  display: none !important;
}

.field span,
.legend {
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.req {
  font-style: normal;
  color: #8a2b2b;
  letter-spacing: 0;
}

.field input[type="text"],
.field textarea {
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  text-align: center;
  outline: none;
}

.field textarea {
  min-height: 4.2em;
  text-align: left;
  resize: vertical;
  line-height: 1.45;
}

.field input[type="text"]:focus,
.field textarea:focus {
  border-bottom-color: var(--black);
}

.choices {
  display: grid;
  gap: 4px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 4px;
  cursor: pointer;
  font-size: clamp(16px, 2.4vw, 18px);
}

.choice input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--black);
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: 0 0 18px;
}

.choice input[type="checkbox"] {
  border-radius: 2px;
}

.choice input:checked::after {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--black);
  border-radius: inherit;
}

.plus {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.form .btn {
  width: 100%;
  margin-top: 8px;
}

.form-status {
  margin: 0;
  min-height: 1.4em;
  text-align: center;
  font-size: 16px;
}

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

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

button.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* Details */
.details {
  background: var(--charcoal);
  color: #f4efe8;
}

.details .lead {
  letter-spacing: 0.03em;
  max-width: 42ch;
}

.details .lead + .lead {
  margin-top: 1.4em;
}

/* Dress code */
.dress {
  background: var(--ivory);
}

.swatches {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 4vw, 28px);
  margin-top: 36px;
  padding: 0;
  list-style: none;
}

.swatches li {
  width: clamp(40px, 8vw, 56px);
  height: clamp(40px, 8vw, 56px);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* Footer */
.footer {
  background: var(--cream);
  padding: clamp(72px, 12vw, 120px) 0 calc(64px + var(--safe-bottom));
  text-align: center;
}

.signoff {
  display: inline-block;
}

.signoff-caps {
  margin: 0;
  font-size: clamp(13px, 2.4vw, 16px);
  line-height: 1.7;
  letter-spacing: 0.24em;
  font-weight: 500;
}

.footer-date {
  margin: 36px 0 0;
  font-size: clamp(12px, 2.2vw, 15px);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Narrow phones */
@media (max-width: 380px) {
  :root {
    --pad: 16px;
  }

  .schedule li {
    grid-template-columns: 3.8em 1fr;
    gap: 12px;
  }
}

/* Landscape phones: don't make the hero a giant scroll */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-photo img {
    max-height: 80svh;
    width: auto;
  }
}

/* Tablets */
@media (min-width: 640px) {
  :root {
    --content: 36rem;
  }

  .choices:has(.choice:nth-child(2):last-child) {
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
  }

  .schedule {
    max-width: 340px;
    margin-inline: auto;
  }

  .schedule li {
    max-width: none;
  }
}

/* Laptops / desktops */
@media (min-width: 960px) {
  :root {
    --content: 40rem;
    --pad: 64px;
  }

  .timing {
    min-height: 720px;
    background-attachment: fixed;
  }

  .form .btn {
    width: auto;
    min-width: 280px;
    justify-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .timing {
    background-attachment: scroll;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
