/* Nikah Scheduler — warm, soft, rounded. Sage green + muted gold on cream.
   Display face: Cormorant (self-hosted, see fonts.css). Body: a humanist sans
   stack. No Inter/Poppins, no dark chrome, no hard geometric edges. */
:root {
  --bg: #f7f4ee;           /* warm cream canvas */
  --surface: #fffdf8;      /* card surface, a touch warmer than white */
  --surface-2: #f1ece1;    /* soft fill */
  --ink: #2b2823;          /* warm near-black, ~13:1 on cream */
  --muted: #6f675b;        /* ~5.2:1 on cream */
  --accent: #4a6b52;       /* deep sage green, 5.4:1 on white */
  --accent-dark: #3a5541;
  --accent-soft: #e7efe6;  /* sage tint */
  --accent-ink: #ffffff;
  --gold: #9c7a2e;         /* muted gold, ~4.7:1 on cream for text */
  --gold-bright: #e9c46a;  /* decorative only */
  --line: #e3dccd;         /* warm hairline */
  --danger: #9e3b2f;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(60, 50, 30, 0.06), 0 2px 8px rgba(60, 50, 30, 0.05);
  --shadow: 0 6px 24px rgba(60, 50, 30, 0.09);
  --wrap: 1080px;
  --sans: 'Mulish Variable', 'Mulish', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Cormorant Variable', 'Cormorant', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }

h1, h2, h3, .brand, .section-title, legend { font-family: var(--display); font-weight: 600; letter-spacing: 0.2px; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.08; margin: 0 0 12px; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.15; }
h3 { font-size: 1.28rem; margin: 0 0 6px; }
p { margin: 0 0 14px; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--accent); color: #fff; padding: 10px 14px; border-radius: var(--radius-sm); z-index: 100; }

/* ---- Header ---- */
.site-header { background: rgba(255, 253, 248, 0.9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 16px; }
.brand { font-size: 1.4rem; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--gold); font-size: 1.5rem; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a { color: var(--ink); padding: 9px 12px; border-radius: var(--radius-sm); font-size: 0.98rem; font-weight: 500; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { background: var(--accent-soft); text-decoration: none; }
.nav-cta { background: var(--accent); color: var(--accent-ink) !important; font-weight: 600 !important; }
.nav-cta:hover { background: var(--accent-dark) !important; }
.nav-toggle { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; font: inherit; font-weight: 600; min-height: 44px; cursor: pointer; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 600; padding: 12px 20px; border-radius: var(--radius); border: 0; cursor: pointer; font-size: 0.98rem; font-family: var(--sans); box-shadow: var(--shadow-sm); min-height: 44px; transition: background 0.15s, transform 0.05s; text-align: center; }
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-sm { padding: 8px 14px; font-size: 0.88rem; min-height: 38px; }
.btn-ghost { background: transparent; color: var(--accent-dark); box-shadow: none; border: 1.5px solid var(--line); }
.btn-ghost:hover { background: var(--accent-soft); }
:focus-visible { outline: 2.5px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---- Hero ---- */
.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; padding: 56px 0 40px; }
.eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: 0.76rem; font-weight: 700; color: var(--gold); margin: 0 0 12px; }
.lede { font-size: 1.18rem; color: var(--muted); max-width: 58ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 14px; }
.hero-note { font-size: 0.92rem; color: var(--muted); }
.hero-panel { display: flex; justify-content: center; }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 26px; width: 100%; max-width: 360px; }
.hero-card-row { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.hero-card-row:last-child { border-bottom: 0; }
.hero-card-row span { color: var(--muted); }
.hero-card-row strong { color: var(--ink); text-align: right; }

/* ---- Sections ---- */
.section-title { position: relative; margin: 0 0 20px; }
.value { padding: 44px 0; border-top: 1px solid var(--line); }
.value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; }
.value-item h3 { color: var(--accent-dark); }
.value-item p { color: var(--muted); font-size: 0.97rem; margin: 0; }

.how-strip { padding: 44px 0; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.step-n { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-family: var(--sans); }
.steps h3 { font-size: 1.1rem; }
.steps p { color: var(--muted); font-size: 0.94rem; margin: 0; }

.featured { padding: 44px 0; border-top: 1px solid var(--line); }
.featured-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.link-more { font-weight: 600; }

.cta-band { text-align: center; background: var(--accent-soft); border-radius: var(--radius-lg); padding: 44px 24px; margin: 44px 0; }
.cta-band h2 { color: var(--accent-dark); }
.cta-band p { color: var(--muted); max-width: 52ch; margin: 0 auto 20px; }
.cta-inline { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* ---- Cards / directory ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); transition: transform 0.12s, box-shadow 0.12s; color: var(--ink); }
.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card-head h3 { margin: 0; }
.card-loc { color: var(--muted); font-size: 0.92rem; margin: 6px 0 2px; }
.card-madhhab { color: var(--accent-dark); font-weight: 600; font-size: 0.9rem; margin: 0 0 8px; }
.card-desc { color: var(--muted); font-size: 0.92rem; }
.card-cta { color: var(--accent-dark); font-weight: 600; font-size: 0.92rem; }

.badge { display: inline-block; font-size: 0.72rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.badge-sample { background: #f3ead6; color: #8a6a1f; }
.badge-verified { background: var(--accent-soft); color: var(--accent-dark); }
.badge-row { margin-top: 8px; }

/* ---- Page head + prose ---- */
.page-head { padding: 40px 0 22px; }
.prose { max-width: 72ch; padding-bottom: 30px; }
.prose h2 { margin-top: 30px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.ticks { list-style: none; padding-left: 0; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.legal p { color: var(--muted); }
.legal h2 { color: var(--ink); }

/* ---- Filters + forms ---- */
.filters { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.field-group { display: flex; flex-direction: column; gap: 5px; flex: 1 1 180px; }
.field-group label, .booking-form label { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.field { width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font: inherit; font-size: 1rem; background: #fff; color: var(--ink); min-height: 44px; }
.field:focus { outline: 2.5px solid var(--gold); outline-offset: 1px; border-color: var(--accent); }
.field-sm { min-height: 40px; padding: 8px 10px; font-size: 0.92rem; width: auto; }
textarea.field { min-height: 84px; resize: vertical; }

.booking-form { max-width: 780px; }
.step { border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; margin: 0 0 20px; background: var(--surface); }
.step legend { padding: 0 10px; font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
.step legend .step-n { width: 28px; height: 28px; font-size: 0.9rem; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 14px; }
.field-help { color: var(--muted); font-size: 0.9rem; margin-top: -4px; }
.form-actions { margin-top: 8px; }
.form-actions .small { margin-top: 10px; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; margin: 0; flex-wrap: wrap; }
.cf-turnstile { margin: 6px 0 14px; }

/* ---- Notices / pills ---- */
.notice { border-radius: var(--radius); padding: 13px 16px; margin: 0 0 18px; font-size: 0.96rem; border: 1px solid var(--line); background: var(--surface-2); }
.notice-ok { background: var(--accent-soft); border-color: #c9dcc7; color: var(--accent-dark); }
.notice-warn { background: #faf1dc; border-color: #ecd9a8; color: #7d5f1c; }
.pill { display: inline-block; font-size: 0.74rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.pill-pending { background: #faf1dc; color: #7d5f1c; }
.pill-confirmed, .pill-active { background: var(--accent-soft); color: var(--accent-dark); }
.pill-completed { background: #dbeadd; color: #2f5237; }
.pill-cancelled, .pill-suspended { background: #f4ded9; color: var(--danger); }
.lic { font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.lic-approved { background: var(--accent-soft); color: var(--accent-dark); }
.lic-pending { background: #faf1dc; color: #7d5f1c; }
.lic-rejected { background: #f4ded9; color: var(--danger); }
.lic-unverified { background: var(--surface-2); color: var(--muted); }

/* ---- Detail pages ---- */
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 30px; align-items: start; }
.detail-head h1 { margin-bottom: 4px; }
.detail-loc { color: var(--muted); }
.detail-desc { color: var(--muted); max-width: 68ch; }
.detail-side .side-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); position: sticky; top: 82px; }
.side-card h3 { color: var(--accent-dark); }
.side-card .btn { width: 100%; }
.imam-list, .avail-list { list-style: none; padding: 0; margin: 0 0 18px; }
.imam-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.imam-top { display: flex; align-items: center; gap: 10px; }
.imam-bio { color: var(--muted); font-size: 0.92rem; margin: 6px 0 0; }
.avail-list li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); }
.avail-list.editable li { align-items: center; }

/* ---- Booking view ---- */
.progress { list-style: none; display: flex; gap: 8px; padding: 0; margin: 18px 0 26px; flex-wrap: wrap; }
.progress li { flex: 1 1 auto; text-align: center; font-size: 0.82rem; font-weight: 600; color: var(--muted); padding: 10px 8px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); min-width: 90px; }
.progress li.done { background: var(--accent-soft); color: var(--accent-dark); border-color: #c9dcc7; }
.kv-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 24px; margin: 0; }
.kv > div { padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv dt { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted); font-weight: 700; }
.kv dd { margin: 2px 0 0; color: var(--ink); }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.data-table th, .data-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.data-table th { background: var(--surface-2); font-weight: 700; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; }
.data-table tr:last-child td { border-bottom: 0; }
.cell-actions { white-space: nowrap; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---- Dashboard ---- */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.dash-masjid { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.dash-sections { display: grid; gap: 30px; }
.dash-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.imam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 16px; }
.imam-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--bg); }
.lic-list { list-style: none; padding: 0; margin: 10px 0; font-size: 0.88rem; }
.lic-row { padding: 6px 0; }
.upload-details { margin-top: 10px; }
.upload-details summary { cursor: pointer; font-weight: 600; color: var(--accent-dark); font-size: 0.92rem; }
.account-actions { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.account-links { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.account-links form { margin: 0; }

/* ---- Review queue ---- */
.review-list { display: grid; gap: 16px; }
.review-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 60px; padding: 40px 0 30px; }
.footer-cols { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 22px; }
.footer-brand { font-family: var(--display); font-size: 1.25rem; font-weight: 600; margin: 0; }
.footer-brand span { color: var(--gold); }
.footer-tag { color: var(--muted); font-size: 0.92rem; margin: 4px 0 0; }
.footer-nav { display: flex; gap: 8px 18px; flex-wrap: wrap; align-items: center; }
.footer-nav a { color: var(--ink); font-size: 0.92rem; font-weight: 500; }
.footer-fineprint { color: var(--muted); font-size: 0.82rem; line-height: 1.55; max-width: 90ch; margin: 0 0 12px; }
.footer-copyright { color: var(--muted); font-size: 0.82rem; margin: 0; }

.small { font-size: 0.88rem; }
.muted { color: var(--muted); }
.eyebrow a { color: var(--accent-dark); }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 36px 0 24px; }
  .hero-panel { order: -1; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side .side-card { position: static; }
  .nav { position: absolute; top: 66px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px 20px 16px; gap: 2px; display: none; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { width: 100%; }
  .nav-toggle { display: inline-flex; }
  .header-inner { position: relative; flex-wrap: wrap; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .filters { flex-direction: column; align-items: stretch; }
  .cell-actions { flex-direction: column; }
}
