/* ============================================================
   Innovo Digital Solutions — "The Quiet Console"
   Near-black canvas, light type, brand blue + green.
   ============================================================ */

/* Self-hosted fonts (SIL Open Font License, see fonts/LICENSE-*.txt; files from Fontsource).
   Same-origin and preloaded, so the headline isn't held up by a Google Fonts round trip.
   Latin subset only, matching what Google served; other characters fall back to the stack. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/inter-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Saira Condensed"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/saira-condensed-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
    --bg: #08090a;
    --bg-raised: #0c0d10;
    --panel: #131317;
    --panel-top: #17181c;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.13);
    --text: #f7f8f8;
    --text-2: #d0d3d8;
    --muted: #8a8f98;
    --faint: #80848c; /* lightest grey that still reads at 4.5:1 on --bg, --panel and --panel-top */
    --accent-blue: #3b82f6;
    --blue-fill: #2563eb; /* --accent-blue darkened for solid fills behind white text (5.2:1) */
    --accent-green: #00ff6a;
    --green: #4cb782; /* muted — semantic success/positive, kept distinct from the brand-bright --accent-green */
    --amber: #f2c94c;
    --mesh-teal: 6, 182, 212; /* r,g,b — bluer teal (cyan-leaning), separate from the green aurora */

    --sans: "Inter", system-ui, -apple-system, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;

    --xs: 8px; --sm: 16px; --md: 28px; --lg: 56px; --xl: 110px;
    --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px;

    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --quick: 160ms;
    --shadow-ambient: 0 12px 40px -16px rgba(0,0,0,0.7);
    --shadow-hover: 0 8px 28px -14px rgba(0,0,0,0.6);

    --shell: 1140px;
    --measure: 66ch;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
    font-family: var(--sans);
    font-size: 1.05rem; line-height: 1.6;
    color: var(--text); background: var(--bg);
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    overflow-x: hidden;
    overflow-x: clip; /* clips like hidden without making body a scroll container, which would break position: sticky (.ai-bar) */
}
::selection { background: rgba(59,130,246,0.35); color: var(--text); }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--text); color: var(--bg); padding: 12px 18px; z-index: 200; font-size: 0.85rem; border-radius: var(--r-sm); }
.skip-link:focus { left: 16px; top: 16px; }

/* ---------- Neural mesh (teal, behind the green aurora) ---------- */
#bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
@media (max-width: 680px) { #bg-canvas { display: none; } }
/* mobile homepage: expertise cards come before the stats strip. Sections keep their DOM order within each group. */
@media (max-width: 680px) {
    main#main { display: flex; flex-direction: column; }
    main#main > .hero { order: -1; }
    main#main > #services { order: 1; }
    main#main > .trust-strip { order: 2; }
    main#main > section:not(.hero):not(#services):not(.trust-strip) { order: 3; }
    /* the <hr> dividers aren't ordered, so they'd all collect between the hero and the cards; drop them on phones */
    main#main > .divider { display: none; }
}

/* ---------- Aurora ---------- */
.aurora { position: fixed; top: -260px; left: 50%; transform: translateX(-50%); width: 1100px; height: 760px; pointer-events: none; z-index: 0;
    background: radial-gradient(closest-side, rgba(0,255,106,0.20), rgba(0,255,106,0.08) 45%, transparent 72%);
    filter: blur(20px); opacity: 0.9; }

/* ---------- Shell / sections ---------- */
.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding-inline: 28px; position: relative; z-index: 1; }
.shell-wide { max-width: 1600px; }
.section { padding-block: var(--xl); }
.section.tight { padding-block: var(--lg); }
.measure { max-width: var(--measure); color: var(--muted); font-size: 1.1rem; }

/* ---------- Type ---------- */
.headline { font-weight: 600; font-size: clamp(1.8rem, 3.4vw, 2.85rem); line-height: 1.1; letter-spacing: -0.025em; max-width: 19ch; color: var(--text); }
.headline em { font-style: italic; font-weight: 600; color: var(--text); }
.title { font-weight: 560; font-size: 1.15rem; line-height: 1.35; letter-spacing: -0.012em; color: var(--text); }

.num { font-size: 0.82rem; color: var(--accent-blue); font-weight: 510; }

.section-head { margin-bottom: var(--lg); display: flex; flex-direction: column; gap: var(--sm); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-size: 0.92rem; font-weight: 540; letter-spacing: -0.005em; padding: 11px 24px; border-radius: var(--r-sm); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background var(--quick) var(--ease), border-color var(--quick) var(--ease), color var(--quick) var(--ease), transform var(--quick) var(--ease); white-space: nowrap; }
.btn-primary { background: var(--text); color: var(--bg); }
/* background-size + animation live in this same rule (not a separate one) — a second rule setting
   background-size alone gets silently reset by this rule's "background" shorthand, same issue as
   the .linear-gradient bug earlier. */
.btn-primary:hover { background: linear-gradient(135deg, var(--accent-blue), var(--accent-green), var(--accent-blue), var(--accent-green)); background-size: 300% 300%; animation: gradient-shift 6s ease infinite; color: #fff; border-color: transparent; }
.btn-ghost { background: rgba(255,255,255,0.04); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: linear-gradient(135deg, var(--accent-blue), var(--accent-green), var(--accent-blue), var(--accent-green)); background-size: 300% 300%; animation: gradient-shift 6s ease infinite; color: #fff; border-color: transparent; }
@media (prefers-reduced-motion: reduce) {
    .btn-primary:hover, .btn-ghost:hover { animation: none; }
}
.btn-sm { padding: 8px 14px; font-size: 0.88rem; }
.btn.full { width: 100%; justify-content: center; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: var(--sm); }
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card-grid.four { grid-template-columns: repeat(4, 1fr); }
.card { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px; transition: border-color var(--quick) var(--ease), transform var(--quick) var(--ease), box-shadow var(--quick) var(--ease), background var(--quick) var(--ease); overflow: hidden; }
.card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent); }
.card .title { margin-bottom: 10px; }
.card p { color: var(--muted); }

/* ---------- Expertise cards (clickable, tonal — precursor to per-service pages) ---------- */
/* two classes here (not just .expertise-grid) so this reliably beats .card-grid's own gap:var(--sm) rule */
.card-grid.expertise-grid { gap: 40px; }
.expertise-card { position: relative; display: flex; min-height: 480px; border-radius: var(--r-lg); border: 1px solid var(--border); overflow: hidden; text-decoration: none; color: inherit; transition: border-color var(--quick) var(--ease), transform var(--quick) var(--ease), box-shadow var(--quick) var(--ease); }
.expertise-card:hover { border-color: var(--border-strong); transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.expertise-card { --ex-text: var(--text); --ex-text-2: var(--text-2); --ex-dot: rgba(255,255,255,0.22); }
.expertise-visual { position: absolute; inset: 0; z-index: 0; background: var(--panel-top); }
.expertise-visual::before { content: ""; position: absolute; inset: 0; }
.expertise-visual::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--ex-dot) 1.2px, transparent 1.6px); background-size: 15px 15px; }
/* lighter scrim + a second glow in the opposite corner than before — lets more of the saturated
   color through for a punchier, less washed-out card while still keeping text legible.
   four distinct hues now (azure/sky/teal/mint), alternating between the two original opacity
   profiles — only the rgb triples changed, every opacity value is untouched. */
.expertise-card[data-tone="azure"] .expertise-visual::before { background: linear-gradient(180deg, rgba(0,0,0,0.32), rgba(0,0,0,0.04) 45%, rgba(0,0,0,0.4)), radial-gradient(circle at 22% 15%, rgba(58,134,242,0.75), transparent 65%), radial-gradient(circle at 88% 92%, rgba(58,134,242,0.4), transparent 60%), linear-gradient(135deg, rgba(58,134,242,0.35), transparent); }
.expertise-card[data-tone="sky"] .expertise-visual::before { background: linear-gradient(180deg, rgba(0,0,0,0.32), rgba(0,0,0,0.04) 45%, rgba(0,0,0,0.4)), radial-gradient(circle at 22% 15%, rgba(44,162,211,0.6), transparent 65%), radial-gradient(circle at 88% 92%, rgba(44,162,211,0.32), transparent 60%), linear-gradient(135deg, rgba(44,162,211,0.3), transparent); }
.expertise-card[data-tone="teal"] .expertise-visual::before { background: linear-gradient(180deg, rgba(0,0,0,0.32), rgba(0,0,0,0.04) 45%, rgba(0,0,0,0.4)), radial-gradient(circle at 22% 15%, rgba(34,176,194,0.75), transparent 65%), radial-gradient(circle at 88% 92%, rgba(34,176,194,0.4), transparent 60%), linear-gradient(135deg, rgba(34,176,194,0.35), transparent); }
.expertise-card[data-tone="mint"] .expertise-visual::before { background: linear-gradient(180deg, rgba(0,0,0,0.32), rgba(0,0,0,0.04) 45%, rgba(0,0,0,0.4)), radial-gradient(circle at 22% 15%, rgba(28,196,170,0.6), transparent 65%), radial-gradient(circle at 88% 92%, rgba(28,196,170,0.32), transparent 60%), linear-gradient(135deg, rgba(28,196,170,0.3), transparent); }
.expertise-body { position: relative; z-index: 1; display: flex; flex-direction: column; flex: 1; padding: 28px; }
/* sizes below are proportioned off the 26px title to match the reference card's type ratios:
   tag ≈ 0.42×title, teaser/expand ≈ 0.55×title */
.expertise-tag { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ex-text-2); margin-bottom: 18px; }
.expertise-title { font-weight: 700; font-size: 26px; line-height: 1.2; letter-spacing: -0.015em; color: var(--ex-text); margin-bottom: 16px; }
/* category + title stay visible; the teaser and "Expand" cue reveal on hover, like the reference cards.
   text color itself never changes on hover — only opacity/position animate in. */
.expertise-teaser { color: var(--ex-text-2); font-size: 14px; line-height: 1.55; margin: 0; opacity: 0; transform: translateY(6px); transition: opacity var(--quick) var(--ease), transform var(--quick) var(--ease); }
.expertise-expand { display: inline-flex; align-items: center; gap: 6px; align-self: flex-end; margin-top: auto; padding-top: 20px; font-weight: 600; font-size: 14px; color: var(--ex-text); opacity: 0; transform: translateY(6px); transition: opacity var(--quick) var(--ease), transform var(--quick) var(--ease); }
.expertise-card:hover .expertise-teaser,
.expertise-card:hover .expertise-expand { opacity: 1; transform: translateY(0); }
@media (hover: none) {
    /* no hover on touch — show the teaser and cue by default so nothing is permanently hidden */
    .expertise-teaser, .expertise-expand { opacity: 1; transform: none; }
}

