/* ==========================================================================
   Solaris Wireless -- Shared Stylesheet
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset & CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */

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

:root {
  /* Gold palette */
  --gold: #C49A1A;
  --gold-mid: #D4A820;
  --gold-bright: #F5C200;
  --gold-bg: #FDF8EC;
  --gold-line: rgba(196, 154, 26, 0.2);
  --gold-line-strong: rgba(196, 154, 26, 0.4);

  /* Navy palette */
  --navy: #0F1C2E;
  --navy-2: #1A2D44;
  --navy-mid: #2C4A6E;

  /* Slate palette */
  --slate: #4A5568;
  --slate-mid: #718096;
  --slate-light: #A0AEC0;

  /* Rules / borders */
  --rule: #E2E8F0;
  --rule-mid: #CBD5E0;

  /* Backgrounds */
  --bg: #FFFFFF;
  --bg-2: #F7F9FC;
  --bg-3: #EEF2F7;

  /* Text */
  --text: #0F1C2E;
  --text-mid: #2D3748;
  --text-muted: #718096;

  /* Typography stacks */
  --sans: 'Manrope', sans-serif;
  --body: 'Inter', sans-serif;
  --serif: 'DM Serif Display', serif;

  /* Shared tokens */
  --radius: 4px;
  --shadow: 0 1px 3px rgba(15, 28, 46, 0.06), 0 4px 16px rgba(15, 28, 46, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 28, 46, 0.08), 0 12px 40px rgba(15, 28, 46, 0.08);
}


/* --------------------------------------------------------------------------
   2. Base Typography & Scrollbar
   -------------------------------------------------------------------------- */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--bg-2);
}

::-webkit-scrollbar-thumb {
  background: var(--gold-line-strong);
  border-radius: 2px;
}


/* --------------------------------------------------------------------------
   3. Promo Banner
   -------------------------------------------------------------------------- */

.promo-banner {
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  z-index: 490;
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-2) 100%);
  border-bottom: 1px solid rgba(196, 154, 26, 0.3);
  transform: translateY(0);
  transition: transform 0.35s ease, opacity 0.35s ease;
  overflow: hidden;
}

.promo-banner.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.promo-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  gap: 1rem;
}

.promo-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.promo-badge {
  flex-shrink: 0;
  background: var(--gold-bright);
  color: var(--navy);
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.22rem 0.65rem;
  border-radius: 3px;
  white-space: nowrap;
}

.promo-text {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promo-text strong {
  color: #fff;
  font-weight: 700;
}

.promo-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.promo-cta {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--navy);
  background: var(--gold-bright);
  border: none;
  padding: 0.38rem 1rem;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.18s, transform 0.15s;
}

.promo-cta:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.promo-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.35);
  font-size: 1rem;
  line-height: 1;
  padding: 0.2rem;
  transition: color 0.18s;
  display: flex;
  align-items: center;
}

.promo-dismiss:hover {
  color: rgba(255, 255, 255, 0.8);
}


/* --------------------------------------------------------------------------
   4. Navigation (including mobile hamburger menu)
   -------------------------------------------------------------------------- */

/* Top navigation bar: only the direct-child <nav> of <body> gets the
   fixed white header treatment. Other <nav> elements on the page
   (breadcrumb, footer-nav, etc.) must remain inline-flow. */
body > nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(12px);
}

/* Defensive reset: nested <nav> (breadcrumb, footer-nav, etc.) must
   stay in normal document flow with no background. Prevents legacy
   bare-`nav` rules or third-party styles from ripping them out. */
nav.breadcrumb,
nav.footer-nav,
nav.article-hero-meta,
.blog-hero nav,
.article-hero nav,
.hero nav,
section nav,
footer nav {
  position: static;
  background: transparent;
  border: none;
  backdrop-filter: none;
  z-index: auto;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3rem;
  height: 68px;
}

