/* ============================================================
   ONE2W — High-Fidelity CodeDistrict Replica Design System
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Color Palette & CSS Variables ─────────────────────────── */
:root {
  /* Brand colors */
  --cd-dark: #0E251D;
  --cd-orange: #F7941E;
  --cd-orange-hover: #E07B00;
  --cd-mint: #1FDBA5;
  --cd-teal: #1A9C77;
  --cd-red: #BC1C21;
  --cd-blue: #178BFC;
  
  /* Backgrounds */
  --cd-bg: #F5F5F5;
  --cd-bg-white: #FFFFFF;
  --cd-bg-card: #FAFAFA;
  
  /* Borders */
  --cd-border-subtle: rgba(80, 80, 80, 0.08);
  --cd-border-medium: rgba(80, 80, 80, 0.12);
  --cd-border-dark: rgba(14, 37, 29, 0.12);
  
  /* Text */
  --cd-text-dark: #0E251D;
  --cd-text-body: #505050;
  --cd-text-muted: rgba(80, 80, 80, 0.74);
  --cd-text-light: #FFFCF4;

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --container-max: 1440px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: var(--cd-bg);
  color: var(--cd-text-dark);
  line-height: 1.5;
  overflow-x: hidden;
}

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

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

/* ── Container ────────────────────────────────────────────── */
.thm-container-wide {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 1024px) {
  .thm-container-wide {
    padding: 0 2.5rem;
  }
}

/* ── Typography & Monospace ───────────────────────────────── */
.font-mono-fig, .font-code {
  font-family: var(--font-mono);
}

.cd-caret {
  color: var(--cd-orange);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* ── Corner Crop Marks (CodeDistrict signature element) ────── */
.cd-corner {
  position: absolute;
  width: 6px;
  height: 6px;
  border-color: rgba(80, 80, 80, 0.25);
  border-style: solid;
  pointer-events: none;
  z-index: 2;
}

.cd-corner--tl { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.cd-corner--tr { top: -1px; right: -1px; border-width: 1px 1px 0 0; }
.cd-corner--bl { bottom: -1px; left: -1px; border-width: 0 0 1px 1px; }
.cd-corner--br { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }

/* ── Buttons ──────────────────────────────────────────────── */
.cd-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 3.25rem;
  padding: 0 1.75rem;
  background: var(--cd-dark);
  color: var(--cd-text-light);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-radius: 0;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cd-btn-primary:hover {
  background: var(--cd-orange);
  color: white;
  transform: translateY(-1px);
}

.cd-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 3.25rem;
  padding: 0 1.75rem;
  background: transparent;
  color: var(--cd-dark);
  border: 1px solid var(--cd-border-dark);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cd-btn-secondary:hover {
  background: var(--cd-dark);
  color: white;
  border-color: var(--cd-dark);
}

.cd-btn-tertiary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  height: 3.25rem;
  padding: 0 1.5rem;
  background: transparent;
  color: var(--cd-text-body);
  border: 1px solid var(--cd-border-medium);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  transition: all 0.2s ease;
}

.cd-btn-tertiary:hover {
  background: var(--cd-bg-white);
  color: var(--cd-dark);
  border-color: var(--cd-dark);
}

/* ================================================================
   HEADER
   ================================================================ */
.cd-v4-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cd-bg);
  border-bottom: 1px solid var(--cd-border-subtle);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.cd-v4-header.is-scrolled {
  background: rgba(245, 245, 245, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}

.cd-v4-header__bar {
  display: flex;
  height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

/* Desktop Navigation */
.cd-v4-header__desktop-nav {
  display: none;
}

@media (min-width: 1024px) {
  .cd-v4-header__desktop-nav {
    display: block;
  }
}

.cd-v4-header__desktop-nav ul {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cd-v4-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--cd-text-body);
  padding: 0.5rem 0;
  transition: color 0.2s ease;
}

.cd-v4-nav__link:hover, .cd-v4-nav__link.is-active {
  color: var(--cd-orange);
}

.cd-v4-nav__link--accent {
  color: var(--cd-orange) !important;
  font-weight: 700;
}

.cd-v4-nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.cd-v4-nav__item.is-open .cd-v4-nav__toggle {
  transform: rotate(45deg);
}

/* Header Actions & Mobile Hamburger */
.cd-v4-header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cd-v4-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--cd-border-medium);
  cursor: pointer;
  z-index: 101;
}

