:root {
  color-scheme: light;
  --color-bg: #f5f7fc;
  --color-surface: #ffffff;
  --color-surface-soft: #eef2ff;
  --color-primary: #4c63ff;
  --color-primary-soft: rgba(76, 99, 255, 0.14);
  --color-accent: #c5a253;
  --color-text: #0c1a3a;
  --color-text-muted: rgba(12, 26, 58, 0.68);
  --color-border: rgba(76, 99, 255, 0.16);
  --shadow-elevated: 0 24px 50px -25px rgba(24, 45, 110, 0.25), 0 14px 28px -18px rgba(76, 99, 255, 0.18);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(circle at top left, rgba(76, 99, 255, 0.12), transparent 45%),
    radial-gradient(circle at bottom right, rgba(197, 162, 83, 0.08), transparent 55%), var(--color-bg);
  color: var(--color-text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ====== */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

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

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

.page {
  min-height: 100vh;
  position: relative;
}

section {
  padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 5vw, 5rem);
}

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(0.9rem, 1.8vw, 1.8rem);
  text-align: center;
}

.section-head h2 {
  font-family: "Sora", "Inter", sans-serif;
  font-size: clamp(2.2rem, 4vw, 3rem);
  letter-spacing: -0.03em;
}

.about .section-head h2,
.cta-content h2 {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.about .section-head {
  max-width: 100%;
}

.about .section-head h2 {
  white-space: normal;
}

.section-lede {
  color: var(--color-text-muted);
  margin-top: 1rem;
}

.eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-primary);
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(135deg, var(--color-primary), #4b9de0);
  color: #ffffff;
  box-shadow: 0 18px 32px -20px rgba(76, 99, 255, 0.45);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 48px -18px rgba(76, 99, 255, 0.6);
}

.btn.ghost {
  border: 1px solid rgba(76, 99, 255, 0.22);
  color: var(--color-text);
}

.btn.inline {
  margin-top: 2rem;
  border-bottom: 1px solid transparent;
  padding: 0.25rem 0;
  border-radius: 0;
}

.btn.inline:hover {
  border-color: var(--color-primary);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--color-border);
  padding: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  margin: 0;
  padding: 0.5rem clamp(1rem, 4vw, 4rem);
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: "Sora", "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Header: small, crisp sizing */
.site-header .brand-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}

/* Visual logo rendered via background to "zoom" without changing header/footer height */


.brand-name {
  display: none;
  font-size: 1rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.site-nav a {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(76, 99, 255, 0.12);
}

.nav-cta {
  background: linear-gradient(135deg, var(--color-primary), #4b9de0);
  color: #ffffff;
  box-shadow: 0 18px 32px -20px rgba(76, 99, 255, 0.45);
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 48px -18px rgba(76, 99, 255, 0.6);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  position: relative;
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  position: absolute;
  left: 50%;
  width: 1.5rem;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle-bar {
  top: 50%;
  transform: translate(-50%, -50%);
}

.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  left: 0;
}

.nav-toggle-bar::before {
  transform: translate(-50%, -0.5rem);
}

.nav-toggle-bar::after {
  transform: translate(-50%, 0.5rem);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before {
  transform: translate(-50%, 0) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after {
  transform: translate(-50%, 0) rotate(-45deg);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-top: clamp(8rem, 10vw, 10rem);
}

.hero-content h1 {
  font-family: "Sora", "Inter", sans-serif;
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero-lede {
  margin-top: 1.5rem;
  color: var(--color-text-muted);
  max-width: 640px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* Keep the About title on a single line on larger screens */
@media (min-width: 900px) {
  .about .section-head {
    max-width: 1400px; /* allow full phrase width */
  }
  .about .section-head h2 {
    display: inline-block;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: manual;
  }
  
  /* Apply the same single-line logic to Why RCG (approach) */
  .approach .section-head {
    max-width: 1400px;
  }
  
  .approach .section-head h2 {
    display: inline-block;
    word-break: normal;
    overflow-wrap: normal;
    hyphens: manual;
  }
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
  list-style: none;
  color: var(--color-text-muted);
}

.hero-stats dd {
  font-family: "Sora", "Inter", sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--color-text);
}

.hero-visual {
  position: relative;
  min-height: 420px;
  background: linear-gradient(135deg, rgba(76, 99, 255, 0.15), rgba(255, 255, 255, 0.9));
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-elevated);
}

.hero-video {
  position: absolute;
  inset: 0;
  opacity: 0.45;
}

.hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay-card {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  max-width: 300px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 1.5rem;
  box-shadow: 0 20px 45px -28px rgba(24, 45, 110, 0.3);
  color: var(--color-text);
}

.overlay-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-primary);
}

/* About cards grid */
.about-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: stretch; /* equal height cards */
}

.about-grid article {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 2rem 2rem 2.15rem;
  color: var(--color-text-muted);
  box-shadow: 0 24px 40px -35px rgba(24, 45, 110, 0.35);
  display: flex;
  flex-direction: column;       /* stack heading above text */
  align-items: center;          /* center horizontally */
  justify-content: flex-start;  /* content starts at top */
  text-align: center;
  position: relative;
  height: 100%;
}

/* Heading + text styling inside the cards */
.about-grid article h3 {
  font-family: "Sora", "Inter", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.about-grid article p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* decorative line above each heading */
.about-grid article::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), #4b9de0);
  opacity: 0.7;
}

