/* ===================================================================
   Rivulet IQ — visuals.css (inner pages, 2026-12-02)
   The visual layer the client asked for after the first inner-page round ("only content, no images,
   video or animation"), modelled on vault.hyperiux.com (blog / community / pricing) and the homepage:
     · hero atmosphere: a dot grid + an orange glow that follows the pointer
     · split hero with a visual frame (footage or generative art)
     · .vx  — a frame for generative orange artwork (visuals.js draws it) or footage
     · .vc  — cards (cover visual, tag chip, date/status, title, text, link) — like the reference blog cards
              and the homepage case cards; white on the grey scene
     · .vx-screen — a dark "product screen" panel with a dot grid, holding a small live UI demo
     · .pg-table--focus — a comparison table with one highlighted dark column (reference pricing)
   Tokens only (they follow the page scenes), except inside .vx / .vx-screen, which are always dark.
   =================================================================== */

/* ------------------------------------------------------------------ hero atmosphere */
.pg-hero[data-vx-glow] {
    --gx: 72%; --gy: 38%;
    /* a still orange glow (client, 2026-12-02: no dot grid, no pointer effect) */
    background-image: none;     /* client, 2026-12-02: no gradient under the hero */
}
/* the film variant keeps its shade above the glow */
.pg-hero[data-vx-glow] .pg-hero__frame { z-index: -1; }

/* split hero: copy left, a tall visual right */
.pg-hero--split {
    & .pg-hero__inner { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "crumb crumb" "copy art" "facts facts"; column-gap: var(--sp60); row-gap: var(--sp40); align-items: end; }
    & .pg-hero__crumb { grid-area: crumb; }
    & .pg-hero__copy { grid-area: copy; display: flex; flex-direction: column; gap: var(--sp40); min-width: 0; }
    & .pg-hero__art { grid-area: art; align-self: stretch; min-height: calc(var(--cvw) * 34); }
    & .pg-hero__facts { grid-area: facts; margin-top: var(--sp25); }
    & .pg-hero__title { font-size: var(--f-h1-inner); }
    & .pg-hero__foot { grid-template-columns: minmax(0, 1fr); gap: var(--sp30); margin-top: 0; }
    & .pg-hero__lead, & .pg-hero__actions { grid-column: 1; grid-row: auto; }
    & .pg-hero__actions { order: 2; }
    @media (max-width: 991.98px) {
        & .pg-hero__inner { grid-template-columns: minmax(0, 1fr); grid-template-areas: "crumb" "copy" "art" "facts"; }
        & .pg-hero__art { min-height: 56vw; }
        & .pg-hero__title { font-size: var(--f-h1-inner); }
    }
    @media (max-width: 767.98px) { & .pg-hero__title { font-size: var(--f-h1-inner); } & .pg-hero__art { min-height: 72vw; } }
}

/* ------------------------------------------------------------------ VX frame (generative art or footage) */
.vx {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: #0c0c0c;
    color: #fff;
    & .vx__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
    & > video, & > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
    & .vx__cap { position: absolute; left: var(--sp20); bottom: var(--sp15); z-index: 2; font-family: var(--font-mono); font-size: var(--f12); letter-spacing: 0; text-transform: none; color: rgba(255, 255, 255, .8); }
    & .vx__cap::before { display: inline-block; width: 7px; height: 7px; margin-right: 8px; background: var(--orange); content: ""; vertical-align: 1px; }
    &.vx--16x9 { aspect-ratio: 16 / 9; }
    &.vx--wide { aspect-ratio: 21 / 9; }
    &.vx--4x3 { aspect-ratio: 4 / 3; }
    &.vx--sq { aspect-ratio: 1; }
    @media (max-width: 767.98px) { &.vx--wide { aspect-ratio: 4 / 3; } }
}
/* footage frames: a shade under the caption so it reads over light frames (moved from pages/design.css 2026-12-04: every page has section videos now) */
.vx:has(> video)::after { position: absolute; inset: auto 0 0; z-index: 1; height: 40%; background: linear-gradient(transparent, rgba(12, 12, 12, .7)); content: ""; pointer-events: none; }
.vx:has(> video):not(:has(.vx__cap))::after { display: none; }
/* a full-width visual band between sections (unclip-ready: put data-anim="unclip" on it) */
.vx-band { width: 100%; height: clamp(260px, calc(var(--cvw) * 36), 620px); }

