:root {
  --bg: #faf6ef;
  --bg-alt: #f3ebdd;
  --card: #fffdf9;
  --ink: #2e2a25;
  --ink-soft: #6b6258;
  --gold: #a8834a;
  --gold-dark: #7a5c2e;
  --line: #e4d8c4;
  --error: #a23b2a;
  --success: #3f6b45;
  --radius: 14px;
  --shadow: 0 10px 30px -12px rgba(70, 50, 20, 0.25);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.7;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--gold-dark); }
strong { font-weight: 500; }
.muted { color: var(--ink-soft); }

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--ink); color: #fff; padding: .5rem 1rem; border-radius: 6px; z-index: 10;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- Hero ---------- */
.hero {
  min-height: 92vh;
  min-height: 92svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1rem;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, .9), transparent 65%),
    radial-gradient(circle at 15% 85%, rgba(168, 131, 74, .14), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(168, 131, 74, .14), transparent 40%),
    var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 40rem; }

.eyebrow {
  margin: 0 0 .5rem;
  font-size: .8rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.hero-number {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(7rem, 30vw, 14rem);
  line-height: .9;
  background: linear-gradient(160deg, #c9a66b 10%, var(--gold-dark) 55%, #b8945a 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h1, h2 { font-family: var(--serif); font-weight: 500; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.4rem, 8vw, 3.75rem); letter-spacing: .01em; }

.hero-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  color: var(--ink-soft);
  margin: .25rem 0 0;
}

.ornament {
  display: flex; align-items: center; justify-content: center; gap: .9rem;
  color: var(--gold); margin: 1.75rem auto; font-size: .9rem;
}
.ornament span { width: 4rem; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament span:last-child { transform: scaleX(-1); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--gold-dark);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: .85rem 2rem;
  font: 500 .95rem/1 var(--sans);
  letter-spacing: .06em;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.btn:hover { background: #654a22; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .6; cursor: wait; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--gold-dark); box-shadow: inset 0 0 0 1px var(--gold); }
.btn-ghost:hover { background: var(--bg-alt); }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 9vw, 6rem) 1rem; max-width: 60rem; margin: 0 auto; }

.section-title {
  text-align: center;
  font-size: clamp(2rem, 6vw, 2.75rem);
  margin-bottom: 1.5rem;
}
.section-title::after {
  content: ""; display: block; width: 3rem; height: 1px; background: var(--gold); margin: 1rem auto 0;
}
.section-intro { text-align: center; color: var(--ink-soft); margin: -0.5rem 0 2rem; }

.intro { max-width: 40rem; text-align: center; }
.lead { font-family: var(--serif); font-size: clamp(1.25rem, 3.5vw, 1.5rem); line-height: 1.6; margin: 0; }
.placeholder-note { color: var(--ink-soft); font-size: .85rem; font-style: italic; }

/* ---------- Carousel ---------- */
.gallery { max-width: 64rem; }
.carousel { position: relative; }
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--bg-alt);
}
.carousel-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; margin: 0; scroll-snap-align: center; position: relative; }
.slide img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.slide figcaption {
  position: absolute; inset: auto 0 0 0;
  padding: 2.5rem 1.25rem 1rem;
  background: linear-gradient(transparent, rgba(30, 22, 12, .65));
  color: #fff;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
}
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  border: 0; background: rgba(255, 253, 249, .9); color: var(--gold-dark);
  font-size: 1.75rem; line-height: 1; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
  display: grid; place-items: center; padding-bottom: .2rem;
}
.carousel-btn.prev { left: .75rem; }
.carousel-btn.next { right: .75rem; }
.carousel-btn:hover { background: #fff; }
.carousel-dots { display: flex; justify-content: center; gap: .6rem; margin-top: 1.25rem; }
.carousel-dots button {
  width: .65rem; height: .65rem; padding: 0; border-radius: 50%;
  border: 1px solid var(--gold); background: transparent; cursor: pointer;
}
.carousel-dots button[aria-current="true"] { background: var(--gold); }

@media (max-width: 600px) {
  .carousel-btn { display: none; }
}

/* ---------- Invitation ---------- */
.invitation { max-width: 44rem; }
.invite-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(2.5rem, 7vw, 4rem) clamp(1.25rem, 6vw, 3.5rem);
  text-align: center;
  position: relative;
}
.invite-card::before {
  content: ""; position: absolute; inset: .6rem;
  border: 1px solid var(--line); border-radius: calc(var(--radius) - 6px); pointer-events: none;
}
.invite-card h2 { font-size: clamp(2.25rem, 7vw, 3rem); }
.invite-details { display: grid; gap: 1.5rem; margin: 0 0 1.75rem; }
@media (min-width: 560px) { .invite-details { grid-template-columns: 1fr 1fr; } }
.invite-details dt {
  font-size: .75rem; letter-spacing: .25em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: .25rem;
}
.invite-details dd { margin: 0; font-family: var(--serif); font-size: 1.35rem; line-height: 1.4; }
.invite-text { margin: 0 auto; max-width: 30rem; }

