/* ==========================================================================
   Service page — the shared template rendered by
   src/components/marketing/ServicePage.tsx.

   Loaded per page rather than folded into live.css: only the commercial pages
   render this markup, and live.css is already on every route.

   No scoped `*` reset here. base.css resets margin/padding/box-sizing globally,
   and a `.svc-x *` rule ties on specificity with .arcrel-lv-btn — losing the
   button its padding, which is exactly what happened when the Relations AI
   sections carried one.
   ========================================================================== */

.svc-hero,
.svc-problem,
.svc-includes,
.svc-proof,
.svc-faq {
  --surface: #0a0a0f;
  --surface-2: #101018;
  --card-border: #1a1a24;
  --purple-light: #8b5cf6;
  --purple-dim: rgba(124, 58, 237, 0.08);
  --purple-border: rgba(139, 92, 246, 0.22);
  --text-primary: #ffffff;
  --text-body: #e8e8f0;
  --text-secondary: #a1a1b5;
  --text-muted: #6a6a77;
  background: var(--surface);
  color: var(--text-body);
  font-family: var(--font-body);
  font-stretch: var(--wdth-body, 100%);
  padding: clamp(4.5rem, 9vw, 7rem) var(--gutter, 24px);
  -webkit-font-smoothing: antialiased;
}

.svc-hero__inner,
.svc-problem__inner,
.svc-includes__inner,
.svc-proof__inner,
.svc-faq__inner {
  max-width: var(--shell, 1180px);
  margin-inline: auto;
}

/* --- Shared type ----------------------------------------------------------- */

.svc-eyebrow {
  font-family: var(--font-display);
  font-stretch: var(--wdth-display, 108%);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple-light);
}

.svc-eyebrow--chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--purple-border);
  border-radius: var(--radius, 4px);
  padding: 0.6em 1.1em;
  letter-spacing: 0.12em;
}

.svc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple-light);
}

.svc-h2 {
  margin-top: 0.9rem;
  font-family: var(--font-display);
  font-stretch: var(--wdth-display, 108%);
  font-weight: 900;
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.06;
  color: var(--text-primary);
  max-width: 22ch;
}

.svc-lede {
  margin-top: 1.1rem;
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 68ch;
}

.svc-accent {
  color: var(--purple-light);
}

/* --- Hero ------------------------------------------------------------------ */

.svc-hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(7rem, 12vw, 10rem);
}

/* A single breathing glow behind the headline.

   This replaced a decorative blueprint grid: hairline gradient lines tiled on
   a fixed pixel cell. It read as a house device because several pages carried
   it, but a ruled grid over marketing copy is a generated-UI signature, not an
   identity — grid overlays belong on surfaces that are actually a canvas, a
   map or a measurement. The glow does the same job (stops the hero being a
   flat rectangle) without drawing a plan over the words.

   The mask is load-bearing. .svc-hero is overflow:hidden, so a glow starting
   above the top edge would be sliced off on a hard horizontal line; fading its
   top means the clip lands in the transparent tail. */
.svc-hero::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: min(780px, 92vw);
  height: 520px;
  background: radial-gradient(
    ellipse at center,
    rgba(97, 25, 172, 0.35),
    rgba(124, 58, 237, 0.1) 45%,
    transparent 70%
  );
  filter: blur(40px);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%);
  mask-image: linear-gradient(180deg, transparent, #000 22%);
  animation: svc-breath 7s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes svc-breath {
  from {
    opacity: 0.7;
    transform: translateX(-50%) scale(1);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1.08);
  }
}

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

.svc-hero__inner {
  position: relative;
  z-index: 1;
}

/* The hero copy is always wrapped so a split hero has a left column to fill.
   display:contents makes the wrapper invisible to layout, so the stacked hero
   every other commercial page renders is unchanged. Pages that pass heroMedia
   get .svc-hero--split, which turns this back into a real box. */
.svc-hero__lead {
  display: contents;
}

.svc-hero__h1 {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  font-family: var(--font-display);
  font-stretch: var(--wdth-display, 108%);
  font-weight: 900;
  font-size: var(--h1-hero, clamp(2.6rem, 6.5vw, 5rem));
  line-height: 1.02;
  text-transform: uppercase;
  color: var(--text-primary);
  max-width: 19ch;
}

.svc-hero__lede {
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 62ch;
}

.svc-hero__actions {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.svc-hero__note {
  margin-top: 1.1rem;
  font-size: var(--step--1);
  color: var(--text-muted);
}

/* --- Stat bar -------------------------------------------------------------- */

.svc-stats {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg, 10px);
  background: var(--surface-2);
  overflow: hidden;
}

.svc-stats__cell {
  padding: clamp(1.5rem, 3vw, 2rem) clamp(1.1rem, 2vw, 1.6rem);
  border-right: 1px solid var(--card-border);
}

.svc-stats__cell:last-child {
  border-right: none;
}

.svc-stats__num {
  font-family: var(--font-display);
  font-stretch: var(--wdth-display, 108%);
  font-weight: 900;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1;
  color: var(--text-primary);
}