/* Equal height behavior: wrap grid in a container that stretches children */
.about-grid { align-items: stretch; }

.team-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr; /* mobile default */
  align-items: stretch;
}

@media (min-width: 640px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .team-grid { grid-template-columns: repeat(3, 1fr); } /* cap at three columns */
}

.team-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 1.6rem 1.5rem 1.9rem;
  box-shadow: 0 24px 40px -35px rgba(24, 45, 110, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  text-align: center;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.team-card:hover, .team-card:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 32px 60px -38px rgba(24,45,110,0.42);
  border-color: rgba(76,99,255,0.35);
}

.team-card h3 {
  font-size: 1.1rem;
  color: var(--color-text);
  margin-top: 0.4rem;
}

.team-card p {
  color: var(--color-text-muted);
}

/* Avatar placeholder */
.team-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary) 0%, #4b9de0 60%, var(--color-accent) 110%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Sora", "Inter", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: 0.05em;
  box-shadow: 0 10px 25px -12px rgba(24,45,110,0.35);
  margin: 0 auto 0.4rem;
}

/* subtle decorative accent for About cards */
.about-grid article::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-primary), #4b9de0);
  opacity: 0.6;
}

/* Services */
.services {
  position: relative;
}

.services::before {
  content: "";
  position: absolute;
  inset: 2rem clamp(1.5rem, 5vw, 5rem);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--color-border);
  z-index: -1;
  box-shadow: 0 30px 70px -45px rgba(24, 45, 110, 0.3);
}

.services-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(280px, 1fr);
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.service-list {
  display: grid;
  gap: 1rem;
  padding: 0.25rem;
}

.service-item {
  border: 1px solid var(--color-border);
  background: rgba(238, 242, 255, 0.75);
  color: var(--color-text-muted);
  padding: 1.25rem 1.5rem;
  border-radius: 18px;
  text-align: left;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.service-item.is-active,
.service-item:hover {
  transform: translateX(6px);
  background: rgba(76, 99, 255, 0.14);
  color: var(--color-text);
  border-color: rgba(76, 99, 255, 0.35);
}

.service-detail {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 24px;
  border: 1px solid var(--color-border);
  padding: clamp(2rem, 4vw, 3rem);
  box-shadow: var(--shadow-elevated);
  margin: 0.25rem;
}

.service-detail h3 {
  font-family: "Sora", "Inter", sans-serif;
  font-size: 1.6rem;
  margin-bottom: 1rem;
}

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

.service-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.service-columns h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.service-columns ul {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  color: var(--color-text);
}

.service-columns li {
  position: relative;
  padding-left: 1.25rem;
}

.service-columns li::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--color-primary);
  transform: translateY(-50%);
  opacity: 0.6;
}

.service-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.service-metrics div {
  background: rgba(76, 99, 255, 0.08);
  border-radius: 16px;
  padding: 1.25rem;
  border: 1px solid rgba(76, 99, 255, 0.18);
}

.metric-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
}

.metric-value {
  font-family: "Sora", "Inter", sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
}

/* Approach */
.approach {
  display: grid;
  gap: clamp(2rem, 4vw, 4rem);
  position: relative;
  margin-bottom: clamp(2rem, 6vw, 4rem); /* add breathing room below the cards */
  overflow: hidden;
}

.approach-steps {
  display: grid;
  gap: 1.5rem;
  list-style: none;
  counter-reset: step;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* columns instead of single vertical list */
}

