/* =============================================================
   Quantix Labs — global stylesheet
   Sections: tokens, base, layout, header, buttons, hero, stats,
   programs, features, process, table, testimonials, faq, cta,
   forms, footer, modal, utilities, responsive
   ============================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --text: #2c2c2b;
  --text-soft: #7d7a75;
  --canvas: #ffffff;
  --surface: #f9f8f7;
  --surface-2: #f0efed;
  --border: #e6e5e3;

  /* Brand, sampled from the Quantix Labs mark */
  --brand-1: #f7913f;
  --brand-2: #ee5c6a;
  --brand-ink: #c9484f;
  --brand-soft: #fdeee9;
  --brand-gradient: linear-gradient(135deg, #f7913f 0%, #ee5c6a 100%);

  --green: #46a171;
  --green-soft: #e8f1ec;
  --blue: #2783de;

  --cat-cloud: #5e9fe8;
  --cat-eng: #72bc8f;
  --cat-ai: #bf8eda;
  --cat-sec: #4fb9c9;

  --radius: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 4px 12px rgba(0, 0, 0, .04);
  --shadow-lg: 0 1px 2px rgba(0, 0, 0, .06), 0 12px 32px rgba(0, 0, 0, .09);

  --maxw: 1120px;
  --gutter: 24px;
  --header-h: 68px;
}

/* Manual dark theme */
:root[data-theme="dark"] {
  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, .65);
  --canvas: #191919;
  --surface: #202020;
  --surface-2: #383836;
  --border: rgba(255, 255, 255, .2);
  --brand-ink: #f7a163;
  --brand-soft: rgba(247, 145, 63, .12);
  --green: #72bc8f;
  --green-soft: rgba(114, 188, 143, .12);
  --blue: #5e9fe8;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .3);
  --shadow-lg: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 32px rgba(0, 0, 0, .45);
}

/* Follow the OS when the visitor has not chosen a theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --text: #ffffff;
    --text-soft: rgba(255, 255, 255, .65);
    --canvas: #191919;
    --surface: #202020;
    --surface-2: #383836;
    --border: rgba(255, 255, 255, .2);
    --brand-ink: #f7a163;
    --brand-soft: rgba(247, 145, 63, .12);
    --green: #72bc8f;
    --green-soft: rgba(114, 188, 143, .12);
    --blue: #5e9fe8;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 12px rgba(0, 0, 0, .3);
    --shadow-lg: 0 1px 2px rgba(0, 0, 0, .5), 0 12px 32px rgba(0, 0, 0, .45);
  }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.02em; font-weight: 650; }
h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
h2 { font-size: clamp(1.55rem, 2.9vw, 2.15rem); }
h3 { font-size: 1.125rem; letter-spacing: -.01em; }
h4 { font-size: 1rem; }

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- 3. Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding: 56px 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--border); }

.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head.center { margin-inline: auto; text-align: center; }

.kicker {
  font-size: .8125rem;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-ink);
  margin-bottom: 8px;
}

.section-sub {
  margin-top: 12px;
  color: var(--text-soft);
  font-size: 1.0625rem;
  max-width: 64ch;
}

.grid { display: grid; gap: 16px; }

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-stuck { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { width: 30px; height: 34px; object-fit: contain; }
.brand-name { font-size: 1.0625rem; font-weight: 700; letter-spacing: -.02em; }
.brand-name span { font-weight: 400; color: var(--text-soft); }

.nav ul { display: flex; align-items: center; gap: 4px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: .9375rem;
  color: var(--text-soft);
  transition: color .15s ease, background .15s ease;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.is-active { color: var(--text); font-weight: 600; }
.nav .nav-cta { margin-left: 8px; }
.nav .nav-cta a { color: #fff; }
.nav .nav-cta a:hover { background: none; color: #fff; }

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-soft);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 20px; height: 20px; }
.nav-toggle { display: none; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
}

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: .9375rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary { background: var(--brand-gradient); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: var(--canvas); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface); border-color: var(--text-soft); }
.btn-light { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-light:hover { background: rgba(255, 255, 255, .26); }
.btn-white { background: #fff; color: #b23f46; }
.btn-white:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .875rem; }
.btn-block { width: 100%; }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  color: var(--brand-ink);
  cursor: pointer;
}
.link-btn svg { width: 14px; height: 14px; transition: transform .15s ease; }
.link-btn:hover svg { transform: translateX(3px); }

/* ---------- 6. Hero ---------- */
.hero { padding: 40px 0 24px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  margin-bottom: 20px;
  background: var(--brand-soft);
  color: var(--brand-ink);
  border-radius: var(--radius-pill);
  font-size: .8125rem;
  font-weight: 600;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 0 0 rgba(238, 92, 106, .5);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(238, 92, 106, .5); }
  70% { box-shadow: 0 0 0 9px rgba(238, 92, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(238, 92, 106, 0); }
}