@media (min-width: 1024px) {
  .cd-v4-hamburger {
    display: none;
  }
}

.cd-v4-hamburger__line {
  width: 100%;
  height: 2px;
  background: var(--cd-dark);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.cd-v4-hamburger.is-active .cd-v4-hamburger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.cd-v4-hamburger.is-active .cd-v4-hamburger__line:nth-child(2) {
  opacity: 0;
}

.cd-v4-hamburger.is-active .cd-v4-hamburger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer Overlay */
.cd-v4-mobile-drawer {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--cd-bg-white);
  border-bottom: 2px solid var(--cd-orange);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
  display: none;
  padding: 1.5rem 2rem 2rem;
  z-index: 100;
}

.cd-v4-mobile-drawer.is-open {
  display: block;
  animation: slideDown 0.25s ease-out;
}

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

.cd-v4-mobile-nav__list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cd-v4-mobile-nav__link {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--cd-dark);
  display: block;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--cd-border-subtle);
}

.cd-v4-mobile-nav__group {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--cd-border-subtle);
}

.cd-v4-mobile-nav__label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cd-orange);
  text-transform: uppercase;
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
}

.cd-v4-mobile-nav__sublink {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--cd-text-body);
  padding: 0.375rem 0 0.375rem 1rem;
}

/* Mega Menu Submenu */
.cd-v4-submenu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--cd-bg-white);
  border-bottom: 1px solid var(--cd-border-medium);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.25s ease;
  z-index: 99;
}

.cd-v4-submenu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cd-v4-submenu__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 2rem 2.5rem;
}

.cd-v4-submenu__panel--solutions {
  display: grid;
  grid-template-columns: 1fr 1fr 280px;
  gap: 1.5rem;
}

.cd-v4-solution-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--cd-bg);
  border: 1px solid var(--cd-border-subtle);
  min-height: 260px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.cd-v4-solution-card:hover {
  border-color: var(--cd-orange);
  transform: translateY(-2px);
}

.cd-v4-solution-card__media {
  height: 90px;
  position: relative;
  background: linear-gradient(135deg, var(--cd-dark) 0%, #163B2F 100%);
}

.cd-v4-solution-card__arrow {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.15);
  color: white;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.cd-v4-solution-card:hover .cd-v4-solution-card__arrow {
  background: var(--cd-orange);
}

.cd-v4-solution-card__body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.cd-v4-solution-card__badge {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--cd-orange);
  letter-spacing: 0.1em;
}

.cd-v4-solution-card__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--cd-dark);
  margin-top: 0.25rem;
}

.cd-v4-solution-card__desc {
  font-size: 0.8125rem;
  color: var(--cd-text-body);
  margin-top: 0.375rem;
  line-height: 1.45;
}

.cd-v4-solution-card__stat {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--cd-orange);
  line-height: 1;
  margin-top: 1rem;
}

.cd-v4-solution-card__stat-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--cd-text-muted);
  text-transform: uppercase;
}

/* Layout Container */
.thm-container-wide {
  max-width: 1720px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 2.5rem;
  padding-right: 2.5rem;
}

@media (max-width: 768px) {
  .thm-container-wide {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

/* ================================================================
   HERO SECTION (CODE DISTRICT FLYWHEEL ENGINE)
   ================================================================ */
.cd-hero-v4 {
  padding-top: 3.5rem;
  padding-bottom: 4rem;
  background: var(--cd-bg);
  border-bottom: 1px solid var(--cd-border-subtle);
}

.cd-hero-v4__frame {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--cd-bg);
  border: 1px solid var(--cd-border-subtle);
}

@media (min-width: 1024px) {
  .cd-hero-v4__frame {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.cd-hero-v4__title {
  font-size: clamp(2.25rem, 4.5vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.08;
  color: var(--cd-dark);
}

.cd-hero-v4__desc {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--cd-text-body);
  max-width: 38rem;
}

/* Brands list in Hero */
.cd-hero-v4__brands {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--cd-border-subtle);
}

.cd-hero-v4__brands img {
  opacity: 0.6;
  transition: opacity 0.2s ease;
  filter: grayscale(100%);
}

.cd-hero-v4__brands img:hover {
  opacity: 1;
  filter: grayscale(0%);
}

/* Hero Stats Bar */
.cd-hero-v4__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--cd-border-subtle);
}