.nav-logo img {
  height: 28px;
  width: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  -moz-user-drag: none;
  draggable: false;
  pointer-events: none;
}

.nav-logo {
  pointer-events: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0.4rem 0.9rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--slate);
  text-decoration: none;
  border-radius: var(--radius);
  transition: color 0.18s, background 0.18s;
}

.nav-links a:hover {
  color: var(--navy);
  background: var(--bg-2);
}

/* Active nav link for multi-page navigation */
.nav-links a.active {
  color: var(--navy);
  font-weight: 600;
  background: var(--bg-2);
  border-bottom: 2px solid var(--gold);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-cta {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 0.55rem 1.3rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.18s, transform 0.15s;
}

.nav-cta:hover {
  background: var(--navy-2);
  transform: translateY(-1px);
}

.nav-tel {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--slate-mid);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Mobile hamburger button */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 510;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}

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

/* Mobile slide-in menu */
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: calc(100vh - 68px);
  height: calc(100dvh - 68px);
  max-height: calc(100vh - 68px);
  z-index: 499;
  background: #ffffff;
  backdrop-filter: blur(16px);
  padding: 1.5rem 1.5rem 4rem;
  flex-direction: column;
  align-items: stretch;
  gap: 0.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12);
}

.nav-mobile-menu.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

/* Lock body scroll when mobile menu is open */
body.nav-open {
  overflow: hidden;
}

.nav-mobile-menu a {
  display: block;
  padding: 0.85rem 1rem;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--slate);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: color 0.18s, background 0.18s;
}

.nav-mobile-menu a:hover,
.nav-mobile-menu a.active {
  color: var(--navy);
  background: var(--bg-2);
}

.nav-mobile-menu .nav-cta,
.nav-mobile-menu .nav-mobile-cta {
  margin-top: 1rem;
  text-align: center;
  display: block;
  width: 100%;
  padding: 0.95rem;
  border-radius: var(--radius);
  box-sizing: border-box;
}


/* --------------------------------------------------------------------------
   5. Hero Section
   -------------------------------------------------------------------------- */

.hero {
  padding: 9rem 0 0;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
  transition: padding-top 0.35s ease;
}

/* shift hero down when promo banner is visible */
.hero.banner-offset {
  padding-top: calc(9rem + 44px);
}

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 5rem;
  align-items: center;
  padding-bottom: 5rem;
}

.hero-bg-shape {
  position: absolute;
  right: -120px;
  top: -80px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 194, 0, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.hero-bg-lines {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 480px;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 39px,
    rgba(226, 232, 240, 0.6) 39px,
    rgba(226, 232, 240, 0.6) 40px
  );
  pointer-events: none;
  opacity: 0.5;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.8rem;
}

.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 4.5vw, 4.6rem);
  font-weight: 400;
  line-height: 1.08;
  color: var(--navy);
  margin-bottom: 1.6rem;
  letter-spacing: -0.01em;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero-desc {
  font-family: var(--body);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--slate);
  line-height: 1.85;
  max-width: 520px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.btn-primary {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  border: none;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  box-shadow: 0 2px 8px rgba(15, 28, 46, 0.2);
}

.btn-primary:hover {
  background: var(--navy-2);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(15, 28, 46, 0.25);
}

.btn-secondary {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--navy);
  background: transparent;
  border: 1.5px solid var(--rule-mid);
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}

.btn-secondary:hover {
  border-color: var(--navy);
  background: var(--bg-2);
}

.btn-gold {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: #C49A1A;
  border: none;
  padding: 0.9rem 2rem;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  box-shadow: 0 3px 12px rgba(196, 154, 26, 0.35);
}

.btn-gold:hover {
  background: #a98410;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 154, 26, 0.45);
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.trust-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate-light);
  white-space: nowrap;
}

.trust-logos {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  flex-wrap: wrap;
}

.trust-logo-text {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-light);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.trust-logo-text:hover {
  color: var(--slate);
}

