﻿/* =============================================================
   Connectors page
   ============================================================= */

.cn-hero { padding: 56px 0 40px; }
@media (min-width: 768px) { .cn-hero { padding: 80px 0 56px; } }

.cn-hero__grid {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}
@media (min-width: 960px) {
  .cn-hero__grid { grid-template-columns: 1fr 1.05fr; gap: 64px; }
}

/* Hero art wrapper + SVG sizing (shared hive-svg from About) */
.cn-hero__art {
  display: grid;
  place-items: center;
  padding: var(--space-4);
}
.cn-hero__art .hive-svg {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
}
.cn-hero h1 {
  margin: 0 0 var(--space-4);
}
.cn-hero__sub {
  font-size: var(--fs-18);
  color: var(--fg-2);
  margin: 0 0 var(--space-5);
  line-height: 1.5;
}
.cn-hero__stats {
  display: flex;
  gap: var(--space-6);
  padding-top: var(--space-5);
  margin-top: var(--space-5);
  border-top: 1px solid var(--border-2);
}
.cn-stat .num {
  font-size: var(--fs-32);
  font-weight: var(--fw-bold);
  color: var(--dh-navy);
  letter-spacing: -0.02em;
  line-height: 1;
}
.cn-stat .lbl {
  font-size: var(--fs-12);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--fg-2);
  margin-top: 6px;
  display: block;
}

/* ============ Hub-and-spoke visual ============ */
.cn-hub {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 560px;
  margin: 0 auto;
}
.cn-hub__center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 22%;
  aspect-ratio: 1 / 1.1;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(180deg, #244271 0%, #193359 100%);
  box-shadow: 0 20px 48px rgba(25, 51, 89, 0.3);
  display: grid;
  place-items: center;
  color: #fff;
  text-align: center;
  padding: 14px;
  z-index: 3;
}
.cn-hub__center img {
  width: 96%;
  height: auto;
  max-height: 65%;
  object-fit: contain;
  /* The reversed mark is already white — drop the previous filter */
}
.cn-hub__lines {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}
.cn-hub__lines line {
  stroke: var(--dh-navy);
  stroke-width: 1.4;
  stroke-dasharray: 4 5;
  /* Total dash cycle = 9px. Animating dashoffset from 0 -> -9 moves
     dashes from the line's start (spoke) toward the end (center).
     Reduced motion preference disables this below. */
  stroke-dashoffset: 0;
  opacity: 0.6;
  animation: cn-flow 1.6s linear infinite;
}
@keyframes cn-flow {
  to { stroke-dashoffset: -9; }
}
@media (prefers-reduced-motion: reduce) {
  .cn-hub__lines line { animation: none; }
}
.cn-spoke {
  position: absolute;
  width: 88px;
  display: grid;
  place-items: center;
  gap: 6px;
  z-index: 2;
  text-align: center;
}
.cn-spoke__tile {
  width: 56px; height: 56px;
  border-radius: var(--radius-12);
  background: #fff;
  border: 1px solid var(--border-1);
  box-shadow: 0 4px 14px rgba(25,51,89,0.08);
  display: grid; place-items: center;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .cn-spoke:hover .cn-spoke__tile {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(25,51,89,0.14);
  }
  .cn-spoke:hover .cn-spoke__tile--bare {
    transform: none;
    box-shadow: none;
  }
}
.cn-spoke__tile .badge {
  font-size: 13px;
  font-weight: var(--fw-bold);
  color: #fff;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: var(--radius-6);
}
.cn-spoke__tile img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
/* Wide horizontal logos (icon + wordmark) — let the image overflow
   the 56×56 tile slightly so the mark reads at the same visual weight
   as square logos like Power BI or SharePoint. */
.cn-spoke__tile--wide img {
  width: 48px;
  height: 48px;
  transform: scale(1.05);
}

.cn-spoke__tile--bare {
  background: transparent;
  border: 0;
  box-shadow: none;
}
.cn-spoke__tile--bare img {
  width: 48px;
  height: 48px;
}
.cn-spoke__lbl {
  font-size: 11px;
  color: var(--dh-navy);
  font-weight: var(--fw-medium);
}