.approach-steps li {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--color-border);
  border-radius: 22px;
  padding: 1.75rem 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 48px -36px rgba(24, 45, 110, 0.38);
}

.approach-steps h3 {
  font-family: "Sora", "Inter", sans-serif;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.approach-steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-family: "Sora", "Inter", sans-serif;
  font-size: 2.5rem;
  color: rgba(76, 99, 255, 0.08);
}

.approach-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pulse {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  border: 2px solid rgba(76, 99, 255, 0.18);
  top: 50%;
  left: 70%;
  transform: translate(-50%, -50%);
  animation: pulse 6s infinite;
}

.pulse.delay {
  animation-delay: 1.5s;
  width: 320px;
  height: 320px;
}

.pulse.slow {
  animation-delay: 3s;
  width: 440px;
  height: 440px;
}

@keyframes pulse {
  0% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(0.9);
  }
  70% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.3);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.35);
  }
}

/* Impact */
.impact {
  background: rgba(238, 242, 255, 0.65);
}

.impact-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.impact-grid article {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 18px;
  border: 1px solid var(--color-border);
  padding: 1.75rem;
  box-shadow: 0 24px 50px -32px rgba(24, 45, 110, 0.35);
}

/* Clients */
.clients-carousel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

.carousel-control {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.carousel-control:hover {
  transform: translateY(-2px);
  background: rgba(76, 99, 255, 0.14);
}

.carousel-track {
  display: flex;
  gap: clamp(2rem, 6vw, 4rem);
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 1.5rem;
  border-radius: 24px;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 24px 50px -32px rgba(24, 45, 110, 0.28);
  align-items: center; /* vertically center all logos within the track */
}

.carousel-track::-webkit-scrollbar {
  height: 0;
}

.carousel-track img {
  /* Keep logos visually consistent using a bounding box */
  height: auto;
  max-height: 48px;         /* cap tall logos */
  max-width: 140px;         /* cap wide logos (e.g., IBM, Morgan Stanley) */
  width: auto;
  opacity: 0.78;
  filter: grayscale(100%);
  transition: opacity 0.2s ease, filter 0.2s ease, transform 0.2s ease;
  object-fit: contain;
  padding: 4px 8px;         /* breathing room so different canvases feel aligned */
}

/* Enlarge selected logos slightly */
.carousel-track img[alt^="Fanatics"],
.carousel-track img[alt^="ALX"],
.carousel-track img[alt^="Morgan Stanley"] {
  max-height: 62px;
}

/* Give TechnoServe a bit more size */
.carousel-track img[alt^="TechnoServe"] {
  max-height: 68px;
}

/* Reduce oversized wordmarks */
.carousel-track img[alt^="IBM"],
.carousel-track img[alt^="SAND Technologies"] {
  max-height: 34px; /* reduced further for visual balance */
}

.carousel-track img:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: translateY(-2px);
}

.clients-footnote {
  margin-top: 2rem;
  color: var(--color-text-muted);
  text-align: center;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  font-size: 0.9rem;
}

/* CTA */
.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(4rem, 7vw, 6rem) clamp(2rem, 5vw, 4rem);
  margin: clamp(2rem, 6vw, 5rem) clamp(1.5rem, 5vw, 5rem);
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(76, 99, 255, 0.45), rgba(116, 143, 255, 0.32), rgba(197, 162, 83, 0.3));
  border-radius: 36px;
  border: 1px solid rgba(76, 99, 255, 0.25);
  z-index: -1;
  box-shadow: 0 36px 80px -30px rgba(24, 45, 110, 0.35);
}

.cta-content {
  max-width: 760px;
  display: grid;
  gap: 1.4rem;
}

.cta-content h2 {
  font-family: "Sora", "Inter", sans-serif;
  font-size: clamp(1.85rem, 2.8vw, 2.2rem);
  letter-spacing: -0.01em;
  /* allow wrapping globally – mobile overrides will still apply */
  white-space: normal;
}

.cta-content p {
  color: rgba(12, 26, 58, 0.76);
  font-size: 1rem;
}

.cta-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: center;
}

.cta-actions .btn.primary {
  padding: 1.05rem 2.4rem;
  font-size: 1.05rem;
}

.cta-actions .btn.ghost {
  padding: 1.05rem 2.4rem;
  border-color: rgba(12, 26, 58, 0.18);
  background: rgba(255, 255, 255, 0.2);
  font-size: 1.05rem;
}

