/* ==========================================================================
   CADOPT V3 — CUSTOM COMPONENTS
   Everything the base kit doesn't already provide. References kit tokens only.
   ========================================================================== */

/* ---------- Blueprint grid ambient texture (used behind hero + CTA bands) ---------- */
.cx-blueprint {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 90%);
}
.cx-glow {
  position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none;
  opacity: 0.55;
}

/* ---------- Kicker / eyebrow ---------- */
.cx-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: var(--fs-micro);
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand-300);
  margin-bottom: var(--sp-4);
}
.cx-kicker::before {
  content: ""; width: 20px; height: 1px; background: var(--brand-300);
}
.cx-kicker.cx-kicker-accent { color: var(--signal-500); }
.cx-kicker.cx-kicker-accent::before { background: var(--signal-500); }

/* ---------- Hero ---------- */
.cx-hero {
  position: relative; overflow: hidden;
  background: radial-gradient(ellipse 120% 80% at 15% -10%, var(--brand-800) 0%, var(--surface-0) 55%);
  padding-block: clamp(96px, 14vw, 168px) clamp(64px, 8vw, 96px);
  border-bottom: 1px solid var(--line-soft);
}
.cx-hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--sp-8);
  align-items: center;
}
@media (max-width: 900px) { .cx-hero-grid { grid-template-columns: 1fr; } }
.cx-hero h1 { color: var(--ink-strong); font-size: clamp(2.3rem, 5vw, 4.1rem); }
.cx-hero .cx-gradient-text {
  background: linear-gradient(100deg, var(--brand-300), var(--brand-500) 45%, var(--signal-500) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cx-hero-lead { font-size: var(--fs-lead); color: var(--ink-mute); max-width: 46ch; margin-bottom: var(--sp-6); }
.cx-hero-ctas { display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-7); }

.cx-proof-strip {
  display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-6);
  font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--ink-faint);
  letter-spacing: 0.02em; padding-top: var(--sp-5); border-top: 1px solid var(--line-soft);
}
.cx-proof-strip strong { color: var(--ink); font-weight: 500; }

/* Hero visual: animated wireframe / orbiting node graphic, pure CSS+SVG */
.cx-hero-art { position: relative; aspect-ratio: 1/1; display: grid; place-items: center; }
.cx-hero-art svg { width: 100%; height: 100%; }
.cx-orbit { animation: cx-spin 40s linear infinite; transform-origin: center; }
.cx-orbit-rev { animation: cx-spin-rev 55s linear infinite; transform-origin: center; }
@keyframes cx-spin { to { transform: rotate(360deg); } }
@keyframes cx-spin-rev { to { transform: rotate(-360deg); } }
.cx-node { animation: cx-pulse 3.2s ease-in-out infinite; }
@keyframes cx-pulse { 0%,100% { opacity: 0.55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .cx-orbit, .cx-orbit-rev, .cx-node { animation: none; }
}

/* ---------- Section rhythm ---------- */
.cx-section { padding-block: clamp(56px, 8vw, 104px); position: relative; }
.cx-section-alt { background: var(--c-bg-alt); }
.cx-section-head { max-width: 720px; margin-bottom: var(--sp-7); }
.cx-section-head.cx-center { margin-inline: auto; text-align: center; }

/* ---------- Pillar / capability cards ---------- */
.cx-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.cx-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-5); }
.cx-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-5); }
@media (max-width: 900px) { .cx-grid-3, .cx-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cx-grid-3, .cx-grid-4, .cx-grid-2 { grid-template-columns: 1fr; } }

.cx-card {
  position: relative; background: var(--surface-1); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); padding: var(--sp-6);
  transition: border-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.cx-card:hover { border-color: rgba(103,195,240,0.35); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cx-card-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--brand-050); display: grid; place-items: center; color: var(--brand-300);
  margin-bottom: var(--sp-4);
}
.cx-card h3 { font-size: 1.1rem; margin-bottom: var(--sp-2); }
.cx-card p { color: var(--ink-mute); font-size: var(--fs-small); margin-bottom: 0; }
.cx-card .cx-card-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: var(--sp-4);
  font-family: var(--font-head); font-size: var(--fs-small); font-weight: 600; color: var(--brand-300);
}
.cx-card:hover .cx-card-link { color: var(--signal-500); }

