/* ============================================================
   keithjconnell.ca — Main Stylesheet
   Font: DM Sans (Google Fonts)
   Palette: #192a3d · #023a51 · #59667d · #6494aa
            #a63d40 · #DDCBA4 · #ffffff
   ============================================================ */

/* ── Google Font Import ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300;1,9..40,400&display=swap');

/* ── CSS Custom Properties ──────────────────────────────── */
:root {
  /* Palette */
  --navy-deep:   #192a3d;
  --navy-teal:   #023a51;
  --slate:       #59667d;
  --sky:         #6494aa;
  --crimson:     #a63d40;
  --sand:        #DDCBA4;
  --white:       #ffffff;

  /* Derived / UI */
  --overlay-dark:    rgba(0, 0, 0, 0.65);
  --overlay-hero:    rgba(2, 58, 81, 0.55);
  --card-bg:         rgba(25, 42, 61, 0.92);
  --border-subtle:   rgba(100, 148, 170, 0.25);
  --border-sand:     rgba(221, 203, 164, 0.3);

  /* Typography — fluid scale */
  --fs-body:   clamp(1.125rem, 1.5vw + 0.6rem, 1.25rem);   /* ≈18–20pt */
  --fs-sm:     clamp(0.9rem,   1vw + 0.5rem,   1rem);
  --fs-lg:     clamp(1.25rem,  1.8vw + 0.6rem, 1.5rem);
  --fs-h4:     clamp(1.3rem,   2vw + 0.5rem,   1.75rem);
  --fs-h3:     clamp(1.5rem,   2.5vw + 0.5rem, 2.25rem);
  --fs-h2:     clamp(2rem,     4vw + 0.5rem,   3.25rem);
  --fs-h1:     clamp(2.5rem,   6vw + 0.5rem,   5rem);
  --fs-display:clamp(3rem,     8vw + 0.5rem,   7rem);

  /* Spacing */
  --gap-xs:  0.5rem;
  --gap-sm:  1rem;
  --gap-md:  2rem;
  --gap-lg:  4rem;
  --gap-xl:  8rem;

  /* Layout */
  --container-max: 1320px;
  --container-pad: clamp(1.25rem, 5vw, 4rem);

  /* Transitions */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast:    180ms;
  --dur-mid:     320ms;
  --dur-slow:    500ms;

  /* Nav */
  --nav-h: 80px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--navy-deep);
  background-color: var(--white);
  overflow-x: hidden;
}

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

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

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy-deep);
}

h1 { font-size: var(--fs-h1); font-weight: 300; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); font-weight: 600; }
h3 { font-size: var(--fs-h3); font-weight: 500; }
h4 { font-size: var(--fs-h4); font-weight: 500; }

p { margin-bottom: 1.25em; }
p:last-child { margin-bottom: 0; }

.text-sand    { color: var(--sand); }
.text-sky     { color: var(--sky); }
.text-crimson { color: var(--crimson); }
.text-white   { color: var(--white); }
.text-slate   { color: var(--slate); }

/* ── Container ──────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.container--narrow {
  max-width: 860px;
}

/* ── Utility ────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ─────────────────────────────────────────────────────────
   NAVIGATION
   ──────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;

  padding-top: 2%;
  padding-bottom: 2%;

  background: transparent;

  transition:
    background var(--dur-mid) var(--ease-out),
    backdrop-filter var(--dur-mid) var(--ease-out),
    box-shadow var(--dur-mid) var(--ease-out),
    padding var(--dur-mid) var(--ease-out);
}

/* Transparent default state over hero */
.site-header.is-transparent {
  background: transparent;
}