.hero-right {
  position: relative;
  z-index: 1;
}

.stats-card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

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

.stat-cell {
  padding: 2rem 1.8rem;
  position: relative;
  transition: background 0.2s;
}

.stat-cell:hover {
  background: var(--gold-bg);
}

.stat-cell:nth-child(1) {
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
}

.stat-cell:nth-child(2) {
  border-bottom: 1px solid var(--rule);
}

.stat-cell:nth-child(3) {
  border-right: 1px solid var(--rule);
}

.stat-num {
  font-family: var(--serif);
  font-size: 2.8rem;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--slate-mid);
  line-height: 1.5;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.5rem;
  background: var(--navy);
  border-radius: 0 0 12px 12px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-bright);
  flex-shrink: 0;
}

.badge-text {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: #fff;
  line-height: 1.4;
  opacity: 0.9;
}


/* --------------------------------------------------------------------------
   6. Clients Ticker
   -------------------------------------------------------------------------- */

.cert-strip {
  background: linear-gradient(180deg, #0E1B36 0%, #14254a 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 1.85rem 1.5rem;
}
.cert-strip-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
  align-items: center;
}
.cert-item {
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.08);
  padding: 0 0.5rem;
}
.cert-item:last-child { border-right: none; }
.cert-num {
  font-family: 'DM Serif Display', serif;
  font-size: 1.55rem;
  color: #C49A1A;
  line-height: 1.05;
  letter-spacing: 0.01em;
}
.cert-label {
  font-family: 'Manrope', sans-serif;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.78);
  margin-top: 0.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
}
@media (max-width: 900px) {
  .cert-strip-inner { grid-template-columns: repeat(3, 1fr); gap: 1.4rem 0.6rem; }
  .cert-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 1rem; }
  .cert-item:nth-last-child(-n+3) { border-bottom: none; padding-bottom: 0; }
}

.clients {
  background: var(--bg-2);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  padding: 0;
}

.clients-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
}

.clients-label {
  flex-shrink: 0;
  padding: 1.5rem 2.5rem;
  border-right: 1px solid var(--rule);
  display: flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate-light);
  white-space: nowrap;
}

.clients-track-wrap {
  overflow: hidden;
  flex: 1;
}

.clients-track {
  display: flex;
  align-items: center;
  height: 64px;
  animation: cscroll 38s linear infinite;
  width: max-content;
}

@keyframes cscroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.c-item {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-light);
  padding: 0 2.2rem;
  border-right: 1px solid var(--rule);
  white-space: nowrap;
  height: 64px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}

.c-item:hover {
  color: var(--navy);
}


/* --------------------------------------------------------------------------
   7. Section Common Styles
   -------------------------------------------------------------------------- */

.section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
}

.sec-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.sec-eyebrow::before {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

.sec-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 3.5vw, 3.4rem);
  line-height: 1.1;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.sec-body {
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--slate);
  line-height: 1.85;
  max-width: 520px;
}

/* General content section for inner pages */
.content-section {
  padding: 5rem 0;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.content-section:nth-child(even) {
  background: var(--bg-2);
}

.content-section .section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
}


/* --------------------------------------------------------------------------
   8. Capabilities Section
   -------------------------------------------------------------------------- */

.capabilities {
  padding: 7rem 0;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.cap-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: end;
  margin-bottom: 4rem;
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.cap-card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 2.5rem 2.2rem;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
  cursor: default;
}

.cap-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--gold-line-strong);
}

.cap-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
  border-radius: 8px 8px 0 0;
}

.cap-card:hover::before {
  transform: scaleX(1);
}

.cap-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--gold-bg);
  border: 1px solid var(--gold-line);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.cap-num {
  position: absolute;
  top: 1.5rem;
  right: 1.8rem;
  font-family: var(--serif);
  font-size: 3.5rem;
  font-weight: 400;
  color: rgba(15, 28, 46, 0.04);
  line-height: 1;
}