.hero h1 { margin-bottom: 16px; }
.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: normal;
}
.lede { color: var(--text-soft); font-size: 1.0625rem; max-width: 56ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.hero-proof { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; }
.hero-proof li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .875rem;
  color: var(--text-soft);
}
.hero-proof svg { width: 16px; height: 16px; color: var(--green); flex-shrink: 0; }

.hero-media { position: relative; }
.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.hero-card {
  position: absolute;
  left: 16px;
  bottom: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--canvas) 94%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero-card .badge-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--brand-gradient);
  color: #fff;
}
.hero-card .badge-icon svg { width: 18px; height: 18px; }
.hero-card strong { display: block; font-size: .875rem; }
.hero-card span { font-size: .8125rem; color: var(--text-soft); }

/* ---------- 7. Stats strip ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat { background: var(--canvas); padding: 20px 24px; }
.stat-num {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
}
.stat-label { font-size: .8125rem; color: var(--text-soft); margin-top: 4px; }

/* ---------- 8. Toolbar, chips, search ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 38px;
  padding: 0 16px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: .875rem;
  font-weight: 550;
  color: var(--text-soft);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover { border-color: var(--text-soft); color: var(--text); }
.chip[aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: var(--canvas);
}

.search { position: relative; flex: 1 1 260px; max-width: 340px; }
.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-soft);
  pointer-events: none;
}
.search input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px 0 36px;
  font: inherit;
  font-size: .9375rem;
  color: var(--text);
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.search input::placeholder { color: var(--text-soft); }
.search input:focus { border-color: var(--brand-2); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }

.results-count { font-size: .875rem; color: var(--text-soft); margin-bottom: 16px; }

/* ---------- 9. Cards ---------- */
.cards { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand-2) 35%, var(--border)); }

.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--brand-soft);
  color: var(--brand-ink);
}
.card-icon svg { width: 20px; height: 20px; }
.card p { color: var(--text-soft); font-size: .9375rem; }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 10px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-soft); }
.tag[data-cat="cloud"] .dot { background: var(--cat-cloud); }
.tag[data-cat="engineering"] .dot { background: var(--cat-eng); }
.tag[data-cat="ai"] .dot { background: var(--cat-ai); }
.tag[data-cat="security"] .dot { background: var(--cat-sec); }

.stack { display: flex; flex-wrap: wrap; gap: 6px; }
.stack li {
  padding: 3px 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: .75rem;
  color: var(--text-soft);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  margin-top: auto;
  border-top: 1px solid var(--border);
}
.meta { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--text-soft); }
.meta svg { width: 14px; height: 14px; }

.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}

