/* =========================================================
   1) DESIGN TOKENS
   ========================================================= */
:root {
  /* Brand (HADRIZ palette) */
  --color-primary: #0f365a;
  --color-primary-dark: #071d33;
  --color-accent: #18a4a4;
  --color-accent-dark: #0e7777;

  /* Backgrounds */
  --color-page-bg: #f5f7fa; /* IMPORTANT: used by cards */
  --color-section-alt: #e9f2fb;
  --color-surface: #ffffff;
  --color-border-subtle: #d5dfec;

  /* Text */
  --color-text-main: #1a2533;
  --color-text-muted: #5a6b82;
  --color-text-inverted: #ffffff;

  /* Legacy mappings */
  --navy: var(--color-primary);
  --ocean: var(--color-accent);
  --aqua: #2bb3c8;
  --sky: var(--color-section-alt);
  --ink: var(--color-text-main);
  --muted: var(--color-text-muted);
  --border: var(--color-border-subtle);
  --panel: var(--color-surface);

  --radius: 16px;
  --shadow: 0 18px 40px rgba(15, 54, 90, 0.1);

  --container-pad: clamp(14px, 4vw, 28px);
  --section-pad-y: clamp(34px, 7vw, 56px);

  --h2-size: clamp(20px, 4.6vw, 28px);
  --card-radius: clamp(14px, 2.2vw, 18px);
  --card-pad: clamp(14px, 3.2vw, 18px);

  --proof-gap: clamp(12px, 5vw, 44px);
}

/* Enable component-level responsiveness */
@supports (container-type: inline-size) {
  .cq {
    container-type: inline-size;
  }
}

/* =========================================================
   2) RESET + BASE
   ========================================================= */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--color-text-main);
  background: #ffffff; /* outer gutters */
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}
/*
p {
  margin: 0 0 10px 0;
}*/
a {
  color: var(--color-accent);
}

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

/* =========================================================
   3) LAYOUT UTILITIES
   ========================================================= */
.container {
  max-width: 1350px;
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

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

/* Generic auto-grid: adapts without viewport breakpoints */
.grid.auto {
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

/* Optional: if you want a slightly wider minimum for bigger cards */
.grid.auto.wide {
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
}

/* =========================================================
   4) PAGE SHELL (3-col desktop, 1-col mobile)
   ========================================================= */

/* Page shell: stable outer gutters + consistent readable line length */
.page-shell {
  width: 100%;
  background: #ffffff; /* outer gutters */
}

/* Make sections feel centered even on ultra-wide screens */
.section-wrap {
  width: min(1600px, 100%);
  margin-inline: auto;
  padding-inline: var(--container-pad);
  padding-block: var(--section-pad-y);
}


/* For wide sections (like Capabilities/Problems containers) */
.inner-wide {
  width: min(1350px, 100%);
  margin-inline: auto;
}

/* =========================================================
   5) HEADER + NAV
   ========================================================= */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  color: var(--color-text-inverted);
  backdrop-filter: saturate(160%) blur(10px);
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(7, 29, 51, 0.45);
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.35) 5%,
    rgba(255, 255, 255, 0.1) 30%,
    rgba(255, 255, 255, 0.05) 75%
  );
  pointer-events: none;
  z-index: -1;
}

header .container.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 100%;
  padding: 0 var(--container-pad);
}

header .brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

header .container.nav > div:not(.brand) {
  flex: 1;
  display: flex;
  justify-content: center;
}

.hadriz-logo-img {
  height: clamp(56px, 9vw, 115px);
  width: auto;
  max-width: 95vw;
  display: block;
  filter: brightness(1.06) contrast(1.05)
    drop-shadow(0 1px 4px rgba(0, 0, 0, 0.18));
}

header nav.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3.5vw, 48px);
  flex-wrap: wrap;
}

header nav.primary-nav a {
  color: var(--color-primary-dark);
  text-decoration: none;
  padding: 5px 0;
  border-radius: 10px;
  font-weight: 600;
  font-size: 18px;
  white-space: nowrap;
}

header nav.primary-nav a:hover {
  color: var(--color-accent);
}

/* Mobile nav button */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 3px;
  margin: 3px 0;
  background: var(--color-primary-dark);
  border-radius: 2px;
}