/* Compact scroll state */
.site-header.is-compact {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header.is-compact .header-inner {
  justify-content: flex-end;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  z-index: 10;
  flex-shrink: 0;
}

.site-logo img,
.site-logo svg {
  height: 140px;
  width: auto;
  transition:
    opacity var(--dur-fast),
    transform var(--dur-mid) var(--ease-out);
}

.site-logo:hover img,
.site-logo:hover svg {
  opacity: 0.85;
}

/* Hide logo on scroll */
.site-header.is-compact .site-logo {
  display: none;
}

/* Full nav — desktop */
.nav-full {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
}

.nav-full ul {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 0.45em 0.85em;
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  border-radius: 4px;
  transition: background var(--dur-fast), color var(--dur-fast);
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(221, 203, 164, 0.15);
  color: var(--sand);
}

.nav-link--has-sub::after {
  content: '';
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-0.1em);
  margin-left: 0.45em;
  vertical-align: middle;
}

/* Hide full nav on scroll */
.site-header.is-compact .nav-full {
  display: none;
}

/* Compact nav label */
.nav-compact {
  display: none;
  align-items: center;
  gap: var(--gap-sm);
}

.site-header.is-compact .nav-compact {
  display: flex;
}

.nav-compact-label {
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #DDCBA4;
}

/* ── Mega Menu ──────────────────────────────────────────── */
.mega-menu::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
}

.mega-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: 640px;
  background: var(--navy-teal);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: var(--gap-md);
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-mid) var(--ease-out),
              transform var(--dur-mid) var(--ease-out);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}

.nav-item:hover .mega-menu,
.nav-item:focus-within .mega-menu {
  display: grid;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.mega-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.85rem;
  border-radius: 8px;
  transition: background var(--dur-fast);
  text-decoration: none;
}

.mega-item:hover {
  background: rgba(100, 148, 170, 0.15);
}

.mega-thumb {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
  background: var(--slate);
}

.mega-text {}

.mega-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--sand);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mega-excerpt {
  font-size: 0.8rem;
  color: rgba(221, 203, 164, 0.7);
  line-height: 1.5;
}

/* ── Hamburger Button ───────────────────────────────────── */
.hamburger {
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  border-radius: 6px;
  transition: background var(--dur-fast);
  background: none;
  border: none;
  padding: 0;
}

.hamburger:hover {
  background: rgba(221, 203, 164, 0.1);
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #DDCBA4;
  border-radius: 2px;
  transition: transform var(--dur-mid) var(--ease-out),
              opacity var(--dur-fast),
              width var(--dur-mid) var(--ease-out);
}

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

/* ── Flyout Menu ────────────────────────────────────────── */
.flyout-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-dark);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-mid) var(--ease-out);
}

.flyout-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.flyout-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 380px;
  max-width: 75vw;
  background: var(--navy-teal);
  z-index: 1200;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.flyout-panel.is-open {
  transform: translateX(0);
}

.flyout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--gap-md);
  border-bottom: 1px solid var(--border-subtle);
}

.flyout-logo {
  height: 36px;
  width: auto;
}

.flyout-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sand);
  font-size: 1.5rem;
  border-radius: 4px;
  transition: background var(--dur-fast);
}

.flyout-close:hover {
  background: rgba(221, 203, 164, 0.1);
}

.flyout-nav {
  flex: 1;
  padding: var(--gap-md);
}

.flyout-nav ul {
  list-style: none;
}

.flyout-nav > ul > li {
  border-bottom: 1px solid var(--border-subtle);
}

.flyout-nav > ul > li:last-child {
  border-bottom: none;
}

.flyout-nav a {
  display: block;
  padding: 1rem 0;
  font-size: var(--fs-lg);
  font-weight: 500;
  color: var(--white);
  transition: color var(--dur-fast), padding-left var(--dur-fast);
}

.flyout-nav a:hover {
  color: var(--sand);
  padding-left: 0.5rem;
}

.flyout-subnav {
  padding-left: 1rem;
  margin-bottom: 0.75rem;
}

.flyout-subnav a {
  font-size: var(--fs-sm);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  padding: 0.4rem 0;
}

.flyout-subnav a:hover {
  color: var(--sand);
}

/* ─────────────────────────────────────────────────────────
   HERO SECTIONS
   ──────────────────────────────────────────────────────── */

.hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  /* overflow visible so .hero--partial title box can hang below */
}

