:root {
  color-scheme: light;
  --accent: #c20303;
  --accent-dark: #9f0000;
  --ink: #201f1d;
  --muted: #6f6760;
  --line: #ded6ce;
  --paper: #f6f4f2;
  --panel: #fffdfb;
  --panel-soft: #fbf8f4;
  --focus: #165d7a;
  --display-font: "Noto Serif Display", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-rendering: geometricprecision;
}

.banner {
  width: min(1000px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 0;
  pointer-events: none;
  position: relative;
}

.banner__slide {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(201, 0, 0, 0.05);
  box-shadow: 0 26px 80px rgba(69, 51, 39, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
}

.banner__slide:not(:first-child) {
  position: absolute;
  top: 28px;
  left: 0;
}

.banner__slide[data-active] {
  opacity: 1;
}

.page-shell {
  width: min(1000px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding: 48px 0 76px;
}

.invitation {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 460px);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.invitation__copy {
  max-width: 560px;
  padding-top: 18px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  max-width: 8ch;
  margin: 0 0 0 -6px;
  font-family: var(--display-font);
  font-size: 5.5rem;
  font-weight: 400;
  line-height: 0.9;
}

.intro {
  max-width: 29rem;
  margin: 26px 0 0;
  color: var(--muted);
  font-family: var(--display-font);
  font-size: 1.12rem;
  line-height: 1.72;
}

.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  max-width: 540px;
  margin: 42px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.details div {
  padding: 18px 22px 20px 0;
}

.details div + div {
  border-left: 1px solid var(--line);
  padding-left: 22px;
}

dt {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

dd {
  margin: 10px 0 0;
  font-family: var(--display-font);
  font-size: 1rem;
  line-height: 1.45;
}

.rsvp-form {
  width: 100%;
  margin-top: 38px;
  padding: 34px;
  border: 1px solid rgba(201, 0, 0, 0.14);
  background: rgba(255, 253, 251, 0.94);
  box-shadow: 0 24px 80px rgba(69, 51, 39, 0.1);
}

.submission-frame {
  position: absolute;
  width: 0;
  height: 0;
  border: 0;
  visibility: hidden;
}

.field {
  margin: 0 0 26px;
  padding: 0;
  border: 0;
}

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

label,
legend {
  display: block;
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

input[type="email"],
input[type="text"] {
  width: 100%;
  min-height: 52px;
  border: 1px solid #d8cec5;
  border-radius: 0;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  padding: 13px 15px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input[type="email"]::placeholder,
input[type="text"]::placeholder {
  color: #908780;
}

input[type="email"]:focus,
input[type="text"]:focus {
  border-color: rgba(201, 0, 0, 0.62);
  box-shadow: inset 0 0 0 1px rgba(201, 0, 0, 0.18);
}

input[type="email"]:focus,
input[type="text"]:focus,
input[type="radio"]:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(22, 93, 122, 0.25);
  outline-offset: 2px;
}

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

.choice {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin: 0;
  border: 1px solid #ded5cd;
  background: var(--panel-soft);
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  padding: 0 14px;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.choice:hover {
  border-color: rgba(201, 0, 0, 0.34);
  background: #fff8f5;
}

.choice:has(input:checked) {
  border-color: rgba(201, 0, 0, 0.58);
  background: #fff5f2;
}

.choice input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 0 12px 0 0;
  accent-color: var(--accent);
}

button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 0;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  box-shadow: 0 10px 24px rgba(201, 0, 0, 0.16);
}

button:hover {
  background: var(--accent-dark);
}

button:active {
  transform: translateY(1px);
}

button:disabled {
  cursor: not-allowed;
  background: var(--accent);
  box-shadow: none;
  opacity: 0.48;
}

.form-status {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.form-status:empty {
  display: none;
}

.contact-note {
  max-width: 760px;
  margin: 46px auto 0;
  color: var(--muted);
  font-family: var(--display-font);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
}

.contact-note__email {
  color: var(--accent);
}

@media (max-width: 1100px) {
  .banner {
    width: min(980px, calc(100% - 32px));
    padding: 24px 0 0;
  }

  .banner__slide {
    width: 100%;
  }

  .banner__slide:not(:first-child) {
    top: 24px;
  }

  .page-shell {
    width: min(980px, calc(100% - 32px));
  }

  .invitation {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
    gap: 34px;
  }

  h1 {
    font-size: 5rem;
  }
}

@media (max-width: 900px) {
  .banner {
    width: min(100%, 720px);
    padding: 14px 14px 0;
  }

  .banner__slide:not(:first-child) {
    top: 14px;
  }

  .page-shell {
    width: min(100% - 28px, 620px);
    align-items: start;
    padding: 28px 0 56px;
  }

  .invitation {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  h1 {
    max-width: 11ch;
    font-size: 4rem;
  }

  .intro {
    margin-top: 22px;
    font-size: 1.05rem;
    line-height: 1.65;
  }

  .details {
    margin-top: 30px;
  }

  .details div {
    padding: 16px 0;
  }

  .details div + div {
    border-top: 0;
    border-left: 1px solid var(--line);
    padding-left: 18px;
  }

  .rsvp-form {
    margin-top: 0;
    padding: 26px 24px;
    box-shadow: 0 18px 54px rgba(69, 51, 39, 0.09);
  }

  .contact-note {
    margin-top: 36px;
  }
}

@media (max-width: 560px) {
  .name-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 420px) {
  .banner {
    padding: 8px 0 0;
  }

  .banner__slide:not(:first-child) {
    top: 8px;
  }

  .banner__slide {
    border-right: 0;
    border-left: 0;
    box-shadow: 0 14px 42px rgba(69, 51, 39, 0.08);
  }

  .page-shell {
    width: min(100% - 24px, 620px);
    padding-top: 24px;
  }

  .details div {
    padding-right: 14px;
  }

  .details div + div {
    padding-left: 14px;
  }

  dd {
    font-size: 0.94rem;
  }

  h1 {
    font-size: 3.15rem;
  }

  .intro {
    margin-top: 18px;
    font-size: 1rem;
  }

  .rsvp-form {
    padding: 20px;
  }

  .field {
    margin-bottom: 22px;
  }

  .contact-note {
    margin-top: 30px;
    text-align: left;
  }
}
