/* Shared layout and UI primitives for every Sector page. Section-specific
   rules live beside their sections; tokens and backgrounds have dedicated files. */

/* -------------------------------------------------------------------------- */
/*  Layout primitives                                                          */
/* -------------------------------------------------------------------------- */

.sec-container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.sec-section {
  position: relative;
  padding: clamp(3.25rem, 6vw, 5.75rem) 0;
}

.sec-section--tight {
  padding: clamp(2.25rem, 4vw, 3.5rem) 0;
}

/* -------------------------------------------------------------------------- */
/*  Typography helpers                                                         */
/* -------------------------------------------------------------------------- */

.sec-eyebrow {
  margin: 0 0 0.9rem;
  color: #a990ff;
  font-family: var(--sec-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.sectors-page .sec-title {
  max-width: 17ch;
  margin: 0 0 1rem;
  color: #f8f7ff;
  font-size: clamp(2.45rem, 5vw, 4.8rem);
  font-weight: 820;
  letter-spacing: -0.055em;
  line-height: 0.98;
  text-wrap: balance;
}

/* The FAQ heading contains gradient text whose descenders need slightly more
   room than the intentionally tight line-height used by other sector titles. */
.sectors-page #sector-faq-title {
  line-height: 1.08;
  padding-bottom: 0.06em;
}

/* Prevents short trailing phrases from becoming typographic orphans. */
.sec-nowrap {
  white-space: nowrap;
}

.sec-lede {
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.12rem);
  line-height: 1.7;
  color: var(--sec-text);
}

.sec-text {
  margin: 0 0 1rem;
  line-height: 1.7;
  color: var(--sec-text-muted);
}

.sec-text:last-child {
  margin-bottom: 0;
}

/* Justify long-form copy while preserving visual mockup alignment below. */
.sectors-page main p:not(.sec-eyebrow) {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.sectors-page .sec-hero__visual-slot p,
.sectors-page .sec-features__visual-slot p {
  text-align: left;
  -webkit-hyphens: manual;
  hyphens: manual;
}

.sec-highlight {
  padding-inline: 0.06em;
  margin-inline: -0.06em;
  color: transparent;
  background: var(
    --brand-title-gradient,
    linear-gradient(100deg, #8d5bff 4%, #6f7cff 52%, #57d7c0 108%)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.sec-section-head {
  max-width: 850px;
}

.sec-section-head--center {
  margin-inline: auto;
  text-align: center;
}

.sec-section-head--center .sec-eyebrow {
  text-align: center;
}

.sec-section-head--center .sec-title {
  margin-right: auto;
  margin-left: auto;
}

/* Lets selected headings use the full container width. */
.sec-section-head--wide {
  max-width: none;
}

/* -------------------------------------------------------------------------- */
/*  Checklist (violet ticks)                                                   */
/* -------------------------------------------------------------------------- */

.sec-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.sec-checklist li {
  position: relative;
  padding-left: 2.1rem;
  line-height: 1.5;
  color: var(--sec-text);
}

.sec-checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sec-primary-soft);
  box-shadow: inset 0 0 0 1px var(--sec-primary-ring);
}

.sec-checklist li::after {
  content: '';
  position: absolute;
  left: 11px;
  top: calc(0.05em + 11px);
  width: 7px;
  height: 3.5px;
  margin-left: -3.5px;
  margin-top: -2.6px;
  border-left: 2px solid #c7b2ff;
  border-bottom: 2px solid #c7b2ff;
  transform: rotate(-45deg);
}

/* -------------------------------------------------------------------------- */
/*  Card and icon primitives                                                   */
/* -------------------------------------------------------------------------- */

.sec-card {
  position: relative;
  background: var(--sec-surface);
  border: 1px solid var(--sec-border);
  box-shadow: var(--sec-card-shadow);
  border-radius: var(--sec-radius);
  padding: clamp(1.25rem, 2vw, 1.6rem);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@media (hover: hover) and (pointer: fine) {
  .sectors-page .sec-card--hover:hover {
    translate: 0 -6px;
    border-color: var(--sec-border-hover);
    box-shadow: var(--sec-card-shadow-hover);
  }
}

.sec-card__title {
  margin: 0.9rem 0 0.4rem;
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--sec-ink);
}

.sec-card__body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--sec-text-muted);
}