/* Container-query nav (responds to header width, not viewport width) */
@supports (container-type: inline-size) {
  @container (max-width: 700px) {
    header {
      overflow: visible;
    }

    header .container.nav {
      justify-content: center;
      position: relative;
    }

    header .container.nav .brand {
      flex: 1 1 auto;
      display: grid;
      place-items: center;
    }

    .nav-toggle {
      display: block;
    }

    header .container.nav .nav-toggle {
      position: absolute;
      right: 16px;
      top: 50%;
      transform: translateY(-50%);
    }

    header nav.primary-nav {
      display: none;
      flex-direction: column;
      align-items: flex-start;
      position: absolute;
      top: 100%;
      left: 16px;
      right: 16px;
      padding: 12px 16px 16px;
      margin-top: 10px;
      gap: 12px;
      background: linear-gradient(
        90deg,
        rgba(15, 54, 90, 0.94) 0%,
        rgba(75, 94, 121, 0.95) 100%
      );
      border: 1px solid rgba(255, 255, 255, 0.12);
      box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.28),
        0 2px 0 rgba(255, 255, 255, 0.06) inset;
      border-radius: 16px;
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }

    header nav.primary-nav a {
      color: rgba(255, 255, 255, 0.92);
      width: 100%;
      padding: 10px 12px;
      border-radius: 12px;
    }

    header nav.primary-nav a:hover {
      color: #ffffff;
      background: rgba(24, 164, 164, 0.16);
    }

    header .container.nav.nav-open nav.primary-nav {
      display: flex;
    }
  }
}

/* =========================================
   Mobile nav fix — allow dropdown to escape header
   ========================================= */
@media (max-width: 700px) {
  header {
    overflow: visible;
  }
}

/* =========================================================
   6) HERO
   ========================================================= */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  background-image: url("assets/hero-background.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  align-items: center;
  min-height: clamp(10vh, 14vh + 2vw, 18vh);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.48) 0%,
    rgba(0, 0, 0, 0.35) 40%,
    rgba(0, 0, 0, 0.25) 100%
  );
  z-index: 0;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  padding: clamp(16px, 3vw, 40px) clamp(12px, 2vw, 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero h1 {
  font-weight: 700;
  text-shadow:
    0 6px 12px rgba(0, 0, 0, 0.65),
    0 2px 4px rgba(0, 0, 0, 0.45);
  font-size: clamp(34px, 6vw, 72px);
  line-height: 1.02;
  color: var(--color-text-inverted);
  letter-spacing: 2px;
  margin: 0;
  padding: 6px 12px;
  -webkit-font-smoothing: antialiased;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.55),
    rgba(255, 255, 255, 0)
  );
  pointer-events: none;
}

/* Underlines */
.h-underline {
  width: 200px;
  height: 3px;
  margin: 0 0 5px 0;
  background: linear-gradient(
    90deg,
    rgba(43, 179, 200, 0),
    #2bb3c8 15%,
    #176b99 50%,
    #0b3a5a 85%,
    rgba(11, 58, 90, 0)
  );
}

/* =========================================================
   7) COMMON COMPONENTS (cards, buttons)
   ========================================================= */
h2 {
  font-size: var(--h2-size);
  margin-bottom: 5px;
  text-align: left;
}

.card {
  padding: var(--card-pad);
  align-self: flex-start;
  position: relative;
  border: none;
  border-radius: var(--card-radius);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(7, 29, 51, 0.16);
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  border: 0;
  background: var(--color-accent);
  color: var(--color-text-inverted);
  font-weight: 600;
  cursor: pointer;
}
.btn:hover {
  background: var(--color-accent-dark);
}

/* =========================================================
   8) SECTION BACKGROUNDS (confined to .section-wrap)
   ========================================================= */
.about .section-wrap {
  background: var(--color-section-alt);
}
.credibility .section-wrap {
  background: var(--color-page-bg);
}
.capabilities .section-wrap {
  background: var(--color-section-alt);
}
.problems .section-wrap {
  background: var(--color-page-bg);
}
.approach .section-wrap {
  background: var(--color-section-alt);
}
.contact .section-wrap {
  background: var(--color-page-bg);
}


/* =========================================================
   9) ABOUT + IMAGE/TEXT LAYOUT
   ========================================================= */

/* Desktop / large screens → side by side */
.with-image {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 28px;
  align-items: center;
}

/* Image sizing */
.section-image {
  margin: 0;
}

.section-image img {
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: 32px;
}

/* Text block */
.section-text {
  max-width: 1400px;
}


/* On wider containers, go side-by-side */
@supports (container-type: inline-size) {
  @container (min-width: 760px) {
    .with-image {
      grid-template-columns: 360px 1fr;
      align-items: center;
    }

    .with-image .section-image {
      display: block;
    }
  }
}


@supports (container-type: inline-size) {
  @container (max-width: 759px) {
    .with-image {
      grid-template-columns: 1fr;
    }

    .with-image .section-image {
      display: none;
    }
  }
}

