/* ============ Dusty blue palette ============ */
:root {
  --ink: #2c3f57;          /* deep dusty navy for text */
  --ink-soft: #4d6079;
  --dusty: #8aa4bf;        /* dusty blue */
  --dusty-deep: #6a87a6;   /* buttons */
  --dusty-dark: #58738f;   /* button hover */
  --dusty-soft: #cdd9e5;
  --sky: #e6edf4;
  --paper: #fbf9f4;
  --line: #b9c8d7;
  --serif: "Cormorant Garamond", Georgia, serif;
  --body: "EB Garamond", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); overscroll-behavior-y: none; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
[hidden] { display: none !important; }

/* watercolor sky */
.sky {
  background-color: var(--sky);
  background-image:
    radial-gradient(ellipse 60% 50% at 12% 20%, rgba(138,164,191,.35), transparent 70%),
    radial-gradient(ellipse 50% 60% at 88% 75%, rgba(138,164,191,.30), transparent 70%),
    radial-gradient(ellipse 40% 35% at 55% 10%, rgba(255,255,255,.75), transparent 70%),
    radial-gradient(ellipse 45% 40% at 30% 85%, rgba(255,255,255,.65), transparent 70%),
    radial-gradient(ellipse 35% 30% at 75% 35%, rgba(176,196,216,.35), transparent 70%);
}
.paper { background: var(--paper); }

/* ============ Shared bits ============ */
.btn {
  display: inline-block;
  background: var(--dusty-deep);
  color: #fff;
  font-family: var(--body);
  font-size: 1.35rem;
  letter-spacing: .02em;
  text-decoration: none;
  padding: .55em 2.4em;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(44,63,87,.15);
  transition: background .2s, transform .1s;
}
.btn:hover { background: var(--dusty-dark); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-sm { font-size: 1.05rem; padding: .35em 1.4em; }
.btn-block { display: block; width: 100%; text-align: center; padding: .6em 1em; }

.link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }
.caps { font-family: var(--body); text-transform: uppercase; letter-spacing: .28em; font-size: .85rem; }
.note { font-family: var(--serif); font-style: italic; font-size: 1.12rem; color: var(--ink-soft); margin: .25rem 0; }
.center { text-align: center; }
.sub { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 3.5vw, 2rem); margin: .2rem 0 0; }
.sign { font-family: var(--serif); font-style: italic; font-size: 1.8rem; margin: 0; line-height: 1.2; }
.rule { display: block; width: 140px; height: 1px; background: var(--dusty-deep); margin: 1.4rem auto; }

.corner { position: absolute; width: 260px; pointer-events: none; user-select: none; }
.corner-tr { top: -10px; right: -40px; }
.corner-tl { top: -10px; left: -40px; transform: scaleX(-1); }
.corner-bl { bottom: -10px; left: -40px; transform: rotate(180deg); }
.corner-br { bottom: -10px; right: -40px; transform: scaleY(-1); }

/* ============ Nav ============ */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: .7rem clamp(1rem, 5vw, 4rem);
  background: rgba(251,249,244,.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.nav nav { display: flex; align-items: center; gap: 1.8rem; }
.nav nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 1.1rem; }
.mono { font-family: var(--serif); font-style: italic; font-size: 2rem; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.nav-small { position: static; padding: .6rem 1.1rem; }
.nav-small .mono { font-size: 1.6rem; }

/* ============ Home ============ */
.hero {
  position: relative; overflow: hidden;
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) 1rem clamp(3rem, 7vw, 4.5rem);
}
.hero .corner-tr { width: clamp(180px, 28vw, 340px); }
.hero .corner-tl { width: clamp(120px, 18vw, 220px); opacity: .55; top: auto; bottom: -30px; transform: rotate(180deg); }
.eyebrow { text-transform: uppercase; letter-spacing: .3em; font-size: .85rem; margin: 0 0 1rem; }
.names {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(3.2rem, 11vw, 6.5rem); line-height: 1; margin: 0;
}
/* one consistent ampersand everywhere */
.amp { font-family: "Cormorant Garamond", Georgia, serif; font-style: normal; font-weight: inherit; color: inherit; padding: 0 .06em; }
.date { text-transform: uppercase; letter-spacing: .3em; font-size: clamp(.95rem, 2.4vw, 1.2rem); margin: 0 0 1.8rem; font-weight: 500; }
.place { font-size: 1.25rem; margin: .3rem 0 1.8rem; }

