/* Zion Fire Academy — enrollment module styles.
   Self-contained; retheme by editing the variables below to match zion.study. */
:root {
  --bg: #faf9f7;
  --surface: #ffffff;
  --border: #e2ded8;
  --text: #211d1a;
  --muted: #6f6a63;
  --accent: #ED1C24;        /* Zion brand red */
  --accent-hover: #C4151C;
  --success: #2e6b2a;
  --radius: 10px;
  --shadow: 0 8px 30px rgba(33, 29, 26, 0.08);
  --font: 'Satoshi', -apple-system, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.55; font-size: 16px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.15; }
.brand small { color: var(--muted); font-size: 12px; }
.link-btn { background: none; border: none; font: inherit; color: var(--accent); cursor: pointer; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }

.demo-banner { background: #fdf3e4; color: #7a4b12; text-align: center; padding: 8px 16px; font-size: 14px; border-bottom: 1px solid #f0dcbb; }

/* Hero */
.hero { padding: 56px 0 40px; max-width: 720px; position: relative; }
.hero h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.hero h1 .accent { color: var(--accent); }
.hero h1::after { content: ''; display: block; width: 120px; height: 5px; border-radius: 3px; margin-top: 14px;
  background: linear-gradient(90deg, #ED1C24, #E65100, #E8960C, #2E7D32, #1565C0, #6A1B9A); }
.hero p { color: var(--muted); font-size: 17px; }

/* Catalog */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { font-size: 13px; font-weight: 600; color: var(--cat, var(--accent)); background: color-mix(in srgb, var(--cat, var(--accent)) 9%, white); border: 1.5px solid color-mix(in srgb, var(--cat, var(--accent)) 35%, white); padding: 6px 13px; border-radius: 99px; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; transition: all .15s ease; }
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cat, var(--accent)); }
.chip:hover { background: var(--cat, var(--accent)); color: #fff; }
.chip:hover .dot { background: #fff; }
.catalog-sections { padding-bottom: 24px; }
.cat-section { padding: 26px 0 8px; }
.cat-head { max-width: 640px; margin-bottom: 18px; border-left: 5px solid var(--cat, var(--accent)); padding-left: 14px; }
.cat-head h2 { font-size: 22px; letter-spacing: -0.015em; margin-bottom: 4px; color: color-mix(in srgb, var(--cat, var(--accent)) 75%, black); }
.cat-head p { color: var(--muted); font-size: 14.5px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.loading { color: var(--muted); }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.badge.free { background: #e7f0e5; color: var(--success); }
.badge.sponsored { background: #eee9e2; color: #6f6a63; }
.badge.soon-badge { background: #f0ead9; color: #8a6a15; }
.course-card.soon { opacity: .82; }
.curriculum summary { cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--accent); }
.curriculum ul { margin: 8px 0 2px 18px; font-size: 13.5px; color: var(--muted); display: grid; gap: 4px; }
.curriculum li.locked { list-style: none; margin-left: -18px; padding: 6px 10px; background: var(--bg); border: 1px dashed var(--border); border-radius: 6px; color: var(--muted); font-weight: 500; }
.curriculum li.locked::before { content: '\1F512  '; font-size: 12px; }
.teaser-note { border-top: 1px solid var(--border); margin-top: 28px; padding: 22px 0 8px; color: var(--muted); font-size: 14.5px; max-width: 720px; }
.free-box .kpi { color: var(--success); }
.course-card { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--cat, var(--accent)); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; transition: box-shadow .18s ease, transform .18s ease; }
.course-card:hover { box-shadow: 0 10px 32px color-mix(in srgb, var(--cat, var(--accent)) 20%, transparent); transform: translateY(-2px); }
.course-card h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.course-card .desc { color: var(--muted); font-size: 14.5px; flex: 1; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--cat, var(--accent)) 10%, white); color: color-mix(in srgb, var(--cat, var(--accent)) 85%, black); width: fit-content; }
.meta { font-size: 13px; color: var(--muted); }
.cost-row { display: flex; align-items: baseline; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 12px; }
.cost-row .total { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cost-row .commit { font-size: 12.5px; color: var(--muted); text-align: right; }
.btn { font: inherit; font-weight: 500; border-radius: 8px; padding: 10px 18px; cursor: pointer; border: 1px solid transparent; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: none; border-color: var(--border); color: var(--text); }
.btn.block { width: 100%; }

/* Legal links */
.legal-links { border-top: 1px solid var(--border); padding: 36px 0 56px; }
.legal-links h2 { font-size: 18px; margin-bottom: 12px; }
.legal-links ul { list-style: none; display: grid; gap: 8px; }
.legal-links a { color: var(--accent); text-decoration: none; font-size: 15px; }
.legal-links a:hover { text-decoration: underline; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(24, 20, 17, 0.55); display: flex; align-items: center; justify-content: center; padding: 18px; z-index: 50; }
.modal-overlay[hidden] { display: none; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 680px; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 24px 70px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 24px 12px; }
.modal-head h2 { font-size: 20px; letter-spacing: -0.01em; }
.step-label { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.close-btn { background: none; border: none; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; }
.progress { height: 3px; background: var(--border); margin: 0 24px; border-radius: 2px; }
.progress-bar { height: 100%; width: 20%; background: var(--accent); border-radius: 2px; transition: width .25s ease; }
.modal-body { padding: 18px 24px; overflow-y: auto; flex: 1; }
.modal-foot { display: flex; justify-content: space-between; gap: 12px; padding: 14px 24px 20px; border-top: 1px solid var(--border); }

/* Schedule A table */
.sched-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 10px 0 14px; }
.sched-table th, .sched-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.sched-table td:last-child, .sched-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.sched-table tfoot td { font-weight: 700; border-top: 2px solid var(--text); border-bottom: none; }
.tier-box { background: linear-gradient(135deg, #fdf1f1, #fef7ec); border: 1px solid #f3ddd0; border-radius: var(--radius); padding: 14px 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; text-align: center; }
.tier-box .kpi { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }
.tier-box > div:nth-child(2) .kpi { color: #E65100; }
.tier-box > div:nth-child(3) .kpi { color: #2E7D32; }
.tier-box .kpi-label { font-size: 12px; color: var(--muted); }
.note { font-size: 13.5px; color: var(--muted); margin-top: 10px; }

/* Document viewer step */
.doc-frame { border: 1px solid var(--border); border-radius: 8px; height: 320px; overflow-y: auto; padding: 16px 18px; background: var(--bg); font-size: 14.5px; }
.doc-frame h1, .doc-frame h2, .doc-frame h3 { margin: 14px 0 6px; line-height: 1.25; }
.doc-frame table { border-collapse: collapse; margin: 8px 0; }
.doc-frame th, .doc-frame td { border: 1px solid var(--border); padding: 5px 8px; font-size: 13px; }
.scroll-hint { font-size: 13px; color: var(--accent); margin-top: 8px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 15px; }
.check-row input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }

/* Form fields */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 5px; }
.field input { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.sig-preview { font-family: 'Snell Roundhand', 'Segoe Script', cursive; font-size: 26px; min-height: 40px; border-bottom: 1.5px solid var(--text); padding: 4px 8px; margin: 8px 0 4px; }
.error-msg { color: #a12c2c; font-size: 14px; margin-top: 8px; }

/* Success + my courses */
.success-box { text-align: center; padding: 26px 10px; }
.success-box .check { width: 58px; height: 58px; border-radius: 50%; background: #e7f0e5; color: var(--success); font-size: 30px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.envelope-id { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; background: var(--bg); border: 1px solid var(--border); padding: 6px 12px; border-radius: 6px; display: inline-block; margin-top: 8px; }
.enroll-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 10px; }
.enroll-item .status { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.status.active { color: var(--success); }
.status.pending_signature { color: #9a6a12; }

.site-footer { border-top: 1px solid var(--border); padding: 26px 0 40px; color: var(--muted); font-size: 14px; }

@media (max-width: 560px) {
  .tier-box { grid-template-columns: 1fr; }
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
}

/* LMS handoff */
.header-nav { display: flex; gap: 18px; align-items: center; }
.lms-link { text-decoration: none; }
.btn.lms { background: var(--text); color: #fff; text-decoration: none; display: inline-block; margin-top: 12px; }
.btn.lms:hover { background: #000; }
.site-footer a { color: var(--accent); }
