/* ---------- Tokens ---------- */
:root {
  --cream: #F6FFE6;
  --sage:  #E5EED1;
  --olive: #7A8458;
  --body:  #606655;

  --font-display: "LEMON MILK", "Big Shoulders Display", system-ui, sans-serif;
  --font-body:    "Afacad", system-ui, sans-serif;

  --maxw: 1500px;
}

@font-face {
  font-family: "LEMON MILK";
  src: url("/fonts/LEMONMILK-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "LEMON MILK";
  src: url("/fonts/LEMONMILK-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "LEMON MILK";
  src: url("/fonts/LEMONMILK-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { overflow-x: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; }
input { font: inherit; }
fieldset { border: 0; padding: 0; margin: 0; }

body {
  position: relative;
  background: var(--cream);
  color: var(--body);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- Page shell ---------- */
.page {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 64px;
}

/* Sage arch zone — wraps the hero and contact pills. Height is driven by
   content inside (hero copy + pills + padding). Decorations are positioned
   bottom-anchored within so they always sit on the arch's ground line. */
.arch-zone {
  position: relative;
  margin: 53px 0 0;
  padding: 200px 60px 280px;
  background: var(--sage);
  border-radius: 800px 800px 0 0;
}

/* ---------- Decorative SVGs ---------- */
.deco { position: absolute; pointer-events: none; user-select: none; z-index: 1; }

/* Trees and elephant sit inside .arch-zone, anchored to its bottom edge.
   They overhang slightly past the arch base into the cream area below. */
.deco-tree-left  {
  width: clamp(180px, 24vw, 380px);
  left: -40px;
  bottom: -37px;
}
.deco-tree-right {
  width: clamp(160px, 20vw, 320px);
  right: -40px;
  bottom: -37px;
}
.deco-elephant {
  width: clamp(160px, 18vw, 251px);
  left: max(-20px, calc(50% - 459px));
  bottom: -37px;
}

/* Giraffe lives in the cream area, bottom-anchored to the page. */
.deco-giraffe {
  right: -20px;
  bottom: 280px;
  width: clamp(140px, 15vw, 214px);
  transform: scaleX(-1);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 46px);
  color: var(--olive);
  letter-spacing: 0.01em;
  margin: 0 0 24px;
}
.invite-copy {
  font-size: 18px;
  line-height: 1.55;
  color: var(--body);
  margin: 0 0 12px;
}
.invite-copy:last-child { margin-bottom: 0; }

/* ---------- Contact pills ---------- */
.contacts {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 560px;
  margin: 96px auto 0;
}
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 247px;
  height: 39px;
  padding: 0 24px;
  background: var(--olive);
  color: var(--sage);
  border-radius: 100px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
  will-change: transform;
}
.pill:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(122, 132, 88, 0.28);
}
.pill:active { transform: translateY(0); }

/* ---------- Details (What's included / Where / Presents / Things to note) ---------- */
.details {
  position: relative;
  z-index: 2;
  margin: 120px auto 0;
  max-width: 640px;
  display: grid;
  gap: 64px;
  text-align: center;
}

.detail-block h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 32px);
  color: var(--olive);
  letter-spacing: 0.02em;
  margin: 0 0 18px;
}

.detail-block p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
  margin: 0 0 12px;
}
.detail-block p:last-child { margin-bottom: 0; }

.detail-block ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 460px;
  display: grid;
  gap: 10px;
  text-align: left;
}
.detail-block li {
  position: relative;
  padding-left: 22px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--body);
}
.detail-block li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 7px;
  height: 7px;
  background: var(--olive);
  border-radius: 50%;
}

.address {
  display: inline-block;
  background: var(--sage);
  padding: 16px 28px;
  border-radius: 14px;
  font-size: 17px;
  line-height: 1.6;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: break-word;
}

.detail-notes p { font-size: 16px; }
.detail-notes .aside {
  font-style: italic;
  font-size: 14px;
  color: var(--olive);
  opacity: 0.8;
  margin-top: 16px;
}

/* ---------- RSVP intro ---------- */
.rsvp-intro {
  position: relative;
  z-index: 2;
  margin: 96px auto 0;
  max-width: 560px;
  text-align: center;
}
.rsvp-intro p {
  font-size: 18px;
  color: var(--body);
  margin: 0 0 12px;
}
.rsvp-intro p:last-child { margin-bottom: 0; }

/* ---------- RSVP ---------- */
.rsvp {
  position: relative;
  z-index: 2;
  margin: 64px auto 0;
  max-width: 772px;
}
.rsvp-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
}
.rsvp-header h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 56px);
  color: var(--olive);
  margin: 0;
  letter-spacing: 0.02em;
}
.rsvp-icon { width: 46px; height: auto; }

