/* =========================================================
   CLOUDLAM AI — Design System
   Clean & Professional | Navy + Electric Blue
   ========================================================= */

/* --- 1. Design Tokens ---------------------------------- */
:root {
  --color-primary: #1E3A5F;
  --color-primary-dark: #14263F;
  --color-accent: #2563EB;
  --color-accent-dark: #1D4ED8;
  --color-bg: #FFFFFF;
  --color-bg-light: #EFF6FF;
  --color-bg-section: #F8FAFC;
  --color-text: #1A1A2E;
  --color-text-muted: #64748B;
  --color-border: #E2E8F0;
  --color-white: #FFFFFF;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1200px;
  --nav-height: 72px;
  --radius: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  --transition: 0.2s ease;
}

/* --- 2. Reset & Base ---------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover { color: var(--color-accent-dark); }

ul { list-style: none; }

/* --- 3. Typography ------------------------------------ */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.lead {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

/* --- 4. Layout Utilities ----------------------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

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

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

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
}

/* --- 5. Navigation ----------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

.nav-logo:hover { color: var(--color-primary); }

.nav-logo .logo-accent {
  color: var(--color-accent);
}

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

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

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
}

.nav-links a.active {
  font-weight: 600;
}

/* Keep CTA button legible when it is the active-page link */
.nav-links .btn.active,
.nav-links .btn:hover {
  color: var(--color-white);
}

.nav-cta {
  margin-left: 1rem;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- 6. Buttons -------------------------------------- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-align: center;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-white);
}
.btn-accent:hover {
  background: var(--color-accent-dark);
  color: var(--color-white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-white {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.4);
}
.btn-outline-white:hover {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}

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

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1rem;
}

/* --- 7. Hero ----------------------------------------- */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-white);
  padding: 6rem 0 7rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: 840px;
}

.hero-slogan {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(37, 99, 235, 0.15);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.hero h1 {
  color: var(--color-white);
  margin-bottom: 1.5rem;
}

.hero-subtext {
  font-size: 1.25rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2.5rem;
  max-width: 700px;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Inner page hero */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-white);
  padding: 4rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.page-hero h1 {
  color: var(--color-white);
  margin-bottom: 0.75rem;
  position: relative;
}

.page-hero p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}

/* --- 8. Cards ---------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

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

/* 4-column service grid — collapses to 2×2 on tablets, stacks on mobile */
.card-grid-4 {
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.card-grid-4 .card {
  padding: 1.5rem;
}

.card-grid-4 .card h3 {
  font-size: 1.125rem;
}

.card-grid-4 .card p {
  font-size: 0.95rem;
}

@media (max-width: 1024px) {
  .card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .card-grid-4 .card {
    padding: 2rem;
  }
}

@media (max-width: 600px) {
  .card-grid-4 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--color-bg-light);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  margin-bottom: 0.75rem;
}

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

.card ul {
  margin-top: 1rem;
}

.card ul li {
  padding: 0.375rem 0 0.375rem 1.5rem;
  position: relative;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.card ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* Case study card */
.case-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-accent);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.case-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.case-industry {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-bg-light);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.case-row {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.case-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

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

.case-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.case-result {
  color: var(--color-primary);
  font-weight: 600;
}

/* --- 9. Transformation Strip ------------------------- */
.transform-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 1.5rem;
  align-items: center;
  max-width: 960px;
  margin: 0 auto;
}

.transform-step {
  text-align: center;
  padding: 1.5rem;
}

.transform-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-white);
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.transform-step h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.transform-step p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.transform-arrow {
  color: var(--color-accent);
  font-size: 1.5rem;
  font-weight: 700;
}

/* --- 10. Differentiators ----------------------------- */
.diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.diff-item {
  padding: 1.5rem;
  border-left: 4px solid var(--color-accent);
  background: var(--color-white);
}

.diff-item h3 {
  margin-bottom: 0.75rem;
}

.diff-item p {
  color: var(--color-text-muted);
}

/* --- 11. Process Stepper ----------------------------- */
.stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  counter-reset: step;
}

.step {
  text-align: center;
  padding: 1.5rem;
  position: relative;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.step h4 {
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.step p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* --- 12. Metrics Bar --------------------------------- */
.metrics-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  padding: 2rem;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  margin-bottom: 3rem;
  text-align: center;
}

.metric-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.25rem;
  line-height: 1;
}