.celebration { padding: 2.5rem 1rem 3rem; text-align: center; }
.section-title {
  display: flex; align-items: center; gap: 1.5rem;
  max-width: 900px; margin: 0 auto 1.6rem;
  font-weight: 500; text-transform: uppercase; letter-spacing: .3em; font-size: 1.05rem;
}
.section-title::before, .section-title::after { content: ""; flex: 1; height: 1px; background: var(--dusty); }
.event h3 { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 2.4rem; margin: 0 0 .3rem; }
.event p { margin: .1rem 0; }
.event .time { letter-spacing: .2em; font-size: 1.2rem; font-weight: 500; }
.event .venue { font-size: 1.35rem; letter-spacing: .03em; }
.event .city { font-family: var(--serif); font-style: italic; font-size: 1.2rem; margin-bottom: .5rem; }
.event .link { font-size: 1.2rem; }

.join {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 4rem 1rem;
}
.join-copy { text-align: center; }
.join h2 { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(2.8rem, 7vw, 4.6rem); margin: 0; line-height: 1.05; }
.join .sub { font-size: 1.5rem; margin: .6rem 0 1.6rem; }

/* shared footer on every page */
.site-foot {
  position: relative; overflow: hidden;
  text-align: center; background: var(--paper);
  padding: 2rem 1rem 2.6rem; margin-top: auto;
}
.site-foot .corner { width: 150px; }
.site-foot .corner-bl, .site-foot .corner-br { bottom: -18px; }
.site-foot .sign, .site-foot .caps { position: relative; z-index: 1; }
.site-foot .caps { margin: .4rem 0 0; font-size: 1rem; }
.credit {
  position: absolute; left: 0; right: 0; bottom: .45rem; z-index: 1;
  margin: 0; text-align: center;
  font-family: var(--body); font-size: .8rem; letter-spacing: .08em; color: var(--ink-soft);
}
.credit a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.credit a:hover { color: var(--dusty-deep); }
.view.rsvp .site-foot { margin-top: auto; padding-top: 2.4rem; }
.view.rsvp .site-foot .sign { font-size: 1.6rem; }

@media (max-width: 720px) {
  .nav nav { gap: 1rem; }
  .hero .corner-tr { right: -60px; top: -20px; }
}

