/* ============================================================================
   VISUALITYX — "THE NATURALIST'S LEDGER"
   Brand override layer. Loaded LAST (after home.min.css, shell.css, rtl.css,
   and per-page css) so it re-skins the whole main site without touching the
   legacy bundle. Source of truth: BRAND.md.
   Palette: white #FFFFFF · ink #1F1E1D · blood #8B0000 (+key #6B0000)
   · label gray #6E6D66. Latin: Fraunces. Arabic: Amiri. No rounded corners, no
   shadows, no glows. Motion: ink drying — fade + settle, 200–300ms ease-out.
   ========================================================================= */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
    --parchment: #FFFFFF;
    --parchment-deep: #F0EEE9;   /* alt panels, table stripes */
    --ink: #1F1E1D;
    --ink-soft: #63635E;         /* secondary text */
    --ink-faint: #75746D;        /* muted text */
    --blood: #8B0000;
    --blood-key: #6B0000;
    --gold: #6E6D66;
    --grain-tint: #3A3937;
    --hairline: rgba(31, 30, 29, 0.9);
    --hairline-soft: rgba(31, 30, 29, 0.35);

    /* Remap the legacy token system so the old bundle obeys the ledger */
    --bg-primary: var(--parchment);
    --bg-alt: var(--parchment-deep);
    --bg-dark: var(--ink);
    --bg-dark-alt: #201F1E;
    --color-primary: var(--blood);
    --color-primary-dark: var(--blood-key);
    --color-primary-light: #A31212;
    --color-primary-rgb: 139, 0, 0;
    --text-dark: var(--ink);
    --text-secondary: var(--ink-soft);
    --text-muted: var(--ink-faint);
    --text-light: var(--parchment);
    --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-body: 'Fraunces', Georgia, 'Times New Roman', serif;
    --radius: 0px;
    --radius-sm: 0px;
    --radius-lg: 0px;
    --shadow: none;
    --shadow-lg: none;
    --shadow-hover: none;
    --ease: cubic-bezier(0.33, 0.9, 0.4, 1);
    --duration: 0.24s;
    --duration-slow: 0.3s;

    /* Doodle system — hand-drawn wobbly strokes (Claude-like), not ruler lines.
       Each variant is an organic border-radius; rotate through them so no two
       neighbouring boxes wobble identically. */
    --doodle-a: 255px 15px 225px 15px / 15px 225px 15px 255px;
    --doodle-b: 15px 225px 15px 255px / 255px 15px 225px 15px;
    --doodle-c: 225px 15px 255px 15px / 15px 255px 15px 225px;
    --doodle-soft: 36px 8px 30px 10px / 8px 32px 10px 36px;
    --doodle-pill: 120px 30px 120px 30px / 30px 120px 30px 120px;
}

/* ---------- 2. The paper -------------------------------------------------- */
/* Viewport guard: no horizontal scroll, ever. `clip` (not `hidden`) so the
   viewport doesn't become a scroll container. Off-canvas panels, RTL end-edge
   overflow, or stray wide elements can then never inflate the mobile layout
   viewport (which broke media queries and anchored RTL pages far-edge). */
html, body { overflow-x: clip; }

body {
    background-color: var(--parchment);
    background-image:
        radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(58,57,55,0.06) 100%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.6 0.6 0.6 0 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.05' fill='%233A3937'/%3E%3C/svg%3E");
    color: var(--ink);
    font-family: var(--font-body);
    font-variation-settings: 'opsz' 12;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.75;
}
::selection { background: var(--blood); color: var(--parchment); }

/* ---------- 3. Typography ------------------------------------------------- */
h1, h2, h3, h4, h5, h6, .display {
    font-family: var(--font-heading);
    font-variation-settings: 'opsz' 144;
    font-weight: 720;
    color: var(--ink);
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.15;
}
h1 { font-weight: 720; }
h3, h4, h5, h6 { font-weight: 600; }
p { color: var(--ink-soft); line-height: 1.75; }
strong, b { color: var(--ink); font-weight: 600; }
a { color: inherit; }

/* Eyebrows become plate labels: small gold, sentence case, no shouting */
.eyebrow {
    font-family: var(--font-heading);
    font-variation-settings: 'opsz' 14;
    color: var(--gold);
    text-transform: none;
    letter-spacing: 0.08em;
    font-weight: 500;
    font-size: 0.9rem;
}
.eyebrow::before, .eyebrow::after { display: none; }

/* The red full stop — the brand signs its sentences */
.stop { color: var(--blood); }

/* Pull-quote register */
.ledger-light {
    font-variation-settings: 'opsz' 144;
    font-weight: 360;
}

/* ---------- 4. Signature motifs ------------------------------------------ */
/* Gold rule with red point — the section divider */
.rule {
    width: 240px; height: 2px;
    background: var(--gold);
    position: relative;
    margin: 2rem auto;
    border: 0;
}
.rule::after {
    content: '';
    position: absolute; left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--blood);
}

/* Plate frame — a hand-drawn box, as if inked freehand */
.plate { border: 2px solid var(--ink); padding: 14px; background: var(--parchment); border-radius: var(--doodle-a); }
.plate > .inner, .plate-inner { border: 1px solid var(--ink); border-radius: var(--doodle-b); }

/* Plate numbers (gold, small, centered) */
.plate-no {
    display: block;
    text-align: center;
    color: var(--gold);
    font-variation-settings: 'opsz' 14;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
}

/* Large X watermark (≈10% opacity) */
.x-watermark {
    position: absolute; inset: 0;
    background: url('/assets/brand/vx-mark-transparent.svg') no-repeat center / contain;
    opacity: 0.09;
    pointer-events: none;
}

/* ---------- 5. Buttons — drawn with a ruler ------------------------------- */
.btn {
    border-radius: var(--doodle-pill);
    font-family: var(--font-heading);
    font-variation-settings: 'opsz' 14;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    box-shadow: none;
    transition: background var(--duration) var(--ease), color var(--duration) var(--ease), border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.btn:hover { transform: rotate(-0.6deg); box-shadow: none; }

.btn-primary {
    background: var(--ink);
    border: 1px solid var(--ink);
    color: var(--parchment);
}
.btn-primary:hover { background: #3A3937; border-color: var(--ink); color: var(--parchment); box-shadow: none; }

.btn-outline, .btn-outline-dark {
    background: transparent;
    border: 1px solid var(--ink);
    color: var(--ink);
}
.btn-outline:hover, .btn-outline-dark:hover { background: var(--ink); color: var(--parchment); border-color: var(--ink); }

/* On ink panels, outline buttons flip */
.section-dark .btn-outline, .inkpanel .btn-outline, .footer .btn-outline, .cta-banner .btn-outline {
    border-color: var(--parchment); color: var(--parchment);
}
.section-dark .btn-outline:hover, .inkpanel .btn-outline:hover, .footer .btn-outline:hover, .cta-banner .btn-outline:hover {
    background: var(--parchment); color: var(--ink);
}

/* Hover flourish: the red point appears (underline that ends in a dot) */
.btn-primary:hover, .btn-outline:hover { position: relative; }
.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute; left: 0; right: 10px; bottom: 2px;
    height: 1px; background: var(--ink);
    transform: scaleX(0); transform-origin: left center;
    transition: transform var(--duration) var(--ease);
}
.nav-link::before {
    content: '';
    position: absolute; right: 4px; bottom: 0;
    width: 5px; height: 5px; border-radius: 50%;
    background: var(--blood);
    opacity: 0;
    transition: opacity var(--duration) var(--ease) 0.12s; /* the red point lands last */
}
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); background: var(--ink); }
.nav-link:hover::before, .nav-link.active::before { opacity: 1; }

