/* solutions.css — /solutions and its sub-pages: the "who it's for" chooser
   and each solution page. Loaded after site.css so it can refine the shared
   explore__/feature/pillar/how/security classes.

   The problem this file solves: the four solution pages and the four chooser
   cards all read the same. The fix is one idea applied consistently — every
   reader gets a persona accent, carried on a [data-sol] scope, from mycve's
   own tokens:

     developers  fizz    (orange)  — ships code, lives in the terminal
     security    grape   (purple)  — governs it, oversight and roles
     startups    patched (green)   — grows fast, momentum
     regulated   viz-1   (blue)    — proves it, institutional trust

   The accent paints the eyebrow, icon tiles, borders, hover glow and a
   distinct corner motif per persona (code lines / radar rings / rising
   stripes / columns) so the pages differ by texture, not colour alone.
   All motion is gated by prefers-reduced-motion. */

/* ---------------------------------------------------------------------------
   Per-persona accent scope. Set on the chooser card (.sol-pick[data-sol]),
   on the body wrapper of each sub-page (.sol[data-sol]) and, through :has(),
   on that page's header (.site-pagehead). */
.sol,
.sol-pick {
  --sol: var(--grape);
  --sol-text: var(--grape);
  --sol-wash: color-mix(in srgb, var(--grape) 14%, transparent);
  --sol-wash-soft: color-mix(in srgb, var(--grape) 8%, transparent);
  --sol-glow: var(--glow-grape);
  --sol-motif: repeating-radial-gradient(circle at 88% 12%, var(--sol-wash) 0 1px, transparent 1px 14px);
}

[data-sol="developers"] {
  --sol: var(--fizz);
  --sol-text: var(--fizz-text);
  --sol-wash: color-mix(in srgb, var(--fizz) 15%, transparent);
  --sol-wash-soft: color-mix(in srgb, var(--fizz) 8%, transparent);
  --sol-glow: var(--glow-fizz);
  /* stacked command lines */
  --sol-motif: repeating-linear-gradient(0deg, var(--sol-wash) 0 2px, transparent 2px 11px);
}
[data-sol="security"] {
  --sol: var(--grape);
  --sol-text: var(--grape);
  --sol-wash: color-mix(in srgb, var(--grape) 15%, transparent);
  --sol-wash-soft: color-mix(in srgb, var(--grape) 8%, transparent);
  --sol-glow: var(--glow-grape);
  /* radar / concentric watch rings */
  --sol-motif: repeating-radial-gradient(circle at 90% 10%, var(--sol-wash) 0 1px, transparent 1px 13px);
}
[data-sol="startups"] {
  --sol: var(--patched);
  --sol-text: var(--patched);
  --sol-wash: color-mix(in srgb, var(--patched) 16%, transparent);
  --sol-wash-soft: color-mix(in srgb, var(--patched) 8%, transparent);
  --sol-glow: color-mix(in srgb, var(--patched) 34%, transparent);
  /* rising diagonal momentum */
  --sol-motif: repeating-linear-gradient(135deg, var(--sol-wash) 0 3px, transparent 3px 12px);
}
[data-sol="regulated"] {
  --sol: var(--viz-1);
  --sol-text: var(--viz-1);
  --sol-wash: color-mix(in srgb, var(--viz-1) 15%, transparent);
  --sol-wash-soft: color-mix(in srgb, var(--viz-1) 8%, transparent);
  --sol-glow: color-mix(in srgb, var(--viz-1) 34%, transparent);
  /* upright columns / ledger rules */
  --sol-motif: repeating-linear-gradient(90deg, var(--sol-wash) 0 2px, transparent 2px 13px);
}

/* ===========================================================================
   The /solutions chooser — four invitations, not four identical boxes.
   =========================================================================== */
.sol-chooser {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--space-5, 20px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sol-chooser > li { display: flex; min-width: 0; }
@media (max-width: 1040px) { .sol-chooser { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); } }
@media (max-width: 560px) { .sol-chooser { grid-template-columns: minmax(0, 1fr); } }

.sol-pick {
  position: relative; flex: 1; overflow: hidden;
  display: grid; grid-template-rows: auto auto 1fr auto; gap: var(--space-3);
  padding: var(--space-6);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, var(--sol-wash-soft), transparent 42%),
    var(--surface);
  color: var(--ink); text-decoration: none;
  transition: transform .35s var(--ease-out), border-color .35s ease, box-shadow .35s ease;
}
/* a persona-coloured spine down the left edge — the strongest "these are
   different" cue, read before any text */
