@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600&display=swap");
:root {
  --forest: #183e32;
  --deep: #102c25;
  --cream: #f5f1e6;
  --gold: #e3bd7b;
  --ink: #253c32;
  --muted: #687467;
  --line: #d9dacc;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 30px;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  line-height: 1.65;
}
a {
  color: inherit;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  text-underline-offset: 5px;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
:focus-visible {
  outline: 3px solid #c68632;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: auto;
  padding: 0 5%;
  font-size: 11px;
  letter-spacing: 2px;
}
.topbar a:last-child {
  font-size: 12px;
  letter-spacing: 0;
}
.brand {
  font-family: Georgia, serif;
  font-size: 26px;
  text-decoration: none;
}
.brand span {
  font-size: 13px;
  color: #aa814c;
}
.hero {
  max-width: 1440px;
  margin: auto;
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: var(--forest);
  color: var(--cream);
  padding: 70px 8% 110px;
  gap: 65px;
  overflow: hidden;
}
.hero-copy {
  z-index: 1;
  align-self: center;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 3px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 22px;
}
.hero .eyebrow {
  color: var(--gold);
}
h1,
h2,
h3 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.1;
  font-weight: 500;
}
h1 {
  font-size: clamp(44px, 4.8vw, 72px);
  margin: 0 0 25px;
  letter-spacing: -2px;
}
h1 em {
  color: var(--gold);
  font-weight: 500;
}
h2 {
  font-size: clamp(34px, 3.7vw, 50px);
  margin: 0 0 25px;
  letter-spacing: -1px;
}
h3 {
  font-size: 24px;
  margin: 14px 0;
}
p {
  margin: 0 0 20px;
}
.intro {
  font-size: 15px;
  max-width: 400px;
  color: #d0dbcf;
}
.date-line {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 28px 0 32px;
  font-size: 10px;
  letter-spacing: 1px;
}
.date-line > strong {
  font-family: Georgia, serif;
  font-size: 57px;
  font-weight: 400;
  line-height: 1;
}
.date-time {
  border-left: 1px solid #6d8072;
  padding-left: 18px;
  font-size: 16px;
  letter-spacing: 0;
}
.date-time small {
  font-size: 11px;
  color: #c9d2c3;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 15px 23px;
  border: 0;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  min-height: 48px;
}
.gold {
  background: var(--gold);
  color: var(--deep);
}
.outline {
  background: transparent;
  border: 1px solid #a8b3a4;
}
.portrait {
  position: relative;
  max-width: 420px;
  border: 1px solid #b59b6b;
  padding: 12px;
  border-radius: 200px 200px 8px 8px;
  z-index: 1;
  justify-self: center;
  width: 100%;
  height: 580px;
}
.portrait > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  border-radius: 190px 190px 0 0;
  filter: saturate(0.8);
}
.portrait-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: linear-gradient(transparent, #0b211de6);
  padding: 50px 10px 22px;
  text-align: center;
  font-family: Georgia, serif;
  font-size: 30px;
}
.portrait-label span {
  display: block;
  font:
    9px "DM Sans",
    sans-serif;
  letter-spacing: 3px;
  margin-top: 12px;
}
.age-seal {
  position: absolute;
  right: -30px;
  bottom: 70px;
  background: var(--gold);
  color: var(--forest);
  border-radius: 50%;
  width: 95px;
  height: 95px;
  text-align: center;
  font:
    48px Georgia,
    serif;
  padding: 7px;
  border: 5px double var(--forest);
  transform: rotate(10deg);
}
.age-seal small {
  display: block;
  font: 9px sans-serif;
  letter-spacing: 2px;
}
.forest {
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 100px;
  background: var(--deep);
  clip-path: polygon(
    0 80%,
    2% 60%,
    4% 80%,
    4% 30%,
    7% 75%,
    9% 0,
    12% 70%,
    14% 40%,
    17% 85%,
    25% 92%,
    35% 82%,
    47% 100%,
    60% 90%,
    73% 92%,
    80% 75%,
    83% 20%,
    86% 80%,
    90% 0,
    94% 70%,
    96% 35%,
    99% 90%,
    100% 100%,
    0 100%
  );
}
.weather {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  padding: 24px 8%;
  background: #ebe2ce;
  font-size: 13px;
}
.weather > span {
  font-size: 30px;
}
.weather p {
  margin: 0;
  max-width: 850px;
}
.weather strong {
  display: block;
}
.section {
  max-width: 1100px;
  margin: auto;
  padding: 85px 35px;
}
.welcome {
  text-align: center;
  padding-bottom: 20px;
}
.welcome p:not(.eyebrow) {
  color: var(--muted);
}
.village {
  max-width: 500px;
  margin: 45px auto 0;
}
.village svg {
  display: block;
}
.details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
  align-items: center;
  border-top: 1px solid var(--line);
}
.address {
  font-size: 17px;
}
.text-link {
  font-size: 13px;
  font-weight: 700;
}
.paper-card {
  background: #ede9dc;
  border: 1px solid #d9d0ba;
  padding: 35px;
  text-align: center;
  border-radius: 120px 120px 8px 8px;
}
.small-icon {
  color: #a57e43;
  font-size: 30px;
}
.paper-card hr {
  border: 0;
  border-top: 1px solid #d2cbb9;
  margin: 24px auto;
  width: 50px;
}
.muted {
  font-size: 12px;
  color: var(--muted);
}
.rsvp {
  max-width: none;
  background: var(--forest);
  color: var(--cream);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  padding: 75px max(35px, calc((100vw - 1030px) / 2)) 0;
}
.rsvp > div > p {
  max-width: 400px;
}
.rsvp .eyebrow {
  color: var(--gold);
}
.rsvp-abi {
  height: 260px;
  width: 160px;
  object-fit: contain;
  background: #fff;
  border-radius: 100px 100px 0 0;
  margin-top: 12px;
  display: block;
}
.rsvp-card {
  background: var(--cream);
  color: var(--ink);
  padding: 35px;
  border-radius: 8px;
  align-self: start;
  margin-bottom: 70px;
  min-width: 0;
}
.rsvp-card .button {
  width: 100%;
  margin: 25px 0 15px;
}
.family-name {
  font-family: Georgia, serif;
  font-size: 24px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
legend {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 14px;
}
.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #cdd2c3;
  padding: 13px;
  margin: 8px 0;
  border-radius: 4px;
  font-size: 14px;
}
.choice:has(input:checked) {
  border-color: var(--forest);
  background: #e4e8db;
}
input[type="radio"] {
  accent-color: var(--forest);
  width: 18px;
  height: 18px;
}
.counts {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}
.counts label {
  width: 50%;
  font-size: 12px;
}
input,
select {
  border: 1px solid #b9c2b1;
  border-radius: 4px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
  max-width: 100%;
}
.counts input {
  width: 100%;
  display: block;
  margin-top: 6px;
}
#rsvp-status {
  margin: 0;
  font-weight: 600;
}
.gifts {
  text-align: center;
}
.gift-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: left;
  margin-top: 40px;
}
.gift-grid article {
  border-top: 1px solid #b5bca8;
  padding: 24px 15px;
}
.gift-grid article > span {
  font-size: 11px;
  color: #95733e;
  letter-spacing: 2px;
}
.gift-grid p {
  font-size: 14px;
  color: var(--muted);
}
.parking {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 45px;
  border-top: 1px solid var(--line);
}
iframe {
  width: 100%;
  height: 350px;
  border: 0;
  border-radius: 8px;
  background: #d8dfd0;
}
.map-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 25px 0 15px;
}
.map-tabs .button {
  padding: 10px;
  font-size: 12px;
}
footer {
  background: var(--deep);
  color: var(--cream);
  text-align: center;
  padding: 55px 20px;
}
footer p {
  font-size: 13px;
  margin: 10px;
}
footer > span:last-child {
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--gold);
}
.footer-name {
  font:
    italic 65px "Playfair Display",
    Georgia,
    serif;
}
/* Private administration */
.admin-shell {
  max-width: 1280px;
  margin: auto;
  padding: 35px 24px;
}
.admin-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 30px;
}
.admin-nav .brand {
  margin-right: auto;
}
.admin-nav a {
  font-size: 13px;
}
.admin-title {
  font-size: 38px;
}
.login-card {
  max-width: 440px;
  padding: 35px;
  margin: 70px auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.login-card label {
  display: block;
}
.login-card input {
  width: 100%;
  margin: 10px 0 20px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin: 25px 0;
}
.metric {
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.metric b {
  font: 36px Georgia;
  display: block;
}
.metric span {
  font-size: 12px;
}
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 25px 0;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
th {
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: #e9eddf;
}
th,
td {
  padding: 15px;
  border-bottom: 1px solid #e6e8e1;
  vertical-align: top;
}
td small {
  display: block;
  color: var(--muted);
}
.badge {
  display: inline-block;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11px;
  background: #e9eedf;
  white-space: nowrap;
}
.badge.yes,
.badge.sent,
.badge.delivered,
.badge.manual_sent {
  background: #d5ebd7;
  color: #265534;
}
.badge.no,
.badge.failed {
  background: #f5dfd7;
  color: #8d3930;
}
.badge.uncertain,
.badge.sending {
  background: #f5e6bc;
  color: #775600;
}
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 220px;
}
.row-actions button,
.row-actions a {
  padding: 5px 9px;
  background: var(--cream);
  border: 1px solid #d7dccf;
  border-radius: 4px;
  text-decoration: none;
  font-size: 11px;
}
.notice {
  padding: 14px 20px;
  background: #e8eadc;
  border-radius: 6px;
  margin: 15px 0;
}
.error {
  color: #a32626;
}
.device-panel {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  padding-top: 25px;
}
.pairing {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #fff;
  padding: 20px;
}
.device-row {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 760px) {
  .topbar {
    height: 70px;
    padding: 0 22px;
  }
  .topbar > span {
    display: none;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 45px 26px 85px;
    gap: 35px;
  }
  .hero-copy {
    text-align: center;
  }
  h1 {
    font-size: 49px;
  }
  .intro {
    margin-left: auto;
    margin-right: auto;
  }
  .date-line {
    justify-content: center;
  }
  .portrait {
    height: 440px;
    max-width: 320px;
  }
  .age-seal {
    right: -12px;
  }
  .weather {
    padding: 22px;
    font-size: 12px;
  }
  .section {
    padding: 55px 25px;
  }
  .details,
  .rsvp,
  .parking {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .details {
    padding-top: 40px;
  }
  .rsvp {
    padding: 55px 25px;
  }
  .rsvp-abi {
    display: none;
  }
  .rsvp-card {
    margin: 0;
    padding: 25px;
  }
  .gift-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .gift-grid article {
    padding: 20px 0;
  }
  .gifts p {
    margin-bottom: 10px;
  }
  .parking iframe {
    height: 320px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .admin-shell {
    padding: 24px 16px;
  }
  .admin-title {
    font-size: 32px;
  }
  .village {
    margin-top: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Persistent guest response controls, independent of scroll position. */
[hidden] { display: none !important; }
.invitation-page { padding-bottom: calc(var(--rsvp-height, 190px) + 24px); }
.invitation-page .hero h1 { font-size: clamp(2.4rem, 4.5vw, 4.5rem); }
.rsvp-dock { position: fixed; inset: auto 0 0; z-index: 50; background: var(--deep); color: var(--cream); padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 24px #0003; text-align: center; }
.rsvp-dock p { margin: 0 0 6px; }
.rsvp-dock #rsvp-status:empty { display: none; }
.rsvp-dock #rsvp-status { font-size: .85rem; margin: 6px 0 0; }
.dock-actions { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.rsvp-dock .outline { color: var(--cream); border-color: var(--gold); }
.rsvp-dock .button { margin: 0; padding: 11px 20px; }
#rsvp-dialog { border: 0; border-radius: 18px; padding: 24px; background: var(--cream); color: var(--ink); width: min(92vw, 520px); max-height: 85dvh; overflow: auto; }
#rsvp-dialog::backdrop { background: #102c25b3; }
#rsvp-dialog h2 { font-size: 2rem; }
#rsvp-dialog .counts { margin: 20px 0; }
button:disabled { opacity: .6; cursor: wait; }
@media (max-width: 420px) {
 .rsvp-dock { padding-inline: 10px; }
 .rsvp-dock .button { padding: 10px 12px; font-size: .85rem; }
 .dock-actions { gap: 8px; }
}

.invitation-page .hero { padding-top: 35px; }
.invitation-page .hero .eyebrow { margin-bottom: 11px; }
.hero-address { display: inline-block; color: var(--gold); font-size: 1.1rem; text-underline-offset: 5px; }
.hero-address:hover { color: var(--cream); }
.hospitality { text-align: center; margin: 0; padding: 20px 24px 0; }
@media (max-width: 760px) {
 .invitation-page .hero { padding-top: 22.5px; }
}

.invitation-page .hero h1 { letter-spacing: .015em; }
.hospitality { font-size: clamp(1.25rem, 2.3vw, 1.7rem); font-weight: 600; padding: 28px 24px 0; }
.contact-line { font-size: .95rem; margin: 12px 0; }
.contact-line a { color: var(--gold); text-underline-offset: 4px; white-space: nowrap; }
.gift-link { display: inline-flex; align-items: center; gap: 12px; margin-top: 14px; color: var(--gold); text-underline-offset: 5px; font-size: 1.05rem; }
.gift-link img { width: 80px; height: 80px; object-fit: contain; }
#gifts { scroll-margin-top: 20px; }
footer .contact-line { margin-top: 24px; }