@supports (container-type: inline-size) {
  .section-wrap {
    container-type: inline-size;
  }
}

/* =========================================================
   10) DELIVERY CREDIBILITY
   ========================================================= */
.proof-bar {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 12px 0;
  justify-content: center;
  gap: var(--proof-gap);
  flex-wrap: wrap;
}

.proof-bar li {
  padding: clamp(6px, 1.6vw, 10px) clamp(12px, 2.6vw, 20px);
  border-radius: 999px;
  border: 2px solid #cfe5ea;
  background: #ffffff;
  font-weight: 600;
  color: #0f365a;
}

#credibility .cred-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 14px;
  margin-top: 14px;
  justify-content: center;
  justify-items: center;
}

#credibility .cred-tile {
  max-width: 420px;
  width: 100%;
}

#credibility .cred-tile {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 220px;
  box-shadow: 0 16px 32px rgba(7, 29, 51, 0.12);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.72),
    rgba(233, 242, 251, 0.92)
  );
  border: 1px solid rgba(213, 223, 236, 0.75);
  transition:
    transform 320ms ease,
    box-shadow 320ms ease;
}

#credibility .cred-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(7, 29, 51, 0.16);
}

#credibility .cred-tile-front,
#credibility .cred-tile-hover {
  padding: 18px 18px 16px 18px;
  display: grid;
  gap: 10px;
}

/* Delivery Credibility: down-arrow cue (always positioned reliably) */
#credibility .cred-tile {
  padding-bottom: 44px; /* reserve space so arrow never overlaps content */
}

#credibility .cred-tile::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.55;
  pointer-events: none;
  z-index: 5; /* above tile background */

  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23071D33' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat center / contain;

  transition:
    opacity 250ms ease,
    transform 250ms ease;
}

/* Hover state cue: UP arrow */
#credibility .cred-tile::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  opacity: 0;
  pointer-events: none;
  z-index: 6;

  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 15l-6-6-6 6' fill='none' stroke='%23071D33' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat center / contain;

  transition:
    opacity 200ms ease,
    transform 200ms ease;
}

#credibility .cred-tile::after,
#credibility .cred-tile::before {
  width: clamp(16px, 2.2vw, 18px);
  height: clamp(16px, 2.2vw, 18px);
  bottom: clamp(12px, 1.6vw, 14px);
}

/* Swap arrows on hover / focus */
#credibility .cred-tile:hover::after,
#credibility .cred-tile:focus-within::after {
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
}

#credibility .cred-tile:hover::before,
#credibility .cred-tile:focus-within::before {
  opacity: 0.75;
  transform: translateX(-50%) translateY(0);
}

#credibility .cred-ico {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-accent), #2bb3c8);
  box-shadow: 0 14px 28px rgba(24, 164, 164, 0.22);
}
#credibility .cred-ico svg {
  width: 26px;
  height: 26px;
}

#credibility .cred-tile h3 {
  margin: 2px 0 0 0;
  font-size: 18px;
  color: var(--color-primary-dark);
}

#credibility .cred-tile-front p {
  margin: 0;
  line-height: 1.55;
}

/* hover panel */
#credibility .cred-tile-hover {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  color: #ffffff;
  background: linear-gradient(
    135deg,
    rgba(36, 53, 99, 0.94),
    rgba(6, 214, 246, 0.78)
  );
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

#credibility .cred-tile:hover .cred-tile-hover {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

#credibility .cred-tile-hover h3 {
  color: #ffffff;
}

#credibility .cred-tile:hover .cred-tile-front {
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 280ms ease,
    transform 280ms ease;
}

/* JS-driven open state (works on any device) */
#credibility .cred-tile.is-open .cred-tile-hover {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

#credibility .cred-tile.is-open .cred-tile-front {
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 280ms ease,
    transform 280ms ease;
}

/* Arrow cue swaps on open state too */
#credibility .cred-tile.is-open::after {
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
}

#credibility .cred-tile.is-open::before {
  opacity: 0.75;
  transform: translateX(-50%) translateY(0);
}

/* --- Credibility hover: remove the big empty gap --- */
#credibility .cred-tile-front,
#credibility .cred-tile-hover {
  display: grid;
  grid-template-columns: 72px 1fr;
  grid-template-rows: auto auto;     /* IMPORTANT: prevents tall empty row */
  column-gap: 14px;
  row-gap: 6px;
  align-items: start;
  align-content: start;             /* don't distribute space vertically */
  grid-auto-rows: min-content;      /* keep rows tight */
}

/* Icon stays only in row 1 (no spanning) */
#credibility .cred-ico {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
}