/* ------------------------------------------------------------------ VC cards (reference blog cards) */
.vc-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: var(--sp30); list-style: none; }
.vc-grid--2 { --cols: 2; }
@media (max-width: 991.98px) { .vc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767.98px) { .vc-grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp20); } }

.vc {
    position: relative;
    display: flex; flex-direction: column;
    height: 100%;
    padding: var(--sp25);
    border: 1px solid var(--white-10);
    background: var(--white-08);
    color: var(--white);
    transition: border-color var(--ease), background-color .9s ease, transform var(--ease-expo);
    & .vc__cover { margin-bottom: var(--sp25); aspect-ratio: 16 / 10; }
    & .vc__meta { display: flex; align-items: center; justify-content: space-between; gap: var(--sp12); margin-bottom: var(--sp15); font-size: var(--f15); color: var(--light-grey); }
    & .vc__tag { padding: 3px 10px; background: var(--white-08); font-size: var(--f15); color: var(--white-75); }
    & .vc__title { font-size: var(--f30); font-weight: 600; line-height: var(--lhTight); letter-spacing: var(--ls-h3); text-wrap: balance; }
    & .vc__text { margin-top: var(--itemGap); color: var(--light-grey); }
    & .vc__more { display: inline-flex; align-self: flex-start; margin-top: auto; padding-top: var(--sp25); }
    & .vc__more span { padding-bottom: 3px; border-bottom: 1px solid currentColor; font-size: var(--f15); font-weight: 500; transition: color var(--ease); }
    & .vc__link::after { position: absolute; inset: 0; content: ""; }          /* the whole card is the link */
    &:hover, &:focus-within { border-color: var(--orange); }
    &:hover .vc__more span, &:focus-within .vc__more span { color: var(--orange); }
    &:hover .vc__cover .vx__canvas { transform: scale(1.04); }
    & .vc__cover .vx__canvas { transition: transform var(--ease-expo); }
}
/* featured: cover left, text right (reference "Latest from the vault") */
.vc--feature {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; gap: var(--sp60);
    padding: var(--sp30);
    & .vc__cover { margin: 0; aspect-ratio: 16 / 10; }
    & .vc__title { font-size: var(--f40); }
    & .vc__body { display: flex; flex-direction: column; }
    & .vc__more { margin-top: var(--sp30); }
    @media (max-width: 767.98px) { grid-template-columns: minmax(0, 1fr); gap: var(--sp25); padding: var(--sp20); }
}
/* the grey scene turns cards white, the paper scene light grey (same rule as the homepage's case cards) */
html[data-mood="grey"] .vc { border-color: var(--ink-10); background: var(--paper); }
html[data-mood="paper"] .vc { border-color: var(--ink-10); background: var(--light); }
html[data-mood="grey"] .vc:hover, html[data-mood="paper"] .vc:hover { border-color: var(--orange); }
html[data-mood="grey"] .vc .vc__tag, html[data-mood="paper"] .vc .vc__tag { background: var(--light); }
html[data-mood="paper"] .vc .vc__tag { background: var(--paper); }