/* ---------- 10. Split feature ---------- */
.split { display: grid; gap: 32px; align-items: center; }
.split-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.checklist { display: grid; gap: 12px; margin-top: 24px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist svg { width: 20px; height: 20px; color: var(--green); flex-shrink: 0; margin-top: 2px; }
.checklist strong { display: block; font-size: .9375rem; }
.checklist span { font-size: .875rem; color: var(--text-soft); }

/* ---------- 11. Process ---------- */
.steps { counter-reset: step; display: grid; gap: 16px; }
.step {
  position: relative;
  padding: 24px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.step-num {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-size: .875rem;
  font-weight: 700;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--text-soft); font-size: .9375rem; }

/* ---------- 12. Comparison table ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--canvas);
}
table.compare { width: 100%; border-collapse: collapse; min-width: 620px; }
table.compare th, table.compare td {
  padding: 14px 20px;
  text-align: left;
  font-size: .9375rem;
  border-bottom: 1px solid var(--border);
}
table.compare thead th { background: var(--surface); font-size: .875rem; }
table.compare thead th span { display: block; font-weight: 400; font-size: .8125rem; color: var(--text-soft); }
table.compare tbody th { font-weight: 500; color: var(--text-soft); }
table.compare tbody tr:last-child th, table.compare tbody tr:last-child td { border-bottom: 0; }
table.compare td { text-align: center; }
table.compare .yes { color: var(--green); font-weight: 700; }
table.compare .no { color: var(--text-soft); }
.col-featured { background: var(--brand-soft); }

/* ---------- 13. Testimonials ---------- */
.quote {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.quote blockquote { margin: 0; font-size: .9375rem; color: var(--text); }
.quote-mark { width: 22px; height: 22px; color: var(--brand-2); }
.who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-size: .875rem;
  font-weight: 700;
}
.who strong { display: block; font-size: .875rem; }
.who span { font-size: .8125rem; color: var(--text-soft); }

/* ---------- 14. FAQ ---------- */
.faq { max-width: 760px; margin-inline: auto; display: grid; gap: 8px; }
.faq-item { background: var(--canvas); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 20px;
  background: none;
  border: 0;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.faq-q svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-soft); transition: transform .2s ease; }
.faq-q[aria-expanded="true"] svg { transform: rotate(45deg); color: var(--brand-ink); }
.faq-a { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height .25s ease, padding .25s ease; }
.faq-a p { color: var(--text-soft); font-size: .9375rem; }
.faq-item.open .faq-a { padding: 0 20px 18px; max-height: 320px; }

/* ---------- 15. CTA band ---------- */
.cta-band {
  background: var(--brand-gradient);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
}
.cta-band h2 { margin-bottom: 12px; }
.cta-band p { color: rgba(255, 255, 255, .92); max-width: 54ch; margin-inline: auto; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }

/* ---------- 16. Forms ---------- */
.form-layout { display: grid; gap: 32px; align-items: start; }
.form-card {
  padding: 28px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.field-grid { display: grid; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .875rem; font-weight: 600; }
.field .hint { font-size: .8125rem; color: var(--text-soft); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  font: inherit;
  font-size: .9375rem;
  color: var(--text);
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 110px; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 49%, var(--text-soft) 50%), linear-gradient(-45deg, transparent 49%, var(--text-soft) 50%); background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.field .error-msg { display: none; font-size: .8125rem; color: #d24b3f; font-weight: 500; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #e56458; }
.field.invalid .error-msg { display: block; }
:root[data-theme="dark"] .field .error-msg { color: #e97366; }

.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: .875rem; color: var(--text-soft); }
.check-row input { width: 18px; height: 18px; min-height: 0; margin-top: 2px; flex-shrink: 0; accent-color: var(--brand-2); }

.form-note { font-size: .8125rem; color: var(--text-soft); margin-top: 12px; text-align: center; }

.form-success {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
  padding: 40px 24px;
  background: var(--green-soft);
  border: 1px solid color-mix(in srgb, var(--green) 40%, transparent);
  border-radius: var(--radius-lg);
}
.form-success .tick { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fff; }
.form-success .tick svg { width: 24px; height: 24px; }
.form-success p { color: var(--text-soft); max-width: 46ch; }
.form-success:focus, .form-success:focus-visible { outline: none; box-shadow: none; }

.side-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.side-card + .side-card { margin-top: 16px; }
.side-card h3 { margin-bottom: 12px; }
.side-list { display: grid; gap: 14px; }
.side-list li { display: flex; gap: 12px; font-size: .875rem; color: var(--text-soft); }
.side-list .n {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--canvas);
  border: 1px solid var(--border);
  font-size: .75rem;
  font-weight: 700;
  color: var(--text);
}
.contact-list { display: grid; gap: 12px; }
.contact-list li { display: flex; align-items: center; gap: 10px; font-size: .875rem; }
.contact-list svg { width: 16px; height: 16px; color: var(--brand-ink); flex-shrink: 0; }
.contact-list a:hover { color: var(--brand-ink); }

/* ---------- 17. Page header (inner pages) ---------- */
.page-head { padding: 48px 0 8px; }
.page-head h1 { margin-bottom: 12px; }
.crumbs { display: flex; gap: 8px; font-size: .8125rem; color: var(--text-soft); margin-bottom: 16px; }
.crumbs a:hover { color: var(--brand-ink); }

/* ---------- 18. Footer ---------- */
.site-footer { margin-top: 56px; background: var(--surface); border-top: 1px solid var(--border); }
.footer-grid { display: grid; gap: 32px; padding: 48px 0 32px; }
.footer-brand p { margin-top: 12px; font-size: .875rem; color: var(--text-soft); max-width: 34ch; }
.socials { display: flex; gap: 8px; margin-top: 16px; }
.socials a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-soft);
  background: var(--canvas);
  transition: color .15s ease, border-color .15s ease;
}
.socials a:hover { color: var(--brand-ink); border-color: var(--brand-ink); }
.socials svg { width: 18px; height: 18px; }
.footer-col h4 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-soft); margin-bottom: 14px; }
.footer-col li + li { margin-top: 10px; }
.footer-col a { font-size: .9375rem; color: var(--text-soft); }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 28px;
  border-top: 1px solid var(--border);
  font-size: .8125rem;
  color: var(--text-soft);
}

