:root {
  --blue: #064a99;
  --blue-deep: #033f86;
  --blue-soft: #6fa8e9;
  --yellow: #ffd53f;
  --yellow-deep: #f6b900;
  --red: #ff2c10;
  --red-deep: #a70f04;
  --green: #02c865;
  --green-deep: #22671f;
  --cream: #fff9e8;
  --ink: #111016;
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.82);
  --shadow: 0 24px 70px rgba(0, 22, 68, 0.32);
  --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
  --font-leo: "Wedges", "Baloo 2", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-info: "League Spartan", "Montserrat", system-ui, sans-serif;
  --font-body: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--blue);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 213, 63, 0.1), transparent 22rem),
    radial-gradient(circle at 90% 20%, rgba(255, 44, 16, 0.16), transparent 18rem),
    var(--blue);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.site-shell {
  overflow: hidden;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(360px, 0.82fr);
  gap: clamp(24px, 5vw, 70px);
  min-height: 100svh;
  padding: clamp(28px, 5vw, 76px);
  align-items: center;
}

.hero::after {
  position: absolute;
  inset: auto -8vw -16vw -8vw;
  height: 34vw;
  min-height: 260px;
  content: "";
  background: var(--yellow);
  border-radius: 50% 50% 0 0 / 78% 78% 0 0;
  box-shadow: inset 0 18px 0 rgba(246, 185, 0, 0.38);
  transform: translateY(48%);
  z-index: 0;
}

.hero-copy,
.rsvp-panel {
  position: relative;
  z-index: 2;
}

.hero-copy {
  max-width: 780px;
  animation: enter-up 520ms var(--ease-out) both;
}

.kicker,
.eyebrow {
  margin: 0 0 10px;
  font-family: var(--font-info);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kicker {
  color: var(--yellow);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  text-shadow: 0 2px 0 rgba(3, 63, 134, 0.42);
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-info);
  line-height: 0.92;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  font-size: clamp(5rem, 13vw, 11rem);
  text-wrap: balance;
}

.hero h1 {
  display: grid;
  gap: 0.04em;
}

.title-leo {
  font-family: var(--font-leo);
}

.title-rest {
  font-family: var(--font-info);
  font-size: 0.48em;
  font-weight: 800;
  line-height: 0.86;
}

h2 {
  font-size: clamp(2.4rem, 5vw, 5.25rem);
}

.subtitle {
  max-width: 690px;
  margin: clamp(18px, 3vw, 28px) 0 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 2.2vw, 2rem);
}

.party-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.party-facts span {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-family: var(--font-info);
  font-weight: 800;
}

.hero-art {
  position: relative;
  width: clamp(200px, 19vw, 310px);
  margin-top: 24px;
  isolation: isolate;
  animation: enter-up 560ms 180ms var(--ease-out) both;
}

.hero-art::before {
  position: absolute;
  inset: 46% -12% -8%;
  z-index: -1;
  content: "";
  background: transparent;
  border-radius: 50%;
  transform: rotate(-5deg);
}