/* ---------- Engagement steps ---------- */
.steps { list-style: none; display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 44px 1fr; gap: var(--sm); padding-block: 18px; border-top: 1px solid var(--border); }
.step:first-child { border-top: none; padding-top: 4px; }
.step:last-child { padding-bottom: 4px; }
.step-num { font-family: var(--mono); font-size: 0.85rem; color: var(--accent-green); padding-top: 2px; }
.step h4 { font-weight: 560; font-size: 1rem; letter-spacing: -0.012em; color: var(--text); margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---------- Work card outcome ---------- */
.work-card .work-outcome { color: var(--green); font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.01em; margin-top: -10px; margin-bottom: var(--sm); }

/* ---------- FAQ ---------- */
/* flat, divider-separated list (not a grid of card boxes) — full-width rows, one column
   regardless of viewport, each question/answer separated by a hairline rule, grouped under
   its own bold category heading (ir.spacex.com's FAQ page is the reference) */
.faq-group + .faq-group { margin-top: calc(var(--xl) / 2); }
.faq-group-title { font-size: 1.3rem; font-weight: 700; letter-spacing: 0.01em; text-transform: uppercase; margin-bottom: var(--sm); }
.faq-list { border-top: 1px solid var(--border); }
.faq-item { display: block; border-bottom: 1px solid var(--border); }
/* flex (not float) so the icon stays pinned top-right of the first line regardless of how
   many lines the question wraps to — float was dropping it below short single-line questions */
.faq-item summary.title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 4px; margin-bottom: 0; cursor: pointer; list-style: none; font-weight: 540; }
.faq-item summary:hover { color: var(--text); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; flex-shrink: 0; color: var(--accent-green); font-weight: 400; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: -8px 4px 22px; max-width: 64ch; }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; border-bottom: 1px solid transparent; transition: background var(--quick) var(--ease), border-color var(--quick) var(--ease), backdrop-filter var(--quick); }
.nav.scrolled { background: rgba(8,9,10,0.72); backdrop-filter: blur(12px) saturate(1.2); border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; gap: var(--md); padding-block: 14px; }
.wordmark { display: inline-block; width: fit-content; line-height: 1.1; font-style: italic; text-transform: uppercase; padding-right: 0.1em; font-weight: 680; font-size: 1.2rem; letter-spacing: 0.01em; text-decoration: none; background: linear-gradient(100deg, var(--accent-blue), var(--accent-green)); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
/* "DIGITAL SOLUTIONS LLC" under the wordmark, right-aligned like the logo. Drawn as ::after so every
   page picks it up; its own fill colour paints over the parent's gradient text clip. */
.wordmark::after { content: "Digital Solutions LLC"; display: block; margin-top: 0.12em; text-align: right; font-family: "Saira Condensed", var(--sans); font-style: normal; font-weight: 500; font-size: 0.32em; letter-spacing: 0.08em; line-height: 1; -webkit-text-fill-color: var(--text-2); color: var(--text-2); }
.nav-links { display: flex; align-items: center; gap: var(--md); margin-left: var(--sm); }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--muted); text-decoration: none; padding-bottom: 2px; border-bottom: 1.5px solid transparent; transition: color var(--quick), border-color var(--quick); }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); border-bottom-color: var(--accent-green); }
/* About dropdown — opens on hover or keyboard focus. The menu wrapper carries a transparent top
   padding so the pointer can travel from the link to the panel without the menu closing. */
.nav-dropdown { position: relative; display: inline-flex; align-items: center; }
.nav-links a.nav-dd-trigger { display: inline-flex; align-items: center; gap: 5px; }
.nav-dd-caret { flex-shrink: 0; transition: transform var(--quick) var(--ease); }
.nav-dropdown:hover .nav-dd-caret, .nav-dropdown:focus-within .nav-dd-caret { transform: rotate(180deg); }
.nav-dd-menu { position: absolute; top: 100%; left: -14px; min-width: 220px; padding-top: 14px; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity var(--quick) var(--ease), transform var(--quick) var(--ease), visibility var(--quick); z-index: 5; }
.nav-dropdown:hover .nav-dd-menu, .nav-dropdown:focus-within .nav-dd-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dd-panel { display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: var(--shadow-ambient); }
.nav-links .nav-dd-panel a { display: block; padding: 9px 12px; border-bottom: none; border-radius: var(--r-sm); font-size: 0.88rem; white-space: nowrap; }
.nav-links .nav-dd-panel a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: var(--sm); }
.nav-toggle { display: none; background: rgba(255,255,255,0.04); border: 1px solid var(--border-strong); color: var(--text); font-size: 0.85rem; padding: 8px 13px; border-radius: var(--r-sm); cursor: pointer; }
.mobile-menu { display: none; flex-direction: column; border-top: 1px solid var(--border); background: rgba(8,9,10,0.96); backdrop-filter: blur(12px); }
.mobile-menu[hidden] { display: none; }
.mobile-menu.open { display: flex; }
.mobile-menu a { font-size: 0.95rem; color: var(--muted); text-decoration: none; padding: 15px 28px; border-bottom: 1px solid var(--border); }
.mobile-menu a:last-child { border-bottom: none; color: var(--text); }
.mobile-menu a:hover { color: var(--text); background: rgba(255,255,255,0.03); }
/* sub-links are just in-page anchors (About/Salesforce section jumps) — dropped from the mobile
   menu entirely rather than built out as an accordion, so About/Salesforce/Work/FAQ/Contact are
   all one tap away instead of buried under a 16-row list */
.mobile-menu a.sub { display: none; }

/* ---------- Hero ---------- */
.hero { padding-top: 205px; padding-bottom: 36px; text-align: center; }
/* tightened so the expertise cards peek above the fold on landing — selectors are multi-class
   so they reliably beat the generic .section / .section.tight padding rules regardless of order */
.section.tight.trust-strip { padding-block: 20px; }
.section.expertise-preview { padding-top: 28px; }
.section.tight.engagement { padding-top: 24px; }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
/* the headline and lede have phone-only wordings (index.html); one span of each pair shows at a time */
.hero-title-short, .hero-lede-short { display: none; }
.hero-title { font-weight: 600; font-size: clamp(2.6rem, 6vw, 4.75rem); line-height: 1.04; letter-spacing: -0.035em; margin-bottom: var(--md); color: var(--text); }

/* recreated from the original site's .gradient-text */
.linear-gradient {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-green), var(--accent-blue), var(--accent-green));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: gradient-shift 24s ease infinite;
}
@keyframes gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@media (prefers-reduced-motion: reduce) {
    .linear-gradient { animation: none; }
}
.hero-lede { font-size: 1.2rem; color: var(--muted); max-width: 52ch; margin-bottom: var(--md); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- AI builder promo bar ----------
   Pinned to the very top of the site pages (before <main>), with the fixed nav moved down to sit
   just under it; links the whole strip to ai-instructions.html. Solid --accent-blue with white text so it stands out.
   --nav-h / --ai-bar-h are measured by initNav() in script.js; the fallbacks match desktop.
   The bottom margin leaves room for the nav, so content still starts below both bars.
   z-index keeps it above page content and #bg-canvas but under the nav (100). */
html:has(.ai-bar) { scroll-padding-top: calc(var(--nav-h, 70px) + var(--ai-bar-h, 48px) + 18px); }
html:has(.ai-bar) .nav { top: var(--ai-bar-h, 48px); }
.ai-bar { position: sticky; top: 0; z-index: 90; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; margin-bottom: var(--nav-h, 70px); padding: 13px 20px; background: #2563eb; border-block: 1px solid #2563eb; color: #fff; font-size: 0.9rem; font-weight: 540; line-height: 1.4; text-align: center; text-decoration: none; transition: background var(--quick) var(--ease), border-color var(--quick) var(--ease); }
/* the bar's margin already clears the nav, so the first block after it drops the nav allowance:
   the home hero keeps roughly its old position, other pages match the builder page's spacing */
.ai-bar + main > .hero { padding-top: var(--xl); }
.ai-bar + main > .section:first-child { padding-top: var(--lg); }
@media (max-width: 680px) {
    .ai-bar + main > .hero { padding-top: var(--lg); }
    /* phones: 1.2rem (the desktop hero lede's size) so the bar reads big and clear; wraps to two lines */
    .ai-bar { gap: 2px 8px; padding: 0 16px 22px; font-size: 1.2rem; line-height: 1.35; } /* no space above the text */
}
.ai-bar:hover { background: #1d4ed8; border-color: #1d4ed8; } /* bar is #2563eb (white text 5.2:1); a shade darker on hover */
.ai-bar:focus-visible { outline: 2px solid #fff; outline-offset: -4px; } /* white: the blue outline would vanish on the blue bar */
.ai-bar-lead { font-weight: 500; }
.ai-bar-cta { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; white-space: nowrap; }
.ai-bar-arrow { display: inline-block; transition: transform var(--quick) var(--ease); }
.ai-bar:hover .ai-bar-arrow, .ai-bar:focus-visible .ai-bar-arrow { transform: translateX(4px); }
@media (prefers-reduced-motion: reduce) {
    .ai-bar-arrow { transition: none; }
}

/* ---------- Product mock ---------- */
.mock { margin-top: var(--xl); background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-ambient); overflow: hidden; text-align: left; position: relative; }
.setup-caption { margin-top: var(--sm); font-size: 0.78rem; color: var(--faint); }
.setup-caption a { color: var(--accent-green); text-decoration: none; }
.setup-caption a:hover { text-decoration: underline; }
.mock::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent); }
.mock-dots { display: inline-flex; gap: 7px; }
.mock-dots i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,0.14); }
/* Setup window header */
.setup-bar { display: flex; align-items: center; justify-content: space-between; padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--panel-top); }
.setup-brand { display: flex; align-items: center; gap: 9px; font-size: 0.86rem; font-weight: 540; color: var(--text); }
.setup-sep { color: var(--faint); }
.setup-grid { width: 16px; height: 16px; border-radius: 4px; background-color: rgba(59,130,246,0.12); background-image: radial-gradient(var(--accent-blue) 1.3px, transparent 1.6px); background-size: 5.5px 5.5px; background-position: 2px 2px; }
.setup-bar-right { display: flex; align-items: center; gap: 10px; }
.setup-pill { font-size: 0.64rem; font-family: var(--mono); color: var(--amber); border: 1px solid rgba(242,201,76,0.35); background: rgba(242,201,76,0.08); border-radius: 999px; padding: 2px 9px; }
.setup-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--blue-fill); color: #fff; font-size: 0.7rem; font-weight: 540; display: grid; place-items: center; }

