:root {
  --accent: #1f4e79;
  --accent-dark: #163a5a;
  --accent-light: #e8eff7;
  --ink: #111827;
  --text: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #f8fafc;
  --white: #ffffff;
  --radius: 10px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}

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

h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }

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

ul { padding-left: 1.2em; }
li { margin-bottom: 0.35em; }

.container {
  width: min(var(--max), 100% - 2.5rem);
  margin: 0 auto;
}

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

.lead {
  font-size: 1.2rem;
  color: var(--text);
  max-width: 48rem;
}

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

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

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

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}

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

.brand svg { width: 34px; height: 34px; flex-shrink: 0; }

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

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

.nav a:hover,
.nav a[aria-current="page"] { color: var(--accent); text-decoration: none; }

.nav a[aria-current="page"] { font-weight: 700; }

.nav .btn { margin-left: 0.5rem; }

.nav .btn-primary,
.nav .btn-primary:hover,
.nav .btn-primary[aria-current="page"] { color: var(--white); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  color: var(--ink);
}

.nav-toggle svg { display: block; width: 22px; height: 22px; }

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

.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

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

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

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

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

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

.btn-light {
  background: var(--white);
  color: var(--accent);
}

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

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

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

.section { padding: 4.5rem 0; }

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

.section-head {
  max-width: 44rem;
  margin-bottom: 2.5rem;
}

.section-head p { color: var(--text); font-size: 1.08rem; }

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

.hero {
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgba(31, 78, 121, 0.14), transparent 60%),
    linear-gradient(180deg, var(--surface), var(--white));
  padding: 5.5rem 0 4.5rem;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 { margin-bottom: 1rem; }

.hero .lead { margin-bottom: 1.75rem; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.fact {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
}

.fact strong {
  display: block;
  font-size: 1.6rem;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

.fact span { font-size: 0.92rem; color: var(--muted); }

.page-hero {
  padding: 4rem 0 3rem;
}

/* ---------- Chain diagram ---------- */

.chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.7rem;
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
}

.chain li {
  position: relative;
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
}

.chain li a { color: inherit; }

.chain li:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -1.35rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 400;
}

/* ---------- 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: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: #c7d2e0;
  box-shadow: 0 6px 20px rgba(17, 24, 39, 0.05);
}

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

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

.card .more {
  font-weight: 600;
  font-size: 0.95rem;
}

.icon {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  background: var(--accent-light);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon svg { width: 22px; height: 22px; }

/* ---------- Tags ---------- */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  margin: 0;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 6px;
  padding: 0.2rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ---------- Service detail blocks ---------- */

.service {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 2.5rem;
  padding: 3rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 90px;
}

.service:first-of-type { border-top: 0; }

.service aside h2 { font-size: 1.6rem; }

.service aside p { color: var(--muted); }

.service .columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.service h4 {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.service ul { margin: 0; }

.service li { font-size: 0.98rem; }

/* ---------- Steps ---------- */

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

.steps li {
  counter-increment: step;
  margin: 0;
  padding-top: 0.5rem;
  border-top: 3px solid var(--accent);
}

.steps li::before {
  content: "0" counter(step);
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin: 0.75rem 0 0.4rem;
}

.steps h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }

.steps p { font-size: 0.96rem; margin: 0; }

/* ---------- Case studies ---------- */

.case {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2.5rem;
  padding: 3rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 90px;
}

.case:first-of-type { border-top: 0; }

.case .meta { color: var(--muted); font-size: 0.95rem; }

.case .meta dt {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 1rem;
}

.case .meta dd { margin: 0.2rem 0 0; color: var(--text); }

.case h2 { font-size: 1.5rem; }

.case h4 {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--accent);
  margin: 1.25rem 0 0.4rem;
}

.case h4:first-of-type { margin-top: 0; }

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

/* ---------- Two-column prose ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checklist li {
  position: relative;
  padding-left: 1.8rem;
  margin-bottom: 0.7rem;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--accent);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 70% no-repeat, linear-gradient(#000 0 0);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 70% no-repeat, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
}

/* ---------- Credentials ---------- */

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

.cred {
  border-left: 3px solid var(--accent);
  padding-left: 1.1rem;
}

.cred h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.cred p { font-size: 0.95rem; margin: 0; }

/* ---------- Tech table ---------- */

.tech {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
}

.tech th,
.tech td {
  text-align: left;
  vertical-align: top;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.tech th {
  width: 22%;
  color: var(--ink);
  font-weight: 700;
  white-space: nowrap;
}

/* ---------- Quote band ---------- */

.band {
  background: var(--accent);
  color: var(--white);
  padding: 4rem 0;
}

.band h2 { color: var(--white); }

.band p { color: rgba(255, 255, 255, 0.85); max-width: 46rem; }

.band .hero-actions { margin-top: 1.5rem; }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
}

.contact-details dl { margin: 0; }
.contact-details dt {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: 1.25rem;
}
.contact-details dd { margin: 0.2rem 0 0; font-size: 1.05rem; }

.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field { margin-bottom: 1.1rem; }

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

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

.field textarea { min-height: 150px; resize: vertical; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid rgba(31, 78, 121, 0.35);
  outline-offset: 1px;
  border-color: var(--accent);
}

.form-note {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0.75rem 0 0;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 2rem;
  background: var(--surface);
  font-size: 0.93rem;
}

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

.site-footer h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--accent); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
}

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

@media (max-width: 960px) {
  .grid-3, .grid-4, .cred-grid, .case-list { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid, .service, .case, .split, .contact-grid { grid-template-columns: 1fr; }
  .hero-grid { gap: 2rem; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 3.25rem 0; }
  .hero { padding: 3.5rem 0 3rem; }
  .grid-2, .grid-3, .grid-4, .cred-grid, .case-list, .steps, .form-row { grid-template-columns: 1fr; }
  .service .columns { grid-template-columns: 1fr; }
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin: 0.75rem 0 0; text-align: center; border-bottom: 0; }
  .tech th { white-space: normal; width: 30%; }
}