.metric-label {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

/* --- 13. Values Grid --------------------------------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .values-grid {
    grid-template-columns: 1fr;
  }
}

.value-item {
  padding: 2rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.value-item h3 {
  color: var(--color-accent);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.value-item p {
  color: var(--color-text-muted);
}

/* --- 14. Mission Quote ------------------------------- */
.mission-quote {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  padding: 2rem 0;
}

.mission-quote p {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  line-height: 1.4;
  color: var(--color-primary);
  font-weight: 500;
  font-style: italic;
}

.mission-quote::before {
  content: "\201C";
  display: block;
  font-size: 4rem;
  color: var(--color-accent);
  line-height: 1;
  font-family: Georgia, serif;
  margin-bottom: -1rem;
}

/* --- 15. CTA Banner ---------------------------------- */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: var(--color-white);
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: "";
  position: absolute;
  top: -100%;
  left: -20%;
  width: 60%;
  height: 300%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.cta-banner h2 {
  color: var(--color-white);
  margin-bottom: 1.5rem;
  position: relative;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.125rem;
  max-width: 620px;
  margin: 0 auto 2rem;
  position: relative;
}

.cta-banner .btn {
  position: relative;
}

/* --- 16. Footer -------------------------------------- */
.footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 3.5rem 0 1.5rem;
}

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

.footer-brand {
  max-width: 360px;
}

.footer-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.footer-logo .logo-accent {
  color: var(--color-accent);
}

.footer-brand p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
}

.footer h4 {
  color: var(--color-white);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer ul li a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: color var(--transition);
}

.footer ul li a:hover {
  color: var(--color-white);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

/* --- 17. Contact Form -------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 4rem;
  align-items: start;
}

.form-field {
  margin-bottom: 1.25rem;
}

.form-field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

.contact-info {
  background: var(--color-bg-light);
  padding: 2rem;
  border-radius: var(--radius-lg);
}

.contact-info h3 {
  margin-bottom: 1rem;
}

.contact-info-item {
  margin-bottom: 1.5rem;
}

.contact-info-item:last-child {
  margin-bottom: 0;
}

.contact-info-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.contact-info-value {
  font-size: 1rem;
  color: var(--color-primary);
  font-weight: 500;
}

.contact-info-value a {
  color: var(--color-primary);
}

.contact-info-value a:hover {
  color: var(--color-accent);
}

/* --- 18. Legal / Content pages ----------------------- */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content ul {
  margin-bottom: 1rem;
  color: var(--color-text);
}

.legal-content ul {
  padding-left: 1.5rem;
  list-style: disc;
}

.legal-content ul li {
  margin-bottom: 0.5rem;
}

.legal-meta {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

/* --- 19. Success & Error Pages ----------------------- */
.centered-content {
  min-height: calc(100vh - var(--nav-height) - 300px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  text-align: center;
}

.centered-content-inner {
  max-width: 560px;
}

.big-404 {
  font-size: clamp(6rem, 15vw, 10rem);
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 1rem;
  letter-spacing: -0.05em;
}

.success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  background: var(--color-bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.success-icon svg {
  width: 36px;
  height: 36px;
}

/* --- 20. Responsive ---------------------------------- */
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 3.5rem 0;
  }

  .hero {
    padding: 3.5rem 0 4.5rem;
  }

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

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    gap: 0;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-links.open {
    max-height: 500px;
    padding: 1rem 1.5rem;
  }

  .nav-links a {
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 0.5rem;
    width: 100%;
  }

  .transform-strip {
    grid-template-columns: 1fr;
  }

  .transform-arrow {
    transform: rotate(90deg);
    margin: 0.5rem 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: auto;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .card,
  .case-card,
  .value-item {
    padding: 1.5rem;
  }

  .cta-banner {
    padding: 3rem 0;
  }
}

/* --- 18. Visual Enhancements ------------------------- */

/* All hero/CTA/section containers need relative + overflow for decor */
.section,
.hero,
.cta-banner,
.page-hero {
  position: relative;
}

.section,
.cta-banner,
.page-hero {
  overflow: hidden;
}

/* Keep inner content above decorative layers */
.section > .container,
.hero > .container,
.cta-banner > .container,
.page-hero > .container {
  position: relative;
  z-index: 1;
}

/* Dot-grid background pattern */
.pattern-dots::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(37, 99, 235, 0.22) 1px, transparent 1.5px);
  background-size: 26px 26px;
  opacity: 0.6;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
          mask-image: radial-gradient(ellipse at center, black 20%, transparent 75%);
  z-index: 0;
}

.pattern-grid-soft::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(30, 58, 95, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 58, 95, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
          mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  z-index: 0;
}

/* Floating decorative gradient blobs */
.decor {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  filter: blur(50px);
  opacity: 0.55;
  border-radius: 50%;
}
.decor--tl { top: -100px; left: -80px; width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.55), transparent 65%); }
.decor--tr { top: -120px; right: -100px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.45), transparent 65%); }
.decor--bl { bottom: -120px; left: -100px; width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(30, 58, 95, 0.4), transparent 65%); }
.decor--br { bottom: -140px; right: -120px; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.4), transparent 65%); }