/* Setup body + nav */
.setup-body { display: grid; grid-template-columns: 224px 1fr; min-height: 348px; }
.setup-nav { border-right: 1px solid var(--border); padding: 12px; display: flex; flex-direction: column; gap: 2px; background: var(--bg-raised); }
.setup-search { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 7px 10px; color: var(--faint); margin-bottom: 8px; }
.setup-search input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: var(--text); font-family: var(--sans); font-size: 0.82rem; }
.setup-search input::placeholder { color: var(--faint); }
.setup-group { margin-top: 8px; }
.setup-group-label { font-size: 0.62rem; font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); padding: 4px 8px; }
.setup-item { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: none; border: none; border-radius: var(--r-sm); padding: 7px 10px; font-family: var(--sans); font-size: 0.84rem; color: var(--muted); cursor: pointer; position: relative; transition: background var(--quick), color var(--quick); }
.setup-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }
.setup-item.active { background: rgba(59,130,246,0.12); color: var(--text); }
.setup-item.active::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--accent-blue); }
.setup-item .ic { width: 13px; height: 13px; border-radius: 3px; background: rgba(255,255,255,0.13); flex: none; }
.setup-item.active .ic { background: var(--accent-blue); }
.setup-empty { color: var(--faint); font-size: 0.82rem; padding: 12px 8px; }

/* Setup main table */
.setup-main { padding: 18px 20px; min-width: 0; overflow-x: auto; }
.setup-crumb { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.setup-crumb .c-path { font-size: 0.78rem; color: var(--faint); }
.setup-crumb .c-path::after { content: " ›"; color: var(--faint); }
.setup-crumb .c-title { font-size: 1.05rem; font-weight: 560; color: var(--text); letter-spacing: -0.01em; }
.setup-count { font-size: 0.72rem; color: var(--faint); margin-left: auto; }
.setup-table { width: 100%; border-collapse: collapse; }
.setup-table thead th { text-align: left; font-size: 0.66rem; font-weight: 540; text-transform: uppercase; letter-spacing: 0.04em; color: var(--faint); padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.setup-table tbody td { font-size: 0.84rem; color: var(--text-2); padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); white-space: nowrap; }
.setup-table tbody tr:last-child td { border-bottom: none; }
.setup-table tbody tr:hover td { background: rgba(255,255,255,0.03); }
.setup-table td.api { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.setup-tag { font-size: 0.68rem; border-radius: 999px; padding: 2px 9px; border: 1px solid var(--border); color: var(--muted); }
.setup-tag.custom { color: var(--accent-green); border-color: rgba(0,255,106,0.4); background: rgba(0,255,106,0.1); }
.setup-status { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); font-size: 0.82rem; }
.setup-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* Analytics dashboard mock */
.dash-mock .code-bar { justify-content: space-between; }
.dash-range { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); }
.dash-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dash-kpi { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; gap: 3px; }
.dash-k-label { font-size: 0.66rem; color: var(--faint); }
.dash-k-val { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.025em; color: var(--text); }
.dash-k-delta { font-size: 0.66rem; font-family: var(--mono); color: var(--green); }
.dash-charts { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; }
.dash-card { background: var(--bg-raised); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; }
.dash-card-t { font-size: 0.66rem; color: var(--faint); display: block; margin-bottom: 10px; }
.dash-bars { width: 100%; height: 70px; }
.dash-bars rect { fill: rgba(59,130,246,0.55); }
.dash-bars rect.hot { fill: var(--accent-blue); }
.dash-donut-wrap { display: flex; align-items: center; gap: 12px; }
.dash-legend { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 0.7rem; color: var(--muted); }
.dash-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 7px; }

/* Apex test results mock */
.test-mock .code-bar { justify-content: space-between; }
.test-cov { font-family: var(--mono); font-size: 0.72rem; color: var(--green); }
.test-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.test-summary { display: flex; align-items: center; gap: 12px; }
.test-pass { font-size: 0.85rem; color: var(--text-2); white-space: nowrap; }
.test-pass b { color: var(--green); font-weight: 600; }
.test-bar { flex: 1; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.test-bar span { display: block; height: 100%; width: 0; background: var(--accent-blue); border-radius: 999px; transition: width 900ms var(--ease); }
.test-mock.in .test-bar span { width: 92%; }
.test-list { display: flex; flex-direction: column; }
.test-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.test-row:last-child { border-bottom: none; }
.test-check { width: 16px; height: 16px; border-radius: 50%; background: rgba(76,183,130,0.16); display: grid; place-items: center; flex: none; }
.test-name { font-family: var(--mono); font-size: 0.78rem; color: var(--text-2); flex: 1; }
.test-time { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); }

/* LWC + AI component mock */

/* ---------- Trust / stats ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sm); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-raised); overflow: hidden; }
.stat { padding: var(--md); display: flex; flex-direction: column; gap: 5px; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat-num { font-weight: 600; font-size: 1.85rem; letter-spacing: -0.025em; color: var(--text); }
.stat-label { font-size: 0.8rem; color: var(--muted); }

/* ---------- Services ---------- */
.spec-list { list-style: none; display: flex; flex-direction: column; }
.spec-list li { font-size: 0.96rem; color: var(--muted); padding: 10px 0; border-bottom: 1px solid var(--border); position: relative; padding-left: 22px; }
.spec-list li:last-child { border-bottom: none; }
.spec-list li::before { content: ""; position: absolute; left: 2px; top: 50%; transform: translateY(-50%); width: 5px; height: 5px; border-radius: 50%; background: var(--accent-blue); }

/* ---------- Salesforce ---------- */
.sf-point { padding: var(--md) 0; border-top: 1px solid var(--border); }
.sf-point:first-child { border-top-color: var(--border-strong); }
.sf-point dt { font-weight: 560; font-size: 1.02rem; margin-bottom: 6px; color: var(--text); }
.sf-point dd { color: var(--muted); max-width: 52ch; }

/* ---------- Work ---------- */
.work-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--md); }
.work-filter { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px; cursor: pointer; transition: background var(--quick) var(--ease), border-color var(--quick) var(--ease), color var(--quick) var(--ease); }
.work-filter:hover { color: var(--text); border-color: var(--border-strong); }
.work-filter.active { color: #fff; background: var(--blue-fill); border-color: var(--blue-fill); }
.work-filter:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; }
.work-empty { grid-column: 1 / -1; color: var(--faint); font-size: 0.9rem; padding: var(--md) 0; }
.work-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.work-card[hidden] { display: none; } /* .work-card's own "display: flex" would otherwise override the browser's default [hidden] rule */
/* featured cards span 2 of the grid's 3 columns — alternates which side they sit on
   (wide-left: cols 1-2, wide-right: cols 2-3) so the row still fills out to 3 columns with
   exactly one normal card alongside it. Relies on default (sparse) grid auto-placement to
   slot normal cards into the remaining gaps — see the card order in index.html. */
.work-card.wide-left { grid-column: 1 / 3; }
.work-card.wide-right { grid-column: 2 / 4; }
.work-card:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: var(--shadow-hover); background: var(--panel-top); }
.work-card .num { display: block; margin-bottom: 14px; }
.work-card h3 { font-weight: 560; font-size: 1.12rem; letter-spacing: -0.012em; margin-bottom: 8px; color: var(--text); }
.work-card p { color: var(--muted); font-size: 0.94rem; flex: 1; margin-bottom: var(--md); }
.work-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.work-tags span { font-size: 0.68rem; color: var(--faint); background: rgba(255,255,255,0.04); border: 1px solid var(--border); padding: 3px 8px; border-radius: var(--r-sm); }
.work-card:hover .num { color: var(--accent-green); }

/* ---------- Work detail modal (mobile-only trigger, see initWorkModal in script.js) ---------- */
.work-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: flex-end; justify-content: center; }
.work-modal[hidden] { display: none; } /* same display-vs-[hidden] specificity issue as .work-card above */
.work-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.6); opacity: 0; transition: opacity 220ms var(--ease); }
.work-modal.open .work-modal-backdrop { opacity: 1; }
.work-modal-panel {
    position: relative; width: 100%; max-width: 480px; max-height: 82vh; overflow-y: auto;
    background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--r-xl) var(--r-xl) 0 0;
    padding: 30px 24px calc(24px + env(safe-area-inset-bottom, 0px));
    box-shadow: var(--shadow-ambient);
    transform: translateY(100%); transition: transform 280ms cubic-bezier(.22,.8,.25,1);
}
.work-modal.open .work-modal-panel { transform: translateY(0); }
.work-modal-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--border); background: var(--panel-top); color: var(--text-2); cursor: pointer; }
.work-modal-close:hover { color: var(--text); border-color: var(--border-strong); }
.work-modal-panel .num { display: block; margin-bottom: 12px; }
.work-modal-panel h3 { font-weight: 560; font-size: 1.25rem; letter-spacing: -0.012em; margin-bottom: 12px; padding-right: 30px; }
.work-modal-panel p#workModalDesc { color: var(--muted); font-size: 0.96rem; margin-bottom: var(--sm); }
.work-modal-panel .work-outcome { margin-top: 0; margin-bottom: var(--md); }
.work-modal-panel .work-tags { margin-bottom: var(--lg); }
.work-modal-panel .btn { width: 100%; justify-content: center; }
body.modal-open { overflow: hidden; }

