/* Loaded without blocking the first paint (Layout.astro): everything here styles content below the hero. */
/* Visual round 2 (VISUAL_SPEC.md, 05.11.2026): domain logo, client band, tech-stack ecosystem, table visuals,
   article restructuring (card lists, timeline steps, lead lines). Same tokens, lines and timing as the reference. */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Domain logo: beam glow breathes like the hero beam ---------- */
.logo-svg circle { transform-box: fill-box; transform-origin: center; }
.logo-svg circle { transition: transform 0.6s var(--ease-out-quart), opacity 0.6s var(--ease-out-quart); }
a:hover > .logo .logo-svg circle, a:focus-visible > .logo .logo-svg circle { transform: scale(1.25); }
@keyframes kcGlow { 0%, 100% { opacity: 0.7; transform: scale(0.88); } 50% { opacity: 1; transform: scale(1.12); } }

/* ---------- Client band (section_logo3 slot) ---------- */
.clients { padding-top: var(--pad-m); padding-bottom: 1.5rem; background: var(--c-bg); }
.clients-caption { text-align: center; margin-bottom: 2rem; line-height: 1.2; }
.clients-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: 4.5rem; align-items: center; }
.clients-grid .client { grid-row: 1; grid-column: var(--col); display: flex; align-items: center; justify-content: center; height: 100%; padding-inline: 1rem;
  color: var(--c-text); opacity: 0; animation: kcClientCycle var(--cycle) var(--ease-out-quart) var(--delay) infinite both; will-change: opacity, transform; }
.clients-paused .clients-grid .client, .clients-paused .marquee-track { animation-play-state: paused; }
.is-off .stack-pulse, .is-off .stack-hub-ring, .is-off .ba-pulse { animation-play-state: paused; }
.client-logo { display: block; height: calc(var(--logo-h) * var(--logo-balance)); aspect-ratio: var(--logo-ratio); max-width: 100%; background: currentColor;
  -webkit-mask: none center / contain no-repeat; mask: none center / contain no-repeat; }
.clients.is-near .client-logo, html:not(.js-motion) .client-logo { -webkit-mask-image: var(--logo-src); mask-image: var(--logo-src); }
.clients-marquee { display: none; }
/* 4 groups of 5 (19 approved logos): each group is visible in one quarter of the cycle */
@keyframes kcClientCycle { 0% { opacity: 0; transform: translate3d(0, 14px, 0); } 3% { opacity: 1; transform: none; } 21.5% { opacity: 1; transform: none; } 25%, 100% { opacity: 0; transform: translate3d(0, -14px, 0); } }
@media (max-width: 767px) {
  .clients { --logo-h: 22px !important; padding-top: var(--pad-s); }
  .clients-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem 1.75rem; height: auto; }
  .clients-grid .client { animation: none; will-change: auto; opacity: 1; width: auto; height: 2.5rem; padding: 0; }
  html.js-motion .clients.has-marquee .clients-grid { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  html.js-motion .clients.has-marquee .clients-marquee { display: grid; gap: 1rem; overflow: hidden; margin-inline: calc(-1 * var(--gutter)); }
  .clients .marquee-track { gap: 2.25rem; padding-right: 2.25rem; }
  .client-m .client-logo { width: calc(var(--logo-h) * var(--logo-balance) * var(--logo-ratio)); }
  .client-m { display: flex; align-items: center; height: 2.9rem; flex: none; color: var(--c-text); }
}
html.reduced-motion .clients-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem 2.5rem; height: auto; }
html.reduced-motion .clients-grid .client { animation: none; opacity: 1; width: auto; height: 3rem; padding: 0; }