.svc-stats__label {
  margin-top: 0.6rem;
  font-size: var(--step--1);
  line-height: 1.45;
  color: var(--text-muted);
}

/* --- Problem --------------------------------------------------------------- */

.svc-problem__p {
  margin-top: 1.1rem;
  font-size: var(--step-0);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 70ch;
}

/* --- Cards ----------------------------------------------------------------- */

.svc-cards {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  list-style: none;
}

/* Four cards in a three-column grid leaves an orphan in the last row. Pages
   with an even card count opt into two-up instead. */
.svc-cards--2 {
  grid-template-columns: repeat(2, 1fr);
}

.svc-card {
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg, 10px);
  background: var(--surface-2);
  padding: clamp(1.4rem, 2.6vw, 1.9rem);
  transition: border-color var(--dur, 340ms) var(--ease-out);
}

.svc-card:hover {
  border-color: var(--purple-border);
}

.svc-card__title {
  font-family: var(--font-display);
  font-stretch: var(--wdth-display, 108%);
  font-weight: 700;
  font-size: var(--step-1);
  line-height: 1.25;
  color: var(--text-primary);
}

.svc-card__body {
  margin-top: 0.55rem;
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--text-muted);
}

/* --- Proof ----------------------------------------------------------------- */

.svc-proof__grid {
  margin-top: clamp(2.25rem, 4.5vw, 3rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  list-style: none;
}

.svc-proof__link {
  display: block;
  height: 100%;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg, 10px);
  background: var(--surface-2);
  overflow: hidden;
  text-decoration: none;
  transition: border-color var(--dur, 340ms) var(--ease-out),
    transform var(--dur, 340ms) var(--ease-out);
}

.svc-proof__link:hover,
.svc-proof__link:focus-visible {
  border-color: var(--purple-border);
  transform: translateY(-2px);
}

.svc-proof__img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.svc-proof__body {
  display: block;
  padding: clamp(1.2rem, 2.4vw, 1.6rem);
}

.svc-proof__vertical {
  display: block;
  font-family: var(--font-display);
  font-stretch: var(--wdth-display, 108%);
  font-weight: 600;
  font-size: var(--step--2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.svc-proof__jump {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--font-display);
  font-stretch: var(--wdth-display, 108%);
  font-weight: 900;
  font-size: var(--step-1);
  line-height: 1.1;
  color: var(--purple-light);
}

.svc-proof__title {
  display: block;
  margin-top: 0.55rem;
  font-size: var(--step--1);
  line-height: 1.5;
  color: var(--text-secondary);
}

.svc-proof__more {
  margin-top: 1.75rem;
}

.svc-proof__more a {
  font-family: var(--font-display);
  font-stretch: var(--wdth-display, 108%);
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--purple-border);
  padding-bottom: 2px;
}

.svc-proof__more a:hover,
.svc-proof__more a:focus-visible {
  border-bottom-color: var(--purple-light);
}

/* --- FAQ ------------------------------------------------------------------- */

.svc-faq__list {
  margin-top: clamp(2rem, 4vw, 2.75rem);
  border-top: 1px solid var(--card-border);
}

.svc-faq__item {
  border-bottom: 1px solid var(--card-border);
}

.svc-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  /* The 44px touch target comes from padding rather than a fixed height, so a
     question that wraps to two lines grows the row instead of overflowing. */
  padding: 1.35rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-stretch: var(--wdth-display, 108%);
  font-weight: 700;
  font-size: var(--step-0);
  line-height: 1.35;
  color: var(--text-primary);
}

.svc-faq__q::-webkit-details-marker {
  display: none;
}

.svc-faq__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius, 4px);
  color: var(--purple-light);
  transition: transform var(--dur, 340ms) var(--ease-out);
}

.svc-faq__item[open] .svc-faq__mark {
  transform: rotate(45deg);
}

.svc-faq__a {
  padding: 0 0 1.5rem;
  max-width: 78ch;
  line-height: 1.7;
  color: var(--text-secondary);
}

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

@media (prefers-reduced-motion: reduce) {
  .svc-card,
  .svc-proof__link,
  .svc-faq__mark {
    transition: none;
  }
}

@media (max-width: 980px) {
  .svc-cards,
  .svc-proof__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .svc-stats {
    grid-template-columns: 1fr 1fr;
  }
  .svc-stats__cell:nth-child(2n) {
    border-right: none;
  }
  .svc-stats__cell:nth-child(-n + 2) {
    border-bottom: 1px solid var(--card-border);
  }
}

@media (max-width: 640px) {
  .svc-cards,
  .svc-proof__grid {
    grid-template-columns: 1fr;
  }
  .svc-hero__h1,
  .svc-h2 {
    max-width: none;
  }
}

/* The problem section splits in two only when a page passes `problemAside`.
   Without it .svc-problem__copy is a plain block and the section is unchanged,
   which is what the other commercial pages render. */
.svc-problem--aside .svc-problem__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 980px) {
  .svc-problem--aside .svc-problem__inner {
    grid-template-columns: 1fr;
  }
}
