:root {
  color-scheme: light;
  --ink: #081634;
  --ink-muted: #33415f;
  --orange: #f04408;
  --orange-dark: #d93805;
  --cream: #fff0cf;
  --line: #d7dce4;
  --focus: #0b62ce;
  --success: #14753a;
  --error: #b42318;
  --page-width: 1440px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: #000;
  transform: translateY(-150%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  min-height: 72px;
  background: #030303;
  color: #fff;
}

.header-inner {
  width: min(100% - 48px, var(--page-width));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  width: 45px;
  height: 48px;
  display: grid;
  place-items: end center;
}

.brand-mark img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-sparks {
  position: absolute;
  top: -6px;
  left: 14px;
  color: #ffd400;
  font-size: 20px;
  line-height: 1;
  filter: saturate(1.2);
}

.brand-name {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.045em;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  transition: background 160ms ease;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.icon-button svg {
  width: 27px;
  height: 27px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2.2;
}

.event-strip {
  min-height: 50px;
  padding: 6px max(24px, calc((100vw - var(--page-width)) / 2 + 24px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: linear-gradient(90deg, #fff3d9 0%, var(--cream) 50%, #fff3d9 100%);
  color: #050505;
}

.event-strip p {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  white-space: nowrap;
}

.event-copy--mobile {
  display: none;
}

.strip-button,
.primary-button {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #fb550e, var(--orange));
  box-shadow: 0 6px 14px rgba(240, 68, 8, 0.18);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.strip-button {
  flex: 0 0 auto;
  min-width: 118px;
  padding: 8px 22px;
  font-size: 1.2rem;
}

.strip-button:hover,
.primary-button:hover {
  background: linear-gradient(180deg, #ff5b12, var(--orange-dark));
  box-shadow: 0 9px 20px rgba(240, 68, 8, 0.24);
  transform: translateY(-1px);
}

.strip-button:active,
.primary-button:active {
  transform: translateY(0);
}

.page-shell {
  width: min(100% - 48px, var(--page-width));
  margin: 0 auto;
  padding: clamp(46px, 6vw, 76px) 0 48px;
}

.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;
}

.rsvp-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
}

.rsvp-card {
  min-height: 320px;
  padding: clamp(30px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(17, 31, 63, 0.06);
}

.rsvp-card h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.rsvp-card p {
  color: var(--ink-muted);
  font-size: clamp(1rem, 1.6vw, 1.16rem);
  line-height: 1.5;
}

.rsvp-card--member {
  display: flex;
  flex-direction: column;
}

.rsvp-card--new {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

.rsvp-card--new > div {
  max-width: 570px;
}

.rsvp-form {
  margin-top: auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group label {
  font-size: 0.86rem;
  font-weight: 700;
}

.field-group input {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid #c7ccd5;
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  font-size: 1rem;
  transition: border 160ms ease, box-shadow 160ms ease;
}

.field-group input::placeholder {
  color: #778197;
}

.field-group input:hover {
  border-color: #9da6b5;
}

.field-group input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(11, 98, 206, 0.14);
}

.field-group input[aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.11);
}

.primary-button {
  min-height: 58px;
  padding: 0 34px;
  font-size: 1.18rem;
}

.primary-button--wide {
  width: min(100%, 330px);
  display: grid;
  place-items: center;
  margin-top: 28px;
}

.form-status {
  min-height: 24px;
  margin: 12px 0 -22px;
  font-size: 0.9rem !important;
  font-weight: 600;
}

.form-status[data-state="error"] {
  color: var(--error);
}

.form-status[data-state="preview"] {
  color: var(--success);
}

.form-status__link {
  color: var(--orange-dark);
  font-weight: 800;
}

.form-status__link:hover {
  text-decoration-thickness: 2px;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.privacy-note {
  margin: 24px 0 0;
  color: #69748a;
  font-size: 0.82rem;
  text-align: center;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .rsvp-grid {
    grid-template-columns: 1fr;
  }

  .rsvp-card {
    min-height: 280px;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .page-shell {
    width: min(100% - 32px, var(--page-width));
  }

  .site-header,
  .header-inner {
    min-height: 64px;
  }

  .brand-mark {
    width: 38px;
    height: 42px;
  }

  .brand-mark img {
    width: 36px;
    height: 36px;
  }

  .brand-sparks {
    left: 10px;
    font-size: 17px;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .header-tools {
    gap: 2px;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .icon-button svg {
    width: 24px;
    height: 24px;
  }

  .event-strip {
    min-height: 46px;
    gap: 12px;
    padding: 5px 16px;
    justify-content: space-between;
  }

  .event-strip p {
    min-width: 0;
    overflow: hidden;
    font-size: 0.94rem;
    text-overflow: ellipsis;
  }

  .event-copy--desktop {
    display: none;
  }

  .event-copy--mobile {
    display: inline;
  }

  .strip-button {
    min-width: 76px;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 0.94rem;
  }

  .page-shell {
    padding-top: 48px;
  }

  .rsvp-card {
    min-height: auto;
    padding: 28px 22px;
    border-radius: 22px;
  }

  .rsvp-form {
    grid-template-columns: 1fr;
    margin-top: 30px;
  }

  .primary-button {
    width: 100%;
  }

  .rsvp-card--new {
    gap: 8px;
  }

  .form-status {
    margin-bottom: 0;
  }
}

@media (max-width: 400px) {
  .brand-name {
    font-size: 0.92rem;
  }

  .icon-button:first-child {
    display: none;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