/* ---------- Tech-stack ecosystem ---------- */
.stack { background: var(--c-bg); padding-block: var(--pad-l); position: relative; }
.stack-head { margin-bottom: 4.5rem; }
.stack-head .caption { margin-bottom: 1rem; }
.stack-lead { margin-top: 1.5rem; color: var(--c-muted-aa); }
.stack-stage { position: relative; display: grid; grid-template-columns: 300fr 600fr 300fr; grid-template-rows: repeat(var(--rows), 6.25rem); max-width: 75rem; margin-inline: auto; }
.stack-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.stack-line { fill: none; stroke: rgba(154, 200, 255, 0.4); stroke-width: 1; }
.stack-pulse { fill: none; stroke: #e7f2ff; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 0.07 0.93; stroke-dashoffset: 1; opacity: 0; }
.stack-lines.is-drawn .stack-pulse, html:not(.js-motion):not(.reduced-motion) .stack-pulse { animation: kcPulse 3.6s cubic-bezier(0.45, 0, 0.55, 1) infinite; animation-delay: calc(var(--i) * 0.45s + 1s); }
@keyframes kcPulse { 0% { stroke-dashoffset: 1; opacity: 0; } 12% { opacity: 1; } 85% { opacity: 1; } 100% { stroke-dashoffset: 0.07; opacity: 0; } }
html.reduced-motion .stack-pulse { animation: none; opacity: 0; }
.stack-col { list-style: none; margin: 0; padding: 0; grid-row: 1 / -1; display: grid; grid-template-rows: repeat(var(--n), 6.25rem); align-content: center; }
.stack-col-l { grid-column: 1; }
.stack-col-r { grid-column: 3; }
.stack-tile { position: relative; margin-block: 0.7rem; display: flex; align-items: center; gap: 1rem; padding: 0 1.25rem; border-radius: 8px; overflow: hidden;
  background: linear-gradient(180deg, rgba(190, 215, 255, 0.06), rgba(190, 215, 255, 0.015)); border: 1px solid var(--c-border-subtle); color: var(--c-text);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.stack-tile .shine-top { position: absolute; left: 10%; right: 10%; top: 0; height: 1px; background: var(--g-shine); filter: blur(0.6px); }
.stack-tile:hover { transform: scale(1.04); border-color: var(--c-accent); box-shadow: 0 0 16px rgba(154, 200, 255, 0.55); }
.stack-logo { flex: none; display: block; height: calc(22px * var(--logo-balance)); aspect-ratio: var(--logo-ratio); max-width: 8.5rem; background: currentColor;
  -webkit-mask: var(--logo-src) left center / contain no-repeat; mask: var(--logo-src) left center / contain no-repeat; }
.stack-tile:not(.is-mark) .stack-name { display: none; }
.stack-name { margin-left: auto; font-size: 0.7rem; white-space: nowrap; }
.stack-hub { grid-column: 2; grid-row: 1 / -1; align-self: center; justify-self: center; position: relative; width: 10rem; height: 10rem; display: grid; place-items: center; }
.stack-hub-ring { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 55%, rgba(154, 200, 255, 0.9) 78%, #ffffff 84%, transparent 92%);
  -webkit-mask: radial-gradient(circle, transparent calc(50% - 1.5px), #000 calc(50% - 1px)); mask: radial-gradient(circle, transparent calc(50% - 1.5px), #000 calc(50% - 1px));
  animation: borderTurn 2.5s linear infinite; }
.stack-hub-core { position: relative; width: 8rem; height: 8rem; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 30%, rgba(154, 200, 255, 0.2), rgba(14, 18, 22, 0.96) 68%); border: 1px solid rgba(154, 200, 255, 0.3);
  box-shadow: 0 0 48px rgba(96, 162, 241, 0.28), inset 0 0 24px rgba(154, 200, 255, 0.12); }
.stack-hub-core svg { width: 3.25rem; height: 3.25rem; }
.stack-hub-label { position: absolute; top: calc(100% + 0.9rem); white-space: nowrap; color: var(--c-accent-soft); }
html.reduced-motion .stack-hub-ring { animation: none; }
@media (max-width: 1199px) and (min-width: 768px) { .stack-tile:not(.is-mark) .stack-name { display: none; } .stack-logo { max-width: 100%; } }
@media (max-width: 767px) {
  .stack-head { margin-bottom: 3rem; }
  .stack-stage { grid-template-columns: 1fr 1fr; grid-template-rows: none; gap: 0.75rem; }
  .stack-lines { display: none; }
  .stack-hub { grid-column: 1 / -1; grid-row: auto; order: -1; width: 8rem; height: 8rem; margin: 0 auto 3.5rem; }
  .stack-hub-core { width: 6.5rem; height: 6.5rem; }
  .stack-hub-label { top: calc(100% + 0.6rem); }
  .stack-col { grid-column: 1 / -1; grid-row: auto; grid-template-columns: 1fr 1fr; grid-template-rows: none; gap: 0.75rem; }
  .stack-tile { margin: 0; flex-direction: column; justify-content: center; gap: 0.6rem; height: 5.25rem; padding: 0 0.75rem; }
  .stack-logo { -webkit-mask-position: center; mask-position: center; max-width: 100%; }
  .stack-name { margin: 0; font-size: 0.65rem; }
}

/* Inline variant inside an article section (tools named in the section) */
.stack-inline { padding-block: 2.5rem 0.5rem; background: none; }
.stack-inline .stack-stage { grid-template-rows: repeat(var(--rows), 5.25rem); }
.stack-inline .stack-col { grid-template-rows: repeat(var(--n), 5.25rem); }
.stack-inline .stack-tile { margin-block: 0.55rem; }
.stack-inline .stack-tile:not(.is-mark) .stack-name { display: none; }
.stack-inline .stack-hub { width: 8rem; height: 8rem; }
.stack-inline .stack-hub-core { width: 6.5rem; height: 6.5rem; }
.stack-inline .stack-hub-core svg { width: 2.6rem; height: 2.6rem; }
@media (max-width: 767px) { .stack-inline .stack-tile { height: 4.5rem; } .stack-inline .stack-col { grid-template-rows: none; } }

/* ---------- Tables as visuals ---------- */
.tbl-viz { --hl-bg: rgba(154, 200, 255, 0.07); }
.tbl-beam { position: absolute; left: 0; top: 0; width: 100%; height: 2px; overflow: visible; z-index: 1; pointer-events: none; }
.tbl-beam path { fill: none; stroke: #c3deff; stroke-width: 1.5; }
.tbl-viz tbody tr { transition: background-color 0.25s var(--ease); }
.tbl-viz tbody tr:hover { background: rgba(154, 200, 255, 0.04); }
.tbl-viz tbody tr:hover th[scope="row"] { -webkit-text-fill-color: var(--c-white); }
.tbl-viz .is-hl { background: var(--hl-bg); }
.tbl-viz thead .is-hl { color: var(--c-accent); box-shadow: inset 0 2px 0 var(--c-accent); }
.tbl-viz td .mk { display: inline-grid; place-items: center; width: 1.25rem; height: 1.25rem; margin-right: 0.5rem; border-radius: 50%; vertical-align: -0.2em; }
.tbl-viz td.mk-yes .mk { color: var(--c-bg); background: var(--c-accent); box-shadow: 0 0 10px rgba(154, 200, 255, 0.7); }
.tbl-viz td.mk-no .mk { color: var(--c-muted-aa); border: 1px solid rgba(145, 145, 145, 0.6); }
.tbl-viz td.mk-partial .mk { color: var(--c-accent-soft); border: 1px dashed rgba(154, 200, 255, 0.7); }
.tbl-viz td.mk-no { color: var(--c-muted-aa); }

/* column focus chips */
.tbl-chipbar { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 1.1rem 1.5rem 0.25rem; }
.tbl-chip { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.25rem; padding: 0.35rem 0.9rem; border-radius: 999px; border: 1px solid var(--c-border-subtle);
  background: transparent; color: var(--c-muted-aa); cursor: pointer; text-align: left; transition: color 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.tbl-chip:hover { color: var(--c-text); border-color: var(--c-border); }
.tbl-chip[aria-pressed="true"] { color: var(--c-text); border-color: var(--c-accent); box-shadow: 0 0 12px rgba(154, 200, 255, 0.35); }
.tbl-chip:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.chip-dot { width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--c-accent); box-shadow: 0 0 8px var(--c-accent); }
@media (min-width: 768px) {
  .tbl-viz.is-focused [data-c]:not([data-c="0"]) { transition: opacity 0.3s var(--ease); }
  .tbl-viz.is-focused[data-focus="1"] [data-c]:not([data-c="0"]):not([data-c="1"]),
  .tbl-viz.is-focused[data-focus="2"] [data-c]:not([data-c="0"]):not([data-c="2"]),
  .tbl-viz.is-focused[data-focus="3"] [data-c]:not([data-c="0"]):not([data-c="3"]),
  .tbl-viz.is-focused[data-focus="4"] [data-c]:not([data-c="0"]):not([data-c="4"]),
  .tbl-viz.is-focused[data-focus="5"] [data-c]:not([data-c="0"]):not([data-c="5"]) { opacity: 0.38; }
}
@media (max-width: 767px) {
  .tbl.tbl-chips .tbl-scroll { overflow: visible; }
  .tbl.tbl-chips table, .tbl.tbl-chips.tbl-wide table { min-width: 0; width: 100%; table-layout: fixed; }
  .tbl-chips[data-focus="1"] [data-c]:not([data-c="0"]):not([data-c="1"]),
  .tbl-chips[data-focus="2"] [data-c]:not([data-c="0"]):not([data-c="2"]),
  .tbl-chips[data-focus="3"] [data-c]:not([data-c="0"]):not([data-c="3"]),
  .tbl-chips[data-focus="4"] [data-c]:not([data-c="0"]):not([data-c="4"]),
  .tbl-chips[data-focus="5"] [data-c]:not([data-c="0"]):not([data-c="5"]) { display: none; }
  .tbl-chips th[data-c="0"] { width: 40%; min-width: 0; }
  .tbl-chips th, .tbl-chips td { overflow-wrap: anywhere; hyphens: auto; }
  .tbl-chipbar { padding: 1rem 1rem 0.25rem; }
}

/* before -> after */
.tbl-ba-head { display: flex; align-items: center; gap: 1rem; padding: 1.4rem 1.5rem 0.4rem; }
.ba-pill { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.85rem; border-radius: 999px; white-space: nowrap; }
.ba-before { color: var(--c-muted-aa); border: 1px solid rgba(145, 145, 145, 0.5); }
.ba-after { color: var(--c-text); border: 1px solid var(--c-accent); box-shadow: 0 0 14px rgba(154, 200, 255, 0.4); }
.ba-track { position: relative; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(145, 145, 145, 0.4), var(--c-accent)); }
.ba-pulse { position: absolute; top: -2px; left: 0; width: 2.5rem; height: 5px; border-radius: 3px; background: radial-gradient(closest-side, #ffffff, rgba(154, 200, 255, 0)); }
html.js-motion .ba-pulse { animation: kcTravel 2.8s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
@keyframes kcTravel { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(calc(var(--track, 30rem) - 2.5rem)); opacity: 0; } }
html.reduced-motion .ba-pulse { animation: none; opacity: 0; }
.tbl-ba td.ba-b { color: var(--c-muted-aa); }
.tbl-ba td.ba-a { color: var(--c-white); }
.ba-arrow { display: inline-grid; place-items: center; margin-right: 0.45rem; color: var(--c-accent); vertical-align: -0.15em; }
@media (max-width: 767px) { .tbl-ba-head { padding: 1.1rem 1rem 0.3rem; gap: 0.6rem; } .ba-pill { padding: 0.35rem 0.6rem; } }

/* ---------- Article restructuring ---------- */
.rt-lead { position: relative; margin: 0 0 1.1rem; padding-left: 1.25rem; font-size: 1.3rem; line-height: 1.45; font-weight: 500;
  background-image: var(--g-h4); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: var(--c-accent-soft); }
.rt-lead a { -webkit-text-fill-color: var(--c-accent-soft); }
.rt-lead-beam { position: absolute; left: 0; top: 0.2em; bottom: 0.2em; width: 2px; border-radius: 2px; background: var(--g-glow-bar); box-shadow: 0 0 10px rgba(154, 200, 255, 0.6);
  transform-origin: top; }
html.js-motion .rt-lead:not(.is-in) .rt-lead-beam { transform: scaleY(0); }
.rt-lead-beam { transition: transform 1.1s var(--ease-out-quart) 0.2s; }
@media (max-width: 767px) { .rt-lead { font-size: 1.15rem; } }

.rt-cards { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.rt-card { position: relative; overflow: hidden; padding: 1.25rem 1.25rem 1.35rem; border-radius: 8px; border: 1px solid var(--c-border-subtle);
  background: linear-gradient(180deg, rgba(190, 215, 255, 0.06), rgba(190, 215, 255, 0.01)); transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.rt-card .shine-top { position: absolute; left: 12%; right: 12%; top: 0; height: 1px; background: var(--g-shine); filter: blur(0.6px); }
.rt-card:hover { transform: translateY(-2px); border-color: var(--c-border); box-shadow: 0 0 16px rgba(154, 200, 255, 0.25); }
.rt-card-ico { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; margin-bottom: 0.9rem; border-radius: 6px; color: var(--c-accent);
  background: rgba(154, 200, 255, 0.08); border: 1px solid rgba(154, 200, 255, 0.25); }
.rt-card strong { display: block; margin-bottom: 0.3rem; color: var(--c-white); font-weight: 500; }
.rt-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 767px) { .rt-cards, .rt-cards-3 { grid-template-columns: 1fr; } }

/* ordered lists as a scroll-linked timeline */
.rt-steps[data-scroll-progress] { position: relative; }
.rt-steps[data-scroll-progress]::before, .rt-steps[data-scroll-progress]::after { content: ''; position: absolute; left: 0.95rem; top: 0.6rem; bottom: 0.6rem; width: 1px; }
.rt-steps[data-scroll-progress]::before { background: rgba(145, 145, 145, 0.35); }
.rt-steps[data-scroll-progress]::after { background: var(--g-glow-bar); box-shadow: 0 0 8px rgba(154, 200, 255, 0.7); transform-origin: top; transform: scaleY(var(--progress, 1)); }
.rt-steps[data-scroll-progress] > li[data-step]::before { transition: background-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.rt-steps[data-scroll-progress] > li[data-step][data-active]::before { box-shadow: 0 0 12px rgba(154, 200, 255, 0.7); border-color: var(--c-accent); color: var(--c-white); }
.rt-steps[data-scroll-progress] > li { border-bottom: 0; padding: 0.85rem 0; }
.rt-steps[data-scroll-progress] { border-top: 0; }
.rt-steps[data-scroll-progress] > li::before { position: relative; z-index: 1; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; padding: 0; border-radius: 50%;
  border: 1px solid rgba(154, 200, 255, 0.35); background: var(--c-bg); font-size: 0.7rem; color: var(--c-accent); }

/* Render work for the logo band and the ecosystem is skipped until they come near (keeps LCP of the hero light). */
.clients { content-visibility: auto; contain-intrinsic-size: auto 15rem; }
.stack:not(.stack-inline) { content-visibility: auto; contain-intrinsic-size: auto 50rem; }

/* Final visual round: stack tools without logo file as text tiles */
.stack-word { font-size: 1.125rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; color: var(--c-text); }