.cap-title {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.8rem;
  letter-spacing: -0.01em;
}

.cap-body {
  font-family: var(--body);
  font-size: 0.87rem;
  font-weight: 300;
  color: var(--slate);
  line-height: 1.85;
  margin-bottom: 1.5rem;
}

.cap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cap-tag {
  font-family: var(--sans);
  font-size: 0.67rem;
  font-weight: 500;
  color: var(--gold);
  background: var(--gold-bg);
  border: 1px solid var(--gold-line);
  padding: 0.22rem 0.6rem;
  border-radius: 3px;
}


/* --------------------------------------------------------------------------
   9. Case Studies / Product Cards / Flip Cards
   -------------------------------------------------------------------------- */

/* --- Case Studies --- */

.case-studies {
  padding: 7rem 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--rule);
}

.cs-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: end;
  margin-bottom: 4rem;
}

.cs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.cs-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* 3x3 unified grid */
.cs-grid-3x3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* --- Flip Cards --- */

.flip-card {
  perspective: 1200px;
  height: 340px;
  cursor: pointer;
}

.flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.flip-card:hover .flip-inner {
  transform: rotateY(180deg);
}

.flip-front,
.flip-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 8px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.flip-front {
  background: var(--bg);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s, border-color 0.25s;
}

.f-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1;
}

.flip-card:hover .flip-front {
  box-shadow: var(--shadow-md);
}

.flip-front::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s;
}

.flip-card:hover .flip-front::after {
  transform: scaleX(1);
}

.flip-back {
  background: var(--navy);
  border: 1px solid var(--navy-2);
  transform: rotateY(180deg);
  box-shadow: var(--shadow-md);
}

.f-cat {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-light);
  margin-bottom: 0.5rem;
}

.f-client {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--navy);
  line-height: 1.2;
  padding-top: 0.3rem;
}

.f-title {
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--slate);
  line-height: 1.7;
}

.f-hint {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--slate-light);
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.flip-back .f-cat {
  color: rgba(255, 255, 255, 0.4);
}

.flip-back .f-client {
  color: #fff;
}

.flip-back .f-title {
  font-family: var(--body);
  font-size: 0.85rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

.f-back-cta {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--navy);
  background: var(--gold-bright);
  border: none;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius);
  cursor: pointer;
  align-self: flex-start;
  transition: opacity 0.2s, transform 0.15s;
}

.f-back-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* --- Static Product Cards --- */

.product-card {
  height: 340px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--rule);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1.4rem;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
  cursor: default;
}

.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--gold-line-strong);
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
  border-radius: 8px 8px 0 0;
}

.product-card:hover::before {
  transform: scaleX(1);
}

.product-card[onclick] {
  cursor: pointer;
}

.product-card-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 60%, rgba(245, 194, 0, 0.055) 0%, transparent 70%);
  pointer-events: none;
}

.product-icon {
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.product-label {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

.product-sub {
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--slate-mid);
  text-align: center;
  line-height: 1.5;
  position: relative;
  z-index: 1;
  max-width: 180px;
}


/* --------------------------------------------------------------------------
   10. Presence / Map Section
   -------------------------------------------------------------------------- */

.presence {
  padding: 7rem 0;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.presence-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 5rem;
  align-items: center;
  margin-top: 4rem;
}

.presence-intro {
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--slate);
  line-height: 1.85;
  margin-bottom: 0;
}

.p-nodes {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.p-node {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.2rem;
  padding: 1.6rem 1.8rem;
  border-bottom: 1px solid var(--rule);
  align-items: center;
  transition: background 0.2s;
  cursor: default;
}

.p-node:hover {
  background: var(--gold-bg);
}

.p-node:last-child {
  border-bottom: none;
}

.p-dot-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-2);
}

.p-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--slate-light);
}