/* ---------- 6. Header — the ledger's running head ------------------------- */
.header, .header-scrolled {
    background: var(--parchment);
    border-bottom: 1px solid var(--hairline-soft);
    box-shadow: none;
    backdrop-filter: none;
}
.header .nav-link, .header-scrolled .nav-link { color: var(--ink); font-family: var(--font-heading); font-variation-settings: 'opsz' 14; font-weight: 500; }
.hamburger span { background: var(--ink) !important; }
.nav-overlay { background: var(--parchment); }
.nav-overlay .nav-link { color: var(--ink); }

/* shell.css layered nav */
.vx-nav-item > .nav-link { color: var(--ink); }
.vx-dropdown, .vx-mega {
    background: var(--parchment);
    border: 2px solid var(--ink);
    border-radius: var(--doodle-soft);
    box-shadow: none;
    padding: 14px;
}
.vx-dropdown a, .vx-mega a { color: var(--ink); border-radius: var(--doodle-soft); }
.vx-dropdown a:hover, .vx-mega a:hover { background: var(--parchment-deep); color: var(--blood); }

/* Mega menu — parchment specimen cards (shell.css ships dark-theme colors) */
.vx-dropdown-link { color: var(--ink); }
.vx-dropdown-link:hover { background: var(--parchment-deep); color: var(--blood); }
.vx-mega-link:hover { background: var(--parchment-deep); }
.vx-mega-name { color: var(--ink); font-variation-settings: 'opsz' 14; font-weight: 600; }
.vx-mega-desc { color: var(--ink-soft); }
.vx-mega-thumb {
    background: var(--parchment-deep);
    border: 1px solid var(--hairline-soft);
    border-radius: var(--doodle-soft);
}
.vx-mega-thumb img { filter: sepia(0.18) saturate(0.9); }
.vx-mega-ico { color: var(--ico, var(--gold)); }
.vx-mega-link.is-flagship { background: rgba(139, 0, 0, 0.06); border-radius: var(--doodle-soft); }
.vx-mega-link.is-flagship:hover { background: rgba(139, 0, 0, 0.11); }
.vx-mega-badge {
    background: var(--blood);
    border: 1px solid var(--blood-key);
    color: var(--parchment);
    text-transform: none;
    letter-spacing: 0.04em;
}
.vx-lang-toggle {
    border: 1px solid var(--ink);
    border-radius: var(--doodle-pill);
    background: transparent;
    color: var(--ink);
}
.vx-lang-toggle:hover { background: var(--ink); color: var(--parchment); }

/* Header logo: the wordmark (SVG, ink + blood on transparent).
   The SVG canvas is letterboxed (3840x2160 with air around the wordmark), so
   the rendered height compensates. One parchment header -> one logo, always. */
.header-logo img.logo-light, .header .logo img, .logo-img { display: block !important; height: 58px; width: auto; }
.header-logo img.logo-dark { display: none !important; }

/* Mega-menu / mobile solution icons obey their --ico accent (now gold/blood) */
.vx-mega-ico svg, .vx-msol-ico svg { stroke: var(--ico, var(--gold)); }

/* ---------- 7. Hero — the cover page -------------------------------------- */
.hero {
    background: var(--parchment) !important;
    min-height: 92vh;
    color: var(--ink);
}
/* The grain field (ledger-cells.js) — behind content, above the paper */
.hero-cells {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Two-column cover page: manuscript text on the start side, the showreel
   mounted as a specimen plate on the other. Mirrors automatically in RTL. */
.hero-grid {
    position: relative; z-index: 3;
    width: 100%;
    max-width: var(--container-max, 1200px);
    margin-inline: auto;
    padding: clamp(110px, 15vh, 160px) 40px 150px;
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: center;
}
.hero-content { position: relative; z-index: 3; text-align: start; max-width: none; padding: 0; margin: 0; }
.hero .hero-content h1, .hero h1 { color: var(--ink); text-shadow: none; font-size: clamp(2.5rem, 4.6vw, 4rem); text-wrap: balance; }
.hero p, .hero .hero-sub { color: var(--ink-soft); }
.hero .hero-subtitle { margin: 0 0 2.4rem; max-width: 34em; }
.hero .hero-buttons { justify-content: flex-start; margin-bottom: 0; }

/* --- The showreel plate — a specimen mounted in the ledger ---------------- */
.hero-plate { position: relative; z-index: 3; margin: 0; }
.hero-plate-frame {
    --band: clamp(20px, 2.6vw, 27px);   /* the ultracode band thickness */
    position: relative;
    padding: var(--band);
    cursor: pointer;
    transform: rotate(1.2deg);
    transition: transform 0.5s var(--ease, ease);
    outline: none;
}
/* the ultracode matrix band (ledger-cells.js draws the squares) */
.plate-matrix {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}
/* its red-dashed digital twin, trailing offset behind the plate */
.hero-plate-frame::before {
    content: '';
    position: absolute; inset: 0;
    border: 2px dashed var(--blood);
    border-radius: var(--doodle-b);
    transform: translate(15px, 13px) rotate(-1.5deg);
    transition: transform 0.55s var(--ease, ease);
    pointer-events: none;
    z-index: -1;
}
/* hover / focus: the twin snaps into sync with its original */
.hero-plate-frame:hover, .hero-plate-frame:focus-visible { transform: rotate(0.15deg); }
.hero-plate-frame:hover::before, .hero-plate-frame:focus-visible::before {
    transform: translate(0, 0) rotate(0deg);
}
.hero-plate-frame video {
    position: relative; z-index: 1;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: 1.5px solid var(--ink);
    border-radius: var(--doodle-soft);
    background: var(--parchment-deep);
    filter: sepia(0.14) saturate(0.9);
    transition: filter 0.4s ease;
}
.hero-plate-frame:hover video { filter: sepia(0.04) saturate(1); }
/* the field-note tag: "watch with sound" */
.hero-plate-watch {
    position: absolute; z-index: 2;
    inset-inline-end: calc(var(--band) + 12px); top: calc(var(--band) + 12px);
    display: inline-flex; align-items: center; gap: 0.45em;
    background: var(--parchment);
    color: var(--ink);
    border: 1.5px solid var(--ink);
    border-radius: var(--doodle-pill);
    font-family: var(--font-heading);
    font-size: 0.8rem; font-weight: 600;
    padding: 0.35em 0.95em;
    opacity: 0;
    transform: translateY(-5px) rotate(2deg);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
.hero-plate-watch::before { content: '▶'; font-size: 0.7em; color: var(--blood); }
.hero-plate-frame:hover .hero-plate-watch,
.hero-plate-frame:focus-visible .hero-plate-watch { opacity: 1; transform: none; }
/* the caption line beneath the plate */
.hero-plate-caption {
    display: flex; align-items: baseline; gap: 0.8em;
    margin-top: 1rem;
    font-family: var(--font-heading);
}
.hero-plate-no {
    font-size: 0.76rem; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--gold);
    white-space: nowrap;
}
.hero-plate-name { font-size: 1.06rem; font-style: italic; color: var(--ink); }

/* RTL: the tilt and the twin's trail mirror with the page */
[dir="rtl"] .hero-plate-frame { transform: rotate(-1.2deg); }
[dir="rtl"] .hero-plate-frame::before { transform: translate(-15px, 13px) rotate(1.5deg); }
[dir="rtl"] .hero-plate-frame:hover, [dir="rtl"] .hero-plate-frame:focus-visible { transform: rotate(-0.15deg); }

/* Stack on smaller screens: manuscript first, plate beneath */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; padding: 110px 20px 150px; gap: 2.6rem; }
    .hero-plate { max-width: 560px; }
}
.text-accent { color: var(--blood); }
/* The rolling country clips with overflow:hidden (the flip needs it), but
   Arabic marks (the damma in عُمان, the hamza in الأردن) rise above the
   Latin-tuned box. Grow the clip box; negative margins keep layout still. */
