/* =========================================================================
   Pareeksa — services.css
   Shared components for the interactive landing additions and the 14 service
   detail pages: flow diagrams, feature chips, advantage cards, spec panels,
   page heroes, breadcrumbs, related grids. Loads on top of styles.css.
   Same tokens, same Quiet-Precision restraint. 280px → 4K. Light + dark.
   ========================================================================= */

/* ---- icons8 line icons, self-hosted, recoloured via mask ---------------- */
/* Alpha channel of the PNG is the shape; background paints it in currentColor,
   so every icon inherits brand colour and dark mode for free. */
.i8 {
  display: inline-block; width: 1.4em; height: 1.4em; flex: none;
  background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
          mask: var(--i) center / contain no-repeat;
}

/* ---- Breadcrumb --------------------------------------------------------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  font-family: "Geist Mono", monospace; font-size: var(--fs-caption);
  color: var(--muted); letter-spacing: .02em; }
.crumbs a { color: var(--muted); transition: color .15s var(--ease); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { opacity: .5; }
.crumbs [aria-current] { color: var(--ink); }

/* ---- Page hero (detail pages) ------------------------------------------ */
.page-hero { position: relative; overflow: hidden; isolation: isolate;
  border-bottom: 1px solid var(--hairline); background: var(--surface); }
.page-hero .wrap { padding-block: clamp(2rem, 1.2rem + 4vw, 4.5rem); }
.page-hero-mark { position: absolute; z-index: 0; color: var(--hero-mark);
  height: clamp(280px, 40vw, 720px); width: auto; aspect-ratio: 1152 / 1488;
  right: clamp(-160px, -6vw, -40px); top: 50%; transform: translateY(-50%);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to left, #000 40%, transparent 95%);
          mask-image: linear-gradient(to left, #000 40%, transparent 95%); }
@media (max-width: 900px) { .page-hero-mark { display: none; } }
.page-hero-inner { position: relative; z-index: 1; max-width: 54rem; }
.page-hero-top { display: flex; align-items: center; gap: 1rem; margin-top: 1.4rem; }
.page-hero-ico { width: clamp(46px, 5vw, 62px); height: clamp(46px, 5vw, 62px);
  flex: none; display: grid; place-items: center; border-radius: 14px;
  border: 1px solid var(--hairline); background: var(--bg); color: var(--accent); }
.page-hero-ico svg { width: 55%; height: 55%; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.page-hero-serial { font-family: "Geist Mono", monospace; font-size: var(--fs-small);
  color: var(--muted); letter-spacing: .04em; }
.page-hero h1 { font-size: var(--fs-h1); line-height: 1; letter-spacing: -0.04em;
  font-weight: 600; margin-top: 1.1rem; max-width: 18ch; }
.page-hero .page-lead { font-size: var(--fs-lead); color: var(--muted);
  margin-top: 1.3rem; max-width: 46rem; line-height: 1.5; }
.page-hero .hero-actions { margin-top: 2rem; }

/* Section titles inside detail pages */
.svc-section { padding-block: clamp(2.6rem, 1.6rem + 4vw, 5.5rem); }
.svc-head { max-width: 44rem; margin-bottom: clamp(1.6rem, 1rem + 2vw, 2.8rem); }
.svc-head .eyebrow { display: block; }
.svc-head h2 { font-size: var(--fs-h2); line-height: 1.05; letter-spacing: -0.025em;
  font-weight: 600; margin-top: .6rem; }
.svc-head p { color: var(--muted); font-size: var(--fs-lead); margin-top: .9rem;
  line-height: 1.5; text-wrap: pretty; }

/* =========================================================================
   FLOW TIMELINE — scroll-driven pipeline (landing + every detail page)
   A spine that fills as you scroll, dots that light up in sequence, and cards
   that settle in as the fill reaches them. Left spine on narrow screens; a
   centred, alternating spine on wider ones. One component, used everywhere.
   ========================================================================= */
.flow { --dot: 42px; --spine: 2px;
  list-style: none; margin: clamp(1rem, .6rem + 1vw, 2rem) auto 0; padding: 0;
  position: relative; display: block; max-width: 62rem; }

/* The spine: a hairline track (::before) with an accent fill (::after) whose
   height follows --progress, set from scroll position by script.js. */
.flow::before, .flow::after { content: ""; position: absolute; top: 0; width: var(--spine);
  border-radius: 2px; }
.flow::before { bottom: 0; background: var(--hairline); }
.flow::after { height: calc(var(--progress, 0) * 100%); background: var(--accent);
  transition: height .1s linear;
  box-shadow: 0 0 14px -2px color-mix(in srgb, var(--accent) 55%, transparent); }

.flow-step { position: relative; }
.flow-node { display: flex; flex-direction: column; gap: .5rem; text-align: left;
  width: 100%; box-sizing: border-box; padding: clamp(1rem, .8rem + .6vw, 1.4rem);
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg);
  transition: opacity .55s var(--ease), transform .55s var(--ease),
              border-color .25s var(--ease), box-shadow .25s var(--ease); }
.section-alt .flow-node { background: var(--bg); }
.flow-node:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline));
  box-shadow: var(--card-hover-shadow); }