.p-dot.hq {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 154, 26, 0.2);
  animation: hqp 2.5s ease-in-out infinite;
}

.p-dot-wrap.hq-wrap {
  background: var(--gold-bg);
}

@keyframes hqp {
  0%, 100% {
    box-shadow: 0 0 0 3px rgba(196, 154, 26, 0.2);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(196, 154, 26, 0.06);
  }
}

.p-city {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.2rem;
}

.p-role {
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--slate-mid);
  line-height: 1.5;
}

.p-tag {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-bg);
  border: 1px solid var(--gold-line);
  padding: 0.18rem 0.5rem;
  border-radius: 3px;
  white-space: nowrap;
}

.map-panel {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.map-svg {
  width: 100%;
  height: auto;
  display: block;
}


/* --------------------------------------------------------------------------
   11. Contact Form
   -------------------------------------------------------------------------- */

.contact {
  padding: 7rem 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--rule);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
  margin-top: 3rem;
}

.contact-intro {
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--slate);
  line-height: 1.85;
  margin-bottom: 2.5rem;
}

.contact-meta {
  display: block;
}

/* Homepage-style contact meta card (div children) */
.contact-meta > .c-meta-row:first-of-type {
  border-top: 1px solid var(--rule);
  border-radius: 8px 8px 0 0;
}

.contact-meta > .c-meta-row:last-of-type {
  border-radius: 0 0 8px 8px;
}

div.contact-meta > div.c-meta-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  padding: 1rem 1.4rem;
  border: 1px solid var(--rule);
  border-top: none;
  background: var(--bg);
  transition: background 0.18s;
}

div.contact-meta > div.c-meta-row:first-child {
  border-top: 1px solid var(--rule);
  border-radius: 8px 8px 0 0;
}

div.contact-meta > div.c-meta-row:last-child {
  border-radius: 0 0 8px 8px;
}

div.contact-meta > div.c-meta-row:hover {
  background: var(--gold-bg);
}

/* Contact page table styles */
.contact-meta-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.contact-meta-table .c-meta-row {
  display: table-row;
  border-bottom: 1px solid var(--rule);
  transition: background 0.18s;
}

.contact-meta-table .c-meta-row:hover {
  background: var(--gold-bg);
}

.contact-meta-table .c-meta-row:last-child {
  border-bottom: none;
}

.contact-meta-table .c-meta-label,
.contact-meta-table .c-meta-val {
  display: table-cell;
  padding: 0.85rem 1.4rem;
  vertical-align: top;
}

.contact-meta h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.contact-meta h3 {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 2rem 0 0.6rem;
}

.contact-form h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.contact-form > p {
  font-family: var(--body);
  font-size: 0.9rem;
  color: var(--slate);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.c-meta-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--rule);
  transition: background 0.18s;
}

.c-meta-row:hover {
  background: var(--gold-bg);
}

.c-meta-row:last-child {
  border-bottom: none;
}

.c-meta-label {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-light);
  padding-top: 0.1rem;
}

.c-meta-val {
  font-family: var(--body);
  font-size: 0.83rem;
  font-weight: 400;
  color: var(--slate);
  line-height: 1.5;
}

.contact-form {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 2.8rem;
  box-shadow: var(--shadow-md);
}

.form-heading {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 2rem;
  line-height: 1.15;
}

.f-row {
  margin-bottom: 1.3rem;
}

.f-row label {
  display: block;
  font-family: var(--sans);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-mid);
  margin-bottom: 0.45rem;
}

.f-row input,
.f-row select,
.f-row textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--rule-mid);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 400;
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}

.f-row input:focus,
.f-row select:focus,
.f-row textarea:focus {
  border-color: var(--gold);
  background: var(--bg);
  box-shadow: 0 0 0 3px rgba(196, 154, 26, 0.1);
}

.f-row textarea {
  resize: vertical;
  min-height: 100px;
}

