/* ============================================================
   Nouvelage® Quarterly Meeting — Invitation & RSVP
   Brand tokens (subset of the Nouvelage Design System) + page styles
   ============================================================ */

:root {
  --color-espresso: #58382C;
  --color-caramel:  #9E6E4A;
  --color-taupe:    #C3A494;
  --color-cream:    #FCF5F0;
  --color-peach:    #FFD4B4;
  --color-bark:     #5E4025;
  --color-mocha:    #755644;
  --color-bone:     #E9E0DB;
  --color-ash:      #686665;
  --color-white:    #FFFFFF;
  --color-paper:    #FBF8F2;
  --color-gold-light: #D9BF94;
  --color-error:    #B4452F;

  --border-subtle:  rgba(88, 56, 44, 0.08);
  --border-default: rgba(88, 56, 44, 0.12);
  --shadow-sm: 0 12px 32px -12px rgba(88, 56, 44, 0.15);
  --shadow-lg: 0 30px 60px -20px rgba(88, 56, 44, 0.20);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);

  --font-serif:  'Cormorant Garamond', Georgia, serif;
  --font-sans:   'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-script: 'Italianno', cursive;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--color-cream);
  color: var(--color-mocha);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--color-caramel); }
a:hover { color: var(--color-bark); }
[hidden] { display: none !important; }

.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--color-caramel);
}

/* ---------- Button ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 32px; min-height: 54px;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em; text-decoration: none;
  white-space: nowrap; cursor: pointer;
  background: var(--color-espresso); color: var(--color-cream);
  transition: all 300ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: #48291f; color: var(--color-cream); transform: translateY(-2px); box-shadow: 0 12px 32px -8px rgba(88,56,44,.18); }
.btn:focus-visible { outline: 2px solid var(--color-caramel); outline-offset: 3px; }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; box-shadow: none; }
.btn--ghost { background: transparent; color: var(--color-espresso); border-color: rgba(88,56,44,.25); }
.btn--ghost:hover { background: rgba(88,56,44,.04); color: var(--color-espresso); border-color: var(--color-espresso); transform: none; box-shadow: none; }
.btn--block { width: 100%; }

/* ---------- Layout ---------- */
.wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: clamp(24px,5vw,64px) clamp(16px,4vw,48px); }
.brand { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 18px; margin-bottom: clamp(24px,4vw,44px); }
.brand img { height: clamp(34px,5.5vw,50px); width: auto; }
.dots { display: flex; gap: 10px; margin-top: 4px; }
.dots i { width: 9px; height: 9px; border-radius: 999px; background: rgba(88,56,44,.18); transition: all 300ms var(--ease-out); }
.dots i.on { background: var(--color-caramel); }
.dots i.cur { transform: scale(1.5); }

.panel { width: 100%; margin: 0 auto; animation: pIn 500ms var(--ease-out) both; }
@keyframes pIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .panel { animation: none; } .btn:hover { transform: none; } }
.c { text-align: center; display: flex; flex-direction: column; align-items: center; }

.kicker { font-family: var(--font-serif); font-style: italic; color: var(--color-caramel); font-size: clamp(20px,2.6vw,28px); margin-bottom: 10px; }
.h1 { font-family: var(--font-serif); color: var(--color-espresso); font-size: clamp(34px,8.5vw,52px); line-height: 1.05; letter-spacing: -.02em; margin: 0 0 26px; font-weight: 500; text-wrap: balance; }
.h2 { font-family: var(--font-serif); color: var(--color-espresso); font-size: clamp(28px,7vw,40px); margin: 0 0 14px; font-weight: 500; letter-spacing: -.02em; text-wrap: balance; }
.lead2 { color: var(--color-mocha); font-size: clamp(16px,2vw,19px); line-height: 1.65; margin: 0 auto; max-width: 56ch; text-wrap: pretty; }

/* Cover — fixed aspect box prevents layout shift while the image loads */
.cover { width: 100%; max-width: 460px; aspect-ratio: 3 / 4; margin: 0 auto 28px; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--color-bone); }
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 55% center; }

