/* =========================================================
   Vision IT Solutions — Design System v3
   Matches reference: near-black header/footer, dark navy
   hero, coral CTA accent, light-grey alternating sections
   with white shadow cards.
   ========================================================= */

:root {
  --near-black: #17131f;
  --navy: #1b2a4a;
  --navy-deep: #12203a;
  --coral: #e0526b;
  --coral-deep: #c73f56;

  --bg-light: #f4f4f6;
  --bg-white: #ffffff;
  --ink: #1a1a2e;
  --ink-soft: #232336;
  --muted: #6b7280;
  --muted-on-dark: #a7afc4;
  --line: #e5e7eb;

  --white: #ffffff;

  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;

  --content-max: 78rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --radius: 10px;
  --shadow-card: 0 10px 25px rgba(15, 15, 35, 0.08);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
body {
  margin: 0;
  background: var(--bg-white);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { padding: 0; margin: 0; list-style: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; }

.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;
}

/* ---------- Focus ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

/* ---------- Type scale ---------- */
h1, .h1 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.2vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h2, .h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  line-height: 1.2;
  color: var(--ink);
}
h3, .h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--ink);
}
.lede {
  font-size: clamp(1.02rem, 1.3vw, 1.2rem);
  color: var(--muted);
  max-width: 42em;
}
.eyebrow-label {
  font-family: var(--font-head);
  font-size: 0.8rem;
  color: var(--coral);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}
.section-alt { background: var(--bg-light); }
.section-tight { padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.text-center { text-align: center; }
.section-head { text-align: center; max-width: 46rem; margin-inline: auto; }

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
}
@media (min-width: 860px) {
  .grid-2 { grid-template-columns: 1fr 1fr; align-items: start; }
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
}
.card-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

/* Generic white shadow card */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 2rem 1.75rem;
}
.card-center { text-align: center; }
.card h3 { margin-bottom: 0.6rem; }
.card p { color: var(--muted); font-size: 0.96rem; }

/* Stat cards */
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 1.75rem 1.25rem;
  text-align: center;
}
.stat-num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  color: var(--navy);
}
.stat-label { color: var(--muted); font-size: 0.88rem; margin-top: 0.35rem; }

/* Datasheet-style rows, used inside a card */
.spec-row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.5rem;
  padding-block: 1.1rem;
  border-top: 1px solid var(--line);
}
.spec-row:first-child { border-top: none; }
.spec-row dt {
  font-family: var(--font-head);
  font-size: 0.85rem;
  color: var(--muted);
  padding-top: 0.15rem;
}
.spec-row dd { margin: 0; }

/* Process section: colorful background, bold step labels */
.section-process {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 55%, var(--coral-deep) 100%);
}
.section-process .eyebrow-label { color: #7fd4c9; }
.section-process h2 { color: var(--white); }
.section-process .lede { color: var(--muted-on-dark); }
.section-process .spec-row dt {
  font-weight: 700;
  color: var(--navy);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.7rem;
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.btn-primary { background: var(--coral); color: var(--white); }
.btn-primary:hover { background: var(--coral-deep); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--white); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-on-dark { border-color: rgba(255,255,255,0.5); color: var(--white); }
.btn-on-dark:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--near-black);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
}
.brand-mark { width: 28px; height: 28px; flex-shrink: 0; }
.brand-name-sub { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.68rem; color: var(--muted-on-dark); }

/* Homepage-only: make the company name more prominent */
.brand--prominent { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.01em; }
.brand--prominent .brand-mark { width: 34px; height: 34px; }
.brand--prominent .brand-name-sub { font-size: 0.72rem; }

.nav-links {
  display: none;
  align-items: center;
  gap: 2rem;
}
@media (min-width: 860px) {
  .nav-links { display: flex; }
}
.nav-links a {
  text-decoration: none;
  font-size: 1.08rem;
  font-weight: 500;
  color: #e7e8ee;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  border-bottom-color: var(--coral);
  color: var(--white);
}
.nav-cta { display: none; }
@media (min-width: 860px) { .nav-cta { display: inline-flex; } }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  border-radius: 8px;
  color: var(--white);
}
@media (min-width: 860px) { .nav-toggle { display: none; } }
.nav-toggle svg { width: 20px; height: 20px; }

.mobile-nav {
  display: none;
  background: var(--near-black);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.mobile-nav.is-open { display: block; }
.mobile-nav .wrap { display: flex; flex-direction: column; gap: 0.25rem; padding-block: 0.75rem; }
.mobile-nav a {
  text-decoration: none;
  color: #e7e8ee;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 1rem;
}
.mobile-nav a:last-child { border-bottom: none; }
@media (min-width: 860px) { .mobile-nav { display: none !important; } }

/* ---------- Hero (dark navy, centered — matches reference) ---------- */
.hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  position: relative;
}
.hero .wrap {
  padding-block: clamp(3.5rem, 9vw, 6rem);
  text-align: center;
  max-width: 50rem;
}
.hero h1 { color: var(--white); }
.hero .lede { color: var(--muted-on-dark); margin-inline: auto; margin-top: 0.9rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; justify-content: center; }
.hero-eyebrow {
  font-family: var(--font-head);
  font-size: 0.85rem;
  color: #7fd4c9;
  margin-bottom: 1rem;
  display: block;
  font-weight: 600;
}

