* {
  box-sizing: border-box;
}

/* ⚽ SOCCER PITCH BACKGROUND */
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", Arial, sans-serif;
  color: #14532d;
  text-align: center;
  background: repeating-linear-gradient(
    90deg, #15803d 0 90px, #16a34a 90px 180px
  );
  background-attachment: fixed;
}

/* Touchline around the edge of the pitch */
body::before {
  content: "";
  position: fixed;
  inset: 12px;
  border: 4px solid #ffffffaa;
  border-radius: 8px;
  pointer-events: none;
}

/* Centre circle */
body::after {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  margin: -150px 0 0 -150px;
  border: 4px solid #ffffff55;
  border-radius: 50%;
  pointer-events: none;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 36px 16px 28px;
}

/* 🎟️ INVITATION CARD */
.invite {
  padding: 30px 22px 28px;
  background: #fffef5;
  border: 5px solid #ffffff;
  border-radius: 26px;
  box-shadow: 0 18px 50px #00000055;
}

.ball {
  display: inline-block;
  font-size: 58px;
  line-height: 1;
  animation: kick 1.6s ease-in-out infinite;
}

@keyframes kick {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-16px) rotate(180deg); }
}

.invite h1 {
  margin: 10px 0 20px;
  font-size: clamp(34px, 9vw, 52px);
  line-height: 1.1;
  color: #14532d;
}

.when {
  display: inline-block;
  margin: 0;
  padding: 12px 24px;
  border-radius: 24px;
  background: #14532d;
  color: #ffffff;
  font-size: clamp(18px, 4.6vw, 24px);
  font-weight: bold;
  line-height: 1.4;
}

.when span {
  display: block;
}

.when .time {
  color: #bbf7d0;
}

.tagline {
  margin: 20px 0 0;
  font-size: clamp(18px, 4.6vw, 22px);
  font-weight: bold;
  line-height: 1.4;
}

.note {
  max-width: 420px;
  margin: 20px auto 0;
  padding: 12px 16px;
  border-radius: 14px;
  background: #dcfce7;
  font-size: 16px;
  line-height: 1.5;
}

.where {
  margin: 20px 0 0;
  font-size: clamp(18px, 4.6vw, 22px);
  font-weight: bold;
}

/* 📍 ADDRESS QUIZ */
.address-btn,
.address-check {
  padding: 12px 20px;
  border: none;
  border-radius: 999px;
  background: #16a34a;
  color: #ffffff;
  font-family: inherit;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 0 #14532d;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.address-btn:hover,
.address-check:hover {
  background: #15803d;
}

.address-btn:active,
.address-check:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #14532d;
}

.address-btn:focus-visible,
.address-check:focus-visible {
  outline: 3px solid #facc15;
  outline-offset: 3px;
}

.address-form {
  max-width: 420px;
  margin: 0 auto;
}

.address-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.address-row {
  display: flex;
  gap: 10px;
}

.address-row input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  border: 2px solid #86efac;
  border-radius: 12px;
  background: #ffffff;
  color: #14532d;
  font-family: inherit;
  font-size: 16px;
}

.address-row input:focus-visible {
  outline: 3px solid #facc15;
  outline-offset: 2px;
}

.address-reveal {
  margin: 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: #dcfce7;
  font-size: clamp(18px, 4.6vw, 21px);
  line-height: 1.5;
}

/* 📝 RSVP FORM */
.rsvp {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 3px dashed #86efac;
  text-align: left;
}

.rsvp h2 {
  margin: 0 0 14px;
  text-align: center;
  font-size: 28px;
}

.rsvp label,
.rsvp legend {
  display: block;
  margin: 14px 0 6px;
  padding: 0;
  font-weight: bold;
}

.rsvp input[type="text"],
.rsvp select,
.rsvp textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #86efac;
  border-radius: 12px;
  background: #ffffff;
  color: #14532d;
  font-family: inherit;
  font-size: 16px;
}

.rsvp textarea {
  resize: vertical;
}

.rsvp input:focus-visible,
.rsvp select:focus-visible,
.rsvp textarea:focus-visible {
  outline: 3px solid #facc15;
  outline-offset: 2px;
}

.choices {
  margin: 0;
  padding: 0;
  border: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choices legend {
  width: 100%;
}

.choice {
  position: relative;
  margin: 0 !important;
}

.choice input {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.choice span {
  display: inline-block;
  padding: 11px 16px;
  border: 2px solid #86efac;
  border-radius: 999px;
  background: #ffffff;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.choice input:checked + span {
  border-color: #14532d;
  background: #14532d;
  color: #ffffff;
}

.choice input:focus-visible + span {
  outline: 3px solid #facc15;
  outline-offset: 2px;
}

/* Hidden spam trap, kept out of sight but still in the page */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.rsvp-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: #16a34a;
  color: #ffffff;
  font-family: inherit;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 0 #14532d;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.rsvp-btn:hover {
  background: #15803d;
}

.rsvp-btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #14532d;
}

.rsvp-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.rsvp-btn:focus-visible {
  outline: 3px solid #facc15;
  outline-offset: 3px;
}

.form-status {
  min-height: 1.4em;
  margin: 12px 0 0;
  text-align: center;
  font-weight: bold;
}

.form-status.error {
  color: #b91c1c;
}

.thanks {
  margin: 10px 0 0;
  text-align: center;
  font-size: 22px;
  font-weight: bold;
  line-height: 1.4;
}

.rsvp .allergy {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  cursor: pointer;
}

.allergy input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: #16a34a;
  cursor: pointer;
}

.allergy input:focus-visible {
  outline: 3px solid #facc15;
  outline-offset: 2px;
}

/* 🔗 LINK TO THE OTHER PAGE */
.more {
  margin: 26px 0 0;
}

.more a {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  background: #ffffff;
  color: #14532d;
  font-weight: bold;
  text-decoration: none;
  box-shadow: 0 6px 20px #00000044;
}

.more a:hover {
  background: #fef9c3;
  text-decoration: underline;
}

.more a:focus-visible {
  outline: 3px solid #facc15;
  outline-offset: 3px;
}

@media (max-width: 480px) {
  .invite {
    padding: 24px 16px;
  }

  body::after {
    width: 220px;
    height: 220px;
    margin: -110px 0 0 -110px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ball {
    animation: none;
  }

  .choice span,
  .rsvp-btn,
  .address-btn,
  .address-check {
    transition: none;
  }
}
