/* ───────────────────────────────────────────────────────────
   Quellon & Lisa — Save the Date
   The design is the Canva export (images/design-*.jpg).
   This file only styles the page frame and the RSVP form, using
   the design's own values:
     text    = black at 48% opacity on white  →  #858585
     script  = Allura
     florals = #b3c2d1 (sampled from the artwork)
   The form is sized relative to the page width (cqw) so it keeps the
   same proportions as the design on every screen.
   ─────────────────────────────────────────────────────────── */

:root {
  --white: #ffffff;
  --text: #858585;          /* Canva: #000000 at 48% transparency */
  --text-strong: #6b6b6b;
  --blue: #b3c2d1;          /* floral line colour, sampled from the artwork */
  --blue-deep: #62778d;     /* same hue, dark enough for white button text (4.6:1) */
  --blue-wash: #f4f7fa;
  --line: #d9e0e8;
  --error: #a3626d;

  --script: "Allura", cursive;
  /* Weiss (the design's serif) is licensed to Canva only; Cormorant is the closest free match. */
  --serif: "Cormorant Garamond", Garamond, Georgia, serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 760px;
  margin: 0 auto;
  background: var(--white);
  container-type: inline-size;
}

.design {
  display: block;
  width: 100%;
  height: auto;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.img-placeholder {
  display: grid;
  place-items: center;
  min-height: 320px;
  margin: 16px;
  border: 1px dashed var(--blue);
  border-radius: 6px;
  background: var(--blue-wash);
  color: var(--blue-deep);
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

.script { font-family: var(--script); font-weight: 400; }

/* ── RSVP ─────────────────────────────────────────────── */
/* 1em here ≈ the design's body text size (53px on the 1366px-wide Canva page). */
.rsvp {
  width: 82%;
  margin: 0 auto;
  padding: .2em 0 1.6em;
  font-size: max(15px, 3.6cqw);
  scroll-margin-top: 16px;
}
@container (max-width: 480px) {
  .rsvp { width: auto; padding-left: 20px; padding-right: 20px; font-size: 16px; }
}

.rsvp__title {
  margin: 0 0 .5em;
  text-align: center;
  font-family: var(--script);
  font-weight: 400;
  font-size: 2.6em;
  line-height: 1;
  color: var(--text);
}

.field {
  margin: 0 0 1.05em;
  padding: 0;
  border: 0;
  min-width: 0;
}
.field > label,
.field > legend {
  display: block;
  margin-bottom: .25em;
  padding: 0;
  font-size: max(12px, .58em);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text);
}
.field > label em { font-style: normal; font-weight: 500; letter-spacing: .04em; text-transform: none; }

.field input[type="text"],
.field select,
.field textarea {
  display: block;
  width: 100%;
  padding: .25em .05em .3em;
  font: inherit;
  font-size: max(16px, .9em); /* 16px+ stops iPhones zooming in on tap */
  color: var(--text-strong);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  transition: border-color .2s ease, box-shadow .2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 2.4em; line-height: 1.35; }
.field select {
  cursor: pointer;
  padding-right: 1.4em;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2362778d' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .2em center;
}
.field ::placeholder { color: #b9b9b9; font-style: italic; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--blue-deep);
  box-shadow: 0 1px 0 0 var(--blue-deep);
}

.choice__options { display: flex; flex-wrap: wrap; gap: .45em; margin-top: .3em; }
.field .pill {
  position: relative;
  flex: 1 1 11em;
  margin: 0;
  cursor: pointer;
}
.pill input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.pill span {
  display: block;
  padding: .4em .8em;
  text-align: center;
  font-size: max(16px, .88em);
  color: var(--text-strong);
  border: 1px solid var(--blue);
  border-radius: 999px;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.pill:hover span { border-color: var(--blue-deep); }
.pill input:checked + span { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.pill input:focus-visible + span { outline: 2px solid var(--blue-deep); outline-offset: 3px; }

.if-attending:not([hidden]) { animation: unfold .4s ease both; }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.error-msg { margin: .25em 0 0; font-size: max(14px, .7em); font-style: italic; color: var(--error); }
.error-msg:empty { display: none; }
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-bottom-color: var(--error); }
.field.is-invalid .pill span { border-color: var(--error); }

.trap { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.send {
  display: block;
  width: 100%;
  margin-top: 1.3em;
  padding: .75em 1.5em;
  font-family: var(--serif);
  font-size: max(14px, .62em);
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #fff;
  background: var(--blue-deep);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: filter .2s ease, transform .15s ease;
}
.send:hover { filter: brightness(.93); }
.send:active { transform: translateY(1px); }
.send:focus-visible { outline: 2px solid var(--blue-deep); outline-offset: 4px; }
.send[disabled] { opacity: .7; cursor: progress; }

.form-status { margin: .6em 0 0; text-align: center; font-size: max(14px, .7em); font-style: italic; color: var(--error); }
.form-status:empty { display: none; }

.thanks { text-align: center; outline: none; animation: unfold .5s ease both; }
.thanks__title { margin: 0; font-size: 2.6em; line-height: 1; color: var(--text); }
.thanks__msg { margin: .35em auto 0; max-width: 26ch; font-size: max(17px, .95em); }
.thanks__note {
  margin: .9em auto 0;
  max-width: 34ch;
  padding: .6em .9em;
  font-size: max(14px, .62em);
  font-style: italic;
  color: var(--blue-deep);
  border: 1px dashed var(--blue);
  border-radius: 6px;
}
.link-btn {
  margin-top: 1em;
  padding: .2em .1em;
  font: inherit;
  font-size: max(15px, .68em);
  font-style: italic;
  color: var(--blue-deep);
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  cursor: pointer;
}

/* ── Floating RSVP shortcut ───────────────────────────── */
.rsvp-pill {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 10;
  padding: .7rem 1.35rem;
  font-family: var(--serif);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-decoration: none;
  color: #fff;
  background: var(--blue-deep);
  border-radius: 999px;
  box-shadow: 0 10px 24px -12px rgba(60, 85, 125, .7);
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}
.rsvp-pill.is-shown { opacity: 1; transform: none; pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