/* ============ RSVP pages (phone-style column) ============ */
body.rsvp-mode { background: var(--dusty-soft); }
.view.rsvp {
  position: relative; overflow: hidden;
  max-width: 500px; min-height: 100vh;
  margin: 0 auto;
  display: flex; flex-direction: column;
  background: var(--paper);
  padding-bottom: 0;
  box-shadow: 0 0 40px rgba(44,63,87,.12);
}
.back {
  position: absolute; top: 14px; left: 14px; z-index: 5;
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(251,249,244,.9); border: 1px solid var(--line);
  box-shadow: 0 1px 4px rgba(44,63,87,.12);
  transition: background .2s;
}
.back:hover { background: #fff; }
.back svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.view.rsvp > *:not(.back):not(.rsvp-head):not(.done-head):not(.site-foot):not(.seats) { margin-left: 1.25rem; margin-right: 1.25rem; }

.rsvp-head { position: relative; overflow: hidden; text-align: center; padding: 3.6rem 1.2rem 1.6rem; }
.rsvp-head .corner-tr { width: 170px; right: -30px; top: -20px; }
.script { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(2.4rem, 10vw, 3.2rem); line-height: 1.05; margin: .2rem 0; }
.script-sm { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 2rem; margin: 0; line-height: 1.1; }
.couple { font-family: var(--serif); font-style: italic; font-size: 1.7rem; margin: 0; }
.rsvp-head .caps { margin: .2rem 0; font-weight: 500; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.2rem;
  margin-top: 1.2rem;
  box-shadow: 0 1px 3px rgba(44,63,87,.06);
}
.card > .script-sm, .card > .note { text-align: center; }
label { display: block; font-family: system-ui, sans-serif; font-size: .9rem; font-weight: 600; margin: 1rem 0 .3rem; }
.search { display: flex; align-items: center; gap: .6rem; border: 1px solid var(--dusty-deep); border-radius: 6px; padding: 0 .8rem; background: #fff; margin-bottom: .9rem; }
.search svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2; flex: none; }
.search input { border: 0; outline: 0; font: inherit; font-size: 1.15rem; padding: .55rem 0; width: 100%; background: transparent; color: var(--ink); }
.search:focus-within { box-shadow: 0 0 0 3px rgba(106,135,166,.25); }

.result { border: 1px solid var(--line); border-radius: 6px; margin-top: 1rem; overflow: hidden; text-align: center; }
.result-head { background: var(--sky); font-family: var(--serif); font-style: italic; font-size: 1.2rem; padding: .35rem; }
.result h3 { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.7rem; margin: .7rem .5rem 0; }
.result ul { list-style: none; padding: 0; margin: .6rem 1.2rem; text-align: left; border-top: 1px solid var(--line); }
.result li { padding: .35rem .8rem; border-bottom: 1px solid #e3e9ef; font-size: 1.15rem; }
.result li:last-child { border-bottom: 0; }
.btn-outline { display: block; width: calc(100% - 3rem); margin: .4rem auto 1rem; background: transparent; color: var(--ink); border: 1px solid var(--dusty-deep); border-radius: 6px; font: inherit; font-size: 1.2rem; padding: .4rem; cursor: pointer; }
.btn-outline:hover { background: var(--sky); }
.empty { text-align: center; padding: 1rem .5rem 0; }

.help { text-align: center; margin-top: 1.4rem; }

/* confirm */
.seats { position: relative; overflow: hidden; margin: .5rem 1.25rem 1rem; border: 1px solid var(--line); border-radius: 8px; text-align: center; padding: 1rem 0 .9rem; }
.seats .corner { width: 120px; top: auto; bottom: -25px; }
.seats .corner-tl { transform: rotate(180deg) scaleY(-1); left: -30px; }
.seats .corner-tr { transform: none; right: -30px; bottom: -35px; }
.seats-num { position: relative; display: block; font-family: var(--serif); font-size: 4rem; font-weight: 600; line-height: 1; }
.seats .caps { position: relative; font-weight: 500; }
.deadline { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: .5rem .2rem; margin-top: 1rem !important; }
.deadline .caps { font-size: .8rem; }
.notice { background: var(--sky); border-radius: 6px; padding: .5rem .8rem; font-style: italic; text-align: center; margin-top: 1rem !important; }
.confirm-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: 1.2rem !important; }
.pill { background: var(--sky); border-radius: 999px; padding: .15rem .75rem; font-size: .95rem; white-space: nowrap; }

.guest { border: 1px solid var(--line); border-radius: 6px; padding: .6rem .8rem .8rem; margin-top: .7rem; }
.guest-name { font-size: 1.25rem; font-weight: 500; margin: 0 0 .4rem; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  margin: 0; text-align: center; cursor: pointer;
  font-family: var(--body); font-weight: 400; font-size: 1.1rem;
  border: 1px solid var(--dusty-deep); border-radius: 5px; padding: .3rem .4rem;
  background: #fff; transition: background .15s, color .15s;
}
.choice label:hover { background: var(--sky); }
.choice input:checked + label { background: var(--dusty-deep); color: #fff; }
.choice input:focus-visible + label { box-shadow: 0 0 0 3px rgba(106,135,166,.35); }
.tally { text-align: center; font-family: var(--serif); font-style: italic; font-size: 1.3rem; margin: 1rem 0; }
.error { color: #9a3b3b; text-align: center; margin: 0 0 .8rem; }
#confirm-form .btn-block { font-size: 1.4rem; }
#confirm-form { margin-bottom: 2rem !important; }

/* done */
.done-head { position: relative; overflow: hidden; background: var(--dusty-deep); color: #fff; text-align: center; padding: 1.6rem 1.2rem 1.6rem; }
.done-head .corner { width: 130px; top: -15px; }
.done-head .corner-tl { left: -25px; }
.done-head .corner-tr { right: -25px; }
.done-head p { position: relative; margin: .2rem 0 0; font-size: 1.1rem; }
.check { position: relative; width: 70px; height: 70px; fill: none; stroke: #fff; stroke-width: 2; }
.check path { stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.done-head .script { position: relative; color: #fff; }
.done-meta { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: 1.2rem !important; margin-bottom: .6rem !important; }
.done-meta .caps { font-size: .75rem; letter-spacing: .14em; }
.details { padding: .6rem; }
.details h4 { background: var(--sky); text-transform: uppercase; letter-spacing: .2em; font-weight: 500; font-size: .85rem; margin: .3rem 0; padding: .35rem .8rem; border-radius: 4px; }
.details ul { list-style: none; margin: 0 0 .4rem; padding: 0 .6rem; }
.details li { display: flex; align-items: center; gap: .8rem; padding: .35rem 0; border-bottom: 1px solid #e3e9ef; font-size: 1.2rem; }
.details li:last-child { border-bottom: 0; }
.details .mark { width: 22px; text-align: center; color: var(--dusty-deep); font-size: 1.2rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.2rem 1.25rem; }
.thanks { text-align: center; font-size: 1.3rem; margin: 0; }
#view-done .btn-block { margin-top: 1.2rem; width: auto; }

.demo-badge {
  position: fixed; left: 50%; bottom: 10px; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-family: system-ui, sans-serif; font-size: .78rem;
  padding: .35rem .8rem; border-radius: 999px; opacity: .85; z-index: 50; white-space: nowrap;
}

/* ============ Preview watermark (toggle WATERMARK in config.js) ============ */
.watermark {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none; user-select: none;
  background-repeat: repeat;
  background-size: 340px 220px;
}
.watermark-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10000;
  background: rgba(44,63,87,.88); color: #fff;
  text-align: center; font-family: system-ui, sans-serif; font-size: .78rem; letter-spacing: .12em;
  text-transform: uppercase; padding: .4rem .5rem;
  pointer-events: none;
}
body.has-watermark { padding-top: 1.8rem; }