.f-row select {
  cursor: pointer;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23718096' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
}

.f-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.3rem;
}

.f-2col .f-row {
  margin-bottom: 0;
}

.f-submit {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: var(--navy);
  border: none;
  width: 100%;
  padding: 0.9rem;
  border-radius: var(--radius);
  cursor: pointer;
  margin-top: 0.5rem;
  letter-spacing: 0.01em;
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  box-shadow: 0 2px 8px rgba(15, 28, 46, 0.2);
}

.f-submit:hover {
  background: var(--navy-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(15, 28, 46, 0.25);
}

/* Form success/error states */
.form-success {
  display: none;
  padding: 1.5rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  text-align: center;
}

.form-success.visible {
  display: block;
}

.form-success h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.form-success p {
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--slate);
  line-height: 1.7;
}

.form-error {
  display: none;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 400;
  color: #b91c1c;
  line-height: 1.5;
}

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


/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */

.footer {
  background: var(--navy);
  color: #fff;
}

.footer-top {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 3rem;
  display: grid;
  grid-template-columns: 280px 1fr 1fr 1fr;
  gap: 4rem;
}

.footer-brand p {
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.75;
  margin-top: 1.2rem;
}

.footer-logo img {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.footer-col-title {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 1.2rem;
}

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

.footer-links-list a {
  font-family: var(--body);
  font-size: 0.83rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 0.18s;
}

.footer-links-list a:hover {
  color: var(--gold-bright);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-family: var(--body);
  font-size: 0.75rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.3);
}

.footer-hq {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-hq::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.8;
}


/* Case study page footer structure */
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 3rem 0;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
  align-items: start;
}

.footer-brand p {
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.75;
  margin-top: 1rem;
}

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

.footer-col h4 {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 1.2rem;
}

.footer-col a {
  display: block;
  font-family: var(--body);
  font-size: 0.83rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  margin-bottom: 0.6rem;
  transition: color 0.18s;
}

.footer-col a:hover {
  color: var(--gold-bright);
}

/* --------------------------------------------------------------------------
   13. Reveal Animations
   -------------------------------------------------------------------------- */

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

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


/* --------------------------------------------------------------------------
   14. Modal
   -------------------------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(15, 28, 46, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s;
}

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

.modal {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(15, 28, 46, 0.2);
  max-width: 680px;
  width: 92%;
  max-height: 82vh;
  overflow-y: auto;
  padding: 3rem;
  position: relative;
  transform: translateY(12px) scale(0.99);
  transition: transform 0.28s;
}

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

.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
}

.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-mid);
  padding: 0.35rem 0.7rem;
  transition: color 0.18s, background 0.18s;
}

.modal-close:hover {
  color: var(--navy);
  background: var(--bg-3);
}

.modal-cat {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-cat::before {
  content: '';
  display: block;
  width: 14px;
  height: 2px;
  background: var(--gold);
  border-radius: 1px;
}

.modal-title {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 0.4rem;
}

.modal-sub {
  font-family: var(--body);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--slate-mid);
  margin-bottom: 1.8rem;
  line-height: 1.5;
}

.modal-body {
  font-family: var(--body);
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--slate);
  line-height: 1.9;
}

.modal-body p {
  margin-bottom: 1rem;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.5rem;
}

.modal-tag {
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 500;
  color: var(--gold);
  background: var(--gold-bg);
  border: 1px solid var(--gold-line);
  padding: 0.22rem 0.6rem;
  border-radius: 3px;
}


/* --------------------------------------------------------------------------
   15. Responsive Breakpoints
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .nav-inner {
    padding: 0 1.5rem;
  }

  .section-wrap {
    padding: 0 1.5rem;
  }

  .hero-inner,
  .cap-header,
  .cs-header,
  .presence-grid,
  .contact-grid,
  .footer-top {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    padding: 0 1.5rem 4rem;
  }

  .cap-grid,
  .cs-grid,
  .cs-grid-2,
  .cs-grid-3x3 {
    grid-template-columns: 1fr 1fr;
  }

  .footer-top {
    padding: 3rem 1.5rem;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    padding: 1.5rem;
  }

  .hero-bg-lines {
    display: none;
  }

  /* Show hamburger, hide desktop nav links */
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  .nav-tel {
    display: none;
  }

  /* Hide Get a Quote CTA from nav-right on mobile, it lives in the mobile menu instead */
  .nav-right .nav-cta {
    display: none;
  }

  /* Inner page adjustments */
  .page-header {
    padding: 7rem 1.5rem 3rem;
  }

  .content-section .section-wrap {
    padding: 0 1.5rem;
  }

  /* Case study detail page */
  .cs-detail-content {
    grid-template-columns: 1fr;
  }

  .cs-sidebar {
    order: -1;
  }
}