/* ---------- Contact ---------- */
.cta-panel { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--lg); box-shadow: var(--shadow-ambient); overflow: hidden; }
.cta-panel::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent); }
.contact-layout { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--lg); align-items: start; }
.contact-intro .headline { margin-bottom: var(--sm); }
.contact-direct { margin-top: var(--md); font-size: 0.92rem; color: var(--muted); }
.contact-direct a { color: var(--accent-green); text-decoration: underline; text-underline-offset: 2px; }
.contact-form { display: flex; flex-direction: column; gap: var(--sm); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sm); }
.field { display: flex; flex-direction: column; }
.field > span { font-size: 0.8rem; color: var(--muted); margin-bottom: 7px; }
.field .req { color: var(--accent-green); font-weight: 600; margin-left: 2px; }
.field input, .field select, .field textarea { font-family: var(--sans); font-size: 1rem; color: var(--text); background: rgba(255,255,255,0.03); border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 12px 14px; transition: border-color var(--quick), box-shadow var(--quick); }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 1px var(--accent-blue); }
.field textarea { min-height: 120px; resize: vertical; }
.field select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%238a8f98' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.field select option { background: var(--panel); color: var(--text); }
.form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* spam trap field, off-screen */
.form-status { font-size: 0.85rem; min-height: 1em; color: var(--muted); }
.form-status.success { color: var(--green); }
.form-status.error { color: var(--accent-green); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding-block: var(--lg) var(--md); margin-top: var(--lg); }
.footer-inner { display: flex; flex-wrap: wrap; gap: var(--md); justify-content: space-between; align-items: baseline; padding-bottom: var(--md); border-bottom: 1px solid var(--border); }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand .wordmark { font-size: 1.1rem; }
.footer-tag { font-size: 0.82rem; color: var(--faint); }
.footer-links { display: flex; gap: var(--md); flex-wrap: wrap; }
.footer-links a { font-size: 0.88rem; color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-mail { font-size: 0.88rem; color: var(--text-2); text-decoration: none; }
.footer-mail:hover { color: var(--accent-green); }
.footer-bottom { display: flex; justify-content: space-between; padding-top: var(--md); font-size: 0.8rem; color: var(--faint); }
.footer-legal a { color: var(--faint); text-decoration: none; }
.footer-legal a:hover { color: var(--muted); }
.footer-legal .sep { margin: 0 6px; }

/* ---------- Dot-grid texture ---------- */
.grid-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255,255,255,0.045) 1px, transparent 1px);
    background-size: 34px 34px; background-position: center -1px;
    -webkit-mask-image: radial-gradient(125% 78% at 50% 0%, #000 0%, transparent 68%);
    mask-image: radial-gradient(125% 78% at 50% 0%, #000 0%, transparent 68%); }

/* ---------- Gradient hairline divider ---------- */
.divider { border: 0; height: 1px; margin: 0; background: linear-gradient(90deg, transparent, var(--border-strong) 25%, var(--border-strong) 75%, transparent); }

/* ---------- Alternating feature rows ---------- */
.feature-row { display: grid; grid-template-columns: 1fr 1.05fr; gap: var(--lg); align-items: center; padding-block: var(--lg); }
.feature-row.reverse .feature-copy { order: 2; }
/* grid items default to a min-width equal to their unwrapped content's max-content width —
   without this, a long check-list line (e.g. "Bulk-safe Apex triggers & batch jobs") refuses
   to shrink/wrap and pushes the column past its track on narrow screens */
.feature-copy { min-width: 0; }
.feature-copy h3.title { font-size: 1.45rem; margin-bottom: 14px; }
.feature-copy p { color: var(--muted); max-width: 46ch; margin-bottom: var(--md); }
.check-list { list-style: none; display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.check-list li { position: relative; padding-left: 26px; color: var(--text-2); font-size: 0.95rem; min-width: 0; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 6px; width: 13px; height: 13px; border-radius: 50%; background: rgba(0,255,106,0.18);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 24 24' fill='none' stroke='%2300ff6a' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; }

.feature-visual .code-mock, .feature-visual .flow-mock, .feature-visual .slack-mock { position: relative; background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-ambient); overflow: hidden; }
.feature-visual .code-mock::before, .feature-visual .flow-mock::before, .feature-visual .slack-mock::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent); }

/* code editor mock */
.code-bar { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--panel-top); }
.code-file { font-family: var(--mono); font-size: 0.76rem; color: var(--faint); }

/* Data 360 mock — sources merging into one profile */
/* Data 360 mock — a field-level stream mapping diagram: source rows on the left,
   curved lines mapping into two destination objects on the right */
.stream-mock { padding: 16px; }
.stream-diagram { width: 100%; height: auto; display: block; }
.stream-line { fill: none; stroke: var(--accent-blue); stroke-width: 1.2; opacity: 0.55; }
.stream-panel { fill: var(--panel-top); stroke: var(--border-strong); stroke-width: 1; }
.stream-header { font-family: var(--sans); font-size: 11px; font-weight: 700; fill: var(--text); }
.stream-row { fill: var(--bg-raised); stroke: var(--border); stroke-width: 1; }
.stream-row-label { font-family: var(--sans); font-size: 9.5px; font-weight: 600; fill: var(--text-2); }
.stream-dot { fill: var(--panel); stroke: var(--accent-blue); stroke-width: 1.3; }
.stream-dot--blue { stroke: var(--accent-blue); }
.stream-dot--green { stroke: var(--accent-green); }
.stream-dest { fill: var(--panel-top); stroke: var(--border-strong); stroke-width: 1; }
.stream-dest--blue { stroke: rgba(59,130,246,0.4); }
.stream-dest--green { stroke: rgba(0,255,106,0.35); }
.stream-dest-icon--blue { fill: var(--accent-blue); }
.stream-dest-icon--green { fill: var(--accent-green); }
.stream-dest-title { font-family: var(--sans); font-size: 11px; font-weight: 700; fill: var(--text); }
.stream-field { font-family: var(--sans); font-size: 9.5px; font-weight: 500; fill: var(--text-2); }
.stream-unmapped { font-family: var(--mono); font-size: 9px; fill: var(--accent-blue); }
.stream-unmapped--green { fill: var(--accent-green); }

/* Custom Integrations mock — external system <-> middleware <-> Salesforce */
/* network diagram: external systems -> n8n (primary, solid line) -> Salesforce,
   with Zapier/Make.com as alternate middleware (dashed lines) below the main path */
.integration-mock { padding: 20px 16px; }
.integration-diagram { width: 100%; height: auto; display: block; }
.int-line { fill: none; stroke: var(--border-strong); stroke-width: 1.5; }
.int-line--primary { stroke: var(--accent-green); stroke-width: 2; }
.int-box { fill: var(--panel-top); stroke: var(--border-strong); stroke-width: 1; }
.int-hub { fill: rgba(0,255,106,0.1); stroke: var(--accent-green); stroke-width: 1.5; }
.int-box--sf { stroke: var(--accent-blue); }
.int-box--amber { stroke: var(--amber); }
.int-label { font-family: var(--sans); font-size: 11px; font-weight: 600; fill: var(--text-2); text-anchor: middle; dominant-baseline: middle; }
.int-label--hub { font-size: 13px; fill: var(--text); }
.int-label--amber { fill: var(--amber); }
/* motion tilt: nodes sit still normally. initIntegrationTilt() in script.js tracks the cursor
   over each node and sets its rotate/translateY/scale directly via style.transform on mousemove —
   this transition is what makes those per-frame style changes feel like continuous motion instead
   of snapping between values; it also handles the return to rest on mouseleave. */
.int-node { cursor: default; transform-box: fill-box; transform-origin: center; transition: transform 150ms ease-out; }
@media (prefers-reduced-motion: reduce) {
    .int-node { transition: none; }
}

/* hub label cycles n8n -> Zapier -> Make.com: four stacked text rows (the 4th repeats the 1st)
   inside a clipped window, scrolled by animating the group's transform — a vertical carousel */
.hub-carousel { animation: hub-cycle 6s ease-in-out infinite; }
@keyframes hub-cycle {
    0%, 27%  { transform: translateY(0); }
    33%, 60% { transform: translateY(-22px); }
    66%, 93% { transform: translateY(-44px); }
    100%     { transform: translateY(-66px); }
}
@media (prefers-reduced-motion: reduce) {
    .hub-carousel { animation: none; }
}

/* Business Analysis mock — Discover / Define / Deliver board */
/* Business Analysis mock — a horizontal journey map: one spine, five numbered stages,
   labels alternating above/below like a real journey-map zigzag */
.analysis-mock { padding: 20px 16px; }
.journey-map { width: 100%; height: auto; display: block; }
.journey-line { stroke: var(--accent-green); stroke-width: 1.5; }
.journey-stem { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 2 3; }
.journey-node { fill: var(--panel-top); stroke: var(--accent-green); stroke-width: 2; }
.journey-node--end { fill: var(--accent-green); }
.journey-num { font-family: var(--mono); font-size: 9px; font-weight: 600; fill: var(--text); text-anchor: middle; dominant-baseline: middle; }
.journey-node--end + .journey-num { fill: var(--bg); }
.journey-title { font-family: var(--sans); font-size: 12px; font-weight: 700; fill: var(--text); text-anchor: middle; }
.journey-sub { font-family: var(--sans); font-size: 9.5px; fill: var(--faint); text-anchor: middle; }

/* Slack mock — real Slack UI shape (channel header, message, Block-Kit-style attachment card
   with its signature colored left rail), restyled entirely in this site's own palette */