/* ------------------------------------------------------------------ VX SCREEN (a dark product panel with a live demo) */
.vx-screen {
    --s-fg: #F4F4F4; --s-soft: #9A9693; --s-line: rgba(255, 255, 255, .12); --s-o: var(--orange);
    position: relative;
    padding: var(--sp40);
    background-color: #141414;     /* no dot grid (client, 2026-12-02) */
    color: var(--s-fg);
    overflow: hidden;
    & .vx-screen__bar { display: flex; align-items: center; gap: 8px; margin-bottom: var(--sp25); font-family: var(--font-mono); font-size: var(--f12); letter-spacing: 0; text-transform: none; color: var(--s-soft); }
    & .vx-screen__bar::before { width: 7px; height: 7px; background: var(--s-o); content: ""; }
    & .vx-screen__cap { margin-top: var(--sp25); font-size: var(--f15); color: var(--s-soft); }
    @media (max-width: 767.98px) { padding: 20px; }
}
/* search box + typed query */
.ui-search {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--s-line);
    background: #0d0d0d;
    font-size: var(--f18);
    & svg { flex: 0 0 auto; width: 18px; color: var(--s-o); }
    & .ui-q { min-height: 1.4em; }
    & .ui-q.is-typing::after { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; background: var(--s-o); content: ""; vertical-align: -3px; animation: ui-caret .8s steps(1) infinite; }
}
@keyframes ui-caret { 50% { opacity: 0; } }
/* answer lines + source chips appear after the query is typed */
.ui-answer { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .6s cubic-bezier(.16, 1, .3, 1); }
.vx-screen.is-answered .ui-answer { opacity: 1; transform: none; }
.ui-line { height: 9px; background: rgba(255, 255, 255, .16); }
.ui-line:nth-child(2) { width: 92%; } .ui-line:nth-child(3) { width: 74%; }
.ui-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ui-chip { padding: 5px 10px; border: 1px solid color-mix(in srgb, var(--orange) 50%, transparent); font-size: var(--f12); font-family: var(--font-mono); letter-spacing: 0; text-transform: none; color: var(--orange); }
/* outcome rows (each ticks in) */
.ui-rows { display: flex; flex-direction: column; gap: 8px; list-style: none; }
.ui-rows > li {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--s-line);
    background: rgba(255, 255, 255, .03);
    font-size: var(--f15);
    opacity: .35; transform: translateX(-6px);
    transition: opacity .5s ease, transform .6s cubic-bezier(.16, 1, .3, 1), border-color .5s ease;
    &.is-on { opacity: 1; transform: none; border-color: color-mix(in srgb, var(--orange) 45%, transparent); }
    & .ui-k { font-family: var(--font-mono); font-size: var(--f12); color: var(--s-o); }
    & .ui-s { font-family: var(--font-mono); font-size: var(--f12); letter-spacing: 0; text-transform: none; color: var(--s-soft); }
    &.is-on .ui-s { color: var(--orange); }
}
/* bar chart */
.ui-bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 10px; border-bottom: 1px solid var(--s-line); }
.ui-bars > span { flex: 1; height: var(--h, 50%); background: var(--orange); transform: scaleY(.04); transform-origin: 50% 100%; transition: transform 1.1s cubic-bezier(.16, 1, .3, 1); }
.ui-bars > span:nth-child(2) { transition-delay: .08s; } .ui-bars > span:nth-child(3) { transition-delay: .16s; } .ui-bars > span:nth-child(4) { transition-delay: .24s; } .ui-bars > span:nth-child(5) { transition-delay: .32s; } .ui-bars > span:nth-child(6) { transition-delay: .4s; } .ui-bars > span:nth-child(7) { transition-delay: .48s; } .ui-bars > span:nth-child(8) { transition-delay: .56s; }
.ui-bars.is-on > span { transform: none; }
.ui-legend { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--font-mono); font-size: var(--f12); color: var(--s-soft); }
@media (prefers-reduced-motion: reduce) { .ui-bars > span, .ui-rows > li, .ui-answer { transform: none !important; opacity: 1 !important; } }

