/* ==========================================================================
   Sopham Consulting Group — design tokens
   ========================================================================== */
:root {
  --navy-900: #0f2038;
  --navy-800: #16304f;
  --navy-700: #1e4269;
  --navy-600: #2b5687;
  --red-600: #e1432e;
  --red-500: #ef5a44;
  --gold-500: #f2b134;
  --ink: #16202e;
  --slate-600: #566072;
  --slate-500: #6b7688;
  --slate-300: #c4cbd6;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --bg-navy-tint: #eef2f7;
  --border: #e3e7ee;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 32, 56, 0.06), 0 1px 1px rgba(15, 32, 56, 0.04);
  --shadow-md: 0 12px 28px -8px rgba(15, 32, 56, 0.18);
  --shadow-lg: 0 24px 60px -12px rgba(15, 32, 56, 0.28);
  --container: 1180px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy-900);
}

p {
  margin: 0 0 1em;
  color: var(--slate-600);
}

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

button {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red-600);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--red-600);
  border-radius: 2px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease,
    color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--red-600);
  color: #fff;
  box-shadow: 0 10px 24px -8px rgba(225, 67, 46, 0.55);
}

.btn-primary:hover {
  background: var(--red-500);
}

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

.btn-navy:hover {
  background: var(--navy-700);
}

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

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

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

.btn-outline-navy:hover {
  border-color: var(--navy-600);
  background: var(--bg-navy-tint);
}

.btn-outline-danger {
  background: transparent;
  border-color: var(--border);
  color: var(--red-600);
}

.btn-outline-danger:hover {
  border-color: var(--red-600);
  background: rgba(225, 67, 46, 0.08);
}

.btn-block {
  width: 100%;
}

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}

.brand img {
  height: 34px;
  width: auto;
}

.nav-desktop {
  display: none;
}

.nav-desktop > ul {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-desktop a {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--navy-800);
  padding: 8px 2px;
  position: relative;
}

.nav-desktop a.active {
  color: var(--red-600);
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--red-600);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav-desktop a:hover::after,
.nav-desktop a.active::after {
  transform: scaleX(1);
}

/* Dropdown groups (desktop) */
.nav-item-group {
  position: relative;
}

/* Invisible bridge between the trigger and the dropdown below it. Without
   this, the visual gap created by `top: calc(100% + 14px)` on .nav-dropdown
   is a dead zone: moving the mouse from the trigger down toward the menu
   crosses a strip that belongs to neither element, so :hover drops before
   the pointer ever reaches the dropdown and it closes out from under you.
   This sits right in that gap (same width/centering as .nav-dropdown) so
   hover stays continuous across it. */
.nav-item-group::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 14px;
}

.nav-group-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--navy-800);
  padding: 8px 2px;
}

.nav-group-trigger.active {
  color: var(--red-600);
}

.nav-group-trigger .caret {
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.nav-item-group:hover .caret,
.nav-item-group:focus-within .caret {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 10;
}

.nav-item-group:hover .nav-dropdown,
.nav-item-group:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy-800);
  white-space: nowrap;
}

.nav-dropdown a:hover,
.nav-dropdown a.active {
  background: var(--bg-navy-tint);
  color: var(--red-600);
}

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

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
  stroke: var(--navy-800);
}

.nav-mobile {
  display: none;
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.nav-mobile.open {
  display: block;
}

.nav-mobile > ul {
  padding: 8px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-mobile a {
  display: block;
  padding: 12px 6px;
  font-weight: 600;
  color: var(--navy-800);
  border-bottom: 1px solid var(--border);
}

.nav-mobile-group {
  border-bottom: 1px solid var(--border);
}

.nav-mobile-group-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 12px 6px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--navy-800);
}

.nav-mobile-group-trigger .caret {
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}

.nav-mobile-group.open .nav-mobile-group-trigger .caret {
  transform: rotate(180deg);
}

.nav-mobile-submenu {
  display: none;
  padding: 0 0 8px 14px;
}

.nav-mobile-group.open .nav-mobile-submenu {
  display: block;
}

.nav-mobile-submenu a {
  padding: 10px 6px;
  border-bottom: none;
  font-weight: 500;
  color: var(--slate-600);
}