.flow-top { display: flex; align-items: center; gap: .5rem; }
.flow-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border-radius: 11px; border: 1px solid var(--hairline); background: var(--bg); color: var(--accent);
  transition: background-color .35s var(--ease), border-color .35s var(--ease); }
.section-alt .flow-ico { background: var(--surface); }
.flow-ico .i8 { width: 22px; height: 22px; }
.flow-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.flow-num { display: none; }
.flow-node h3 { font-size: var(--fs-h4); font-weight: 600; letter-spacing: -0.015em;
  line-height: 1.2; text-wrap: balance; }
.flow-node p { color: var(--muted); font-size: var(--fs-small); line-height: 1.55; text-wrap: pretty; }

/* The dot: rides the spine, carries the step number, lights up when reached */
.flow-num-dot { position: absolute; z-index: 2; display: grid; place-items: center;
  width: var(--dot); height: var(--dot); border-radius: 50%;
  background: var(--surface); border: 2px solid var(--hairline); color: var(--muted);
  font-family: "Geist Mono", monospace; font-size: .78rem; font-weight: 500;
  transition: background-color .35s var(--ease), border-color .35s var(--ease),
              color .35s var(--ease), box-shadow .35s var(--ease), transform .35s var(--ease); }
.section-alt .flow-num-dot { background: var(--bg); }
.flow-step.on .flow-num-dot { background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 14%, transparent); }
.flow-step.on .flow-ico { background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 40%, var(--hairline)); }
.section-alt .flow-step.on .flow-ico { background: color-mix(in srgb, var(--accent) 14%, var(--bg)); }

/* Narrow: one spine on the left */
.flow::before, .flow::after { left: calc(var(--dot) / 2 - var(--spine) / 2); }
.flow-step { padding: 0 0 clamp(1.4rem, 1rem + 1.5vw, 2.4rem) calc(var(--dot) + 1.2rem); }
.flow-step:last-child { padding-bottom: 0; }
.flow-num-dot { left: 0; top: 0; }

/* Wide: centred spine, cards alternate sides */
@media (min-width: 768px) {
  .flow { --dot: 46px; }
  .flow::before, .flow::after { left: calc(50% - var(--spine) / 2); }
  .flow-step { width: 50%; padding: 0 3rem clamp(2rem, 1rem + 2vw, 3.2rem) 0; box-sizing: border-box; }
  .flow-step:nth-child(even) { margin-left: 50%; padding: 0 0 clamp(2rem, 1rem + 2vw, 3.2rem) 3rem; }
  .flow-step:nth-child(odd) { text-align: right; }
  .flow-step:nth-child(odd) .flow-node { text-align: left; }
  .flow-num-dot { top: 0; }
  .flow-step:nth-child(odd) .flow-num-dot { right: calc(-1 * var(--dot) / 2); left: auto; }
  .flow-step:nth-child(even) .flow-num-dot { left: calc(-1 * var(--dot) / 2); }
}