/* ---------- Stat counters ---------- */
.cx-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }
@media (max-width: 900px) { .cx-stats { grid-template-columns: repeat(2, 1fr); } }
.cx-stat { text-align: left; border-left: 2px solid var(--line); padding-left: var(--sp-4); }
.cx-stat-num {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(2rem, 3.4vw, 3rem);
  color: var(--ink-strong); line-height: 1; display: flex; align-items: baseline; gap: 2px;
}
.cx-stat-num .cx-suffix { font-size: 0.5em; color: var(--signal-500); }
.cx-stat-label { font-size: var(--fs-small); color: var(--ink-mute); margin-top: var(--sp-2); }

/* ---------- Case study spotlight ---------- */
.cx-spotlight {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--sp-8); align-items: center;
  background: linear-gradient(135deg, var(--surface-1), var(--surface-0));
  border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: clamp(28px, 4vw, 56px);
  position: relative; overflow: hidden;
}
@media (max-width: 900px) { .cx-spotlight { grid-template-columns: 1fr; } }
.cx-spotlight-num {
  font-family: var(--font-head); font-weight: 700; color: var(--signal-500); line-height: 0.95;
  font-size: clamp(3.5rem, 8vw, 6.5rem);
}
.cx-spotlight-num small { display: block; font-size: 0.22em; color: var(--ink-mute); font-family: var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; margin-top: var(--sp-3); }

/* ---------- Testimonial rail ---------- */
.cx-quote-card {
  background: var(--surface-1); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: var(--sp-6); display: flex; flex-direction: column; height: 100%;
}
.cx-quote-mark { font-family: var(--font-head); font-size: 3rem; color: var(--brand-500); line-height: 1; margin-bottom: var(--sp-3); }
.cx-quote-text { font-size: var(--fs-lead); color: var(--ink); margin-bottom: var(--sp-5); flex: 1; }
.cx-quote-attr { display: flex; align-items: center; gap: var(--sp-3); }
.cx-quote-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--brand-500), var(--signal-500));
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; color: #0A1220;
}
.cx-quote-name { font-weight: 600; color: var(--ink-strong); font-size: var(--fs-small); }
.cx-quote-role { font-size: var(--fs-micro); color: var(--ink-mute); }

/* ---------- Certification / partner strip ---------- */
.cx-badge-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.cx-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.04em;
  color: var(--ink-mute); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px;
}
.cx-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--signal-500); flex-shrink: 0; }

/* ---------- Timeline (About > journey) ---------- */
.cx-timeline { position: relative; padding-left: var(--sp-7); }
.cx-timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--brand-500), var(--signal-500)); opacity: 0.4; }
.cx-timeline-item { position: relative; padding-bottom: var(--sp-7); }
.cx-timeline-item:last-child { padding-bottom: 0; }
.cx-timeline-item::before {
  content: ""; position: absolute; left: calc(-1 * var(--sp-7) + 1px); top: 4px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--surface-0);
  border: 2px solid var(--brand-500); box-shadow: var(--glow-brand);
}
.cx-timeline-year { font-family: var(--font-mono); color: var(--signal-500); font-size: var(--fs-small); letter-spacing: 0.04em; margin-bottom: var(--sp-2); display: block; }
.cx-timeline-item h3 { font-size: 1.05rem; margin-bottom: var(--sp-2); }
.cx-timeline-item p { color: var(--ink-mute); font-size: var(--fs-small); margin-bottom: 0; max-width: 60ch; }

/* ---------- Leadership ---------- */
.cx-people { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
@media (max-width: 900px) { .cx-people { grid-template-columns: 1fr; } }
.cx-person { border-top: 1px solid var(--line); padding-top: var(--sp-5); }
.cx-person-avatar {
  width: 64px; height: 64px; border-radius: var(--radius); margin-bottom: var(--sp-4);
  background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; font-size: 1.2rem; color: #fff;
}
.cx-person h3 { font-size: 1.05rem; margin-bottom: 2px; }
.cx-person-role { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--brand-300); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: var(--sp-3); display: block; }
.cx-person p { font-size: var(--fs-small); color: var(--ink-mute); }

