/* Booking pages for St. Matthew's.
   Palette and typefaces follow the existing site: deep navy ground, warm gold
   accent, Cinzel for identity, Cormorant Garamond for display, Crimson Pro for
   reading. Nothing here should feel like a different website. */

:root {
  --navy-900: #0B1017;
  --navy-800: #10161F;
  --navy-700: #161E2A;
  --navy-600: #1E2836;
  --line: #253040;
  --line-soft: #1C2532;

  --cream: #ECE7DC;
  --cream-dim: #B9C0C9;
  --muted: #8794A5;

  --gold: #D4A64B;
  --gold-dim: #A67F2E;
  --gold-wash: rgba(212, 166, 75, 0.10);

  --ok: #6FB59A;
  --warn: #D9A845;
  --bad: #E0897B;

  --f-identity: "Cinzel", Georgia, serif;
  --f-display: "Cormorant Garamond", Georgia, serif;
  --f-body: "Crimson Pro", Georgia, serif;
  --f-ui: system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 3px;
  --pad: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--navy-900);
  color: var(--cream);
  font-family: var(--f-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.shell { max-width: 780px; margin: 0 auto; padding: var(--pad) var(--pad) 88px; }
.shell--wide { max-width: 1120px; }

/* ---------- masthead ---------- */

.crest {
  font-family: var(--f-identity);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 28px;
}
.crest:hover { color: var(--cream); }

h1 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
  margin: 0 0 12px;
  text-wrap: balance;
}
h1 em { font-style: italic; color: var(--gold); }

h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(20px, 2.6vw, 26px);
  margin: 0 0 10px;
}

.lede { font-size: 19px; color: var(--cream-dim); max-width: 56ch; margin: 0 0 32px; }
.eyebrow {
  font-family: var(--f-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- service picker ---------- */

.services { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.service {
  display: block;
  padding: 22px 24px;
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.service:hover, .service:focus-visible { border-color: var(--gold-dim); background: var(--navy-700); }
.service h2 { margin-bottom: 6px; }
.service p { margin: 0; font-size: 16px; color: var(--cream-dim); line-height: 1.45; }
.service .price {
  font-family: var(--f-ui);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--gold);
  display: block;
  margin-top: 12px;
}
.service--quiet { opacity: .82; }
.service--quiet .price { color: var(--muted); }

/* ---------- forms ---------- */

form { display: flex; flex-direction: column; gap: 22px; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 18px; }
legend {
  font-family: var(--f-ui);
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); padding: 0 0 4px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field label,
.field legend { font-family: var(--f-ui); font-size: 14px; font-weight: 500; color: var(--cream); }

/* A legend naming one question, not a section. The global legend style above is
   the gold uppercase section heading; without resetting those two properties
   this reads as a second "YOUR EVENT" and the form appears to start again. */
.field legend {
  padding: 0;
  margin-bottom: 12px;
  text-transform: none;
  letter-spacing: normal;
}

/* A group of radio choices: tighter than the 18px between separate fields, so
   the options read as one answer rather than several questions. */
.choices { gap: 9px; }

/* Present to a screen reader, invisible on screen. Used where a visible legend
   already names the group and a second label would only be read out twice. */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.field .hint { font-family: var(--f-ui); font-size: 13px; color: var(--muted); line-height: 1.45; }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="time"], input[type="number"], select, textarea {
  font-family: var(--f-ui);
  font-size: 16px;
  padding: 11px 13px;
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--cream);
  width: 100%;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--gold-dim);
  outline-offset: 1px;
  border-color: transparent;
}
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--bad); }

.row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.check { display: flex; gap: 11px; align-items: flex-start; }
.check input { margin-top: 5px; width: 17px; height: 17px; accent-color: var(--gold-dim); flex: none; }
.check label { font-family: var(--f-ui); font-size: 15px; line-height: 1.5; font-weight: 400; }

/* ---------- buttons ---------- */

button, .btn {
  font-family: var(--f-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--gold-dim);
  background: var(--gold);
  color: var(--navy-900);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}
button:hover:not(:disabled), .btn:hover { background: #E0B45C; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary, .btn.secondary {
  background: transparent; color: var(--cream); border-color: var(--line);
}
button.secondary:hover:not(:disabled) { border-color: var(--gold-dim); background: var(--navy-700); }
button.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
button.small { padding: 7px 14px; font-size: 13px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- quote panel ---------- */

.quote {
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.quote h2 { font-size: 19px; margin-bottom: 14px; }
.quote-line {
  display: flex; justify-content: space-between; gap: 20px;
  padding: 7px 0; border-bottom: 1px solid var(--line-soft);
  font-family: var(--f-ui); font-size: 15px; color: var(--cream-dim);
}
.quote-line:last-of-type { border-bottom: 0; }
.quote-total {
  display: flex; justify-content: space-between; gap: 20px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
  font-family: var(--f-ui); font-size: 17px; font-weight: 700; color: var(--cream);
}
.quote-note { font-family: var(--f-ui); font-size: 13.5px; color: var(--muted); margin-top: 14px; line-height: 1.5; }
.amount { font-variant-numeric: tabular-nums; }

/* ---------- notices ---------- */

.notice {
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  background: var(--navy-800);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: var(--f-ui);
  font-size: 15px;
  line-height: 1.55;
  color: var(--cream-dim);
}
.notice strong { color: var(--cream); }
.notice--bad { border-left-color: var(--bad); }
.notice--ok { border-left-color: var(--ok); }
.notice--wait { border-left-color: var(--warn); }
.notice[hidden] { display: none !important; }

.ref {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 1.05em;
  letter-spacing: .06em;
  color: var(--gold);
  background: var(--gold-wash);
  padding: 2px 8px;
  border-radius: var(--radius);
  white-space: nowrap;
}

/* ---------- tables (staff consoles) ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--navy-800); }
table { border-collapse: collapse; width: 100%; min-width: 640px; font-family: var(--f-ui); font-size: 14.5px; }
th, td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
thead th {
  font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.pill {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 2px; white-space: nowrap;
}
.pill--wait { background: rgba(217,168,69,.14); color: var(--warn); }
.pill--ok { background: rgba(111,181,154,.14); color: var(--ok); }
.pill--bad { background: rgba(224,137,123,.14); color: var(--bad); }

.empty { padding: 34px 20px; text-align: center; color: var(--muted); font-family: var(--f-ui); font-size: 15px; }

/* ---------- misc ---------- */

.stack { display: flex; flex-direction: column; gap: 22px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 6px 0; }
a { color: var(--gold); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
footer.parish {
  margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line);
  font-family: var(--f-ui); font-size: 13.5px; color: var(--muted);
}
.zeffy-frame { width: 100%; min-height: 720px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- dialog ----------
   The office console's "record a payment" form. A native <dialog> brings the
   focus trap, Escape-to-close and the backdrop for free; inputs and buttons are
   already styled globally, so only the chrome is set here. */
dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--navy-700);
  color: var(--cream);
  padding: clamp(22px, 4vw, 30px);
  max-width: 430px;
  width: calc(100% - 36px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
dialog::backdrop { background: rgba(6, 9, 14, .66); }
dialog h2 { font-family: var(--f-display); font-size: 26px; margin: 0 0 4px; }
dialog label {
  display: block;
  margin: 16px 0 6px;
  font-family: var(--f-ui);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
