﻿/**
 * Phase 8C — Visual refinement round 2
 * Home-style typography, section rhythm, accents, system maps, hub wow.
 */

/* —— Tokens already bumped; reinforce rhythm —— */
.section {
  padding-block: var(--space-section);
  padding-inline: var(--container-pad);
  position: relative;
  isolation: isolate;
  overflow: clip;
}

.section + .section {
  scroll-margin-top: 5.5rem;
}

.service-breadcrumbs {
  position: relative;
  z-index: 2;
  padding-bottom: 1.15rem;
}

.page-hero,
.product-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 7vw, 5.5rem) clamp(4.5rem, 9vw, 6.5rem);
}

.page-hero::after,
.product-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: min(48vw, 28rem);
  height: min(48vw, 28rem);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(49, 112, 178, 0.28), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.page-hero .container,
.product-hero .container,
.page-hero > *,
.product-hero > * {
  position: relative;
  z-index: 1;
}

/* —— Home-style display typography —— */
.page-hero h1,
.product-hero h1,
.service-hub__title,
.service-orient h2,
.digilab-map h2,
.product-split h2,
.section-head h2,
.final-cta h2,
.rm-hero h1,
.ld-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: var(--type-display-tight);
  line-height: var(--type-display-lh);
}

.page-hero h1,
.product-hero h1 {
  font-size: clamp(2.55rem, 6vw, 4.6rem);
  max-width: 15ch;
  margin: 0.65rem 0 1.25rem;
}

.page-hero__lead,
.product-hero__lead {
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  line-height: 1.7;
  max-width: 48ch;
  color: var(--color-text-on-dark-muted);
  margin: 0;
}

.page-hero__actions,
.product-hero__actions {
  margin-top: var(--space-6);
  gap: var(--space-3);
}

.kicker {
  margin: 0 0 var(--space-4);
  letter-spacing: 0.14em;
}

.section-head .kicker,
.service-block .kicker,
.service-punch .kicker,
.section > .container > .kicker:first-child {
  margin-bottom: var(--space-5);
}

/* —— Accent / depth primitives —— */
.accent-line {
  display: block;
  width: 3.5rem;
  height: 2px;
  background: var(--color-yellow);
  margin: var(--space-4) 0;
}

.section--dark,
.section--black {
  background-image:
    radial-gradient(circle at 88% 12%, rgba(49, 112, 178, 0.18), transparent 36%),
    radial-gradient(circle at 8% 88%, rgba(245, 176, 6, 0.07), transparent 28%);
}

.section--paper,
.section--paper2 {
  background-image:
    linear-gradient(180deg, rgba(20, 38, 105, 0.025), transparent 28%);
}

.hub-item,
.product-panel,
.pricing-overview-card,
.path-card,
.capability-item,
.includes-item,
.pricing-plan,
.audience-col,
.related-link {
  position: relative;
  transition: transform var(--motion-base), border-color var(--motion-fast), box-shadow var(--motion-base), background var(--motion-fast);
}

.hub-item:hover,
.product-panel:hover,
.path-card:hover,
.includes-item:not(.includes-item--optional):hover,
.audience-col:hover,
.related-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(20, 38, 105, 0.1);
}

.hub-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15rem;
  bottom: 1.15rem;
  width: 3px;
  border-radius: 2px;
  background: transparent;
  transition: background var(--motion-fast);
}

.hub-item:hover::before {
  background: var(--color-yellow);
}

/* —— Services hub wow —— */
.service-hub {
  overflow: hidden;
  padding-block: clamp(6.5rem, 12vw, 9.5rem);
}

.service-hub__glow {
  position: absolute;
  inset: -10% 40% auto -15%;
  height: 22rem;
  background:
    radial-gradient(circle at 30% 40%, rgba(245, 176, 6, 0.14), transparent 55%),
    radial-gradient(circle at 70% 20%, rgba(49, 112, 178, 0.12), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.service-hub .container {
  position: relative;
  z-index: 1;
}

.service-hub__intro {
  max-width: 58rem;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-7);
  border-bottom: 1px solid rgba(16, 20, 42, 0.1);
}

.service-hub__title {
  font-size: clamp(2.45rem, 6vw, 4.6rem);
  max-width: 16ch;
  margin: 0 0 var(--space-5);
  color: var(--color-navy-deep);
}

.service-hub .service-lead {
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: 54ch;
  color: var(--color-muted-strong);
  margin: 0 0 var(--space-5);
}

.service-hub__path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.35rem;
  margin-top: var(--space-5);
}

.service-hub__path-item {
  display: inline-flex;
  align-items: center;
  min-height: 2.15rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(20, 38, 105, 0.14);
  background: rgba(255, 255, 255, 0.72);
  font: 800 0.68rem/1 var(--font-display);
  letter-spacing: 0.14em;
  color: var(--color-navy);
  text-decoration: none;
  transition: border-color var(--motion-fast), background var(--motion-fast), color var(--motion-fast);
}

.service-hub__path-item:hover,
.service-hub__path-item:focus-visible {
  border-color: var(--color-yellow);
  background: rgba(245, 176, 6, 0.16);
  color: var(--color-ink);
}