@media (max-width: 640px) {
  .cap-grid,
  .cs-grid,
  .cs-grid-2,
  .cs-grid-3x3 {
    grid-template-columns: 1fr;
  }

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

  .f-2col {
    grid-template-columns: 1fr;
  }

  .promo-inner {
    padding: 0 1rem;
    gap: 0.5rem;
  }

  .promo-cta {
    display: none;
  }

  .contact-grid {
    gap: 3rem;
  }

  /* Case study detail page */
  .cs-detail-hero {
    padding: 7rem 1rem 3rem;
  }

  .cs-related .cs-grid {
    grid-template-columns: 1fr;
  }
}


/* --------------------------------------------------------------------------
   Additional Multi-Page Styles
   -------------------------------------------------------------------------- */

/* --- Page Header (inner pages) --- */

.page-header {
  padding: 8.5rem 3rem 4rem;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}

.page-header .section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
}

.page-header h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4vw, 3.8rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.page-header p {
  font-family: var(--body);
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--slate);
  line-height: 1.85;
  max-width: 600px;
}

/* --- Breadcrumb --- */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--slate-mid);
  text-decoration: none;
  transition: color 0.18s;
}

.breadcrumb a:hover {
  color: var(--navy);
}

.breadcrumb .breadcrumb-sep {
  color: var(--slate-light);
  font-size: 0.65rem;
}

.breadcrumb .breadcrumb-current {
  color: var(--gold);
  font-weight: 600;
}

/* --- Page Transitions --- */

.page-transition {
  animation: pageIn 0.4s ease-out;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-transition-out {
  animation: pageOut 0.25s ease-in forwards;
}

@keyframes pageOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* --- Case Study Detail Page --- */

.cs-detail-hero {
  padding: 8.5rem 3rem 4rem;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.cs-detail-hero .section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
}

.cs-detail-hero .sec-eyebrow {
  margin-bottom: 1.2rem;
}

.cs-detail-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.cs-detail-hero p {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--slate);
  line-height: 1.85;
  max-width: 620px;
}

.cs-detail-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 4rem;
  padding: 4rem 0;
  max-width: 1280px;
  margin: 0 auto;
}

.cs-detail-content .section-wrap {
  padding: 0;
}

.cs-detail-content h2 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 1.2rem;
  line-height: 1.15;
}

.cs-detail-content h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.8rem;
  margin-top: 2rem;
}

.cs-detail-content p {
  font-family: var(--body);
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--slate);
  line-height: 1.9;
  margin-bottom: 1.2rem;
}

.cs-detail-content ul {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.cs-detail-content ul li {
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--slate);
  line-height: 1.85;
  padding: 0.3rem 0 0.3rem 1.2rem;
  position: relative;
}

.cs-detail-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* Sidebar */
.cs-sidebar {
  position: sticky;
  top: 100px;
}

.cs-sidebar-card {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.cs-sidebar-card h4 {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate-light);
  margin-bottom: 1rem;
}

.cs-sidebar-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}