/* Full-height home hero clips its background scale animation */
.hero--full {
  overflow: hidden;
}

.hero--full {
  height: 100vh;
  min-height: 600px;
}

.hero--partial {
  height: 75vh;
  min-height: 480px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: top right;
  background-repeat: no-repeat;
  transition: transform 8s ease-out;
  will-change: transform;
}

.hero--full .hero__bg {
  transform: scale(1.06);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(2, 58, 81, 0.75) 0%,
    rgba(25, 42, 61, 0.65) 50%,
    rgba(166, 61, 64, 0.3) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 25vh;
}

/* Article / page hero overlay box */
.hero__title-box {
  position: absolute;
  bottom: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: min(780px, 90%);
  background: rgba(2, 58, 81, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 4px solid var(--crimson);
  padding: var(--gap-md) var(--gap-lg);
  border-radius: 0 8px 8px 0;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35), 0 4px 20px rgba(2, 58, 81, 0.45);
  z-index: 5;
}

.hero__title-box h1 {
  font-size: var(--fs-h2);
  color: var(--white);
  margin-bottom: 0.75rem;
}

.hero__title-box .excerpt {
  font-size: var(--fs-body);
  color: var(--sand);
  line-height: 1.6;
  margin: 0;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(221, 203, 164, 0.6);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-indicator::before {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--sand));
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.6; }
  50%       { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* ─────────────────────────────────────────────────────────
   HOME PAGE — SECTIONS
   ──────────────────────────────────────────────────────── */

/* Intro statement */
.section-intro {
  padding: var(--gap-xl) 0;
  background: var(--white);
}

.intro-grid {
  display: grid;
  grid-template-columns: 20% 80%;
  align-items: center;
  gap: var(--gap-lg);
}

.intro-quote {
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-quote img,
.intro-quote svg {
  width: min(100%, 180px);
  height: auto;
}

.intro-content {
  border-left: 4pt solid var(--crimson);
  padding-left: var(--gap-md);
}

.intro-statement {
  font-size: var(--fs-h3);
  font-weight: 300;
  line-height: 1.4;
  color: var(--navy-deep);
  max-width: 900px;
  margin: 0;
}

.intro-statement strong {
  font-weight: 600;
  color: var(--navy-teal);
}

.intro-accent {
  display: none;
}

/* Section labels */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 1rem;
}

.section-heading {
  font-size: var(--fs-h2);
  color: var(--navy-deep);
  margin-bottom: var(--gap-md);
}

.section-heading--light {
  color: var(--white);
}

/* Dark sections */
.section--dark {
  background: var(--navy-deep);
  padding: var(--gap-xl) 0;
}

.section--teal {
  background: var(--navy-teal);
  padding: var(--gap-xl) 0;
}

.section--sand {
  background: var(--sand);
  padding: var(--gap-xl) 0;
}

.section--light {
  padding: var(--gap-xl) 0;
  background: #f7f5f1;
}


/* ─────────────────────────────────────────────────────────
   SUCCESS BRIDGE / THREE PILLARS
   ──────────────────────────────────────────────────────── */

.success-bridge-section {
  padding: var(--gap-xl) 0;
  background: linear-gradient(180deg, #f7f5f1 0%, var(--white) 100%);
}

.success-bridge-intro {
  max-width: 980px;
  margin: 0 auto var(--gap-lg);
  text-align: center;
}

.success-bridge-intro h2 {
  font-size: clamp(2rem, 4vw + 0.5rem, 4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--navy-deep);
  margin-bottom: var(--gap-md);
}

.success-bridge-intro p {
  max-width: 880px;
  margin: 0 auto;
  color: var(--slate);
  font-size: var(--fs-lg);
  line-height: 1.75;
}

.success-pillars-header {
  text-align: center;
  margin-bottom: var(--gap-md);
}

.success-pillars-header h3 {
  display: inline-block;
  font-size: clamp(1rem, 1.2vw + 0.6rem, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--crimson);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--sand);
}

.success-pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-md);
  max-width: 1160px;
  margin: 0 auto;
  align-items: stretch;
}