.hero-art img {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.rsvp-panel {
  color: var(--ink);
  background: var(--yellow);
  border-radius: 8px;
  padding: clamp(24px, 4vw, 42px);
  box-shadow: var(--shadow);
  width: min(100%, 540px);
  justify-self: end;
  animation: enter-up 620ms 100ms var(--ease-out) both;
}

.rsvp-panel::before,
.rsvp-panel::after {
  position: absolute;
  left: 0;
  right: 0;
  height: 60px;
  content: "";
  background: var(--yellow);
  z-index: -1;
}

.rsvp-panel::before {
  top: -30px;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  box-shadow: inset 0 9px 0 rgba(246, 185, 0, 0.42);
}

.rsvp-panel::after {
  bottom: -30px;
  border-radius: 0 0 50% 50% / 0 0 100% 100%;
  box-shadow: inset 0 -9px 0 rgba(246, 185, 0, 0.28);
}

.rsvp-panel .eyebrow {
  color: var(--blue);
}

form {
  margin-top: 24px;
}

.field {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.field input {
  width: 100%;
  min-height: 54px;
  border: 3px solid var(--blue);
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 800;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.field input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(255, 44, 16, 0.16);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.text-button:focus-visible,
.image-ticket:focus-visible,
.choice-group label:focus-within {
  outline: 4px solid var(--red);
  outline-offset: 4px;
}

.image-ticket:focus-visible {
  outline-color: var(--yellow);
}

.field input:disabled {
  opacity: 0.55;
}

.choice-group {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  border: 0;
  padding: 0;
}

.choice-group legend {
  margin-bottom: 8px;
  font-weight: 800;
}

.choice-group label {
  display: flex;
  min-height: 54px;
  align-items: center;
  gap: 12px;
  border: 3px solid var(--blue);
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--cream);
  color: var(--ink);
  font-weight: 800;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.choice-group input {
  width: 20px;
  height: 20px;
  accent-color: var(--red);
}

.choice-group label:has(input:checked) {
  background: var(--white);
}

.count-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 0;
  text-decoration: none;
  font-family: var(--font-info);
  font-weight: 900;
  transition:
    transform 140ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease;
}

.primary-button {
  width: 100%;
  margin-top: 22px;
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 10px 0 var(--blue-deep);
  font-family: var(--font-info);
  font-size: 1.4rem;
}

.primary-button:hover,
.text-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.primary-button:active,
.text-button:active,
.secondary-button:active {
  transform: translateY(1px) scale(0.99);
}

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

.form-status {
  min-height: 28px;
  margin: 16px 0 0;
  font-weight: 800;
}

.form-status[data-type="success"] {
  color: var(--green-deep);
}

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

.rsvp-panel.is-complete {
  animation: order-up 520ms var(--ease-out) both;
}

.info-band {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(260px, 440px);
  gap: clamp(22px, 5vw, 64px);
  align-items: center;
  padding: clamp(48px, 7vw, 96px) clamp(24px, 6vw, 84px);
}

.venue-band {
  background: #53684f;
}

.gifts-band {
  grid-template-columns: minmax(260px, 440px) minmax(0, 0.9fr);
  background: #25477e;
}

.band-copy {
  max-width: 780px;
}

.band-copy .eyebrow {
  color: var(--yellow);
}

.band-copy p {
  max-width: 620px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.94);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
}

.band-copy .gift-lede {
  color: var(--white);
  font-family: var(--font-info);
  font-size: clamp(1.35rem, 2.1vw, 1.85rem);
  font-weight: 800;
  line-height: 1.12;
}

.amenities {
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: var(--white);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 800;
}

.amenities li::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--yellow);
}

.gift-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 0;
}

.gift-sizes div {
  min-width: 150px;
  border-bottom: 4px solid var(--yellow);
  padding: 0 0 8px;
}

.gift-sizes dt {
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-info);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gift-sizes dd {
  margin: 4px 0 0;
  color: var(--white);
  font-family: var(--font-info);
  font-size: 1.5rem;
  font-weight: 800;
}

.text-button {
  margin-top: 28px;
  padding: 0 22px;
  background: var(--yellow);
  color: var(--blue);
  box-shadow: 0 8px 0 var(--yellow-deep);
}

.image-ticket {
  position: relative;
  display: block;
  border-radius: 8px;
  transform: rotate(2deg);
  transition: transform 220ms var(--ease-out);
  isolation: isolate;
}

.gifts-band .image-ticket {
  transform: rotate(-2deg);
}

.image-ticket::before {
  position: absolute;
  inset: 10% -8% -6% 7%;
  z-index: -1;
  content: "";
  background: rgba(255, 213, 63, 0.18);
  border-radius: 50%;
  transform: rotate(-7deg);
}

.gifts-band .image-ticket::before {
  inset: -3% 8% 8% -6%;
  background: rgba(255, 44, 16, 0.24);
  transform: rotate(9deg);
}

.image-ticket:hover {
  transform: rotate(0deg) translateY(-4px);
}

.image-ticket img {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 8px;
  box-shadow: none;
}

.float-food {
  position: absolute;
  z-index: 1;
  opacity: 0.76;
  pointer-events: none;
  will-change: transform;
}

.cookie {
  top: 5vw;
  left: -104px;
  width: 164px;
  opacity: 0.52;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--yellow-deep);
  box-shadow: inset 14px 14px 0 var(--yellow);
  animation: float-slow 18s var(--ease-in-out) infinite alternate;
}

.cookie i {
  position: absolute;
  width: 36px;
  height: 14px;
  border-radius: 999px;
  background: var(--white);
}