.text-accent { padding-block: 0.26em 0.16em; margin-block: -0.26em -0.16em; }
.hero-partners {
    background: transparent;
    border-top: 1px solid var(--hairline-soft);
    backdrop-filter: none;
}
.hero-partners img { filter: grayscale(1) sepia(0.35) opacity(0.65); }

/* AI demo button: a ledger specimen label with a living red point */
.btn-ai-demo {
    background: var(--parchment);
    border: 1px solid var(--ink);
    border-radius: var(--doodle-pill);
    box-shadow: none;
    color: var(--ink);
    backdrop-filter: none;
    animation: none;
}
.btn-ai-demo:hover { background: var(--parchment-deep); box-shadow: none; transform: none; }
.btn-ai-orb {
    background: var(--blood);
    border: 1px solid var(--blood-key);
    border-radius: 50%;
    width: 12px; height: 12px;
    box-shadow: none;
    animation: none;
    flex: 0 0 auto;
}
.btn-ai-eyebrow { color: var(--gold) !important; text-transform: none; letter-spacing: 0.08em; }
.btn-ai-title { color: var(--ink) !important; }
.btn-ai-arrow { stroke: var(--ink); color: var(--ink); }

/* Partner strip: force every logo to an ink silhouette on paper */
.hero-partners-label { color: var(--ink-faint) !important; text-transform: none; letter-spacing: 0.08em; }
.hero-partners-logos img, .hero-partners img { filter: brightness(0) opacity(0.55); }

/* Eyebrows stay gold even where legacy rules force the accent */
.hero .eyebrow, .section .eyebrow, .section-header .eyebrow, .cta-banner .eyebrow { color: var(--gold); }

/* ---------- 8. Sections & panels ------------------------------------------ */
.section, .section-sm { background: transparent; }
.section-header h2 { color: var(--ink); }

/* Every section heading is followed by the gold rule with its red point */
.section-header { position: relative; padding-bottom: 2.2rem; }
.section-header::after {
    content: '';
    position: absolute; bottom: 1rem; left: 50%;
    transform: translateX(-50%);
    width: 240px; height: 2px;
    background: var(--gold);
}
.section-header::before {
    content: '';
    position: absolute; bottom: calc(1rem - 3px); left: 50%;
    transform: translateX(-50%);
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--blood);
    z-index: 1;
}

/* Ink panels — the inversion, used as full-bleed "night plates" */
.section-dark, .cta-banner, .stats {
    background: var(--ink);
    color: var(--parchment);
    border-top: 2px solid var(--ink);
    border-bottom: 2px solid var(--ink);
}
.section-dark h2, .section-dark h3, .cta-banner h2, .stats * { color: var(--parchment); }
.section-dark p, .cta-banner p { color: rgba(255, 255, 255, 0.78); }
/* ...but parchment plate-cards INSIDE ink panels keep ink copy (they're paper) */
.section-dark .sol-step h3, .section-dark .sol-value-card h3, .section-dark .feature-card h4,
.section-dark .proj-slide h3, .section-dark .ind-sol-card .ind-sol-name { color: var(--ink); }
.section-dark .sol-step p, .section-dark .sol-value-card p, .section-dark .feature-card p,
.section-dark .proj-slide p, .section-dark .ind-sol-card .ind-sol-desc { color: var(--ink-soft); }
.section-dark .eyebrow, .cta-banner .eyebrow { color: var(--gold); }
.cta-banner::before, .cta-banner::after { display: none; }

/* Stats: a table of measurements */
.stats { background: var(--ink); }
.stat-number { font-family: var(--font-heading); font-variation-settings: 'opsz' 144; font-weight: 620; color: var(--parchment); }
.stat-label { color: var(--gold); text-transform: none; letter-spacing: 0.06em; }
.stats-grid > * + * { border-inline-start: 1px solid rgba(255, 255, 255, 0.25); }

/* ---------- 9. Cards — specimen plates ------------------------------------ */
.feature-card, .service-card, .proj-slide, .vx-acc-item,
.sol-value-card, .sol-shift-card, .sol-step, .ind-sol-card, .contact-form {
    background: var(--parchment);
    border: 2px solid var(--ink);
    border-radius: var(--doodle-a) !important;
    box-shadow: none !important;
    overflow: hidden;
    transition: transform var(--duration) var(--ease);
}
/* neighbours wobble differently — hand-drawn, not stamped */
.feature-card:nth-child(even), .service-card:nth-child(even), .sol-value-card:nth-child(even),
.sol-step:nth-child(even), .ind-sol-card:nth-child(even) { border-radius: var(--doodle-b) !important; }
.service-card:nth-child(3n), .sol-value-card:nth-child(3n) { border-radius: var(--doodle-c) !important; }
.feature-card:hover, .service-card:hover, .ind-sol-card:hover {
    transform: rotate(-0.5deg);
    box-shadow: none !important;
    /* solution.css turns .ind-sol-card:hover near-transparent, which reveals
       the dark section-dark behind it and hides the ink text. Force a solid
       paper background + gold rule so the card stays readable on hover. */
    background: var(--parchment-deep) !important;
    border-color: var(--gold) !important;
}
/* Card copy is ink on the paper card everywhere (defensive: the base
   solution.css sets these white for the old dark theme). */