/* ---------- 19. Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 18, 17, .55);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}
.modal.open { opacity: 1; visibility: visible; }
.modal-panel {
  width: min(720px, 100%);
  max-height: min(86vh, 780px);
  overflow-y: auto;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform: translateY(8px);
  transition: transform .2s ease;
}
.modal.open .modal-panel { transform: none; }
.modal-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 16px;
  background: var(--canvas);
  border-bottom: 1px solid var(--border);
}
.modal-head h2 { font-size: 1.375rem; }
.modal-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.modal-body { padding: 24px; display: grid; gap: 24px; }
.modal-body h3 { margin-bottom: 12px; font-size: 1rem; }
.modal-list { display: grid; gap: 8px; }
.modal-list li { display: flex; gap: 10px; font-size: .9375rem; color: var(--text-soft); }
.modal-list .idx { color: var(--brand-ink); font-weight: 700; font-size: .8125rem; min-width: 20px; }
.modal-list svg { width: 18px; height: 18px; color: var(--green); flex-shrink: 0; margin-top: 1px; }
.modal-two { display: grid; gap: 24px; }
.outcome-note {
  padding: 16px;
  background: var(--brand-soft);
  border-radius: var(--radius);
  font-size: .9375rem;
  color: var(--text);
}
.modal-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 24px 20px;
  background: var(--canvas);
  border-top: 1px solid var(--border);
}
body.modal-open { overflow: hidden; }

/* ---------- 20. Back to top ---------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: 50%;
  box-shadow: var(--shadow);
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { width: 18px; height: 18px; }

/* ---------- 21. Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s ease; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal, .js .reveal.in { opacity: 1; transform: none; transition: none; }
  .pulse-dot { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* ---------- 22. Responsive ---------- */
@media (min-width: 600px) {
  .field-grid.two { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .modal-two { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .section { padding: 88px 0; }
  .hero { padding: 56px 0 32px; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 48px; }
  .split { grid-template-columns: 1fr 1fr; gap: 48px; }
  .split.reverse .split-media { order: 2; }
  .steps { grid-template-columns: repeat(5, 1fr); }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; }
  .form-layout { grid-template-columns: 1.5fr 1fr; }
  .cta-band { padding: 56px 48px; }
  .page-head { padding: 64px 0 8px; }
}

@media (max-width: 899px) {
  .nav-toggle { display: grid; }
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    padding: 12px var(--gutter) 20px;
    background: var(--canvas);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav a { min-height: 48px; padding: 0 12px; font-size: 1rem; }
  .nav .nav-cta { margin: 12px 0 0; }
  .nav .nav-cta a { justify-content: center; }
  .hero-media { order: -1; }
  .hero-card { position: static; margin-top: 12px; left: auto; bottom: auto; right: auto; }
}

@media (max-width: 560px) {
  :root { --gutter: 20px; }
  .card, .form-card, .step, .quote { padding: 20px; }
  .cta-band { padding: 32px 22px; }
  .btn { width: 100%; }
  .hero-actions .btn, .cta-actions .btn { width: 100%; }
  .modal { padding: 12px; }
  .modal-head, .modal-body, .modal-foot { padding-inline: 20px; }
  .to-top { right: 14px; bottom: 14px; }
}
