@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Lato:wght@400;700&display=swap');

:root {
  --bg: #faf6f1;
  --surface: #ffffff;
  --text: #2e2a26;
  --muted: #7a7168;
  --accent: #a9825c;
  --accent-dark: #8a684a;
  --border: #e6ddd2;
  --card: rgba(255, 253, 248, 0.82);
  --yes: #4c7a52;
  --no: #a45252;
  --maybe: #b98a3a;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  font-family: 'Lato', sans-serif;
  line-height: 1.6;
}

/* Watercolor paper from the invitation, fixed behind everything. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('../img/paper.jpg') center / cover no-repeat;
}

/* Wildflower vines from the invitation down both sides, on screens wide enough
   to keep them clear of the content. */
@media (min-width: 1200px) {
  body::before {
    background:
      url('../img/flowers-left.webp') left center / auto 100% no-repeat,
      url('../img/flowers-right.webp') right center / auto 100% no-repeat,
      url('../img/paper.jpg') center / cover no-repeat;
  }
}

/* Mountain + meadow landscape from the invitation cover, at the bottom of every page. */
body::after {
  content: '';
  display: block;
  margin-top: auto;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 55vh;
  background: url('../img/landscape.webp') center top / cover no-repeat;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  margin: 0 0 0.5em;
}

.page {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2rem;
}

.hero {
  text-align: center;
  padding: 3rem 1.5rem 2rem;
}

.hero h1 {
  font-size: 2.6rem;
}

.hero .date {
  font-size: 1.2rem;
  color: var(--accent-dark);
  letter-spacing: 0.05em;
}

.card {
  background: var(--card);
  backdrop-filter: blur(2px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.4rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.placeholder {
  color: var(--muted);
  font-style: italic;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  font-size: 1rem;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn:hover {
  background: var(--accent-dark);
}

.btn.secondary {
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid var(--accent);
}

.btn.secondary:hover {
  background: var(--border);
}

.rsvp-cta {
  text-align: center;
  margin: 2rem 0;
}

input[type="text"], textarea, select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'Lato', sans-serif;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 4.5rem;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.field {
  margin-bottom: 1rem;
}

.guest-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  background: #fffdfb;
}

.guest-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.attending-options {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.attending-options label {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem;
  font-weight: 400;
  cursor: pointer;
  margin: 0;
}

.attending-options input {
  margin: 0;
}

.attending-options label.checked-yes { border-color: var(--yes); background: #eef5ef; }
.attending-options label.checked-no { border-color: var(--no); background: #f6ecec; }
.attending-options label.checked-maybe { border-color: var(--maybe); background: #f8f1e3; }

.message {
  padding: 0.85rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.message.error {
  background: #f6ecec;
  color: var(--no);
  border: 1px solid var(--no);
}

.message.success {
  background: #eef5ef;
  color: var(--yes);
  border: 1px solid var(--yes);
}

.hidden {
  display: none !important;
}

.center {
  text-align: center;
}

.top-nav {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}

.top-nav a {
  color: var(--accent-dark);
  text-decoration: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 700;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.summary-stat {
  text-align: center;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.summary-stat .number {
  font-size: 1.8rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
}

.summary-stat .label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.table-wrap {
  overflow-x: auto;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.tag.yes { background: #eef5ef; color: var(--yes); }
.tag.no { background: #f6ecec; color: var(--no); }
.tag.maybe { background: #f8f1e3; color: var(--maybe); }
.tag.pending { background: #efece7; color: var(--muted); }