/* Title row 1, paragraph row 2 */
#credibility .cred-tile h3 {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
}

#credibility .cred-tile-front p,
#credibility .cred-tile-hover p {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
}


@supports (container-type: inline-size) {
  @container (max-width: 520px) {
    #credibility .cred-tile-front,
    #credibility .cred-tile-hover {
      grid-template-columns: 60px 1fr;
      column-gap: 12px;
    }

    #credibility .cred-ico {
      width: 56px;
      height: 56px;
      border-radius: 16px;
    }
  }
}


/* =========================================================
   11) CAPABILITIES (single source of truth — no duplicates)
   ========================================================= */
.capabilities-showcase {
  position: relative;
  overflow: hidden;
}

.capabilities-showcase .cap-watermark {
  position: absolute;
  inset: 0;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: clamp(40px, 7vw, 92px);
  color: rgba(15, 54, 90, 0.06);
  text-align: center;
  pointer-events: none;
  user-select: none;
  transform: translateY(-10px);
}

.cap-showcase {
  display: grid;
  grid-template-columns: 1fr 360px 1fr;
  gap: 22px;
  align-items: center;
  margin-top: 18px;
  container-type: inline-size;
}

.cap-col {
  display: grid;
  gap: 16px;
}

/* Make columns/cards predictable inside grid */
.cap-col,
.cap-item {
  min-width: 0;
}

.cap-item {
  display: grid;
  grid-template-columns: clamp(48px, 6vw, 54px) 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 14px 28px rgba(7, 29, 51, 0.1);
  border: 1px solid rgba(213, 223, 236, 0.7);
}

.cap-item h3 {
  margin: 0 0 6px 0;
  font-size: 18px;
  color: var(--color-primary-dark);
}

.cap-item p {
  margin: 0;
  line-height: 1.55;
}

.cap-icon {
  width: clamp(42px, 4.6vw, 46px);
  height: clamp(42px, 4.6vw, 46px);
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--color-accent), #2bb3c8);
  box-shadow: 0 10px 20px rgba(24, 164, 164, 0.25);
}

.cap-icon svg {
  width: 22px;
  height: 22px;
}

/* Centre illustration */
.cap-center {
  position: relative;
  width: 360px;
  height: 320px;
  display: grid;
  place-items: center;
}

.cap-ring {
  position: absolute;
  width: 165px;
  height: 165px;
  border-radius: 50%;
  border: 1px solid rgba(6, 214, 246, 0.25);
  box-shadow:
    0 0 40px rgba(6, 214, 246, 0.15),
    inset 0 0 30px rgba(36, 53, 99, 0.25);
}

.cap-core {
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 255, 255, 0.55) 35%,
      rgba(255, 255, 255, 0) 70%
    ),
    linear-gradient(160deg, rgba(24, 164, 164, 0.25), rgba(15, 54, 90, 0.08));
  border: 1px solid rgba(213, 223, 236, 0.85);
  box-shadow: 0 24px 60px rgba(7, 29, 51, 0.16);
  display: grid;
  place-items: center;
  position: relative;
}

.cap-core::after {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 999px;
  background: conic-gradient(
    from 180deg,
    rgba(43, 179, 200, 0.18),
    rgba(24, 164, 164, 0.14),
    rgba(15, 54, 90, 0.1),
    rgba(43, 179, 200, 0.18)
  );
  filter: blur(14px);
  z-index: -1;
}

.cap-core-mark {
  width: 84px;
  height: 84px;
  border-radius: 40px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 30px;
  letter-spacing: 1px;
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), #176b99);
  box-shadow: 0 16px 34px rgba(15, 54, 90, 0.25);
}

/* Orbit + bubbles */
.cap-orbit {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.cap-bubble {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  box-shadow: 0 18px 34px rgba(7, 29, 51, 0.16);
  opacity: 0.95;
  display: flex;
  align-items: center;
  justify-content: center;
  --r: 120px; /* orbit radius */
}

.cap-bubble::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
}

.cap-bubble.b1 {
  transform: rotate(0deg) translate(var(--r)) rotate(0deg);
}
.cap-bubble.b2 {
  transform: rotate(90deg) translate(var(--r)) rotate(-90deg);
}
.cap-bubble.b3 {
  transform: rotate(180deg) translate(var(--r)) rotate(-180deg);
}
.cap-bubble.b4 {
  transform: rotate(270deg) translate(var(--r)) rotate(-270deg);
}