.cookie i:nth-child(1) { top: 44px; left: 54px; transform: rotate(-22deg); }
.cookie i:nth-child(2) { top: 68px; right: 38px; transform: rotate(12deg); }
.cookie i:nth-child(3) { top: 100px; left: 36px; transform: rotate(45deg); }
.cookie i:nth-child(4) { bottom: 44px; left: 72px; transform: rotate(-8deg); }
.cookie i:nth-child(5) { bottom: 64px; right: 48px; transform: rotate(-48deg); }

.tomato {
  top: 5vw;
  right: 9vw;
  width: 126px;
  aspect-ratio: 1;
  border: 28px solid var(--red-deep);
  border-radius: 50%;
  background: var(--red);
  animation: float-slow 20s 300ms var(--ease-in-out) infinite alternate;
}

.tomato i {
  position: absolute;
  width: 40px;
  height: 12px;
  border-radius: 999px;
  background: var(--yellow);
}

.tomato i:nth-child(1) { top: 22px; left: 18px; transform: rotate(18deg); }
.tomato i:nth-child(2) { top: 22px; right: 18px; transform: rotate(-34deg); }
.tomato i:nth-child(3) { bottom: 22px; left: 18px; transform: rotate(-28deg); }
.tomato i:nth-child(4) { bottom: 22px; right: 18px; transform: rotate(18deg); }

.star {
  right: 5vw;
  bottom: 20vh;
  width: 112px;
  aspect-ratio: 1;
  background: #45c3f4;
  clip-path: polygon(50% 0, 61% 34%, 98% 35%, 68% 55%, 79% 91%, 50% 70%, 20% 91%, 31% 55%, 2% 35%, 38% 34%);
  animation: float-slow 17s 120ms var(--ease-in-out) infinite alternate;
}

.relish {
  left: -124px;
  top: auto;
  bottom: 22vh;
  width: 230px;
  height: 70px;
  background: var(--green);
  clip-path: polygon(0 0, 8% 18%, 17% 43%, 27% 23%, 37% 17%, 47% 48%, 56% 77%, 66% 52%, 75% 31%, 86% 50%, 100% 67%, 100% 100%, 0 100%);
  animation: relish-slide 22s var(--ease-in-out) infinite alternate;
}

.admin-body {
  background: var(--blue);
}

.admin-shell {
  min-height: 100svh;
  padding: clamp(24px, 5vw, 64px);
}

.admin-login,
.admin-board {
  width: min(100%, 1120px);
  margin: 0 auto;
  border-radius: 8px;
  padding: clamp(22px, 4vw, 40px);
  background: var(--yellow);
  color: var(--ink);
  box-shadow: var(--shadow);
  animation: enter-up 420ms var(--ease-out) both;
}

.admin-login {
  max-width: 520px;
  margin-top: 8vh;
}

.admin-login h1,
.admin-board h1 {
  font-size: clamp(3.4rem, 8vw, 6.8rem);
}

.admin-login .eyebrow,
.admin-board .eyebrow {
  color: var(--blue);
}

.admin-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.secondary-button {
  min-height: 42px;
  padding: 0 14px;
  background: var(--blue);
  color: var(--white);
}

.totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0;
}

.totals div {
  min-height: 92px;
  border: 3px solid var(--blue);
  border-radius: 8px;
  padding: 14px;
  background: var(--cream);
}

.totals span {
  display: block;
  font-family: var(--font-info);
  color: var(--blue);
  font-size: 2.4rem;
  line-height: 0.95;
}

.totals small {
  font-weight: 900;
}

.table-wrap {
  overflow-x: auto;
  border: 3px solid var(--blue);
  border-radius: 8px;
  background: var(--cream);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  color: var(--ink);
}

th,
td {
  padding: 14px;
  border-bottom: 2px solid rgba(6, 74, 153, 0.16);
  text-align: left;
}

th {
  color: var(--blue);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 900;
}

.status-pill.yes {
  background: rgba(2, 200, 101, 0.18);
  color: #126129;
}

.status-pill.no {
  background: rgba(255, 44, 16, 0.14);
  color: var(--red-deep);
}

.empty {
  text-align: center;
  font-weight: 900;
}

.guest-cell {
  font-weight: 900;
}

