/* ============================================================================
   QVD configured components
   Markup: templates/partials/components.html
   Foundations and atoms remain in brand.css and design-system.css.
   ========================================================================== */

/* ---- Shared media ------------------------------------------------------- */
.cmp-media {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border: 1px solid #dce6f0;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(145deg, #0a223d, #0d4d81);
  background-size: 2rem 2rem, 2rem 2rem, auto;
}

.cmp-media--1x1 { aspect-ratio: 1; }
.cmp-media--4x3 { aspect-ratio: 4 / 3; }
.cmp-media--16x9 { aspect-ratio: 16 / 9; }
.cmp-media--16x10 { aspect-ratio: 16 / 10; }
.cmp-media--contained { background-color: var(--c-subtle); }
.cmp-media img { width: 100%; height: 100%; object-fit: cover; }

/* Decorative stand-in shown until a real image exists. Purely ornamental and
   aria-hidden — it carries no label, so it never duplicates nearby copy.
   Markup: _placeholder() in partials/components.html. Every motif shares the
   navy panel, the soft blue halo, the 2px line weight and the .ph-* palette
   below, so the set reads as one family even though each panel differs.
   Motifs: signal (default) · route · bars · shield · handset · grid.
   signal, route and grid carry a slow loop; the rest are still. */
.cmp-media__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.3);
  background: radial-gradient(circle at 50% 50%, rgba(112,190,255,0.24), rgba(112,190,255,0.05) 34%, transparent 50%);
}

.cmp-media__empty--route { background: radial-gradient(ellipse 62% 42% at 50% 50%, rgba(112,190,255,0.22), transparent 72%); }
.cmp-media__empty--bars { background: radial-gradient(ellipse 50% 44% at 58% 62%, rgba(112,190,255,0.2), transparent 72%); }
.cmp-media__empty--handset { background: radial-gradient(ellipse 34% 52% at 50% 50%, rgba(112,190,255,0.24), transparent 72%); }

.cmp-media__empty .ph {
  width: clamp(11rem, 70%, 24rem);
  height: auto;
  overflow: visible;
}

