/* =========================================================================
   AppMechs - design system v3 ("dynamic")
   Native CSS, no build step. Light + dark themes, motion honours
   prefers-reduced-motion.

   Shape rule:   buttons / chips / tabs -> pill · surfaces -> 14px · icon tiles -> 12px
   Icon rule:    one tile style (44px) for categories; small inline icons only
                 for list ticks and the sector strip; no icons in headings.
   ========================================================================= */

:root {
    color-scheme: light;

    /* Brand */
    /* The two theme colours. includes/theme.php overrides these from the Settings page. */
    --brand: #3f417d;
    --brand-coral: #fb7266;
    /* Everything below derives from them */
    --brand-deep: color-mix(in srgb, var(--brand) 75%, #000);
    --grad-brand: linear-gradient(120deg, var(--brand) 0%, var(--g-deep-2) 55%, var(--brand-coral) 130%);

    /* Bright set for icon tiles (cycled per item) */
    /* One brand colour (logo purple) for every icon tile and highlight.
       Old per-item names are kept as aliases so page markup keeps working. */
    --brand-1: var(--brand); --brand-2: color-mix(in srgb, var(--brand) 70%, #fff); --brand-coral-soft: color-mix(in srgb, var(--brand-coral) 55%, #fff);
    --c-violet: var(--brand-1); --c-violet-2: var(--brand-2);
    --c-coral:  var(--brand-1); --c-coral-2:  var(--brand-2);
    --c-sky:    var(--brand-1); --c-sky-2:    var(--brand-2);
    --c-green:  var(--brand-1); --c-green-2:  var(--brand-2);
    --c-amber:  var(--brand-1); --c-amber-2:  var(--brand-2);
    --c-pink:   var(--brand-1); --c-pink-2:   var(--brand-2);

    /* Deep pairs for full-colour panels: white text stays readable */
    --g-deep-1: var(--brand); --g-deep-2: color-mix(in srgb, var(--brand) 80%, #fff);
    --g-violet-1: var(--g-deep-1); --g-violet-2: var(--g-deep-2);
    --g-coral-1:  var(--g-deep-1); --g-coral-2:  var(--g-deep-2);
    --g-sky-1:    var(--g-deep-1); --g-sky-2:    var(--g-deep-2);
    --g-amber-1:  var(--g-deep-1); --g-amber-2:  var(--g-deep-2);
    --g-green-1:  var(--g-deep-1); --g-green-2:  var(--g-deep-2);
    --g-pink-1:   var(--g-deep-1); --g-pink-2:   var(--g-deep-2);

    /* Light theme */
    --bg: #fbfbfe;
    --surface: #ffffff;
    --surface-2: #f4f2fd;
    --line: #e7e4f2;
    --line-strong: #d3cee6;
    --ink: #15122a;
    --ink-soft: #4a4763;
    --ink-mute: #66637e;
    --accent: var(--brand);
    --accent-hover: var(--brand-deep);
    --accent-soft: color-mix(in srgb, var(--brand) 11%, #fff);
    --on-accent: #ffffff;
    --danger: #a01b3a; --danger-bg: #fdecef; --danger-line: #f5c2cd;
    --ok: #146c3a; --ok-bg: #eafaef; --ok-line: #b7e4c7;

    --shadow-sm: 0 1px 2px rgba(21, 18, 42, .05), 0 2px 8px color-mix(in srgb, var(--brand) 5%, transparent);
    --shadow-md: 0 16px 36px -20px color-mix(in srgb, var(--brand) 38%, transparent);
    --shadow-lg: 0 30px 60px -28px color-mix(in srgb, var(--brand) 45%, transparent);

    --r: 14px;
    --r-sm: 10px;
    --container: 1200px;
    --header-h: 84px;
    --ease: cubic-bezier(.16, 1, .3, 1);

    --font-display: "Sora", "Segoe UI", system-ui, sans-serif;
    --font-body: "Geist", "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #0e0c19; --surface: #161329; --surface-2: #121024;
        --line: #29254a; --line-strong: #3a355e;
        --ink: #f2f0fb; --ink-soft: #c1bcda; --ink-mute: #9b96b8;
        --accent: color-mix(in srgb, var(--brand) 45%, #fff); --accent-hover: color-mix(in srgb, var(--brand) 30%, #fff); --accent-soft: color-mix(in srgb, var(--brand) 25%, transparent); --on-accent: #120f24;
        --danger: #ff9fb2; --danger-bg: rgba(255, 99, 132, .12); --danger-line: rgba(255, 99, 132, .35);
        --ok: #8ee0ad; --ok-bg: rgba(46, 204, 113, .12); --ok-line: rgba(46, 204, 113, .35);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
        --shadow-md: 0 16px 36px -20px rgba(0, 0, 0, .7);
        --shadow-lg: 0 30px 60px -28px rgba(0, 0, 0, .75);
    }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + .75rem); }
body {
    font-family: var(--font-body); color: var(--ink); background: var(--bg);
    line-height: 1.6; font-size: 16.5px; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; color: var(--ink); font-weight: 700; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); letter-spacing: -.035em; line-height: 1.06; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.2rem); letter-spacing: -.028em; }
h3 { font-size: 1.05rem; letter-spacing: -.01em; }
p { color: var(--ink-soft); text-wrap: pretty; }
h1, h2, h3, .lead { text-wrap: balance; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 999; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-sm); transition: top .2s; }
.skip-link:focus { top: 12px; }

/* ---------- Layout ---------- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.section { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section--tight { padding: clamp(2rem, 4vw, 3rem) 0; }
.section--soft, .section--tint { background: var(--surface-2); }
.section__head { max-width: 680px; margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem); }
.section__head.center { margin-inline: auto; text-align: center; }
.section__head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .75rem 2rem; }
.section__foot { margin-top: 1.5rem; }
.eyebrow {
    display: inline-block; margin-bottom: .6rem;
    font-family: var(--font-display); font-weight: 600; font-size: .76rem;
    letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
}
.lead { font-size: 1.06rem; color: var(--ink-soft); margin-top: .7rem; max-width: 62ch; }
.grad-text { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font-family: var(--font-display); font-weight: 600; font-size: .95rem; white-space: nowrap;
    padding: .82rem 1.4rem; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; line-height: 1;
    transition: transform .3s var(--ease), background-color .2s, box-shadow .3s var(--ease), color .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-md); }
.btn--primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-lg); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.btn--light { background: #ffffff; color: var(--brand-deep); box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .45); }
.btn--light:hover { background: #f4f0ff; }
.btn--glass { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn--glass:hover { background: rgba(255, 255, 255, .2); }
.btn--sm { padding: .65rem 1.1rem; font-size: .88rem; }
.link-arrow { font-family: var(--font-display); font-weight: 600; font-size: .93rem; display: inline-flex; align-items: center; gap: .4rem; color: var(--accent); }
.link-arrow::after { content: "\2192"; transition: transform .3s var(--ease); }
.link-arrow:hover { text-decoration: none; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Scroll progress (CSS scroll-driven, no JS) ---------- */
@supports (animation-timeline: scroll()) {
    @media (prefers-reduced-motion: no-preference) {
        .site-header::after {
            content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
            background: var(--grad-brand); transform-origin: 0 50%; transform: scaleX(0);
            animation: grow-x linear both; animation-timeline: scroll(root);
        }
    }
}
@keyframes grow-x { to { transform: scaleX(1); } }