.ind-sol-card .ind-sol-name { color: var(--ink); }
.ind-sol-card .ind-sol-desc { color: var(--ink-soft); }
.ind-sol-card .ind-sol-name svg { color: var(--blood); }
.feature-card-icon { border-radius: 0; background: var(--parchment-deep); }
.feature-card-icon svg { stroke: var(--ink); }
.feature-card-body h4 { color: var(--ink); }

.service-card-image img { filter: saturate(0.96); }
.service-card-overlay { background: linear-gradient(0deg, rgba(25,24,23,0.88) 0%, transparent 62%); }
.service-card-tag {
    background: var(--parchment);
    color: var(--ink);
    border: 1px solid var(--ink);
    border-radius: var(--doodle-pill);
    text-transform: none;
    letter-spacing: 0.04em;
}

/* Renders live inside plate frames */
.proj-slide img, .sol-proof-media img, .service-card-image {
    border-radius: 0;
}
.sol-proof-media {
    border: 2px solid var(--ink);
    padding: 12px;
    background: var(--parchment);
    border-radius: var(--doodle-a);
    box-shadow: none;
    overflow: hidden;
}
.sol-proof-media img { border: 1px solid var(--ink); border-radius: var(--doodle-soft); display: block; }

/* ---------- 10. Ecosystem & engraved icons -------------------------------- */
.ecosystem-tier-icon {
    background: var(--parchment);
    border: 2px solid var(--parchment);
    box-shadow: none !important;
    animation: none !important;
}
.ecosystem-tier-icon svg { stroke: var(--ink); }
.ecosystem-connector { background: var(--gold) !important; }
.ecosystem-tier:hover .ecosystem-tier-icon { transform: none; border-color: var(--gold); }
.ecosystem-tier-label {
    color: var(--gold) !important;
    text-transform: none !important;
    letter-spacing: 0.08em !important;
    font-family: var(--font-heading);
}

/* ---------- 11. Forms — filling in the ledger ------------------------------ */
input, select, textarea {
    background: var(--parchment) !important;
    border: 1px solid var(--ink) !important;
    border-radius: var(--doodle-soft) !important;
    color: var(--ink) !important;
    font-family: var(--font-body) !important;
}
input:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: var(--blood) !important;
    box-shadow: 0 0 0 1px var(--blood) !important;
}
::placeholder { color: var(--ink-faint) !important; }
.form-group label { color: var(--ink-soft); font-size: 0.9rem; }
.form-success { background: var(--parchment-deep); border: 1px solid var(--gold); color: var(--ink); border-radius: 0; }
.form-error { background: var(--parchment-deep); border: 1px solid var(--blood); color: var(--blood-key); border-radius: 0; }

/* ---------- 12. Footer — the colophon -------------------------------------- */
.footer {
    background: var(--parchment);
    color: var(--ink);
    border-top: 2px solid var(--ink);
    position: relative;
}
.footer::before {
    content: '';
    position: absolute; top: 4px; left: 0; right: 0;
    height: 1px; background: var(--ink);
}
.footer, .footer p, .footer a, .footer li { color: var(--ink-soft); }
.footer h4, .footer h5, .footer .footer-title { color: var(--ink); text-transform: none; letter-spacing: 0.02em; }
.footer a:hover { color: var(--blood); }
.footer .footer-bottom, .footer-bottom { border-top: 1px solid var(--hairline-soft); color: var(--ink-faint); }
.footer-copyright, .footer-bottom span, .footer-bottom a { color: var(--ink-faint) !important; }
.footer-socials a, .footer-socials svg { color: var(--ink-soft); fill: var(--ink-soft); }
.footer-socials a:hover svg { fill: var(--blood); }
.footer-brand img { height: 56px; width: auto; filter: none; }
.footer-colophon { text-align: center; padding: 2.5rem 0 2rem; }
.footer-colophon .rule { margin: 0 auto 1.4rem; }
.footer-slogan {
    font-family: var(--font-heading) !important;
    font-variation-settings: 'opsz' 144;
    font-weight: 360;
    font-size: 2rem;
    color: var(--ink) !important;
    margin: 0;
    line-height: 1.2;
}

/* Contact detail icons: gold labels, not red highlights (red budget) */
.contact-detail svg { stroke: var(--gold); color: var(--gold); }

/* ---------- 13. Solution / industry pages ---------------------------------- */
.sol-page { --sol-accent: var(--blood) !important; }
.sol-hero, .sol-hero.sol-hero--accent, .sol-page .sol-hero {
    background: var(--parchment) !important;
    color: var(--ink);
    min-height: 70vh;
}
.sol-hero-bg, .sol-hero--accent .sol-hero-bg, .sol-page .sol-hero-bg { background: none !important; opacity: 1; }
.sol-hero-bg::before, .sol-hero-bg::after { display: none !important; }
.sol-hero-h1, .sol-page .sol-hero-h1 { color: var(--ink) !important; text-shadow: none; }
.sol-hero-sub, .sol-page .sol-hero-sub { color: var(--ink-soft) !important; }
.sol-hero .btn-outline { border-color: var(--ink) !important; color: var(--ink) !important; }
.sol-hero .btn-outline:hover { background: var(--ink) !important; color: var(--parchment) !important; }
.sol-orb {
    background: var(--blood);
    border: 1px solid var(--blood-key);
    box-shadow: none;
    animation: none;
    border-radius: 50%;
}
.sol-hero-eyebrow { color: var(--gold); }

/* Level hero background video — the project alive beneath the copy.
   The ledger hero is LIGHT (ink text on parchment), so the video is read
   through a parchment veil rather than darkened: a moving plate seen
   through paper. Text side is more opaque so the ink copy stays crisp. */
.sol-hero--video .sol-hero-video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    filter: saturate(0.96) contrast(1.02);
}
.sol-hero--video .sol-hero-scrim {
    position: absolute; inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(255, 255, 255, 0.78) 42%,
        rgba(255, 255, 255, 0.5) 100%);
}
[dir="rtl"] .sol-hero--video .sol-hero-scrim {
    background: linear-gradient(
        to left,
        rgba(255, 255, 255, 0.92) 0%,
        rgba(255, 255, 255, 0.78) 42%,
        rgba(255, 255, 255, 0.5) 100%);
}
/* a hairline gold rule frames the moving plate from the section below */
.sol-hero--video { border-bottom: 2px solid var(--ink); }
.sol-hero--video .container { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) {
    .sol-hero--video .sol-hero-video { display: none; }  /* poster/parchment only */
}