.success-pillar {
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: var(--gap-md);
  box-shadow: 0 18px 46px rgba(25, 42, 61, 0.08);
}

.success-pillar img,
.success-pillar svg {
  width: 86px;
  height: 86px;
  object-fit: contain;
  margin: 0 auto 1.5rem;
}

.success-pillar p {
  color: var(--slate);
  font-size: var(--fs-sm);
  line-height: 1.65;
  margin: 0;
}

.success-pillar strong {
  display: inline-block;
  color: var(--navy-teal);
  font-size: var(--fs-body);
  line-height: 1.35;
  margin-bottom: 0.45rem;
}

/* ─────────────────────────────────────────────────────────
   CTA BLOCK
   ──────────────────────────────────────────────────────── */

.cta-section {
  padding: var(--gap-xl) 0;
  background: var(--navy-teal);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(166,61,64,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 1.25rem;
}

.cta-headline {
  font-size: var(--fs-display);
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: var(--gap-md);
}

.cta-headline span {
  color: var(--sand);
}

.btn-cta {
  display: inline-block;
  padding: 1.1em 2.8em;
  background: var(--crimson);
  color: var(--white);
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 4px;
  transition: background var(--dur-fast), transform var(--dur-fast), box-shadow var(--dur-fast);
  box-shadow: 0 4px 24px rgba(166, 61, 64, 0.4);
  margin-bottom: var(--gap-md);
}

.btn-cta:hover {
  background: #bf4548;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(166, 61, 64, 0.55);
}

/* Social icons row */
.social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  width: 50%;
  margin: 0 auto;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(221, 203, 164, 0.35);
  color: var(--sand);
  transition: border-color var(--dur-fast),
              background var(--dur-fast),
              color var(--dur-fast),
              transform var(--dur-fast);
}

.social-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.social-icon:hover {
  background: var(--crimson);
  border-color: var(--crimson);
  color: var(--white);
  transform: translateY(-3px);
}

/* ─────────────────────────────────────────────────────────
   TESTIMONIALS CAROUSEL
   ──────────────────────────────────────────────────────── */

.carousel-section {
  padding: var(--gap-xl) 0;
}

.carousel-track-wrap {
  overflow: hidden;
  position: relative;
}

.carousel-track {
  display: flex;
  gap: var(--gap-md);
  transition: transform var(--dur-slow) var(--ease-out);
}

/* Testimonial cards — 3 per view desktop */
.testimonial-card {
  flex: 0 0 calc((100% - 2 * var(--gap-md)) / 3);
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: var(--gap-md);
  cursor: pointer;
  transition: transform var(--dur-mid) var(--ease-spring),
              box-shadow var(--dur-mid) var(--ease-out),
              border-color var(--dur-fast);
  position: relative;
  overflow: hidden;
}

.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: -0.2em;
  right: 0.5rem;
  font-size: 8rem;
  color: var(--sand);
  line-height: 1;
  pointer-events: none;
  opacity: 0.4;
}

.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(25, 42, 61, 0.12);
  border-color: var(--sky);
}

.card-quote {
  font-size: var(--fs-body);
  color: var(--slate);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.card-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--sky);
  flex-shrink: 0;
  object-fit: cover;
}

.card-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--navy-deep);
}

.card-role {
  font-size: 0.8rem;
  color: var(--slate);
}

.card-click-hint {
  position: absolute;
  bottom: 0.75rem;
  right: 1rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--crimson);
  opacity: 0;
  transition: opacity var(--dur-fast);
}

.testimonial-card:hover .card-click-hint {
  opacity: 1;
}

/* Carousel nav */
.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: var(--gap-md);
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border-subtle);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-teal);
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}

.carousel-btn:hover {
  background: var(--navy-teal);
  color: var(--white);
  border-color: var(--navy-teal);
}

.carousel-btn svg {
  width: 16px;
  height: 16px;
}

.carousel-dots {
  display: flex;
  gap: 6px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-subtle);
  transition: background var(--dur-fast), transform var(--dur-fast);
}