/* Rounded-square tinted icon chip (default: violet). Tones via [data-tone]. */
.sec-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--sec-radius-sm);
  display: grid;
  place-items: center;
  background: var(--sec-primary-soft);
  color: #b498ff;
  box-shadow: inset 0 0 0 1px var(--sec-primary-ring);
  flex-shrink: 0;
}

.sec-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sec-icon i {
  font-size: 1.15rem;
  line-height: 1;
}

.sec-icon--sm {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}
.sec-icon--sm svg {
  width: 20px;
  height: 20px;
}

.sec-icon[data-tone='violet'] {
  background: rgba(139, 107, 255, 0.16);
  color: #b498ff;
  box-shadow: inset 0 0 0 1px rgba(139, 107, 255, 0.34);
}
.sec-icon[data-tone='pink'] {
  background: rgba(236, 72, 153, 0.16);
  color: #f472b6;
  box-shadow: inset 0 0 0 1px rgba(236, 72, 153, 0.32);
}
.sec-icon[data-tone='blue'] {
  background: rgba(59, 130, 246, 0.16);
  color: #7cb0ff;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.32);
}
.sec-icon[data-tone='cyan'] {
  background: rgba(34, 211, 238, 0.16);
  color: #56d6ea;
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.32);
}
.sec-icon[data-tone='green'] {
  background: rgba(46, 230, 160, 0.16);
  color: #4fe0a8;
  box-shadow: inset 0 0 0 1px rgba(46, 230, 160, 0.32);
}
.sec-icon[data-tone='amber'] {
  background: rgba(255, 171, 82, 0.16);
  color: #ffb968;
  box-shadow: inset 0 0 0 1px rgba(255, 171, 82, 0.32);
}
.sec-icon[data-tone='rose'] {
  background: rgba(255, 92, 133, 0.16);
  color: #ff7d9c;
  box-shadow: inset 0 0 0 1px rgba(255, 92, 133, 0.32);
}
.sec-icon[data-tone='indigo'] {
  background: rgba(99, 102, 241, 0.16);
  color: #8b8dff;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.32);
}

/* -------------------------------------------------------------------------- */
/*  Responsive grids                                                           */
/* -------------------------------------------------------------------------- */

.sec-grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.sec-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.sec-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.sec-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .sec-grid--3,
  .sec-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .sec-grid--2,
  .sec-grid--3,
  .sec-grid--4 {
    grid-template-columns: 1fr;
  }
}

.sec-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}

/* Split layouts need the HomePage voice at a tighter scale so the title does
   not overpower the data or product visual in the opposite column. */
.sectors-page .sec-split .sec-title {
  max-width: 15ch;
  font-size: clamp(2.45rem, 4vw, 3.75rem);
  line-height: 1;
}

@media (max-width: 900px) {
  .sec-split {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* -------------------------------------------------------------------------- */
/*  Lead — centred editorial header sitting above a card grid                  */
/* -------------------------------------------------------------------------- */

.sec-lead {
  position: relative;
  z-index: 0;
  max-width: 1120px;
  margin: 0 auto clamp(2.25rem, 4vw, 3.5rem);
  text-align: center;
  overflow-x: clip;
}

.sec-lead::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(600px, 96%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  z-index: -1;
  background: radial-gradient(closest-side, rgba(139, 107, 255, 0.15), transparent 70%);
  pointer-events: none;
}

.sec-eyebrow--flanked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
}
.sec-eyebrow--flanked::before,
.sec-eyebrow--flanked::after {
  content: '';
  width: clamp(18px, 5vw, 36px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--sec-accent));
}
.sec-eyebrow--flanked::after {
  background: linear-gradient(90deg, var(--sec-accent), transparent);
}

.sec-lead .sec-text {
  max-width: 92ch;
  margin-inline: auto;
  text-wrap: pretty;
}