/* Contact */
.contact .section-head {
  /* Add extra breathing room between the lede and the grid */
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.contact-grid {
  display: grid;
  /* Center the two columns and give them sensible, fixed bounds */
  grid-template-columns: minmax(260px, 520px) minmax(360px, 640px);
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
  justify-content: center; /* center the grid within the section */
  max-width: 1200px;
  margin-inline: auto;
}

/* Left column: simple copy, no box */
.contact-intro {
  display: grid;
  gap: 1rem;
  text-align: right; /* right-align heading and list */
}

.contact-intro h3 {
  font-family: "Sora", "Inter", sans-serif;
  font-size: 1.4rem;
}

.contact-intro ul {
  list-style: none;
  color: var(--color-text-muted);
  display: grid;
  gap: 0.5rem;
}

.contact-intro a:hover {
  text-decoration: underline;
}

.contact-form {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--color-border);
  border-radius: 22px;
  padding: clamp(2rem, 3vw, 3rem);
  box-shadow: var(--shadow-elevated);
  display: grid;
  gap: 1rem;
  max-width: 640px; /* wider form */
  justify-self: stretch; /* fill its column rather than float to the edge */
}

.form-row {
  display: grid;
  gap: 0.5rem;
}

/* Two-column layout for first/last name */
.form-row.two-col {
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-row.two-col .field {
  display: grid;
  gap: 0.5rem;
}

.form-row label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
}

.form-row input,
.form-row textarea {
  background: rgba(238, 242, 255, 0.45);
  border: 1px solid rgba(76, 99, 255, 0.18);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  color: var(--color-text);
  font-size: 1rem;
  font-family: inherit;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.form-row input:focus-visible,
.form-row textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(76, 99, 255, 0.25);
}

.form-feedback {
  height: 1.5rem;
  font-size: 0.9rem;
  color: var(--color-primary);
}

/* Footer */
.site-footer {
  padding: 2rem clamp(1.5rem, 5vw, 5rem);
  border-top: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.95);
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--color-text);
}

.footer-meta {
  font-size: 0.8rem;
}

/* Utilities */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.counter {
  display: inline-block;
}

.hero-typed {
  display: inline-grid;
  position: relative;
  align-items: baseline;
}

.hero-typed-text,
.hero-typed-shadow {
  grid-area: 1 / 1;
  white-space: normal; /* let it wrap on small screens */
}

.hero-typed-text {
  color: var(--color-primary);
}

.hero-typed-shadow {
  visibility: hidden;
  pointer-events: none;
}

@keyframes caret {
  0%,
  45% {
    border-color: transparent;
  }
  50%,
  100% {
    border-color: var(--color-primary);
  }
}

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

/* Case Studies Overview */
.case-studies-overview .section-head {
  margin-bottom: 3rem;
}

.case-studies-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.case-study-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 2rem;
  box-shadow: 0 24px 50px -32px rgba(24, 45, 110, 0.35);
  margin-bottom: 2rem;
}

.case-study-card h3 {
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.case-study-card p {
  margin-bottom: 1.5rem;
  color: var(--color-text-muted);
}

.case-study-card .sector {
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 1rem;
}



/* Case Study Detail Pages */
.case-study {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 8rem) clamp(1.5rem, 5vw, 3rem);
}

.case-study .section-head {
  margin-bottom: 3rem;
}

.case-study .sector {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 1rem;
  margin-top: 0.5rem;
}

.case-study-content {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: clamp(2rem, 4vw, 4rem);
  box-shadow: 0 24px 50px -32px rgba(24, 45, 110, 0.35);
  line-height: 1.7;
}

.case-study-content h3 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  color: var(--color-text);
}

.case-study-content h3:first-child {
  margin-top: 0;
}

.case-study-content h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
  color: var(--color-text);
}

.case-study-content p {
  margin-bottom: 1.5rem;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.case-study-content ul,
.case-study-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
  color: var(--color-text-muted);
}