.slack-top { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--panel-top); }
.slack-hash { color: var(--faint); font-weight: 700; font-size: 0.95rem; }
.slack-channel { font-family: var(--sans); font-weight: 700; font-size: 0.88rem; color: var(--text); }
.slack-thread { padding: 16px; }
.slack-msg { display: flex; gap: 11px; align-items: flex-start; }
.slack-avatar { flex-shrink: 0; width: 34px; height: 34px; border-radius: var(--r-sm); background: linear-gradient(135deg, var(--accent-blue), var(--accent-green)); display: grid; place-items: center; font-family: var(--sans); font-weight: 700; font-size: 0.72rem; color: #fff; }
.slack-msg-main { min-width: 0; flex: 1; }
.slack-msg-head { display: flex; align-items: baseline; gap: 7px; margin-bottom: 3px; }
.slack-name { font-family: var(--sans); font-weight: 700; font-size: 0.86rem; color: var(--text); }
.slack-appbadge { font-family: var(--sans); font-size: 0.62rem; font-weight: 600; color: var(--faint); border: 1px solid var(--border-strong); border-radius: 3px; padding: 1px 4px; }
.slack-time { font-family: var(--sans); font-size: 0.7rem; color: var(--faint); }
.slack-text { font-family: var(--sans); font-size: 0.84rem; line-height: 1.5; color: var(--text-2); margin: 0 0 10px; }
.slack-attachment { border-left: 3px solid var(--accent-blue); background: var(--panel-top); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 10px 12px; }
.slack-attach-title { font-family: var(--sans); font-weight: 700; font-size: 0.86rem; color: var(--text); margin-bottom: 8px; }
.slack-attach-fields { display: flex; flex-wrap: wrap; gap: 5px 18px; margin-bottom: 10px; }
.slack-attach-field { display: flex; flex-direction: column; gap: 1px; font-family: var(--sans); font-size: 0.72rem; }
.slack-attach-field span { color: var(--faint); }
.slack-attach-field b { color: var(--text-2); font-weight: 600; }
.slack-attach-actions { display: flex; gap: 8px; }
.slack-btn { font-family: var(--sans); font-size: 0.76rem; font-weight: 600; padding: 6px 12px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: rgba(255,255,255,0.03); color: var(--text-2); cursor: default; }
.slack-btn--primary { background: var(--blue-fill); border-color: var(--blue-fill); color: #fff; }
.code-body { padding: 14px 16px; font-family: var(--mono); font-size: 0.78rem; line-height: 1.75; overflow-x: auto; }
.code-body .ln { display: grid; grid-template-columns: 22px 1fr; gap: 14px; }
.code-body .gutter { color: var(--faint); text-align: right; user-select: none; }
.code-body .src { white-space: pre; color: var(--text-2); }
.tok-kw { color: var(--accent-green); }
.tok-str { color: var(--green); }
.tok-num { color: var(--amber); }
.tok-com { color: var(--faint); font-style: italic; }

/* LWC mock: a rendered custom Lightning Web Component on a record page (stage path, line items,
   actions) with its markup tag underneath. */
.lwc-body { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.lwc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lwc-title { font-size: 0.98rem; font-weight: 600; color: var(--text); }
.lwc-badge { padding: 2px 10px; font-size: 0.7rem; font-weight: 560; color: #60a5fa; background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.4); border-radius: 999px; }
.lwc-path { display: flex; gap: 3px; margin: 0; padding: 0; list-style: none; }
.lwc-path li { flex: 1; min-width: 0; padding: 7px 4px 7px 12px; font-size: 0.68rem; text-align: center; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(255,255,255,0.06); clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%, 8px 50%); }
.lwc-path li:first-child { clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 0 100%); border-radius: 999px 0 0 999px; padding-left: 8px; }
.lwc-path li:last-child { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 8px 50%); border-radius: 0 999px 999px 0; }
.lwc-path li.is-done { color: #08090a; font-weight: 600; background: var(--green); }
.lwc-path li.is-current { color: #fff; font-weight: 600; background: var(--blue-fill); }
.lwc-items { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r-sm); }
.lwc-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 0.8rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
.lwc-item:last-child { border-bottom: none; }
.lwc-item-name { flex: 1; min-width: 0; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lwc-item-qty { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); }
.lwc-pill { flex: none; width: 64px; padding: 1px 0; font-size: 0.66rem; text-align: center; color: var(--amber); background: rgba(242,201,76,0.08); border-radius: 999px; }
.lwc-pill--ok { color: var(--green); background: rgba(76,183,130,0.12); }
.lwc-actions { display: flex; justify-content: flex-end; gap: 8px; }
.lwc-btn { padding: 5px 12px; font-size: 0.74rem; font-weight: 560; color: var(--text-2); border: 1px solid var(--border-strong); border-radius: var(--r-sm); }
.lwc-btn--primary { color: #fff; background: var(--blue-fill); border-color: var(--blue-fill); }
.lwc-tag { padding: 8px 10px; font-family: var(--mono); font-size: 0.72rem; color: var(--text-2); background: rgba(0,0,0,0.35); border: 1px solid var(--border); border-radius: var(--r-sm); white-space: nowrap; overflow-x: auto; }

@media (max-width: 480px) {
    .lwc-body { padding: 14px 12px; }
    .lwc-path li { padding: 6px 2px 6px 9px; font-size: 0.6rem; letter-spacing: -0.01em; }
    .lwc-path li:first-child { padding-left: 4px; }
    .lwc-mock .code-file { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}

/* Exception-handling mock: a list view of a custom exception object holding failed integration
   payloads, each with its error and a reprocess action. */
.exc-body { display: flex; flex-direction: column; padding: 6px 14px 14px; }
.exc-row { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.exc-status { flex: none; width: 70px; padding: 2px 0; font-family: var(--mono); font-size: 0.66rem; text-align: center; letter-spacing: 0.04em; border-radius: 999px; border: 1px solid currentColor; }
.exc-status--failed { color: #eb5757; background: rgba(235,87,87,0.1); }
.exc-status--retry { color: var(--amber); background: rgba(242,201,76,0.08); }
.exc-status--ok { color: var(--green); background: rgba(76,183,130,0.1); }
.exc-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.exc-flow { font-size: 0.82rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exc-err { font-family: var(--mono); font-size: 0.7rem; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exc-btn { flex: none; padding: 4px 10px; font-size: 0.72rem; font-weight: 560; color: #fff; background: var(--blue-fill); border-radius: var(--r-sm); }
.exc-btn--muted { color: var(--muted); background: rgba(255,255,255,0.06); }
.exc-payload { margin-top: 12px; padding: 10px 12px; font-family: var(--mono); font-size: 0.72rem; line-height: 1.6; background: rgba(0,0,0,0.35); border: 1px solid var(--border); border-radius: var(--r-sm); overflow-x: auto; }
.exc-payload-label { display: block; margin-bottom: 4px; font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.exc-code { white-space: pre; color: var(--text-2); }

/* Flow Builder mock — modeled on the real Salesforce Flow Builder canvas: a fixed diagram (pill
   labels, colored-icon element cards, "+" connectors) that you pan by dragging the canvas itself,
   rather than dragging the elements (see initFlowCanvas in script.js). */
/* touch-action: pan-y (not none) lets a plain vertical swipe scroll the page natively — the
   horizontal-drag detection in initFlowCanvas (script.js) is what claims the gesture for
   panning once it's clearly intentional, calling preventDefault itself at that point */
.flow-canvas { position: relative; height: 420px; background-color: #1c1d21; background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1.4px); background-size: 18px 18px; overflow: hidden; cursor: grab; touch-action: pan-y; }
.flow-canvas.grabbing { cursor: grabbing; }
.flow-canvas-inner { position: absolute; top: 0; left: 0; } /* actual size set inline per diagram */
.flow-canvas-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.flow-canvas-lines path { stroke: var(--border-strong); stroke-width: 1.5; fill: none; }

/* branch pills size to their own text (no fixed width), so they're centered via translateX(-50%)
   against the raw center-x coordinate in "left" — not pre-offset in JS, since JS can't know the
   pill's actual rendered width ahead of time. The Start pill is the one exception: it has an
   explicit fixed width (below), so its "left" IS pre-offset (centerX - width/2) and needs no transform. */
.flow-pill { position: absolute; transform: translateX(-50%); padding: 8px 18px; background: var(--panel-top); border: 1px solid var(--border-strong); border-radius: 999px; font-family: var(--sans); font-size: 0.78rem; font-weight: 700; color: var(--text); white-space: nowrap; box-shadow: 0 4px 10px -6px rgba(0,0,0,0.6); }

/* Start card — modeled on Salesforce's real "Record-Triggered Flow" header */
.flow-start { position: absolute; background: #2b2c31; border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: 0 6px 16px -8px rgba(0,0,0,0.6); overflow: hidden; }
.flow-start-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.flow-start-icon { flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; background: #2e844a; display: grid; place-items: center; }
.flow-start-head b { font-family: var(--sans); font-size: 0.88rem; font-weight: 700; color: var(--text); }
.flow-start-body { padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--border); }
.flow-start-row { display: flex; align-items: baseline; gap: 5px; font-family: var(--sans); font-size: 0.78rem; }
.flow-start-row span { color: #a1a6ae; flex-shrink: 0; } /* lighter than --muted: this panel is #2b2c31 */
.flow-start-row b { min-width: 0; color: var(--text-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-start-editlink { margin-left: auto; color: #60a5fa; font-size: 0.74rem; font-weight: 600; text-decoration: none; }
.flow-start-links { padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; }
.flow-start-link { display: flex; align-items: center; gap: 7px; color: #60a5fa; font-family: var(--sans); font-size: 0.78rem; font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Zoom controls — bottom-left, matching Salesforce Flow Builder's own toolbar placement */
.flow-zoom { position: absolute; left: 14px; bottom: 14px; z-index: 2; display: flex; flex-direction: column; background: var(--panel-top); border: 1px solid var(--border-strong); border-radius: var(--r-sm); box-shadow: var(--shadow-ambient); overflow: hidden; }
.flow-zoom-btn { width: 30px; height: 30px; display: grid; place-items: center; background: none; border: none; border-bottom: 1px solid var(--border); color: var(--text-2); cursor: pointer; transition: background var(--quick) var(--ease), color var(--quick) var(--ease); }
.flow-zoom-btn:last-child { border-bottom: none; }
.flow-zoom-btn:hover { background: rgba(255,255,255,0.06); color: var(--text); }

.flow-add { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; display: grid; place-items: center; background: var(--bg-raised); border: 1.5px solid var(--border-strong); border-radius: 999px; color: var(--faint); cursor: default; }

.flow-elem { position: absolute; width: 300px; display: flex; align-items: center; gap: 11px; padding: 12px 14px; background: #2b2c31; border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: 0 6px 16px -8px rgba(0,0,0,0.6); }
.flow-elem-icon { flex-shrink: 0; width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; }
/* colors follow Salesforce Flow Builder's own element categories, not per-element:
   Data (Get/Create/Update/Delete Records) = red, Interaction (Screen) = blue,
   Logic (Decision/Loop/Assignment) = orange, Action (Apex/Email) = navy, End = red */
.flow-elem-icon--data { background: #c23934; }
.flow-elem-icon--screen { background: #0b5cab; }
.flow-elem-icon--logic { background: #dd7a01; }
.flow-elem-icon--action { background: #04629c; }
.flow-elem-icon--end { background: #c23934; }
.flow-elem--end { width: auto !important; display: inline-flex; gap: 9px; padding: 8px 12px; }
.flow-elem--end .flow-elem-icon { width: 24px; height: 24px; border-radius: 6px; }
.flow-elem--end .flow-elem-text { font-size: 0.82rem; }
.flow-elem--end .flow-elem-text b { font-size: 0.82rem; }
.flow-elem-text { display: flex; flex-direction: column; gap: 2px; font-family: var(--sans); font-size: 0.84rem; line-height: 1.25; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; }
.flow-elem-text b { font-weight: 600; color: var(--text); font-size: 0.88rem; }
.flow-elem-caret { flex-shrink: 0; width: 18px; height: 18px; display: grid; place-items: center; background: none; border: none; color: var(--faint); cursor: default; margin-left: -4px; }

/* expertise strip below feature rows */
.sf-expertise { position: relative; overflow: hidden; padding: 24px var(--md); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-raised); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sm) var(--md); }
.sf-expertise::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.10), transparent); }
.sf-cta-text { margin: 0; font-size: 1.15rem; font-weight: 540; color: var(--text); letter-spacing: -0.01em; }

/* links inside running text need more than colour to stand out (WCAG 1.4.1) */
main p a:not([class]) { text-decoration: underline; text-underline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 650ms var(--ease), transform 650ms var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
/* bigger/slower entrance for each page's top hero moment (index's hero, about/salesforce's
   top section-head). Pure CSS from first paint, not the scroll observer: it's always above
   the fold, and gating it on script.js held back the page's largest paint (and hid the
   headline entirely if the script failed). Siblings stagger 70ms apart like .reveal. */
@keyframes hero-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.reveal-hero { animation: hero-in 750ms var(--ease) both; }
.reveal-hero ~ .reveal-hero { animation-delay: 70ms; }
.reveal-hero ~ .reveal-hero ~ .reveal-hero { animation-delay: 140ms; }
.reveal-hero ~ .reveal-hero ~ .reveal-hero ~ .reveal-hero { animation-delay: 210ms; }

/* ---------- Nav entrance (page load, not scroll-triggered) ---------- */
@keyframes nav-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.nav { animation: nav-in 550ms var(--ease) both; }

/* ---------- Chart entrance animations ---------- */
.dash-bars rect { transform: scaleY(0); transform-box: fill-box; transform-origin: center bottom; transition: transform 700ms var(--ease); }
.dash-bars rect:nth-of-type(1) { transition-delay: 0ms; }
.dash-bars rect:nth-of-type(2) { transition-delay: 55ms; }
.dash-bars rect:nth-of-type(3) { transition-delay: 110ms; }
.dash-bars rect:nth-of-type(4) { transition-delay: 165ms; }
.dash-bars rect:nth-of-type(5) { transition-delay: 220ms; }
.dash-bars rect:nth-of-type(6) { transition-delay: 275ms; }
.dash-bars rect:nth-of-type(7) { transition-delay: 330ms; }
.dash-mock.in .dash-bars rect { transform: scaleY(1); }

.dash-donut .seg { stroke-dasharray: 0 188.5; transition: stroke-dasharray 900ms var(--ease); }
.dash-donut .seg-med { transition-delay: 160ms; }
.dash-donut .seg-low { transition-delay: 320ms; }
.dash-mock.in .dash-donut .seg-high { stroke-dasharray: 84.8 188.5; }
.dash-mock.in .dash-donut .seg-med { stroke-dasharray: 56.5 188.5; }
.dash-mock.in .dash-donut .seg-low { stroke-dasharray: 28.3 188.5; }

/* parallax targets */
.feature-visual { will-change: transform; }

/* ---------- Legal pages (Privacy Policy / Terms of Service) ---------- */
.legal-updated { font-family: var(--mono); font-size: 0.8rem; color: var(--faint); margin: var(--xs) 0 var(--xl); }
.legal-content { max-width: var(--measure); }
.legal-content h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; margin-top: var(--lg); margin-bottom: var(--sm); }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { color: var(--text-2); margin-bottom: var(--sm); line-height: 1.7; }
.legal-content ul { color: var(--text-2); line-height: 1.7; margin: 0 0 var(--sm); padding-left: 22px; }
.legal-content li { margin-bottom: 4px; }
.legal-content a { color: var(--accent-blue); }
.legal-content strong { color: var(--text); font-weight: 560; }

/* ---------- AI Instructions Builder ---------- */
.shell-narrow { max-width: 760px; }
.kicker { font-family: var(--mono); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--sm); }

#aiStartBtn { margin-top: var(--md); }

/* progress */
.ai-progress { height: 3px; border-radius: 999px; background: var(--border); overflow: hidden; margin-bottom: 10px; }
.ai-progress-bar { display: block; height: 100%; width: 33.33%; background: linear-gradient(100deg, var(--accent-blue), var(--accent-green)); border-radius: 999px; transition: width 420ms var(--ease); }
.ai-progress-label { font-family: var(--mono); font-size: 0.78rem; color: var(--faint); margin-bottom: var(--lg); }
.ai-progress-bottom { margin-top: var(--lg); margin-bottom: 10px; }
.ai-progress-bottom + .ai-progress-label { margin-bottom: 0; text-align: center; }

/* pages */
.ai-page-title { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 650; letter-spacing: -0.02em; text-align: center; margin-bottom: var(--lg); }

/* pills (shared look with work-filter/faq-filter, sized for longer option text) */
.ai-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-pill { font-family: var(--sans); font-size: 0.85rem; color: var(--text-2); background: rgba(255,255,255,0.03); border: 1px solid var(--border-strong); padding: 9px 15px; border-radius: 999px; cursor: pointer; transition: background var(--quick) var(--ease), border-color var(--quick) var(--ease), color var(--quick) var(--ease); }
.ai-pill:hover { border-color: var(--accent-blue); color: var(--text); }
.ai-pill.is-active { color: #fff; background: linear-gradient(#08090a, #08090a) padding-box, linear-gradient(100deg, var(--accent-blue), var(--accent-green)) border-box; border: 1px solid transparent; }
.ai-pill:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 2px; }

.ai-other-input { display: block; width: 100%; max-width: 420px; margin-top: 10px; font-family: var(--sans); font-size: 0.95rem; color: var(--text); background: rgba(255,255,255,0.03); border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 11px 14px; }
.ai-other-input[hidden] { display: none; } /* own display:block would otherwise override the browser's default [hidden] rule */
.ai-other-input::placeholder { color: var(--faint); }
.ai-other-input:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 1px var(--accent-blue); }
.ai-select { display: block; width: 100%; max-width: 100%; font-family: var(--sans); font-size: 0.95rem; color: var(--text); background: rgba(255,255,255,0.03); border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 12px 40px 12px 14px; cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%238a8f98' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; transition: border-color var(--quick), box-shadow var(--quick); }
.ai-select:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 1px var(--accent-blue); }
.ai-select option { background: var(--panel); color: var(--text); }
.ai-privacy-note { font-size: 0.8rem; color: var(--faint); margin-top: 8px; }
.ai-privacy-note a, .form-privacy-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.ai-privacy-note a:hover, .form-privacy-note a:hover { color: var(--text); }
.form-privacy-note { font-size: 0.8rem; color: var(--faint); margin-top: var(--sm); }

.ai-nav { display: flex; align-items: center; justify-content: space-between; margin-top: var(--lg); }
.ai-form-status { margin-top: var(--sm); font-size: 0.9rem; color: var(--muted); }
.ai-form-status.error { color: #ff6b6b; }
.ai-page-error { color: #ff6b6b; font-size: 0.85rem; margin-top: -8px; margin-bottom: var(--sm); }

/* done step: the confirmation that replaces page 3 while the lead posts and ai-thanks.html loads */
.ai-done { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sm); text-align: center; animation: ai-done-in 360ms var(--ease) both; }
.ai-done[hidden] { display: none; } /* own display:flex would otherwise override [hidden] */
.ai-done .ty-confirm { margin: 0; }
.ai-done .ty-confirm:focus { outline: none; } /* focused only so screen readers announce it */
@keyframes ai-done-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ai-done { animation: none; } }

/* results */
.ai-results-title { margin-top: 4px; margin-bottom: 8px; }
.ai-tabs { display: flex; gap: 8px; margin: var(--lg) 0 0; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.ai-tabs::-webkit-scrollbar { display: none; }
.ai-tab { font-family: var(--sans); font-size: 0.92rem; font-weight: 540; color: var(--muted); background: none; border: none; border-bottom: 2px solid transparent; padding: 10px 4px; margin-right: 20px; flex-shrink: 0; white-space: nowrap; cursor: pointer; transition: color var(--quick) var(--ease), border-color var(--quick) var(--ease); }
.ai-tab:hover { color: var(--text); }
.ai-tab.is-active { color: var(--text); border-bottom-color: var(--ai-accent); }

.ai-panel { display: none; padding-top: var(--md); }
.ai-panel.is-active { display: block; }
.ai-output { background: var(--panel); border: 1px solid var(--border); border-radius: var(--r-lg); margin-bottom: var(--sm); overflow: hidden; }
.ai-output-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--border); background: var(--panel-top); }
.ai-output-head span { font-family: var(--mono); font-size: 0.76rem; color: var(--muted); }
.ai-copy-btn { font-family: var(--mono); font-size: 0.74rem; color: var(--text-2); background: rgba(255,255,255,0.04); border: 1px solid var(--border-strong); border-radius: var(--r-sm); padding: 5px 11px; cursor: pointer; transition: background var(--quick) var(--ease), color var(--quick) var(--ease); }
.ai-copy-btn:hover { color: var(--text); border-color: var(--ai-accent); }
.ai-copy-btn.is-copied { color: var(--ai-accent); border-color: var(--ai-accent); }
.ai-output-body { padding: 14px 16px; font-family: var(--mono); font-size: 0.82rem; line-height: 1.7; color: var(--text-2); white-space: pre-wrap; }

.ai-open-btn { display: inline-flex; align-items: center; gap: 7px; margin-top: var(--xs); border-color: var(--ai-accent); color: var(--ai-accent); }
.ai-open-btn svg { flex-shrink: 0; }
/* mobile: pills become a checkbox list (tone uses round radio markers) */
@media (max-width: 680px) {
    .ai-pills { flex-direction: column; gap: 6px; }
    .ai-pill { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--r-sm); line-height: 1.35; }
    .ai-pill::before { content: ""; flex-shrink: 0; width: 16px; height: 16px; box-sizing: border-box; border: 1.5px solid var(--border-strong); border-radius: 4px; }
    .ai-pill.is-active::before { border-color: transparent; background: linear-gradient(100deg, var(--accent-blue), var(--accent-green)); }
    .footer-slim .footer-inner { display: none; }
    .footer-slim { margin-top: var(--md); }
}

/* per-platform accent on the results screen: ChatGPT teal, Claude orange, Perplexity purple */
#aiResults { --ai-accent: var(--accent-green); }
#aiResults[data-platform="claude"] { --ai-accent: #d97757; }
#aiResults[data-platform="chatgpt"] { --ai-accent: #14b8a6; }
#aiResults[data-platform="perplexity"] { --ai-accent: #a855f7; }
#aiResults[data-platform="generic"] { --ai-accent: #ef4444; }
.ai-results-head { text-align: center; }
.ai-results-head .ai-results-title { margin: 0 auto; max-width: 24ch; font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.1; letter-spacing: -0.025em; color: var(--text); font-weight: 650; }
.ai-results-head .measure { margin: var(--md) auto 0; }

/* ============ AI Instructions pages (builder + thank-you) ============ */
.lp-main { padding-top: 56px; } /* clear the fixed nav */
.lp-kicker { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.lp-kicker .num { color: var(--accent-green); }

/* ---- Thank-you / delivery page ---- */
.ty-hero { text-align: center; padding-top: var(--lg); padding-bottom: var(--md); }
.ty-confirm { display: flex; width: fit-content; max-width: 100%; margin-inline: auto; justify-content: center; text-align: center; align-items: center; gap: 10px; font-family: var(--mono); font-size: 0.82rem; color: var(--green); border: 1px solid rgba(76,183,130,0.35); background: rgba(76,183,130,0.08); border-radius: 999px; padding: 8px 16px; margin-bottom: var(--md); }
.ty-check { color: var(--green); font-weight: 700; }
.ty-title { max-width: 20ch; margin: 0 auto; font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
.ty-lede { margin: var(--md) auto 0; }
.ty-pitch { margin: var(--lg) auto 0; max-width: 640px; text-align: left; padding: var(--lg); }
.ty-pitch-h { font-size: clamp(1.2rem, 2.4vw, 1.55rem); font-weight: 650; letter-spacing: -0.02em; margin-bottom: var(--sm); color: var(--text); }
.ty-pitch-list { list-style: none; padding: 0; margin: 0 0 var(--md); display: flex; flex-direction: column; gap: 12px; }
.ty-pitch-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); font-size: 1rem; line-height: 1.5; }
.ty-pitch-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.ty-skip { font-size: 0.9rem; color: var(--muted); text-decoration: none; }
.ty-skip:hover { color: var(--text); }
.ty-deliver { scroll-margin-top: 80px; padding-top: var(--lg); }

/* ---- Thank-you: qualified (video + booking) layout ---- */
.ty2-hero { text-align: center; padding-top: var(--lg); padding-bottom: var(--md); }
.ty2-inner { display: flex; flex-direction: column; align-items: center; }
.ty2-title { max-width: 18ch; margin: var(--sm) auto 0; font-size: clamp(1.9rem, 4.4vw, 3rem); }
.ty2-select { color: var(--muted); margin: var(--sm) auto 0; max-width: 54ch; }
.ty2-video { width: 100%; max-width: 720px; margin: var(--lg) auto 0; aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--panel); overflow: hidden; }
.ty2-video-ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--faint); background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px); background-size: 20px 20px; }
.ty2-cta { margin-top: var(--lg); transition: opacity 400ms var(--ease); }
.ty2-cta.is-pending { opacity: 0; visibility: hidden; }
.ty2-book { padding: 14px 28px; font-size: 1rem; }
.ty2-hero .ty-skip { display: inline-block; margin-top: var(--md); }
.ty2-note { color: var(--faint); font-size: 0.85rem; margin: var(--md) auto 0; max-width: 46ch; }
.ty2-stats { display: flex; flex-wrap: wrap; gap: var(--md) var(--lg); justify-content: center; margin-top: var(--lg); color: var(--muted); font-size: 0.9rem; }
.ty2-stats strong { color: var(--text); }
.ty2-reviews { background: var(--bg-raised); border-block: 1px solid var(--border); }
.ty2-reviews-kicker { justify-content: center; margin-bottom: var(--md); }
.ty2-review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--sm); }
.ty2-stars { color: var(--accent-green); letter-spacing: 2px; font-size: 0.9rem; }
.ty2-review p { color: var(--muted); margin: 10px 0; font-size: 0.95rem; }
.ty2-review-by { font-size: 0.82rem; color: var(--faint); }

/* Thank-you "sharpen it" step — a one-sentence mad-lib above the delivered prompt */
.ty-sharpen { margin-top: var(--md); padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-raised); }
.ty-sharpen-label { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-green); margin-bottom: 6px; }
.ty-sharpen .ml-text { margin: 0; font-size: 1.05rem; }
.ty-sharpen-status { margin: 4px 0 0; font-size: 0.82rem; color: var(--green); }
.ty-sharpen-status:empty { display: none; }

/* ===================================================================
   AI instructions page (ai-instructions.html) — 2-column opt-in: copy + "what you
   get" left, builder card right. (`vc-` prefix: it began as A/B "Variant C".)
   =================================================================== */
/* .shell supplies the site's width + side padding so edges line up with the nav */
.vc-hero { padding-top: var(--lg); display: grid; grid-template-columns: 1.05fr 0.95fr; grid-template-rows: auto 1fr; grid-template-areas: "copy form" "visual form"; column-gap: 56px; align-items: start; }
.vc-copy { grid-area: copy; }
.vc-visual { grid-area: visual; margin: var(--md) 0 var(--sm); }
.vc-formcol { grid-area: form; scroll-margin-top: 80px; }

.vc-sub { margin-top: var(--md); }


/* Form card */
.vc-card { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--panel); } /* no overflow:hidden: multi-select panels may open past the card */
.vc-cardbar { border-radius: calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px) 0 0; display: flex; align-items: center; gap: 14px; background: var(--panel-top); border-bottom: 1px solid var(--border); color: var(--muted); font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; padding: 11px 16px; }
.vc-card-dots { flex-shrink: 0; }
.vc-size-toggle { position: relative; width: 11px; height: 11px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,0.14); cursor: pointer; transition: background var(--quick) var(--ease); }
.vc-size-toggle::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; } /* larger hit area */
.vc-size-toggle:not(:disabled):hover, .vc-size-toggle:focus-visible { background: #f97316; }
.vc-size-toggle:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 3px; }
.vc-size-toggle:disabled { cursor: default; }

/* Wide mode (desktop grid only): the form column spans both columns, anchored on the
   right so it grows leftward over the copy + visual, which fade out underneath it. */
@media (min-width: 992px) {
    .vc-copy { transition: opacity 300ms var(--ease) 120ms; }
    .vc-hero.is-wide .vc-formcol { grid-area: 1 / 1 / 3 / -1; justify-self: end; width: 100%; position: relative; z-index: 2; }
    .vc-hero.is-cover .vc-copy, .vc-hero.is-cover .vc-visual { opacity: 0; visibility: hidden; transition: opacity 200ms var(--ease), visibility 0s 200ms; }
    .vc-formcol.is-resizing { transition: width 480ms var(--ease); }
}
.vc-card-inner { padding: var(--md) 28px 28px; }
.vc-card .ai-page-title { font-size: 1.35rem; line-height: 1.3; text-align: left; margin-bottom: var(--md); }

/* "What you get" panel — sits in the visual slot under the copy */
.vc-inside { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-raised); padding: 16px 18px; }
.vc-inside-label { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-green); margin-bottom: 12px; }
.vc-inside-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.vc-inside-list li { position: relative; padding-left: 22px; font-size: 0.88rem; line-height: 1.4; color: var(--text-2); }
.vc-inside-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent-green); font-weight: 700; }
.vc-consent { margin-top: 14px; font-size: 0.78rem; line-height: 1.6; color: var(--faint); }
.vc-consent a { color: var(--muted); }