/* Entrance: cards wait dimmed + nudged, then settle when their dot is reached */
.js .flow-node { opacity: .16; transform: translateY(12px); }
.js .flow-step.on .flow-node { opacity: 1; transform: none; }
@media (min-width: 768px) {
  .js .flow-step:nth-child(odd) .flow-node { transform: translateX(16px); }
  .js .flow-step:nth-child(even) .flow-node { transform: translateX(-16px); }
  .js .flow-step.on .flow-node { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .js .flow-node { opacity: 1; transform: none; transition: none; }
  .flow::after { transition: none; }
  .flow-num-dot, .flow-ico { transition: none; }
}

/* =========================================================================
   FEATURE CHIPS — dense "what's inside" grid, icons8 line icons
   ========================================================================= */
.chips { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(clamp(200px, 30%, 260px), 1fr));
  gap: clamp(.5rem, .3rem + .6vw, .8rem); }
.chip { display: flex; align-items: center; gap: .7rem; min-width: 0;
  padding: .8rem 1rem; border: 1px solid var(--hairline); border-radius: var(--r-md);
  background: var(--surface); font-size: var(--fs-small); font-weight: 450;
  transition: border-color .2s var(--ease), transform .2s var(--ease),
              background-color .2s var(--ease); }
.section-alt .chip { background: var(--bg); }
.chip:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline));
  transform: translateY(-2px); }
.chip .i8 { width: 20px; height: 20px; color: var(--accent); }
.chip span { min-width: 0; overflow-wrap: anywhere; }

/* =========================================================================
   ADVANTAGE CARDS — benefit → outcome
   ========================================================================= */
.adv-grid { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(220px, 45%, 300px), 1fr));
  gap: clamp(.7rem, .4rem + .9vw, 1.1rem); }
.adv { padding: clamp(1.1rem, .9rem + .8vw, 1.6rem); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); background: var(--surface); display: flex;
  flex-direction: column; gap: .5rem;
  transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.section-alt .adv { background: var(--bg); }
.adv:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--hairline));
  transform: translateY(-3px); box-shadow: var(--card-hover-shadow); }
.adv-ico { width: 42px; height: 42px; flex: none; display: grid; place-items: center;
  border-radius: 11px; background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent); margin-bottom: .3rem; }
.section-alt .adv-ico { background: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
.adv-ico .i8 { width: 22px; height: 22px; }
.adv h3 { font-size: var(--fs-h4); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.adv p { color: var(--muted); font-size: var(--fs-small); line-height: 1.55; text-wrap: pretty; }

/* =========================================================================
   SPEC PANEL — enterprise capabilities + quality assurance, two columns
   ========================================================================= */
.spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, .5rem + 2vw, 2.5rem); }
@media (max-width: 720px) { .spec-grid { grid-template-columns: 1fr; } }
.spec { border: 1px solid var(--hairline); border-radius: var(--r-lg);
  background: var(--surface); padding: clamp(1.3rem, 1rem + 1.2vw, 2rem); }
.section-alt .spec { background: var(--bg); }
.spec-h { display: flex; align-items: center; gap: .6rem; font-family: "Geist Mono", monospace;
  font-size: var(--fs-caption); text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); font-weight: 500; margin-bottom: 1.1rem; }
.spec-h .i8 { width: 16px; height: 16px; color: var(--accent); }
.spec ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.spec li { padding: .7rem 0; border-top: 1px solid var(--hairline); font-size: var(--fs-small);
  display: flex; align-items: flex-start; gap: .6rem; line-height: 1.45; }
.spec li:first-child { border-top: 0; padding-top: 0; }
.spec li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: .5em;
  border-radius: 50%; background: var(--accent); }

/* =========================================================================
   RELATED SERVICES + CTA BAND
   ========================================================================= */
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.7rem, .4rem + 1vw, 1.2rem); }
@media (max-width: 820px) { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .related-grid { grid-template-columns: 1fr; } }
.related-card { display: flex; flex-direction: column; gap: .5rem; min-width: 0;
  padding: clamp(1.1rem, .9rem + .7vw, 1.5rem); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); background: var(--surface); color: inherit;
  transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.section-alt .related-card { background: var(--bg); }