.case-study-content li {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.case-study-content strong {
  color: var(--color-text);
  font-weight: 600;
}

.case-study-content em {
  color: var(--color-text);
  font-style: italic;
}

.case-study-content a.btn {
  margin-top: 3rem;
  display: inline-block;
}


/* Responsive */
@media (max-width: 900px) {
  .brand-name {
    display: inline;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    inset: 4.5rem 1.25rem auto;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    flex-direction: column;
    padding: 1.25rem;
    transform: scale(0.96);
    transform-origin: top right;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

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

  .site-nav.is-open {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }

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

  .service-item.is-active,
  .service-item:hover {
    transform: translateY(-3px);
  }

  .hero {
    padding-top: 6rem;
  }

  /* Why RCG: stack to single column on small screens */
  .approach-steps {
    grid-template-columns: 1fr;
  }

  /* Contact: stack and full-width on small screens */
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .contact-intro {
    text-align: left; /* reset for mobile for readability */
  }
  .contact-form {
    max-width: none;
    justify-self: stretch;
  }
  .form-row.two-col {
    grid-template-columns: 1fr; /* stack on narrow screens */
  }
}



/* Footer: balanced, comfortably visible */
.site-footer .brand-logo {
  height: 36px;
  width: auto;
  object-fit: contain;
}

@media (min-width: 901px) {
  .site-footer .brand-logo {
    height: 42px;
  }
}

@media (max-width: 600px) {
  .hero-visual {
    min-height: 320px;
  }

  .hero-overlay-card {
    position: static;
    margin: 1.5rem;
  }

  .hero-typed {
    display: inline-grid;
    position: relative;
    align-items: baseline;
  }

  .about {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-typed-text,
  .hero-typed-shadow {
    grid-area: 1 / 1;
    white-space: normal;
  }

  .hero-typed-shadow {
    visibility: hidden;
    pointer-events: none;
  }
}

/* =============================================================== */
/* Ultra-small phones: general tightening */
@media (max-width: 480px) {
  /* Reduce section padding slightly */
  section {
    padding: 3rem 1.25rem;
  }

  /* Let long headings wrap instead of forcing a single line */
  .cta-content h2 {
    white-space: normal;
  }

  /* Hero: stack content and reduce top spacing a bit */
  .hero {
    grid-template-columns: 1fr;
    padding-top: 5.5rem;
  }

  /* Hero stats look better in 2 columns than 3 squashed ones */
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
  .hero-content h1 {
    font-size: 2rem; /* was effectively 2.5rem via clamp */
  }

  /* About cards: give them a bit more breathing room */
  .about-grid {
    grid-template-columns: 1fr;
  }
}

/* Carousel: mobile-friendly behaviour */
@media (max-width: 600px) {
  .clients-carousel {
    grid-template-columns: 1fr;   /* stack, no side columns */
    gap: 0.75rem;
  }

  /* Hide arrow controls on small screens;
     swipe/scroll is the primary interaction */
  .clients-carousel .carousel-control {
    display: none;
  }

  .carousel-track {
    padding: 0.75rem 1rem;
    gap: 1.25rem;
    border-radius: 16px;
  }

  .carousel-track img {
    max-height: 36px;
    max-width: 96px;
    padding: 2px 4px;
  }

  .clients-footnote {
    padding-inline: 0.5rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 600px) {
  /* Keep hero card inside the viewport nicely */
  .hero-visual {
    min-height: 260px;
    border-radius: 24px;
  }

  .hero-overlay-card {
    margin: 1rem;
    padding: 1.1rem 1.25rem;
  }

  /* CTA: let the title wrap and reduce padding */
  .cta {
    margin: 2.5rem 1.25rem;
    padding: 3rem 1.5rem;
  }

  .cta-content h2 {
    white-space: normal;
    font-size: 1.6rem;
  }
}

/* CTA: fix layout on tablets & small phones */
@media (max-width: 768px) {
  .cta {
    margin: 2.5rem 1.25rem;
    padding: 2.5rem 1.5rem;
  }

  .cta-content {
    text-align: left;            /* feels better on narrow screens */
    gap: 1rem;
  }

  .cta-content h2 {
    font-size: 1.6rem;           /* smaller headline */
    line-height: 1.25;
    white-space: normal !important;     /* allow wrapping */
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .cta-actions {
    justify-content: flex-start; /* buttons align under text */
  }

  .cta-actions .btn.primary,
  .cta-actions .btn.ghost {
    width: 100%;                 /* full-width buttons on small screens */
    justify-content: center;
  }
}

/* Extra tightening for very small devices (iPhone 12 mini, etc.) */
@media (max-width: 480px) {
  .cta {
    margin: 2rem 1rem;
    padding: 2rem 1.25rem;
  }

  .cta-content h2 {
    font-size: 1.4rem;
  }
}

/* Contain the animated pulse circles so they can't widen the page */
.approach {
  overflow: hidden;       /* <- key line */
}

/* Defensive: no heading can force the layout wider than the viewport */
.hero-content h1,
.section-head h2,
.cta-content h2 {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}