/* Brigitte & Will — pastel garden party / homestead
   Palette and type scale mirror docs/DESIGN.md. Edit there first. */

/* ---------- tokens ---------- */
:root {
  /* core */
  --cornflower:  #6E8CBE;
  --dusty-blue:  #A9C0DC;
  --ink-blue:    #42597F;
  --cream:       #FCF9F4;
  --sand:        #F3EADE;
  --ink:         #33404E;
  --slate:       #6B7683;

  /* accents */
  --peach:       #F5B183;
  --apricot:     #EE9A72;
  --blush:       #F0C6C3;
  --butter:      #F6DFA0;
  --sage:        #9BAF96;
  --eucalyptus:  #6F8A72;
  --tan:         #B5906B;

  /* functional */
  --success:     #6F8A72;
  --error:       #C2705F;

  /* type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* rhythm */
  --measure: 68ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(4rem, 10vw, 7.5rem);
  --radius: 14px;
  --shadow: 0 2px 4px rgba(51, 64, 78, .04), 0 12px 32px rgba(51, 64, 78, .07);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 640px) { body { font-size: 17px; } }

img { max-width: 100%; display: block; }

/* ---------- type ---------- */
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 300;
  line-height: 1.15;
  color: var(--ink-blue);
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h2 { font-size: clamp(1.875rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.375rem); font-weight: 400; }

p { margin: 0 0 1.1em; max-width: var(--measure); }
a { color: var(--cornflower); text-underline-offset: 3px; }
a:hover { color: var(--ink-blue); }

.eyebrow {
  font-family: var(--body);
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 1rem;
}

/* Placeholder copy — deliberately conspicuous until real content lands.
   Delete the class, not the styling, as each item is filled in. */
.tbd {
  background: repeating-linear-gradient(
    -45deg, #FBE9D2, #FBE9D2 8px, #F7DFC2 8px, #F7DFC2 16px);
  color: #6B4A2A;
  padding: .1em .45em;
  border-radius: 4px;
  font-size: .95em;
  font-weight: 500;
}

/* ---------- layout ---------- */
.wrap { width: min(1080px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { width: min(720px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
section { padding-block: var(--section-y); }
.band { background: var(--sand); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 249, 244, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(169, 192, 220, .35);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .85rem; flex-wrap: wrap;
}
.nav__mark { font-family: var(--display); font-size: 1.125rem; color: var(--ink-blue); text-decoration: none; }
.nav__links { display: flex; gap: clamp(.75rem, 2.5vw, 1.75rem); flex-wrap: wrap; }
.nav__links a {
  font-size: .9375rem; text-decoration: none; color: var(--slate);
  padding-block: .25rem; border-bottom: 2px solid transparent;
}
.nav__links a:hover { color: var(--ink-blue); border-bottom-color: var(--dusty-blue); }

/* ---------- hero ---------- */
.hero { text-align: center; padding-block: clamp(3.5rem, 9vw, 6.5rem) var(--section-y); }
.hero__names {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.75rem, 9vw, 4.75rem);
  line-height: 1.05;
  color: var(--ink-blue);
  margin: 0 0 1rem;
}
.hero__amp { color: var(--apricot); font-style: italic; }
.hero__meta {
  font-size: clamp(1rem, 2.2vw, 1.1875rem);
  color: var(--slate);
  letter-spacing: .04em;
  margin: 0;
}
.hero__rule {
  width: 88px; height: 1px; margin: 2rem auto;
  background: linear-gradient(90deg, transparent, var(--tan), transparent);
  border: 0;
}
.hero__photo {
  margin-top: 3rem; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); aspect-ratio: 16 / 9;
  background: var(--sand);
  display: grid; place-items: center;
  color: var(--slate); font-size: .9375rem; text-align: center; padding: 1rem;
}

/* ---------- events ---------- */
.events { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.event {
  background: var(--cream);
  border: 1px solid rgba(169, 192, 220, .4);
  border-top: 4px solid var(--accent, var(--cornflower));
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow);
}
.event--one { --accent: var(--peach); }
.event--two { --accent: var(--sage); }
.event h3 { margin-bottom: .75rem; }
.event dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; font-size: .9375rem; }
.event dt { color: var(--slate); font-weight: 500; }
.event dd { margin: 0; }

/* ---------- practical / faq ---------- */
.info-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.info-card {
  background: var(--cream); border-radius: var(--radius);
  padding: 1.5rem; border-left: 3px solid var(--butter);
}
.info-card h3 { font-size: 1.125rem; margin-bottom: .4rem; }
.info-card p { font-size: .9375rem; margin-bottom: 0; }

details {
  border-bottom: 1px solid rgba(169, 192, 220, .45);
  padding-block: 1rem;
}
summary {
  cursor: pointer; font-weight: 500; color: var(--ink-blue);
  list-style: none; display: flex; justify-content: space-between; gap: 1rem;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--apricot); font-size: 1.25rem; line-height: 1; }
details[open] summary::after { content: "\2212"; }
details p { margin: .75rem 0 0; font-size: .9375rem; }

/* ---------- forms ---------- */
.field { margin-bottom: 1.25rem; }
label { display: block; font-size: .9375rem; font-weight: 500; margin-bottom: .35rem; }
.hint { font-size: .8125rem; color: var(--slate); font-weight: 400; }

input[type="text"], input[type="email"], textarea {
  width: 100%; padding: .7rem .85rem;
  font: inherit; font-size: 1rem;
  color: var(--ink); background: var(--cream);
  border: 1px solid var(--dusty-blue);
  border-radius: 9px;
}
input:focus-visible, textarea:focus-visible, button:focus-visible, summary:focus-visible, a:focus-visible {
  outline: 2px solid var(--cornflower);
  outline-offset: 2px;
}
textarea { min-height: 96px; resize: vertical; }

.guest-card {
  background: var(--cream);
  border: 1px solid rgba(169, 192, 220, .5);
  border-radius: var(--radius);
  padding: 1.5rem; margin-bottom: 1.25rem;
  position: relative;
}
.guest-card__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: 1rem;
}
.guest-card__title { font-family: var(--display); font-size: 1.125rem; color: var(--ink-blue); }

