/* /agentic-erp/ · TagFlow, the agentic ERP, as one page (test build, 2026-10-17).
   Saife: one page in one colour, the hero's plate world all the way down. The nine layer
   pages become chapters of TagFlow; every chapter wears the hero violet, the glass layer
   tiles are gone, the sparkles run the whole page and the headlines fill as you read.
   Loaded LAST, after the layer and page stylesheets, so these rules win ties. */

body.erp {
  /* the one hue: every component that read its layer colour now reads this */
  --lh: #9a6bff; --lh-ink: #6d4bc0; --lc: #9a6bff;
  --neon: #9a6bff; --glow: #9a6bff; --neon-soft: #cdb9ff;
  --ground: #0a0814;
  --panel-v: #141026;
  --edge-v2: #2a2147;
  --lilac: #c8b8f5;
  --dim: #3a3157;
  background: var(--ground);
}
body.erp .t-dark { background-color: var(--ground); --lc: #9a6bff; }
body.erp .t-light { --lc: #6d4bc0; }
body.erp ::selection { background: #9a6bff; color: #0a0814; }
body.erp .hero__floor { background: linear-gradient(180deg, transparent, var(--ground)); }
body.erp .hero__haze { background: radial-gradient(38% 30% at 68% 62%, rgb(123 88 197 / .32), transparent 70%), radial-gradient(30% 24% at 72% 70%, rgb(154 107 255 / .14), transparent 70%); }

/* ---------------------------------------------------------------- header: flat chapter links */
.erp .bar__nav { gap: clamp(14px, 2vw, 28px); }
.erp .bar__nav a { white-space: nowrap; }

/* ---------------------------------------------------------------- the sparkles: one canvas over the whole page */
.erp-dust { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 40; pointer-events: none; }

/* ---------------------------------------------------------------- chapter bands (the layer hero, without the tile) */
.erp .erpch { height: 88svh; min-height: 580px; background: var(--ground); }
.erp .erpch .lh__haze { background:
    radial-gradient(30% 34% at 50% 44%, rgb(154 107 255 / .30), transparent 72%),
    radial-gradient(60% 40% at 55% 88%, rgb(154 107 255 / .12), transparent 70%); }
.erp .erpch .lh__scrim { background: radial-gradient(70% 62% at 14% 84%, rgb(10 8 20 / .86), rgb(10 8 20 / .5) 45%, transparent 74%); }
.erp .erpch::before, .erp .erpch::after { content: ""; position: absolute; left: 0; right: 0; z-index: 4; pointer-events: none; }
.erp .erpch::before { top: 0; height: 26vh; background: linear-gradient(180deg, var(--ground), rgb(10 8 20 / .55) 40%, transparent); }
.erp .erpch::after { bottom: 0; height: 30vh; background: linear-gradient(0deg, var(--ground), rgb(10 8 20 / .5) 40%, transparent); }
.erp .erpch .lh__copy { max-width: min(760px, 56vw); }
.erp .erpch .lh__h { font-size: clamp(40px, min(5.4vw, 8.4svh), 84px); }
.erp .erpch .lh__h em { color: #f4f3ef; }
/* every chapter carries the hero's button (Saife 2026-10-18: "have a book a demo button on every page") */
.erp .erpch__cta { margin: 28px 0 0; }
.erp .erp-cta { margin: 24px 0 0; position: relative; z-index: 2; }
.erp #ways .erp-cta { text-align: center; }
.erp .erpch__k { display: block; margin: 0 0 18px; font: 500 15px/1.3 var(--sc-font-text); color: var(--lilac); letter-spacing: 0; }
.erp .erpch .lh__copy > * { animation: none; opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .8s var(--ease); }
.erp .erpch.is-in .lh__copy > * { opacity: 1; transform: none; }
.erp .erpch.is-in .lh__copy > :nth-child(2) { transition-delay: .08s; }
.erp .erpch.is-in .lh__copy > :nth-child(3) { transition-delay: .16s; }
.erp .erpch.is-off * { animation-play-state: paused; }

/* ---------------------------------------------------------------- the text effect: words fill as you read */
[data-fill] .fw { color: var(--dim); transition: color .45s var(--ease), text-shadow .6s var(--ease); }
[data-fill] .fw.on { color: inherit; }
[data-fill] .fw.lit { text-shadow: 0 0 22px rgb(154 107 255 / .55); }
[data-fill] .hl .fw.on { color: var(--hl); }
.erp .t-dark .hl { color: #e3dbff; }

/* ---------------------------------------------------------------- shared section frame for the new parts */
.erp-sec { position: relative; padding-block: clamp(84px, 9vw, 132px); }
.erp-wrap { width: min(1440px, 100%); margin-inline: auto; padding-inline: clamp(20px, 3.4vw, 44px); }
.erp-h { font-family: var(--sc-font-display); font-weight: 600; letter-spacing: -.035em; line-height: 1.06; font-size: clamp(32px, 4.2vw, 60px); margin: 0; max-width: 18ch; text-wrap: balance; color: #f4f3ef; }
.erp-lede { margin: 22px 0 0; max-width: 56ch; color: #bdb6d0; font-size: clamp(16px, 1.25vw, 18.5px); line-height: 1.62; text-wrap: pretty; }

/* ---------------------------------------------------------------- 1 · the worked example uses the Data layer's .st3 cards (erp/data.css) */
.erp #example .erp-lede { margin-bottom: clamp(32px, 4vw, 52px); }
.erp #example .st3__run + p { margin-top: 12px; }
/* Saife 2026-10-17: "make this smaller". The three cards scale down as one object above the one-column layout,
   centred in the copy's margins, the same way the Workspace window does (critique log: a mock is a framed shot). */
@media (min-width: 981px) { .erp #example .st3__list { zoom: .8; max-width: 1400px; margin-inline: auto; } }

/* ---------------------------------------------------------------- reused components: one violet world */
/* the plug-in hub was a glass tile; it is the octopus now */
.erp .pg__hub img { object-fit: contain; padding: 14%; filter: drop-shadow(0 6px 18px rgb(154 107 255 / .55)); }
/* the octopus stands lit at rest (critique log 2026-10-10: a diagram built dark reads as switched off) */
.erp .kl__k img { object-fit: contain; filter: drop-shadow(0 0 10px rgb(154 107 255 / .6)) !important; }
/* the kernel diagram was built for a light ground; it now sits on ink */
.erp #one-kernel { padding-block: clamp(84px, 9vw, 132px); }
/* the old per-layer section photos are not loaded: a quiet violet wash instead */
.erp .lhaze { background-image: radial-gradient(60% 50% at 80% 20%, rgb(123 88 197 / .14), transparent 70%), radial-gradient(50% 40% at 10% 90%, rgb(154 107 255 / .08), transparent 70%); }

/* ---------------------------------------------------------------- close: no glass tiles */
.erp .close__tiles { display: none; }

@media (max-width: 900px) {
  .erp .bar__nav { display: none; }
}
@media (max-width: 700px) {
  .erp .erpch { height: 82svh; }
  .erp .erpch .lh__copy { max-width: none; right: 20px; }
  .erp .erpch .lh__h { font-size: clamp(34px, 9.6vw, 48px); }
}
@media (prefers-reduced-motion: reduce) {
  .erp .erpch .lh__copy > * { opacity: 1; transform: none; transition: none; }
  [data-fill] .fw { color: inherit; transition: none; }
  .erp-dust { display: none; }
}

/* ---------------------------------------------------------------- the hero's plate behind every black section (plates.js)
   Saife 2026-10-17: "add backgrounds to all black screens". One photograph, the hero's hall: the plate is at most
   130vh tall, melts into the ground at both ends, and is widened so its lit horizon sits behind the section's subject. */
.erp .ep-host { isolation: isolate; }
.erp section.ep-host:not(.sc-act--pinned) { position: relative; overflow-x: clip; }
.erp .ep-plate { position: absolute; top: 0; left: 0; right: 0; height: min(100%, 130vh); z-index: -1; pointer-events: none;
  background: center 58% / cover no-repeat; opacity: 0; transition: opacity .8s ease; transform: translateZ(0); }
.erp .ep-plate.is-on { opacity: 1; }
.erp .ep-plate--stage { height: 100%; }
.erp .ep-plate--r { left: 0; right: -44%; }
.erp .ep-plate--l { left: -44%; right: 0; }
.erp .ep-plate--flip { transform: translateZ(0) scaleX(-1); }
.erp .ep-plate::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--ground) 0%, rgb(10 8 20 / .25) 18%, rgb(10 8 20 / .1) 50%, rgb(10 8 20 / .3) 80%, var(--ground) 100%); }
.erp .ep-plate--stage::after { background: linear-gradient(180deg, var(--ground) 0%, rgb(10 8 20 / .2) 14%, rgb(10 8 20 / 0) 40%, rgb(10 8 20 / .15) 76%, var(--ground) 100%); }
/* the old violet washes would sit on top of the photograph: the plate carries the light now */
.erp .ep-host.lhaze, .erp .ep-host.haze, .erp .haze > .ep-host { background-image: none; }
@media (max-width: 760px) { .erp .ep-plate--r, .erp .ep-plate--l { left: 0; right: 0; } }
@media (prefers-reduced-motion: reduce) { .erp .ep-plate { transition: none; } }

/* #uses: the headline is longer here than on the Data page (Saife 2026-10-18), so it is set smaller to sit in its column clear of the cards */
@media (min-width: 761px) { .erp #uses .uc__h { max-width: 15ch; font-size: clamp(34px, 3.3vw, 50px); } }
/* #plug's own plate (plates.js, img/erp/plug.jpg): the Data page's switchboard hall in violet, placed as it is
   there, so the lit cable junction sits behind the octopus, with a short top fade (Saife 2026-10-18) */
/* the plate fills the section exactly, so a percentage cannot move it: the photograph is pushed down from the
   bottom edge until the junction sits under the octopus's tentacle tips ("place it properly on that background
   panel", Saife 2026-10-18). The strip this opens at the top is held at the ground colour, then fades in (::after). Measured by plugmeasure.mjs. */
.erp #plug .ep-plate--own { background-position: center bottom -74px; }
@media (max-width: 760px) { .erp #plug .ep-plate--own { background-position: center bottom -68px; } }
/* the junction now sits near the section's foot, so the bottom fade starts after it and the octopus stands in its light */
.erp #plug .ep-plate--own::after { background: linear-gradient(180deg, var(--ground) 0%, var(--ground) 80px, rgb(10 8 20 / .1) 200px, rgb(10 8 20 / .06) 84%, rgb(10 8 20 / .5) 94%, var(--ground) 100%); }

/* the footer's giant wordmark (build.py, after Viktor's footer, Saife 2026-10-19): the mark as glass letters, a faint
   lit fill that fades towards the foot with a thin bright edge, sized to the footer's width and cut off by the page's
   bottom edge. Marr is white glass, ınn violet glass, the ı keeps its amber tittle (the brand's mark, in glass). */
.erp .close .foot { container-type: inline-size; padding-bottom: 0; }
.foot__giant { height: .7em; margin-top: clamp(24px, 4cqw, 56px); overflow: hidden; text-align: center; white-space: nowrap;
  font: 600 25.5cqw/.86 var(--sc-font-display); letter-spacing: -.03em; pointer-events: none; user-select: none; }
.foot__giant span { color: transparent; -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 1.5px var(--edge); }
.foot__giant .g1 { --edge: rgb(236 230 255 / .24); background-image: linear-gradient(180deg, rgb(255 255 255 / .2), rgb(255 255 255 / .05) 70%); }
.foot__giant .g2 { --edge: rgb(200 175 255 / .36); background-image: linear-gradient(180deg, rgb(178 148 255 / .36), rgb(154 107 255 / .07) 70%); }
.foot__giant i { display: inline-block; width: 0; height: 0; position: relative; }
.foot__giant i::before { content: ""; position: absolute; left: .05em; bottom: .525em; width: .1425em; height: .1425em; border-radius: 50%;
  background: linear-gradient(180deg, rgb(240 150 70 / .3), rgb(232 129 34 / .08)); box-shadow: inset 0 0 0 1.5px rgb(255 196 140 / .34); }

/* the footer on clear white (Saife 2026-10-19: "put this whole on a clear white background", of the footer). White runs
   edge to edge and down past the page's foot (the box-shadow, clipped so it never spreads upwards); t-light supplies
   the navy text tokens. It sits above the fixed dust (z 40) so no star shows on it, and the header turns white over it. */
html.erp-world .erp .close .foot--white, .erp .close .foot--white { position: relative; z-index: 41; background: #fff; border-top: 0;
  box-shadow: 0 0 0 100vmax #fff; clip-path: inset(0 -100vmax -100vmax); padding-top: clamp(56px, 6vw, 88px); }
.erp .foot--white .mark span { color: var(--violet); }
.erp .foot--white .foot__nav a:hover { color: #1a1033; }
/* the giant wordmark as glass on white: a faint navy and violet tint with a fine edge, the amber tittle kept */
.erp .foot--white .foot__giant .g1 { --edge: rgb(26 16 51 / .13); background-image: linear-gradient(180deg, rgb(26 16 51 / .075), rgb(26 16 51 / .015) 70%); }
.erp .foot--white .foot__giant .g2 { --edge: rgb(109 75 192 / .3); background-image: linear-gradient(180deg, rgb(109 75 192 / .17), rgb(109 75 192 / .03) 70%); }
.erp .foot--white .foot__giant i::before { background: linear-gradient(180deg, rgb(232 129 34 / .32), rgb(232 129 34 / .08)); box-shadow: inset 0 0 0 1.5px rgb(214 110 20 / .38); }
/* the header over white: no dark fade layer and no hairline, the light bar instead */
html.erp-world .bar.bar--light, html.erp-world .bar.bar--light.is-scrolled { background: #fff; border-bottom-color: transparent; }
html.erp-world .bar.bar--light::before { opacity: 0; }
html.erp-world .bar::before { opacity: var(--bar-fade, 1); }

/* 2026-10-25 mobile audit: in the nested "Working on it" card a phone left the step text about 90px, so it broke one word
   per line beside its module chip. On a phone the chip drops under the step text. */
@media (max-width: 560px) {
  .erp #example .st3__run li { display: grid; grid-template-columns: 15px minmax(0, 1fr); column-gap: 9px; row-gap: 3px; }
  .erp #example .st3__run li em { grid-column: 2; justify-self: start; }
}