/* (3)/(4) sections below the hero */
.vc-sec { scroll-margin-top: 80px; }
.vc-sec-lede { margin-top: var(--sm); }

.vc-fit { display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-width: 880px; margin-top: var(--lg); border-top: 1px solid var(--border); }
.vc-fit-col { padding: var(--md) var(--md) var(--sm) 0; }
.vc-fit-skip { padding-left: var(--md); border-left: 1px solid var(--border); }
.vc-fit-head { font-family: var(--mono); font-size: 0.76rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: var(--sm); }
.vc-fit-yes { color: var(--accent-green); }
.vc-fit-no { color: var(--faint); }
.vc-fit-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.vc-fit-col li { position: relative; padding-left: 26px; font-size: 0.95rem; line-height: 1.5; color: var(--text-2); }
.vc-fit-col li::before { position: absolute; left: 0; top: 0; }
.vc-fit-col:not(.vc-fit-skip) li::before { content: "✓"; color: var(--accent-green); font-weight: 700; }
.vc-fit-skip li { color: var(--muted); }
.vc-fit-skip li::before { content: "✕"; color: var(--faint); }
.vc-sec-cta { margin-top: var(--lg); }

.vc-reviews { background: var(--bg-raised); border-block: 1px solid var(--border); }
.vc-rev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--lg); margin-top: var(--md); }
.vc-rev { margin: 0; border-left: 3px solid var(--accent-blue); padding: 4px 0 4px 20px; }
.vc-rev-stars { color: var(--accent-green); letter-spacing: 2px; font-size: 0.85rem; }
.vc-rev p { margin: 10px 0; color: var(--text-2); font-size: 1rem; line-height: 1.6; }
.vc-rev-by { font-style: normal; font-size: 0.82rem; color: var(--faint); }