/* ---------- Header / nav ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: color-mix(in srgb, var(--bg) 86%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
    border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.is-stuck { border-color: var(--line); box-shadow: var(--shadow-sm); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.brand__logo { height: 68px; width: auto; object-fit: contain; display: block; }
.brand__logo--footer { height: 76px; }

.primary-nav { display: flex; align-items: center; gap: 1.6rem; }
.primary-nav__list { display: flex; align-items: center; gap: .25rem; }
/* Each item fills the header height, so dropdowns open just below the header band */
.primary-nav__item { position: relative; display: flex; align-items: center; height: var(--header-h); }
.primary-nav__item > a {
    display: block; font-family: var(--font-display); font-weight: 500; font-size: .94rem; white-space: nowrap;
    color: var(--ink-soft); text-decoration: none; padding: .5rem .8rem; border-radius: 999px; transition: color .2s, background-color .2s;
}
.primary-nav__item > a:hover { color: var(--ink); background: var(--accent-soft); }
.primary-nav__item > a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.primary-nav__item.has-children > a::after {
    content: ""; display: inline-block; width: .36em; height: .36em; margin-left: .45em;
    border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: translateY(-.2em) rotate(45deg); opacity: .6;
}
.submenu {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(6px);
    min-width: 260px; background: var(--surface); border: 1px solid var(--line);
    border-radius: 0 0 var(--r) var(--r); border-top: 0; box-shadow: var(--shadow-lg); padding: .45rem;
    opacity: 0; visibility: hidden; transition: opacity .2s, transform .3s var(--ease), visibility .2s;
}
.primary-nav__item.has-children:hover .submenu,
.primary-nav__item.has-children:focus-within .submenu { opacity: 1; visibility: visible; transform: translateX(-50%); }
.submenu a { display: block; padding: .5rem .75rem; border-radius: var(--r-sm); font-size: .9rem; color: var(--ink-soft); text-decoration: none; }
.submenu a:hover { background: var(--accent-soft); color: var(--ink); }