@media (min-width: 960px) {
  .nav-desktop {
    display: block;
  }
  .nav-toggle {
    display: none;
  }
  .nav-mobile {
    display: none !important;
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(120% 140% at 15% 0%, var(--navy-700) 0%, var(--navy-900) 55%, #0a1729 100%);
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(70% 70% at 30% 20%, black, transparent);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  right: -10%;
  top: -20%;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(225, 67, 46, 0.35), transparent);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  padding: 96px 0 88px;
  display: grid;
  gap: 40px;
}

.hero-badges {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.8rem;
  font-weight: 600;
  color: #fff;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  max-width: 16ch;
}

.hero-lede {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.78);
  max-width: 52ch;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.page-hero {
  position: relative;
  background: linear-gradient(120deg, var(--navy-800), var(--navy-900));
  color: #fff;
  padding: 64px 0 58px;
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  left: -8%;
  bottom: -40%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(242, 177, 52, 0.25), transparent);
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  max-width: 22ch;
  position: relative;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.78);
  max-width: 60ch;
  font-size: 1.05rem;
  position: relative;
}

.page-hero .eyebrow {
  color: var(--gold-500);
}

.page-hero .eyebrow::before {
  background: var(--gold-500);
}

/* ==========================================================================
   Sections & layout helpers
   ========================================================================== */
section {
  padding: 76px 0;
}

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

.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}

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

.section-head h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
}

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

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

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

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

@media (min-width: 720px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 960px) {
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-navy-tint);
  color: var(--navy-800);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--navy-800);
}

.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* Numbered step list */
.step-list {
  counter-reset: step;
  display: grid;
  gap: 22px;
}

.step {
  position: relative;
  padding-left: 64px;
  min-height: 44px;
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--navy-800);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step h3 {
  font-size: 1.08rem;
  margin-bottom: 6px;
}

/* ==========================================================================
   Stats
   ========================================================================== */
.stats-strip {
  background: var(--navy-900);
  color: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  text-align: center;
}

@media (min-width: 720px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-value {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 800;
  color: var(--gold-500);
  letter-spacing: -0.02em;
}

.stat-label {
  margin-top: 6px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.72);
}

/* ==========================================================================
   Certifications strip
   ========================================================================== */
.badge-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 36px;
}

.badge-strip img {
  height: 56px;
  width: auto;
  object-fit: contain;
}

.badge-strip.on-dark img {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonial {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 34px;
  box-shadow: var(--shadow-sm);
}

.testimonial blockquote {
  margin: 0 0 18px;
  font-size: 1.08rem;
  color: var(--navy-900);
  font-weight: 500;
  line-height: 1.55;
}

.testimonial cite {
  font-style: normal;
  font-size: 0.88rem;
  color: var(--slate-500);
  font-weight: 600;
}

/* ==========================================================================
   Team
   ========================================================================== */
.team-card {
  text-align: left;
}

.team-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-navy-tint);
  margin-bottom: 18px;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-photo.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-600);
  font-weight: 700;
  font-size: 2rem;
}

.team-name {
  font-size: 1.1rem;
  margin-bottom: 2px;
}

.team-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--red-600);
  margin-bottom: 12px;
}

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band {
  background: linear-gradient(120deg, var(--navy-800), var(--navy-900));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 52px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cta-band h2 {
  color: #fff;
  margin-bottom: 6px;
  font-size: 1.6rem;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-grid {
  display: grid;
  gap: 18px;
}

@media (min-width: 640px) {
  .form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
}

.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--navy-800);
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(43, 86, 135, 0.15);
}

.field .errors {
  color: var(--red-600);
  font-size: 0.82rem;
  margin-top: 6px;
}

.alert {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.92rem;
  margin-bottom: 20px;
}

.alert-success {
  background: #ecfaf1;
  color: #197a4b;
  border: 1px solid #bdeed0;
}

.alert-error {
  background: #fdecea;
  color: #b3261e;
  border: 1px solid #f6c6c1;
}

.contact-info-list {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.contact-info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.contact-info-item .card-icon {
  flex: none;
  margin-bottom: 0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.72);
  padding: 64px 0 28px;
}

.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

.footer-brand img {
  height: 30px;
  margin-bottom: 16px;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.92rem;
  max-width: 34ch;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.footer-col ul {
  display: grid;
  gap: 10px;
}

.footer-col a {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.65);
}

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

.footer-bottom {
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   404
   ========================================================================== */
.error-page {
  padding: 140px 0;
  text-align: center;
}

.error-page .code {
  font-size: 5rem;
  font-weight: 800;
  color: var(--navy-800);
  margin-bottom: 8px;
}

/* ==========================================================================
   Utility
   ========================================================================== */
.text-center {
  text-align: center;
}

.mt-0 {
  margin-top: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}