.related-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--hairline));
  transform: translateY(-3px); box-shadow: var(--card-hover-shadow); }
.related-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border-radius: 11px; border: 1px solid var(--hairline); color: var(--accent);
  background: var(--bg); }
.section-alt .related-ico { background: var(--surface); }
.related-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.related-card h3 { font-size: var(--fs-h4); font-weight: 600; letter-spacing: -0.01em;
  line-height: 1.2; margin-top: .3rem; display: flex; align-items: center; gap: .4rem; }
.related-card p { color: var(--muted); font-size: var(--fs-small); line-height: 1.5;
  text-wrap: pretty; }
.related-card .go { margin-top: auto; font-family: "Geist Mono", monospace;
  font-size: var(--fs-caption); color: var(--accent); display: inline-flex;
  align-items: center; gap: .35rem; padding-top: .6rem; }
.related-card .go svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.related-card:hover .go svg { transform: translateX(3px); }

/* =========================================================================
   Landing: make service cards + capability rows link to detail pages
   (stretched-link pattern — whole card clickable, one real <a> for a11y)
   ========================================================================= */
.card { position: relative; }
.card-go { margin-top: auto; padding-top: 1.1rem; font-family: "Geist Mono", monospace;
  font-size: var(--fs-caption); color: var(--accent); display: inline-flex;
  align-items: center; gap: .4rem; letter-spacing: .02em; }
.card-go svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.card:hover .card-go svg { transform: translateX(3px); }
.card-link { color: inherit; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-link:focus-visible { outline: none; }
.card:has(.card-link:focus-visible) { outline: 2px solid var(--ring); outline-offset: 2px; }

.cap-item { position: relative; }
.cap-item .cap-item-head h4 { margin: 0; }
.cap-link { color: inherit; transition: color .15s var(--ease); }
.cap-item:hover .cap-link { color: var(--accent); }
.cap-link::after { content: ""; position: absolute; inset: 0; }
.cap-link:focus-visible { outline: none; }
.cap-item:has(.cap-link:focus-visible) { outline: 2px solid var(--ring); outline-offset: 4px; border-radius: 6px; }
.cap-go { color: var(--muted); flex: none; width: 17px; height: 17px; opacity: .55;
  transition: transform .2s var(--ease), color .15s var(--ease), opacity .15s var(--ease); }
.cap-item:hover .cap-go { color: var(--accent); opacity: 1; transform: translateX(3px); }
.cap-item-head { gap: .55rem; }

/* =========================================================================
   LANDING "How it works" interactive pipeline (tabbed) scaffolding
   ========================================================================= */
.pipe-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: clamp(1.4rem, 1rem + 1.5vw, 2.2rem);
  border-bottom: 1px solid var(--hairline); padding-bottom: 0; }
.pipe-tab { appearance: none; background: transparent; border: 0; cursor: pointer;
  font: inherit; font-size: var(--fs-small); font-weight: 500; color: var(--muted);
  padding: .7rem 1rem; border-radius: var(--r-md) var(--r-md) 0 0; position: relative;
  display: inline-flex; align-items: center; gap: .5rem;
  transition: color .15s var(--ease), background-color .15s var(--ease); }
.pipe-tab .i8 { width: 18px; height: 18px; }
.pipe-tab:hover { color: var(--ink); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.pipe-tab[aria-selected="true"] { color: var(--accent); }
.pipe-tab[aria-selected="true"]::after { content: ""; position: absolute; left: .6rem; right: .6rem;
  bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.pipe-tab-label-full { }
@media (max-width: 520px) { .pipe-tab { padding: .6rem .7rem; font-size: var(--fs-caption); } }
.pipeline-wrap { margin-top: clamp(1.6rem, 1rem + 2vw, 2.6rem); }
.pipeline-note { margin-top: 1.4rem; font-size: var(--fs-small); color: var(--muted);
  display: flex; align-items: center; gap: .5rem; font-family: "Geist Mono", monospace;
  letter-spacing: .01em; }
.pipeline-note .i8 { width: 16px; height: 16px; color: var(--accent); }