.carousel-dot.is-active {
  background: var(--crimson);
  transform: scale(1.3);
}

/* ─────────────────────────────────────────────────────────
   SOFTWARE PROFICIENCY
   ──────────────────────────────────────────────────────── */

.software-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: var(--gap-sm);
  justify-items: center;
  align-items: center;
}

.software-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: default;
}

.software-logo-wrap {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: transform var(--dur-mid) var(--ease-spring);
  position: relative;
}

.software-logo-wrap img,
.software-logo-wrap svg {
  width: 48px;
  height: 48px;
  filter: grayscale(1) opacity(0.45);
  transition: filter var(--dur-mid) var(--ease-out),
              transform var(--dur-mid) var(--ease-spring);
}

.software-item:hover .software-logo-wrap {
  transform: scale(1.12);
}

.software-item:hover .software-logo-wrap img,
.software-item:hover .software-logo-wrap svg {
  filter: grayscale(0) opacity(1);
  transform: scale(1.15);
}

.software-name {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--slate);
  text-align: center;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--dur-fast), transform var(--dur-fast);
}

.software-item:hover .software-name {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────────────────────────
   BADGES
   ──────────────────────────────────────────────────────── */

.badges-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: var(--gap-sm);
  justify-items: center;
  align-items: center;
}

.badge-card {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0.5rem;
  transition: transform var(--dur-mid) var(--ease-spring),
              box-shadow var(--dur-mid) var(--ease-out);
  aspect-ratio: 1;
  width: 100%;
}

.badge-card img,
.badge-card svg {
  width: 100%;
  height: auto;
  object-fit: contain;
  transition: transform var(--dur-mid) var(--ease-spring);
}

.badge-card:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 32px rgba(25, 42, 61, 0.15);
}

/* ─────────────────────────────────────────────────────────
   MODAL / POPUP
   ──────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-dark);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-mid) var(--ease-out);
  padding: var(--gap-md);
}

.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--white);
  border-radius: 12px;
  max-width: 600px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  transform: translateY(24px) scale(0.97);
  transition: transform var(--dur-mid) var(--ease-spring);
  position: relative;
}

.modal-overlay.is-open .modal-box {
  transform: translateY(0) scale(1);
}

.modal-header {
  background: var(--navy-teal);
  padding: var(--gap-md);
  border-radius: 12px 12px 0 0;
  border-left: 4px solid var(--crimson);
}

.modal-header h3 {
  color: var(--sand);
  font-size: var(--fs-h4);
  margin-bottom: 0.35rem;
}

.modal-header .modal-sub {
  font-size: var(--fs-sm);
  color: rgba(221, 203, 164, 0.65);
}

.modal-body {
  padding: var(--gap-md);
}

.modal-body p {
  font-size: var(--fs-body);
  color: var(--slate);
  line-height: 1.75;
}

.modal-footer {
  padding: var(--gap-sm) var(--gap-md);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.modal-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--sky);
}

.modal-name {
  font-weight: 600;
  color: var(--navy-deep);
  font-size: var(--fs-sm);
}

.modal-role {
  font-size: 0.8rem;
  color: var(--slate);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  transition: background var(--dur-fast);
  z-index: 1;
}

.modal-close:hover {
  background: rgba(255,255,255,0.25);
}

/* ─────────────────────────────────────────────────────────
   RECENT ARTICLES SECTION (throughout site)
   ──────────────────────────────────────────────────────── */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-md);
}

.article-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border-subtle);
  transition: transform var(--dur-mid) var(--ease-spring),
              box-shadow var(--dur-mid) var(--ease-out);
  text-decoration: none;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(25, 42, 61, 0.12);
}

.article-card__img {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
  background: var(--slate);
}

.article-card__body {
  padding: var(--gap-sm) var(--gap-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card__tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 0.5rem;
}

.article-card__title {
  font-size: var(--fs-h4);
  font-weight: 600;
  color: var(--navy-deep);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.article-card__excerpt {
  font-size: var(--fs-sm);
  color: var(--slate);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1rem;
}

.article-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--slate);
}