/* ------------------------------------------------------------------ comparison table with a highlighted column (reference pricing) */
.pg-table--focus {
    & thead th:last-child, & tbody td:last-child { background: #141414; color: #F4F4F4; padding-left: var(--sp20); }
    & thead th:last-child { color: var(--orange); }
    & tbody td:last-child a { color: #fff; }
    @media (max-width: 767.98px) { & tbody td:last-child { margin-top: var(--sp10); padding: var(--sp12); } }
}

/* ------------------------------------------------------------------ media split (text one side, visual the other) */
.vx-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: var(--sp75); }
.vx-split--rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.vx-split--rev > :first-child { order: 2; }
@media (max-width: 991.98px) { .vx-split, .vx-split--rev { grid-template-columns: minmax(0, 1fr); } .vx-split--rev > :first-child { order: 0; } }

/* soft orange glow behind a centred heading (reference community "What do you build with?") */
.vx-glow-bg { position: relative; isolation: isolate; }
.vx-glow-bg::before { position: absolute; inset: -10% 0; z-index: -1; background: radial-gradient(ellipse 45% 55% at 60% 45%, color-mix(in srgb, var(--orange) 22%, transparent), transparent 70%); content: ""; pointer-events: none; }
.ui-rows > li:has(.ui-k) { grid-template-columns: auto minmax(0, 1fr) auto; }

/* hero h1 on every inner page: one smaller size (client, 2026-12-02) — 71px at 1536px and wider, scaling in ratio;
   beats the page-group sizes on purpose so all heroes match */
main.inner .pg-hero .pg-hero__title { max-width: 18ch; font-size: var(--f-h1-inner); line-height: 1.02; letter-spacing: -.04em; }
@media (max-width: 991.98px) { main.inner .pg-hero .pg-hero__title { max-width: none; font-size: var(--f-h1-inner); } }
@media (max-width: 767.98px) { main.inner .pg-hero .pg-hero__title { font-size: var(--f-h1-inner); line-height: 1.04; } }

/* ------------------------------------------------------------------ hero facts strip (client, 2026-12-02: "present it differently")
   The facts under every page hero become one glass strip: a panel with a faint fill and hairline edge, each fact a cell with
   an orange marker, a mono label and the value set larger; cells rise in one after another (data-anim-stagger) and light up on hover. */
main.inner .pg-hero .pg-hero__facts {
    margin-top: var(--sp45);
    border: 1px solid rgba(255, 255, 255, .12);
    background: transparent;   /* gradient fill removed (client, 2026-12-02) */
    & > div {
        position: relative;
        gap: var(--sp10);
        padding: var(--sp30) var(--sp30) !important;
        border-left: 0 !important;
        transition: background-color var(--ease);
        &:hover { background: rgba(255, 255, 255, .04); }
        &::before { position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--orange); content: ""; transform: scaleX(0); transform-origin: 0 50%; transition: transform var(--ease-expo); }
        &:hover::before { transform: scaleX(1); }
    }
    & > div + div { box-shadow: inset 1px 0 0 rgba(255, 255, 255, .12); }
    & dt { display: flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, .6); }
    & dt::before { flex: 0 0 auto; width: 6px; height: 6px; background: var(--orange); content: ""; }
    & dd { font-size: var(--f25); font-weight: 600; line-height: var(--lhSnug); letter-spacing: var(--ls-h3); color: #fff; }
    @media (max-width: 991.98px) {
        & > div:nth-child(odd) { box-shadow: none; }
        & > div:nth-child(n+3) { margin-top: 0 !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
        & > div:nth-child(even):nth-child(n+3) { box-shadow: inset 1px 0 0 rgba(255, 255, 255, .12), inset 0 1px 0 rgba(255, 255, 255, .12); }
        & dd { font-size: var(--f18); }
    }
    @media (max-width: 767.98px) {
        & > div { padding: 18px 20px !important; }
        & > div + div { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12) !important; }
    }
}

/* ------------------------------------------------------------------ hero backdrop (client, 2026-12-02: "the background looks blank")
   A full-bleed generative artwork behind every hero that has no film, chosen by section (build.py), dimmed and faded out
   toward the text on the left and into the page at the bottom, so the copy always reads first. */