/* Shared palette. Faint/dim/node are structure; lit is the accent. */
.ph-faint { stroke: rgba(255,255,255,0.1); }
.ph-dim { stroke: rgba(255,255,255,0.28); }
.ph-node { fill: rgba(9,34,62,0.92); stroke: rgba(255,255,255,0.45); }
.ph-lit { stroke: #a9d8ff; }
.ph-lit-dot { fill: #a9d8ff; stroke: none; }

/* signal */
.ph-ring { stroke: rgba(255,255,255,0.3); }
.ph-ring--2 { stroke: rgba(255,255,255,0.18); }
.ph-ring--3 { stroke: rgba(255,255,255,0.1); }
.ph-core { fill: #dbeeff; stroke: none; filter: drop-shadow(0 0 0.4rem rgba(140,205,255,0.7)); }
.ph-ripple {
  stroke: rgba(169,216,255,0.8);
  transform-box: fill-box;
  transform-origin: center;
  animation: ph-ripple 3.4s cubic-bezier(0.2, 0.6, 0.4, 1) infinite;
}
.ph-ripple--late { animation-delay: 1.7s; }

@keyframes ph-ripple {
  from { transform: scale(0.6); opacity: 0.9; }
  to { transform: scale(5); opacity: 0; }
}

/* route: dotted track plus a bright dash that travels its length. The track
   is 132 units long; dasharray keeps one dash on screen and the offset walks
   it from just before the first node to just past the last. */
.ph-track { stroke: rgba(255,255,255,0.18); stroke-dasharray: 3 6; }
.ph-pulse {
  stroke: #a9d8ff;
  stroke-width: 3;
  stroke-dasharray: 18 200;
  stroke-dashoffset: 18;
  filter: drop-shadow(0 0 0.35rem rgba(140,205,255,0.8));
  animation: ph-pulse 2.8s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

@keyframes ph-pulse { to { stroke-dashoffset: -150; } }

/* bars */
.ph-bar { fill: rgba(255,255,255,0.14); stroke: rgba(255,255,255,0.3); }
.ph-bar--lit { fill: rgba(112,190,255,0.55); stroke: #a9d8ff; filter: drop-shadow(0 0 0.5rem rgba(140,205,255,0.45)); }

/* handset */
.ph-avatar { fill: rgba(112,190,255,0.25); stroke: #a9d8ff; }
.ph-badge { fill: #2f7fe8; stroke: rgba(219,238,255,0.9); stroke-width: 1.5; }
.ph-badge-check { stroke: #fff; stroke-width: 1.5; }
.ph-pill { fill: rgba(112,190,255,0.5); stroke: #a9d8ff; }

/* grid: a highlight sweeps the 12 tiles in document order, one lit at a time,
   like a monitor stepping through a number inventory. */
.ph-tile {
  fill: rgba(255,255,255,0.06);
  stroke: rgba(255,255,255,0.22);
  animation: ph-scan 4.2s linear infinite;
}
.ph-tile:nth-of-type(2) { animation-delay: 0.35s; }
.ph-tile:nth-of-type(3) { animation-delay: 0.7s; }
.ph-tile:nth-of-type(4) { animation-delay: 1.05s; }
.ph-tile:nth-of-type(5) { animation-delay: 1.4s; }
.ph-tile:nth-of-type(6) { animation-delay: 1.75s; }
.ph-tile:nth-of-type(7) { animation-delay: 2.1s; }
.ph-tile:nth-of-type(8) { animation-delay: 2.45s; }
.ph-tile:nth-of-type(9) { animation-delay: 2.8s; }
.ph-tile:nth-of-type(10) { animation-delay: 3.15s; }
.ph-tile:nth-of-type(11) { animation-delay: 3.5s; }
.ph-tile:nth-of-type(12) { animation-delay: 3.85s; }

@keyframes ph-scan {
  0%, 20%, 100% { fill: rgba(255,255,255,0.06); stroke: rgba(255,255,255,0.22); }
  5% { fill: rgba(112,190,255,0.55); stroke: #a9d8ff; }
}

@media (prefers-reduced-motion: reduce) {
  .ph-ripple, .ph-pulse, .ph-tile { animation: none; }
  .ph-ripple { display: none; }
  .ph-pulse { stroke-dashoffset: -78; }
  .ph-tile:nth-of-type(6) { fill: rgba(112,190,255,0.55); stroke: #a9d8ff; }
}

/* ---- Configured hero ---------------------------------------------------- */
.cmp-hero {
  overflow: hidden;
  padding-block: clamp(var(--space-20), 9vw, var(--space-32));
  color: #b8c7d9;
  background: linear-gradient(135deg, #071421, #0b2748);
}

.cmp-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
  align-items: center;
  gap: clamp(var(--space-12), 7vw, var(--space-24));
}

.cmp-hero--centered .cmp-hero__grid { display: block; max-width: 52rem; text-align: center; }
.cmp-hero--centered .cmp-hero__copy { margin-inline: auto; }
.cmp-hero__copy { max-width: 44rem; }
.cmp-hero__copy h1, .cmp-hero__copy h2 { color: #fff; }
.cmp-hero__copy .lede { color: #b4c4d7; }
.cmp-hero__accent { color: #75baff; }
.cmp-hero--media-left .cmp-hero__copy { order: 2; }
.cmp-hero--media-left .cmp-hero__support { order: 1; }

.cmp-hero__support {
  min-width: 0;
  padding: var(--space-10);
  border: 1px solid rgba(138,193,246,0.2);
  border-radius: var(--radius-lg);
  background: rgba(7,25,46,0.72);
}

.cmp-hero__support .cmp-media { border: 0; }
.cmp-hero__metric { display: block; color: #acd7ff; font-size: clamp(4rem, 9vw, 7rem); font-weight: 700; line-height: 0.9; letter-spacing: -0.06em; }
.cmp-hero__metric-label, .cmp-hero__support-title { display: block; margin-top: var(--space-4); color: #fff; font-weight: 700; }
.cmp-hero__support p { color: #9fb2c8; }
.cmp-hero__support blockquote { margin: 0; color: #eef6ff; font-size: 1.25rem; line-height: 1.7; }
.cmp-hero__support cite { display: block; margin-top: var(--space-6); color: #92a9c2; font-size: 0.8125rem; font-style: normal; font-weight: 700; }
.cmp-hero__support ul { display: grid; gap: var(--space-3); margin: var(--space-6) 0 0; padding: 0; list-style: none; }
.cmp-hero__support li { padding-top: var(--space-3); border-top: 1px solid rgba(255,255,255,0.1); color: #d6e3f0; }

.cmp-hero__support--form {
  background: #fff;
  border-color: transparent;
  color: #1a2733;
  box-shadow: 0 24px 60px rgba(2,12,26,0.35);
}
.cmp-hero__support--form .cmp-hero__support-title { color: #0b2748; font-size: 1.25rem; }
.cmp-hero__support--form p { color: #47586b; }
.cmp-hero__support--form li { border-top-color: rgba(10,34,61,0.12); color: #33475b; }
.cmp-hero__form { margin-top: var(--space-6); }
.cmp-hero__form .hs-form-field label { color: #0b2748; font-weight: 600; }
.cmp-hero__form .hs-button { width: 100%; }

/* ---- Consolidated card and grid ---------------------------------------- */
.cmp-card-grid {
  display: grid;
  grid-template-columns: repeat(var(--cmp-columns, 3), minmax(0, 1fr));
  gap: var(--space-5);
}

.cmp-card-grid--2 { --cmp-columns: 2; }
.cmp-card-grid--3 { --cmp-columns: 3; }
.cmp-card-grid--4 { --cmp-columns: 4; }
.cmp-card-grid--auto { grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }

.cmp-content-card {
  overflow: hidden;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: #fff;
}

.cmp-content-card > .cmp-media { border: 0; border-bottom: 1px solid var(--c-border); border-radius: 0; }
.cmp-content-card__body { padding: var(--space-6); }
.cmp-content-card__body h2, .cmp-content-card__body h3, .cmp-content-card__body h4 { margin-bottom: var(--space-3); }
.cmp-content-card__body p { color: var(--c-muted); }
.cmp-content-card__body .bullets { margin-bottom: var(--space-5); }

.cmp-content-card__icon {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: var(--space-5);
  color: var(--c-primary);
  border-radius: var(--radius);
  background: rgba(0,100,224,0.08);
  font-weight: 800;
}

.cmp-content-card--plain { border: 0; background: transparent; }
.cmp-content-card--plain .cmp-content-card__body { padding: 0; }
.cmp-content-card--subtle { background: var(--c-subtle); }
.cmp-content-card--dark { border-color: rgba(255,255,255,0.12); background: #0a1c30; }
.cmp-content-card--dark h2, .cmp-content-card--dark h3, .cmp-content-card--dark h4 { color: #fff; }
.cmp-content-card--dark .cmp-content-card__body p { color: #a8b8ca; }
.cmp-content-card--highlight { border-color: #9cc9f5; box-shadow: 0 1rem 2.5rem rgba(11,83,157,0.1); }

/* ---- Split content layouts --------------------------------------------- */
.cmp-media-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(var(--space-12), 7vw, var(--space-24));
}

.cmp-media-split--media-right .cmp-media-split__media { order: 2; }
.cmp-media-split--media-right .cmp-media-split__content { order: 1; }
.cmp-media-split__content { max-width: 36rem; }
.cmp-split-content-group { display: grid; gap: clamp(var(--space-20), 10vw, var(--space-32)); }

/* ---- Logo/trust cloud --------------------------------------------------- */
.cmp-logo-cloud {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: var(--space-4);
}

.cmp-logo-cloud__item {
  display: grid;
  place-items: center;
  min-height: 5.5rem;
  padding: var(--space-4);
  color: #526276;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 700;
  text-align: center;
}

.cmp-logo-cloud__item img { max-width: 8rem; max-height: 2.5rem; }
.cmp-logo-cloud__item small { display: block; color: var(--c-muted); font-size: 0.6875rem; font-weight: 500; }
.cmp-logo-cloud--trust .cmp-logo-cloud__item { border-color: #cfe0f2; background: #f7faff; }
.cmp-logo-cloud--monochrome img { filter: grayscale(1); opacity: 0.68; }

/* ---- Stats and quote ---------------------------------------------------- */
.cmp-stats-band { padding: var(--space-10); border-radius: var(--radius-lg); }
.cmp-stats-band--dark { background: #091a2d; }
.cmp-stats-band--light { border: 1px solid var(--c-border); background: var(--c-subtle); }
.cmp-stats-band .stat-grid { grid-template-columns: repeat(var(--cmp-columns, 3), minmax(0, 1fr)); }
.cmp-stats-band--2 { --cmp-columns: 2; }
.cmp-stats-band--3 { --cmp-columns: 3; }
.cmp-stats-band--4 { --cmp-columns: 4; }
.cmp-stats-band--dark .stat { color: #b8c5d6; border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.035); }
.cmp-stats-band--dark .stat__value { color: #78baff; }
.cmp-stats-band .stat small { display: block; margin-top: var(--space-4); color: var(--c-muted); font-size: 0.6875rem; }

.cmp-quote {
  display: grid;
  gap: var(--space-8);
  margin: 0;
  padding: var(--space-8);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: #fff;
}

.cmp-quote blockquote { margin: 0; color: var(--c-ink); font-size: clamp(1.125rem, 2vw, 1.5rem); line-height: 1.65; }
.cmp-quote figcaption { display: flex; flex-wrap: wrap; gap: var(--space-2); color: var(--c-muted); font-size: 0.8125rem; }
.cmp-quote figcaption strong { color: var(--c-ink); }
.cmp-quote--editorial { border-left: 3px solid var(--c-primary); border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.cmp-quote--testimonial { background: var(--c-subtle); }
.cmp-quote--featured { padding: clamp(var(--space-8), 5vw, var(--space-12)); border-color: #1c4f83; background: #091d33; }
.cmp-quote--featured blockquote, .cmp-quote--featured figcaption strong { color: #fff; }
.cmp-quote--featured figcaption { color: #9db0c5; }

/* ---- Conversion --------------------------------------------------------- */
.cmp-cta-band { padding: clamp(var(--space-12), 7vw, var(--space-20)); border-radius: var(--radius-lg); text-align: center; }
.cmp-cta-band--dark { color: #b7c8da; background: linear-gradient(135deg, #081727, #0d3159); }
.cmp-cta-band--dark h2 { color: #fff; }
.cmp-cta-band--light { border: 1px solid var(--c-border); background: var(--c-subtle); }
.cmp-cta-band .cta-row { justify-content: center; margin-bottom: 0; }

/* ---- People grid / person card ------------------------------------------ */
.cmp-people-grid {
  display: grid;
  grid-template-columns: repeat(var(--cmp-columns, 3), minmax(0, 1fr));
  gap: var(--space-8);
}

.cmp-people-grid--2 { --cmp-columns: 2; }
.cmp-people-grid--3 { --cmp-columns: 3; }
.cmp-people-grid--4 { --cmp-columns: 4; }
.cmp-people-grid--auto { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }

.cmp-person-card {
  display: flex;
  flex-direction: column;
  padding: var(--space-8);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: #fff;
}

.cmp-person-card__avatar { width: 5rem; height: 5rem; margin-bottom: var(--space-4); border-radius: 50%; object-fit: cover; }
.cmp-person-card__name-row { display: flex; align-items: center; gap: var(--space-2); }
.cmp-person-card h3, .cmp-person-card h2, .cmp-person-card h4 { margin: 0; }
.cmp-person-card__linkedin { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 50%; color: var(--c-muted); background: var(--c-border, #e5e9ef); flex-shrink: 0; transition: color 0.15s ease, background 0.15s ease; }
.cmp-person-card__linkedin:hover { color: #fff; background: #0a66c2; }
.cmp-person-card__role { display: block; margin-top: var(--space-1); color: var(--c-primary); font-size: 0.95rem; font-weight: 600; }
.cmp-person-card__tag { display: block; margin-top: var(--space-2); color: var(--c-muted); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.cmp-person-card p { margin-top: var(--space-3); color: var(--c-muted); }
.cmp-person-card__meeting { display: inline-block; margin-top: var(--space-4); color: var(--c-primary); font-size: 0.9rem; font-weight: 700; text-decoration: none; }

/* ---- QVD-specific trust and education ---------------------------------- */
.cmp-compliance-badges { display: grid; grid-template-columns: repeat(var(--cmp-columns, 3), minmax(0, 1fr)); gap: var(--space-4); }
.cmp-compliance-badges--2 { --cmp-columns: 2; }
.cmp-compliance-badges--3 { --cmp-columns: 3; }
.cmp-compliance-badges--4 { --cmp-columns: 4; }
.cmp-compliance-badge { display: grid; grid-template-columns: auto 1fr; gap: var(--space-5); padding: var(--space-6); border: 1px solid #cfdfef; border-radius: var(--radius-lg); background: #f8fbff; }
.cmp-compliance-badge__mark { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; color: #fff; border-radius: 50%; background: #0b68cb; font-size: 0.75rem; font-weight: 800; text-align: center; }
.cmp-compliance-badge h3 { margin-bottom: var(--space-2); }
.cmp-compliance-badge p { margin-bottom: var(--space-3); color: var(--c-muted); font-size: 0.9rem; }
.cmp-compliance-badge a { font-size: 0.8125rem; font-weight: 700; text-decoration: none; }

.cmp-definition { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-5); padding: var(--space-5) var(--space-6); border-left: 3px solid var(--c-primary); background: #f3f8fe; }
.cmp-definition__term { color: #075fc5; font-weight: 800; }
.cmp-definition p { margin: 0; color: #526276; }
.cmp-definition a { font-size: 0.8125rem; font-weight: 700; white-space: nowrap; text-decoration: none; }

.cmp-fit-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.cmp-fit-checklist__col { padding: var(--space-6); border: 1px solid var(--c-border); border-radius: var(--radius-lg); }
.cmp-fit-checklist__col--fit { border-color: #9cc9f5; background: #f3f8fe; }
.cmp-fit-checklist__col--watch { background: var(--c-subtle); }
.cmp-fit-checklist__label { display: block; margin-bottom: var(--space-4); font-weight: 800; }
.cmp-fit-checklist__col--fit .cmp-fit-checklist__label { color: #075fc5; }
.cmp-fit-checklist__col--watch .cmp-fit-checklist__label { color: var(--c-muted); }
.cmp-fit-checklist ul { display: grid; gap: var(--space-3); margin: 0; padding: 0; list-style: none; }
.cmp-fit-checklist li { position: relative; padding-left: 1.75rem; color: var(--c-ink); }
.cmp-fit-checklist__col--fit li::before { content: "\2713"; position: absolute; left: 0; color: #0b68cb; font-weight: 800; }
.cmp-fit-checklist__col--watch li::before { content: "\2013"; position: absolute; left: 0; color: var(--c-muted); font-weight: 800; }

.cmp-announcement { display: flex; align-items: center; justify-content: center; gap: var(--space-4); min-height: 2.75rem; padding: 0.55rem var(--gutter); color: #dcecff; background: #0a2a4b; font-size: 0.8125rem; }
.cmp-announcement__label { padding: 0.25rem 0.5rem; border-radius: 999px; background: #1479df; color: #fff; font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.cmp-announcement__message { font-weight: 600; }
.cmp-announcement a { color: #fff; font-weight: 700; text-decoration: none; }

.cmp-faq { display: flex; flex-direction: column; gap: var(--space-3); max-width: 52rem; }
.cmp-faq__item { border: 1px solid var(--c-border); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); background: #fff; }
.cmp-faq__item summary { cursor: pointer; list-style: none; }
.cmp-faq__item summary::-webkit-details-marker { display: none; }
.cmp-faq__item summary h3, .cmp-faq__item summary h4 { display: inline; margin: 0; font-size: 1rem; }
.cmp-faq__item summary::after { content: "+"; float: right; color: var(--c-primary); font-weight: 800; }
.cmp-faq__item[open] summary::after { content: "\2212"; }
.cmp-faq__item p { margin: var(--space-3) 0 0; color: var(--c-muted); }
@media (max-width: 56rem) {
  .cmp-hero__grid, .cmp-media-split { grid-template-columns: 1fr; }
  .cmp-hero--media-left .cmp-hero__copy, .cmp-hero--media-left .cmp-hero__support { order: initial; }
  .cmp-media-split--mobile-text-first .cmp-media-split__content { order: 1; }
  .cmp-media-split--mobile-text-first .cmp-media-split__media { order: 2; }
  .cmp-media-split--mobile-media-first .cmp-media-split__media { order: 1; }
  .cmp-media-split--mobile-media-first .cmp-media-split__content { order: 2; }
  .cmp-card-grid, .cmp-people-grid, .cmp-stats-band .stat-grid, .cmp-compliance-badges, .cmp-fit-checklist { grid-template-columns: 1fr; }
  .cmp-definition { grid-template-columns: 1fr; }
  .cmp-definition a { white-space: normal; }
  .cmp-announcement { align-items: flex-start; flex-wrap: wrap; justify-content: flex-start; }
}

@media (max-width: 36rem) {
  .cmp-hero__support, .cmp-content-card__body, .cmp-stats-band, .cmp-quote, .cmp-compliance-badge { padding: var(--space-6); }
}
