/* MatchIQmd — shared site styles */

:root {
  --brand: #1F4E79;
  --brand-dark: #163a5c;
  --accent: #2E75B6;
  --soft: #D9E2F3;
  --bg: #F5F7FB;
  --card: #FFFFFF;
  --text: #1F2937;
  --muted: #6B7280;
  --line: #E5E7EB;
  --green: #16A34A;
  --amber: #D97706;
  --red: #DC2626;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.6em; color: var(--brand); font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1em; padding-left: 1.3em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--brand);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--brand);
  font-weight: 800;
  font-size: 1.15rem;
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.main-nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--brand);
  text-decoration: none;
}
.main-nav a[aria-current="page"] {
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  border: 1px solid var(--brand);
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); text-decoration: none; }
.btn.btn-accent { background: var(--accent); border-color: var(--accent); }
.btn.btn-accent:hover { background: #24608f; border-color: #24608f; }
.btn.btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1.5px solid var(--brand);
}
.btn.btn-ghost:hover { background: var(--soft); text-decoration: none; }
.btn.btn-on-dark { background: #fff; color: var(--brand); border-color: #fff; }
.btn.btn-on-dark:hover { background: var(--soft); }
.btn.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ============ Hero ============ */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  color: #fff;
}
.hero .container {
  padding-top: 72px;
  padding-bottom: 72px;
  display: grid;
  gap: 20px;
  max-width: 780px;
}
.hero .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: #cfe0f4;
}
.hero h1 { color: #fff; margin-bottom: 0.3em; }
.hero p.lead { color: #e2ecf8; font-size: 1.15rem; max-width: 620px; }
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

.page-hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  color: #fff;
}
.page-hero .container { padding-top: 56px; padding-bottom: 56px; max-width: 820px; }
.page-hero h1 { color: #fff; margin-bottom: 0.35em; }
.page-hero p { color: #e2ecf8; font-size: 1.08rem; max-width: 640px; }

/* ============ Sections ============ */
section { padding: 64px 0; }
section.tight { padding: 40px 0; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}

.alt { background: #fff; }
.alt + .alt { background: var(--bg); }

/* ============ Cards / grids ============ */
.grid {
  display: grid;
  gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 0.5em; }
.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-size: 1.3rem;
}

.step-card { position: relative; padding-top: 36px; }
.step-card .step-num {
  position: absolute;
  top: -14px;
  left: 24px;
  background: var(--brand);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(31,78,121,0.35);
}

/* ============ Badges / chips ============ */
.badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--soft);
  color: var(--brand);
  border-radius: 999px;
  padding: 5px 12px;
}
.badge.on-dark { background: rgba(255,255,255,0.15); color: #fff; }

/* ============ Pricing / services table ============ */
.pricing-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, 1fr);
  align-items: stretch;
}
.pricing-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.pricing-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46, 117, 182, 0.15), var(--shadow);
}
.pricing-card .tier-name { font-weight: 800; color: var(--brand); font-size: 1.3rem; margin-bottom: 4px; }
.pricing-card .tier-desc { color: var(--muted); font-size: 0.92rem; margin-bottom: 20px; }
.pricing-card ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.pricing-card li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
}
.pricing-card li:last-child { border-bottom: 0; }
.pricing-card li .check { color: var(--green); flex-shrink: 0; font-weight: 700; }

.addon-card {
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px;
}

/* ============ Timeline ============ */
.match-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.match-timeline::before {
  content: "";
  position: absolute;
  left: 19px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}
.match-timeline li {
  position: relative;
  padding: 0 0 32px 56px;
}
.match-timeline li:last-child { padding-bottom: 0; }
.match-timeline li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--accent);
}
.match-timeline .when {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.match-timeline h3 { margin-bottom: 6px; }
.match-timeline p { color: var(--muted); margin-bottom: 0; }

/* ============ FAQ (details/summary) ============ */
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 20px;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 700;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-answer { padding: 0 0 18px; color: var(--muted); }
.faq-item .faq-answer p:last-child { margin-bottom: 0; }

/* ============ Glossary ============ */
.glossary-list { display: grid; gap: 20px; }
.glossary-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
}
.glossary-item h3 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.glossary-item .abbr { color: var(--muted); font-weight: 500; font-size: 0.85rem; }
.glossary-item .official-link { font-size: 0.85rem; font-weight: 600; }

/* ============ Resource cards ============ */
.resource-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
}
.resource-card .tag { color: var(--accent); font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.resource-card .more { margin-top: auto; font-weight: 700; }

/* ============ CTA band ============ */
.cta-band {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: #e2ecf8; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-band .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* ============ Org strip ============ */
.org-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.org-strip span { white-space: nowrap; }

/* ============ Forms ============ */
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.form-field .hint { font-weight: 400; color: var(--muted); font-size: 0.8rem; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  color: var(--text);
  background: #fff;
}
.form-field textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { font-size: 0.85rem; color: var(--muted); margin-top: 14px; }
.form-status { display: none; margin-top: 16px; padding: 12px 16px; border-radius: 8px; font-size: 0.9rem; }
.form-status.success { display: block; background: #DCFCE7; color: #166534; }
.form-status.error { display: block; background: #FEE2E2; color: #991B1B; }

.contact-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 16px;
}
.contact-panel h3 { margin-bottom: 6px; font-size: 1rem; }
.contact-panel p { color: var(--muted); font-size: 0.92rem; }
.contact-panel a { font-weight: 700; }

/* ============ Table ============ */
.table-wrap { overflow-x: auto; }
table.compare {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
table.compare th, table.compare td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}
table.compare th { background: var(--bg); color: var(--brand); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
table.compare tr:last-child td { border-bottom: 0; }

/* ============ Footer ============ */
.site-footer {
  background: #0F172A;
  color: #cbd5e1;
  padding: 56px 0 28px;
  margin-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-grid h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a { color: #cbd5e1; font-size: 0.92rem; }
.footer-grid a:hover { color: #fff; }
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-brand .brand .mark { background: #fff; color: var(--brand); }
.footer-brand p { color: #94a3b8; font-size: 0.9rem; max-width: 320px; }
.footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: #94a3b8;
}
.footer-bottom a { color: #94a3b8; }
.footer-bottom a:hover { color: #fff; }

/* ============ 404 ============ */
.not-found {
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 24px;
}
.not-found .code { font-size: 0.9rem; font-weight: 700; letter-spacing: 0.1em; color: var(--accent); text-transform: uppercase; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  body.nav-open .main-nav {
    display: block;
    position: fixed;
    inset: 68px 0 0 0;
    background: #fff;
    padding: 24px;
    overflow-y: auto;
    z-index: 90;
  }
  body.nav-open .main-nav ul { flex-direction: column; align-items: flex-start; gap: 4px; }
  body.nav-open .main-nav a { display: block; padding: 14px 4px; width: 100%; }
  body.nav-open .main-nav .btn { margin-top: 10px; }
  .hero .container, .page-hero .container { padding-top: 48px; padding-bottom: 48px; }
  .cta-band { padding: 32px 24px; }
  .footer-grid { grid-template-columns: 1fr; }
}