/* Kit only defines data-cols 3/4; single-column mega panels (About, Resources) need their own track */
.t3-mega-grid[data-cols="1"] { grid-template-columns: 1fr; }

/* ---------- Dual-axis mega menu content ---------- */
.cx-mega-tabs { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-5); border-bottom: 1px solid var(--line-soft); }
.cx-mega-tab {
  font-family: var(--font-head); font-size: var(--fs-small); font-weight: 600; color: var(--ink-mute);
  background: none; border: 0; padding: var(--sp-2) var(--sp-1) var(--sp-3); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.cx-mega-tab[aria-selected="true"] { color: var(--ink-strong); border-bottom-color: var(--signal-500); }
.cx-mega-panel[hidden] { display: none; }

/* ---------- Sticky sub-tabs (product/service detail template) ---------- */
.cx-subnav {
  position: sticky; top: var(--header-h-scrolled); z-index: 40;
  background: rgba(10,18,32,0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.cx-subnav-list { display: flex; gap: var(--sp-6); overflow-x: auto; }
.cx-subnav-link {
  font-family: var(--font-head); font-size: var(--fs-small); font-weight: 600; color: var(--ink-mute);
  padding: var(--sp-4) 0; border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.cx-subnav-link:hover, .cx-subnav-link[aria-current="true"] { color: var(--ink-strong); border-bottom-color: var(--signal-500); }

.cx-detail-hero {
  display: grid; grid-template-columns: 1fr auto; gap: var(--sp-6); align-items: end;
  padding-block: var(--sp-8) var(--sp-6); border-bottom: 1px solid var(--line-soft);
}
@media (max-width: 700px) { .cx-detail-hero { grid-template-columns: 1fr; } }

/* ---------- Segmented contact form ---------- */
.cx-form { display: grid; gap: var(--sp-4); }
.cx-field { display: grid; gap: 6px; }
.cx-field label { font-size: var(--fs-small); color: var(--ink-mute); font-family: var(--font-head); }
.cx-field input, .cx-field select, .cx-field textarea {
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink-strong); padding: 12px 14px; font-family: var(--font-body); font-size: var(--fs-body);
  min-height: 44px;
}
.cx-field textarea { min-height: 110px; resize: vertical; }
.cx-field input:focus, .cx-field select:focus, .cx-field textarea:focus {
  outline: 2px solid var(--c-focus); outline-offset: 1px; border-color: transparent;
}
.cx-chip-group { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.cx-chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-size: var(--fs-small);
  color: var(--ink-mute); cursor: pointer; background: var(--surface-1);
}
.cx-chip input { position: absolute; opacity: 0; pointer-events: none; }
.cx-chip:has(input:checked) { border-color: var(--signal-500); color: var(--ink-strong); background: var(--signal-100); }

.cx-office-list { display: grid; gap: var(--sp-5); }
.cx-office { border-bottom: 1px solid var(--line-soft); padding-bottom: var(--sp-5); }
.cx-office-city { font-family: var(--font-head); font-weight: 700; color: var(--ink-strong); margin-bottom: 4px; }
.cx-office-tag { font-family: var(--font-mono); font-size: var(--fs-micro); color: var(--signal-500); text-transform: uppercase; letter-spacing: 0.06em; }
.cx-office-addr { color: var(--ink-mute); font-size: var(--fs-small); margin-top: 6px; }

/* ---------- Utility ---------- */
.cx-eyebrow-line { height: 1px; background: linear-gradient(90deg, var(--brand-500), transparent); width: 64px; margin-bottom: var(--sp-4); }
.cx-mono { font-family: var(--font-mono); }
.cx-muted { color: var(--ink-mute); }
.cx-accent { color: var(--signal-500); }
.cx-center { text-align: center; }
.cx-mt-0 { margin-top: 0; }
.cx-max-60 { max-width: 60ch; }