/* ---------- Homepage hero: the reel runs behind the paper ----------------- */
/* Same veil grammar as the level heroes: opaque over the copy, opening up
   toward the free side so the film shows through. A bottom fade hands off
   cleanly to the partners strip. */
.hero--video { position: relative; overflow: hidden; }
.hero--video .hero-bg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    filter: saturate(0.96) contrast(1.02);
}
.hero--video .hero-bg-scrim {
    position: absolute; inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(to right,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.62) 40%,
        rgba(255, 255, 255, 0.24) 72%,
        rgba(255, 255, 255, 0.06) 100%);
}
[dir="rtl"] .hero--video .hero-bg-scrim {
    background: linear-gradient(to left,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(255, 255, 255, 0.62) 40%,
        rgba(255, 255, 255, 0.24) 72%,
        rgba(255, 255, 255, 0.06) 100%);
}
.hero--video .hero-grid { position: relative; z-index: 2; }
/* The partners strip is pinned to the hero's foot (hero.css absolute bottom);
   over film it needs its own footing — a quiet frosted band, logos legible,
   and a clean edge into the section below. */
.hero--video .hero-partners {
    z-index: 2;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--hairline-soft);
}
@media (max-width: 900px) {
    /* single column over film: veil follows the copy down the page instead
       of whiting out the whole frame — solid up top, film showing below */
    .hero--video .hero-bg-scrim,
    [dir="rtl"] .hero--video .hero-bg-scrim {
        background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.9) 0%,
            rgba(255, 255, 255, 0.78) 52%,
            rgba(255, 255, 255, 0.3) 100%);
    }
}
@media (prefers-reduced-motion: reduce) {
    .hero--video .hero-bg { display: none; }
}
.sol-shift-label {
    color: var(--gold) !important;
    text-transform: none !important;
    letter-spacing: 0.08em !important;
    font-family: var(--font-heading);
}
.sol-shift-tag { background: transparent; border: 1px solid var(--hairline-soft); color: var(--ink-faint); border-radius: 0; text-transform: none; }
/* Red DASHED stroke = "the digital twin / the not-yet-built" (brand rule) */
.sol-shift-card.is-to { border: 2px dashed var(--blood) !important; background: var(--parchment); }
.sol-shift-card.is-to .sol-shift-tag { border-color: var(--blood); color: var(--blood); background: transparent; }
.sol-shift-arrow svg { stroke: var(--gold); }
.sol-value-num, .sol-step-num {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 50%;
    font-family: var(--font-heading);
    box-shadow: none;
}
.sol-stats { background: var(--parchment-deep); border-block: 1px solid var(--hairline-soft); }
.sol-stat-num { color: var(--blood); font-family: var(--font-heading); font-variation-settings: 'opsz' 144; font-weight: 620; }
.sol-stat-label { color: var(--ink-soft); }
.sol-caps-list svg { stroke: var(--blood); }
.sol-caps-list li { border-bottom: 1px solid var(--hairline-soft); border-radius: 0; background: transparent; }

/* Interactive widgets — beat interactive.css's dark-theme specificity */
.vx-calc { background: var(--parchment-deep); border: 2px solid var(--ink); border-radius: var(--doodle-a); color: var(--ink); }
.vx-calc label, .vx-calc span, .vx-calc p, .vx-calc h3, .vx-calc h4, .vx-calc div { color: var(--ink) !important; }
.vx-calc .vx-calc-note, .vx-calc small { color: var(--ink-soft) !important; }
.vx-calc output, .vx-calc .vx-calc-num { color: var(--blood) !important; font-family: var(--font-heading); }
input[type="range"] { accent-color: var(--blood); }
.vx-acc-head { color: var(--ink); }
.vx-acc-item + .vx-acc-item { margin-top: -2px; } /* shared hairlines, like table rows */

/* ---------- 14. Projects carousel — the plate series ----------------------- */
.proj-slide { border: 2px solid var(--ink); }
.proj-slide-info h3 { color: var(--ink); }
/* the slide is a parchment plate even inside the ink section — all copy is ink */
.proj-slide p, .proj-slide .proj-desc, .proj-slide li, .proj-slide span { color: var(--ink-soft); }
.proj-slide .proj-impact-label, .proj-slide h4 { color: var(--ink); }
.proj-slide .proj-tag { color: var(--gold); }
.proj-tag { border: 1px solid var(--gold); color: var(--gold); border-radius: var(--doodle-pill); text-transform: none; }
/* Fun-fact marker: a hand-drawn "!" roundel — ink ring on paper, blood mark */
.proj-funfact-icon {
    width: 38px; height: 38px;
    padding: 0 !important;
    display: flex; align-items: center; justify-content: center;
    background: var(--parchment) !important;
    border: 2px solid var(--ink);
    border-radius: 49% 51% 47% 53% / 53% 46% 54% 47% !important;  /* imperfect circle */
    color: var(--blood) !important;
    font-family: var(--font-heading) !important;
    font-variation-settings: 'opsz' 144;
    font-weight: 720;
    font-size: 1.25rem !important;
    line-height: 1;
    box-shadow: none !important;
    animation: none !important;
    transition: transform var(--duration) var(--ease), background var(--duration) var(--ease);
}
.proj-funfact-icon::before { content: none !important; animation: none !important; }
.proj-funfact-icon:hover, .proj-funfact.active .proj-funfact-icon {
    transform: rotate(-8deg) scale(1.08);
    background: var(--parchment-deep) !important;
    box-shadow: none !important;
}
/* the fact itself reads as a small field-note plate */
.proj-funfact-content {
    background: var(--parchment) !important;
    border: 2px solid var(--ink);
    border-radius: var(--doodle-soft) !important;
    color: var(--ink) !important;
    box-shadow: none !important;
}
.proj-funfact-content::after { display: none; }
.swiper-pagination-bullet { background: var(--ink-faint); opacity: 1; border-radius: 50%; }
.swiper-pagination-bullet-active { background: var(--blood); }
.proj-nav-arrows button, .swiper-button-prev, .swiper-button-next {
    background: transparent; border: 1px solid var(--ink); color: var(--ink) !important; border-radius: 0; box-shadow: none;
}
.swiper-button-prev::after, .swiper-button-next::after { color: var(--ink); }
.features .swiper-button-prev, .features .swiper-button-next { color: var(--ink) !important; }
.proj-nav-arrows button:hover { background: var(--ink); color: var(--parchment) !important; }

/* Globe */
.globe-canvas-wrap { border: 2px solid var(--ink); background: var(--parchment-deep); border-radius: 0; }