/* ---------- Form ---------- */
.card2 { background: var(--color-white); border: 1px solid var(--border-subtle); border-radius: 12px; padding: clamp(24px,4vw,40px); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 22px; }
.f { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.f label, .f legend { font-family: var(--font-sans); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; color: var(--color-mocha); padding: 0; margin-bottom: 8px; }
.f label { margin-bottom: 0; }
.in { font-family: var(--font-sans); font-size: 16px; color: var(--color-espresso); background: var(--color-paper); border: 1px solid var(--border-default); border-radius: 8px; padding: 14px 16px; min-height: 52px; width: 100%; outline: none; -webkit-appearance: none; appearance: none; transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
.in::placeholder { color: var(--color-ash); }
.in:focus { border-color: var(--color-caramel); box-shadow: 0 0 0 3px rgba(158,110,74,.15); }
.in.bad { border-color: var(--color-error); }
.selw { position: relative; }
.selw::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border-right: 1.5px solid var(--color-caramel); border-bottom: 1.5px solid var(--color-caramel); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.selw select { padding-right: 44px; cursor: pointer; }
.selw select:invalid { color: var(--color-ash); }
.err { color: var(--color-error); font-size: 13px; }
.att { display: flex; gap: 12px; }
.att label { flex: 1; position: relative; margin: 0; letter-spacing: .04em; text-transform: none; font-size: 14px; }
.att input { position: absolute; opacity: 0; pointer-events: none; }
.att span { display: flex; align-items: center; justify-content: center; min-height: 52px; cursor: pointer; font-weight: 600; border-radius: 8px; border: 1px solid var(--border-default); background: var(--color-white); color: var(--color-espresso); transition: all 200ms var(--ease-out); text-align: center; padding: 0 10px; }
.att input:checked + span { background: var(--color-caramel); border-color: var(--color-caramel); color: var(--color-cream); }
.att input:focus-visible + span { outline: 2px solid var(--color-caramel); outline-offset: 2px; }
.att.bad span { border-color: var(--color-error); }
.back { background: none; border: 0; cursor: pointer; font-family: var(--font-sans); font-size: 13px; letter-spacing: .04em; color: var(--color-ash); padding: 12px; }
.note { font-size: 12px; color: var(--color-ash); text-align: center; }

/* ---------- Thank you / event card ---------- */
.tick { width: 64px; height: 64px; border-radius: 999px; border: 1px solid var(--color-caramel); display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; color: var(--color-caramel); }
.ty { font-family: var(--font-script); color: var(--color-caramel); font-size: clamp(40px,10vw,56px); line-height: .95; margin-bottom: 8px; }

.ev { position: relative; overflow: hidden; background: var(--color-espresso) 52% center / cover no-repeat; border-radius: 18px; max-width: 520px; margin: 0 auto; --evpt: clamp(280px,70vw,380px); padding: var(--evpt) clamp(22px,5vw,40px) clamp(28px,6vw,48px); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; justify-content: flex-end; }
.ev::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,12,8,0) 0, rgba(18,12,8,0) calc(var(--evpt) - 180px), rgba(18,12,8,.85) calc(var(--evpt) - 16px), rgba(18,12,8,.85) 100%); pointer-events: none; }
.ev > * { position: relative; }
.ev .k { font-family: var(--font-sans); text-transform: uppercase; letter-spacing: .2em; font-size: 12px; font-weight: 600; color: var(--color-gold-light); }
.ev .date { font-family: var(--font-serif); color: var(--color-cream); font-size: clamp(30px,8.4vw,44px); line-height: 1; margin-top: 14px; white-space: nowrap; }
.ev .day { font-family: var(--font-serif); font-style: italic; color: var(--color-peach); font-size: clamp(17px,4.4vw,20px); margin-top: 8px; }
.rows { border-top: 1px solid rgba(252,245,240,.16); margin-top: clamp(24px,4vw,36px); }
.row { display: flex; align-items: center; gap: clamp(16px,4vw,24px); padding: clamp(18px,3.4vw,24px) 4px; border-bottom: 1px solid rgba(252,245,240,.12); }
.row svg { flex: 0 0 auto; color: var(--color-peach); }
.row .v { font-family: var(--font-serif); color: var(--color-cream); font-size: clamp(18px,4.6vw,22px); line-height: 1.3; margin-top: 4px; }
.row .v small { display: block; font-family: var(--font-sans); font-size: 14px; color: var(--color-taupe); margin-top: 2px; }
.see { text-align: center; color: var(--color-peach); font-family: var(--font-serif); font-style: italic; font-size: clamp(17px,4.4vw,21px); margin: clamp(24px,4vw,34px) 0 0; }
.acts { display: flex; flex-direction: column; gap: 12px; margin: 24px auto 0; max-width: 380px; }

/* ---------- Save-card preview (long-press fallback) ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(28,20,15,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px 16px; }
.sheet img { max-height: 72vh; width: auto; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.4); -webkit-touch-callout: default; }
.sheet p { color: var(--color-cream); font-size: 14px; text-align: center; margin: 0; max-width: 32ch; line-height: 1.5; }
.sheet .btn--ghost { color: var(--color-cream); border-color: rgba(252,245,240,.4); }

@media (max-width: 420px) {
  .wrap { padding: 24px 16px 40px; }
  .card2 { padding: 22px 18px; }
  .ev { --evpt: clamp(240px,62vw,300px); padding: var(--evpt) 20px 30px; }
  .row { gap: 14px; }
  .row svg { width: 32px; height: 32px; }
  .att { flex-direction: column; }
  .h1 { margin-bottom: 20px; }
}