.sol-pick::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--sol); opacity: .85;
}
/* the corner motif: each persona's own texture */
.sol-pick__motif {
  position: absolute; top: 0; right: 0; width: 46%; height: 60%;
  background: var(--sol-motif); opacity: .5; pointer-events: none;
  -webkit-mask: radial-gradient(circle at 100% 0%, #000, transparent 72%);
  mask: radial-gradient(circle at 100% 0%, #000, transparent 72%);
  transition: opacity .35s ease;
}
.sol-pick__top { display: flex; align-items: center; gap: var(--space-3); }
.sol-pick__icon {
  display: inline-flex; width: 46px; height: 46px; flex: none;
  align-items: center; justify-content: center;
  border-radius: 13px; background: var(--sol-wash); color: var(--sol-text);
  font-size: 19px; border: 1px solid color-mix(in srgb, var(--sol) 30%, transparent);
}
.sol-pick__kicker {
  font: 600 12px/16px var(--font-sans); letter-spacing: .06em; text-transform: uppercase;
  color: var(--sol-text);
}
.sol-pick__label { font: 700 20px/26px var(--font-display); letter-spacing: -.01em; margin: 0; }
.sol-pick__summary { font: 400 14px/21px var(--font-sans); color: var(--ink-muted); margin: 0; }
.sol-pick__go {
  display: inline-flex; align-items: center; gap: 8px; align-self: start;
  font: 600 13px/18px var(--font-sans); color: var(--sol-text);
}
.sol-pick__go i { font-size: 12px; transition: transform .2s var(--ease-out); }

/* distinct icon-tile shape per persona, so even in greyscale the four read
   apart: terminal square / watch hexring / growth pill / ledger block */
.sol-pick[data-sol="developers"] .sol-pick__icon { border-radius: 10px; }
.sol-pick[data-sol="security"] .sol-pick__icon { border-radius: 16px; box-shadow: 0 0 0 4px var(--sol-wash-soft); }
.sol-pick[data-sol="startups"] .sol-pick__icon { border-radius: var(--radius-pill); }
.sol-pick[data-sol="regulated"] .sol-pick__icon { border-radius: 8px; border-width: 2px; }

@media (prefers-reduced-motion: no-preference) {
  .sol-pick:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--sol) 55%, var(--border));
    box-shadow: 0 20px 44px -26px var(--sol-glow);
  }
  .sol-pick:hover .sol-pick__go i { transform: translateX(4px); }
  .sol-pick:hover .sol-pick__motif { opacity: .8; }
}
.sol-pick:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.sol-pick:focus-within { border-color: color-mix(in srgb, var(--sol) 55%, var(--border)); }

/* ===========================================================================
   Sub-page header — give each solution page its own first impression.
   The themed wrapper (.sol[data-sol]) is a sibling of .site-pagehead inside
   <main>, so :has() reaches back to paint the header in the persona accent.
   =========================================================================== */
.site-main:has(> .sol[data-sol]) .site-pagehead { position: relative; overflow: hidden; }
.site-main:has(> .sol[data-sol]) .site-pagehead .site-wrap { position: relative; z-index: 1; }

/* the corner motif, large and faint, behind the heading */
.site-main:has(> .sol[data-sol]) .site-pagehead::after {
  content: ""; position: absolute; top: 0; right: 0; width: 38%; height: 150%;
  pointer-events: none; opacity: .55;
  -webkit-mask: radial-gradient(circle at 100% 0%, #000, transparent 70%);
  mask: radial-gradient(circle at 100% 0%, #000, transparent 70%);
}
.site-main:has(> .sol[data-sol="developers"]) .site-pagehead::after { background: var(--sol-motif); }
.site-main:has(> .sol[data-sol="security"]) .site-pagehead::after { background: var(--sol-motif); }
.site-main:has(> .sol[data-sol="startups"]) .site-pagehead::after { background: var(--sol-motif); }
.site-main:has(> .sol[data-sol="regulated"]) .site-pagehead::after { background: var(--sol-motif); }
/* the motif needs the accent vars; set them on the pagehead per page */
.site-main:has(> .sol[data-sol="developers"]) .site-pagehead { --sol: var(--fizz); --sol-wash: color-mix(in srgb, var(--fizz) 15%, transparent); --sol-text: var(--fizz-text); --sol-motif: repeating-linear-gradient(0deg, var(--sol-wash) 0 2px, transparent 2px 11px); }
.site-main:has(> .sol[data-sol="security"]) .site-pagehead { --sol: var(--grape); --sol-wash: color-mix(in srgb, var(--grape) 15%, transparent); --sol-text: var(--grape); --sol-motif: repeating-radial-gradient(circle at 90% 10%, var(--sol-wash) 0 1px, transparent 1px 13px); }
.site-main:has(> .sol[data-sol="startups"]) .site-pagehead { --sol: var(--patched); --sol-wash: color-mix(in srgb, var(--patched) 16%, transparent); --sol-text: var(--patched); --sol-motif: repeating-linear-gradient(135deg, var(--sol-wash) 0 3px, transparent 3px 12px); }
.site-main:has(> .sol[data-sol="regulated"]) .site-pagehead { --sol: var(--viz-1); --sol-wash: color-mix(in srgb, var(--viz-1) 15%, transparent); --sol-text: var(--viz-1); --sol-motif: repeating-linear-gradient(90deg, var(--sol-wash) 0 2px, transparent 2px 13px); }

/* the eyebrow becomes a persona mark: accent text with a short accent tick,
   and the h1 gets a persona accent rule under it */
.site-main:has(> .sol[data-sol]) .site-pagehead .site-eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2); color: var(--sol-text);
}
.site-main:has(> .sol[data-sol]) .site-pagehead .site-eyebrow::before {
  content: ""; width: 20px; height: 2px; border-radius: 2px; background: var(--sol);
}
.site-main:has(> .sol[data-sol]) .site-pagehead .site-h1 { position: relative; padding-bottom: var(--space-4); }
.site-main:has(> .sol[data-sol]) .site-pagehead .site-h1::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--sol), transparent);
}