/* On dark backgrounds, use brighter accent */
.hero .decor,
.cta-banner .decor,
.page-hero .decor {
  filter: blur(60px);
  opacity: 0.45;
}
.hero .decor--tr,
.cta-banner .decor--tr { background: radial-gradient(circle, rgba(96, 165, 250, 0.55), transparent 65%); }

/* Hero two-column layout with illustration */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}
.hero-content { max-width: 640px; }

.hero-illustration {
  position: relative;
  width: 100%;
  max-width: 520px;
  justify-self: end;
}
.hero-illustration svg {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.25));
}

/* Larger gradient service icons */
.card-icon-lg {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  box-shadow: 0 12px 28px -10px rgba(37, 99, 235, 0.55);
  position: relative;
  overflow: hidden;
}
.card-icon-lg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.28), transparent 55%);
  pointer-events: none;
}
.card-icon-lg svg {
  width: 30px;
  height: 30px;
  position: relative;
  z-index: 1;
}

/* Transformation flow diagram */
.flow-diagram {
  max-width: 960px;
  margin: -0.5rem auto 3rem;
  position: relative;
  z-index: 1;
}
.flow-diagram svg {
  width: 100%;
  height: auto;
  display: block;
}

/* Animations */
@keyframes nodePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
.node-pulse { animation: nodePulse 3s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.node-pulse.d1 { animation-delay: 0.4s; }
.node-pulse.d2 { animation-delay: 0.8s; }
.node-pulse.d3 { animation-delay: 1.2s; }
.node-pulse.d4 { animation-delay: 1.6s; }
.node-pulse.d5 { animation-delay: 2.0s; }

@keyframes flowDash { to { stroke-dashoffset: -80; } }
.flow-line {
  stroke-dasharray: 6 8;
  animation: flowDash 3.5s linear infinite;
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.float-slow { animation: floatY 6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.float-slow.d1 { animation-delay: 1s; }
.float-slow.d2 { animation-delay: 2s; }

@keyframes spinSlow { to { transform: rotate(360deg); } }
.spin-slow { animation: spinSlow 30s linear infinite; transform-origin: center; transform-box: fill-box; }

@media (prefers-reduced-motion: reduce) {
  .node-pulse, .flow-line, .float-slow, .spin-slow { animation: none; }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero-illustration {
    order: -1;
    justify-self: center;
    max-width: 380px;
  }
}

/* Centered card content — home page preview cards only (not services' 4-col grid) */
.card-grid:not(.card-grid-4) .card {
  text-align: center;
}
.card-grid:not(.card-grid-4) .card .card-icon,
.card-grid:not(.card-grid-4) .card .card-icon-lg {
  margin-left: auto;
  margin-right: auto;
}

/* Centered differentiator items */
.diff-grid {
  gap: 1.5rem;
}
.diff-item {
  text-align: center;
  border-left: none;
  border-top: 4px solid var(--color-accent);
  background: var(--color-white);
  padding: 2rem 1.75rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* Compact horizontal footer link lists */
.footer-grid {
  grid-template-columns: 2fr 1.2fr 1.3fr;
}
.footer ul {
  display: block;
}
