/* ===== Design tokens (inspired by the watercolor invitation) ===== */
:root {
  --bg: #fbf8f2;          /* warm cream */
  --panel: #ffffff;        /* card surface */
  --border: #e3d9c6;       /* soft tan hairline */
  --gold: #c2a360;         /* frame / accent line */
  --gold-soft: #d8c391;
  --text: #3f3b36;         /* warm charcoal */
  --muted: #8a8076;        /* faded ink */
  --accent: #e08a7b;       /* coral rose */
  --accent-hover: #d4715f;
  --ok: #6f9168;
  --err: #c0584b;

  --serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Montserrat:wght@300;400;500;600&display=swap");

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 300;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ===== Centered screen (access gate) ===== */
.screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.screen.wide { justify-content: flex-start; }

/* ===== Floral accents ===== */
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.floral {
  display: block;
  aspect-ratio: 240 / 100;
}
.floral--lg { width: 300px; margin: 0 auto 0; }     /* hero centerpiece */
.floral--md { width: 180px; margin: 0 auto -6px; }   /* gate */
.floral--sm { width: 160px; margin: 0 auto -4px; }   /* RSVP card */

/* small sprig tucked into a card corner */
.floral--corner {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 56px;
  aspect-ratio: 1 / 1;
  opacity: 0.55;
}

/* ===== Card surface with gold double-line frame ===== */
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--gold-soft);
  border-radius: 4px;
  padding: 48px 40px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 16px 50px rgba(120, 100, 60, 0.12);
}
/* inner hairline of the double frame */
.card::after {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--border);
  border-radius: 2px;
  pointer-events: none;
}

/* ===== Landing page layout ===== */
.page { max-width: 920px; margin: 0 auto; padding: 0 24px 72px; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}
.nav-cta {
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--gold);
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.18s ease;
}
.nav-cta:hover { background: var(--gold); color: #fff; }

/* ===== Hero ===== */
.hero { text-align: center; max-width: 720px; margin: 72px auto 64px; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: 0.02em;
  margin: 0 0 20px;
}
.hero .accent { color: var(--accent); font-style: italic; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--gold);
  margin: 0 0 18px;
}
/* small decorative divider */
.divider {
  width: 64px;
  height: 1px;
  background: var(--gold);
  border: none;
  margin: 28px auto;
  position: relative;
}
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: translate(-50%, -50%) rotate(45deg);
}

.btn-primary {
  display: inline-block;
  margin-top: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 14px 34px;
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.18s ease;
}
.btn-primary:hover { background: var(--accent-hover); }

/* ===== Features ===== */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin: 0 auto 72px;
}
.feature {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 36px 28px;
  text-align: center;
}
.feature-icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 14px;
}
.feature h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  margin: 0 0 8px;
}
.feature p { margin: 0; color: var(--muted); }

/* ===== Footer ===== */
.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

/* ===== Headings ===== */
h1, h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.02em;
}
h1 { margin: 0 0 8px; }
h2 { margin: 0 0 4px; font-size: 1.9rem; }

.lead { font-size: 1.1rem; color: var(--text); font-weight: 300; }
.muted { color: var(--muted); margin-top: 0; letter-spacing: 0.04em; }

/* ===== Forms ===== */
form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }

input, textarea {
  background: #fffdf9;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 13px 15px;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 300;
}
input::placeholder, textarea::placeholder { color: #b3a99c; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
}
textarea { resize: vertical; }

button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  font-size: 0.82rem;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s ease;
}
button:hover { background: var(--accent-hover); }
button:disabled { opacity: 0.55; cursor: default; }

.link {
  background: none;
  color: var(--accent);
  padding: 0;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: underline;
}
.link:hover { background: none; color: var(--accent-hover); }

.error { color: var(--err); margin: 4px 0 0; font-size: 0.9rem; }
.status { margin: 4px 0 0; font-size: 0.9rem; }
.status.ok { color: var(--ok); }
.status.error { color: var(--err); }

main.card, main .card { max-width: 600px; margin: 0 auto 48px; }

/* ===== Admin table ===== */
.table-wrap { width: 100%; max-width: 1100px; margin: 0 auto; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td {
  text-align: left;
  padding: 11px 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.74rem;
  white-space: nowrap;
}
td.msg { white-space: pre-wrap; max-width: 360px; }