.cap-bubble svg {
  width: 22px;
  height: 22px;
  stroke: rgba(15, 54, 90, 0.82);
  stroke-width: 1.5;
  fill: none;
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .cap-orbit {
    animation: capOrbit 25s linear infinite;
    transform-origin: center;
  }

  @keyframes capOrbit {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }

  .cap-core {
    animation: capFloat 6.5s ease-in-out infinite;
  }

  @keyframes capFloat {
    0%,
    100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(-6px);
    }
  }
}

/* Capabilities stacking: cap-col -> cap-center -> cap-col (<=820px) */
@supports (container-type: inline-size) {
  @container (max-width: 820px) {
    .cap-showcase {
      grid-template-columns: 1fr; /* stacked */
      justify-items: stretch;
    }

    /* Ensure cards take full width */
    .cap-col {
      width: 100%;
    }
    .cap-item {
      width: 100%;
    }

    /* Force vertical order: left cards, center, right cards */
    .cap-showcase > .cap-col:first-child {
      order: 1;
    }
    .cap-showcase > .cap-center {
      order: 2;
    }
    .cap-showcase > .cap-col:last-child {
      order: 3;
    }

    /* Center the graphic and make it smaller */
    .cap-center {
      width: 180px;
      height: 180px;
      margin: 18px auto;
      display: grid;
      place-items: center;
    }

    .cap-ring {
      width: 100px;
      height: 100px;
    }
    .cap-core {
      width: 100px;
      height: 100px;
    }

    .cap-core-mark {
      width: 55px;
      height: 55px;
      font-size: 22px;
      border-radius: 25px;
    }

    .cap-bubble {
      width: 44px;
      height: 44px;
      border-radius: 14px;
      --r: 70px;
    }

    .cap-bubble::after {
      inset: 11px;
    }
    .cap-bubble svg {
      width: 16px;
      height: 16px;
    }
  }
}

/* =========================================================
   12) PROBLEMS WE SOLVE (your consolidated block kept)
   ========================================================= */
/* (Kept as-is from your file — already well consolidated) */

#problems .problems-lead {
  margin: 12px 0 18px;
  line-height: 1.7;
  max-width: 860px;
}
#problems .problems-grid {
  align-items: start;
  container-type: inline-size;
}
#problems .problems-left .card + .card,
#problems .problems-right .card + .card {
  margin-top: 14px;
}

#problems .problem-h {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 8px 0;
  line-height: 1.25;
}

#problems .p-ico {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  border-radius: 8px;
  background: rgba(43, 179, 200, 0.12);
  border: 1px solid rgba(43, 179, 200, 0.22);
  margin-top: 2px;
}
#problems .p-ico svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#problems .problem-block ul {
  margin: 10px 0 0;
  padding-left: 18px;
}
#problems ul.muted li {
  margin: 6px 0;
  line-height: 1.6;
}
#problems p,
#problems .card p {
  margin: 0 0 10px 0;
}

#problems .problems-left,
#problems .problems-right {
  position: relative;
  border-radius: 18px;
  padding: 52px 16px 16px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(15, 54, 90, 0.1);
  box-shadow: none;
}

#problems .problems-left::before,
#problems .problems-right::before {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
  z-index: 2;
}
#problems .problems-left::before {
  content: "Challenges";
  border: 1px solid rgba(15, 54, 90, 0.16);
  color: rgba(7, 29, 51, 0.92);
  background-color: #feeebf;
}
#problems .problems-right::before {
  content: "Outcomes";
  border: 1px solid rgba(24, 164, 164, 0.34);
  color: rgba(7, 29, 51, 0.92);
  background-color: rgba(24, 164, 164, 0.34);
}

#problems .problems-left .card,
#problems .problems-right .card {
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(15, 54, 90, 0.1);
  box-shadow: 0 14px 28px rgba(7, 29, 51, 0.1);
  position: relative;
}
#problems .problems-right .card {
  border-color: rgba(24, 164, 164, 0.28);
}

#problems .problems-right .card::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(24, 164, 164, 0.65),
    rgba(43, 179, 200, 0.25)
  );
  opacity: 0.95;
}
#problems .problems-right .problem-block {
  padding-left: 10px;
}

@supports (container-type: inline-size) {
  @container (min-width: 700px) {
    #problems .problems-grid {
      position: relative;
      column-gap: 20px;
    }
    #problems .problems-grid::after {
      content: "";
      position: absolute;
      left: 50%;
      top: 12px;
      bottom: 12px;
      width: 1px;
      background: linear-gradient(
        180deg,
        rgba(15, 54, 90, 0),
        rgba(15, 54, 90, 0.18),
        rgba(15, 54, 90, 0)
      );
      opacity: 0.35;
      pointer-events: none;
    }

    #problems .problems-right {
      position: sticky;
      top: 150px;
      align-self: start;
    }
  }
}