/* ---------- Form ---------- */
.rsvp-form { display: flex; flex-direction: column; gap: 16px; }

.rsvp-form.is-not-attending .field-parent,
.rsvp-form.is-not-attending .field-phone,
.rsvp-form.is-not-attending .field-siblings,
.rsvp-form.is-not-attending .field-dietary {
  display: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-size: 14px;
  color: var(--olive);
  font-weight: 500;
  padding-left: 4px;
}
.field-hint {
  font-size: 13px;
  color: var(--body);
  opacity: 0.75;
  padding-left: 4px;
}
.field input[type="text"],
.field input[type="tel"] {
  width: 100%;
  height: 50px;
  padding: 0 18px;
  background: var(--sage);
  border: 2px solid transparent;
  border-radius: 6px;
  color: var(--body);
  outline: none;
  transition: border-color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}
.field input:hover { background: #ecf3d9; }
.field input:focus {
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(122, 132, 88, 0.15);
}

/* Yes / No tickboxes */
.field-attending legend {
  font-size: 14px;
  color: var(--olive);
  font-weight: 500;
  padding-left: 4px;
  margin-bottom: 6px;
}
.tickbox-group { display: flex; gap: 16px; }
.tickbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.tickbox input { position: absolute; opacity: 0; pointer-events: none; }
.tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--sage);
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: transparent;
  transition: color 200ms ease, background-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.tickbox:hover .tick { background: #d8e2bf; }
.tickbox input:checked + .tick {
  color: var(--olive);
  transform: scale(1.04);
  box-shadow: 0 6px 14px rgba(122, 132, 88, 0.22);
}
.tickbox input:focus-visible + .tick { outline: 2px solid var(--olive); outline-offset: 2px; }
.tick-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: var(--olive);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Submit */
.submit {
  margin-top: 16px;
  align-self: flex-start;
  width: 153px;
  height: 50px;
  background: var(--olive);
  color: var(--sage);
  border-radius: 50px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
  will-change: transform;
}
.submit:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(122, 132, 88, 0.32);
}
.submit:active { transform: translateY(0); filter: brightness(0.95); }
.submit[disabled] { opacity: 0.6; cursor: progress; transform: none; box-shadow: none; }

.form-status {
  margin: 8px 0 0;
  min-height: 1.5em;
  font-size: 15px;
}
.form-status.is-success { color: var(--olive); }
.form-status.is-error   { color: #b04a3b; }

.disclaimer {
  margin: 24px 0 0;
  font-size: 16px;
  color: var(--body);
}

/* ---------- Footer ---------- */
.page-footer {
  position: relative;
  z-index: 2;
  margin-top: 120px;
  text-align: center;
  padding-top: 40px;
  border-top: 1px solid rgba(122, 132, 88, 0.2);
}
.page-footer p {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive);
}
.page-footer a,
.page-footer a:visited {
  color: var(--olive);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: opacity 180ms ease;
}
.page-footer a:hover { opacity: 0.7; }

/* ---------- Mobile ---------- */
@media (max-width: 880px) {
  .page { padding: 0 20px 48px; }

  .arch-zone {
    margin-top: 24px;
    padding: 120px 40px 180px;
    border-radius: 400px 400px 0 0;
    /* Clip the sides (so tree slices stay on sage) but leave the bottom
       open so the elephant and trees can overhang into the cream below. */
    clip-path: inset(0 0 -80px 0);
  }

  .hero h1 { line-height: 1.05; }
  .pill { min-width: 0; flex: 1 1 100%; height: 48px; }

  /* Trees blown up — only ~40px peeks in from each side. */
  .deco-tree-left  { width: 320px; left: -280px; }
  .deco-tree-right { width: 280px; right: -240px; }
  /* Elephant centred at the bottom of the arch on mobile, sized up and
     overhanging slightly into the cream below. Giraffe stays hidden —
     no spot in the single-column flow that doesn't overlap the form. */
  .deco-elephant {
    width: 140px;
    left: 50%;
    transform: translateX(-50%);
    bottom: -30px;
  }
  .deco-giraffe { display: none; }

  .details { margin-top: 80px; gap: 48px; }
  .rsvp-intro { margin-top: 72px; }
  .rsvp { margin-top: 56px; }
  .rsvp-header { margin-bottom: 24px; }
  .submit { width: 100%; }
  .tickbox-group { flex-direction: row; }
}

@media (max-width: 480px) {
  .page { padding: 0 16px 48px; }
  .arch-zone { padding: 96px 24px 160px; }

  .deco-tree-left  { width: 280px; left: -240px; }
  .deco-tree-right { width: 240px; right: -200px; }
}