.service-hub__path-sep {
  width: 1.1rem;
  height: 1px;
  background: linear-gradient(90deg, rgba(16, 20, 42, 0.2), rgba(245, 176, 6, 0.65));
}

.hub-groups {
  gap: var(--space-9);
  margin-top: 0;
}

.hub-group {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: auto 1fr;
  align-items: start;
  padding: var(--space-6) 0 0;
  border-top: 1px solid rgba(16, 20, 42, 0.08);
}

.hub-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.hub-group__rail {
  width: 3.25rem;
  padding-top: 0.2rem;
}

.hub-group__index {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.9rem;
  background: var(--color-navy-deep);
  color: var(--color-yellow);
  font: 800 0.78rem/1 var(--font-display);
  letter-spacing: 0.08em;
  box-shadow: var(--glow-blue);
}

.hub-group__head {
  grid-column: 2;
  margin: 0;
  max-width: 48ch;
}

.hub-group__key {
  color: var(--color-yellow);
  background: rgba(20, 38, 105, 0.92);
  display: inline-flex;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.16em;
  margin: 0 0 var(--space-3);
}

.hub-group__head h3 {
  font: 800 clamp(1.65rem, 3vw, 2.35rem) / 1.05 var(--font-display);
  letter-spacing: var(--type-display-tight);
  margin: 0 0 var(--space-3);
  color: var(--color-navy-deep);
}

.hub-group__head p:not(.hub-group__key) {
  color: var(--color-muted-strong);
  line-height: 1.6;
  margin: 0;
}

.hub-group__items {
  grid-column: 1 / -1;
  gap: var(--space-4);
  margin-top: var(--space-2);
}

.hub-item {
  padding: var(--space-5);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(243, 241, 234, 0.55));
  border-color: rgba(16, 20, 42, 0.12);
  min-height: 8.5rem;
}

.hub-item strong {
  font: 800 1.12rem / 1.2 var(--font-display);
  letter-spacing: -0.02em;
}

.hub-item span {
  color: var(--color-muted-strong);
  line-height: 1.55;
}

.service-orient {
  overflow: hidden;
  padding-block: clamp(5rem, 10vw, 7.5rem);
}

.service-orient__accent {
  position: absolute;
  inset: 15% auto auto 55%;
  width: 22rem;
  height: 22rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 176, 6, 0.16), transparent 70%);
  pointer-events: none;
}

.service-orient h2 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  max-width: 14ch;
  margin: 0 0 var(--space-4);
}

.service-orient p {
  max-width: 42ch;
  line-height: 1.65;
  color: var(--color-text-on-dark-muted);
}

/* —— Home focus visual (hero — distinct from assembly nodes) —— */
.home-hero__visual.hero-focus {
  overflow: visible;
}

.hero-focus__spot {
  animation: hero-focus-pulse 4.5s ease-in-out infinite;
}

@keyframes hero-focus-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 22px 50px rgba(245, 176, 6, 0.28), 0 0 80px rgba(245, 176, 6, 0.16); }
  50% { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 26px 58px rgba(245, 176, 6, 0.34), 0 0 96px rgba(245, 176, 6, 0.22); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-focus__spot {
    animation: none;
  }
}

/* —— Digilab page map —— */
.digilab-map {
  overflow: hidden;
  padding-block: clamp(6.5rem, 12vw, 9rem);
}

.digilab-map__atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(245, 176, 6, 0.12), transparent 28%),
    radial-gradient(circle at 78% 18%, rgba(49, 112, 178, 0.2), transparent 34%);
  pointer-events: none;
  z-index: 0;
}

.digilab-map .container {
  position: relative;
  z-index: 1;
}

.digilab-map__intro {
  max-width: 42rem;
  margin-bottom: var(--space-7);
}

.digilab-map h2 {
  font-size: clamp(2.3rem, 5.5vw, 4rem);
  max-width: 14ch;
  margin: 0 0 var(--space-4);
}

.digilab-map .product-lead {
  margin: 0;
  font-size: 1.05rem;
}

.digilab-map__stage {
  display: grid;
  place-items: center;
  padding: var(--space-4) 0 var(--space-2);
}

.digilab-map__board {
  width: min(100%, 48rem);
  max-width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
  overflow: visible;
}

.digilab-map__core {
  width: 8rem;
  height: 8rem;
  border-radius: 1.65rem;
  box-shadow: var(--glow-yellow), 0 0 0 12px rgba(245, 176, 6, 0.08), 0 22px 48px rgba(0, 0, 0, 0.35);
}

.digilab-map__node {
  width: min(11rem, 27%);
  padding: 1.05rem 1.1rem;
  background: rgba(10, 16, 42, 0.88);
  border: 1px solid var(--surface-glass-border);
  backdrop-filter: blur(10px);
  gap: 0.45rem;
}