.cd-hero-v4__stat {
  padding: 1.25rem 1rem;
  background: var(--cd-bg);
  border-right: 1px solid var(--cd-border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 9rem;
}

.cd-hero-v4__stat:last-child {
  border-right: none;
}

.cd-hero-v4__stat-value {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--cd-dark);
  letter-spacing: -0.02em;
}

.cd-hero-v4__stat-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cd-text-muted);
  text-transform: uppercase;

}

/* ── FLYWHEEL ENGINE (HERO RIGHT COLUMN) ──────────────────── */
.cd-hero-v4__right {
  display: flex;
  flex-direction: column;
  background: var(--cd-bg);
  border-top: 1px solid var(--cd-border-subtle);
}

@media (min-width: 1024px) {
  .cd-hero-v4__right {
    border-top: none;
    border-left: 1px solid var(--cd-border-subtle);
  }
}

.cd-hero-v4__flywheel-wrap {
  position: relative;
  padding: 2rem 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cd-hero-v4__terminal {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cd-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
}

.cd-hero-v4__flywheel {
  position: relative;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1;
}

.cd-hero-v4__wedge {
  cursor: pointer;
  transition: fill 0.3s ease, transform 0.3s ease;
}

.cd-hero-v4__wedge:hover, .cd-hero-v4__wedge.is-active {
  fill: var(--cd-orange) !important;
  filter: drop-shadow(0 0 8px rgba(247, 148, 30, 0.4));
}

.cd-hero-v4__wedge-icon {
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cd-hero-v4__arm {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cd-hero-v4__arm.is-active {
  opacity: 1;
}

.cd-hero-v4__arm-text {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--cd-orange);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.cd-hero-v4__arm--0 .cd-hero-v4__arm-text { top: 0; right: 0; }
.cd-hero-v4__arm--1 .cd-hero-v4__arm-text { bottom: 0; right: 0; }
.cd-hero-v4__arm--2 .cd-hero-v4__arm-text { bottom: 0; left: 0; }
.cd-hero-v4__arm--3 .cd-hero-v4__arm-text { top: 0; left: 0; }

.cd-hero-v4__meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cd-text-muted);
  text-transform: uppercase;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

/* Cycle Tabs */
.cd-hero-v4__tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--cd-border-subtle);
  border-bottom: 1px solid var(--cd-border-subtle);
}

.cd-hero-v4__tab {
  position: relative;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  border-right: 1px solid var(--cd-border-subtle);
  cursor: pointer;
  background: var(--cd-bg);
  transition: background 0.2s ease;
}

.cd-hero-v4__tab:last-child {
  border-right: none;
}

.cd-hero-v4__tab.is-active {
  background: var(--cd-bg-white);
}

.cd-hero-v4__tab-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--cd-text-muted);
  text-align: center;
  line-height: 1.2;
}

.cd-hero-v4__tab.is-active .cd-hero-v4__tab-label {
  color: var(--cd-dark);
}

.cd-hero-v4__tab-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--cd-orange);
  transition: width 0.1s linear;
}

.cd-hero-v4__tab.is-active .cd-hero-v4__tab-progress {
  width: 100%;
}

/* Quote swap panel */
.cd-hero-v4__quote {
  padding: 1.75rem 1.5rem;
  text-align: center;
  background: #FAFAFA;
  min-height: 11rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.cd-hero-v4__quote-line {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.cd-hero-v4__quote-mark svg {
  fill: var(--cd-orange);
}

p[data-quote-main] {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--cd-dark);
  line-height: 1.4;
  transition: opacity 0.2s ease;
}

p[data-quote-sub] {
  font-size: 0.9375rem;
  color: var(--cd-text-muted);
  line-height: 1.4;
  transition: opacity 0.2s ease;
}

/* ================================================================
   TRUSTED BY GRID & POPOVERS
   ================================================================ */
.cd-trusted-v4 {
  padding: 4rem 0;
  background: var(--cd-bg);
  border-top: 1px solid var(--cd-border-subtle);
}

.cd-trusted-v4__navbar {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--cd-border-subtle);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--cd-text-muted);
  text-transform: uppercase;
}

