/* ============================================================
   modals.css — Volunteer / Yard sign / RSVP modals + buttons
   Extracted from Matthew Van Pelt Website (Gary pattern) and adapted
   to Van Pelt brand tokens. Loaded after tokens.css in index.html.

   Modal styles target the vanilla DOM injected by script-modals.js
   (data-vmodal / data-ymodal / data-rmodal). They do NOT affect
   Van Pelt's React-rendered components — those use inline styles.

/* Gary token aliases → mapped to Van Pelt brand. The modal CSS uses
   these short names; we re-route them to the canonical Van Pelt
   color tokens defined in tokens.css. */
:root {
  --ink:        #0F1F38;                       /* van-pelt ink */
  --ink-2:      #1F2F48;                       /* van-pelt ink-soft */
  --ink-3:      #001026;                       /* deepest navy */
  --paper:      #F8F8FA;                       /* van-pelt paper */
  --paper-2:    #EFEFEF;                       /* van-pelt border-soft */
  --paper-3:    #E0E0E0;                       /* van-pelt border */
  --text:       #0F1F38;                       /* body text */
  --muted:      #6B6B6B;                       /* van-pelt muted */
  --line:       rgba(15,31,56,0.14);
  --line-soft:  rgba(15,31,56,0.07);
  --accent:     #002D62;                       /* van-pelt primary navy */
  --accent-2:   #001E45;                       /* darker navy */
  --gold:       #E1AD01;                       /* van-pelt gold */
  --gold-2:     #EBC32A;                       /* lighter gold */
  --on-ink:     #FFFFFF;
  --display:    'Bebas Neue', 'Impact', sans-serif;
  --body:       'Inter', system-ui, -apple-system, sans-serif;
  --mono:       'JetBrains Mono', ui-monospace, monospace;
  --max:        1360px;
  --gutter:     clamp(1.25rem, 3vw, 2.5rem);
  --section-y:  clamp(3rem, 6vw, 5.5rem);
  --radius:     14px;
  --radius-lg:  22px;
  --ease:       cubic-bezier(0.32, 0.72, 0, 1);
  --dur:        420ms;
}

/* ---- BUTTONS (Gary styles.css lines 107-147) ---- */
/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.5rem;
  border-radius: 999px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.96rem;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: background var(--dur) var(--ease),
              transform var(--dur) var(--ease),
              color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
  will-change: transform;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--primary { background: var(--accent); color: var(--on-ink); }
.btn--primary:hover { background: var(--accent-2); color: var(--on-ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--on-ink); }
.btn--ghost-on-dark { background: transparent; color: var(--on-ink); border-color: rgba(241,236,223,0.5); }
.btn--ghost-on-dark:hover { background: var(--on-ink); color: var(--ink); border-color: var(--on-ink); }
.btn--compact { padding: 0.6rem 1rem; font-size: 0.88rem; }
.btn--lg { padding: 1.2rem 1.75rem; font-size: 1.02rem; }
.btn--full { width: 100%; justify-content: center; }
.btn--inline {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding-bottom: 3px;
  font-size: 0.96rem;
}
.btn--inline:hover { color: var(--accent); border-color: var(--accent); }


/* ---- VMODAL (Gary styles.css lines 2070-2246) ---- */
.vmodal {
  position: fixed; inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2rem);
  opacity: 0; visibility: hidden;
  transition: opacity 240ms var(--ease), visibility 0s linear 240ms;
}
.vmodal[data-open="true"] {
  opacity: 1; visibility: visible;
  transition: opacity 240ms var(--ease), visibility 0s linear 0s;
}
.vmodal__backdrop {
  position: absolute; inset: 0;
  background: rgba(6, 12, 24, 0.62);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.vmodal__panel {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - clamp(2rem, 6vw, 4rem));
  overflow-y: auto;
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -30px rgba(15,27,45,0.55), 0 0 0 1px var(--line);
  padding: clamp(1.75rem, 3.5vw, 2.5rem) clamp(1.5rem, 3.5vw, 2.5rem) clamp(1.5rem, 3vw, 2rem);
  transform: translateY(8px) scale(0.98);
  transition: transform 260ms var(--ease);
}
.vmodal[data-open="true"] .vmodal__panel { transform: translateY(0) scale(1); }
.vmodal__panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--gold);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.vmodal__x {
  position: absolute; top: 0.9rem; right: 0.9rem;
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--muted);
  font-size: 1.4rem; line-height: 1;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.vmodal__x:hover { background: rgba(15,27,45,0.06); color: var(--ink); }
.vmodal__eyebrow {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.7rem;
}
.vmodal__eyebrow--gold { color: var(--gold); }
.vmodal__req {
  font-family: var(--mono); font-size: 0.65rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-left: 0.2rem;
}
.vmodal__field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
@media (max-width: 480px) {
  .vmodal__field-row { grid-template-columns: 1fr; }
}
.vmodal__field select {
  font-family: var(--body); font-size: 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff; color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.vmodal__field select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(176,37,43,0.15);
}
.vmodal__h {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  line-height: 1.05; letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 0.5rem;
}
.vmodal__sub {
  font-size: 0.96rem; color: var(--muted);
  margin: 0 0 1.4rem;
  max-width: 44ch;
}
.vmodal__form {
  display: flex; flex-direction: column; gap: 1rem;
}
.vmodal__field { display: flex; flex-direction: column; gap: 0.4rem; }
.vmodal__field label {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.vmodal__field input {
  font-family: var(--body); font-size: 1rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff; color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.vmodal__field input::placeholder { color: rgba(90,104,120,0.55); }
.vmodal__field input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(176,37,43,0.15);
}
.vmodal__checks {
  border: 0; padding: 0; margin: 0.3rem 0 0;
  display: flex; flex-direction: column; gap: 0.55rem;
}
.vmodal__checks legend {
  font-family: var(--body); font-size: 0.95rem; font-weight: 600;
  color: var(--ink); padding: 0; margin: 0 0 0.55rem;
}
.vmodal__check {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: 0.96rem; color: var(--ink); font-weight: 500;
  cursor: pointer;
  line-height: 1.3;
}
.vmodal__check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 20px; height: 20px;
  flex: 0 0 20px;
  border: 1.5px solid var(--ink);
  border-radius: 5px;
  background: #fff;
  display: inline-grid; place-content: center;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.vmodal__check input[type="checkbox"]::before {
  content: '';
  width: 11px; height: 11px;
  background: var(--accent);
  border-radius: 2px;
  transform: scale(0);
  transition: transform 140ms var(--ease);
}
.vmodal__check input[type="checkbox"]:checked {
  background: var(--accent); border-color: var(--accent);
}
.vmodal__check input[type="checkbox"]:checked::before {
  background: var(--paper);
  transform: scale(1);
  clip-path: polygon(14% 50%, 0 64%, 36% 100%, 100% 18%, 86% 6%, 36% 72%);
  border-radius: 0;
  width: 12px; height: 12px;
}
.vmodal__actions {
  display: flex; justify-content: flex-end; gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-soft);
}
@media (max-width: 520px) {
  .vmodal__panel { padding: 1.5rem 1.25rem 1.25rem; }
  .vmodal__actions { flex-direction: column-reverse; }
  .vmodal__actions .btn { width: 100%; }
}
/* Prevent background scroll when modal is open */
body.vmodal-open { overflow: hidden; }