.digilab-map__node strong {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.digilab-map__node span {
  font-size: 0.8rem;
  line-height: 1.45;
  color: #d0d7ea;
}

.digilab-map__orbit {
  stroke: rgba(245, 176, 6, 0.34);
}

.digilab-map__spoke {
  stroke: rgba(255, 255, 255, 0.22);
}

/* —— Home Digilab showcase board —— */
.digilab-board {
  position: relative;
  min-height: clamp(26rem, 48vw, 42rem);
  aspect-ratio: 1 / 1;
  max-width: min(100%, 46rem);
  margin-inline: auto;
  overflow: visible;
}

.digilab-board__rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.digilab-board__orbit {
  stroke: rgba(245, 176, 6, 0.3);
  stroke-width: 0.35;
  stroke-dasharray: 1.1 1.5;
  fill: none;
}

.digilab-board__orbit--soft {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-dasharray: none;
}

.digilab-board__spoke {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 0.28;
}

.digilab-core {
  z-index: 3;
  box-shadow: var(--glow-yellow);
}

.digilab-node {
  left: 50%;
  top: 50%;
  width: min(9.25rem, 32%);
  transform: translate(-50%, -50%);
  z-index: 2;
  background: rgba(8, 14, 40, 0.82);
  border-color: var(--surface-glass-border);
  backdrop-filter: blur(10px);
}

.digilab-copy h2 {
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  letter-spacing: var(--type-display-tight);
  line-height: var(--type-display-lh);
}

.digilab-copy .muted {
  color: var(--color-text-on-dark-muted);
  line-height: 1.65;
  max-width: 42ch;
}

.digilab-stage {
  gap: var(--space-7);
}

/* —— Recard / product depth —— */
.product-split {
  overflow: hidden;
  padding-block: clamp(6rem, 11vw, 8.5rem);
  background-image:
    radial-gradient(circle at 75% 20%, rgba(245, 176, 6, 0.12), transparent 30%),
    radial-gradient(circle at 15% 80%, rgba(49, 112, 178, 0.16), transparent 34%);
}

.product-split h2 {
  font-size: clamp(2.1rem, 4.8vw, 3.5rem);
  max-width: 14ch;
  margin: 0 0 var(--space-4);
}

.product-split .product-lead {
  margin-bottom: var(--space-7);
  color: #d2d9ec;
}

.product-panel {
  padding: var(--space-6);
  gap: var(--space-4);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
    rgba(10, 16, 42, 0.92);
  border-color: var(--surface-glass-border);
  min-height: 22rem;
}

.product-panel--review {
  box-shadow: inset 0 0 0 1px rgba(245, 176, 6, 0.2), var(--glow-yellow);
}

.product-panel h3 {
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  letter-spacing: var(--type-display-tight);
}

.product-panel p {
  color: #d0d7ea;
}

/* —— Contact / pricing rhythm —— */
.contact-section,
.content-contact,
.content-pricing {
  padding-block: clamp(6rem, 11vw, 8.5rem);
}

.contact-section h2,
.content-contact h2,
.content-pricing h2 {
  font: 800 clamp(2.1rem, 4.5vw, 3.25rem) / var(--type-display-lh) var(--font-display);
  letter-spacing: var(--type-display-tight);
}

.content-lead,
.service-lead,
.product-lead--dark {
  color: var(--color-muted-strong);
}

/* —— Floating CTA / sticky safety —— */
.cta-persistent {
  z-index: 80;
}

.site-header {
  z-index: 100;
}

.assembly-sticky,
.ecos-sticky {
  z-index: 1;
}

@media (max-width: 900px) {
  .hub-group {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .hub-group__rail {
    width: auto;
  }

  .hub-group__head,
  .hub-group__items {
    grid-column: 1;
  }

  .hero-focus__noise-tag {
    font-size: 0.55rem;
    padding: 0.35rem 0.55rem;
  }

  .hero-focus__spot {
    width: 10rem;
  }

  .digilab-map__board {
    width: 100%;
    aspect-ratio: auto;
  }

  .digilab-board {
    min-height: 0;
    aspect-ratio: auto;
    display: grid;
    gap: var(--space-3);
  }

  .digilab-board__rings {
    display: none;
  }

  .digilab-node {
    position: static;
    width: 100%;
    transform: none;
  }

  .digilab-core {
    position: static;
    transform: none;
    width: 100%;
    height: auto;
    padding: 1.1rem;
    margin: 0;
  }
}

@media (max-width: 800px) {
  .digilab-map__node {
    position: static;
    width: 100%;
    transform: none;
    text-align: left;
  }

  .digilab-map__rings {
    display: none;
  }

  .digilab-map__core {
    position: static;
    width: 100%;
    height: auto;
    padding: 1.15rem 1rem;
    margin: 0;
  }

  .digilab-map__board {
    display: grid;
    gap: var(--space-3);
    place-items: stretch;
  }
}

@media (max-width: 480px) {
  .service-hub__title,
  .page-hero h1,
  .product-hero h1 {
    font-size: clamp(1.9rem, 9vw, 2.6rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-item,
  .product-panel,
  .path-card,
  .includes-item,
  .pricing-plan,
  .audience-col,
  .related-link {
    transition: none;
  }
  .hub-item:hover,
  .product-panel:hover,
  .path-card:hover,
  .includes-item:not(.includes-item--optional):hover,
  .audience-col:hover,
  .related-link:hover {
    transform: none;
  }
}