/* ---------- 15. Motion — ink drying ---------------------------------------- */
[data-animate] {
    opacity: 0;
    transition: opacity 0.26s var(--ease), transform 0.26s var(--ease);
}
[data-animate="fade-up"] { transform: translateY(8px); }
[data-animate="fade-left"] { transform: translateX(-8px); }
[data-animate="fade-right"] { transform: translateX(8px); }
[data-animate="scale-in"] { transform: none; }
[data-animate].is-visible { opacity: 1; transform: none; }

/* Retire the legacy flourishes: nothing floats, glows, or bounces */
.feature-card-icon svg, .ecosystem-tier, .btn-ai-demo, .btn-ai-orb,
.proj-funfact-icon, .ecosystem-tier-icon { animation: none !important; }

/* ---------- 15b. The living line — geometric accents, quietly alive -------- */
/* The gold rule under each section header draws itself across, then the
   red point lands. Rides the .is-visible hook the scroll animator already
   adds to .section-header[data-animate]. */
.section-header::after {
    transform: translateX(-50%) scaleX(0);
    transform-origin: center;
    transition: transform 0.8s var(--ease) 0.15s;
}
.section-header.is-visible::after { transform: translateX(-50%) scaleX(1); }
.section-header::before {
    opacity: 0;
    transform: translateX(-50%) scale(0.2);
    transition: opacity 0.3s ease 0.85s, transform 0.35s var(--ease) 0.85s;
}
.section-header.is-visible::before { opacity: 1; transform: translateX(-50%) scale(1); }

/* The ladder's red dashed ties march — data flowing up the levels */
.lvl-ladder-tie {
    border-top: 0;
    height: 2px;
    background-image: repeating-linear-gradient(90deg, var(--blood) 0 6px, transparent 6px 11px);
    background-size: 11px 2px;
    animation: lm-march 1.5s linear infinite;
}
@keyframes lm-march { to { background-position: 11px 0; } }
[dir="rtl"] .lvl-ladder-tie { animation-direction: reverse; }

/* Arrows nudge forward on hover — the card points where it goes */
.ind-sol-name svg, .lvl-panel-cta svg, .btn-outline-dark svg {
    transition: transform 0.3s var(--ease);
}
.ind-sol-card:hover .ind-sol-name svg { transform: translateX(4px); }
[dir="rtl"] .ind-sol-card:hover .ind-sol-name svg { transform: scaleX(-1) translateX(4px); }
.lvl-panel:hover .lvl-panel-cta svg { transform: translateX(4px); }
[dir="rtl"] .lvl-panel:hover .lvl-panel-cta svg { transform: translateX(-4px); }
.btn-outline-dark:hover svg { transform: translateX(3px); }
[dir="rtl"] .btn-outline-dark:hover svg { transform: translateX(-3px); }

/* The shift arrow breathes toward the "with the twin" side */
.sol-shift-arrow svg { animation: lm-nudge 2.4s ease-in-out infinite; }
@keyframes lm-nudge { 50% { transform: translateX(4px); } }
[dir="rtl"] .sol-shift-arrow svg { animation-name: lm-nudge-rtl; }
@keyframes lm-nudge-rtl { 50% { transform: translateX(-4px); } }

/* The red point on the levels pill breathes — the living full stop */
.btn-ai-orb { animation: lm-breathe 3.2s ease-in-out infinite !important; }
@keyframes lm-breathe { 50% { transform: scale(1.2); } }

@media (prefers-reduced-motion: reduce) {
    [data-animate] { opacity: 1 !important; transform: none !important; transition: none !important; }
    * { animation: none !important; }
}

/* ---------- 16. Arabic — Amiri, the same register --------------------------- */
[dir="rtl"] body, [dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4,
[dir="rtl"] p, [dir="rtl"] .btn, [dir="rtl"] .eyebrow, [dir="rtl"] .nav-link,
[lang="ar"], [lang="ar"] * {
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-variation-settings: normal;
}
[dir="rtl"] h1, [dir="rtl"] h2 { font-weight: 700; line-height: 1.45; }
[dir="rtl"] body { line-height: 1.9; }

/* ---------- 16b. Case-study pages (cs2-*) — same ledger, standalone HTML ----- */
.cs2-hero-overlay {
    background: linear-gradient(180deg, rgba(25,24,23,0.55) 0%, rgba(25,24,23,0.35) 50%, rgba(25,24,23,0.72) 100%);
}
.cs2-hero .eyebrow { color: var(--gold); }
.cs2-hero h1, .cs2-hero .cs2-lead { color: var(--parchment); }
.cs2-back { color: var(--parchment); opacity: 0.85; }
.cs2-back:hover { color: var(--gold); opacity: 1; }
.cs2-section { background: transparent; }
.cs2-section-alt { background: var(--parchment-deep); }
.cs2-section-dark { background: var(--ink); color: var(--parchment); }
.cs2-section-dark h2, .cs2-section-dark h3 { color: var(--parchment); }
.cs2-section-dark p, .cs2-section-dark li { color: rgba(255, 255, 255, 0.8); }
.cs2-section-dark .eyebrow { color: var(--gold); }
.cs2-card {
    background: var(--parchment);
    border: 2px solid var(--ink);
    border-radius: var(--doodle-a) !important;
    box-shadow: none !important;
    overflow: hidden;
}
.cs2-card:nth-child(even) { border-radius: var(--doodle-b) !important; }
.cs2-card img { filter: saturate(0.96); }
.cs2-card-body h3 { color: var(--ink); }
.cs2-card-body p { color: var(--ink-soft); }
.cs2-highlight {
    background: var(--parchment-deep) !important;
    border: 1px solid var(--hairline-soft);
    border-inline-start: 3px solid var(--gold);
    border-radius: var(--doodle-soft);
    color: var(--ink-soft);
}
.cs2-highlight p { color: var(--ink-soft) !important; }
.cs2-gallery img { border: 2px solid var(--ink); border-radius: var(--doodle-soft); filter: saturate(0.96); }
.cs2-video { border: 2px solid var(--ink); border-radius: var(--doodle-soft); overflow: hidden; }
.cs2-cta { background: var(--ink); color: var(--parchment); }
.cs2-cta h2 { color: var(--parchment); }
.cs2-cta p { color: rgba(255, 255, 255, 0.8); }
.cs2-footer { background: var(--parchment); color: var(--ink-faint); border-top: 2px solid var(--ink); }
.cs2-footer a, .cs2-footer span, .cs2-footer p { color: var(--ink-soft) !important; }
.cs2-footer a:hover { color: var(--blood) !important; }

/* Eyebrow/kicker on a dark hero reads as gold — blood-on-ink is unreadable. */
.apply-hero .eyebrow, .section-dark .eyebrow, .cs2-hero .eyebrow { color: var(--gold); }

/* On ink panels the label gray must lift, or it vanishes into the dark. */
.section-dark .eyebrow, .cta-banner .eyebrow, .cs2-section-dark .eyebrow,
.apply-hero .eyebrow, .stat-label, .footer .eyebrow {
    color: #A9A8A1;
}

/* ---------- 16c. The three levels (home + overview + level pages) ---------- */
/* The level plates: three specimens pinned side by side */
.lvl-panels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.6rem;
    margin-top: 1.5rem;
}
.lvl-panel {
    position: relative;
    display: flex; flex-direction: column; gap: 0.7rem;
    background: var(--parchment);
    border: 2px solid var(--ink);
    border-radius: var(--doodle-a);
    padding: 1.9rem 1.6rem 1.5rem;
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.35s var(--ease, ease), background 0.35s ease;
}
.lvl-panel:nth-child(2) { border-radius: var(--doodle-b); }
.lvl-panel:nth-child(3) { border-radius: var(--doodle-c); }
.lvl-panel:hover { transform: rotate(-0.6deg) translateY(-4px); background: var(--parchment-deep); }
.lvl-panel-num {
    width: 52px; height: 52px;
    display: grid; place-items: center;
    border: 2px solid var(--ink);
    border-radius: 49% 51% 47% 53% / 53% 46% 54% 47%;  /* hand-drawn roundel */
    font-family: var(--font-heading);
    font-weight: 720; font-size: 1.5rem;
    color: var(--blood);
    background: var(--parchment);
}
.lvl-panel:hover .lvl-panel-num { transform: rotate(-8deg); }
.lvl-panel-verb {
    font-family: var(--font-heading);
    color: var(--gold);
    text-transform: uppercase; letter-spacing: 0.13em;
    font-size: 0.78rem; font-weight: 600;
}
.lvl-panel-name { font-size: 1.26rem; color: var(--ink); margin: 0; }
.lvl-panel-what { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.65; margin: 0; }
.lvl-panel-facts {
    font-size: 0.82rem; color: var(--ink-faint); line-height: 1.55;
    border-top: 1px dashed var(--hairline-soft);
    padding-top: 0.75rem; margin-top: 0.35rem;
}
.lvl-panel-facts strong { color: var(--gold); font-weight: 600; }
.lvl-panel-cta {
    margin-top: auto; padding-top: 0.6rem;
    display: inline-flex; align-items: center; gap: 0.45em;
    color: var(--blood);
    font-family: var(--font-heading); font-style: italic; font-size: 1rem;
}

