/* Ministry Media Lab — site-wide styles */

:root {
  --ink: #0e1726;
  --ink-2: #16233a;
  --ink-3: #1e2f4d;
  --paper: #faf9f6;
  --card: #ffffff;
  --accent: #e9a13b;
  --accent-deep: #b97a1e;
  --accent-soft: #fdf3e3;
  --muted: #5b6472;
  --line: #e7e3da;
  --good: #16a34a;
  --warn: #d97706;
  --bad: #dc2626;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(14, 23, 38, .08);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }

/* Fade-only entrance (no movement — no layout shift) */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: fadeIn .5s ease both; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 10px;
  font-weight: 700; font-size: 15px; text-decoration: none; border: 0; cursor: pointer;
  font-family: var(--font-body); transition: background .18s, color .18s, box-shadow .18s;
}
.btn-accent { background: var(--accent); color: var(--ink); }
.btn-accent:hover { background: #f0b055; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-3); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.btn-light { background: #fff; color: var(--ink); }
.btn-sm { padding: 8px 16px; font-size: 13.5px; border-radius: 8px; }
.btn-danger { background: var(--bad); color: #fff; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 249, 246, .92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 11px; background: var(--ink); color: var(--accent);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 24px; font-weight: 700;
  flex: 0 0 42px;
}
.brand-text { font-weight: 800; font-size: 13.5px; line-height: 1.18; letter-spacing: .02em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--ink); opacity: .82; }
.site-nav a:hover, .site-nav a.on { opacity: 1; color: var(--accent-deep); }
.site-nav .nav-portal { opacity: 1; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); padding: 9px 16px; border-radius: 9px; font-size: 14px; }
.site-nav .nav-portal:hover { box-shadow: inset 0 0 0 2px var(--accent); color: var(--ink); }
.site-nav .nav-cta { opacity: 1; padding: 11px 20px; font-size: 14px; }
.nav-burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-burger span { display: block; width: 24px; height: 2.5px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 55%, #24365a 100%);
  color: #fff; padding: 96px 0 110px; position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -180px; top: -180px; width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(233, 161, 59, .22), transparent 65%); pointer-events: none;
}
.hero-kicker { color: var(--accent); font-weight: 800; letter-spacing: .22em; text-transform: uppercase; font-size: 13px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 62px); max-width: 780px; margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p.lede { font-size: 19px; max-width: 620px; color: #c9d2e2; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-proof { margin-top: 56px; display: flex; gap: 36px; flex-wrap: wrap; }
.hero-proof .stat b { display: block; font-family: var(--font-display); font-size: 30px; color: var(--accent); }
.hero-proof .stat span { font-size: 13.5px; color: #9fabc2; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-ink { background: var(--ink); color: #fff; }
.kicker { color: var(--accent-deep); font-weight: 800; letter-spacing: .2em; text-transform: uppercase; font-size: 12.5px; margin-bottom: 12px; }
.section-ink .kicker { color: var(--accent); }
.section h2 { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 14px; max-width: 640px; }
.section .section-lede { color: var(--muted); font-size: 17px; max-width: 640px; margin-bottom: 44px; }
.section-ink .section-lede { color: #b6c1d6; }
.center { text-align: center; }
.center h2, .center .section-lede { margin-left: auto; margin-right: auto; }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow);
}
.card .card-icon {
  width: 52px; height: 52px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-deep);
  display: grid; place-items: center; font-size: 24px; margin-bottom: 18px;
}
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }
.card ul { margin: 12px 0 0 18px; color: var(--muted); font-size: 14.5px; }
.card ul li { margin-bottom: 6px; }
.card-link { text-decoration: none; display: block; transition: box-shadow .18s, border-color .18s; }
.card-link:hover { border-color: var(--accent); box-shadow: 0 14px 36px rgba(14,23,38,.12); }