/* the shared rule `.site-pagehead + .site-section { padding-top }` no longer
   matches, because the wrapper div sits between them — restore the tighter
   top gap on each page's first section. */
.site-pagehead + .sol > .site-section:first-child { padding-top: var(--space-12); }

/* ===========================================================================
   Body sections — recolour the shared blocks to the persona accent so a page
   reads as one identity top to bottom (the blocks otherwise mix fizz + grape
   on every page, which is what made them feel the same).
   =========================================================================== */

/* feature cards (Developers "Details", Security "Visibility", Regulated
   "Frameworks") */
.sol .feature__icon {
  background: var(--sol-wash); color: var(--sol-text);
}
.sol .feature::before {
  background: linear-gradient(135deg, var(--sol), transparent 45%, color-mix(in srgb, var(--sol) 40%, transparent));
}
@media (prefers-reduced-motion: no-preference) {
  .sol .feature:hover { box-shadow: 0 18px 40px -24px var(--sol-glow); }
}
.sol .feature__tags li {
  border-color: color-mix(in srgb, var(--sol) 28%, var(--border));
  color: var(--sol-text);
}

/* pillars (Developers "Where it shows up", Startups "Why startups use it",
   and the shared "For everyone" block) */
.sol .pillar__icon { background: var(--sol-wash); color: var(--sol-text); }
.sol .pillar::after { background: radial-gradient(circle, var(--sol-glow), transparent 70%); }

/* steps / how-track (Security "Rolling it out", Startups "A path") */
.sol .how__num {
  border-color: var(--sol); color: var(--sol-text);
  background: linear-gradient(var(--sol-wash-soft), var(--sol-wash-soft)), var(--bg);
}
.sol .how__icon { color: var(--sol-text); }
@media (max-width: 760px) {
  .sol .how__track::before { background: linear-gradient(180deg, var(--sol), color-mix(in srgb, var(--sol) 20%, transparent)); }
}

/* the checks + card block (Security "Governance", Regulated "Evidence") */
.sol .security__list i { background: var(--sol-wash); color: var(--sol-text); }
.sol .security__card {
  border-color: color-mix(in srgb, var(--sol) 26%, var(--border));
  background:
    radial-gradient(130% 80% at 100% 0%, var(--sol-wash-soft), transparent 55%),
    var(--surface);
}
.sol .security__chips li { border-color: color-mix(in srgb, var(--sol) 30%, var(--border)); }

/* commands (Developers "Get started") — read it as a terminal: an accent
   prompt gutter and a persona-tinted top edge */
.sol[data-sol="developers"] .cmds {
  border-color: color-mix(in srgb, var(--sol) 24%, var(--border));
  box-shadow: inset 3px 0 0 var(--sol);
}
.sol[data-sol="developers"] .cmds__row dt code { color: var(--sol-text); }

/* FAQ (Startups, Regulated) */
.sol .faq__item[open] { border-color: color-mix(in srgb, var(--sol) 30%, var(--border)); }
.sol .faq__icon { color: var(--sol-text); }

/* ===========================================================================
   Reduced motion — keep every persona cue, drop the movement.
   =========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .sol-pick { transition: none; }
  .sol-pick:hover { transform: none; }
  .sol-pick__go i { transition: none; }
  .sol-pick__motif { transition: none; }
}