/* yes/no toggle */
.choice { display: flex; gap: .625rem; flex-wrap: wrap; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  margin: 0; padding: .5rem 1.1rem; cursor: pointer;
  border: 1px solid var(--dusty-blue); border-radius: 999px;
  font-size: .9375rem; font-weight: 500; color: var(--slate);
  background: var(--cream); transition: background .15s, color .15s, border-color .15s;
}
.choice input:checked + label { background: var(--cornflower); border-color: var(--cornflower); color: #fff; }
.choice input:focus-visible + label { outline: 2px solid var(--cornflower); outline-offset: 2px; }

.btn {
  font: inherit; font-weight: 700; font-size: 1rem;
  padding: .8rem 1.75rem; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; background: var(--apricot); color: #fff;
  transition: background .15s;
}
.btn:hover { background: #DE8760; }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn--ghost { background: transparent; color: var(--ink-blue); border-color: var(--dusty-blue); font-weight: 500; }
.btn--ghost:hover { background: var(--sand); }
.btn--link {
  background: none; border: 0; color: var(--slate); font-weight: 500;
  font-size: .875rem; cursor: pointer; padding: 0; text-decoration: underline;
}
.btn--link:hover { color: var(--error); }

.form-msg { padding: .85rem 1rem; border-radius: 9px; font-size: .9375rem; margin-bottom: 1.25rem; }
.form-msg--error { background: #F8E4DF; color: #8A3F2E; border: 1px solid var(--error); }
.form-msg[hidden] { display: none; }

.rsvp-done { text-align: center; padding: 2.5rem 1rem; }
.rsvp-done h3 { color: var(--eucalyptus); }

/* ---------- footer ---------- */
.footer {
  background: var(--ink-blue); color: var(--sand);
  text-align: center; padding-block: 3rem;
}
.footer a { color: var(--butter); }
.footer p { margin-inline: auto; }

/* ---------- admin ---------- */
.admin-tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 2.5rem; }
.tile {
  background: var(--cream); border: 1px solid rgba(169, 192, 220, .5);
  border-radius: var(--radius); padding: 1.25rem;
}
.tile__num { font-family: var(--display); font-size: 2.25rem; color: var(--ink-blue); line-height: 1; }
.tile__label { font-size: .8125rem; color: var(--slate); text-transform: uppercase; letter-spacing: .1em; margin-top: .4rem; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .9375rem; }
th, td { text-align: left; padding: .7rem .85rem; border-bottom: 1px solid rgba(169, 192, 220, .4); white-space: nowrap; }
th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--slate); font-weight: 700; }
td.wrap-cell { white-space: normal; min-width: 200px; }
.pill { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .8125rem; font-weight: 500; }
.pill--yes { background: #E4EDE3; color: var(--eucalyptus); }
.pill--no  { background: #F2E7E4; color: #8A5A4C; }
.pill--dupe { background: #FBE9D2; color: #6B4A2A; }
