:root {
  --bg: #f3f6fa;
  --bg-2: #e8edf4;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --ink: #111827;
  --muted: #5b6878;
  --soft: #eef5ff;
  --blue: #1769d1;
  --blue-2: #3b82f6;
  --slate: #273244;
  --line: rgba(17, 24, 39, 0.12);
  --line-blue: rgba(23, 105, 209, 0.26);
  --shadow: 0 24px 70px rgba(17, 24, 39, 0.12);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(23, 105, 209, 0.08), transparent 34%),
    linear-gradient(225deg, rgba(39, 50, 68, 0.07), transparent 32%),
    var(--bg);
  color: var(--ink);
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17, 24, 39, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.42), transparent 72%);
  z-index: -1;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 32px), var(--max));
  min-height: 74px;
  margin: 0 auto;
  padding: 14px 0;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 10px -14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 45px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(18px);
  z-index: -1;
}

.legal-header::before {
  background: rgba(255, 255, 255, 0.9);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue), #6aa7ff);
  color: #ffffff;
  font-size: 0.78rem;
  box-shadow: 0 14px 26px rgba(23, 105, 209, 0.24);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  background: var(--soft);
}

.site-nav .nav-cta {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 12px 24px rgba(23, 105, 209, 0.22);
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta:focus-visible {
  color: #ffffff;
  background: #105bbb;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.hero {
  min-height: 82svh;
  margin-top: -74px;
  padding: 150px 16px 62px;
  background:
    linear-gradient(90deg, rgba(243, 246, 250, 0.98) 0%, rgba(243, 246, 250, 0.9) 37%, rgba(243, 246, 250, 0.16) 68%, rgba(243, 246, 250, 0.36) 100%),
    linear-gradient(180deg, rgba(243, 246, 250, 0) 0%, rgba(243, 246, 250, 0.94) 100%),
    url("assets/cil-foundation-digital-products.png");
  background-position: center;
  background-size: cover;
}

.hero-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  color: var(--ink);
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.02;
  letter-spacing: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 8vw, 6.4rem);
}

h2 {
  max-width: 820px;
  margin-bottom: 0;
  font-size: clamp(2.15rem, 4.4vw, 4.35rem);
}

h3 {
  color: var(--ink);
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.16rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 34px 0;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 14px 20px;
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: 0;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  box-shadow: 0 18px 36px rgba(23, 105, 209, 0.24);
}

.secondary-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line-blue);
}

.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 22px 42px rgba(23, 105, 209, 0.3);
}

.secondary-button:hover,
.secondary-button:focus-visible {
  border-color: var(--blue);
  background: #ffffff;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
}

.hero-metrics div {
  min-height: 116px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.08);
}

.hero-metrics strong {
  display: block;
  margin-bottom: 14px;
  color: var(--blue);
  font-size: 0.88rem;
}

.hero-metrics span {
  display: block;
  color: var(--slate);
  font-weight: 800;
  line-height: 1.35;
}

.section {
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: 88px 0;
}

.section-heading {
  display: grid;
  gap: 14px;
  margin-bottom: 34px;
}

.intro {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: end;
  padding-top: 70px;
}

.intro-copy {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 1.12rem;
}

.card-grid {
  display: grid;
  gap: 18px;
}

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.service-card,
.proof-card,
.system-panel,
.system-list div,
.timeline-item,
.legal-content article {
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(17, 24, 39, 0.08);
}

.service-card {
  min-height: 260px;
  padding: 26px;
}

.card-number,
.panel-label {
  display: inline-flex;
  margin-bottom: 34px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.service-card p,
.proof-card p,
.system-panel p,
.timeline-item p,
.legal-content p {
  color: var(--muted);
}

.systems {
  position: relative;
}

.systems::before {
  content: "";
  position: absolute;
  inset: 38px -4vw 38px;
  border-top: 1px solid var(--line-blue);
  border-bottom: 1px solid var(--line-blue);
  background: linear-gradient(135deg, rgba(23, 105, 209, 0.08), rgba(255, 255, 255, 0.38), rgba(39, 50, 68, 0.05));
  z-index: -1;
}

.system-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
  align-items: stretch;
}