/* The ladder: 1 — 2 — 3 with red-dashed ties (you are here) */
.lvl-ladder { display: flex; align-items: center; justify-content: center; gap: 0.9rem; flex-wrap: wrap; }
.lvl-ladder-step {
    display: inline-flex; align-items: center; gap: 0.55rem;
    text-decoration: none;
    color: var(--ink-soft);
    font-family: var(--font-heading); font-weight: 600; font-size: 0.95rem;
    padding: 0.45rem 1.05rem;
    border: 1.5px solid var(--hairline-soft);
    border-radius: var(--doodle-pill);
    background: var(--parchment);
    transition: transform 0.3s var(--ease, ease), border-color 0.3s ease;
}
.lvl-ladder-step:hover { border-color: var(--ink); color: var(--ink); }
.lvl-ladder-step.is-here { border: 2px solid var(--ink); color: var(--ink); transform: rotate(-1.2deg); }
.lvl-ladder-num {
    width: 26px; height: 26px;
    display: grid; place-items: center;
    border: 1.5px solid var(--ink);
    border-radius: 49% 51% 47% 53% / 53% 46% 54% 47%;
    color: var(--blood); font-weight: 700; font-size: 0.85rem;
}
.lvl-ladder-tie { width: 36px; height: 0; border-top: 2px dashed var(--blood); opacity: 0.55; }
.lvl-ladder-note {
    text-align: center; max-width: 660px;
    margin: 1.3rem auto 0;
    color: var(--ink-soft);
    font-family: var(--font-heading); font-style: italic; font-size: 0.97rem;
}

/* The specimen card: suits / who / stage */
.lvl-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; padding: 1.9rem 1.7rem; }
.lvl-fact { display: flex; flex-direction: column; gap: 0.45rem; }
.lvl-fact-k {
    font-family: var(--font-heading);
    color: var(--gold);
    text-transform: uppercase; letter-spacing: 0.13em;
    font-size: 0.75rem; font-weight: 600;
}
.lvl-fact-v { color: var(--ink-soft); font-size: 0.94rem; line-height: 1.7; }