/* Position 8 spokes around the hub */
.cn-spoke--1 {
  top: 7%;
  left: 50%;
  transform: translateX(-50%);
  /* Label sits above the tile so it doesn't overlap the dashed
     line coming out of the top of the hub. */
  grid-auto-flow: row;
}
.cn-spoke--1 .cn-spoke__lbl { order: -1; }
.cn-spoke--2 { top: 18%;   right: 13%; }
.cn-spoke--3 { top: 50%;   right: 7%; transform: translateY(-50%); }
.cn-spoke--4 { bottom: 18%; right: 13%; }
.cn-spoke--5 { bottom:  8%; left: 50%; transform: translateX(-50%); }
.cn-spoke--6 { bottom: 18%; left: 13%; }
.cn-spoke--7 { top: 50%;   left: 7%; transform: translateY(-50%); }
.cn-spoke--8 { top: 18%;   left: 13%; }

/* Subtle pulse on the center */
@keyframes cn-pulse {
  0%, 100% { box-shadow: 0 20px 48px rgba(25, 51, 89, 0.3), 0 0 0 0 rgba(243, 146, 53, 0.35); }
  50%      { box-shadow: 0 20px 48px rgba(25, 51, 89, 0.3), 0 0 0 14px rgba(243, 146, 53, 0); }
}
.cn-hub__center { animation: cn-pulse 4s ease-out infinite; }

/* ============ Category filters + grid ============ */
.cn-catalog {
  padding: 56px 0;
  background: var(--bg-3);
  border-top: 1px solid var(--border-2);
  border-bottom: 1px solid var(--border-2);
}
@media (min-width: 768px) { .cn-catalog { padding: 72px 0; } }

.cn-catalog__head {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
  align-items: end;
  margin-bottom: var(--space-6);
}
@media (min-width: 768px) {
  .cn-catalog__head { grid-template-columns: 1fr auto; gap: var(--space-6); }
}
.cn-catalog__head h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  margin: 0 0 var(--space-2);
  letter-spacing: var(--tracking-tight);
}
.cn-catalog__head p { color: var(--fg-2); margin: 0; font-size: var(--fs-16); }

.cn-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: #fff;
  padding: 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-1);
}
.cn-filter {
  font: inherit;
  font-size: var(--fs-13, 13px);
  font-weight: var(--fw-medium);
  padding: 8px 16px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--dh-navy);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .cn-filter:hover { background: var(--bg-1); }
}
.cn-filter:active { transform: scale(0.97); }
.cn-filter.is-on {
  background: var(--dh-navy);
  color: #fff;
}
.cn-filter .count {
  font-size: 11px;
  margin-left: 6px;
  opacity: 0.6;
  font-weight: var(--fw-bold);
}

.cn-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .cn-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .cn-grid { grid-template-columns: repeat(4, 1fr); } }

.cn-card {
  background: #fff;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  /* Top padding lifted so the logo sits in the same row as the
     "Live" status pill at top:14px. */
  padding: 14px var(--space-5) var(--space-5);
  display: grid;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--dh-navy);
  border-bottom: 1px solid var(--border-2);
  position: relative;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .cn-card:hover {
    transform: translateY(-3px);
    border-color: rgba(25,51,89,0.15);
    box-shadow: 0 12px 28px rgba(25,51,89,0.08);
    color: var(--dh-navy);
  }
}
.cn-card:active {
  transform: translateY(-1px) scale(0.98);
}
.cn-card__logo {
  width: 44px; height: 44px;
  border-radius: var(--radius-10);
  display: grid; place-items: center;
  font-size: 14px;
  font-weight: var(--fw-bold);
  color: #fff;
}
.cn-card__logo img { width: 28px; height: 28px; }
/* Real-logo variant: white tile, no bg fill, generous logo */
.cn-card__logo--img {
  background: #fff;
  border: 1px solid var(--border-2);
  padding: 4px;
  overflow: hidden;
}
/* Logos with native transparent PNGs / strong visual presence —
   drop the white tile so they read on the page background directly. */
.cn-card__logo--bare {
  background: transparent;
  border: 0;
  padding: 0;
  width: 48px; height: 48px;
}
.cn-card__logo--bare img {
  width: 100%;
  height: 100%;
}
/* Inline-SVG glyph variant — for generic connector types like
   "File System" that don't have a vendor logo. Matches the white-tile
   look of cn-card__logo--img but sizes/colors an SVG instead. */
.cn-card__logo--glyph {
  color: var(--dh-navy);
}
.cn-card__logo--glyph svg {
  width: 26px;
  height: 26px;
}