/* Smaller page-title hero used on interior pages */
.page-hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  text-align: center;
}
.page-hero .wrap { padding-block: clamp(2.75rem, 6vw, 4rem); max-width: 48rem; }
.page-hero h1 { color: var(--white); }
.page-hero .lede { color: var(--muted-on-dark); margin-inline: auto; margin-top: 0.75rem; }

.hero-diagram-wrap { position: relative; margin-top: 3rem; }
.hero-diagram { width: 100%; max-width: 30rem; height: auto; margin-inline: auto; }
.hero-diagram .node-fill { fill: rgba(255,255,255,0.06); stroke: rgba(255,255,255,0.18); stroke-width: 1.2; }
.hero-diagram .node-core { fill: var(--coral); }
.hero-diagram .link-line { stroke: rgba(255,255,255,0.18); stroke-width: 1.2; fill: none; }
.hero-diagram text { font-family: var(--font-body); fill: #dfe2ec; font-size: 11px; }
.hero-diagram .core-text { fill: var(--white); font-family: var(--font-head); font-weight: 700; font-size: 12px; }

/* Compact diagram section, relocated below the "Get In Touch" CTA */
.diagram-section {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
}
.hero-diagram-wrap--compact { margin-top: 0; }
.hero-diagram-wrap--compact .hero-diagram { max-width: 16rem; }

/* ---------- About page: colorful, modern accents ---------- */
.card--vision,
.card--mission {
  border-top: 4px solid transparent;
}
.card--vision { border-top-color: #0f9d8c; }
.card--vision h2 { color: #0f9d8c; }
.card--mission { border-top-color: var(--coral); }
.card--mission h2 { color: var(--coral-deep); }

.core-values-heading {
  font-size: clamp(1.8rem, 3.4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.value-card { border-top: 4px solid transparent; }
.value-card--client { border-top-color: var(--coral); }
.value-card--client h3 { color: var(--coral-deep); }
.value-card--technical { border-top-color: #3454d1; }
.value-card--technical h3 { color: #3454d1; }
.value-card--integrity { border-top-color: #0f9d8c; }
.value-card--integrity h3 { color: #0f9d8c; }
.value-card--innovation { border-top-color: #7c5cff; }
.value-card--innovation h3 { color: #6b46e0; }

/* ---------- Focus tiles / service cards ---------- */
.focus-tile h3 { margin-top: 0.55rem; }
.focus-tile p { margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; }

/* ---------- Services detail blocks (services.html) ---------- */
.service-block {
  padding: 2rem 1.9rem;
}
.service-block .service-head {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.service-block ul { display: grid; gap: 0.6rem; }
.service-block li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--ink-soft);
}
.service-block li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--coral);
}
/* Recent Work section heading — larger, bolder, more eye-catching */
.recent-work-heading {
  display: block;
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* ---------- Project cards ---------- */
.project-row {
  padding: 1.75rem;
}
.project-row .p-client { font-family: var(--font-head); color: var(--ink); font-weight: 700; }
.project-row .p-year { color: var(--coral); font-size: 0.85rem; font-weight: 600; margin-top: 0.2rem; }
.project-row .p-body { color: var(--muted); margin-top: 0.6rem; font-size: 0.95rem; }
.project-industry-note {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius);
}

/* ---------- Team ---------- */
.team-card { text-align: center; }
.team-avatar {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  margin: 0 auto 1rem;
}
.team-skills { margin-top: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.team-skill {
  font-size: 0.73rem;
  color: var(--ink-soft);
  background: var(--bg-light);
  border: 1px solid var(--line);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--white);
  text-align: center;
}
.cta-banner .wrap {
  padding-block: clamp(2.5rem, 6vw, 3.5rem);
}
.cta-banner h2 { color: var(--white); }
.cta-sub { color: var(--muted-on-dark); margin-top: 0.6rem; }
.cta-banner .btn { margin-top: 1.75rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--near-black);
  color: #b8bccb;
  font-size: 0.88rem;
}
.site-footer .wrap {
  padding-block: 2rem;
  text-align: center;
}
.site-footer .footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}
.site-footer a { text-decoration: none; color: #b8bccb; }
.site-footer a:hover { color: var(--coral); }
.footer-copy { color: #8b8fa3; }

/* ---------- Forms (Contact page) ---------- */
.form-field { display: grid; gap: 0.4rem; margin-bottom: 1.4rem; }
.form-field label { font-family: var(--font-head); font-size: 0.85rem; color: var(--ink); }
.form-field input,
.form-field textarea,
.form-field select {
  font: inherit;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 8px;
  color: var(--ink-soft);
  transition: border-color 140ms ease;
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus { border-color: var(--coral); }
.form-field textarea { resize: vertical; min-height: 8rem; }
.form-note { font-size: 0.85rem; color: var(--muted); margin-top: 0.5rem; }
.form-status {
  margin-top: 1rem;
  font-size: 0.9rem;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.is-success { color: #0f7a52; }
.form-status.is-error { color: #b3311a; }

.contact-detail { display: flex; align-items: flex-start; gap: 0.85rem; padding-block: 1rem; border-top: 1px solid var(--line); }
.contact-detail:first-child { border-top: none; }
.contact-detail svg { width: 1.2rem; height: 1.2rem; margin-top: 0.15rem; flex-shrink: 0; color: var(--coral); }
.contact-detail a { text-decoration: none; }
.contact-detail a:hover { text-decoration: underline; }

/* ---------- Utility ---------- */
.text-muted { color: var(--muted); }
.mt-lg { margin-top: 2.5rem; }
.center-note { text-align: center; color: var(--muted); font-size: 0.85rem; }