.cs-sidebar-row:last-child {
  border-bottom: none;
}

.cs-sidebar-label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--slate-mid);
}

.cs-sidebar-val {
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--navy);
}

/* Related case studies */
.cs-related {
  padding: 5rem 0;
  background: var(--bg-2);
  border-top: 1px solid var(--rule);
}

.cs-related .section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 3rem;
}

.cs-related h2 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--navy);
  margin-bottom: 2.5rem;
}

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


/* --------------------------------------------------------------------------
   About Overview Section (Homepage)
   -------------------------------------------------------------------------- */

.about-overview {
  padding: 5rem 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--rule);
}

.about-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-stats-card {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

@media (max-width: 768px) {
  .about-overview-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}


/* --------------------------------------------------------------------------
   Legal Content Pages
   -------------------------------------------------------------------------- */

.legal-content {
  font-family: var(--body);
  line-height: 1.8;
  color: var(--text-mid);
}

.legal-content h2 {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

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

.legal-content p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.legal-content ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.legal-content li {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}


/* --------------------------------------------------------------------------
   Footer Legal Links
   -------------------------------------------------------------------------- */

.footer-links-legal {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: var(--slate-mid);
}

.footer-links-legal a {
  color: var(--slate-mid);
  text-decoration: none;
  transition: color 0.18s;
}

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


/* --------------------------------------------------------------------------
   Product Card Link Reset (no underlines when <a>)
   -------------------------------------------------------------------------- */

a.product-card {
  text-decoration: none;
  color: inherit;
}

a.product-card:hover {
  text-decoration: none;
}


/* --------------------------------------------------------------------------
   Case Study Link Underline Fix
   -------------------------------------------------------------------------- */

.cs-body a,
.cs-detail a,
.modal-body a {
  text-decoration: none;
  color: var(--gold);
  font-weight: 500;
  transition: color 0.18s;
}

.cs-body a:hover,
.cs-detail a:hover,
.modal-body a:hover {
  color: var(--gold-mid);
}

/* --------------------------------------------------------------------------
   Enquiry Success Modal
   -------------------------------------------------------------------------- */
#enquiry-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
#enquiry-modal.eq-open {
  display: flex;
}
.eq-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13, 27, 62, 0.7);
  backdrop-filter: blur(4px);
}
.eq-box {
  position: relative;
  background: #fff;
  border-radius: 12px;
  padding: 3rem 2.5rem;
  max-width: 440px;
  width: calc(100% - 3rem);
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
  animation: eq-in 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes eq-in {
  from { opacity: 0; transform: scale(0.88) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.eq-icon {
  margin-bottom: 1.5rem;
}
.eq-title {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--navy);
  margin: 0 0 1rem;
}
.eq-body {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--slate);
  line-height: 1.7;
  margin: 0 0 1rem;
}
.eq-close {
  margin-top: 1.5rem;
  display: inline-block;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 2.5rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background 0.18s;
}
.eq-close:hover {
  background: var(--gold);
  color: var(--navy);
}

/* --------------------------------------------------------------------------
   Flip Cards, mobile tap to flip
   -------------------------------------------------------------------------- */
@media (hover: none) {
  /* On touch devices, disable CSS hover flip, JS handles it via .flipped */
  .flip-card:hover .flip-inner {
    transform: none;
  }
  .flip-card.flipped .flip-inner {
    transform: rotateY(180deg);
  }
  .flip-card:hover .flip-front::after {
    transform: scaleX(0);
  }
  .flip-card.flipped .flip-front::after {
    transform: scaleX(1);
  }
  /* Change hint text to tap */
  .f-hint::after {
    content: ' tap to explore';
  }
  .f-hint > svg ~ text,
  .f-hint {
    font-size: 0.65rem;
  }
}

.f-hint-mobile { display: none; }
@media (hover: none) {
  .f-hint-desktop { display: none; }
  .f-hint-mobile { display: inline; }
}