@media (max-width: 991px) {
    .vc-hero { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: "copy" "form" "visual"; max-width: 640px; row-gap: var(--md); }
    .vc-rev-grid { grid-template-columns: 1fr; gap: var(--md); }
}
@media (max-width: 600px) {
    .vc-inside-list { grid-template-columns: 1fr; }
    .vc-card-inner { padding: var(--md) 18px 22px; }
    .vc-fit { grid-template-columns: 1fr; }
    .vc-fit-skip { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); padding-top: var(--md); margin-top: 4px; }
}

/* ===================================================================
   Builder — mad-lib style. Each question is a sentence with the controls inline:
   text inputs + selects become underlined blanks, pills become word chips.
   =================================================================== */
.ml-lede { margin: calc(var(--sm) * -1) 0 var(--md); color: var(--muted); font-size: 0.92rem; }
.ml-text { margin: 0 0 var(--sm); font-size: clamp(1.1rem, 1.8vw, 1.3rem); line-height: 2.2; color: var(--text-2); }
.ml-hint { font-size: 0.72em; color: var(--faint); white-space: nowrap; }
.ml-blank:not(:placeholder-shown) + .ml-hint { display: none; } /* "(optional)" drops once filled */

/* blanks: dashed underline when empty, solid green once filled, solid blue while focused */
.ai-madlib .ml-blank, .ai-madlib .ai-select { display: inline-block; vertical-align: baseline; max-width: 100%; margin: 0 2px; padding: 0 4px 1px; font: inherit; font-weight: 560; color: var(--text); background-color: transparent; border: 0; border-bottom: 2px dashed rgba(255,255,255,0.3); border-radius: 0; box-shadow: none; transition: border-color var(--quick) var(--ease); }
.ai-madlib .ml-blank::placeholder { color: var(--faint); font-weight: 400; }
.ai-madlib .ml-blank:not(:placeholder-shown) { border-bottom-style: solid; border-bottom-color: rgba(0,255,106,0.55); }
.ai-madlib .ai-select { width: auto; padding-right: 1.3em; background-position: right 2px center; }
/* :where() keeps these at plain-class specificity so :focus below still wins */
.ai-madlib .ai-select:not(:where(:has(option[value=""]:checked))) { border-bottom-style: solid; border-bottom-color: rgba(0,255,106,0.55); }
.ai-madlib .ai-select:where(:has(option[value=""]:checked)) { color: var(--faint); font-weight: 400; }
.ai-madlib .ml-blank:focus, .ai-madlib .ai-select:focus { outline: none; box-shadow: none; border-bottom-style: solid; border-bottom-color: var(--accent-blue); }
.ai-madlib .ai-other-input[hidden] { display: none; }
.ml-w-s { width: 6.5em; }
.ml-w-m { width: 8.5em; }
.ml-w-l { width: 12em; }

/* chips: inline word choices inside the sentence (thank-you "sharpen it" step; overrides the mobile checkbox-list pills) */
.ai-madlib .ai-pills { display: inline; }
.ai-madlib .ai-pill { display: inline-block; width: auto; margin: 0 2px 6px 0; padding: 1px 12px; font-size: 0.8em; line-height: 1.7; vertical-align: 0.08em; border-radius: 999px; }
.ai-madlib .ai-pills[data-group] .ai-pill::before { content: none; }

/* multi-select blank (aiMultiSelect in script.js): a chip field inline in the sentence, opening a
   panel with a search box over a checklist. Same filled/focus colours as the other blanks. */