.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); position: relative; cursor: pointer; }
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 2px; border-radius: 2px;
    background: var(--ink); transform: translate(-50%, -50%); transition: .3s var(--ease);
}
.nav-toggle__bar::before { transform: translate(-50%, -7px); }
.nav-toggle__bar::after { transform: translate(-50%, 5px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translate(-50%, 0) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { transform: translate(-50%, 0) rotate(-45deg); }

/* =========================================================================
   HERO (home) - animated mesh, rotating word, live connection hub
   ========================================================================= */
.hx { position: relative; isolation: isolate; overflow: hidden; color: #fff; padding: clamp(2.25rem, 5vw, 3.75rem) 0; }
.hx__bg {
    position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(40% 60% at 15% 20%, color-mix(in srgb, color-mix(in srgb, var(--brand) 60%, #fff) 55%, transparent), transparent 70%),
        radial-gradient(35% 55% at 85% 15%, color-mix(in srgb, var(--brand-coral) 22%, transparent), transparent 70%),
        radial-gradient(45% 60% at 70% 95%, color-mix(in srgb, color-mix(in srgb, var(--brand) 60%, #000) 55%, transparent), transparent 70%),
        radial-gradient(30% 45% at 30% 100%, color-mix(in srgb, var(--brand-coral) 12%, transparent), transparent 70%),
        var(--brand);
    background-size: 140% 140%;
}
.hx__bg::after { /* fine dot grid for depth */
    content: ""; position: absolute; inset: 0; opacity: .18;
    background-image: radial-gradient(rgba(255, 255, 255, .8) 1px, transparent 1.2px); background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%, #000 70%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 40%, #000 70%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
    .hx__bg { animation: mesh 18s ease-in-out infinite alternate; }
}
@keyframes mesh { 0% { background-position: 0% 0%; } 50% { background-position: 100% 30%; } 100% { background-position: 30% 100%; } }

.hx__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hx__kicker {
    display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .85rem; border-radius: 999px;
    font-family: var(--font-display); font-weight: 600; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase;
    background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.hx__title { color: #fff; margin: 1rem 0 1rem; max-width: 20ch; }
.rotator {
    display: inline-block; padding-bottom: .06em;
    background: linear-gradient(90deg, #ffffff, var(--brand-coral-soft)); -webkit-background-clip: text; background-clip: text; color: transparent;
    transition: opacity .35s var(--ease), transform .45s var(--ease), filter .35s;
}
.rotator.is-out { opacity: 0; transform: translateY(.35em); filter: blur(4px); }
.hx__text { color: rgba(255, 255, 255, .86); font-size: clamp(1.02rem, 1.4vw, 1.15rem); max-width: 44ch; }
.hx__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.6rem; }

/* Connection hub */
.hub { position: relative; width: min(100%, 470px); aspect-ratio: 1; justify-self: center; }
.hub__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hub__lines line { stroke: rgba(255, 255, 255, .38); stroke-width: 1.4; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
@media (prefers-reduced-motion: no-preference) {
    .hub__lines line { animation: flow 1.6s linear infinite; }
}
@keyframes flow { to { stroke-dashoffset: -18; } }
.hub__ring, .hub__core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border-radius: 50%; }
.hub__ring { width: 46%; aspect-ratio: 1; border: 1px dashed rgba(255, 255, 255, .3); }
@media (prefers-reduced-motion: no-preference) {
    .hub__ring { animation: spin 40s linear infinite; }
    .hub__core::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); animation: pulse 2.6s var(--ease) infinite; }
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes pulse { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.35); opacity: 0; } }
.hub__core {
    width: 31%; aspect-ratio: 1; display: grid; place-content: center; justify-items: center; gap: .35rem; text-align: center;
    background: linear-gradient(140deg, #ffffff, var(--accent-soft)); color: var(--brand-deep);
    box-shadow: 0 0 0 8px rgba(255, 255, 255, .12), 0 30px 60px -20px rgba(0, 0, 0, .55);
}
.hub__core .icon { width: 28px; height: 28px; color: var(--c-violet); }
.hub__core strong { font-family: var(--font-display); font-size: clamp(.72rem, 1.1vw, .86rem); line-height: 1.2; }
.hub__node {
    position: absolute; transform: translate(-50%, -50%); z-index: 1;
    display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
    padding: .45rem .8rem .45rem .45rem; border-radius: 999px;
    font-family: var(--font-display); font-weight: 600; font-size: .8rem; color: #fff;
    background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    transition: background-color .25s, scale .4s var(--ease);
}
.hub__node:hover { background: rgba(255, 255, 255, .26); scale: 1.06; }
.hub__node .icon {
    box-sizing: content-box; padding: 6px; width: 15px; height: 15px; border-radius: 999px; color: #fff;
    background: linear-gradient(135deg, var(--c), var(--c2));
}
@media (prefers-reduced-motion: no-preference) {
    .hub__node { animation: pop .7s var(--ease) both, bob 6s ease-in-out infinite; animation-delay: calc(.25s + var(--i) * 80ms), calc(var(--i) * -0.7s); }
}
@keyframes pop { from { opacity: 0; } to { opacity: 1; } }
@keyframes bob { 50% { translate: 0 -6px; } }

/* ---------- Sector strip (marquee) ---------- */
.strip { overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--line); padding: .85rem 0; }
.strip__track { display: flex; width: max-content; gap: 2.25rem; }
.strip__track span { display: inline-flex; align-items: center; gap: .5rem; white-space: nowrap; font-family: var(--font-display); font-weight: 500; font-size: .92rem; color: var(--ink-soft); }
.strip__track .icon { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
    .strip__track { animation: marquee 48s linear infinite; }
    .strip:hover .strip__track { animation-play-state: paused; }
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================================
   Icon tiles: one brand colour, one tile style site-wide
   ========================================================================= */
:is(.tile, .svc-card, .explorer__tab, .hub__node, .grid > .card, .story-flow li, .steps li) { --c: var(--c-violet); --c2: var(--c-violet-2); }

.tile__icon, .icon-tile {
    flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(135deg, var(--c, var(--c-violet)), var(--c2, var(--c-violet-2)));
    color: #fff; box-shadow: 0 10px 20px -10px var(--c, var(--c-violet));
    transition: transform .4s var(--ease);
}
.tile__icon .icon, .icon-tile .icon { width: 22px; height: 22px; }
.icon-tile { margin-bottom: .9rem; }

/* Pointer spotlight (JS sets --mx/--my on [data-spot]) */
[data-spot] { position: relative; isolation: isolate; }
[data-spot]::before {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; opacity: 0; transition: opacity .3s;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c, var(--accent)) 16%, transparent), transparent 70%);
}
[data-spot]:hover::before { opacity: 1; }

/* ---------- What we build ---------- */
.build { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 2fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.build__intro { position: sticky; top: calc(var(--header-h) + 1.25rem); }
.build__intro .btn { margin-top: 1.25rem; }
.build__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; }
.tile {
    display: flex; flex-direction: column; gap: .55rem; padding: 1.2rem; border-radius: var(--r);
    background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none;
    transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .25s;
}
.tile:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.tile:hover .tile__icon { transform: scale(1.06); }
.tile h3 { margin-top: .35rem; padding-right: 2rem; }
.tile p { font-size: .9rem; line-height: 1.5; }
.tile__tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: auto; padding-top: .3rem; }
.tile__tags li { font-size: .74rem; font-weight: 500; padding: .22rem .55rem; border-radius: 999px; background: color-mix(in srgb, var(--c) 10%, var(--surface)); color: var(--ink-soft); }
.tile__go {
    position: absolute; top: 1.2rem; right: 1.2rem; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px;
    color: var(--ink-mute); border: 1px solid var(--line); transition: transform .4s var(--ease), color .2s, border-color .2s, background-color .2s;
}
.tile__go .icon { width: 14px; height: 14px; }
.tile:hover .tile__go { color: #fff; background: var(--c); border-color: var(--c); transform: rotate(-45deg); }

/* ---------- Platform explorer ---------- */
.explorer { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 2fr); gap: 1rem; align-items: start; }
.explorer__list { display: grid; gap: .6rem; }
.explorer__tab {
    position: relative; overflow: hidden; display: flex; align-items: center; gap: .85rem; width: 100%; text-align: left;
    padding: .9rem 1rem; border-radius: var(--r); cursor: pointer; font: inherit; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line); transition: border-color .25s, box-shadow .3s var(--ease), transform .3s var(--ease);
}
.explorer__tab:hover { transform: translateX(3px); }
.explorer__tab[aria-selected="true"] { border-color: color-mix(in srgb, var(--c) 55%, var(--line)); box-shadow: var(--shadow-md); }
.explorer__label { display: grid; }
.explorer__label strong { font-family: var(--font-display); font-weight: 600; font-size: .98rem; }
.explorer__label small { color: var(--ink-mute); font-size: .82rem; }
.explorer__progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--c), var(--c2)); }
.explorer__tab[aria-selected="true"] .explorer__progress { transform: scaleX(1); }
.explorer.is-playing .explorer__tab[aria-selected="true"] .explorer__progress { animation: grow-x var(--autoplay, 7000ms) linear both; }
.explorer.is-paused .explorer__tab[aria-selected="true"] .explorer__progress { animation-play-state: paused; }
.explorer__panel {
    padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.explorer__panel h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); margin-bottom: .5rem; }