.system-panel {
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(23, 105, 209, 0.1), transparent),
    #ffffff;
}

.system-panel h3 {
  max-width: 420px;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.system-list {
  display: grid;
  gap: 14px;
}

.system-list div {
  display: grid;
  gap: 8px;
  padding: 24px;
}

.system-list strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.system-list span {
  color: var(--muted);
}

.proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-top: 38px;
}

.proof-card {
  min-height: 220px;
  padding: 30px;
}

.process {
  padding-top: 44px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line-blue);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.timeline-item {
  min-height: 245px;
  padding: 28px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.timeline-item:last-child {
  border-right: 0;
}

.timeline-item span {
  display: inline-flex;
  margin-bottom: 48px;
  color: var(--blue);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.contact-section {
  width: min(calc(100% - 32px), var(--max));
  margin: 40px auto 96px;
}

.contact-inner {
  padding: clamp(34px, 6vw, 70px);
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(23, 105, 209, 0.13), rgba(255, 255, 255, 0.82) 52%, rgba(39, 50, 68, 0.07)),
    #ffffff;
  box-shadow: var(--shadow);
}

.contact-inner h2 {
  max-width: 760px;
  margin-bottom: 18px;
}

.contact-inner p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.08rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  width: min(calc(100% - 32px), var(--max));
  margin: 0 auto;
  padding: 34px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-brand {
  margin-bottom: 12px;
}

.site-footer p {
  max-width: 420px;
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 18px;
  max-width: 520px;
}

.footer-links a {
  color: var(--slate);
  font-weight: 800;
}

.footer-links a:hover,
.footer-links a:focus-visible,
.footer-links a[aria-current="page"] {
  color: var(--blue);
}

.legal-main {
  width: min(calc(100% - 32px), 920px);
  margin: 0 auto;
  padding: 74px 0 82px;
}

.legal-hero {
  padding: 72px 0 38px;
}

.legal-hero h1 {
  margin-bottom: 16px;
}

.legal-hero p:last-child {
  color: var(--muted);
  font-weight: 700;
}

.legal-content {
  display: grid;
  gap: 16px;
}

.legal-content article {
  padding: 28px;
}

.legal-content h2 {
  margin-bottom: 12px;
  font-family: "Inter", Arial, sans-serif;
  font-size: 1.25rem;
  line-height: 1.3;
}

.legal-content a {
  color: var(--blue);
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 980px) {
  h1 {
    max-width: 660px;
  }

  .card-grid.four,
  .proof,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro,
  .system-layout {
    grid-template-columns: 1fr;
  }

  .timeline-item:nth-child(2) {
    border-right: 0;
  }

  .timeline-item:nth-child(1),
  .timeline-item:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .site-header {
    width: min(calc(100% - 24px), var(--max));
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: min(320px, calc(100vw - 24px));
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

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

  .site-nav a {
    width: 100%;
  }

  .hero {
    min-height: auto;
    padding-top: 136px;
    background:
      linear-gradient(180deg, rgba(243, 246, 250, 0.98) 0%, rgba(243, 246, 250, 0.88) 52%, rgba(243, 246, 250, 0.42) 100%),
      url("assets/cil-foundation-digital-products.png");
    background-position: center top;
    background-size: cover;
  }

  .hero-metrics,
  .card-grid.four,
  .proof,
  .timeline {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 66px 0;
  }

  .service-card,
  .proof-card {
    min-height: auto;
  }

  .timeline-item,
  .timeline-item:nth-child(2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .timeline-item:last-child {
    border-bottom: 0;
  }

  .timeline-item span {
    margin-bottom: 28px;
  }

  .site-footer {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .hero-actions {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .brand {
    gap: 8px;
    font-size: 0.92rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  h1 {
    font-size: 2.7rem;
  }
}