/* Override the global body-copy justification for centered leads. */
.sectors-page .sec-lead p:not(.sec-eyebrow) {
  text-align: center;
  -webkit-hyphens: manual;
  hyphens: manual;
}

@media (max-width: 760px) {
  .sectors-page .sec-title {
    font-size: clamp(2.35rem, 11vw, 3.5rem);
    line-height: 1;
  }
}

/* -------------------------------------------------------------------------- */
/*  Signal card — icon inline with title, ambient tone light, divided body     */
/* -------------------------------------------------------------------------- */

.sec-card--signal {
  --tone: 139, 107, 255; /* violet default (R,G,B) */
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    'icon title'
    'body body';
  align-items: center;
  column-gap: 0.85rem;
  overflow: hidden;
}

/* Match each signal card's ambient tone to its icon. */
.sec-card--signal:has(.sec-icon[data-tone='pink']) {
  --tone: 236, 72, 153;
}
.sec-card--signal:has(.sec-icon[data-tone='blue']) {
  --tone: 59, 130, 246;
}
.sec-card--signal:has(.sec-icon[data-tone='cyan']) {
  --tone: 34, 211, 238;
}
.sec-card--signal:has(.sec-icon[data-tone='green']) {
  --tone: 46, 230, 160;
}
.sec-card--signal:has(.sec-icon[data-tone='amber']) {
  --tone: 255, 171, 82;
}

.sec-card--signal::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 58%;
  height: 62%;
  background: radial-gradient(115% 115% at 0 0, rgba(var(--tone), 0.15), transparent 68%);
  opacity: 0.85;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .sec-card--signal:hover::before {
    opacity: 1;
  }
  .sectors-page .sec-card--signal:hover {
    border-color: rgba(var(--tone), 0.4);
  }
}

.sec-card--signal .sec-icon {
  grid-area: icon;
  width: 44px;
  height: 44px;
  border-radius: 12px;
}
.sec-card--signal .sec-icon svg {
  width: 21px;
  height: 21px;
}

.sec-card--signal .sec-card__title {
  grid-area: title;
  margin: 0;
}

.sec-card--signal .sec-card__body {
  grid-area: body;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--sec-border);
}

/* -------------------------------------------------------------------------- */
/*  Small pill / chip                                                          */
/* -------------------------------------------------------------------------- */

.sec-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--sec-radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--sec-primary-soft);
  color: #c3acff;
}

/* -------------------------------------------------------------------------- */
/*  Separators (shared components injected into .separatorN-placeholder)       */
/* -------------------------------------------------------------------------- */

.sec-separator {
  margin: clamp(1.25rem, 3vw, 2.25rem) 0;
  position: relative;
  z-index: 3;
}

.sectors-page .sec-section:has(+ .sec-separator) {
  padding-bottom: clamp(1.75rem, 3.25vw, 2.75rem);
}

/* Account for separators injected either across containers or as siblings. */
.sectors-page #sectors-content > div:has(> .sec-separator) + div > .sec-section,
.sectors-page .sec-separator + .sec-section {
  padding-top: clamp(1.75rem, 3.25vw, 2.75rem);
}

.sec-separator .unfold-separator-wrapper {
  --sol-sep-slot: clamp(28px, 3.5vw, 44px);
  margin: 0;
  padding: 0;
  min-height: var(--sol-sep-slot);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative;
  z-index: 3;
  pointer-events: none;
}

.sec-separator .unfold-separator {
  width: min(320px, 70vw);
}

.sec-separator.separator1-placeholder .section-separator {
  margin: 0 auto;
}

.sec-separator.separator4-placeholder .neon-arrow-separator {
  margin: 0;
}

.sec-separator.separator5-placeholder .vertical-cascade-separator-wrapper {
  padding: 0;
  height: 110px;
}

/* -------------------------------------------------------------------------- */
/*  Motion / performance                                                       */
/* -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .sec-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(19, 26, 46, 0.82);
  }

  /* Hero and closing CTAs replace the obstructive floating CTA on mobile. */
  .sectors-page #liquid-glass-button {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sectors-page * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