.explorer__panel > p { max-width: 70ch; }
.explorer__panel .check-list { margin: 1.1rem 0; }
.explorer__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.explorer__foot p { font-size: .9rem; }
.explorer__foot strong { color: var(--ink); }
.explorer__panel + .explorer__panel { margin-top: 1rem; }
[data-tabs]:not(.is-ready) .explorer__list { display: none; }
[data-tabs]:not(.is-ready) { grid-template-columns: 1fr; }
[data-tabs].is-ready .explorer__panel:not([data-active]) { display: none; }
[data-tabs].is-ready .explorer__panel + .explorer__panel { margin-top: 0; }
@media (prefers-reduced-motion: no-preference) {
    [data-tabs].is-ready .explorer__panel[data-active] { animation: rise .5s var(--ease) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Settings page ---------- */
.settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.settings__login { grid-column: 1 / -1; max-width: 420px; }
.settings__login h2, .settings__preview-title { font-size: 1.3rem; margin-bottom: 1rem; }
.settings__field .form-note { margin: -.1rem 0 .3rem; }
.settings__pick { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.settings__pick input[type="color"] { width: 64px; height: 48px; padding: 4px; border-radius: var(--r-sm); cursor: pointer; }
.settings__pick .settings__hex { width: 120px; font-family: ui-monospace, monospace; text-transform: lowercase; }
.settings__contrast { margin: .5rem 0 1.25rem; padding: .7rem .9rem; border-radius: var(--r-sm); font-size: .9rem; background: var(--ok-bg); color: var(--ok); }
.settings__contrast.is-low { background: var(--danger-bg); color: var(--danger); }
.settings__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.settings__preview { display: grid; gap: 1.1rem; position: sticky; top: calc(var(--header-h) + 1.5rem); }
.settings__panel { padding: 1.5rem; }
.settings__panel p { margin: .8rem 0 1rem; }
.settings__row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.settings__headline { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--ink); }
.settings__hl { color: var(--brand-coral); }
.settings__band { height: 56px; border-radius: var(--r); background: var(--grad-brand); }
@media (max-width: 1024px) {
    .settings { grid-template-columns: 1fr; }
    .settings__preview { position: static; }
}

/* ---------- About: experience highlight ---------- */
.exp-card {
    position: relative; isolation: isolate; overflow: hidden; color: #fff;
    padding: clamp(1.75rem, 4vw, 2.75rem); border-radius: 24px;
    background: linear-gradient(135deg, var(--g-deep-1), var(--g-deep-2));
    box-shadow: 0 34px 70px -40px var(--g-deep-1);
}
.exp-card::before { content: ""; position: absolute; z-index: -1; width: 300px; height: 300px; right: -110px; top: -120px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.exp-card::after { content: ""; position: absolute; z-index: -1; width: 130px; height: 130px; left: -40px; bottom: -60px; border-radius: 50%; border: 16px solid color-mix(in srgb, var(--brand-coral) 35%, transparent); }
.exp-card__top { display: flex; align-items: center; gap: 1.25rem; padding-bottom: 1.4rem; border-bottom: 1px solid rgba(255, 255, 255, .2); }
.exp-card__num { font-family: var(--font-display); font-weight: 700; font-size: clamp(3.5rem, 7vw, 5rem); line-height: 1; letter-spacing: -.04em; color: #fff; }
.exp-card__num span { color: var(--brand-coral-soft); }
.exp-card__label { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; line-height: 1.35; color: rgba(255, 255, 255, .92); }
.exp-card__list { margin: 1.4rem 0 0; gap: .75rem; }
.exp-card .exp-card__list li { color: rgba(255, 255, 255, .92); }
.exp-card .exp-card__list .icon { color: var(--brand-coral-soft); }

/* ---------- About: why businesses choose us ---------- */
.reasons { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.reasons__intro { position: sticky; top: calc(var(--header-h) + 2rem); }
.reasons__intro .btn { margin-top: 1.5rem; }
.reasons__panel {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
    box-shadow: 0 30px 60px -40px rgba(46, 29, 122, .45);
    border-top: 4px solid var(--brand-1);
}
.reason {
    display: flex; gap: 1rem; align-items: flex-start; padding: clamp(1.4rem, 3vw, 2rem);
    border-bottom: 1px solid var(--line); transition: background-color .3s;
}
.reason:nth-child(odd) { border-right: 1px solid var(--line); }
.reason:nth-last-child(-n + 2) { border-bottom: 0; }
.reason:hover { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
.reason:hover .tile__icon { transform: scale(1.06); }
.reason h3 { margin-bottom: .3rem; }
.reason p { font-size: .94rem; }
@media (max-width: 1024px) {
    .reasons { grid-template-columns: 1fr; }
    .reasons__intro { position: static; }
}
@media (max-width: 640px) {
    .reasons__panel { grid-template-columns: 1fr; }
    .reason:nth-child(odd) { border-right: 0; }
    .reason:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}

/* ---------- Highlighted band (home: platform explorer) ----------
   Light pastel mesh so it stands out without going dark; the selected platform
   shows as a full-colour panel that rolls in from the right. */
.hl-band { position: relative; isolation: isolate; overflow: hidden; padding: clamp(3rem, 7vw, 5rem) 0; }
.hl-band::before {
    content: ""; position: absolute; inset: 0; z-index: -2;
    background:
        radial-gradient(40% 60% at 8% 15%, color-mix(in srgb, var(--brand-2) 38%, transparent), transparent 70%),
        radial-gradient(35% 55% at 92% 18%, color-mix(in srgb, var(--brand-coral) 16%, transparent), transparent 70%),
        radial-gradient(45% 60% at 62% 100%, color-mix(in srgb, var(--brand-2) 18%, transparent), transparent 70%),
        color-mix(in srgb, var(--brand) 5%, #fff);
    background-size: 140% 140%;
}
.hl-band::after {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35; pointer-events: none;
    background-image: radial-gradient(color-mix(in srgb, var(--brand) 35%, transparent) 1px, transparent 1.2px); background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(70% 80% at 50% 40%, #000, transparent);
    mask-image: radial-gradient(70% 80% at 50% 40%, #000, transparent);
}
@media (prefers-color-scheme: dark) {
    .hl-band::before { background-color: #17132e; }
    .hl-band::after { opacity: .15; }
}
@media (prefers-reduced-motion: no-preference) { .hl-band::before { animation: mesh 18s ease-in-out infinite alternate; } }
.hl-band .eyebrow { color: var(--accent); }

/* Tabs: white cards; the selected one fills with its platform colour */
.hl-band .explorer__tab { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); }
.hl-band .explorer__tab:hover { border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.hl-band .explorer__tab[aria-selected="true"] {
    background: linear-gradient(135deg, var(--g1), var(--g2)); color: #fff; border-color: transparent;
    box-shadow: 0 22px 44px -22px var(--g1); transform: translateX(6px);
}
.hl-band .explorer__tab[aria-selected="true"] .explorer__label small { color: rgba(255, 255, 255, .88); }
.hl-band .explorer__tab[aria-selected="true"] .tile__icon { background: rgba(255, 255, 255, .22); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.hl-band .explorer__tab .explorer__progress { background: rgba(255, 255, 255, .85); height: 4px; }

/* Roll-in: each platform slides in from the right as the rotation moves on */
@media (prefers-reduced-motion: no-preference) {
    .hl-band [data-tabs].is-ready .explorer__panel[data-active] { animation: roll-in .7s var(--ease) both; }
}
@keyframes roll-in {
    from { opacity: 0; transform: translateX(48px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
.hl-band .explorer__panel {
    position: relative; isolation: isolate; overflow: hidden; border: 0; color: #fff;
    background: linear-gradient(135deg, var(--g1), var(--g2));
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6);
}
.hl-band .explorer__panel::before, .hl-band .explorer__panel::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.hl-band .explorer__panel::before { width: 320px; height: 320px; right: -110px; top: -130px; background: rgba(255, 255, 255, .12); }
.hl-band .explorer__panel::after { width: 140px; height: 140px; left: 45%; bottom: -70px; border: 18px solid rgba(255, 255, 255, .14); }
.explorer__head { display: flex; align-items: center; gap: .9rem; margin-bottom: .75rem; }
.explorer__head h3 { margin: 0; }
.hl-band .explorer__panel h3 { color: #fff; }
.hl-band .explorer__panel .tile__icon { background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); color: #fff; }
.hl-band .explorer__desc { color: rgba(255, 255, 255, .92); }
.hl-band .explorer__caps {
    padding: 1.2rem 1.4rem; border-radius: 16px; background: var(--surface);
    box-shadow: 0 20px 40px -26px rgba(0, 0, 0, .5);
}
.hl-band .explorer__caps li { color: var(--ink-soft); }
.hl-band .explorer__caps .icon { color: var(--g1); }
.hl-band .explorer__foot { border-top-color: rgba(255, 255, 255, .25); }
.hl-band .explorer__foot p, .hl-band .explorer__foot strong { color: #fff; }
.hl-band .btn--light { color: var(--g1); }

/* ---------- Services grid ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; }
.svc-card {
    display: flex; gap: .85rem; align-items: flex-start; padding: 1.1rem; border-radius: var(--r);
    background: var(--surface); border: 1px solid var(--line); transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .25s;
}
.svc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.svc-card:hover .tile__icon { transform: scale(1.06); }
.svc-card h3 { font-size: .98rem; margin-bottom: .2rem; }
.svc-card p { font-size: .86rem; line-height: 1.45; }

/* ---------- Steps (scroll-linked fill) ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: .75rem; counter-reset: step; padding-top: 2.6rem; }
.steps::before, .steps::after { content: ""; position: absolute; left: 0; right: 0; top: .9rem; height: 3px; border-radius: 3px; }
.steps::before { background: var(--line); }
.steps::after { background: var(--grad-brand); transform-origin: 0 50%; }
@supports (animation-timeline: view()) {
    @media (prefers-reduced-motion: no-preference) {
        .steps::after { animation: grow-x linear both; animation-timeline: view(); animation-range: entry 20% cover 55%; }
    }
}
.steps li { position: relative; counter-increment: step; }
.steps li::before {
    content: counter(step); position: absolute; top: -2.6rem; left: 0; display: grid; place-items: center;
    width: 32px; height: 32px; border-radius: 999px; z-index: 1;
    font-family: var(--font-display); font-weight: 700; font-size: .82rem; color: #fff;
    background: linear-gradient(135deg, var(--c), var(--c2)); box-shadow: 0 0 0 4px var(--surface-2);
}
.steps h3 { font-size: .98rem; margin-bottom: .2rem; }
.steps p { font-size: .84rem; line-height: 1.45; }

/* ---------- Why + outcomes ---------- */
.why { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: stretch; }
.why__list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.75rem; margin-top: 1.1rem; }
.why__list > div { padding: .9rem 0; border-top: 1px solid var(--line); }
.why__list dt { font-family: var(--font-display); font-weight: 600; color: var(--ink); margin-bottom: .15rem; }
.why__list dd { color: var(--ink-soft); font-size: .92rem; }
.outcomes-card {
    position: relative; isolation: isolate; overflow: hidden; padding: clamp(1.4rem, 3vw, 2rem); border-radius: var(--r);
    background: var(--grad-brand); color: #fff;
}
.outcomes-card::after { content: ""; position: absolute; z-index: -1; width: 220px; height: 220px; right: -70px; top: -70px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.outcomes-card h2 { color: #fff; font-size: clamp(1.3rem, 2.2vw, 1.65rem); margin-bottom: 1rem; }
.outcomes-card .check-list li { color: rgba(255, 255, 255, .88); }
.outcomes-card .check-list strong { color: #fff; }
.outcomes-card .check-list .icon { color: var(--brand-coral-soft); }

/* ---------- Insights ---------- */
.insights { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); gap: clamp(1.25rem, 4vw, 3rem); align-items: center; }
.insights h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.insights li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-weight: 500; color: var(--ink); }
.insights li:first-child { border-top: 1px solid var(--line); }
.insights em { flex: none; font-style: normal; font-family: var(--font-body); font-size: .76rem; color: var(--ink-mute); padding: .22rem .6rem; border-radius: 999px; border: 1px dashed var(--line-strong); }

/* =========================================================================
   Shared components (interior pages)
   ========================================================================= */
.grid { display: grid; gap: .85rem; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card {
    position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
    padding: clamp(1.2rem, 2.5vw, 1.6rem); transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--c, var(--accent)) 40%, var(--line)); }
.card:hover .icon-tile { transform: scale(1.06); }
.card h3 { margin: .1rem 0 .4rem; }
.card__title { font-size: clamp(1.15rem, 1.8vw, 1.35rem); margin: 0 0 .45rem; }
.card__icon-title { display: flex; align-items: center; gap: .5rem; }
.card__icon-title .icon { color: var(--c, var(--accent)); }
.card__foot { margin-top: .9rem; }
.card--gradient { background: var(--grad-brand); color: #fff; border: 0; }
.card--gradient h3, .card--gradient p { color: #fff; }
.page-hero__actions { margin-top: 1.25rem; }
.about-note { margin-top: 1.1rem; }
.contact-tags { margin-top: 1.1rem; }
.contact-tags ~ p { margin-top: .9rem; }
.form-note--legal { margin-top: .9rem; }

ul.tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tags li { font-size: .8rem; font-weight: 500; background: var(--surface); color: var(--ink-soft); padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chips li { font-size: .8rem; padding: .3rem .65rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-soft); }

.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.2em; stroke-width: 1.7; }
.check-list { display: grid; gap: .5rem; margin: .5rem 0; }
.check-list li { display: flex; align-items: flex-start; gap: .55rem; color: var(--ink-soft); font-size: .92rem; line-height: 1.45; }
.check-list .icon { color: var(--accent); margin-top: .12em; width: 1.05em; height: 1.05em; stroke-width: 2.2; }
.check-list li span { flex: 1; }
.check-list--2 { grid-template-columns: 1fr 1fr; column-gap: 1.5rem; }

.feature-row { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(1.5rem, 4vw, 2.5rem); align-items: start; }
.feature-row__meta { font-size: .88rem; color: var(--ink-mute); margin-top: .9rem; }
.feature-row__meta strong { display: block; margin-bottom: .25rem; color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
.feature-row__meta strong + br { display: none; }

.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem 1rem; counter-reset: step; }
.timeline__item { position: relative; padding: 1rem 1.1rem; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); counter-increment: step; }
.timeline__item::before {
    content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; margin-bottom: .6rem;
    font-family: var(--font-display); font-weight: 700; font-size: .8rem; color: #fff; background: var(--grad-brand);
}
.timeline__item h3 { margin-bottom: .2rem; }
.timeline__item p { font-size: .88rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; }
.story-flow { display: grid; gap: .45rem; counter-reset: story; }
.story-flow li {
    display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; border-radius: var(--r-sm);
    background: var(--surface); border: 1px solid var(--line); font-family: var(--font-display); font-weight: 500; color: var(--ink);
    transition: transform .3s var(--ease);
}
.story-flow li:hover { transform: translateX(4px); }
.story-flow li::before {
    counter-increment: story; content: counter(story); display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 999px;
    font-size: .78rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--c), var(--c2));
}

.work-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
/* TODO: replace with real project screenshots (16:10, ~1200x750) */
.work-card__media {
    aspect-ratio: 16 / 9; position: relative; overflow: hidden; isolation: isolate;
    display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: .5rem; padding: 1.25rem;
    background: linear-gradient(135deg, var(--c, var(--c-violet)), var(--c2, var(--c-violet-2)));
    font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: #fff;
}
.work-card__media::after { content: ""; position: absolute; z-index: -1; width: 70%; aspect-ratio: 1; right: -20%; top: -35%; border-radius: 50%; background: rgba(255, 255, 255, .16); transition: transform .6s var(--ease); }
.work-card:hover .work-card__media::after { transform: scale(1.15); }
.work-card__media .icon { width: 30px; height: 30px; }
.work-card__body { padding: clamp(1.1rem, 2.5vw, 1.5rem); }
.work-card__meta { font-size: .76rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-mute); }
.work-card__body h3 { margin: .3rem 0 .4rem; }

/* ---------- Page hero (interior) - same animated mesh as home ---------- */
.page-hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; padding: clamp(2rem, 4.5vw, 3.25rem) 0; }
.page-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(40% 70% at 10% 10%, color-mix(in srgb, color-mix(in srgb, var(--brand) 60%, #fff) 55%, transparent), transparent 70%),
        radial-gradient(35% 70% at 90% 0%, color-mix(in srgb, var(--brand-coral) 20%, transparent), transparent 70%),
        radial-gradient(45% 80% at 70% 110%, color-mix(in srgb, color-mix(in srgb, var(--brand) 60%, #000) 50%, transparent), transparent 70%),
        var(--brand);
    background-size: 140% 140%;
}
@media (prefers-reduced-motion: no-preference) { .page-hero::before { animation: mesh 18s ease-in-out infinite alternate; } }
/* Header text spreads across the full container width */
.page-hero h1 { color: #fff; max-width: none; text-wrap: wrap; font-size: clamp(1.9rem, 3.8vw, 2.8rem); }
.page-hero .lead { color: rgba(255, 255, 255, .86); max-width: none; text-wrap: wrap; }
.page-hero .grad-text { color: var(--brand-coral-soft); }
.breadcrumbs { font-size: .84rem; color: rgba(255, 255, 255, .7); margin-bottom: .9rem; }
.breadcrumbs a { color: rgba(255, 255, 255, .85); }
.breadcrumbs span { margin: 0 .4rem; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; isolation: isolate; overflow: hidden; background: var(--grad-brand); color: #fff; padding: clamp(2rem, 4.5vw, 3rem) 0; }
.cta-band::before { content: ""; position: absolute; z-index: -1; width: 280px; height: 280px; right: 16%; top: -150px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
.cta-band::after { content: ""; position: absolute; z-index: -1; width: 130px; height: 130px; left: -40px; bottom: -60px; border-radius: 50%; border: 16px solid color-mix(in srgb, var(--brand-coral) 40%, transparent); }
.cta-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem 2rem; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .88); margin-top: .4rem; max-width: 52ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface-2); color: var(--ink-soft); padding: clamp(2rem, 4vw, 2.75rem) 0 1.25rem; border-top: 1px solid var(--line); }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: 2rem; }
.site-footer__brand p { font-size: .92rem; max-width: 36ch; }
.site-footer__tag { color: var(--accent); font-family: var(--font-display); font-weight: 600; margin: .8rem 0 .3rem; }
.site-footer__col h3 { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin-bottom: .8rem; }
.site-footer__col li { margin-bottom: .4rem; font-size: .92rem; }
.site-footer__social { display: flex; gap: 1rem; margin-top: .8rem; flex-wrap: wrap; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .86rem; }
.site-footer__bottom ul { display: flex; gap: 1.25rem; }

/* ---------- Back to top ---------- */
.to-top {
    position: fixed; right: clamp(1rem, 3vw, 1.75rem); bottom: clamp(1rem, 3vw, 1.75rem); z-index: 90;
    width: 46px; height: 46px; border: 0; border-radius: 999px; background: var(--grad-brand); color: #fff; cursor: pointer;
    display: grid; place-items: center; box-shadow: var(--shadow-lg); transition: transform .3s var(--ease);
}
.to-top:hover { transform: translateY(-3px); }
.to-top[hidden] { display: none; }
.to-top .icon { width: 20px; height: 20px; transform: rotate(-90deg); }

/* ---------- Forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--shadow-md); }
.field { display: grid; gap: .4rem; margin-bottom: 1rem; }
.field label { font-family: var(--font-display); font-weight: 600; font-size: .88rem; color: var(--ink); }
.field input, .field select, .field textarea {
    width: 100%; padding: .75rem .95rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
    font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-mute); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { min-height: 130px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.field-error { font-size: .85rem; color: var(--danger); }
.form-note { font-size: .85rem; color: var(--ink-mute); }
.alert { padding: .9rem 1.1rem; border-radius: var(--r-sm); margin-bottom: 1.25rem; font-weight: 500; }
.alert--ok { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); }
.alert--err { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-line); }

/* ---------- Prose ---------- */
.prose { max-width: 720px; }
.prose h2 { margin: 1.75rem 0 .7rem; font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
.prose h3 { margin: 1.4rem 0 .5rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose p + p { margin-top: .8rem; }
.prose ul { list-style: disc; padding-left: 1.4rem; margin: .8rem 0; }
.prose li { margin-bottom: .4rem; }

/* ---------- Scroll reveal (staggered) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
    .js [data-reveal].is-visible { opacity: 1; transform: none; }
}

/* ---------- Dark-mode specifics ---------- */
@media (prefers-color-scheme: dark) {
    .brand__logo { background: #ffffff; padding: 5px 12px; border-radius: var(--r-sm); box-sizing: content-box; height: 58px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 3rem; }
    .steps::before, .steps::after { display: none; }
}
@media (max-width: 1024px) {
    .nav-toggle { display: block; }
    .primary-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
        background: var(--surface); border-bottom: 1px solid var(--line); padding: .75rem 1.25rem 1.25rem; box-shadow: var(--shadow-lg);
        transform: translateY(-120%); visibility: hidden; transition: transform .4s var(--ease), visibility .4s;
        max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
    }
    .primary-nav.is-open { transform: translateY(0); visibility: visible; }
    .primary-nav__list { flex-direction: column; align-items: stretch; gap: 0; width: 100%; }
    .primary-nav__item { border-bottom: 1px solid var(--line); display: block; height: auto; }
    .primary-nav__item > a { padding: .8rem .25rem; border-radius: 0; background: none; }
    .primary-nav__item > a:hover, .primary-nav__item > a[aria-current="page"] { background: none; }
    .submenu { position: static; transform: none; opacity: 1; visibility: visible; box-shadow: none; border: 0; padding: 0 0 .5rem .6rem; min-width: 0; background: transparent; }
    .primary-nav__item.has-children:hover .submenu, .primary-nav__item.has-children:focus-within .submenu { transform: none; }
    .primary-nav__cta { margin-top: .9rem; }

    .hx__grid, .build, .explorer, .why, .insights, .split, .feature-row { grid-template-columns: 1fr; }
    .hub { width: min(100%, 420px); }
    .build__intro { position: static; }
    .explorer__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .explorer__label small { display: none; }
    .grid--3, .grid--4, .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
    body { font-size: 16px; }
    .container { width: calc(100% - 2rem); }
    :root { --header-h: 70px; }
    .brand__logo, .brand__logo--footer { height: 54px; }
    .hub__node { font-size: .7rem; padding: .35rem .6rem .35rem .35rem; }
    .hub__node .icon { padding: 4px; width: 12px; height: 12px; }
    .hub__core strong { font-size: .66rem; }
    .svc-grid, .why__list, .grid--2, .grid--3, .grid--4, .timeline, .field-row, .check-list--2 { grid-template-columns: 1fr; }
    .build__grid { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: 1fr 1fr; }
    .explorer__list { grid-template-columns: 1fr; }
    .explorer__label small { display: block; }
    .site-footer__grid { grid-template-columns: 1fr; }
    .cta-band__actions, .cta-band__actions .btn { width: 100%; }
}
@media (max-width: 480px) {
    .build__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    html { scroll-behavior: auto; }
}

/* =========================================================================
   Website assistant (chat widget)
   ========================================================================= */
/* Assistant: round floating chat button, bottom-right. Back-to-top sits above it. */
.to-top { bottom: calc(clamp(1rem, 3vw, 1.75rem) + 74px); }
.assistant {
    /* Follows the theme colour (and the Settings page) */
    --assistant-1: var(--brand); --assistant-2: var(--g-deep-2); --assistant-glow: var(--brand);
    --assistant-ink: #ffffff;
    position: fixed; right: clamp(1rem, 3vw, 1.75rem); bottom: clamp(1rem, 3vw, 1.75rem); z-index: 110;
    display: flex; flex-direction: column; align-items: flex-end; gap: .85rem;
}
.assistant__toggle {
    position: relative; display: grid; place-items: center; width: 60px; height: 60px; padding: 0;
    border: 0; border-radius: 50%; cursor: pointer; color: #fff;
    background: linear-gradient(135deg, var(--assistant-1), var(--assistant-2));
    box-shadow: 0 14px 30px -12px var(--assistant-1);
    transition: transform .3s var(--ease);
}
.assistant__toggle .icon { width: 28px; height: 28px; transition: transform .3s var(--ease); }
.assistant__toggle:hover { transform: translateY(-3px) scale(1.04); }
.assistant__toggle:active { transform: scale(.95); }
.assistant__toggle:focus-visible { outline: 3px solid var(--assistant-1); outline-offset: 4px; }
/* Pulsing glow ring until the chat is opened */
.assistant__toggle::before {
    content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
    border: 2px solid var(--assistant-glow); opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
    .assistant:not(.is-open) .assistant__toggle::before { animation: assistant-ring 2.4s var(--ease) infinite; }
    .assistant__toggle.is-flash { animation: assistant-flash .6s var(--ease); }
}
@keyframes assistant-ring { 0% { transform: scale(1); opacity: .65; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes assistant-flash {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--assistant-glow) 70%, transparent), 0 14px 30px -12px var(--assistant-1); }
    100% { box-shadow: 0 0 0 18px color-mix(in srgb, var(--assistant-glow) 0%, transparent), 0 14px 30px -12px var(--assistant-1); }
}
/* "Online" dot */
.assistant__dot {
    position: absolute; top: 3px; right: 3px; width: 13px; height: 13px; border-radius: 50%;
    background: #fc721d; box-shadow: 0 0 0 2px #fff;   /* logo orange */
}
.assistant.is-open .assistant__dot { display: none; }
.assistant.is-open .assistant__toggle .icon { transform: rotate(-8deg) scale(.92); }
.assistant__panel {
    width: min(380px, calc(100vw - 2rem)); height: min(560px, calc(100dvh - 120px)); display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg);
}
.assistant__panel[hidden], .assistant__chips[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .assistant__panel:not([hidden]) { animation: slide-in-left .35s var(--ease) both; } }
@keyframes slide-in-left { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.assistant__head { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.1rem; color: var(--assistant-ink); background: linear-gradient(135deg, var(--assistant-1), var(--assistant-2)); }
.assistant__head h2 { color: var(--assistant-ink); font-size: 1rem; margin: 0; }
.assistant__head p { color: color-mix(in srgb, var(--assistant-ink) 80%, transparent); font-size: .8rem; margin: 0; }
.assistant__avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .3); color: var(--assistant-ink); }
.assistant__close { margin-left: auto; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 999px; cursor: pointer; color: var(--assistant-ink); background: rgba(255, 255, 255, .3); }
.assistant__close:hover { background: rgba(255, 255, 255, .5); }
.assistant__log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: var(--surface-2); }
.assistant__msg { max-width: 85%; padding: .65rem .85rem; border-radius: 14px; font-size: .92rem; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.assistant__msg--bot { align-self: flex-start; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.assistant__msg--user { align-self: flex-end; background: var(--assistant-1); color: var(--assistant-ink); border-bottom-right-radius: 4px; }
.assistant__msg--user a { color: inherit; }
.assistant__msg.is-typing::after { content: "\2022\2022\2022"; letter-spacing: 3px; color: var(--ink-mute); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.assistant__chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: .6rem 1rem; background: var(--surface-2); border-top: 1px solid var(--line); }
.assistant__chips button { font: 500 .8rem/1.2 var(--font-body); padding: .4rem .7rem; border-radius: 999px; cursor: pointer; color: var(--accent); background: var(--surface); border: 1px solid var(--line-strong); }
.assistant__chips button:hover { border-color: var(--accent); }
.assistant__form { display: flex; gap: .5rem; padding: .75rem; border-top: 1px solid var(--line); }
.assistant__form input { flex: 1; min-width: 0; padding: .7rem .9rem; border: 1px solid var(--line-strong); border-radius: 999px; font: inherit; font-size: .95rem; color: var(--ink); background: var(--bg); }
.assistant__form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.assistant__form button { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 999px; cursor: pointer; color: var(--assistant-ink); background: var(--assistant-1); }
.assistant__note { padding: 0 1rem .7rem; font-size: .74rem; color: var(--ink-mute); }

/* =========================================================================
   Cookie consent banner
   ========================================================================= */
.consent {
    position: fixed; left: clamp(1rem, 3vw, 1.75rem); right: clamp(1rem, 3vw, 1.75rem); bottom: clamp(1rem, 3vw, 1.75rem); z-index: 120;
    max-width: 980px; margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem;
    padding: 1.1rem 1.25rem; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
.consent[hidden], .consent__prefs[hidden] { display: none; }
.consent__body { flex: 1 1 420px; }
.consent__body p { font-size: .9rem; }
.consent__actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.consent__prefs { display: grid; gap: .5rem; margin-top: .9rem; }
.consent__prefs label { display: flex; align-items: baseline; gap: .5rem; font-size: .9rem; font-weight: 600; color: var(--ink); }
.consent__prefs label span { font-weight: 400; color: var(--ink-mute); font-size: .82rem; }
.consent__prefs .btn { justify-self: start; margin-top: .3rem; }
@media (max-width: 640px) {
    .assistant__panel { width: calc(100vw - 2rem); height: min(560px, calc(100dvh - 140px)); }
    .consent__actions { width: 100%; }
    .consent__actions .btn { flex: 1; }
}

/* ---------- FAQ (native details/summary) ---------- */
.faq__inner { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.faq__head { position: sticky; top: calc(var(--header-h) + 2rem); }
.faq__list { display: grid; gap: .6rem; }
.faq__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); transition: border-color .25s, box-shadow .3s var(--ease); }
.faq__item[open] { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: var(--shadow-md); }
.faq__item summary {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; cursor: pointer; list-style: none;
    font-family: var(--font-display); font-weight: 600; color: var(--ink);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; font-size: 1.1rem; color: var(--accent); background: var(--accent-soft); transition: transform .3s var(--ease); }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item p { padding: 0 1.2rem 1.1rem; }
@media (max-width: 1024px) { .faq__inner { grid-template-columns: 1fr; } .faq__head { position: static; } }

/* ---------- Header "Let's Talk": soft breathing glow ---------- */
.primary-nav__cta { position: relative; isolation: isolate; }
.primary-nav__cta::after {
    content: ""; position: absolute; inset: -3px; z-index: -1; border-radius: inherit; pointer-events: none;
    background: linear-gradient(120deg, var(--brand), var(--brand-coral), var(--brand));
    background-size: 200% 100%; filter: blur(10px); opacity: .55;
}
@media (prefers-reduced-motion: no-preference) {
    .primary-nav__cta::after { animation: cta-glow 2.8s ease-in-out infinite; }
}
@keyframes cta-glow {
    0%, 100% { opacity: .35; transform: scale(.96); background-position: 0% 50%; }
    50%      { opacity: .85; transform: scale(1.06); background-position: 100% 50%; }
}
.primary-nav__cta:hover::after { opacity: 1; }
@media (max-width: 1024px) { .primary-nav__cta::after { display: none; } }

/* ---------- Maths security check (CAPTCHA) ---------- */
.captcha__row { display: flex; gap: .6rem; align-items: center; }
.captcha__row input { max-width: 140px; }
.captcha__new { flex: none; padding: .6rem .9rem; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); color: var(--accent); font: 600 .85rem/1 var(--font-display); cursor: pointer; }
.captcha__new:hover { border-color: var(--accent); }
.captcha .field-error[hidden] { display: none; }

/* ---------- Contact page: wider form, info column aligned to the top ---------- */
.contact-layout { grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); align-items: start; gap: clamp(1.5rem, 4vw, 3.5rem); }
.contact-layout__info { position: sticky; top: calc(var(--header-h) + 2rem); }
.contact-layout .form-card { padding: clamp(1.5rem, 3.5vw, 2.75rem); }
.contact-layout .form-card textarea { min-height: 170px; }
@media (max-width: 1024px) {
    .contact-layout { grid-template-columns: 1fr; }
    .contact-layout__info { position: static; }
}

/* ---------- FAQ page ---------- */
.faq-page { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.7fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.faq-page__side { position: sticky; top: calc(var(--header-h) + 1.5rem); display: grid; gap: 1.25rem; }
.faq-search { display: flex; align-items: center; gap: .6rem; padding: 0 1rem; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink-mute); }
.faq-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.faq-search input { flex: 1; min-width: 0; border: 0; padding: .8rem 0; font: inherit; color: var(--ink); background: transparent; outline: none; }
.faq-page__topics { display: grid; gap: .25rem; }
.faq-page__topics a { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border-radius: var(--r-sm); color: var(--ink-soft); font-family: var(--font-display); font-weight: 500; }
.faq-page__topics a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.faq-page__topics .icon { color: var(--accent); }
.faq-page__help { padding: 1.25rem; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.faq-page__help h2 { font-size: 1.05rem; margin-bottom: .3rem; }
.faq-page__help p { font-size: .9rem; margin-bottom: .9rem; }
.faq-page__main { display: grid; gap: 2rem; }
.faq-group { scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.faq-group[hidden], .faq__item[hidden], .faq-page__empty[hidden] { display: none; }
.faq-group__title { display: flex; align-items: center; gap: .75rem; font-size: 1.3rem; margin-bottom: 1rem; }
@media (max-width: 1024px) {
    .faq-page { grid-template-columns: 1fr; }
    .faq-page__side { position: static; }
}

/* Contact page FAQ link */
.contact-faq { display: flex; align-items: center; gap: .75rem; margin-top: 1.75rem; padding: 1rem 1.1rem; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); }
.contact-faq .tile__icon { width: 40px; height: 40px; }
.contact-faq p { font-size: .92rem; margin: 0; }
.contact-faq strong { display: block; color: var(--ink); font-family: var(--font-display); }