.article-card__read-more {
  font-weight: 600;
  color: var(--crimson);
  letter-spacing: 0.05em;
}

/* ─────────────────────────────────────────────────────────
   CONTACT FORM
   ──────────────────────────────────────────────────────── */

.contact-section {
  padding: var(--gap-xl) 0;
  background: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--gap-xl);
  align-items: start;
}

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

.contact-info p {
  color: var(--slate);
  margin-bottom: var(--gap-md);
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--fs-sm);
  color: var(--navy-teal);
  margin-bottom: 1rem;
  font-weight: 500;
}

.contact-detail svg {
  width: 20px;
  height: 20px;
  color: var(--crimson);
  flex-shrink: 0;
}

.form-card {
  background: #f7f5f1;
  border-radius: 12px;
  padding: var(--gap-lg);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-sm);
  margin-bottom: var(--gap-sm);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: var(--gap-sm);
}

label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--navy-deep);
  letter-spacing: 0.03em;
}

label .req {
  color: var(--crimson);
  margin-left: 0.2em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  font-family: inherit;
  font-size: var(--fs-sm);
  color: var(--navy-deep);
  background: var(--white);
  border: 1.5px solid var(--border-subtle);
  border-radius: 6px;
  padding: 0.85em 1em;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
  width: 100%;
  outline: none;
  -webkit-appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(100, 148, 170, 0.18);
}

input.error,
select.error,
textarea.error {
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px rgba(166, 61, 64, 0.12);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.field-error {
  font-size: 0.78rem;
  color: var(--crimson);
  display: none;
}

.field-error.visible {
  display: block;
}

/* Honeypot — hidden from humans */
.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-submit {
  display: block;
  width: 100%;
  padding: 1em 2em;
  background: var(--crimson);
  color: var(--white);
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--dur-fast), transform var(--dur-fast);
  margin-top: var(--gap-sm);
}

.btn-submit:hover {
  background: #bf4548;
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-message {
  display: none;
  padding: 1rem var(--gap-sm);
  border-radius: 6px;
  font-size: var(--fs-sm);
  font-weight: 500;
  margin-top: var(--gap-sm);
}

.form-message.success {
  display: block;
  background: rgba(100, 148, 170, 0.15);
  border: 1px solid var(--sky);
  color: var(--navy-teal);
}

.form-message.error {
  display: block;
  background: rgba(166, 61, 64, 0.08);
  border: 1px solid var(--crimson);
  color: var(--crimson);
}

/* ─────────────────────────────────────────────────────────
   ARTICLE PAGE LAYOUT
   ──────────────────────────────────────────────────────── */

.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--gap-xl);
  padding: var(--gap-xl) 0;
  align-items: start;
}

.article-main {}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  flex-wrap: wrap;
  margin-bottom: var(--gap-md);
  font-size: var(--fs-sm);
  color: var(--slate);
}

.article-tag {
  background: var(--navy-deep);
  color: var(--sand);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25em 0.7em;
  border-radius: 3px;
}

.article-content h2 { margin: var(--gap-md) 0 var(--gap-sm); }
.article-content h3 { margin: var(--gap-sm) 0 0.75rem; }
.article-content p { color: var(--slate); }

/* Pull quote */
.pullquote {
  border-left: 4px solid var(--crimson);
  padding: var(--gap-sm) var(--gap-md);
  margin: var(--gap-md) 0;
  background: #f7f5f1;
  border-radius: 0 8px 8px 0;
}

.pullquote p {
  font-size: var(--fs-lg);
  font-style: italic;
  color: var(--navy-teal);
  line-height: 1.5;
  margin: 0;
}

/* Sidebar */
.article-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

.sidebar-widget {
  background: #f7f5f1;
  border-radius: 10px;
  padding: var(--gap-md);
  border: 1px solid var(--border-subtle);
}

.sidebar-widget h4 {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-deep);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--sand);
  margin-bottom: 1rem;
}

.sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sidebar-list li a {
  display: block;
  font-size: var(--fs-sm);
  color: var(--navy-teal);
  font-weight: 500;
  line-height: 1.4;
  transition: color var(--dur-fast);
}

.sidebar-list li a:hover {
  color: var(--crimson);
}

.sidebar-list li .sidebar-date {
  font-size: 0.75rem;
  color: var(--slate);
  margin-top: 0.2rem;
}

/* ─────────────────────────────────────────────────────────
   PRESS RELEASE / NEWSROOM TEMPLATE
   ──────────────────────────────────────────────────────── */

.newsroom-header {
  border-bottom: 2px solid var(--sand);
  padding-bottom: var(--gap-md);
  margin-bottom: var(--gap-md);
}

.release-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--crimson);
  margin-bottom: 0.5rem;
}

.release-meta {
  font-size: var(--fs-sm);
  color: var(--slate);
  margin-bottom: var(--gap-sm);
}

.release-photo {
  float: right;
  margin: 0 0 var(--gap-md) var(--gap-md);
  max-width: 260px;
  border-radius: 8px;
  overflow: hidden;
}

.release-photo img {
  width: 100%;
  height: auto;
  display: block;
}

.release-photo figcaption {
  font-size: 0.75rem;
  color: var(--slate);
  padding: 0.5rem;
  background: #f7f5f1;
  font-style: italic;
}

.release-boilerplate {
  margin-top: var(--gap-lg);
  padding-top: var(--gap-md);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--fs-sm);
  color: var(--slate);
  font-style: italic;
}

.contact-info-release {
  margin-top: var(--gap-sm);
  font-style: normal;
  font-weight: 500;
}

/* ─────────────────────────────────────────────────────────
   GENERAL PAGE CONTENT
   ──────────────────────────────────────────────────────── */

.page-content {
  padding: var(--gap-xl) 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-xl);
  align-items: center;
}

.two-col--reverse { direction: rtl; }
.two-col--reverse > * { direction: ltr; }

.two-col__img {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.two-col__img::after {
  content: '';
  position: absolute;
  bottom: -12px;
  right: -12px;
  width: 80%;
  height: 80%;
  border: 3px solid var(--sand);
  border-radius: 12px;
  z-index: -1;
}

.two-col__img img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap-md);
  padding: var(--gap-lg) 0;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: var(--fs-display);
  font-weight: normal;
  color: var(--sand);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ─────────────────────────────────────────────────────────
   FOOTER
   ──────────────────────────────────────────────────────── */

.site-footer {
  background: var(--navy-deep);
  padding: var(--gap-xl) 0 var(--gap-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--gap-lg);
  margin-bottom: var(--gap-xl);
}

.footer-brand .site-logo {
  margin-bottom: var(--gap-md);
}

.footer-brand p {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h5 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-links a {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.55);
  transition: color var(--dur-fast);
}

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