/* =========================================================
   13) APPROACH (flow + hover bullets)
   ========================================================= */
.approach-flow {
  display: grid;
  gap: 14px;
  max-width: 980px;
  container-type: inline-size;
}

.flow-step {
  position: relative;
  display: grid;
  grid-template-columns: 46px 1fr 1.2fr;
  gap: 4px;
  padding: 16px 18px;
  padding-right: 56px; /* reserves space for chevron */
  border-radius: 28px;
  border: none;
  box-shadow: 0 16px 32px rgba(7, 29, 51, 0.12);
  background:
    radial-gradient(
      1200px 420px at 0% -20%,
      rgba(255, 255, 255, 0.9),
      transparent 70%
    ),
    linear-gradient(
      180deg,
      var(--color-page-bg) 0%,
      var(--color-section-alt) 100%
    );
  background-position:
    0 0,
    calc(100% - 28px) 50%;
  overflow: hidden;
}

/* Pre-hover cue: chevron overlayed WITHOUT overriding the base card background */
.flow-step {
  /* keep whatever background you already set earlier via `background:` */
  background-repeat: no-repeat, no-repeat;
  background-size:
    auto,
    18px 18px;
  background-position:
    0 0,
    calc(100% - 22px) 50%;
  background-image:
    none,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6l6 6-6 6' fill='none' stroke='%23071D33' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* On hover/focus: hide ONLY the chevron (do not touch card background) */
.flow-step:hover,
.flow-step:focus-within {
  background-image: none, none;
}

.flow-step::after {
  content: "";
  position: absolute;
  left: 36px;
  top: 52px;
  bottom: 0px;
  width: 2px;
  background: rgba(15, 54, 90, 0.14);
  z-index: 0;
}

.flow-step > * {
  position: relative;
  z-index: 1;
}

/* Step 4 only — connector comes from the TOP */
.approach-flow .flow-step:nth-child(4)::after {
  top: 0px;
  bottom: 70px;
}

.flow-dot {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--color-primary);

  /* Make it opaque so the line can't show through */
  background: #d9f3f3; /* soft teal tint, fully opaque */
  border: 1px solid rgba(24, 164, 164, 0.35);

  position: relative;
  z-index: 2; /* ensure it sits above the connector line */
}

.flow-main h3 {
  margin: 0;
}

.flow-hover {
  opacity: 0;
  pointer-events: none;
  transition: opacity 6s ease;
}

/* Show bullets on hover / keyboard focus */
.flow-step:hover .flow-hover,
.flow-step:focus-within .flow-hover {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 900ms ease; /* fade in */
}

.flow-hover ul {
  margin: 0;
  padding-left: 0;
  line-height: 1.7;
}

/* Individual bullets animate separately */
.flow-hover li {
  opacity: 1;
  transform: none;
  filter: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    filter 0.3s ease;
}

/* Mouse leave = linger + staggered fade + blur */
.flow-step:not(:hover):not(:focus-within) .flow-hover li {
  opacity: 0;
  transform: translateX(20px);
  filter: blur(10px);
  transition:
    opacity 900ms ease,
    transform 600ms ease,
    filter 900ms ease;
}

.flow-step:not(:hover):not(:focus-within) .flow-hover li:nth-child(1) {
  transition-delay: 1s;
}
.flow-step:not(:hover):not(:focus-within) .flow-hover li:nth-child(2) {
  transition-delay: 0.7s;
}
.flow-step:not(:hover):not(:focus-within) .flow-hover li:nth-child(3) {
  transition-delay: 0.4s;
}
.flow-step:not(:hover):not(:focus-within) .flow-hover li:nth-child(4) {
  transition-delay: 0.1s;
}

/* Gradient overlay on hover */
.flow-step::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  border-radius: inherit;
  background-image: linear-gradient(to right, #243563, #05a6bf, #243563);
  background-size: 300% 100%;
  transition: opacity 1200ms ease;
}
.flow-step:hover::before,
.flow-step:focus-within::before {
  opacity: 1;
  animation: approachGradient 12s linear;
  animation-delay: 2s;
}

@keyframes approachGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flow-step:hover::before,
  .flow-step:focus-within::before {
    animation: none;
  }
}

.flow-step:hover h3,
.flow-step:hover li,
.flow-step:hover .flow-dot,
.flow-step:focus-within h3,
.flow-step:focus-within li,
.flow-step:focus-within .flow-dot {
  color: #ffffff;
}