.ml-multi { position: relative; display: inline-block; max-width: 100%; margin: 0 2px; vertical-align: middle; line-height: 1.4; }
.ml-multi-box { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; max-width: 100%; min-height: 36px; padding: 3px 4px 3px 8px; font-size: 0.85em; border: 1px dashed rgba(255,255,255,0.3); border-radius: var(--r-sm); background: rgba(255,255,255,0.02); cursor: pointer; transition: border-color var(--quick) var(--ease), box-shadow var(--quick) var(--ease); }
.ml-multi.has-value .ml-multi-box { border-style: solid; border-color: rgba(0,255,106,0.45); }
.ml-multi.is-open .ml-multi-box { border-style: solid; border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.18); }
.ml-chips { display: contents; }
.ml-chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 2px 2px 9px; font-weight: 560; color: var(--text); background: rgba(255,255,255,0.05); border: 1px solid var(--border-strong); border-radius: 7px; white-space: nowrap; }
.ml-chip-x { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; color: var(--muted); background: none; border: 0; border-radius: 5px; cursor: pointer; }
.ml-chip-x:hover { color: var(--text); background: rgba(255,255,255,0.08); }
.ml-multi-ph { padding: 0 2px; color: var(--faint); }
.ml-multi-toggle { display: grid; place-items: center; width: 24px; height: 24px; margin-left: auto; padding: 0; color: var(--muted); background: none; border: 0; border-radius: 5px; cursor: pointer; }
.ml-multi-box:hover .ml-multi-toggle { color: var(--text); }
.ml-multi-toggle:focus-visible, .ml-chip-x:focus-visible { outline: 2px solid var(--accent-blue); outline-offset: 1px; }
.ml-multi-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; display: flex; flex-direction: column; width: min(320px, calc(100vw - 40px)); font-size: 0.95rem; line-height: 1.4; background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--r-md); box-shadow: var(--shadow-ambient); overflow: hidden; }
.ml-multi-panel[hidden] { display: none; }
.ml-multi-panel.is-up { top: auto; bottom: calc(100% + 6px); }
.ml-multi-search { display: flex; align-items: center; gap: 10px; padding: 11px 14px; color: var(--faint); border-bottom: 1px solid var(--border); }
.ml-multi-search input { flex: 1; min-width: 0; padding: 0; font: inherit; color: var(--text); background: none; border: 0; outline: none; }
.ml-multi-search input::placeholder { color: var(--faint); }
.ml-multi-list { display: flex; flex-direction: column; max-height: 244px; overflow-y: auto; }
.ml-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 11px 14px; font: inherit; color: var(--text-2); text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.ml-opt[hidden] { display: none; }
.ml-opt:last-child { border-bottom: 0; }
.ml-opt:hover, .ml-opt:focus-visible { color: var(--text); background: rgba(255,255,255,0.04); outline: none; }
.ml-opt.is-active { color: var(--text); }
.ml-check { position: relative; flex-shrink: 0; width: 18px; height: 18px; border: 1.5px solid var(--border-strong); border-radius: 5px; }
.ml-opt.is-active .ml-check { border-color: transparent; background: linear-gradient(100deg, var(--accent-blue), var(--accent-green)); }
.ml-opt.is-active .ml-check::after { content: ""; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ml-opt-add { color: var(--accent-green); font-weight: 540; }

.ai-setup { margin: var(--md) 0 var(--sm); }
.ai-setup-status { margin: 0; font-size: 0.92rem; color: var(--text-2); line-height: 1.5; }
.ai-setup-status strong { color: var(--text); font-weight: 600; }
.ai-setup-steps { margin: 10px 0 14px; padding-left: 1.3em; font-size: 0.92rem; color: var(--text-2); line-height: 1.55; }
.ai-setup-steps li { margin-bottom: 6px; }
.ai-setup-steps strong { color: var(--text); font-weight: 600; }
.ai-banner { display: flex; align-items: center; gap: 14px; margin: var(--md) 0 0; padding: 14px 16px; border: 1px solid var(--ai-accent); border-radius: var(--r-md); background: #000; color: var(--text-2); font-size: 0.92rem; line-height: 1.5; text-decoration: none; cursor: pointer; transition: background var(--quick) var(--ease); }
.ai-banner:hover, .ai-banner:focus-visible { background: rgba(255,255,255,0.04); }
.ai-banner.is-static { cursor: default; }
.ai-banner.is-static:hover { background: #000; }
.ai-banner p { flex: 1; margin: 0; }
.ai-banner strong { color: var(--ai-accent); font-weight: 600; }
.ai-banner-arrow { flex-shrink: 0; color: var(--ai-accent); transition: transform var(--quick) var(--ease); }
.ai-banner:hover .ai-banner-arrow { transform: translateX(3px); }
.ai-banner.is-static .ai-banner-arrow { display: none; }

.ai-platform-note { font-size: 0.82rem; color: var(--faint); margin: var(--xs) 0 var(--lg); }

.ai-results-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sm) var(--md); margin-top: var(--xl); padding: var(--md); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-raised); }
.ai-results-cta p { margin: 0; font-size: 1.02rem; color: var(--text); font-weight: 540; }
.ai-start-over { display: block; margin: var(--md) auto 0; font-family: var(--sans); font-size: 0.9rem; font-weight: 510; color: var(--text-2); background: rgba(255,255,255,0.03); border: 1px solid var(--border-strong); border-radius: 999px; padding: 10px 20px; cursor: pointer; transition: border-color var(--quick) var(--ease), color var(--quick) var(--ease); }
.ai-start-over:hover { color: var(--text); border-color: var(--accent-blue); }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
    .contact-layout { grid-template-columns: 1fr; gap: var(--md); }
    .card-grid.three { grid-template-columns: repeat(2, 1fr); }
    .card-grid.four { grid-template-columns: repeat(2, 1fr); }
    .expertise-card { min-height: 360px; }
    /* at 2 columns, "2 of 3" doesn't apply — wide cards just take the full row instead of
       trying to span a column line (4) that no longer exists at this track count */
    .work-card.wide-left, .work-card.wide-right { grid-column: 1 / -1; }
    .feature-row { grid-template-columns: minmax(0, 1fr); gap: var(--md); }
    .feature-row.reverse .feature-copy { order: 0; }
}
@media (max-width: 680px) {
    .shell { padding-inline: 20px; }
    .section { padding-block: var(--lg); }
    .hero { padding-top: 96px; padding-bottom: 18px; }
    .section.expertise-preview { padding-top: 15px; } /* with the hero's 18px: half the old gap to the cards */
    .hero-title { font-size: 50px; }
    .hero-title-full, .hero-lede-full { display: none; }
    .hero-title-short, .hero-lede-short { display: inline; }
    .nav-links, .nav-right { display: none; }
    /* phones: the nav scrolls away with the page (the AI builder bar above it stays pinned).
       absolute keeps it out of the flow exactly like fixed did, so nothing below moves */
    .nav { position: absolute; }
    .ai-bar { z-index: 110; } /* above the nav, so the nav slides under the pinned bar as it scrolls away */
    html { scroll-padding-top: 24px; }
    html:has(.ai-bar) { scroll-padding-top: calc(var(--ai-bar-h, 100px) + 18px); }
    /* pages that open straight into a .section (privacy, terms) clear the taller phone nav;
       pages with the AI bar keep their own (more specific) first-section rule */
    main > .section:first-child { padding-top: calc(var(--nav-h, 70px) + var(--md)); }
    .nav-toggle { display: inline-block; margin-left: auto; font-size: 1rem; padding: 10px 16px; }
    /* bigger nav, menu and hero call to action on phones */
    .wordmark { font-size: 1.6rem; }
    .mobile-menu a { font-size: 1.1rem; padding-block: 17px; }
    .hero-actions { width: 100%; }
    .hero-actions .btn { width: 100%; justify-content: center; padding: 16px 24px; font-size: 14px; font-weight: 700; }
    .vc-sub { display: none; } /* builder page intro paragraph: on phones the headline goes straight into the form */
    /* builder card on phones: no window-dots bar, and pages 1-2 drop the line under their heading */
    .vc-cardbar { display: none; }
    :is([data-ai-page="1"], [data-ai-page="2"]) .ml-lede { display: none; }
    .card-grid.two, .card-grid.three, .card-grid.four { grid-template-columns: 1fr; }
    .expertise-card { min-height: 300px; }
    /* filtering doesn't make sense against a compact tappable list (vs. a card grid) — show
       every engagement instead (see the isMobile check in applyWorkFilter, script.js) */
    .work-filters { display: none; }
    /* bigger tap area without changing visual size — padding offset by a matching negative
       margin so these don't shift surrounding layout */
    .footer-links a, .footer-mail { display: inline-block; padding-block: 10px; margin-block: -10px; }
    /* Recent Engagements: a tappable list instead of full cards — description, outcome line,
       and tags move into the work-modal (initWorkModal in script.js) instead of stacking here */
    #workGrid { gap: 0; }
    .work-card {
        flex-direction: row; align-items: center; gap: 14px;
        padding: 16px 2px; border-radius: 0; border-left: none; border-right: none; border-top: none;
        background: transparent;
    }
    .work-card:first-of-type { border-top: 1px solid var(--border); }
    .work-card:hover { transform: none; box-shadow: none; background: rgba(255,255,255,0.03); }
    .work-card .num { margin-bottom: 0; flex-shrink: 0; }
    .work-card h3 { flex: 1; margin-bottom: 0; font-size: 0.98rem; }
    .work-card p, .work-card .work-outcome, .work-card .work-tags { display: none; }
    .work-card::after {
        content: ""; width: 8px; height: 8px; flex-shrink: 0;
        border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint);
        transform: rotate(-45deg);
    }
    /* swipe carousel on mobile: horizontal scroll-snap instead of a stacked column,
       bleeding past .shell's own padding so cards peek off both edges */
    .card-grid.expertise-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: var(--sm);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        margin-inline: -20px;
        padding-inline: 20px;
        padding-bottom: 6px;
        scrollbar-width: none;
    }
    .card-grid.expertise-grid::-webkit-scrollbar { display: none; }
    .expertise-grid .expertise-card { flex: 0 0 82%; min-width: 82%; min-height: 340px; scroll-snap-align: center; }
    /* text stays visible regardless of hover capability — a carousel card can't rely on :hover */
    .expertise-teaser, .expertise-expand { opacity: 1; transform: none; }
    .form-grid { grid-template-columns: 1fr; }
    .stat-row { grid-template-columns: 1fr; gap: 0; }
    .stat { border-right: none; border-bottom: 1px solid var(--border); }
    .stat:last-child { border-bottom: none; }
    .setup-body { grid-template-columns: 1fr; }
    .setup-nav { display: none; }
    .mock { margin-top: var(--lg); }
    .dash-charts { grid-template-columns: 1fr; }
    .dash-kpis { grid-template-columns: 1fr; }
    .cta-panel { padding: var(--md); }
    .footer-bottom { flex-direction: column; gap: 8px; }
    .ai-results-cta { flex-direction: column; align-items: flex-start; }
    .ai-results-cta .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; scroll-behavior: auto; transition: none !important; }
    .reveal, .reveal-hero { opacity: 1; transform: none; }
    .aurora { opacity: 0.6; }
}
