/* ==========================================================================
   Consultia — site design system
   Zero-dependency static CSS. System font stack only (privacy + performance).
   ========================================================================== */

:root {
  --navy-900: #081c36;
  --navy-800: #0b2447;
  --navy-700: #12315e;
  --navy-600: #1a3f73;
  --accent: #2f80ed;
  --accent-dark: #1c6ade;
  --accent-soft: #e3eefa;
  --teal: #00b39a;
  --ink: #16233a;
  --muted: #55677f;
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --border: #dbe4f0;
  --success-bg: #e7f7f3;
  --error: #b3261e;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 10px 30px rgba(8, 28, 54, 0.08);
  --shadow-sm: 0 2px 8px rgba(8, 28, 54, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --maxw: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  color: var(--navy-800);
  margin: 0 0 0.6em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.35rem;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--navy-800);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 8px;
  z-index: 200;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease,
    color 0.15s ease, transform 0.05s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-outline {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent-soft);
}

.btn-light {
  background: #fff;
  color: var(--navy-800);
}

.btn-light:hover {
  background: var(--bg-alt);
  color: var(--navy-800);
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.75);
  color: #fff;
  background: transparent;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-800);
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
  color: var(--navy-800);
}

.brand img {
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.site-nav a {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.98rem;
}

.site-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
}

.site-nav .nav-cta {
  color: #fff;
  padding: 0.55rem 1.2rem;
  font-size: 0.95rem;
}

.site-nav .nav-cta:hover {
  background: var(--accent-dark);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
}

.nav-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy-800);
  margin: 5px 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(47, 128, 237, 0.35), transparent 60%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: #fff;
  padding: 5.5rem 0 4.5rem;
}

.hero h1 {
  color: #fff;
  max-width: 18ch;
}

.hero .lead {
  color: #c9d8ec;
  max-width: 60ch;
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9fd0ff;
  margin-bottom: 1rem;
}

/* ---------- Sections ---------- */

.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  max-width: 46rem;
  margin-bottom: 2.5rem;
}

.section-header.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.lead {
  font-size: 1.12rem;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* ---------- Grids & cards ---------- */

.grid {
  display: grid;
  gap: 1.5rem;
}

.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: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin-top: 0.35rem;
}

.card p {
  color: var(--muted);
  flex-grow: 1;
}

.card-link {
  font-weight: 600;
  margin-top: 0.5rem;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.stat {
  text-align: center;
  padding: 1.5rem 1rem;
}

.stat .stat-value {
  display: block;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: var(--accent-dark);
  letter-spacing: -0.02em;
}

.stat .stat-label {
  color: var(--muted);
  font-size: 0.98rem;
}

/* ---------- Lists ---------- */

.check-list {
  list-style: none;
  padding-left: 0;
}

.check-list li {
  position: relative;
  padding-left: 1.9rem;
  margin-bottom: 0.6rem;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.28rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: var(--accent-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%231c6ade' d='M6.4 11.2 3.2 8l-1 1 4.2 4.2L14 5.6l-1-1z'/%3E%3C/svg%3E")
    center / 0.8rem no-repeat;
}

/* ---------- Steps (methodology) ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 0.5rem;
}

.step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--navy-800);
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.step h3 {
  margin-bottom: 0.3rem;
}

.step p {
  color: var(--muted);
  margin-bottom: 0;
}

/* ---------- CTA band ---------- */

.cta-band {
  background:
    radial-gradient(700px 300px at 90% 0%, rgba(47, 128, 237, 0.3), transparent 60%),
    linear-gradient(150deg, var(--navy-900), var(--navy-700));
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  color: #c9d8ec;
  max-width: 55ch;
  margin-left: auto;
  margin-right: auto;
}

.cta-band a:not(.btn) {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cta-band .hero-actions {
  justify-content: center;
}

/* ---------- Accordion (FAQ) ---------- */

.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
}

.accordion-item + .accordion-item {
  border-top: 1px solid var(--border);
}

.accordion-trigger {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 1.15rem 1.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy-800);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: inherit;
}

.accordion-trigger::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent);
  flex-shrink: 0;
}

.accordion-trigger[aria-expanded="true"]::after {
  content: "\2212";
}

.accordion-panel {
  padding: 0 1.4rem;
  color: var(--muted);
}

.accordion-panel[hidden] {
  display: none;
}

.accordion-panel p {
  margin-bottom: 1.15rem;
}

/* ---------- Forms ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem 1.4rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy-800);
}

.form-field input,
.form-field select,
.form-field textarea {
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  width: 100%;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 3px solid rgba(47, 128, 237, 0.35);
  border-color: var(--accent);
}

.form-field .field-error {
  color: var(--error);
  font-size: 0.88rem;
  display: none;
}

.form-field.invalid input,
.form-field.invalid select,
.form-field.invalid textarea {
  border-color: var(--error);
}

.form-field.invalid .field-error {
  display: block;
}

.form-note {
  font-size: 0.9rem;
  color: var(--muted);
}

.form-status {
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  display: none;
}

.form-status.success {
  display: block;
  background: var(--success-bg);
  color: #0c5c4c;
  border: 1px solid #bfe8dd;
}

/* ---------- ROI calculator ---------- */

.roi-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.roi-results {
  position: sticky;
  top: 6rem;
}

.roi-result-grid {
  display: grid;
  gap: 1rem;
}

.roi-result {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow-sm);
}

.roi-result .roi-value {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--accent-dark);
  letter-spacing: -0.01em;
}

.roi-result .roi-label {
  color: var(--muted);
  font-size: 0.95rem;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.range-row output {
  font-weight: 700;
  min-width: 3.2rem;
  text-align: right;
  color: var(--navy-800);
}

input[type="range"] {
  accent-color: var(--accent);
}

/* ---------- Page hero (interior pages) ---------- */

.page-hero {
  background:
    radial-gradient(700px 320px at 85% -20%, rgba(47, 128, 237, 0.35), transparent 60%),
    linear-gradient(155deg, var(--navy-900), var(--navy-700));
  color: #fff;
  padding: 3.75rem 0;
}

.page-hero h1 {
  color: #fff;
  margin-bottom: 0.4em;
}

.page-hero .lead {
  color: #c9d8ec;
  max-width: 65ch;
  margin-bottom: 0;
}

.breadcrumb {
  font-size: 0.88rem;
  margin-bottom: 1.1rem;
  color: #9fb4d2;
}

.breadcrumb a {
  color: #c9d8ec;
}

/* ---------- Prose ---------- */

.prose {
  max-width: 46rem;
}

.prose h2 {
  margin-top: 2.2rem;
}

/* ---------- Pill list (tags / frameworks) ---------- */

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.pills li {
  background: var(--accent-soft);
  color: var(--navy-700);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-900);
  color: #b8c8de;
  padding: 3.5rem 0 2rem;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.site-footer h2,
.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.9rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer a {
  color: #b8c8de;
}

.site-footer a:hover {
  color: #fff;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.8rem;
}

.footer-brand:hover {
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: #8fa3bf;
}

.footer-bottom p {
  margin: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 0.5rem 1.25rem 1rem;
    display: none;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  .site-nav .nav-cta {
    margin-top: 0.75rem;
    text-align: center;
  }

  .grid-3,
  .grid-4,
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .roi-layout {
    grid-template-columns: 1fr;
  }

  .roi-results {
    position: static;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .steps,
  .stats,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.25rem 0;
  }

  .hero {
    padding: 4rem 0 3.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