/* ---------- Package tiers ---------- */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.tier { display: flex; flex-direction: column; }
.tier .tier-name { font-family: var(--font-display); font-size: 24px; }
.tier .tier-tag { color: var(--accent-deep); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.tier ul { list-style: none; margin: 18px 0 26px; }
.tier ul li { padding: 8px 0 8px 28px; position: relative; color: var(--muted); font-size: 15px; border-bottom: 1px dashed var(--line); }
.tier ul li::before { content: '✓'; position: absolute; left: 0; color: var(--good); font-weight: 800; }
.tier .btn { margin-top: auto; text-align: center; }
.tier-featured { border: 2px solid var(--accent); position: relative; }
.tier-featured::before {
  content: 'Most requested'; position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: var(--ink); font-size: 12px; font-weight: 800; padding: 3px 14px; border-radius: 20px;
  letter-spacing: .05em;
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 26px 22px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-display); font-size: 34px; color: var(--accent); display: block; margin-bottom: 10px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { font-size: 14px; color: #b6c1d6; }

/* ---------- Work / case studies ---------- */
.case { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 48px 0; border-bottom: 1px solid var(--line); }
.case:last-child { border-bottom: 0; }
.case-visual {
  border-radius: var(--radius); min-height: 280px; display: grid; place-items: center;
  background: linear-gradient(150deg, var(--ink-2), var(--ink-3)); color: var(--accent);
  font-family: var(--font-display); font-size: 26px; text-align: center; padding: 30px;
}
.case h3 { font-size: 26px; margin-bottom: 12px; }
.case p { color: var(--muted); margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip { background: var(--accent-soft); color: var(--accent-deep); font-size: 12.5px; font-weight: 700; padding: 5px 13px; border-radius: 20px; }
.chip-dark { background: rgba(255,255,255,.1); color: #dbe4f2; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(140deg, var(--ink), #24365a); color: #fff; border-radius: 20px; padding: 60px 48px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(26px, 3.2vw, 36px); max-width: 520px; }
.cta-band p { color: #b6c1d6; margin-top: 8px; max-width: 480px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
label.field { display: block; font-weight: 600; font-size: 14px; }
label.field span { display: block; margin-bottom: 7px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=number], input[type=url], select, textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 15px; background: #fff; color: var(--ink); transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 13px; color: var(--muted); }

/* ---------- Auth card ---------- */
.auth-wrap { min-height: calc(100vh - 74px); display: grid; place-items: center; padding: 60px 20px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .card { padding: 40px 36px; }
.auth-card h1 { font-size: 28px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 15px; margin-bottom: 26px; }
.auth-card form > * + * { margin-top: 16px; }
.auth-card .btn { width: 100%; }

/* ---------- Portal / admin layout ---------- */
.dash { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 74px); }
.dash-side { background: var(--ink); color: #cfd8e6; padding: 28px 0; }
.dash-side a {
  display: flex; align-items: center; gap: 12px; padding: 12px 26px; text-decoration: none;
  color: #cfd8e6; font-weight: 600; font-size: 14.5px; border-left: 3px solid transparent;
}
.dash-side a:hover { color: #fff; background: rgba(255,255,255,.05); }
.dash-side a.on { color: #fff; border-left-color: var(--accent); background: rgba(255,255,255,.07); }
.dash-side .side-label { padding: 20px 26px 8px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #7d8aa3; font-weight: 800; }
.dash-main { padding: 40px 44px; min-width: 0; }
.dash-main h1 { font-size: 30px; margin-bottom: 6px; }
.dash-sub { color: var(--muted); margin-bottom: 32px; }
.dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 8px; }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 34px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.stat-card b { display: block; font-family: var(--font-display); font-size: 30px; }
.stat-card span { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------- Tables ---------- */
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.list th { text-align: left; padding: 14px 18px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 14px 18px; border-bottom: 1px solid #f1eee7; vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: #fcfbf8; }
table.list a { font-weight: 600; }

/* ---------- Pills ---------- */
.pill { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; letter-spacing: .03em; white-space: nowrap; }
.pill-new, .pill-sent, .pill-active, .pill-in_progress { background: #e0edff; color: #1d4ed8; }
.pill-contacted, .pill-planning, .pill-pending, .pill-draft { background: #f1f5f9; color: #475569; }
.pill-converted, .pill-accepted, .pill-paid, .pill-done, .pill-completed { background: #dcfce7; color: #15803d; }
.pill-archived, .pill-declined, .pill-void, .pill-on_hold { background: #fee2e2; color: #b91c1c; }
.pill-review { background: #fef3c7; color: #b45309; }

/* ---------- Messages thread ---------- */
.thread { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.msg { max-width: 78%; padding: 13px 17px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 14.5px; }
.msg .msg-meta { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.msg-mine { align-self: flex-end; background: var(--ink); color: #fff; border-color: var(--ink); }
.msg-mine .msg-meta { color: #9fabc2; }

/* ---------- Milestones ---------- */
.milestones { list-style: none; }
.milestones li { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.milestones li:last-child { border-bottom: 0; }
.ms-dot { width: 22px; height: 22px; border-radius: 50%; flex: 0 0 22px; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: #eef0f3; color: #94a3b8; }
.ms-done .ms-dot { background: var(--good); color: #fff; }
.ms-in_progress .ms-dot { background: var(--accent); color: var(--ink); }
.ms-done .ms-title { text-decoration: line-through; color: var(--muted); }
.ms-due { margin-left: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; }

/* ---------- Prose (proposals) ---------- */
.prose { font-size: 16px; }
.prose h2, .prose h3 { margin: 26px 0 10px; }
.prose p, .prose ul, .prose ol { margin-bottom: 14px; color: #333d4d; }
.prose ul, .prose ol { padding-left: 22px; }

/* ---------- Toasts ---------- */
#mmlToasts { position: fixed; right: 20px; bottom: 20px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 12px; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 12px 32px rgba(0,0,0,.25); animation: fadeIn .3s ease both; max-width: 340px;
  border-left: 4px solid var(--accent);
}
.toast-error { border-left-color: var(--bad); }
.toast-success { border-left-color: var(--good); }

/* ---------- Confirm modal ---------- */
.mml-modal-wrap {
  position: fixed; inset: 0; z-index: 998; background: rgba(14, 23, 38, .45);
  display: grid; place-items: center; padding: 20px; animation: fadeIn .15s ease both;
}
.mml-modal {
  background: #fff; border-radius: 14px; padding: 26px 26px 20px; max-width: 420px; width: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
}
.mml-modal p { font-weight: 600; margin-bottom: 18px; }
.mml-modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #b6c1d6; padding: 64px 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 48px; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { display: block; color: #b6c1d6; text-decoration: none; padding: 5px 0; font-size: 14.5px; }
.site-footer a:hover { color: var(--accent); }
.site-footer .brand-light .brand-text { color: #fff; }
.footer-brand p { font-size: 14px; margin-top: 16px; max-width: 300px; }
.footer-cta-copy { font-size: 14px; margin-bottom: 16px; }
.site-footer .btn { display: inline-block; }
.footer-legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 26px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; color: #7d8aa3; }
.footer-verse { font-style: italic; }

/* ---------- FAQ ---------- */
details.faq { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 22px; margin-bottom: 12px; }
details.faq summary { cursor: pointer; font-weight: 700; padding: 18px 0; font-size: 16px; list-style: none; position: relative; padding-right: 30px; }
details.faq summary::after { content: '+'; position: absolute; right: 4px; font-size: 22px; color: var(--accent-deep); }
details.faq[open] summary::after { content: '–'; }
details.faq p { color: var(--muted); padding-bottom: 18px; font-size: 15px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-3, .tiers, .steps, .stat-row { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .case { grid-template-columns: 1fr; }
  .dash { grid-template-columns: 1fr; }
  .dash-side { display: flex; overflow-x: auto; padding: 0; position: sticky; top: 74px; z-index: 50; }
  .dash-side .side-label { display: none; }
  .dash-side a { border-left: 0; border-bottom: 3px solid transparent; white-space: nowrap; padding: 14px 18px; }
  .dash-side a.on { border-bottom-color: var(--accent); }
  .dash-main { padding: 28px 20px; }
}
@media (max-width: 720px) {
  .site-nav {
    display: none; position: absolute; top: 74px; left: 0; right: 0; background: #fff;
    flex-direction: column; align-items: stretch; padding: 18px 24px 24px; gap: 4px;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 4px; }
  .site-nav .nav-portal, .site-nav .nav-cta { text-align: center; margin-top: 8px; }
  .nav-burger { display: block; }
  .grid-2, .grid-3, .tiers, .steps, .form-grid, .stat-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 72px; }
  .section { padding: 56px 0; }
  .cta-band { padding: 40px 26px; }
  .msg { max-width: 92%; }
}