.flow-step:hover .flow-dot,
.flow-step:focus-within .flow-dot {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* Slight affordance on hover */
.flow-step {
  cursor: pointer;
}

@supports (container-type: inline-size) {
  @container (max-width: 768px) {
    .approach-flow .flow-step::after {
      top: 52px;
      bottom: 0;
    }

    .approach-flow .flow-step:nth-child(4) {
      padding-bottom: 34px;
    }

    .approach-flow .flow-step:nth-child(4)::after {
      top: 0;
      bottom: 170px;
    }
  }
}

/* =========================================================
   14) FOOTER
   ========================================================= */
.footer-arc {
  position: relative;
  line-height: 0;
  overflow: hidden;
}
.footer-arc svg {
  display: block;
  width: 100%;
  height: 15px;
}

footer {
  background: var(--color-primary-dark);
  color: var(--color-text-inverted);
  border-top: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 -6px 18px rgba(7, 29, 51, 0.55);
}

footer .footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 12px 16px;
}

footer .footer-meta {
  max-width: 820px;
}
footer .footer-title {
  margin: 4px 0;
  font-weight: 500;
}
footer .footer-text {
  margin: 2px 0;
  font-size: 0.9rem;
}
footer .muted {
  color: rgba(255, 255, 255, 0.78);
}

footer a {
  color: var(--color-accent);
  text-decoration: none;
}
footer a:hover {
  color: var(--color-accent-dark);
}

footer .footer-col {
  flex: 1 1 320px;
}

/* Footer links container */
#footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Footer nav (vertical, simple) */
#footer-links .footer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Footer links styling */
#footer-links .footer-nav a {
  color: #ffffff;
  text-decoration: underline;
  font-size: 0.85rem;
}

/* =========================================================
   15) COOKIE CONSENT (single definition)
   ========================================================= */
.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: none; /* JS controls */
  padding: 12px 16px;

  background: var(--color-surface);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border-subtle);
  box-shadow: 0 -4px 18px rgba(7, 29, 51, 0.12);
}

.consent button {
  border-radius: 999px;
  padding: 6px 14px;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  pointer-events: auto;
}

.consent button#decline {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-subtle);
}

.consent button.accept {
  background: var(--color-accent);
  color: var(--color-text-inverted);
}

/* =========================================================
   16) SCROLL REVEAL (single source of truth)
   ========================================================= */
.section-pop {
  opacity: 1;
  transform: none;
  position: relative;
}

html.js .section-pop {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 900ms cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
  will-change: opacity, transform;
}

html.js .section-pop.reveal {
  opacity: 1;
  transform: none;
}

/* Fade */
html.js .section-pop[data-anim="fade"] {
  transform: scale(1);
}
html.js .section-pop[data-anim="fade"].reveal {
  transform: scale(1);
  transition:
    opacity 7s ease,
    transform 8s ease;
}

/* Pop */
html.js .section-pop[data-anim="pop"] {
  transform: scale(0.95);
  transition:
    opacity 3s ease,
    transform 4s ease;
}
html.js .section-pop[data-anim="pop"].reveal {
  transform: scale(1);
}

/* Split (FIXED syntax) */
html.js .section-pop[data-anim="split"] {
  transform: translateX(-25px);
  transition:
    opacity 3s ease,
    transform 6s ease;
}
html.js .section-pop[data-anim="split"].reveal {
  transform: none;
}

/* Timeline (Approach) */
html.js .section-pop[data-anim="timeline"] .flow-step {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 700ms ease,
    transform 3.5s ease;
}
html.js .section-pop[data-anim="timeline"].reveal .flow-step {
  opacity: 1;
  transform: none;
}

html.js .section-pop[data-anim="timeline"].reveal .flow-step:nth-child(1) {
  transition-delay: 0.5s;
}
html.js .section-pop[data-anim="timeline"].reveal .flow-step:nth-child(2) {
  transition-delay: 1.5s;
}
html.js .section-pop[data-anim="timeline"].reveal .flow-step:nth-child(3) {
  transition-delay: 2.5s;
}
html.js .section-pop[data-anim="timeline"].reveal .flow-step:nth-child(4) {
  transition-delay: 3.5s;
}

/* Stagger (Credibility) — FIXED selectors */
html.js .section-pop[data-anim="stagger"] .card {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 900ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}
html.js .section-pop[data-anim="stagger"].reveal .card {
  opacity: 1;
  transform: none;
}
html.js .section-pop[data-anim="stagger"].reveal .card:nth-child(1) {
  transition-delay: 0ms;
}
html.js .section-pop[data-anim="stagger"].reveal .card:nth-child(2) {
  transition-delay: 600ms;
}
html.js .section-pop[data-anim="stagger"].reveal .card:nth-child(3) {
  transition-delay: 900ms;
}