.cn-card__logo--img img {
  /* Fix to the inner content box so tall/wide logos (Power BI, Looker)
     can't push past the rounded tile edges. */
  width: 32px;
  height: 32px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}
.cn-card__name {
  font-size: var(--fs-16);
  font-weight: var(--fw-bold);
  color: var(--dh-navy);
  margin: 0;
}
.cn-card__cat {
  font-size: var(--fs-12);
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  margin: 0;
  font-weight: var(--fw-bold);
}
.cn-card__status {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  border-radius: var(--radius-pill);
  color: var(--success);
  background: rgba(46, 139, 87, 0.1);
}
.cn-card__status .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--success);
}
.cn-card__status--soon {
  color: var(--fg-2);
  background: var(--dh-grey-50);
}
.cn-card__status--soon .dot { background: var(--dh-grey-light); }

/* ============ Architecture / How section ============ */
.cn-arch { padding: 56px 0; }
@media (min-width: 768px) { .cn-arch { padding: 72px 0; } }
.cn-arch__head { max-width: 720px; margin-bottom: var(--space-7); }
.cn-arch__steps {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 768px) { .cn-arch__steps { grid-template-columns: repeat(3, 1fr); } }

.cn-arch__step {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.cn-arch__hex {
  width: 56px; height: 64px;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: var(--dh-grey-50);
  color: var(--dh-navy);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.cn-arch__step h3 { font-size: var(--fs-20); margin: 0; color: var(--dh-navy); }
.cn-arch__step p { color: var(--fg-2); margin: 0; font-size: var(--fs-15, 15px); line-height: 1.55; }

/* ============ Request integration ============ */
.cn-request {
  background: var(--dh-navy);
  color: #fff;
  padding: 64px 0;
  overflow: hidden;
  position: relative;
}
@media (min-width: 768px) { .cn-request { padding: 80px 0; } }

.cn-request__motif {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(900px 320px at 90% 0%, rgba(243,146,53,0.12), transparent 60%),
    radial-gradient(800px 280px at 0% 100%, rgba(250,180,0,0.08), transparent 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 52'><polygon points='30,1 59,17 59,35 30,51 1,35 1,17' fill='none' stroke='%23ffffff' stroke-width='0.4' stroke-opacity='0.06'/></svg>");
  background-size: auto, auto, 60px 52px;
  pointer-events: none;
}
.cn-request .container { position: relative; z-index: 1; }

.cn-request__grid {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}
@media (min-width: 720px) {
  .cn-request__grid { grid-template-columns: 1fr auto; gap: 48px; }
}

.cn-request__copy { max-width: 620px; }

.cn-request__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  color: var(--dh-yellow);
  margin-bottom: var(--space-3);
}
.cn-request h2 {
  font-size: clamp(28px, 3vw, 40px);
  color: #fff;
  margin: 0 0 var(--space-3);
  letter-spacing: -0.02em;
  line-height: 1.12;
  font-weight: 500;
}
.cn-request p {
  font-size: var(--fs-18);
  color: rgba(255,255,255,0.78);
  margin: 0 0 var(--space-5);
  line-height: 1.55;
  max-width: none;
}
.cn-request__buttons { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.cn-request .btn--accent { background: var(--dh-orange); color: #fff; border-color: var(--dh-orange); }
.cn-request .btn--accent:hover { background: #E0801C; border-color: #E0801C; }
.cn-request .btn--accent .arrow { transition: transform var(--dur-base) var(--ease-out); }
.cn-request .btn--accent:hover .arrow { transform: translateX(3px); }

/* Connector-to-hive SVG art (right column) */
.cn-request__art { display: none; }
@media (min-width: 720px) {
  .cn-request__art { display: block; flex-shrink: 0; width: 220px; height: 200px; }
}
.cn-hive-svg { width: 100%; height: 100%; overflow: visible; }
@media (prefers-reduced-motion: reduce) {
  .cn-flow-dot { display: none; }
}

/* Stagger for architecture steps scroll reveal */
.cn-arch__step:nth-child(2) { transition-delay: 80ms; }
.cn-arch__step:nth-child(3) { transition-delay: 160ms; }

@media (prefers-reduced-motion: reduce) {
  .cn-card,
  .cn-filter,
  .cn-spoke__tile { transition: none; }
  .cn-card:active,
  .cn-filter:active { transform: none; }
  .cn-arch__step:nth-child(2),
  .cn-arch__step:nth-child(3) { transition-delay: 0ms; }
}