.cd-trusted-v4__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-bottom: 1px solid var(--cd-border-subtle);
}

@media (min-width: 640px) {
  .cd-trusted-v4__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .cd-trusted-v4__grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1280px) {
  .cd-trusted-v4__grid { grid-template-columns: repeat(7, 1fr); }
}

.cd-trusted-v4__cell {
  position: relative;
  height: 12rem;
  background: var(--cd-bg);
  border-right: 1px solid var(--cd-border-subtle);
  border-bottom: 1px solid var(--cd-border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.cd-trusted-v4__cell:hover {
  background: var(--cd-bg-white);
}

.cd-trusted-v4__logo-img {
  max-width: 130px;
  height: auto;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.cd-trusted-v4__cell:hover .cd-trusted-v4__logo-img {
  opacity: 1;
}

/* Hover Popover Card */
.cd-trusted-v4__popover {
  position: absolute;
  top: -120%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 26rem;
  padding: 1.5rem;
  background: var(--cd-bg-white);
  border: 1px solid var(--cd-border-medium);
  box-shadow: 0 12px 36px rgba(0,0,0,0.12);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
}

.cd-trusted-v4__cell.is-interactive:hover .cd-trusted-v4__popover {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

/* ================================================================
   WHAT IS HOLDING YOUR ORGANIZATION BACK? (INTERACTIVE WIDGET)
   ================================================================ */
.cd-holding-v4 {
  padding: 5rem 0;
  background: var(--cd-bg);
  border-top: 1px solid var(--cd-border-subtle);
}

.cd-holding-v4__tablist {
  display: flex;
  border-bottom: 1px solid var(--cd-border-subtle);
}

.cd-holding-v4__tab {
  height: 3.75rem;
  padding: 0 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--cd-text-muted);
  border: 1px solid var(--cd-border-subtle);
  border-bottom: none;
  background: var(--cd-bg);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cd-holding-v4__tab.is-active {
  background: var(--cd-dark);
  color: var(--cd-text-light);
  border-color: var(--cd-dark);
}

.cd-holding-v4__panel {
  display: none;
}

.cd-holding-v4__panel.is-active {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .cd-holding-v4__panel.is-active {
    grid-template-columns: 1fr 1fr;
  }
}

.cd-holding-v4__left {
  position: relative;
  padding: 3rem;
  background: var(--cd-bg);
  border: 1px solid var(--cd-border-subtle);
  min-height: 32rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cd-holding-v4__left-state {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.cd-holding-v4__left-state.is-active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

/* Right Panel - CodeDistrict Dark Green Card & Subtabs */
.cd-holding-v4__right {
  position: relative;
  background: radial-gradient(circle, rgba(26,156,119,0.12) 1px, transparent 1px) 0 0 / 16px 16px, #F5F5F5;
  border: 1px solid var(--cd-border-subtle);
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32rem;
}

.cd-holding-v4__dark {
  width: 100%;
  background: var(--cd-dark);
  color: white;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem;
  position: relative;
}

.cd-holding-v4__sub-tablist {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.cd-holding-v4__sub-tab {
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cd-holding-v4__sub-tab.is-active, .cd-holding-v4__sub-tab:hover {
  color: white;
  background: rgba(255,255,255,0.1);
}

.cd-holding-v4__sub-panel {
  display: none;
}

.cd-holding-v4__sub-panel.is-active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.cd-holding-v4__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 0.75rem;
  background: rgba(255,255,255,0.02);
}

.cd-holding-v4__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.75rem;
}

.cd-holding-v4__dot--red { background: #FF6D6F; }
.cd-holding-v4__dot--green { background: #1FDBA5; }
.cd-holding-v4__dot--blue { background: #178BFC; }

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

/* ================================================================
   SECTION PADDING & CONTAINER WRAPPERS (FIX MARGIN OVERLAPS)
   ================================================================ */
section {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 6rem 0;
  box-sizing: border-box;
}

.cd-section-dark {
  background: var(--cd-dark);
  color: var(--cd-text-light);
}

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

.cd-section-white {
  background: var(--cd-bg-white);
  color: var(--cd-text-body);
}

/* ================================================================
   INDUSTRIES WE SERVE (CODE DISTRICT STYLE)
   ================================================================ */
.cd-industries-v4 {
  background: var(--cd-bg-white);
  border-top: 1px solid var(--cd-border-subtle);
}

.cd-ind-grid {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--cd-border-subtle);
}

@media (min-width: 1024px) {
  .cd-ind-grid {
    grid-template-columns: 480px 1fr;
  }
}

.cd-ind-nav {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--cd-border-subtle);
  background: var(--cd-bg);
}

.cd-ind-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border: none;
  border-bottom: 1px solid var(--cd-border-subtle);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
}

.cd-ind-tab:last-child {
  border-bottom: none;
}

.cd-ind-tab.is-active, .cd-ind-tab:hover {
  background: var(--cd-dark);
  color: var(--cd-text-light);
}

.cd-ind-tab__title {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cd-ind-tab__num {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  opacity: 0.6;
}

.cd-ind-display {
  padding: 3rem;
  background: var(--cd-bg-white);
  display: none;
  flex-direction: column;
  justify-content: space-between;
}

.cd-ind-display.is-active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

/* ================================================================
   AI PILOT PROGRAM & ROADMAP
   ================================================================ */
.cd-pilot-v4 {
  background: var(--cd-dark);
  color: var(--cd-text-light);
}

.cd-pilot-card {
  position: relative;
  padding: 3.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cd-pilot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .cd-pilot-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ================================================================
   ENTERPRISE SECURITY & CERTIFIED MARQUEE
   ================================================================ */
.cd-certified-v4 {
  background: var(--cd-dark);
  color: white;
  overflow: hidden;
  padding: 5rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.cd-certified-marquee {
  display: flex;
  gap: 3rem;
  animation: marquee 25s linear infinite;
  white-space: nowrap;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.cd-certified-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.9);
}

/* ================================================================
   OUR PODCAST / MEDIA CARDS
   ================================================================ */
.cd-podcast-v4 {
  background: var(--cd-bg);
}

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

@media (min-width: 768px) {
  .cd-podcast-grid { grid-template-columns: repeat(3, 1fr); }
}

.cd-podcast-card {
  position: relative;
  background: var(--cd-bg-white);
  border: 1px solid var(--cd-border-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cd-podcast-media {
  position: relative;
  height: 220px;
  background: var(--cd-dark);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1.5rem;
  overflow: hidden;
}

.cd-podcast-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.375rem 0.75rem;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: white;
  text-transform: uppercase;
}

/* ================================================================
   DISCOVERY SESSION & INTERACTIVE FORM
   ================================================================ */
.cd-discovery-v4 {
  background: var(--cd-dark);
  color: white;
}

.cd-discovery-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .cd-discovery-container { grid-template-columns: 1fr 1fr; }
}

.cd-form-input {
  width: 100%;
  height: 3.25rem;
  padding: 0 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.cd-form-input:focus {
  border-color: var(--cd-orange);
}

.cd-form-textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  outline: none;
  resize: vertical;
}

.cd-form-textarea:focus {
  border-color: var(--cd-orange);
}

/* ================================================================
   BLOGS & INSIGHTS CARDS
   ================================================================ */
.cd-blogs-v4 {
  background: var(--cd-bg);
}

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

@media (min-width: 768px) {
  .cd-blogs-grid { grid-template-columns: repeat(3, 1fr); }
}

.cd-blog-card {
  position: relative;
  background: var(--cd-bg-white);
  border: 1px solid var(--cd-border-subtle);
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.cd-blog-card:hover {
  border-color: var(--cd-orange);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.06);
}

.wwb {
  padding: 5rem 0;
  background: var(--cd-bg);
  border-top: 1px solid var(--cd-border-subtle);
}

.wwb-tab-row {
  display: flex;
  border: 1px solid var(--cd-border-subtle);
  background: var(--cd-bg);
}

.wwb-tab {
  height: 3.5rem;
  padding: 0 2rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--cd-text-muted);
  border: none;
  border-right: 1px solid var(--cd-border-subtle);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wwb-tab:last-child {
  border-right: none;
}

.wwb-tab.is-active, .wwb-tab:hover {
  background: var(--cd-dark);
  color: var(--cd-text-light);
}

.wwb-panel {
  display: none;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

@media (min-width: 768px) {
  .wwb-panel { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1280px) {
  .wwb-panel { grid-template-columns: repeat(3, 1fr); }
}

.wwb-panel.is-active {
  display: grid;
  animation: fadeIn 0.3s ease;
}

/* Service Card with Hover Reveal Actions */
.wwb-card {
  position: relative;
  min-height: 24rem;
  padding: 2.25rem;
  background: var(--cd-bg-white);
  border: 1px solid var(--cd-border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.wwb-card:hover {
  border-color: var(--cd-orange);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}

.wwb-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(247, 148, 30, 0.08);
  color: var(--cd-orange);
  margin-bottom: 2rem;
}

.wwb-card-text {
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.wwb-card:hover .wwb-card-text {
  transform: translateY(-0.75rem);
}

.wwb-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cd-dark);
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.wwb-card-desc {
  font-size: 0.9375rem;
  color: var(--cd-text-body);
  line-height: 1.6;
}

/* Slide-up Actions Bar on Hover */
.wwb-actions {
  margin-top: 1.25rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(1rem);
  transition: all 0.35s cubic-bezier(0.2, 0, 0, 1);
}

.wwb-card:hover .wwb-actions {
  opacity: 1;
  max-height: 6rem;
  transform: translateY(0);
}

.wwb-actions-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  padding-top: 0.5rem;
}

.wwb-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--cd-dark);
  color: var(--cd-text-light);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.wwb-btn:hover {
  background: var(--cd-orange);
  color: white;
}


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

@media (min-width: 768px) {
  .cd-services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .cd-services-grid { grid-template-columns: repeat(3, 1fr); }
}

.cd-service-card {
  position: relative;
  padding: 2rem;
  background: var(--cd-bg);
  border: 1px solid var(--cd-border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  transition: all 0.25s ease;
}

.cd-service-card:hover {
  border-color: var(--cd-orange);
  background: var(--cd-bg-white);
  box-shadow: 0 12px 32px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.cd-service-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(247, 148, 30, 0.1);
  color: var(--cd-orange);
  margin-bottom: 1.5rem;
}

.cd-service-card__title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--cd-dark);
  margin-bottom: 0.75rem;
}

.cd-service-card__desc {
  font-size: 0.9375rem;
  color: var(--cd-text-body);
  line-height: 1.6;
}

.cd-service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--cd-orange);
  margin-top: 1.5rem;
}

/* ================================================================
   FOOTER (CODE DISTRICT STYLE)
   ================================================================ */
.cd-footer-v4 {
  background: var(--cd-dark);
  color: var(--cd-text-light);
  padding: 5rem 0 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.cd-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

@media (min-width: 768px) {
  .cd-footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.cd-footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  text-transform: uppercase;
  color: var(--cd-orange);
  letter-spacing: 0.05em;
  margin-bottom: 1.25rem;
}

.cd-footer-col a {
  display: block;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 0.625rem;
  transition: color 0.2s ease;
}

.cd-footer-col a:hover {
  color: var(--cd-orange);
}

.cd-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}

/* ================================================================
   MOBILE RESPONSIVE MEDIA QUERIES
   ================================================================ */
@media (max-width: 1023px) {
  .cd-v4-header__bar {
    padding: 0.5rem 0;
  }

  .cd-hero-v4__frame {
    grid-template-columns: 1fr;
  }
  
  .cd-hero-v4__right {
    border-left: none;
    border-top: 1px solid var(--cd-border-subtle);
  }

  .cd-holding-v4__tablist,
  .wwb-tab-row,
  .cd-ind-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .cd-holding-v4__tablist::-webkit-scrollbar,
  .wwb-tab-row::-webkit-scrollbar,
  .cd-ind-nav::-webkit-scrollbar {
    display: none;
  }

  .cd-footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

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

  .cd-hero-v4__flywheel {
    max-width: 240px;
  }

  .cd-btn-primary, .cd-btn-secondary, .cd-btn-tertiary {
    padding: 0 1rem;
    font-size: 0.75rem;
    height: 2.75rem;
  }

  .cd-holding-v4__left {
    padding: 1.5rem;
  }

  .cd-holding-v4__right {
    padding: 1rem;
  }

  .cd-holding-v4__dark {
    padding: 1rem;
  }
}