/* ---------- Form ---------- */
.signup { max-width: 40rem; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 5vw, 2.25rem);
  box-shadow: var(--shadow);
}
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1.1rem; min-width: 0; }
.field-row { display: grid; gap: 0 1rem; }
@media (min-width: 520px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .field-row-3 { grid-template-columns: repeat(3, 1fr); }
}
label { font-weight: 400; font-size: .95rem; }
.hint { color: var(--ink-soft); font-size: .85rem; }
input {
  width: 100%;
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .7rem .85rem;
  transition: border-color .2s, box-shadow .2s;
}
input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(168, 131, 74, .2); }
input[aria-invalid="true"] { border-color: var(--error); }

.menu-check { min-height: 1.5em; margin: -.25rem 0 1rem; font-size: .9rem; color: var(--error); }

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

.form-msg { margin: 1rem 0 0; padding: .85rem 1rem; border-radius: 8px; font-weight: 400; }
.form-msg.is-success { background: #e9f1e7; color: var(--success); }
.form-msg.is-error { background: #f7e6e2; color: var(--error); }

/* ---------- Footer ---------- */
.footer {
  text-align: center; padding: 2.5rem 1rem 3rem;
  border-top: 1px solid var(--line); background: var(--bg-alt); font-size: .95rem;
}
.footer p { margin: .25rem 0; }

/* ---------- Admin ---------- */
.admin-wrap { max-width: 70rem; margin: 0 auto; padding: 2rem 1rem 4rem; }
.admin-login { max-width: 24rem; padding-top: 15vh; }
.admin-login .card { display: flex; flex-direction: column; gap: .75rem; }
.admin h1 { font-size: 2.25rem; margin-bottom: 1.25rem; }
.admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.admin-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .75rem; margin: 0 0 1.5rem; }
.stats > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.stats dt { font-size: .75rem; letter-spacing: .15em; text-transform: uppercase; color: var(--ink-soft); }
.stats dd { margin: 0; font-family: var(--serif); font-size: 2.25rem; line-height: 1.2; }
.table-wrap { position: relative; overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: .65rem .9rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-weight: 500; background: var(--bg-alt); }
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; }

/* ---------- Directions ---------- */
.directions { max-width: 50rem; }
.map-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.map { display: block; width: 100%; height: clamp(16rem, 50vw, 24rem); border: 0; background: var(--bg-alt); }
.route-form { padding: clamp(1.25rem, 5vw, 1.75rem); display: flex; flex-direction: column; gap: .4rem; }
.route-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.route-row input { flex: 1 1 14rem; }
.route-row .btn { flex: 0 0 auto; }
.route-form .hint { margin: 0; }

.admin-edit { margin-bottom: 1.5rem; }
.admin-edit h2 { font-size: 1.6rem; margin-bottom: 1rem; }
.admin .form-msg { margin: 0 0 1.25rem; }
.row-actions { display: flex; gap: .15rem; justify-content: flex-end; }
.row-actions form { margin: 0; }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 1.9rem; height: 1.9rem; padding: 0;
  border: 0; border-radius: 6px; background: transparent;
  color: var(--ink-soft); cursor: pointer;
}
.icon-btn svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: var(--bg-alt); color: var(--gold-dark); }
.icon-btn-danger:hover { background: #f7e6e2; color: var(--error); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