.pg-hero .pg-hero__bgart {
    position: absolute; inset: 0;
    z-index: -1;
    background: transparent;
    opacity: .55;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.25) 30%, #000 70%), linear-gradient(180deg, #000 60%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.25) 30%, #000 70%), linear-gradient(180deg, #000 60%, transparent 100%);
    -webkit-mask-composite: source-in;
            mask-composite: intersect;
    pointer-events: none;
}
@media (max-width: 991.98px) {
    .pg-hero .pg-hero__bgart { opacity: .35; -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 100%); mask-image: linear-gradient(180deg, #000 40%, transparent 100%); }
}
/* the side shade over a hero film: dark behind the copy on the left, the film showing through on the right */
.pg-hero .pg-hero__shade--side {
    /* background: linear-gradient(90deg, rgba(17, 17, 17, .94) 25%, rgba(17, 17, 17, .62) 65%, rgba(17, 17, 17, .78)), linear-gradient(180deg, transparent 70%, #111 100%); */
    /* client, 2026-12-02: a flat black shade at 60% over the whole hero film */
    background: #000;
    /* client, 2026-12-04: overlay .07 darker (was .6) */
    opacity: 0.67;
}
@media (max-width: 991.98px) { .pg-hero .pg-hero__shade--side { background: linear-gradient(180deg, rgba(17,17,17,.7), rgba(17,17,17,.9) 60%, #111); } }

/* shorter sub-hero (client, 2026-12-02): no full-screen minimum, tighter top/bottom, a lower visual panel */
@media (min-width: 992px) {
    main.inner .pg-hero { min-height: 0; padding-block: calc(var(--cvw) * 9.5) var(--sp60); }
    main.inner .pg-hero .pg-hero__inner { gap: var(--sp30); }
    main.inner .pg-hero--split .pg-hero__inner { row-gap: var(--sp30); }
    main.inner .pg-hero--split .pg-hero__art { min-height: calc(var(--cvw) * 26); }
    main.inner .pg-hero .pg-hero__facts { margin-top: var(--sp30); }
}


/* hero stage (client, 2026-12-02: "everything merges into one dark page"): the hero gets its own surface — a deeper black
   with a fine still film grain (no bottom line, client 2026-12-02) — so it reads as a band of its own, apart from the
   sections below. No animation. */
main.inner .pg-hero {
    background-color: #0A0A0A;
}
main.inner .pg-hero::after {
    position: absolute; inset: 0;
    z-index: -1;
    background-image: url("../images/grain.svg");
    background-size: 240px 240px;
    opacity: .07;
    content: "";
    pointer-events: none;
}
main.inner .pg-hero:has(.pg-hero__frame)::after { opacity: .05; z-index: 0; }

/* client (2026-12-02): no visual box on the right of the split hero — the lead paragraph (and its buttons) sits there instead */
.pg-hero--split .pg-hero__inner > .pg-hero__foot { grid-area: art; align-self: end; min-width: 0; }
.pg-hero--split .pg-hero__inner > .pg-hero__foot .pg-hero__lead { max-width: 46ch; }
/* client (2026-12-02): hero a little taller now that the right-side box is gone */
@media (min-width: 992px) {
    main.inner .pg-hero { padding-block: calc(var(--cvw) * 14.5) calc(var(--cvw) * 8.5); }
    main.inner .pg-hero .pg-hero__inner { row-gap: var(--sp60); }
}
/* client (2026-12-02): hero buttons sit under the title on the left; the paragraph stays on the right.
   Phones/tablets: title, paragraph, then the buttons. */
.pg-hero--split .pg-hero__inner { grid-template-areas: "crumb crumb" "copy art" "acts art" "facts facts"; }
.pg-hero--split .pg-hero__inner > .pg-hero__foot { grid-area: art; align-self: center; }
.pg-hero--split .pg-hero__inner > .pg-hero__acts { grid-area: acts; margin: 0; align-self: start; }
@media (max-width: 991.98px) {
    .pg-hero--split .pg-hero__inner { grid-template-areas: "crumb" "copy" "art" "acts" "facts"; }
}


/* breadcrumb in the header's type (client, 2026-12-02): Inter, normal case, no letter-spacing */
main.inner .pg-hero__crumb, main.inner .cs-hero__top .pg-hero__crumb {
    font-family: var(--font-body);
    font-size: var(--f15);
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

/* client (2026-12-02): breadcrumb sits right under the header; the title and everything below stay where they were */
@media (min-width: 992px) {
    main.inner .pg-hero:has(.pg-hero__crumb, .cs-hero__top) { padding-top: calc(var(--cvw) * 9.5); }
    main.inner .pg-hero .pg-hero__inner > .pg-hero__crumb,
    main.inner .pg-hero .pg-hero__inner > .cs-hero__top { margin-bottom: var(--sp75); }
}

/* client (2026-12-02): the AI-Powered Design covers on services.html in a light version — warm off-white with a hairline edge */
.vx[data-vx-theme="light"] { background: #F7F4F1; color: #231F20; box-shadow: inset 0 0 0 1px rgba(35, 31, 32, .08); }

/* client (2026-12-02): split-hero title at the services hero size — 86px on the 1536px design, scaling with the screen
   (86 / 15.36 = 5.6 cvw); the paragraph on the right sits against the right edge of the container. */
@media (min-width: 992px) {
    main.inner .pg-hero--split .pg-hero__title { max-width: 16ch; font-size: var(--f-h1-inner); }
    .pg-hero--split .pg-hero__inner > .pg-hero__foot { justify-self: end; }
}