/* Capabilities stagger */
html.js .section-pop[data-anim="stagger-caps"] .cap-item,
html.js .section-pop[data-anim="stagger-caps"] .cap-center {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 650ms ease,
    transform 3.5s ease;
}
html.js .section-pop[data-anim="stagger-caps"].reveal .cap-item,
html.js .section-pop[data-anim="stagger-caps"].reveal .cap-center {
  opacity: 1;
  transform: none;
}

html.js
  .section-pop[data-anim="stagger-caps"].reveal
  .cap-col:nth-child(1)
  .cap-item:nth-child(1) {
  transition-delay: 0.5s;
}
html.js
  .section-pop[data-anim="stagger-caps"].reveal
  .cap-col:nth-child(1)
  .cap-item:nth-child(2) {
  transition-delay: 1.5s;
}
html.js
  .section-pop[data-anim="stagger-caps"].reveal
  .cap-col:nth-child(3)
  .cap-item:nth-child(1) {
  transition-delay: 2.5s;
}
html.js
  .section-pop[data-anim="stagger-caps"].reveal
  .cap-col:nth-child(3)
  .cap-item:nth-child(2) {
  transition-delay: 3.5s;
}

/* =========================================================
   Back to Top Button
   ========================================================= */

.back-to-top {
  position: fixed;
  width: clamp(40px, 4vw, 44px);
  height: clamp(40px, 4vw, 44px);
  right: clamp(14px, 2vw, 18px);
  bottom: clamp(14px, 2vw, 18px);
  border-radius: 50%;
  display: grid;
  place-items: center;

  background: linear-gradient(
    180deg,
    rgba(15, 54, 90, 0.95),
    rgba(10, 33, 55, 0.95)
  );
  color: #ffffff;

  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.35),
    0 2px 0 rgba(255, 255, 255, 0.08) inset;

  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;

  transition:
    opacity 240ms ease,
    transform 240ms ease,
    background 240ms ease;

  z-index: 10000;
}

/* Visible state */
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Visible + above footer (auto height) */
.back-to-top.is-visible.is-above-footer {
  transform: translateY(calc(-1 * var(--footer-offset, 80px)));
}

/* Hover / focus */
.back-to-top:hover,
.back-to-top:focus-visible {
  background: linear-gradient(
    180deg,
    rgba(24, 164, 164, 0.95),
    rgba(15, 54, 90, 0.95)
  );
}

/* =========================================================
   17) CONTACT FORM (Option 3: Guided / progressive feel)
   ========================================================= */
/* CONTACT: flatten card styling 
#contact .card {
  background: none;
  box-shadow: none;
}
*/
#contact form {
  display: grid;
  gap: 14px;
}

/* Treat the existing rows/blocks as “steps/panels”.
   This targets:
   - the Name/Email grid row (.grid.cols-2)
   - the next div(s) that wrap the textarea/button
   Without changing PHP/JS.
*/
#contact form .grid.auto,
#contact form > div:not(#msg) {
  background: var(--color-surface);
  border: 1px solid rgba(15, 54, 90, 0.1);
  box-shadow: 0 8px 18px rgba(15, 54, 90, 0.06);
}

/* Do NOT box the status message (if your JS writes into #msg) */
#contact #msg {
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}

/* Labels */
#contact label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 650;
  color: rgba(15, 54, 90, 0.95);
}

/* Inputs */
#contact input,
#contact textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(15, 54, 90, 0.18);
  padding: 12px 14px;
  font-size: 0.95rem;
  color: var(--color-text-main);
  background: #fff;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

#contact input:focus,
#contact textarea:focus {
  outline: none;
  border-color: rgba(24, 164, 164, 0.9);
  box-shadow: 0 0 0 3px rgba(24, 164, 164, 0.16);
}

#contact textarea {
  min-height: 130px;
  resize: vertical;
}

/* Button (keeps your existing .btn styling but improves placement) */
#contact button.btn {
  justify-self: start;
  margin-top: 6px;
}

#contact form .grid.auto,
#contact form > div:not(#msg) {
  padding: clamp(14px, 2.5vw, 16px);
  border-radius: clamp(14px, 2.2vw, 16px);
}

#contact .grid {
  justify-items: center;
}

/* Now the card width can actually apply */
#contact .card {
  width: min(1164px, 100%);
}

#contact .is-invalid {
  border-color: rgba(176, 0, 32, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(176, 0, 32, 0.12) !important;
}

 