@keyframes enter-up {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes float-slow {
  from {
    transform: translate3d(0, 0, 0) rotate(-2deg);
  }
  to {
    transform: translate3d(0, -6px, 0) rotate(2deg);
  }
}

@keyframes relish-slide {
  from {
    transform: translate3d(-10px, 0, 0);
  }
  to {
    transform: translate3d(8px, 4px, 0);
  }
}

@media (min-width: 961px) {
  .hero-copy {
    padding-left: clamp(8px, 1.8vw, 28px);
  }
}

@keyframes order-up {
  0% {
    transform: translateY(0) scale(1);
  }
  38% {
    transform: translateY(-8px) scale(1.01);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 960px) {
  .hero,
  .info-band,
  .gifts-band {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-bottom: 54px;
  }

  .rsvp-panel {
    width: 100%;
    max-width: none;
    justify-self: stretch;
    margin-top: 24px;
  }

  .image-ticket {
    width: min(100%, 360px);
  }

  .gifts-band .image-ticket {
    order: 2;
  }

  .gifts-band .band-copy {
    order: 1;
  }

  .cookie,
  .tomato,
  .star,
  .relish {
    opacity: 0.55;
  }
}

@media (max-width: 620px) {
  .hero {
    gap: 22px;
    padding: 20px 18px 48px;
  }

  h1 {
    font-size: clamp(4rem, 20vw, 5.3rem);
  }

  h2 {
    font-size: 2.6rem;
  }

  .subtitle {
    margin-top: 14px;
    font-size: 1rem;
  }

  .party-facts {
    display: grid;
  }

  .hero-art {
    width: 132px;
    margin-top: 14px;
  }

  .rsvp-panel {
    margin-top: 12px;
    padding: 22px 18px;
  }

  .count-row {
    grid-template-columns: 1fr 1fr;
  }

  .admin-shell {
    padding: 14px;
  }

  .admin-login,
  .admin-board {
    padding: 18px;
  }

  .admin-login h1,
  .admin-board h1 {
    font-size: clamp(2.6rem, 13vw, 4.1rem);
  }

  .admin-head {
    display: grid;
  }

  .admin-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }

  .secondary-button {
    min-height: 48px;
  }

  #logout {
    grid-column: 1 / -1;
  }

  .totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
  }

  .totals div {
    min-height: 74px;
    padding: 10px;
  }

  .totals span {
    font-size: 2rem;
  }

  .cookie {
    width: 112px;
    top: 18px;
    left: auto;
    right: -18px;
  }

  .tomato,
  .star,
  .relish {
    display: none;
  }
}

@media (max-width: 420px) {
  .count-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .admin-board .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .admin-board table,
  .admin-board tbody,
  .admin-board tr,
  .admin-board td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .admin-board table {
    min-width: 0;
    border-collapse: separate;
  }

  .admin-board thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .admin-board tbody {
    display: grid;
    gap: 12px;
  }

  .admin-board tr {
    overflow: hidden;
    border: 3px solid var(--blue);
    border-radius: 8px;
    background: var(--cream);
  }

  .admin-board td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(6, 74, 153, 0.16);
    padding: 10px 12px;
    text-align: right;
  }

  .admin-board td::before {
    content: attr(data-label);
    color: var(--blue);
    font-family: var(--font-info);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-align: left;
    text-transform: uppercase;
  }

  .admin-board td:last-child {
    border-bottom: 0;
  }

  .admin-board .guest-cell {
    display: block;
    color: var(--ink);
    font-family: var(--font-info);
    font-size: 1.1rem;
    font-weight: 900;
    text-align: left;
  }

  .admin-board .guest-cell::before {
    display: block;
    margin-bottom: 2px;
  }

  .admin-board .empty-row td {
    display: block;
    border: 0;
    text-align: center;
  }

  .admin-board .empty-row td::before {
    display: none;
    content: "";
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy,
  .hero-art,
  .rsvp-panel,
  .admin-login,
  .admin-board,
  .float-food,
  .rsvp-panel.is-complete {
    animation: none;
  }

  .field input,
  .choice-group label,
  .primary-button,
  .secondary-button,
  .text-button,
  .image-ticket {
    transition: none;
  }

  .primary-button:hover,
  .secondary-button:hover,
  .text-button:hover,
  .image-ticket:hover {
    transform: none;
  }
}