@media (max-width: 900px) {
    .lvl-panels { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
    .lvl-facts { grid-template-columns: 1fr; }
}

/* ---------- 16d. The Twin Brief (/build) + hero project box ---------------- */
/* Hero: the Claude-style "name your project" box — the breadcrumb.           */
/* One quiet vessel: a hairline pill, nothing drawn inside it. The input is
   pure text — every trace of inner chrome (borders, shadows, radii the base
   bundle gives form fields) is stripped, so the example names typing in the
   placeholder are the only invitation. */
.hero-build {
    display: flex; align-items: center; gap: 0.4rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--hairline-soft);
    border-radius: var(--doodle-pill);
    padding: 0.35rem 0.35rem 0.35rem 1.15rem;
    max-width: 480px;
    width: 100%;
    transition: border-color var(--duration) var(--ease);
}
.hero-build:focus-within { border-color: var(--ink); }
[dir="rtl"] .hero-build { padding: 0.35rem 1.15rem 0.35rem 0.35rem; }
.hero-build input {
    flex: 1; min-width: 0;
    border: 0 !important; background: transparent !important;
    outline: none !important; box-shadow: none !important;
    border-radius: 0 !important; padding: 0.35rem 0 !important;
    font-family: var(--font-heading);
    font-size: 1rem; color: var(--ink);
}
.hero-build input::placeholder { color: var(--ink-faint); font-style: italic; opacity: 1; }
.hero-build .btn { white-space: nowrap; margin: 0; }
.hero-build-hint {
    margin: 0.55rem 0 0.4rem; font-size: 0.82rem;
    color: var(--ink-faint); font-family: var(--font-heading); font-style: italic;
}
.hero .hero-buttons { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
.hero .hero-buttons .btn-ai-demo { margin-top: 0.6rem; }

/* The form page */
.build-page { background: var(--parchment); }
.build-hero { padding: clamp(120px, 16vh, 170px) 20px 1.5rem; text-align: center; }
.build-hero h1 { color: var(--ink); font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
.build-hero h1 em { font-style: italic; color: var(--blood); }
.build-sub { color: var(--ink-soft); max-width: 34em; margin: 1rem auto 0; line-height: 1.7; }
.build-form-wrap { padding: 1.5rem 20px clamp(80px, 12vh, 140px); }
.build-form {
    max-width: 720px; margin: 0 auto;
    background: var(--parchment);
    border: 2px solid var(--ink);
    border-radius: var(--doodle-b);
    padding: clamp(1.4rem, 4vw, 2.6rem);
    position: relative;
}
/* honeypot: invisible to humans, no RTL overflow (clip-path, never left:-9999px) */
.tb-hp { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }

/* progress: labeled stepper + drawn dots */
.tb-progress { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.8rem; }
.tb-progress-label { font-family: var(--font-heading); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; color: var(--gold); text-transform: uppercase; }
.tb-dots { display: inline-flex; align-items: center; gap: 6px; }
.tb-dot {
    width: 22px; height: 22px; display: inline-block;
    border: 1.5px solid var(--hairline-soft);
    border-radius: 49% 51% 47% 53% / 53% 46% 54% 47%;
    background: var(--parchment);
    transition: border-color 0.3s, background 0.3s;
}
.tb-dot.is-here { border: 2px solid var(--ink); }
.tb-dot.is-done { background: var(--blood); border-color: var(--blood); }
.tb-tie { width: 18px; border-top: 2px dashed var(--blood); opacity: 0.45; }

/* steps */
.tb-step { display: none; border: 0; padding: 0; margin: 0; }
.tb-step.is-active { display: block; animation: tbInk 0.35s var(--ease, ease); }
@keyframes tbInk { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tb-q { font-family: var(--font-heading); font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 640; color: var(--ink); line-height: 1.3; padding: 0; }
.tb-q:focus { outline: none; }
.tb-project-name { color: var(--blood); font-style: italic; }
.tb-hint { color: var(--ink-soft); font-size: 0.92rem; margin: 0.5rem 0 1.4rem; font-style: italic; }

/* level cards */
.tb-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.tb-card {
    display: flex; flex-direction: column; gap: 0.35rem;
    padding: 1.1rem 1rem;
    border: 2px solid var(--hairline-soft);
    border-radius: var(--doodle-a);
    cursor: pointer;
    background: var(--parchment);
    transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease, ease);
}
.tb-card:nth-child(2) { border-radius: var(--doodle-b); }
.tb-card:nth-child(3) { border-radius: var(--doodle-c); }
.tb-card:hover { border-color: var(--ink); transform: rotate(-0.5deg); }
.tb-card input, .tb-chip input, .tb-row input { position: absolute; opacity: 0; pointer-events: none; }
.tb-card:has(input:checked) { border: 2px solid var(--blood); background: var(--parchment-deep); }
.tb-card-num {
    width: 34px; height: 34px; display: grid; place-items: center;
    border: 2px solid var(--ink);
    border-radius: 49% 51% 47% 53% / 53% 46% 54% 47%;
    font-family: var(--font-heading); font-weight: 720; color: var(--blood);
}
.tb-card-name { font-family: var(--font-heading); font-weight: 680; font-size: 1.06rem; color: var(--ink); }
.tb-card-desc { font-size: 0.84rem; color: var(--ink-soft); line-height: 1.5; }
.tb-card-stage { margin-top: auto; padding-top: 0.4rem; font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); font-family: var(--font-heading); font-weight: 600; }

/* chips */
.tb-label { display: block; font-family: var(--font-heading); font-weight: 620; font-size: 0.9rem; color: var(--ink); margin: 1.1rem 0 0.5rem; }
.tb-opt { color: var(--ink-faint); font-weight: 400; font-style: italic; font-size: 0.8em; }
.tb-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tb-chip {
    display: inline-flex; padding: 0.45rem 1rem;
    border: 1.5px solid var(--hairline-soft);
    border-radius: var(--doodle-pill);
    cursor: pointer; position: relative;
    font-size: 0.9rem; color: var(--ink-soft);
    background: var(--parchment);
    transition: all 0.22s;
}
.tb-chip:hover { border-color: var(--ink); color: var(--ink); }
.tb-chip:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--parchment); transform: rotate(-1deg); }

/* budget rows */
.tb-cards--rows { grid-template-columns: 1fr; gap: 0.55rem; }
.tb-row {
    display: grid; grid-template-columns: minmax(150px, auto) 1fr; align-items: baseline; gap: 0.3rem 1rem;
    padding: 0.85rem 1.1rem; position: relative;
    border: 1.5px solid var(--hairline-soft);
    border-radius: var(--doodle-soft);
    cursor: pointer; background: var(--parchment);
    transition: border-color 0.22s, background 0.22s;
}
.tb-row:hover { border-color: var(--ink); }
.tb-row:has(input:checked) { border: 2px solid var(--blood); background: var(--parchment-deep); }
.tb-row-name { font-family: var(--font-heading); font-weight: 660; color: var(--ink); }
.tb-row-desc { font-size: 0.85rem; color: var(--ink-soft); }
.tb-sar { color: var(--gold); font-style: normal; font-weight: 400; font-size: 0.82em; }

/* fields */
.tb-field { display: block; }
.tb-field input, .tb-field textarea {
    width: 100%;
    background: var(--parchment);
    border: 1.5px solid var(--ink);
    border-radius: var(--doodle-soft);
    padding: 0.7rem 0.95rem;
    font: inherit; color: var(--ink);
}
.tb-field input:focus, .tb-field textarea:focus { outline: none; border-color: var(--blood); }
.tb-field input::placeholder, .tb-field textarea::placeholder { color: var(--ink-faint); }
/* emails/phones stay LTR even in Arabic (mis-keying otherwise) */
[dir="rtl"] .tb-ltr { direction: ltr; text-align: left; }
.tb-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1.1rem; }

/* nav + fine print + error */
.tb-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 1.7rem; }
.tb-fine { text-align: center; font-size: 0.82rem; color: var(--ink-faint); margin-top: 1rem; font-style: italic; }
.tb-error { color: var(--blood); font-weight: 600; text-align: center; margin-top: 1rem; }

/* success */
.tb-done { text-align: center; padding: 1.5rem 0 0.5rem; }
.tb-done.is-active { display: block; }
.tb-done-mark {
    width: 64px; height: 64px; margin: 0 auto 1.1rem;
    display: grid; place-items: center;
    border: 2.5px solid var(--ink);
    border-radius: 49% 51% 47% 53% / 53% 46% 54% 47%;
    color: var(--blood);
}
.tb-done-mark svg { width: 30px; height: 30px; }
.tb-done-h { font-size: 1.7rem; color: var(--ink); margin-bottom: 0.5rem; }
.tb-done-p { color: var(--ink-soft); margin-bottom: 1.4rem; }

@media (max-width: 760px) {
    .tb-cards { grid-template-columns: 1fr; }
    .tb-grid2 { grid-template-columns: 1fr; }
    .tb-row { grid-template-columns: 1fr; }
    .hero-build .btn { padding-inline: 1rem; }
}

/* ---------- 17. Scroll progress / misc chrome ------------------------------- */
.scroll-progress, #scroll-progress { background: var(--blood) !important; }
.skip-link { background: var(--ink); color: var(--parchment); border-radius: 0; }
html { scrollbar-color: var(--ink-faint) var(--parchment); }