.footer-bottom {
  padding-top: var(--gap-md);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social .social-icon {
  width: 36px;
  height: 36px;
}

.footer-social .social-icon svg {
  width: 16px;
  height: 16px;
}

/* ─────────────────────────────────────────────────────────
   SCROLL ANIMATIONS
   ──────────────────────────────────────────────────────── */

[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}

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

[data-reveal="left"] {
  transform: translateX(-30px);
}

[data-reveal="left"].is-visible {
  transform: translateX(0);
}

[data-reveal="right"] {
  transform: translateX(30px);
}

[data-reveal="right"].is-visible {
  transform: translateX(0);
}

[data-reveal-delay="100"] { transition-delay: 100ms; }
[data-reveal-delay="200"] { transition-delay: 200ms; }
[data-reveal-delay="300"] { transition-delay: 300ms; }
[data-reveal-delay="400"] { transition-delay: 400ms; }
[data-reveal-delay="500"] { transition-delay: 500ms; }


/* First section after a partial hero must clear the hanging title box */
.hero--partial + section,
.hero--partial + div.container {
  padding-top: calc(var(--gap-xl) + 80px);
}
/* ─────────────────────────────────────────────────────────
   RESPONSIVE — TABLET  (max 1024px)
   ──────────────────────────────────────────────────────── */

@media (max-width: 1024px) {

  /* Nav */
  .nav-full { display: none; }
  .nav-compact { display: flex; }
  .site-header.is-transparent .nav-compact { display: flex; }
  .site-header.is-transparent .nav-full    { display: none; }

  /* Flyout tablet */
  .flyout-panel {
    width: 75vw;
  }

  /* Grids */
  .software-grid,
  .badges-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .testimonial-card {
    flex: 0 0 calc((100% - var(--gap-md)) / 2);
  }

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

  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--gap-lg);
  }

  .success-pillars-grid {
    grid-template-columns: 1fr;
    max-width: 720px;
  }

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

  .article-sidebar {
    position: static;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: var(--gap-lg);
  }

  .two-col--reverse { direction: ltr; }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--gap-md);
  }

  /* Social row */
  .social-row { width: 75%; }

  /* Mega menu — disable on tablet */
  .mega-menu { display: none !important; }
}

/* ─────────────────────────────────────────────────────────
   RESPONSIVE — MOBILE  (max 640px)
   ──────────────────────────────────────────────────────── */

@media (max-width: 640px) {

  :root {
    --nav-h: 64px;
  }

  /* Flyout full screen on mobile */
  .flyout-panel {
    width: 100vw;
    max-width: 100vw;
  }

  /* Grids */
  .software-grid,
  .badges-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .testimonial-card {
    flex: 0 0 100%;
  }

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

  /* Form */
  .form-card {
    padding: var(--gap-md);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  /* Intro statement */
  .intro-grid {
    grid-template-columns: 1fr;
    gap: var(--gap-md);
  }

  .intro-content {
    border-left: none;
    border-top: 2pt solid var(--crimson);
    padding-left: 0;
    padding-top: var(--gap-md);
  }

  .intro-quote {
    justify-content: flex-start;
  }

  .intro-quote img,
  .intro-quote svg {
    width: 120px;
  }

  .success-bridge-section {
    background: #f7f5f1;
  }

  .success-bridge-intro {
    text-align: center;
    margin-bottom: var(--gap-md);
  }

  .success-bridge-intro h2 {
    color: var(--navy-deep);
    text-align: center;
  }

  .success-bridge-intro p {
    text-align: center;
  }

  .success-pillars-header {
    text-align: center;
  }

  .success-pillars-header h3 {
    color: var(--crimson);
    text-align: center;
  }

  .success-pillars-grid {
    gap: 1.5rem;
  }

  .success-pillar {
    padding: 1.25rem 1rem;
    text-align: center;
  }

  .success-pillar img,
  .success-pillar svg {
    width: 52px !important;
    max-width: 52px !important;
    height: 52px !important;
    max-height: 52px !important;
    object-fit: contain;
    margin: 0 auto 1rem;
  }

  .success-pillar p {
    text-align: center;
  }

  .success-pillar strong {
    text-align: center;
  }

  /* CTA */
  .social-row {
    width: 100%;
    padding: 0 var(--gap-sm);
  }

  /* Stats */
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  /* Hero title box */
  .hero__title-box {
    padding: var(--gap-sm) var(--gap-md);
    bottom: -40px;
    width: 94%;
  }

  /* Release photo */
  .release-photo {
    float: none;
    margin: 0 0 var(--gap-md);
    max-width: 100%;
  }

  .cta-headline {
    letter-spacing: -0.02em;
  }
}

/* ─────────────────────────────────────────────────────────
   FOCUS / ACCESSIBILITY
   ──────────────────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ─────────────────────────────────────────────────────────
   PRINT
   ──────────────────────────────────────────────────────── */

@media print {
  .site-header,
  .flyout-overlay,
  .flyout-panel,
  .modal-overlay,
  .cta-section { display: none; }

  body { font-size: 12pt; color: #000; }

  a::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #555; }
}