
/* === style.css === */
/* =============================================================
   آریانا — قالب شرکتی پریمیوم
   style.css — Design Tokens, Reset, Base, Layout, Header, Footer
   Pure CSS3 · RTL-first · No frameworks
   ============================================================= */

/* ----------------------------------------------------------
   1. Design Tokens (CSS Custom Properties)
   Identity: «Porcelain · Ink · Ember» — editorial, warm,
   deliberately NOT the usual navy/blue/gold tech template.
   ---------------------------------------------------------- */
:root {
    /* --- Color scheme: native UI (scrollbars, form controls, canvas) follows
       the system unless <meta name="color-scheme"> pins an explicit theme
       (synced by theme.js / navigation.js; mapped via the :root:has() rules
       below). The base declaration MUST stay "light dark". --- */
    color-scheme: light dark;
    /* --- Brand colors (ink scale) --- */
    --color-primary: #15171C;
    /* ink */
    --color-primary-800: #1D2026;
    --color-primary-700: #262A32;
    --color-primary-600: #333844;
    --color-primary-500: #454C5B;
    --color-primary-100: #DCDCD4;
    --color-primary-50: #F0F0EB;

    --color-secondary: #D63A0F;
    /* ember (text-safe on light bg) */
    --color-secondary-600: #B02D09;
    /* ember hover */
    --color-secondary-100: #FFD9C9;
    --color-secondary-50: #FFF0E8;

    --color-accent: #FF4A1F;
    /* vivid ember (decorative / on dark) */
    --color-accent-strong: #C3310C;
    /* ember for text on light bg */
    --color-accent-100: #FFE3D8;

    /* --- Feedback colors --- */
    --color-success: #1E7A4E;
    --color-success-bg: #E4F2E9;
    --color-warning: #A86A0A;
    --color-warning-bg: #FBF0DA;
    --color-danger: #CE3A2B;
    --color-danger-bg: #FBE5E1;
    --color-info: #0E6E8C;
    --color-info-bg: #DFF0F4;

    /* --- Neutrals (warm porcelain) --- */
    --color-bg: #F5F4F0;
    --color-surface: #FBFAF7;
    --color-surface-2: #ECEAE2;
    --color-white: #FFFFFF;
    --color-border: #E2E0D7;
    --color-border-strong: #C7C4B9;
    --color-heading: #15171C;
    --color-text: #43454C;
    --color-text-muted: #6A6D75;
    --color-text-faint: #989BA3;
    --color-overlay: rgba(10, 11, 14, .62);

    /* --- Typography --- */
    --font-family: 'Vazirmatn', 'Vazirmatn Fallback', Tahoma, 'Segoe UI', Arial, sans-serif;
    --font-display: 'Estedad', 'Vazirmatn', 'Vazirmatn Fallback', Tahoma, 'Segoe UI', Arial, sans-serif;
    --font-latin: 'Inter', 'Vazirmatn', Tahoma, sans-serif;
    --fs-display: clamp(2.3rem, 1.2rem + 3.8vw, 4.2rem);
    --fs-h1: clamp(1.9rem, 1.1rem + 2.4vw, 2.8rem);
    --fs-h2: clamp(1.55rem, 1.05rem + 1.5vw, 2.4rem);
    --fs-h3: clamp(1.2rem, 1rem + .75vw, 1.5rem);
    --fs-h4: clamp(1.08rem, .95rem + .5vw, 1.3rem);
    --fs-h5: 1.05rem;
    --fs-body: 1rem;
    --fs-sm: .9rem;
    --fs-xs: .8rem;
    --lh-heading: 1.5;
    --lh-body: 1.95;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-black: 800;

    /* --- Spacing scale --- */
    --sp-1: .25rem;
    --sp-2: .5rem;
    --sp-3: .75rem;
    --sp-4: 1rem;
    --sp-5: 1.25rem;
    --sp-6: 1.5rem;
    --sp-8: 2rem;
    --sp-10: 2.5rem;
    --sp-12: 3rem;
    --sp-16: 4rem;
    --sp-20: 5rem;
    --sp-24: 6rem;
    --section-pad: clamp(3.5rem, 4rem + 3vw, 6.75rem);
    --section-pad-sm: clamp(2.75rem, 3rem + 2vw, 4.5rem);

    /* --- Radius (softer, editorial) --- */
    --radius-xs: 8px;
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 30px;
    --radius-full: 999px;

    /* --- Shadows (soft ink) --- */
    --shadow-xs: 0 1px 2px rgba(21, 23, 28, .06);
    --shadow-sm: 0 2px 12px rgba(21, 23, 28, .07);
    --shadow-md: 0 14px 34px -10px rgba(21, 23, 28, .14);
    --shadow-lg: 0 30px 70px -18px rgba(21, 23, 28, .24);
    --shadow-primary: 0 14px 30px -8px rgba(21, 23, 28, .4);
    --shadow-card-hover: 0 24px 50px -16px rgba(21, 23, 28, .26);

    /* --- Layout --- */
    --container: 1200px;
    --container-wide: 1360px;
    --container-narrow: 860px;
    --container-article: 900px;
    --container-pad: clamp(1rem, 3.4vw, 2rem);
    --header-height: 84px;
    --header-height-scrolled: 68px;
    --header-outer-height: calc(var(--header-height) + 1px);
    /* + header border */

    /* --- Motion --- */
    --t-fast: 160ms;
    --t-base: 280ms;
    --t-slow: 480ms;
    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --ease-smooth: cubic-bezier(.4, 0, .2, 1);

    /* --- Z-index scale --- */
    --z-header: 100;
    --z-dropdown: 90;
    --z-drawer: 120;
    --z-overlay: 105;
    --z-modal: 200;
    --z-toast: 300;
    --z-backtotop: 80;

    /* --- Film-grain texture (SVG turbulence, inlined — no extra request) --- */
    --texture-noise: url("data:image/svg+xml,%3Csvg xmlns='https://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* --- Dark theme overrides (Ink) --- */
[data-theme="dark"] {
    /* ink inverts: dark surfaces get a light "ink" brand */
    --color-primary: #F3F4F6;
    --color-primary-800: #E2E4EA;
    --color-primary-700: #D3D6DF;
    --color-primary-600: #B9BEC9;
    --color-primary-500: #99A0AF;
    --color-primary-100: #2A2F3A;
    --color-primary-50: #20242E;

    --color-secondary: #FF6A3D;
    --color-secondary-600: #FF8259;
    --color-secondary-100: #3A241C;
    --color-secondary-50: #2A1F19;

    --color-accent: #FF4A1F;
    --color-accent-strong: #FF6A3D;
    --color-accent-100: #3A241C;

    --color-success: #4CC38A;
    --color-success-bg: #14251D;
    --color-warning: #E5B54C;
    --color-warning-bg: #2A2313;
    --color-danger: #F26B5B;
    --color-danger-bg: #2B1713;
    --color-info: #4FB8D8;
    --color-info-bg: #12222A;

    --color-bg: #0E1014;
    --color-surface: #15181E;
    --color-surface-2: #1C2029;
    --color-white: #F3F4F6;
    --color-border: #272C36;
    --color-border-strong: #3A404D;
    --color-heading: #F3F4F6;
    --color-text: #C0C4CD;
    --color-text-muted: #8B91A0;
    --color-text-faint: #5C6270;
    --color-overlay: rgba(5, 6, 8, .7);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, .4);
    --shadow-md: 0 14px 34px -10px rgba(0, 0, 0, .5);
    --shadow-lg: 0 30px 70px -18px rgba(0, 0, 0, .6);
    --shadow-primary: 0 14px 30px -8px rgba(0, 0, 0, .55);
    --shadow-card-hover: 0 24px 50px -16px rgba(0, 0, 0, .6);
}

/* Map a pinned <meta name="color-scheme"> onto the CSS color-scheme so the
   native UI (scrollbars, form controls, canvas) follows a manual override.
   Set by theme.js (bootstrap) and navigation.js (toggle). The base
   declaration in :root MUST stay "light dark" so no-JS visitors follow the
   system preference. */
:root:has(> head > meta[name="color-scheme"][content="dark"]) {
    color-scheme: dark;
}

:root:has(> head > meta[name="color-scheme"][content="light"]) {
    color-scheme: light;
}

/* ----------------------------------------------------------
   1.5 Local fonts — Vazirmatn (body) · Estad (display) · Inter (latin)
   ---------------------------------------------------------- */
/* Metric-compatible stand-in for Vazirmatn, used only until the real face
   arrives. Without it the fallback renders ~7% wider, the hero copy gains a
   line on mobile, and everything below jumps when the font swaps (CLS).
   size-adjust was measured against Vazirmatn at 400/700/900 on Windows. */
@font-face {
    font-family: 'Vazirmatn Fallback';
    src: local('Segoe UI'), local('Tahoma'), local('Arial');
    size-adjust: 97.1%;
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/frontend/assets/fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/frontend/assets/fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/frontend/assets/fonts/Vazirmatn-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/frontend/assets/fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('/frontend/assets/fonts/Vazirmatn-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Estedad';
    src: url('/frontend/assets/fonts/Estedad/Estedad-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Estedad';
    src: url('/frontend/assets/fonts/Estedad/Estedad-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Estedad';
    src: url('/frontend/assets/fonts/Estedad/Estedad-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Estedad';
    src: url('/frontend/assets/fonts/Estedad/Estedad-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Estedad';
    src: url('/frontend/assets/fonts/Estedad/Estedad-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('/frontend/assets/fonts/Inter/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ----------------------------------------------------------
   2. Reset & Base
   ---------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    scrollbar-gutter: stable;
    /* no layout shift when body gets overflow:hidden */
    overflow-x: clip;
    /* hard-clip any horizontal overflow (RTL + fixed-inset quirk) */
}

body {
    font-family: var(--font-family);
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    overflow-x: clip;
    /* clip (not hidden): hidden+visible turns <body> into a scroll
                       container, which freezes scroll-driven animations */
    transition: background-color var(--t-base) var(--ease-smooth),
        color var(--t-base) var(--ease-smooth);
}

/* Anchors must clear the sticky header */
:target,
[id] {
    scroll-margin-top: calc(var(--header-outer-height) + 1rem);
}

img,
svg,
video,
iframe {
    max-width: 100%;
    display: block;
}

img {
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--t-fast) var(--ease-smooth);
}

a:hover {
    color: var(--color-secondary-600);
}

/* Latin / numeric context helper (Inter) */
.lat,
.lat svg {
    font-family: var(--font-latin);
}

ul[class],
ol[class] {
    list-style: none;
    padding: 0;
}

ul,
ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-heading);
    line-height: var(--lh-heading);
    font-weight: var(--fw-bold);
    letter-spacing: 0;
    /* Persian script must never be letter-spaced */
    text-wrap: balance;
}

p {
    text-wrap: pretty;
}

strong,
b {
    color: var(--color-heading);
    font-weight: var(--fw-semibold);
}

:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 3px;
    border-radius: 4px;
}

::selection {
    background: var(--color-secondary);
    color: #fff;
}

/* Scrollbar — standard properties (thumb + track colors, thickness),
   legacy WebKit pseudo-elements only where the standard is unsupported
   (per the customize-scrollbar-color-and-thickness guidance) */
:root {
    scrollbar-color: var(--color-border-strong) var(--color-surface);
    scrollbar-width: thin;
}

@supports not (scrollbar-color: auto) {
    ::-webkit-scrollbar {
        width: 12px;
        height: 12px;
    }

    ::-webkit-scrollbar-track {
        background: var(--color-surface);
    }

    ::-webkit-scrollbar-thumb {
        background: var(--color-border-strong);
        border-radius: 8px;
        border: 3px solid var(--color-surface);
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--color-text-faint);
    }
}

/* Scroll offset for anchored sections below sticky header */
[id] {
    scroll-margin-top: calc(var(--header-height) + 24px);
}

/* ----------------------------------------------------------
   3. Layout primitives
   ---------------------------------------------------------- */
.container {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--container-pad));
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

.container--wide {
    max-width: calc(var(--container-wide) + 2 * var(--container-pad));
}

.container--narrow {
    max-width: calc(var(--container-narrow) + 2 * var(--container-pad));
}

.container--article {
    max-width: calc(var(--container-article) + 2 * var(--container-pad));
}

.section {
    padding-block: var(--section-pad);
}

.section--sm {
    padding-block: var(--section-pad-sm);
}

.section--surface {
    background-color: var(--color-surface);
}

.section--tint {
    background: linear-gradient(180deg, var(--color-primary-50), var(--color-bg) 65%);
}

.section-head {
    max-width: 720px;
    margin-inline: auto;
    text-align: center;
    margin-block-end: clamp(2.5rem, 5vw, 3.75rem);
}

.section-head--start {
    text-align: start;
    margin-inline: 0;
}

.section-head__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    color: var(--color-heading);
    margin-block-end: var(--sp-4);
}

.section-head__eyebrow::before {
    content: "";
    width: 9px;
    height: 9px;
    background: var(--color-accent);
    border-radius: 2px;
    transform: rotate(45deg);
    flex-shrink: 0;
}

.section-head__eyebrow svg {
    display: none;
}

.section-head__title {
    font-family: var(--font-display);
    font-size: var(--fs-h2);
    font-weight: 800;
    margin-block-end: var(--sp-4);
}

.section-head__lead {
    color: var(--color-text-muted);
    font-size: var(--fs-h5);
}

/* Grid helpers */
.grid {
    display: grid;
    gap: clamp(1.25rem, 2.4vw, 1.75rem);
}

.grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ----------------------------------------------------------
   4. Buttons
   ---------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: .8rem 1.7rem;
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
    line-height: 1.5;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    transition: background-color var(--t-fast) var(--ease-smooth),
        color var(--t-fast) var(--ease-smooth),
        border-color var(--t-fast) var(--ease-smooth),
        box-shadow var(--t-base) var(--ease-smooth),
        transform var(--t-fast) var(--ease-smooth);
    /* --mx / --my are written by graphics.js (magnetic buttons) */
    transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
}

.btn svg {
    width: 1.15em;
    height: 1.15em;
    flex-shrink: 0;
}

.btn:active {
    transform: translate3d(var(--mx, 0px), calc(var(--my, 0px) + 1px), 0) scale(.99);
}

.btn:disabled,
.btn.is-disabled {
    opacity: .6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn--primary {
    background: var(--color-primary);
    color: var(--color-bg);
    box-shadow: var(--shadow-primary);
}

.btn--primary:hover {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 14px 30px -6px rgba(255, 74, 31, .35);
    transform: translate3d(var(--mx, 0px), calc(var(--my, 0px) - 2px), 0);
}

.btn--dark {
    background: var(--color-primary);
    color: var(--color-bg);
}

.btn--dark:hover {
    background: var(--color-accent);
    color: #fff;
    transform: translate3d(var(--mx, 0px), calc(var(--my, 0px) - 2px), 0);
}

.btn--outline {
    background: transparent;
    color: var(--color-heading);
    border-color: var(--color-border-strong);
}

.btn--outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent-strong);
    background: var(--color-accent-100);
    transform: translate3d(var(--mx, 0px), calc(var(--my, 0px) - 2px), 0);
}

.btn--ghost {
    background: transparent;
    color: var(--color-secondary);
}

.btn--ghost:hover {
    background: var(--color-secondary-50);
}

.btn--white {
    background: var(--color-white);
    color: var(--color-ink, #15171C);
}

[data-theme="dark"] .btn--white {
    color: var(--color-bg);
}

.btn--white:hover {
    background: var(--color-accent);
    color: #fff;
    transform: translate3d(var(--mx, 0px), calc(var(--my, 0px) - 2px), 0);
}

.btn--outline-light {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, .4);
}

.btn--outline-light:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
    border-color: rgba(255, 255, 255, .7);
}

.btn--lg {
    padding: 1rem 2.1rem;
    font-size: var(--fs-h5);
    border-radius: var(--radius-md);
}

.btn--sm {
    padding: .5rem 1.1rem;
    font-size: var(--fs-sm);
}

.btn--block {
    width: 100%;
}

/* Loading state */
.btn.is-loading {
    pointer-events: none;
    color: transparent !important;
    position: relative;
}

.btn.is-loading::after {
    content: "";
    position: absolute;
    width: 1.15em;
    height: 1.15em;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-inline-end-color: transparent;
    color: #fff;
    animation: btn-spin .7s linear infinite;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Text link with arrow */
.link-more {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-weight: var(--fw-semibold);
    color: var(--color-secondary);
}

.link-more svg {
    width: 1em;
    height: 1em;
    transition: transform var(--t-fast) var(--ease-smooth);
}

.link-more:hover svg {
    transform: translateX(-4px);
}

/* ----------------------------------------------------------
   5. Badges & chips
   ---------------------------------------------------------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    padding: .28rem .75rem;
    border-radius: var(--radius-full);
    background: var(--color-secondary-50);
    color: var(--color-secondary);
    border: 1px solid var(--color-secondary-100);
}

.badge--gold {
    background: var(--color-accent-100);
    color: var(--color-accent-strong);
    border-color: color-mix(in srgb, var(--color-accent) 35%, transparent);
}

.badge--success {
    background: var(--color-success-bg);
    color: var(--color-success);
    border-color: transparent;
}

.badge--neutral {
    background: var(--color-surface-2);
    color: var(--color-text-muted);
    border-color: var(--color-border);
}

.filter-chip {
    padding: .6rem 1.4rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-text-muted);
    background: transparent;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-full);
    white-space: nowrap;
    transition: all var(--t-fast) var(--ease-smooth);
}

.filter-chip:hover {
    color: var(--color-heading);
    border-color: var(--color-heading);
}

.filter-chip[aria-pressed="true"] {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-bg);
    box-shadow: var(--shadow-md);
}

.filter-chip svg {
    display: inline-block;
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
    vertical-align: -0.2em;
}

/* ----------------------------------------------------------
   6. Header & Navigation
   Every page opens with a dark hero, so the header rides
   transparent over it at the top, then turns to a glass panel
   once scrolled.
   ---------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    inset-inline: 0;
    z-index: var(--z-header);
    background: transparent;
    border-block-end: 1px solid transparent;
    transition: background-color var(--t-base) var(--ease-smooth),
        box-shadow var(--t-base) var(--ease-smooth),
        border-color var(--t-base) var(--ease-smooth);
}

.site-header.is-scrolled {
    background: color-mix(in srgb, var(--color-bg) 86%, transparent);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-block-end-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}

/* --- Top state (over the dark hero): light text --- */
.site-header:not(.is-scrolled) .brand__title {
    color: #fff;
}

.site-header:not(.is-scrolled) .brand__subtitle {
    color: rgba(255, 255, 255, .6);
}

.site-header:not(.is-scrolled) .nav-link {
    color: rgba(255, 255, 255, .82);
}

.site-header:not(.is-scrolled) .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .1);
}

.site-header:not(.is-scrolled) .nav-link[aria-current="page"] {
    color: #fff;
    background: rgba(255, 255, 255, .12);
}

.site-header:not(.is-scrolled) .header-phone {
    color: rgba(255, 255, 255, .9);
}

.site-header:not(.is-scrolled) .header-phone:hover {
    color: #fff;
}

.site-header:not(.is-scrolled) .header-phone svg {
    color: var(--color-accent);
}

.site-header:not(.is-scrolled) .icon-btn {
    color: rgba(255, 255, 255, .85);
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .22);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.site-header:not(.is-scrolled) .icon-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, .5);
    background: rgba(255, 255, 255, .16);
}

.site-header:not(.is-scrolled) .lang-toggle {
    color: #fff;
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .22);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.site-header:not(.is-scrolled) .lang-toggle svg {
    color: var(--color-accent);
}

.site-header:not(.is-scrolled) .lang-toggle:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, .5);
    background: rgba(255, 255, 255, .16);
}

.site-header:not(.is-scrolled) .header-actions .btn--primary {
    background: #fff;
    color: #15171C;
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .45);
}

.site-header:not(.is-scrolled) .header-actions .btn--primary:hover {
    background: var(--color-accent);
    color: #fff;
}

.header-inner {
    display: flex;
    align-items: center;
    gap: var(--sp-6);
    height: var(--header-height);
    transition: height var(--t-base) var(--ease-smooth);
}

.site-header.is-scrolled .header-inner {
    height: var(--header-height-scrolled);
}

/* Brand */
.brand {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    flex-shrink: 0;
}

.brand__logo {
    width: 44px;
    height: 44px;
    transition: transform var(--t-base) var(--ease-out);
}

.brand:hover .brand__logo {
    transform: rotate(-6deg) scale(1.05);
}

.brand__name {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.brand__title {
    font-size: 1.3rem;
    font-weight: var(--fw-black);
    color: var(--color-heading);
}

.brand__subtitle {
    font-size: .72rem;
    color: var(--color-text-muted);
    letter-spacing: 0;
}

/* Main nav */
.main-nav {
    margin-inline-start: auto;
}

.main-nav>ul {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .55rem .95rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--color-text);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: color var(--t-fast) var(--ease-smooth), background-color var(--t-fast) var(--ease-smooth);
}

.nav-link:hover {
    color: var(--color-secondary);
    background: var(--color-secondary-50);
}

.nav-link[aria-current="page"] {
    color: var(--color-secondary);
    font-weight: var(--fw-semibold);
    background: var(--color-secondary-50);
}

.nav-link .chev {
    width: .85em;
    height: .85em;
    transition: transform var(--t-base) var(--ease-smooth);
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.dropdown {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-start: 0;
    min-width: 250px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: .6rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--t-fast) var(--ease-smooth),
        transform var(--t-fast) var(--ease-smooth),
        visibility var(--t-fast);
    z-index: var(--z-dropdown);
}

.dropdown::before {
    content: "";
    position: absolute;
    top: -12px;
    inset-inline: 0;
    height: 12px;
}

.has-dropdown:hover>.dropdown,
.has-dropdown.is-open>.dropdown,
.has-dropdown:focus-within>.dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.has-dropdown:hover>.nav-link .chev,
.has-dropdown.is-open>.nav-link .chev {
    transform: rotate(180deg);
}

.dropdown a {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem .8rem;
    font-size: var(--fs-sm);
    color: var(--color-text);
    border-radius: var(--radius-xs);
    transition: background-color var(--t-fast) var(--ease-smooth), color var(--t-fast) var(--ease-smooth);
}

.dropdown a svg {
    width: 17px;
    height: 17px;
    color: var(--color-text-faint);
    flex-shrink: 0;
    transition: color var(--t-fast) var(--ease-smooth);
}

.dropdown a:hover {
    background: var(--color-secondary-50);
    color: var(--color-secondary);
}

.dropdown a:hover svg {
    color: var(--color-secondary);
}

.dropdown a[aria-current="page"] {
    background: var(--color-secondary-50);
    color: var(--color-secondary);
    font-weight: var(--fw-semibold);
}

/* Header actions */
/* margin-inline-start:auto keeps this group at the inline-end (left edge in RTL)
   even on mobile, where .main-nav is display:none */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    flex-shrink: 0;
    margin-inline-start: auto;
}

.header-phone {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-heading);
    padding-inline-end: var(--sp-3);
    border-inline-end: 1px solid var(--color-border);
}

.header-phone svg {
    width: 17px;
    height: 17px;
    color: var(--color-secondary);
}

.header-phone:hover {
    color: var(--color-secondary);
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    transition: all var(--t-fast) var(--ease-smooth);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

.icon-btn:hover {
    color: var(--color-secondary);
    border-color: var(--color-secondary);
    background: var(--color-secondary-50);
}

/* Language switch (fa ⇄ en) — compact pill, height-matched to .icon-btn */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    height: 44px;
    min-width: 44px;
    padding-inline: .7rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-latin);
    font-size: .82rem;
    font-weight: var(--fw-bold);
    letter-spacing: .05em;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    transition: all var(--t-fast) var(--ease-smooth);
}

.lang-toggle svg {
    width: 17px;
    height: 17px;
    color: var(--color-secondary);
    flex-shrink: 0;
}

.lang-toggle:hover {
    color: var(--color-secondary);
    border-color: var(--color-secondary);
    background: var(--color-secondary-50);
}

.menu-toggle {
    display: none;
}

/* Theme toggle icon swap */
.theme-toggle .icon-sun {
    display: none;
}

.theme-toggle .icon-moon {
    display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

/* ----------------------------------------------------------
   7. Mobile drawer
   ---------------------------------------------------------- */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: var(--color-overlay);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-base) var(--ease-smooth), visibility var(--t-base);
    z-index: var(--z-overlay);
}

.nav-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.nav-drawer {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    width: min(340px, 88vw);
    height: 100dvh;
    background: var(--color-bg);
    z-index: var(--z-drawer);
    transform: translateX(100%);
    transition: transform var(--t-slow) var(--ease-out);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    visibility: hidden;
}

.nav-drawer.is-open {
    transform: translateX(0);
    visibility: visible;
}

.drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* clear the notch / status bar on devices with viewport-fit=cover */
    padding: var(--sp-4) var(--sp-6);
    padding-block-start: calc(var(--sp-4) + env(safe-area-inset-top, 0px));
    border-block-end: 1px solid var(--color-border);
}

.drawer-nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--sp-5) var(--sp-4);
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.drawer-nav a,
.drawer-nav .drawer-sub-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: .8rem 1rem;
    font-size: var(--fs-h5);
    font-weight: var(--fw-medium);
    color: var(--color-text);
    border-radius: var(--radius-sm);
    transition: background-color var(--t-fast) var(--ease-smooth), color var(--t-fast) var(--ease-smooth);
}

.drawer-nav a:hover,
.drawer-nav .drawer-sub-toggle:hover {
    background: var(--color-surface);
    color: var(--color-secondary);
}

.drawer-nav a[aria-current="page"] {
    background: var(--color-secondary-50);
    color: var(--color-secondary);
    font-weight: var(--fw-semibold);
}

.drawer-nav svg {
    width: 1em;
    height: 1em;
}

.drawer-sub {
    display: none;
    padding-inline-start: var(--sp-4);
    margin-block-start: .3rem;
    border-inline-start: 2px solid var(--color-border);
    margin-inline: 1rem;
}

.drawer-sub.is-open {
    display: block;
}

.drawer-sub a {
    font-size: var(--fs-body);
    padding: .6rem .9rem;
}

.drawer-foot {
    padding: var(--sp-5) var(--sp-6);
    padding-block-end: calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
    border-block-start: 1px solid var(--color-border);
    display: grid;
    gap: var(--sp-3);
}

/* Language switch row (fa ⇄ en) */
.drawer-lang {
    display: flex;
    align-items: center;
    gap: .7rem;
    width: 100%;
    padding: .8rem 1rem;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-heading);
    text-align: start;
    transition: background-color var(--t-fast) var(--ease-smooth),
        border-color var(--t-fast) var(--ease-smooth),
        color var(--t-fast) var(--ease-smooth);
}

.drawer-lang svg {
    width: 18px;
    height: 18px;
    color: var(--color-secondary);
    flex-shrink: 0;
}

.drawer-lang .drawer-lang__arrow {
    margin-inline-start: auto;
    color: var(--color-text-faint);
    transition: color var(--t-fast) var(--ease-smooth), transform var(--t-fast) var(--ease-smooth);
}

.drawer-lang:hover {
    background: var(--color-secondary-50);
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

.drawer-lang:hover .drawer-lang__arrow {
    color: var(--color-secondary);
    transform: translateX(-3px);
}

.drawer-lang[aria-current="true"] {
    background: var(--color-secondary-50);
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    font-weight: var(--fw-bold);
}

.drawer-phone {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-weight: var(--fw-semibold);
    color: var(--color-heading);
    font-size: var(--fs-h5);
}

.drawer-phone svg {
    width: 18px;
    height: 18px;
    color: var(--color-secondary);
}

/* ----------------------------------------------------------
   7.1 Mobile drawer site search — compact pill in the same
       visual language as .search-box (direction-agnostic,
       logical properties only; mirrored in css-ltr/style.css)
   ---------------------------------------------------------- */
.drawer-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-block: .4rem;
    padding-inline: 1rem .4rem;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: border-color var(--t-fast) var(--ease-smooth),
        box-shadow var(--t-base) var(--ease-smooth);
}

.drawer-search:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px var(--color-accent-100);
}

.drawer-search__icon {
    display: inline-flex;
    flex-shrink: 0;
    color: var(--color-text-muted);
}

.drawer-search__icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.drawer-search input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    padding: .3rem 0;
    border: 0;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    font-size: var(--fs-body);
    line-height: 1.5;
    color: var(--color-text);
    caret-color: var(--color-accent);
}

.drawer-search input[type="search"]::placeholder {
    color: var(--color-text-faint);
}

.drawer-search input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

.drawer-search__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    color: var(--color-bg);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background-color var(--t-fast) var(--ease-smooth),
        color var(--t-fast) var(--ease-smooth),
        box-shadow var(--t-base) var(--ease-smooth),
        transform var(--t-fast) var(--ease-smooth);
}

.drawer-search__submit svg {
    width: 1.25rem;
    height: 1.25rem;
}

.drawer-search__submit:hover,
.drawer-search__submit:focus-visible {
    background: var(--color-accent);
    color: #fff;
    box-shadow: var(--shadow-primary);
    transform: translateY(-1px);
}

.drawer-search__submit:active {
    transform: translateY(0);
}

body.nav-locked {
    overflow: hidden;
}

/* ----------------------------------------------------------
   8. Page hero (inner pages) + breadcrumb
   ---------------------------------------------------------- */
.page-hero {
    position: relative;
    /* Slide behind the sticky header (see .hero) so the transparent header
     always rests on the dark page-hero surface, in both themes. */
    margin-block-start: calc(var(--header-outer-height) * -1);
    background:
        radial-gradient(900px 420px at 85% -60%, rgba(255, 74, 31, .16), transparent 60%),
        radial-gradient(760px 400px at 8% 130%, rgba(255, 74, 31, .07), transparent 55%),
        linear-gradient(165deg, #191C22 0%, #101318 55%, #0B0D11 100%);
    color: #fff;
    padding-block: calc(var(--header-outer-height) + clamp(3rem, 4rem + 3vw, 5.5rem)) clamp(3rem, 4rem + 3vw, 5.5rem);
    overflow: hidden;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(720px 340px at 80% 0%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(720px 340px at 80% 0%, #000 30%, transparent 75%);
    pointer-events: none;
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

/* Film grain + slow shimmer — same language as the home hero */
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--texture-noise);
    background-size: 160px 160px;
    opacity: .22;
    mix-blend-mode: overlay;
    pointer-events: none;
    animation: grain-shimmer 9s ease-in-out infinite alternate;
}

@keyframes grain-shimmer {
    from {
        opacity: .14;
    }

    to {
        opacity: .3;
    }
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-block-end: var(--sp-5);
    font-size: var(--fs-sm);
}

.breadcrumb__item {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, .62);
}

.breadcrumb__item a {
    color: inherit;
    transition: color var(--t-fast);
}

.breadcrumb__item a:hover {
    color: #fff;
}

/* CSS-only slash separator — no per-item icon markup, direction-neutral */
.breadcrumb__item+.breadcrumb__item::before {
    content: "/";
    margin-inline: .55rem;
    color: rgba(255, 255, 255, .32);
}

.breadcrumb__item[aria-current="page"] {
    color: var(--color-accent);
    font-weight: var(--fw-semibold);
}

.page-hero__title {
    font-family: var(--font-display);
    font-weight: 800;
    color: #fff;
    font-size: var(--fs-h1);
    margin-block-end: var(--sp-4);
    max-width: 780px;
}

.page-hero__title--center {
    margin-inline: auto;
    text-align: center;
}

.page-hero__lead {
    color: rgba(255, 255, 255, .72);
    font-size: var(--fs-h5);
    max-width: 680px;
}

/* ----------------------------------------------------------
   9. Prose (privacy / terms / article body)
   ---------------------------------------------------------- */
.prose {
    max-width: 820px;
}

.prose h2 {
    font-size: var(--fs-h3);
    margin-block: var(--sp-10) var(--sp-5);
    padding-inline-start: var(--sp-4);
    border-inline-start: 3px solid var(--color-secondary);
}

.prose h3 {
    font-size: var(--fs-h5);
    margin-block: var(--sp-8) var(--sp-4);
}

.prose p {
    margin-block-end: var(--sp-5);
    color: var(--color-text);
}

.prose ul {
    padding-inline-start: 0;
    list-style: none;
    margin-block-end: var(--sp-5);
}

.prose ul li {
    position: relative;
    padding-inline-start: 1.6rem;
    margin-block-end: .7rem;
}

.prose ul li::before {
    content: "";
    position: absolute;
    inset-inline-start: .2rem;
    top: .78em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-secondary);
}

.prose .prose-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-5);
    margin-block-end: var(--sp-8);
    padding: var(--sp-4) var(--sp-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

/* ----------------------------------------------------------
   10. Footer
   ---------------------------------------------------------- */
.site-footer {
    position: relative;
    background:
        radial-gradient(900px 340px at 90% -40%, rgba(255, 74, 31, .14), transparent 60%),
        linear-gradient(180deg, #14161C 0%, #0A0C10 100%);
    color: rgba(255, 255, 255, .72);
    margin-block-start: auto;
    overflow: hidden;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 74, 31, .65), transparent);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    padding-block: clamp(3rem, 5vw, 4.5rem) var(--sp-12);
}

.footer-brand .brand__title {
    color: #fff;
}

.footer-brand .brand__subtitle {
    color: rgba(255, 255, 255, .55);
}

.footer-brand>p {
    margin-block: var(--sp-5) var(--sp-6);
    font-size: var(--fs-sm);
    max-width: 320px;
}

.footer-social {
    display: flex;
    gap: .6rem;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .8);
    transition: all var(--t-fast) var(--ease-smooth);
}

.footer-social a svg {
    width: 18px;
    height: 18px;
}

.footer-social a:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
    transform: translateY(-3px);
}

.footer-col__title {
    color: #fff;
    font-size: var(--fs-h5);
    font-weight: var(--fw-bold);
    margin-block-end: var(--sp-5);
}

.footer-col__title::after {
    content: "";
    display: block;
    width: 34px;
    height: 2px;
    background: var(--color-accent);
    border-radius: 2px;
    margin-block-start: .7rem;
}

.footer-links li+li {
    margin-block-start: .55rem;
}

.footer-links a {
    color: rgba(255, 255, 255, .68);
    font-size: var(--fs-sm);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    transition: color var(--t-fast), transform var(--t-fast);
}

.footer-links a svg {
    width: .8em;
    height: .8em;
    opacity: .5;
}

.footer-links a:hover {
    color: #fff;
    transform: translateX(-3px);
}

.footer-contact li {
    display: flex;
    gap: .8rem;
    margin-block-end: var(--sp-4);
    font-size: var(--fs-sm);
}

.footer-contact svg {
    width: 17px;
    height: 17px;
    color: var(--color-accent);
    flex-shrink: 0;
    margin-block-start: .3rem;
}

.footer-contact a {
    color: rgba(255, 255, 255, .8);
}

.footer-contact a:hover {
    color: #fff;
}

.footer-bottom {
    border-block-start: 1px solid rgba(255, 255, 255, .1);
    padding-block: var(--sp-5);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    font-size: var(--fs-sm);
}

.footer-bottom a {
    color: rgba(255, 255, 255, .6);
}

.footer-bottom a:hover {
    color: #fff;
}

.footer-legal {
    display: flex;
    gap: var(--sp-5);
}

.footer-dev {
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, .45);
}

.footer-dev a {
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
    border-inline-end: 1px solid rgba(255, 255, 255, .25);
    padding-inline-end: .4rem;
    transition: color var(--t-fast);
}

.footer-dev a:hover {
    color: #fff;
}

/* Certificate images: constrained height so large thumbnails don't blow out the footer */
.footer-certificates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-4);
    padding-block: var(--sp-6) 0;
}

.footer-certificates img {
    height: 110px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    opacity: .85;
    transition: opacity var(--t-fast);
}

.footer-certificates img:hover {
    opacity: 1;
}

/* ----------------------------------------------------------
   11. Skip link
   ---------------------------------------------------------- */
.skip-link {
    position: fixed;
    top: -60px;
    inset-inline-start: var(--sp-4);
    z-index: 400;
    background: var(--color-secondary);
    color: var(--color-white);
    padding: .7rem 1.3rem;
    border-radius: var(--radius-sm);
    font-weight: var(--fw-semibold);
    transition: top var(--t-base) var(--ease-out);
}

.skip-link:focus {
    top: calc(var(--header-height-outer) + var(--sp-3));
    color: var(--color-white);
}

.skip-link:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 4px;
}
/* === theme-color.css === */
/* =============================================================
   آریانا — theme-color.css
   رنگ‌بندی برند TF (پالت لوگو، از prompt.md)
   TF brand skin · industrial red / charcoal / gear grey
   =============================================================

   HOW IT WORKS
   · Load AFTER style.css — it only overrides color tokens,
     nothing else. No other file needs changing.
   · Section 1 is the single edit point: the 16 palette values
     from prompt.md. Change them (or replace the block with a
     different logo's palette) and the whole site — light AND
     dark theme — reskins.
   · Values marked (derived) are computed tints of the palette
     above; adjust them if you swap the palette.
   · Semantic feedback colors (success / warning / danger /
     info) are intentionally UNCHANGED — they are status
     colors, not brand colors.

   TOKEN CONTRACT (template roles → TF role)
   · primary   = ink scale (header, footer, dark buttons, headings)
   · secondary = brand accent, text-safe on light backgrounds
   · accent    = vivid accent (icon chips, glows, focus rings)
   · bg/surface/white/border = neutrals
   · *-muted / *-faint = secondary text levels
   · dark mode is re-mapped under [data-theme="dark"]

   CONTRAST CHECKS (keep these when reskinning)
   · secondary + accent-strong ≥ 4.5:1 against --color-bg
   · dark secondary ≥ 4.5:1 against the darkest dark surface
     (here bg-dark-surface #1E1E1E, not just bg-dark-main)
   · heading + text ≥ 4.5:1 against their backgrounds
   ============================================================= */

:root {
  /* ----------------------------------------------------------
     1. TF palette — single edit point (from prompt.md)
     ---------------------------------------------------------- */
  --brand-primary:       #B81D24;  /* sweeping red curve, letter T */
  --brand-primary-hover: #91171C;  /* darker red: hovers, visited */
  --brand-secondary:     #1A1A1A;  /* letters F/P: nav, footers, dark cards */
  --brand-secondary-hover: #333333; /* charcoal: hover on dark elements */
  --brand-accent-grey:   #4D4D4D;  /* gear texture: secondary icons, metallic accents */

  --bg-main:       #FFFFFF;        /* light page background */
  --bg-surface:    #F4F4F5;        /* light section/card background */
  --text-main:     #212529;        /* light body text */
  --text-muted:    #6C757D;        /* light secondary text */
  --border-color:  #E5E7EB;        /* light borders & dividers */

  --bg-dark-main:     #121212;     /* dark page background */
  --bg-dark-surface:  #1E1E1E;     /* dark card background */
  --text-dark-main:   #F9FAFB;     /* dark text primary */
  --text-dark-muted:  #9CA3AF;     /* dark text secondary */
  --border-dark:      #333333;     /* dark borders */

  /* ----------------------------------------------------------
     2. Light skin → template tokens
     ---------------------------------------------------------- */

  /* ink scale (from brand black; the 600 step is the gear grey) */
  --color-primary:       var(--brand-secondary);       /* #1A1A1A */
  --color-primary-800:   #262626;                     /* (derived) */
  --color-primary-700:   var(--brand-secondary-hover); /* #333333 */
  --color-primary-600:   var(--brand-accent-grey);     /* #4D4D4D */
  --color-primary-500:   var(--text-muted);            /* #6C757D */
  --color-primary-100:   var(--border-color);          /* #E5E7EB */
  --color-primary-50:    var(--bg-surface);            /* #F4F4F5 */

  /* brand red, text-safe on light bg (6.5:1 / 9.0:1 on white) */
  --color-secondary:     var(--brand-primary);         /* #B81D24 */
  --color-secondary-600: var(--brand-primary-hover);   /* #91171C */
  --color-secondary-100: #F4D4D6;                      /* (derived) red tint */
  --color-secondary-50:  #FAECEE;                      /* (derived) pale red */

  --color-accent:        var(--brand-primary);         /* #B81D24 (decorative / focus) */
  --color-accent-strong: var(--brand-primary-hover);   /* #91171C (text-safe red) */
  --color-accent-100:    #F4D4D6;                      /* (derived) red tint */

  /* neutrals */
  --color-bg:            var(--bg-surface);            /* #F4F4F5 */
  --color-surface:       var(--bg-main);               /* #FFFFFF (cards pop on F4F4F5) */
  --color-surface-2:     #E9EAEC;                      /* (derived) alt-section fill */
  --color-white:         #FFFFFF;
  --color-border:        var(--border-color);          /* #E5E7EB */
  --color-border-strong: #C9CDD4;                      /* (derived) hover lines, secondary icons */
  --color-heading:       var(--brand-secondary);       /* #1A1A1A */
  --color-text:          var(--text-main);             /* #212529 */
  --color-text-muted:    var(--text-muted);            /* #6C757D */
  --color-text-faint:    #9CA3AF;                      /* (derived) placeholders */
  --color-overlay:       rgba(26, 26, 26, .62);        /* (derived from brand black) */
  /* --shadow-* left as-is: black-based and neutral on both skins */
}

/* ----------------------------------------------------------
   3. Dark skin → template tokens
   (red pops on deep charcoal — the "gear motif" pairing)
   ---------------------------------------------------------- */
[data-theme="dark"] {
  /* inverted ink: dark surfaces get a light brand text */
  --color-primary:       var(--text-dark-main);        /* #F9FAFB */
  --color-primary-800:   var(--border-color);          /* #E5E7EB */
  --color-primary-700:   #C9CDD4;                      /* (derived) */
  --color-primary-600:   #A8ADB6;                      /* (derived) */
  --color-primary-500:   var(--text-dark-muted);       /* #9CA3AF */
  --color-primary-100:   #262626;                      /* (derived) */
  --color-primary-50:    var(--bg-dark-surface);       /* #1E1E1E */

  /* brighter reds for contrast on #121212 / #1E1E1E (5.3:1 on dark cards) */
  --color-secondary:     #F2626A;                      /* (derived) text-safe red on dark */
  --color-secondary-600: #F0757C;                      /* (derived) hover */
  --color-secondary-100: #3A1A1C;                      /* (derived) red-tint surface */
  --color-secondary-50:  #2B1517;                      /* (derived) */

  --color-accent:        #FF5A63;                      /* (derived) vivid accent on dark */
  --color-accent-strong: #FF8A90;                      /* (derived) text-safe red on dark */
  --color-accent-100:    #3A1A1C;                      /* (derived) */

  /* neutrals */
  --color-bg:            var(--bg-dark-main);          /* #121212 */
  --color-surface:       var(--bg-dark-surface);       /* #1E1E1E */
  --color-surface-2:     #262626;                      /* (derived) */
  --color-white:         var(--text-dark-main);        /* #F9FAFB */
  --color-border:        var(--border-dark);           /* #333333 */
  --color-border-strong: var(--brand-accent-grey);     /* #4D4D4D gear grey */
  --color-heading:       var(--text-dark-main);        /* #F9FAFB */
  --color-text:          #D1D5DB;                      /* (derived) */
  --color-text-muted:    var(--text-dark-muted);       /* #9CA3AF */
  --color-text-faint:    #6B7280;                      /* (derived) */
  --color-overlay:       rgba(0, 0, 0, .72);
}

/* =============================================================
   RE-SKINNING FOR ANOTHER / NEW PROJECT
   1. Copy this file; rename as needed.
   2. Edit the 16 values in section 1 to your brand's palette
      (keep the same variable names).
   3. Refresh the (derived) tints next to their base colors.
   4. Keep the file AFTER style.css in your <head>.
   5. Re-check the contrast notes at the top.
   ============================================================= */

/* === components.css === */
/* =============================================================
   آریانا — components.css
   Reusable components + home page sections
   Identity: Porcelain · Ink · Ember — editorial, non-template
   ============================================================= */

/* ----------------------------------------------------------
   A. Home hero — cinematic video background
   ---------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    background: #0B0D11;
    color: #fff;
    min-height: min(92svh, 860px);
    display: flex;
    align-items: center;
    /* The header is sticky (it occupies flow space). Pull the hero up so it
     slides *behind* the header and compensate with padding — otherwise the
     transparent header would sit over the page background instead of the
     hero, and its light text would vanish in the light theme. */
    margin-block-start: calc(var(--header-outer-height) * -1);
    padding-block: calc(var(--header-outer-height) + clamp(6.5rem, 8vw, 8.5rem)) clamp(4.5rem, 7vw, 7rem);
}

/* Media layer: poster image sits under the video so the hero
   never shows black (mobile / reduced-motion / saveData) */
.hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero__media::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url('/frontend/assets/images/img_parallax.jpg') center / cover no-repeat;
}

.hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    /* headroom for subtle scale drift */
}

.hero__scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(10, 12, 16, .94) 0%, rgba(10, 12, 16, .28) 48%, rgba(10, 12, 16, .72) 100%),
        linear-gradient(to left, rgba(10, 12, 16, .66) 0%, rgba(10, 12, 16, .2) 60%);
}

/* film grain — sits above the video + scrim, below the content */
.hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--texture-noise);
    background-size: 160px 160px;
    opacity: .26;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.hero__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: clamp(2.5rem, 5vw, 4.5rem);
}

.hero__content {
    text-align: center;
}

/* Eyebrow — live dot chip */
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, .85);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    padding: .5rem 1.15rem;
    border-radius: var(--radius-full);
    margin-block-end: var(--sp-6);
}

.hero__badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 0 0 rgba(255, 74, 31, .55);
    animation: pulse-dot 2.4s ease-out infinite;
}

@keyframes pulse-dot {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 74, 31, .55);
    }

    70% {
        box-shadow: 0 0 0 9px rgba(255, 74, 31, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 74, 31, 0);
    }
}

.hero__badge svg {
    display: none;
}

.hero__title {
    font-family: var(--font-display);
    font-size: var(--fs-display);
    font-weight: 900;
    line-height: 1.3;
    color: #fff;
    margin-block-end: var(--sp-6);
    max-width: 16em;
    margin-inline: auto;
}

.hero__title .accent {
    color: var(--color-accent);
    position: relative;
    white-space: nowrap;
}

.hero__title .accent::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: .04em;
    height: .16em;
    background: rgba(255, 74, 31, .3);
    border-radius: 3px;
    z-index: -1;
}

.hero__lead {
    font-size: var(--fs-h5);
    color: rgba(255, 255, 255, .74);
    max-width: 520px;
    margin-inline: auto;
    margin-block-end: var(--sp-8);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-3);
    margin-block-end: var(--sp-9);
}

.hero__actions .btn--white {
    border-block-end: 3px solid var(--color-accent);
}

.hero__trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--sp-6);
}

.hero__trust-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding-inline-end: var(--sp-6);
    border-inline-end: 1px solid rgba(255, 255, 255, .16);
}

.hero__trust-item:last-child {
    border-inline-end: 0;
    padding-inline-end: 0;
}

.hero__trust-item svg {
    width: 20px;
    height: 20px;
    color: var(--color-accent);
    flex-shrink: 0;
}

.hero__trust-item .num {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    display: block;
    line-height: 1.2;
}

.hero__trust-item .lbl {
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, .55);
    display: block;
}

/* Glass dashboard panel */
.hero__panel {
    position: relative;
    border-radius: var(--radius-xl);
    background: rgba(234, 236, 242, .07);
    border: 1px solid rgba(255, 255, 255, .14);
    -webkit-backdrop-filter: blur(20px) saturate(1.15);
    backdrop-filter: blur(20px) saturate(1.15);
    padding: 1.35rem;
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .6);
    overflow: hidden;
}

.hero__panel-frame {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .1);
}

.hero__panel-frame img {
    width: 100%;
    display: block;
}

.hero__panel-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    padding-block: 1rem .4rem;
}

.hero__panel-meta .num {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    display: block;
}

.hero__panel-meta .lbl {
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, .55);
    display: block;
}

.hero__panel-meta .up {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    color: #4CC38A;
}

.hero__panel-meta .up svg {
    width: 14px;
    height: 14px;
}

/* Scroll cue */
.hero__cue {
    position: absolute;
    inset-block-end: 1.4rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    color: rgba(255, 255, 255, .5);
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
}

.hero__cue::after {
    content: "";
    width: 1px;
    height: 44px;
    background: linear-gradient(to bottom, var(--color-accent), transparent);
    animation: cue-drop 1.8s var(--ease-smooth) infinite;
}

@keyframes cue-drop {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    45% {
        transform: scaleY(1);
        transform-origin: top;
    }

    55% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

/* Client logos — infinite marquee */
.marquee {
    padding-block: var(--sp-8) var(--sp-10);
    border-block-end: 1px solid var(--color-border);
    background: var(--color-surface);
    overflow: hidden;
}

.marquee__label {
    text-align: center;
    font-size: var(--fs-sm);
    /* --color-text-muted (not -faint) to keep the contrast ratio ≥ 4.5:1 */
    color: var(--color-text-muted);
    font-weight: var(--fw-medium);
    margin-block-end: var(--sp-6);
}

.marquee__mask {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

.marquee__track {
    display: flex;
    width: max-content;
    animation: marquee-rtl 32s linear infinite;
}

.marquee__group {
    display: flex;
    align-items: center;
    gap: clamp(2.5rem, 6vw, 4.5rem);
    padding-inline-end: clamp(2.5rem, 6vw, 4.5rem);
}

.marquee__group span {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    /* --color-text-muted (not -faint) to keep the contrast ratio ≥ 4.5:1 */
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    white-space: nowrap;
    transition: color var(--t-base) var(--ease-smooth);
}

.marquee__group span svg {
    width: 20px;
    height: 20px;
    opacity: .55;
}

.marquee__group span img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: .55;
}

.marquee__group span:hover {
    color: var(--color-heading);
}

.marquee:hover .marquee__track {
    animation-play-state: paused;
}

@keyframes marquee-rtl {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(50%);
    }
}

/* ----------------------------------------------------------
   B. Parallax band — full-bleed img_parallax.jpg
   ---------------------------------------------------------- */
.parallax-band {
    position: relative;
    overflow: hidden;
    min-height: min(84vh, 720px);
    display: flex;
    align-items: center;
    background: #0B0D11;
    color: #fff;
    padding-block: clamp(4rem, 8vw, 7rem);
}

.parallax-band__bg {
    position: absolute;
    inset: -18% 0;
    will-change: transform;
    transform: translateY(var(--par, 0px));
}

.parallax-band__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .55;
    filter: saturate(.8) contrast(1.08);
}

.parallax-band__scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to left, rgba(10, 12, 16, .94) 0%, rgba(10, 12, 16, .42) 52%, rgba(10, 12, 16, .25) 100%),
        linear-gradient(to top, rgba(10, 12, 16, .85) 0%, transparent 32%, transparent 68%, rgba(10, 12, 16, .85) 100%);
}

.parallax-band .noise {
    position: absolute;
    inset: 0;
}

/* film grain over the parallax image */
.parallax-band::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--texture-noise);
    background-size: 160px 160px;
    opacity: .22;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.parallax-band__content {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.parallax-band__tag {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    color: var(--color-accent);
    margin-block-end: var(--sp-5);
}

.parallax-band__tag::before {
    content: "";
    width: 26px;
    height: 2px;
    background: var(--color-accent);
    border-radius: 2px;
}

.parallax-band__title {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 1.2rem + 3vw, 3.3rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.45;
    margin-block-end: var(--sp-5);
}

.parallax-band__title .mark {
    color: var(--color-accent);
    position: relative;
    white-space: nowrap;
}

.parallax-band__text {
    color: rgba(255, 255, 255, .7);
    font-size: var(--fs-h5);
    max-width: 560px;
    margin-block-end: var(--sp-8);
}

.parallax-band__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3);
}

/* ----------------------------------------------------------
   C. 3D model stage — interactive wireframe gearbox
   Scroll turns it · drag / arrow keys spin it · dbl-click resets
   ---------------------------------------------------------- */
@property --p {
    syntax: '<number>';
    inherits: false;
    initial-value: 0;
}

@property --tilt {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

@property --gx {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 50%;
}

@property --gy {
    syntax: '<percentage>';
    inherits: true;
    initial-value: 50%;
}

.model-section {
    position: relative;
    overflow: clip;
    /* the stage glows bleed, the page must not */
    background: var(--color-bg);
}

.model-stage {
    position: relative;
    aspect-ratio: 1;
    width: 100%;
    max-width: 500px;
    margin-inline: auto;
    perspective: 1200px;
    touch-action: pan-y;
    /* let the page scroll vertically, we own the horizontal drag */
    cursor: grab;
    border-radius: var(--radius-xl);
    -webkit-tap-highlight-color: transparent;
}

.model-stage.is-dragging {
    cursor: grabbing;
}

.model-stage:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 8px;
}

@media (hover: none) {
    .model-stage {
        cursor: default;
    }
}

/* Square canvas, centred inside the stage panel (the panel is taller
   than wide on phones, so the crystal stays square and never crops) */
.model-stage__inner {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
}

@supports (container-type: size) {
    .model-stage {
        container-type: size;
    }

    .model-stage__inner {
        width: min(100cqw, 100cqh);
        height: min(100cqw, 100cqh);
        margin: auto;
    }
}

/* blueprint grid backdrop, fading out towards the edges */
.model-stage__grid {
    position: absolute;
    inset: 2%;
    border-radius: 50%;
    background-image:
        linear-gradient(to right, color-mix(in srgb, var(--color-heading) 9%, transparent) 1px, transparent 1px),
        linear-gradient(to bottom, color-mix(in srgb, var(--color-heading) 9%, transparent) 1px, transparent 1px);
    background-size: 34px 34px;
    -webkit-mask-image: radial-gradient(closest-side, #000 18%, transparent 76%);
    mask-image: radial-gradient(closest-side, #000 18%, transparent 76%);
    opacity: .85;
    pointer-events: none;
}

.model-stage__glow {
    position: absolute;
    inset: 16%;
    border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--color-accent) 34%, transparent), transparent 70%);
    filter: blur(30px);
    pointer-events: none;
    transition: opacity var(--t-slow) var(--ease-smooth);
}

/* orbit rings + tick bezel */
.model-stage__orbit {
    position: absolute;
    inset: 4%;
    border-radius: 50%;
    border: 1px dashed color-mix(in srgb, var(--color-heading) 22%, transparent);
    transform: rotateX(74deg);
    animation: orbit-z 26s linear infinite;
    pointer-events: none;
}

.model-stage__orbit--2 {
    inset: 14%;
    border-style: solid;
    border-color: color-mix(in srgb, var(--color-accent) 30%, transparent);
    animation: orbit-z 18s linear infinite reverse;
}

.model-stage__ticks {
    position: absolute;
    inset: 1%;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg,
            color-mix(in srgb, var(--color-heading) 30%, transparent) 0deg 0.45deg,
            transparent 0.45deg 6deg);
    -webkit-mask-image: radial-gradient(closest-side, transparent 86%, #000 87%);
    mask-image: radial-gradient(closest-side, transparent 86%, #000 87%);
    transform: rotateX(74deg);
    animation: orbit-z 90s linear infinite;
    opacity: .6;
    pointer-events: none;
}

/* soft contact shadow under the gearbox */
.model-stage__shadow {
    position: absolute;
    inset-inline: 20%;
    bottom: 7%;
    height: 11%;
    border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--color-heading) 34%, transparent), transparent 76%);
    filter: blur(12px);
    opacity: .5;
    pointer-events: none;
}

[data-theme="dark"] .model-stage__shadow {
    opacity: .4;
}

@keyframes orbit-z {
    from {
        transform: rotateX(74deg) rotateZ(0deg);
    }

    to {
        transform: rotateX(74deg) rotateZ(360deg);
    }
}

.model-rotor {
    position: absolute;
    inset: 6%;
    transform-style: preserve-3d;
    transform: rotateX(calc(15deg + var(--tilt, 0deg))) rotateY(calc(var(--p, 0) * 1turn));
    will-change: transform;
}

/* ---- the gearbox: a real 3D box (six faces), so it turns like a
        housing with depth instead of a rotating picture card ---- */
.model-box {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    color: var(--color-heading);
    --bw: min(66cqw, 430px);
    /* housing width  (X) */
    --bh: min(49cqw, 320px);
    /* housing height (Y) */
    --bd: min(32cqw, 208px);
    /* housing depth  (Z) */
}

@supports not (container-type: size) {
    .model-box {
        --bw: 280px;
        --bh: 208px;
        --bd: 152px;
    }
}

[data-theme="dark"] .model-box {
    color: #DDE0E7;
}

.model-face {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid color-mix(in srgb, currentColor 55%, transparent);
    border-radius: 3px;
    background: linear-gradient(150deg,
            color-mix(in srgb, var(--color-surface) 62%, transparent),
            color-mix(in srgb, var(--color-surface) 26%, transparent) 72%);
    box-shadow: inset 0 0 24px color-mix(in srgb, var(--color-accent) 9%, transparent);
}

.model-face--front,
.model-face--back {
    width: var(--bw);
    height: var(--bh);
}

.model-face--left,
.model-face--right {
    width: var(--bd);
    height: var(--bh);
}

.model-face--top,
.model-face--bottom {
    width: var(--bw);
    height: var(--bd);
}

.model-face--front {
    background: linear-gradient(150deg,
            color-mix(in srgb, var(--color-surface) 72%, transparent),
            color-mix(in srgb, var(--color-accent) 4%, transparent) 72%);
    transform: translate(-50%, -50%) translateZ(calc(var(--bd) / 2));
}

.model-face--back {
    transform: translate(-50%, -50%) rotateY(180deg) translateZ(calc(var(--bd) / 2));
}

.model-face--back .model-gear {
    display: none;
}

.model-face--right {
    transform: translate(-50%, -50%) rotateY(90deg) translateZ(calc(var(--bw) / 2));
}

.model-face--left {
    transform: translate(-50%, -50%) rotateY(-90deg) translateZ(calc(var(--bw) / 2));
}

.model-face--top {
    transform: translate(-50%, -50%) rotateX(90deg) translateZ(calc(var(--bh) / 2));
}

.model-face--bottom {
    transform: translate(-50%, -50%) rotateX(-90deg) translateZ(calc(var(--bh) / 2));
}

/* gear rim on the housing cover (teeth + pitch circle + shaft hub) */
.model-gear {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 46%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, currentColor 55%, transparent);
    box-shadow:
        inset 0 0 0 5px color-mix(in srgb, var(--color-accent) 7%, transparent),
        inset 0 0 18px color-mix(in srgb, var(--color-accent) 16%, transparent);
}

.model-gear::before {
    /* gear teeth */
    content: "";
    position: absolute;
    inset: -8%;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg,
            color-mix(in srgb, currentColor 62%, transparent) 0deg 3.1deg,
            transparent 3.1deg 9deg);
    -webkit-mask-image: radial-gradient(closest-side, transparent 77%, #000 78%);
    mask-image: radial-gradient(closest-side, transparent 77%, #000 78%);
    opacity: .8;
}

.model-gear::after {
    /* ring-gear pitch circle */
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    border: 1px dashed color-mix(in srgb, var(--color-accent) 65%, transparent);
    opacity: .7;
}

/* planetary set: three planet gears around the sun (shaft) */
.model-gear__planet {
    position: absolute;
    width: 28%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, currentColor 58%, transparent);
    background: color-mix(in srgb, var(--color-accent) 7%, transparent);
}

.model-gear__planet::after {
    content: "";
    position: absolute;
    inset: 38%;
    border-radius: 50%;
    background: color-mix(in srgb, currentColor 62%, transparent);
}

.model-gear__planet--1 {
    left: 50%;
    top: 23.5%;
}

.model-gear__planet--2 {
    left: 27%;
    top: 63.2%;
}

.model-gear__planet--3 {
    left: 73%;
    top: 63.2%;
}

.model-gear__hub {
    /* output shaft */
    position: absolute;
    inset: 38%;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow:
        0 0 14px color-mix(in srgb, var(--color-accent) 60%, transparent),
        inset 0 0 0 3px color-mix(in srgb, var(--color-surface) 55%, transparent);
}

/* housing bolts */
.model-bolt {
    position: absolute;
    width: clamp(7px, 2.2cqw, 12px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--color-accent) 80%, transparent);
    background: color-mix(in srgb, var(--color-accent) 22%, transparent);
}

.model-bolt--tl {
    top: 9%;
    left: 8%;
}

.model-bolt--tr {
    top: 9%;
    right: 8%;
}

.model-bolt--bl {
    bottom: 9%;
    left: 8%;
}

.model-bolt--br {
    bottom: 9%;
    right: 8%;
}

/* cooling fins down the side walls */
.model-fins {
    position: absolute;
    inset: 12% 16%;
    background: repeating-linear-gradient(to bottom,
            color-mix(in srgb, currentColor 34%, transparent) 0 1px,
            transparent 1px 10px);
    opacity: .5;
}

/* lifting eye on the top plate */
.model-eye {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(10px, 3.2cqw, 17px);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1.5px solid color-mix(in srgb, var(--color-accent) 80%, transparent);
    background: color-mix(in srgb, var(--color-accent) 16%, transparent);
}

/* floating stat chips on the stage (glass, floating above the housing) */
.model-chip {
    position: absolute;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: .6rem;
    background: color-mix(in srgb, var(--color-surface) 84%, transparent);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 18px 40px -24px rgba(21, 23, 28, .5);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
    backdrop-filter: blur(10px) saturate(1.1);
    padding: .6rem .9rem;
    max-width: 52%;
    animation: float-y 6s ease-in-out infinite;
    pointer-events: none;
}

[data-theme="dark"] .model-chip {
    box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .8);
}

.model-chip .num {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-heading);
    line-height: 1.2;
}

.model-chip .lbl {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    line-height: 1.5;
}

.model-chip>div {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
}

.model-chip svg {
    width: 16px;
    height: 16px;
    color: var(--color-accent);
    flex-shrink: 0;
}

.model-chip--1 {
    top: 0;
    inset-inline-end: 0;
}

.model-chip--2 {
    bottom: 0;
    inset-inline-start: 0;
    animation-delay: 1.5s;
}

/* drag affordance — retires as soon as the visitor interacts */
.model-stage__hint {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: -1.4rem;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .8rem;
    border-radius: 999px;
    font-size: var(--fs-xs);
    line-height: 1.6;
    white-space: nowrap;
    color: var(--color-text-muted);
    background: color-mix(in srgb, var(--color-surface) 80%, transparent);
    border: 1px solid var(--color-border);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    pointer-events: none;
    transition: opacity .45s var(--ease-smooth), transform .45s var(--ease-smooth);
}

.model-stage__hint svg {
    width: 13px;
    height: 13px;
    color: var(--color-accent);
    animation: hint-nudge 2.6s ease-in-out infinite;
}

.model-stage.is-engaged .model-stage__hint {
    opacity: 0;
    transform: translate(-50%, 8px);
}

/* keep the drag hint just under the crystal, whatever the panel height */
@supports (container-type: size) {
    .model-stage__hint {
        bottom: calc(50cqh - 50cqw - 1.7rem);
    }
}

.model-stage.is-dragging .model-stage__glow {
    opacity: .65;
}

.model-stage.is-stepping .model-rotor {
    transition: --p .32s var(--ease-smooth);
}

/* the pointer cursor already signals drag on mouse devices;
   the pill is for touch, where there is no cursor */
@media (hover: hover) and (pointer: fine) {
    .model-stage__hint {
        display: none;
    }
}

@keyframes hint-nudge {

    0%,
    100% {
        transform: rotate(-14deg);
    }

    50% {
        transform: rotate(14deg);
    }
}

@keyframes float-y {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* section copy beside the stage */
.model-copy .section-head__title {
    margin-block-end: var(--sp-5);
}

.model-points {
    display: grid;
    gap: var(--sp-5);
    margin-block-end: var(--sp-8);
}

.model-points li {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
}

.model-points svg {
    width: 21px;
    height: 21px;
    color: var(--color-accent);
    flex-shrink: 0;
    margin-block-start: .3rem;
}

.model-points b {
    color: var(--color-heading);
    display: block;
    font-size: var(--fs-h5);
    margin-block-end: .15rem;
}

.model-points span {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    line-height: 1.9;
    display: block;
}

/* ----------------------------------------------------------
   D. Stats manifest — hairline big-number row
   ---------------------------------------------------------- */
.stats-band {
    position: relative;
    z-index: 2;
    background: var(--color-bg);
    border-block-end: 1px solid var(--color-border);
    padding-block: clamp(2.75rem, 5vw, 4.5rem);
}

.stats-band .grid--4 {
    gap: 0;
}

.stats-band__card {
    position: relative;
    background: transparent;
    border: 0;
    border-inline-start: 1px solid var(--color-border);
    box-shadow: none;
    padding: .5rem var(--sp-8) .5rem 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    transition: none;
}

.stats-band__card:first-child {
    border-inline-start: 0;
    padding-inline-start: 0;
}

.stats-band__card:hover {
    transform: none;
    box-shadow: none;
}

.stats-band__card:hover .stats-band__num .suffix {
    color: var(--color-heading);
}

.stats-band__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--color-primary);
    color: var(--color-bg);
    transition: background var(--t-base) var(--ease-smooth);
}

.stats-band__card:hover .stats-band__icon {
    background: var(--color-accent);
    color: #fff;
}

.stats-band__icon svg {
    width: 21px;
    height: 21px;
}

.stats-band__icon--gold {
    background: var(--color-accent);
    color: #fff;
}

.stats-band__icon--green {
    background: var(--color-success);
    color: #fff;
}

.stats-band__icon--violet {
    background: var(--color-heading);
    color: var(--color-bg);
}

.stats-band__num {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 1.8rem + 2.2vw, 3.6rem);
    font-weight: 800;
    color: var(--color-heading);
    line-height: 1.1;
}

.stats-band__num .suffix {
    font-family: var(--font-latin);
    color: var(--color-accent);
    transition: color var(--t-base) var(--ease-smooth);
}

.stats-band__lbl {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

/* Centered variant (index page) */
.stats-band--center .stats-band__card {
    align-items: center;
    text-align: center;
}

/* ----------------------------------------------------------
   E. Split section (about preview, model section, service details)
   ---------------------------------------------------------- */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(2.5rem, 5vw, 4.5rem);
}

.split__reverse .split__media {
    order: 2;
}

.split__media {
    position: relative;
}

.split__media-frame {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.split__media-frame img {
    width: 100%;
    display: block;
}

.split__media-badge {
    position: absolute;
    inset-block-end: -1.2rem;
    inset-inline-start: -1.2rem;
    background: var(--color-primary);
    color: var(--color-bg);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: .9rem;
}

.split__media-badge .num {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
}

.split__media-badge .lbl {
    font-size: var(--fs-sm);
    line-height: 1.5;
}

.split__body .section-head__eyebrow {
    margin-block-end: var(--sp-4);
}

.split__title {
    font-family: var(--font-display);
    font-size: var(--fs-h2);
    font-weight: 800;
    margin-block-end: var(--sp-5);
}

.split__text {
    color: var(--color-text-muted);
    margin-block-end: var(--sp-6);
}

.check-list {
    display: grid;
    gap: .9rem;
    margin-block-end: var(--sp-8);
}

.check-list li {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    font-size: var(--fs-body);
}

.check-list svg {
    width: 22px;
    height: 22px;
    color: var(--color-success);
    flex-shrink: 0;
    margin-block-start: .35rem;
}

.check-list b {
    color: var(--color-heading);
}

/* ----------------------------------------------------------
   F. Services — bento grid + wide rows
   ---------------------------------------------------------- */
.bento {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: var(--sp-4);
}

.bento__item {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: clamp(1.4rem, 2.5vw, 2rem);
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    overflow: hidden;
    --gx: 50%;
    --gy: 50%;
    transition: border-color var(--t-base) var(--ease-smooth), box-shadow var(--t-base) var(--ease-smooth), transform var(--t-base) var(--ease-out);
}

.bento__item::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(260px circle at var(--gx) var(--gy), rgba(255, 74, 31, .13), transparent 62%);
    opacity: 0;
    transition: opacity var(--t-base) var(--ease-smooth);
    pointer-events: none;
}

.bento__item:hover {
    border-color: var(--color-border-strong);
    box-shadow: var(--shadow-md);
}

.bento__item:hover::after {
    opacity: 1;
}

.bento__item--feature {
    grid-column: span 4;
    grid-row: span 2;
}

.bento__item--half {
    grid-column: span 2;
}

.bento__item--third {
    grid-column: span 2;
}

.bento__icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: var(--color-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background var(--t-base) var(--ease-smooth), color var(--t-base) var(--ease-smooth);
}

.bento__icon svg {
    width: 25px;
    height: 25px;
}

.bento__item:hover .bento__icon {
    background: var(--color-accent);
    color: #fff;
}

.bento__title {
    font-family: var(--font-display);
    font-size: var(--fs-h4);
    font-weight: 700;
    color: var(--color-heading);
}

.bento__title a {
    color: inherit;
}

.bento__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.bento__text {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    flex-grow: 1;
}

.bento__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    margin-block-start: auto;
}

.bento__spark-box {
    flex: 1;
    max-width: 220px;
    min-width: 0;
}

.bento__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

/* keep the inline CTA above the card-wide title overlay (a::after) */
.bento__foot .link-more {
    position: relative;
    z-index: 1;
}

/* feature item extras */
.bento__media {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.bento__media img {
    width: 100%;
    display: block;
}

.bento__stat {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 2rem + 2vw, 3.8rem);
    font-weight: 800;
    color: var(--color-heading);
    line-height: 1;
}

.bento__stat .suffix {
    color: var(--color-accent);
    font-family: var(--font-latin);
}

.bento__spark {
    display: block;
    width: 100%;
    height: 56px;
}

/* Wide service rows (services page) */
.service-row {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: var(--sp-5);
    align-items: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: clamp(1.4rem, 2.5vw, 2rem);
    position: relative;
    transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-smooth), border-color var(--t-base);
}

.service-row:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-border-strong);
}

/* big editorial index number in the corner */
.service-row__index {
    position: absolute;
    inset-block-start: 1.05rem;
    inset-inline-end: 1.35rem;
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    color: color-mix(in srgb, var(--color-heading) 9%, transparent);
    transition: color var(--t-base) var(--ease-smooth);
    pointer-events: none;
}

.service-row:hover .service-row__index {
    color: color-mix(in srgb, var(--color-accent) 42%, transparent);
}

.service-row .service-card__icon {
    width: 64px;
    height: 64px;
    background: var(--color-primary);
    color: var(--color-bg);
    transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-smooth),
        background-color var(--t-base), color var(--t-base), border-color var(--t-base);
}

.service-row:hover .service-card__icon {
    background: var(--color-accent);
    color: #fff;
    transform: translateY(-2px) scale(1.04);
}

/* rows with a real image: wide media tile that keeps the image's natural ratio */
.service-row:has(.service-card__icon img) {
    grid-template-columns: 176px 1fr auto;
}

.service-row:has(.service-card__icon img) .service-card__icon {
    width: 100%;
    height: auto;
    padding: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.service-row:has(.service-card__icon img) .service-card__icon img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    transition: transform var(--t-slow) var(--ease-out);
}

.service-row:has(.service-card__icon img):hover .service-card__icon {
    border-color: color-mix(in srgb, var(--color-accent) 55%, var(--color-border));
    box-shadow: var(--shadow-md);
}

.service-row:has(.service-card__icon img):hover .service-card__icon img {
    transform: scale(1.05);
}

.service-row__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-h4);
    margin-block-end: .4rem;
}

.service-row__title a {
    color: inherit;
}

.service-row__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.service-row__text {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    margin-block-end: .8rem;
}

.service-row__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.service-row .link-more {
    position: relative;
    z-index: 1;
}

/* classic service card (kept for inner pages) */
.service-card {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: clamp(1.5rem, 2.5vw, 2rem);
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-smooth), border-color var(--t-base);
    overflow: hidden;
}

.service-card::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--t-slow) var(--ease-out);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--color-border-strong);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card__icon {
    width: 58px;
    height: 58px;
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: var(--color-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-base) var(--ease-smooth);
}

.service-card__icon svg {
    width: 26px;
    height: 26px;
}

.service-card:hover .service-card__icon {
    background: var(--color-accent);
    color: #fff;
    transform: scale(1.05) rotate(-4deg);
}

.service-card__title {
    font-family: var(--font-display);
    font-size: var(--fs-h4);
    font-weight: 700;
}

.service-card__title a {
    color: inherit;
}

.service-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.service-card__text {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    flex-grow: 1;
}

.service-card .link-more {
    font-size: var(--fs-sm);
}

/* ----------------------------------------------------------
   G. Why choose us (ink section)
   ---------------------------------------------------------- */
.section-dark {
    position: relative;
    background:
        radial-gradient(900px 420px at 85% -20%, rgba(255, 74, 31, .14), transparent 60%),
        linear-gradient(165deg, #17191F 0%, #0B0D11 100%);
    color: rgba(255, 255, 255, .78);
    overflow: hidden;
}

.section-dark::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(700px 400px at 15% 0%, #000 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(700px 400px at 15% 0%, #000 20%, transparent 70%);
    pointer-events: none;
}

.section-dark .section-head__title {
    color: #fff;
}

.section-dark .section-head__eyebrow {
    color: #fff;
}

.section-dark .section-head__lead {
    color: rgba(255, 255, 255, .6);
}

.feature-card {
    position: relative;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: var(--radius-xl);
    padding: clamp(1.5rem, 2.5vw, 1.9rem);
    transition: transform var(--t-base) var(--ease-out), background-color var(--t-base), border-color var(--t-base);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, .075);
    border-color: rgba(255, 255, 255, .2);
}

.feature-card__num {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1.3rem;
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(255, 255, 255, .08);
    line-height: 1;
}

.feature-card:hover .feature-card__num {
    color: color-mix(in srgb, var(--color-accent) 30%, transparent);
}

.feature-card__icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: rgba(255, 74, 31, .14);
    color: var(--color-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-block-end: var(--sp-4);
}

.feature-card__icon svg {
    width: 24px;
    height: 24px;
}

.feature-card__title {
    font-family: var(--font-display);
    color: #fff;
    font-size: var(--fs-h4);
    font-weight: 700;
    margin-block-end: .7rem;
}

.feature-card__text {
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, .62);
    line-height: 1.9;
}

/* ----------------------------------------------------------
   H. Portfolio cards + filter bar
   ---------------------------------------------------------- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .6rem;
    margin-block-end: clamp(2rem, 4vw, 3rem);
}

/* Search-form variant (blog / site search): compact row, input + button aligned */
.filter-bar--search {
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
}

.filter-bar--search input.form-control {
    flex: 1 1 auto;
    min-width: 11rem;
    max-width: 26rem;
}

.filter-bar--search .filter-chip {
    flex-shrink: 0;
}

/* ----------------------------------------------------------
   Search pill (blog index) — one cohesive container that
   holds icon + input + submit in a single rounded field.
   Direction-agnostic (logical properties only), so the same
   rules are mirrored in css/ (RTL) and css-ltr/ (LTR).
   ---------------------------------------------------------- */
.search-box {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding-block: .45rem;
    padding-inline-start: 1.2rem;
    padding-inline-end: .45rem;
    margin-block-end: clamp(2rem, 4vw, 3rem);
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xs);
    transition: border-color var(--t-fast) var(--ease-smooth),
        box-shadow var(--t-base) var(--ease-smooth);
}

.search-box:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px var(--color-accent-100), var(--shadow-sm);
}

.search-box__icon {
    display: inline-flex;
    flex-shrink: 0;
    color: var(--color-text-muted);
}

.search-box__icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.search-box__input {
    flex: 1 1 auto;
    min-width: 0;
    padding: .6rem 0;
    border: 0;
    outline: 0;
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    font-size: var(--fs-body);
    line-height: 1.5;
    color: var(--color-text);
    caret-color: var(--color-accent);
}

.search-box__input::placeholder {
    color: var(--color-text-faint);
}

.search-box__input::-webkit-search-cancel-button {
    display: none;
}

.search-box__submit {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    flex-shrink: 0;
    padding: .65rem 1.4rem;
    border: 0;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    color: var(--color-bg);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    line-height: 1.5;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background-color var(--t-fast) var(--ease-smooth),
        color var(--t-fast) var(--ease-smooth),
        box-shadow var(--t-base) var(--ease-smooth),
        transform var(--t-fast) var(--ease-smooth);
}

.search-box__submit svg {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
}

.search-box__submit:hover,
.search-box__submit:focus-visible {
    background: var(--color-accent);
    color: #fff;
    box-shadow: var(--shadow-primary);
    transform: translateY(-1px);
}

.search-box__submit:active {
    transform: translateY(0);
}

/* active tag row under the search pill */
.search-box-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-block: .8rem clamp(2rem, 4vw, 3rem);
}

form.search-box:has(+ .search-box-tags) {
    margin-block-end: 0;
}

.portfolio-card {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-smooth), border-color var(--t-base);
}

.portfolio-card.is-hidden {
    display: none;
}

.portfolio-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--color-border-strong);
}

.portfolio-card__thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--color-surface-2);
}

.portfolio-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow) var(--ease-out);
}

.portfolio-card:hover .portfolio-card__thumb img {
    transform: scale(1.06);
}

.portfolio-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    /* above the card-wide title link overlay */
    background: linear-gradient(to top, rgba(10, 12, 16, .72), transparent 55%);
    opacity: 0;
    transition: opacity var(--t-base) var(--ease-smooth);
    display: flex;
    align-items: flex-end;
    padding: 1.2rem;
}

.portfolio-card:hover .portfolio-card__overlay {
    opacity: 1;
}

.portfolio-card__overlay .btn {
    font-size: var(--fs-sm);
    padding: .5rem 1.1rem;
}

.portfolio-card__body {
    padding: 1.3rem 1.4rem 1.5rem;
}

.portfolio-card__cat {
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    color: var(--color-accent-strong);
    margin-block-end: .5rem;
}

.portfolio-card__title {
    font-family: var(--font-display);
    font-size: var(--fs-h4);
    font-weight: 700;
    margin-block-end: .5rem;
}

.portfolio-card__title a {
    color: inherit;
}

.portfolio-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.portfolio-card__text {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

/* Project meta list (project details) */
.meta-list {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.meta-list__item {
    display: flex;
    justify-content: space-between;
    gap: var(--sp-4);
    padding: .9rem 1.2rem;
    font-size: var(--fs-sm);
    border-block-end: 1px solid var(--color-border);
}

.meta-list__item:last-child {
    border-block-end: 0;
}

.meta-list__item span:first-child {
    color: var(--color-text-muted);
}

.meta-list__item span:last-child {
    font-weight: var(--fw-semibold);
    color: var(--color-heading);
    text-align: start;
}

.meta-list__item dt {
    color: var(--color-text-muted);
}

.meta-list__item dd {
    font-weight: var(--fw-semibold);
    color: var(--color-heading);
    text-align: start;
}

/* ----------------------------------------------------------
   I. Work process
   ---------------------------------------------------------- */
.process-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--sp-5);
    position: relative;
}

.process-grid::before {
    content: "";
    position: absolute;
    inset-block-start: 34px;
    inset-inline: 8% 8%;
    height: 2px;
    background: repeating-linear-gradient(90deg, var(--color-border-strong) 0 10px, transparent 10px 20px);
}

.process-step {
    position: relative;
    text-align: center;
    padding-inline: .5rem;
}

.process-step__dot {
    position: relative;
    width: 68px;
    height: 68px;
    margin-inline: auto;
    margin-block-end: var(--sp-4);
    border-radius: 50%;
    background: var(--color-surface);
    border: 2px solid var(--color-border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-heading);
    transition: all var(--t-base) var(--ease-smooth);
    z-index: 1;
}

.process-step__dot svg {
    width: 26px;
    height: 26px;
}

.process-step__num {
    position: absolute;
    top: -6px;
    inset-inline-end: -6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    font-family: var(--font-latin);
    font-size: .75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.process-step:hover .process-step__dot {
    border-color: var(--color-accent);
    color: var(--color-accent);
    box-shadow: 0 0 0 8px var(--color-accent-100);
    transform: translateY(-4px);
}

.process-step__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-h5);
    margin-block-end: .5rem;
}

.process-step__text {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    line-height: 1.9;
}

/* Vertical variant for dark/detail context */
.process-v {
    display: grid;
    gap: var(--sp-6);
    position: relative;
    padding-inline-start: 3.2rem;
}

.process-v::before {
    content: "";
    position: absolute;
    inset-block: 14px;
    inset-inline-start: 33px;
    width: 2px;
    background: repeating-linear-gradient(180deg, var(--color-border-strong) 0 10px, transparent 10px 20px);
}

.process-v__item {
    position: relative;
}

.process-v__dot {
    position: absolute;
    inset-inline-start: -3.2rem;
    top: 0;
    width: 68px;
    display: flex;
    justify-content: center;
}

.process-v__dot i {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 2px solid var(--color-border-strong);
    color: var(--color-heading);
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-family: var(--font-display);
    font-weight: 800;
}

.process-v__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-h4);
    margin-block-end: .4rem;
}

.process-v__text {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
}

/* ----------------------------------------------------------
   J. Testimonials slider
   ---------------------------------------------------------- */
.testimonials {
    position: relative;
}

.testimonials__viewport {
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.testimonials__track {
    display: flex;
    transition: transform var(--t-slow) var(--ease-out);
}

.testimonial-slide {
    flex: 0 0 100%;
    min-width: 100%;
    padding-inline: .5rem;
}

.testimonial-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: clamp(1.75rem, 3.5vw, 2.75rem);
    position: relative;
}

.testimonial-card__quote {
    position: absolute;
    top: 1.8rem;
    inset-inline-start: 2rem;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-card__quote svg {
    width: 22px;
    height: 22px;
}

.testimonial-card__stars {
    display: flex;
    gap: .2rem;
    justify-content: flex-end;
    color: var(--color-accent);
    margin-block-end: var(--sp-4);
}

.testimonial-card__stars svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

/* the "off" star of a 4/5 rating must read as empty */
.testimonial-card__stars .star-off {
    opacity: .22;
}

.testimonial-card__text {
    font-size: var(--fs-h5);
    line-height: 2.1;
    color: var(--color-heading);
    margin-block-end: var(--sp-6);
}

.testimonial-card__person {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-card__person img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--color-border-strong);
}

.testimonial-card__name {
    font-weight: var(--fw-bold);
    color: var(--color-heading);
    line-height: 1.5;
}

.testimonial-card__role {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.testimonials__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-4);
    margin-block-start: var(--sp-6);
}

.testimonials__arrow {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--color-border-strong);
    background: var(--color-surface);
    color: var(--color-heading);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t-fast) var(--ease-smooth);
}

.testimonials__arrow svg {
    width: 19px;
    height: 19px;
}

.testimonials__arrow:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

.testimonials__dots {
    display: flex;
    gap: .5rem;
}

.testimonials__dots button {
    width: 9px;
    height: 9px;
    border-radius: var(--radius-full);
    background: var(--color-border-strong);
    transition: all var(--t-base) var(--ease-smooth);
}

.testimonials__dots button.is-active {
    width: 26px;
    background: var(--color-accent);
}

/* ----------------------------------------------------------
   K. Blog cards
   ---------------------------------------------------------- */
.blog-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-smooth), border-color var(--t-base);
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--color-border-strong);
}

.blog-card__thumb {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--color-surface-2);
    position: relative;
    z-index: 2;
}

.blog-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow) var(--ease-out);
}

.blog-card:hover .blog-card__thumb img {
    transform: scale(1.05);
}

.blog-card__body {
    padding: 1.4rem 1.5rem 1.6rem;
    display: flex;
    flex-direction: column;
    gap: .7rem;
    flex-grow: 1;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    gap: .8rem;
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

.blog-card__meta svg {
    width: 14px;
    height: 14px;
}

.blog-card__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-h4);
    line-height: 1.6;
}

.blog-card__title a {
    color: inherit;
}

.blog-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.blog-card {
    position: relative;
}

.blog-card__text {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    flex-grow: 1;
}

.blog-card .link-more {
    font-size: var(--fs-sm);
    margin-block-start: .4rem;
}

/* Featured blog (blog page) */
.blog-featured {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin-block-end: clamp(2rem, 4vw, 3rem);
}

.blog-featured__media {
    min-height: 300px;
}

.blog-featured__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-featured__body {
    padding: clamp(1.5rem, 3vw, 2.5rem);
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
    justify-content: center;
}

/* Article page */
.article-wrap {
    max-width: 800px;
    margin-inline: auto;
}

.article-hero img {
    border-radius: var(--radius-lg);
    width: 100%;
    box-shadow: var(--shadow-md);
}

.article-body {
    padding-block-start: var(--sp-8);
}

.article-body .prose {
    max-width: none;
}

.article-body .prose img {
    border-radius: var(--radius-md);
    margin-block: var(--sp-6);
}

.quote-block {
    background: var(--color-accent-100);
    border-inline-start: 4px solid var(--color-accent);
    border-radius: var(--radius-md);
    padding: var(--sp-5) var(--sp-6);
    font-size: var(--fs-h5);
    color: var(--color-heading);
    margin-block: var(--sp-8);
    font-weight: var(--fw-medium);
    line-height: 2;
}

.author-box {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-5) var(--sp-6);
    margin-block-start: var(--sp-10);
}

.author-box img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
}

.author-box__name {
    font-weight: var(--fw-bold);
    color: var(--color-heading);
}

.author-box__role {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    margin-block-end: .3rem;
}

.author-box p {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    margin-block-start: .5rem;
}

/* ----------------------------------------------------------
   L. Team cards
   ---------------------------------------------------------- */
.team-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    text-align: center;
    transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-smooth), border-color var(--t-base);
}

.team-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--color-border-strong);
}

.team-card__photo {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--color-surface-2);
}

.team-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow) var(--ease-out);
}

.team-card__photo .team-card__initials {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-accent-strong);
    background: var(--color-surface-2);
}

.team-card:hover .team-card__photo img {
    transform: scale(1.05);
}

.team-card__socials {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    z-index: 2;
    /* above the card-wide name link overlay */
    display: flex;
    justify-content: center;
    gap: .5rem;
    padding: .9rem;
    background: linear-gradient(to top, rgba(10, 12, 16, .78), transparent);
    opacity: 0;
    transform: translateY(8px);
    transition: all var(--t-base) var(--ease-smooth);
}

.team-card:hover .team-card__socials {
    opacity: 1;
    transform: translateY(0);
}

.team-card__socials a {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .16);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.team-card__socials a svg {
    width: 16px;
    height: 16px;
}

.team-card__socials a:hover {
    background: var(--color-accent);
}

.team-card__body {
    padding: 1.3rem 1.2rem 1.5rem;
}

.team-card__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-h4);
    margin-block-end: .3rem;
}

.team-card__role {
    font-size: var(--fs-sm);
    color: var(--color-accent-strong);
    font-weight: var(--fw-semibold);
    margin-block-end: .6rem;
}

.team-card__bio {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
}

/* ----------------------------------------------------------
   M. Product cards
   ---------------------------------------------------------- */
.product-card {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-smooth), border-color var(--t-base);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--color-border-strong);
}

.product-card__flag {
    position: absolute;
    top: 1rem;
    inset-inline-start: 1rem;
    z-index: 2;
}

.product-card__thumb {
    aspect-ratio: 16 / 10;
    background: var(--color-surface-2);
    overflow: hidden;
}

.product-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow) var(--ease-out);
}

.product-card:hover .product-card__thumb img {
    transform: scale(1.05);
}

.product-card__body {
    padding: 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    flex-grow: 1;
}

.product-card__cat {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    font-weight: var(--fw-medium);
}

.product-card__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-h4);
}

.product-card__title a {
    color: inherit;
}

.product-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.product-card__text {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    flex-grow: 1;
}

.product-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    padding-block-start: .8rem;
    border-block-start: 1px dashed var(--color-border-strong);
}

.product-card__price {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--color-heading);
    font-size: var(--fs-h5);
}

.product-card__price small {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    font-weight: var(--fw-medium);
}

/* Product details */
.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
}

.product-gallery__main {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--color-surface-2);
}

.product-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .8rem;
    margin-block-start: .8rem;
}

.product-gallery__thumbs button {
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-surface-2);
    padding: 0;
    transition: border-color var(--t-fast);
}

.product-gallery__thumbs button.is-active {
    border-color: var(--color-accent);
}

.product-gallery__thumbs img {
    aspect-ratio: 4/3;
    width: 100%;
    object-fit: cover;
}

.product-price-box {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    margin-block: var(--sp-4);
}

.product-price-box .price {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--color-heading);
}

.product-price-box .unit {
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
}

/* ----------------------------------------------------------
   N. Pricing cards
   ---------------------------------------------------------- */
.pricing-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: clamp(1.6rem, 3vw, 2.2rem);
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-smooth), border-color var(--t-base);
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.pricing-card--featured {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.pricing-card__flag {
    position: absolute;
    top: 0;
    inset-inline-start: 50%;
    transform: translate(50%, -50%);
}

.pricing-card__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-h4);
}

.pricing-card__desc {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.pricing-card__price {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--color-heading);
}

.pricing-card__price small {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    font-weight: var(--fw-medium);
}

.pricing-card .check-list {
    margin-block: 0;
    flex-grow: 1;
}

.pricing-card .check-list li {
    font-size: var(--fs-sm);
}

.pricing-card .check-list li.off {
    color: var(--color-text-faint);
}

.pricing-card .check-list li.off svg {
    color: var(--color-text-faint);
}

/* ----------------------------------------------------------
   O. Forms
   ---------------------------------------------------------- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-4) var(--sp-5);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}

.form-field--full {
    grid-column: 1 / -1;
}

/* Honeypot anti-spam field: removed from the layout (no grid slot) and
   parked off-screen — still reachable by bots, invisible to real users */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-field label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-heading);
}

.form-field .req {
    color: var(--color-danger);
}

.form-control {
    width: 100%;
    padding: .85rem 1.15rem;
    font-size: var(--fs-body);
    background: var(--color-bg);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    color: var(--color-text);
}

textarea.form-control {
    min-height: 140px;
    resize: vertical;
    line-height: 1.8;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='https://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236A6D75' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='m6 9 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    background-size: 16px;
    padding-inline-end: 1.1rem;
}

.form-control::placeholder {
    color: var(--color-text-faint);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px var(--color-accent-100);
}

.form-control.is-error {
    border-color: var(--color-danger);
}

.form-control.is-error:focus {
    box-shadow: 0 0 0 4px var(--color-danger-bg);
}

.field-error {
    font-size: var(--fs-xs);
    color: var(--color-danger);
    display: none;
    align-items: center;
    gap: .3rem;
}

.field-error.is-visible {
    display: flex;
}

.field-error svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.form-privacy-note svg {
    width: 1.1em;
    height: 1.1em;
    flex-shrink: 0;
    vertical-align: -0.15em;
    color: var(--color-accent);
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    cursor: pointer;
}

.form-check input {
    width: 17px;
    height: 17px;
    accent-color: var(--color-accent);
    margin-block-start: .3rem;
    flex-shrink: 0;
}

/* ----------------------------------------------------------
   P. Alerts
   ---------------------------------------------------------- */
.alert {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    padding: var(--sp-4) var(--sp-5);
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
    line-height: 1.9;
    border: 1px solid transparent;
}

.alert svg {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    margin-block-start: .3rem;
}

.alert--info {
    background: var(--color-info-bg);
    color: var(--color-info);
    border-color: color-mix(in srgb, var(--color-info) 22%, transparent);
}

.alert--success {
    background: var(--color-success-bg);
    color: var(--color-success);
    border-color: color-mix(in srgb, var(--color-success) 22%, transparent);
}

.alert--warning {
    background: var(--color-warning-bg);
    color: var(--color-warning);
    border-color: color-mix(in srgb, var(--color-warning) 22%, transparent);
}

.alert--danger {
    background: var(--color-danger-bg);
    color: var(--color-danger);
    border-color: color-mix(in srgb, var(--color-danger) 22%, transparent);
}

/* ----------------------------------------------------------
   Q. Accordion (FAQ)
   ---------------------------------------------------------- */
.accordion {
    display: grid;
    gap: .9rem;
}

.accordion__item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--t-fast), box-shadow var(--t-base);
}

.accordion__item.is-open {
    border-color: var(--color-accent-100);
    box-shadow: var(--shadow-sm);
}

/* items hidden by a category filter */
.accordion__item.is-hidden {
    display: none;
}

.accordion__btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    padding: 1.15rem 1.4rem;
    font-size: var(--fs-h5);
    font-weight: var(--fw-semibold);
    color: var(--color-heading);
    text-align: start;
    transition: color var(--t-fast);
}

.accordion__btn:hover {
    color: var(--color-accent-strong);
}

.accordion__btn .acc-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-xs);
    background: var(--color-surface-2);
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--t-base) var(--ease-smooth);
}

.accordion__btn .acc-icon svg {
    width: 16px;
    height: 16px;
}

.accordion__item.is-open .accordion__btn {
    color: var(--color-accent-strong);
}

.accordion__item.is-open .acc-icon {
    background: var(--color-accent);
    color: #fff;
    transform: rotate(180deg);
}

.accordion__panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows var(--t-base) var(--ease-smooth);
}

.accordion__item.is-open .accordion__panel {
    grid-template-rows: 1fr;
}

.accordion__panel-inner {
    overflow: hidden;
}

.accordion__content {
    padding: 0 1.4rem 1.3rem;
    color: var(--color-text-muted);
    font-size: var(--fs-sm);
    line-height: 2;
}

/* ----------------------------------------------------------
   R. Tabs
   ---------------------------------------------------------- */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    border-block-end: 1px solid var(--color-border);
    padding-block-end: 1px;
    margin-block-end: var(--sp-6);
}

.tabs__btn {
    padding: .7rem 1.4rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-text-muted);
    border-block-end: 2px solid transparent;
    margin-block-end: -1px;
    border-radius: 0;
    transition: color var(--t-fast), border-color var(--t-fast);
}

.tabs__btn:hover {
    color: var(--color-heading);
}

.tabs__btn.is-active {
    color: var(--color-heading);
    border-block-end-color: var(--color-accent);
}

.tabs__panel {
    display: none;
}

.tabs__panel.is-active {
    display: block;
    animation: fade-in var(--t-base) var(--ease-smooth);
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product spec sheet — datasheet-style key/value rows (products single, «مشخصات» tab).
   Quiet labels + strong values; one hairline per row, no card chrome. */
.spec-sheet {
    max-width: 820px;
}

.spec-sheet__row {
    display: grid;
    grid-template-columns: minmax(9rem, 220px) 1fr;
    gap: var(--sp-4) var(--sp-5);
    align-items: baseline;
    padding-block: .95rem;
    border-block-end: 1px solid var(--color-border);
}

.spec-sheet__row:last-child {
    border-block-end: 0;
}

.spec-sheet__key {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-text-muted);
}

.spec-sheet__value {
    font-size: var(--fs-body);
    font-weight: var(--fw-semibold);
    color: var(--color-heading);
}

/* ----------------------------------------------------------
   S. Tables
   ---------------------------------------------------------- */
.table-wrap {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
    min-width: 520px;
}

.table th {
    background: var(--color-surface-2);
    color: var(--color-heading);
    font-weight: var(--fw-semibold);
    text-align: start;
    padding: .9rem 1.2rem;
    border-block-end: 1px solid var(--color-border);
    white-space: nowrap;
}

.table td {
    padding: .85rem 1.2rem;
    border-block-end: 1px solid var(--color-border);
    color: var(--color-text);
}

.table tr:last-child td {
    border-block-end: 0;
}

.table tbody tr {
    transition: background-color var(--t-fast);
}

.table tbody tr:hover {
    background: var(--color-surface);
}

/* ----------------------------------------------------------
   T. Pagination
   ---------------------------------------------------------- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .45rem;
    margin-block-start: clamp(2rem, 4vw, 3rem);
}

.pagination a,
.pagination span {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-inline: .6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-text);
    background: var(--color-surface);
    transition: all var(--t-fast) var(--ease-smooth);
}

.pagination a:hover {
    border-color: var(--color-accent);
    color: var(--color-accent-strong);
}

.pagination span:not(.is-current) {
    color: var(--color-text-faint);
    cursor: default;
}

.pagination .is-current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-bg);
}

.pagination .is-gap {
    border: 0;
    background: none;
    color: var(--color-text-faint);
}

.pagination svg {
    width: 16px;
    height: 16px;
}

/* ----------------------------------------------------------
   U. Modal
   ---------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--color-overlay);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-4);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t-base) var(--ease-smooth), visibility var(--t-base);
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--color-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: min(540px, 100%);
    max-height: calc(100dvh - 4rem);
    overflow-y: auto;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    position: relative;
    transform: translateY(22px) scale(.98);
    transition: transform var(--t-base) var(--ease-out);
}

.modal-overlay.is-open .modal {
    transform: translateY(0) scale(1);
}

.modal__head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    background: var(--color-bg);
    padding-block-end: .5rem;
}

.modal__head .modal__title {
    margin-block-end: 0;
}

.modal__close {
    flex-shrink: 0;
    margin-inline-start: auto;
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xs);
    background: var(--color-surface-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: all var(--t-fast);
}

.modal__close svg {
    width: 20px;
    height: 20px;
}

.modal__close:hover {
    background: var(--color-danger-bg);
    color: var(--color-danger);
}

.modal__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-h3);
    margin-block-end: .5rem;
}

.modal__sub {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    margin-block-end: var(--sp-6);
}

/* ----------------------------------------------------------
   V. Toasts
   ---------------------------------------------------------- */
.toast-container {
    position: fixed;
    bottom: calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
    inset-inline-start: var(--sp-5);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: .7rem;
    max-width: min(380px, calc(100vw - 2.5rem));
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-inline-start: 4px solid var(--color-accent);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: .95rem 1.15rem;
    font-size: var(--fs-sm);
    color: var(--color-text);
    transform: translateY(16px);
    opacity: 0;
    transition: transform var(--t-base) var(--ease-out), opacity var(--t-base);
}

.toast.is-in {
    transform: translateY(0);
    opacity: 1;
}

.toast svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-block-start: .15rem;
}

.toast--success {
    border-inline-start-color: var(--color-success);
}

.toast--success svg {
    color: var(--color-success);
}

.toast--error {
    border-inline-start-color: var(--color-danger);
}

.toast--error svg {
    color: var(--color-danger);
}

.toast--info {
    border-inline-start-color: var(--color-info);
}

.toast--info svg {
    color: var(--color-info);
}

.toast__close {
    margin-inline-start: auto;
    color: var(--color-text-faint);
    flex-shrink: 0;
    padding: .1rem;
}

.toast__close svg {
    width: 15px;
    height: 15px;
    margin: 0;
    color: inherit;
}

.toast__close:hover {
    color: var(--color-danger);
}

/* ----------------------------------------------------------
   W. Back to top
   ---------------------------------------------------------- */
.back-to-top {
    position: fixed;
    bottom: calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
    inset-inline-end: var(--sp-5);
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: var(--color-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all var(--t-base) var(--ease-smooth);
    z-index: var(--z-backtotop);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-accent);
    color: #fff;
    transform: translateY(-4px);
}

/* ----------------------------------------------------------
   W2. Floating contact button (bottom, opposite the back-to-top)
   ---------------------------------------------------------- */
.float-contact {
    position: fixed;
    bottom: calc(var(--sp-5) + env(safe-area-inset-bottom, 0px));
    inset-inline-start: var(--sp-5);
    z-index: var(--z-backtotop);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .7rem 1.15rem;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-bg);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    box-shadow: var(--shadow-md);
    transition: all var(--t-base) var(--ease-smooth);
}

.float-contact svg {
    width: 18px;
    height: 18px;
}

.float-contact:hover {
    background: var(--color-accent);
    color: #fff;
    transform: translateY(-4px);
}

/* ----------------------------------------------------------
   X. CTA band
   ---------------------------------------------------------- */
.cta-band {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background:
        radial-gradient(640px 300px at 12% 0%, rgba(255, 74, 31, .22), transparent 55%),
        radial-gradient(700px 340px at 92% 110%, rgba(255, 74, 31, .16), transparent 60%),
        linear-gradient(150deg, #1A1D24 0%, #101318 55%, #0B0D11 100%);
    color: #fff;
    padding: clamp(2.25rem, 5vw, 4rem);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.cta-band::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(600px 300px at 50% 50%, #000 20%, transparent 75%);
    -webkit-mask-image: radial-gradient(600px 300px at 50% 50%, #000 20%, transparent 75%);
    pointer-events: none;
}

.cta-band .noise {
    position: absolute;
    inset: 0;
}

/* film grain — CSS-driven so every CTA band (all pages) matches */
.cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--texture-noise);
    background-size: 160px 160px;
    opacity: .24;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.cta-band> :not(.noise) {
    position: relative;
    z-index: 1;
}

.cta-band__title {
    font-family: var(--font-display);
    color: #fff;
    font-size: var(--fs-h2);
    font-weight: 800;
    margin-block-end: var(--sp-4);
}

.cta-band__text {
    color: rgba(255, 255, 255, .72);
    max-width: 600px;
    margin-inline: auto;
    margin-block-end: var(--sp-8);
}

.cta-band__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-3);
}

.cta-band__phone {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: #fff;
    font-weight: var(--fw-bold);
    font-size: var(--fs-h5);
}

.cta-band__phone svg {
    width: 20px;
    height: 20px;
    color: var(--color-accent);
}

/* ----------------------------------------------------------
   X. Quote request (product & service single pages)
   Two panels: reassurance intro beside the form card
   ---------------------------------------------------------- */
.quote-request__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: var(--sp-8);
    align-items: start;
}

.quote-request__intro {
    padding-inline-end: var(--sp-8);
    border-inline-end: 1px solid var(--color-border);
}

.quote-request__intro .section-head__title {
    margin-block-start: 0;
}

.quote-request__lead {
    color: var(--color-text-muted);
    line-height: 1.9;
    max-width: 44ch;
}

.quote-props {
    list-style: none;
    margin: var(--sp-6) 0 0;
    padding: 0;
    display: grid;
    gap: .65rem;
}

.quote-props li {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.quote-props svg {
    width: 18px;
    height: 18px;
    color: var(--color-accent);
    flex-shrink: 0;
}

.quote-props__link {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    transition: color var(--t-fast);
}

.quote-props__link:hover {
    color: var(--color-heading);
}

.quote-request__form {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: clamp(1.5rem, 3vw, 2.25rem);
    box-shadow: var(--shadow-md);
}

/* compact CTA card in the top split section of service pages */
.split__cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin-block-start: var(--sp-6);
}

.split__cta-note {
    width: 100%;
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

/* ----------------------------------------------------------
   Y. Contact page
   ---------------------------------------------------------- */
.contact-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--sp-5);
    transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-smooth), border-color var(--t-base);
    height: 100%;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-border-strong);
}

.contact-card__icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: var(--color-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--t-base) var(--ease-smooth), color var(--t-base) var(--ease-smooth);
}

.contact-card:hover .contact-card__icon {
    background: var(--color-accent);
    color: #fff;
}

.contact-card__icon svg {
    width: 23px;
    height: 23px;
}

.contact-card__title {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-heading);
    margin-block-end: .3rem;
    font-size: var(--fs-h5);
}

.contact-card__text {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    line-height: 1.9;
}

.contact-card__text a {
    font-weight: var(--fw-semibold);
}

/* multi-line contact cards (e.g. several phone numbers): stack the blocks vertically inside the single content column */
.contact-card__phones {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    align-content: start;
    gap: var(--sp-4);
}

.contact-card__phones>div+div {
    padding-block-start: var(--sp-4);
    border-block-start: 1px solid var(--color-border);
}

.map-frame {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.map-frame img {
    width: 100%;
}

.map-frame iframe {
    display: block;
    width: 100%;
    height: 300px;
    border: 0;
}

/* ---------- Table of contents (legal / long-form pages) ---------- */
.toc-col {
    align-self: start;
}

.toc {
    position: sticky;
    top: calc(var(--header-outer-height) + 1rem);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--sp-5);
    box-shadow: var(--shadow-sm);
}

.toc__title {
    font-family: var(--font-display);
    font-size: var(--fs-h5);
    font-weight: 700;
    color: var(--color-heading);
    margin-block-end: var(--sp-4);
}

.toc__list {
    display: grid;
    gap: .55rem;
}

.toc__list a {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    line-height: 1.7;
    transition: color var(--t-fast);
}

.toc__list a:hover {
    color: var(--color-accent-strong);
}

.toc__num {
    font-family: var(--font-latin);
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--color-accent);
    min-width: 1.1em;
    padding-block-start: .25em;
}

/* ----------------------------------------------------------
   Z. Value cards / timeline / misc page helpers
   ---------------------------------------------------------- */
.value-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--sp-6);
    transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-smooth), border-color var(--t-base);
}

.value-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-border-strong);
}

.value-card__icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: var(--color-bg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-block-end: var(--sp-4);
    transition: background var(--t-base) var(--ease-smooth), color var(--t-base) var(--ease-smooth);
}

.value-card__icon svg {
    width: 24px;
    height: 24px;
}

.value-card:hover .value-card__icon {
    background: var(--color-accent);
    color: #fff;
}

.value-card--gold .value-card__icon {
    background: var(--color-accent);
    color: #fff;
}

.value-card--green .value-card__icon {
    background: var(--color-success);
    color: #fff;
}

.value-card__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-h4);
    margin-block-end: .5rem;
}

.value-card__text {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

/* Timeline (about page) */
.timeline {
    position: relative;
    padding-inline-start: 2rem;
}

.timeline::before {
    content: "";
    position: absolute;
    inset-block: 6px;
    inset-inline-start: 7px;
    width: 2px;
    background: linear-gradient(180deg, var(--color-accent), var(--color-primary));
    border-radius: 2px;
}

.timeline__item {
    position: relative;
    padding-block-end: var(--sp-8);
}

.timeline__item:last-child {
    padding-block-end: 0;
}

.timeline__item::before {
    content: "";
    position: absolute;
    inset-inline-start: -2rem;
    top: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-bg);
    border: 3px solid var(--color-accent);
    box-shadow: 0 0 0 5px var(--color-accent-100);
}

.timeline__year {
    display: inline-block;
    background: var(--color-surface-2);
    color: var(--color-heading);
    font-weight: var(--fw-bold);
    font-size: var(--fs-sm);
    padding: .25rem .9rem;
    border-radius: var(--radius-full);
    margin-block-end: .7rem;
}

.timeline__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-h4);
    margin-block-end: .4rem;
}

.timeline__text {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    max-width: 620px;
}

/* Misc page helpers */
.stack {
    display: grid;
    gap: var(--sp-5);
}

.stack--end {
    align-items: end;
}

.sidebar-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: clamp(2rem, 4vw, 3rem);
    align-items: start;
}

.info-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--sp-5);
}

.info-box__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--fs-h5);
    margin-block-end: var(--sp-4);
}

.share-links {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.share-links a {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: all var(--t-fast);
}

.share-links a svg {
    width: 16px;
    height: 16px;
}

/* Post tags row (blog single) — quiet label + chip rail, no filter-bar chrome */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .9rem;
    margin-block: var(--sp-8) 0;
}

.post-tags__label {
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-text-muted);
}

.post-tags__list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.share-links a:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

.next-prev {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-4);
    margin-block-start: var(--sp-10);
}

.next-prev a {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--sp-4) var(--sp-5);
    display: flex;
    flex-direction: column;
    gap: .4rem;
    transition: border-color var(--t-fast), box-shadow var(--t-base), transform var(--t-base) var(--ease-out);
}

.next-prev a:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-sm);
    transform: translateY(-3px);
}

.next-prev .dir {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.next-prev .dir svg {
    width: 14px;
    height: 14px;
}

.next-prev .ttl {
    font-weight: var(--fw-semibold);
    color: var(--color-heading);
    font-size: var(--fs-sm);
}

.next-prev a.next-item {
    text-align: end;
    align-items: flex-end;
}

/* ----------------------------------------------------------
   AA. Project image slideshow (crossfade + zoom)
   ---------------------------------------------------------- */
.project-slideshow {
    position: relative;
}

.project-slideshow:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 3px;
}

.project-slideshow__viewport {
    position: relative;
    aspect-ratio: 8 / 5;
    /* frames are 800×500 → zero CLS */
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-surface);
    box-shadow: var(--shadow-md);
}

.project-slideshow__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.045);
    transition:
        opacity .7s var(--ease-out),
        transform .9s var(--ease-out),
        visibility 0s linear .7s;
}

.project-slideshow__slide.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    transition:
        opacity .7s var(--ease-out),
        transform .9s var(--ease-out),
        visibility 0s;
}

.project-slideshow__slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-slideshow__caption {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 2.4rem 1.5rem 1.1rem;
    background: linear-gradient(to top, rgba(21, 23, 28, .85), rgba(21, 23, 28, 0));
    color: var(--color-white);
    font-size: var(--fs-sm);
}

.project-slideshow__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-full);
    background: rgba(21, 23, 28, .45);
    backdrop-filter: blur(6px);
    color: var(--color-white);
    cursor: pointer;
    transition: background var(--t-base) var(--ease-smooth);
}

.project-slideshow__arrow:hover {
    background: var(--color-accent);
}

.project-slideshow__arrow svg {
    width: 20px;
    height: 20px;
}

/* RTL: "before" sits on the right, "after" on the left */
.project-slideshow__arrow--prev {
    right: 14px;
}

.project-slideshow__arrow--next {
    left: 14px;
}

.project-slideshow__dots {
    display: flex;
    justify-content: center;
    gap: .6rem;
    margin-top: var(--sp-4);
}

.project-slideshow__dot {
    display: grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--color-text-muted);
    font-family: var(--font-family);
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: color var(--t-base) var(--ease-smooth), background var(--t-base) var(--ease-smooth);
}

.project-slideshow__dot:hover {
    color: var(--color-heading);
    background: var(--color-surface);
}

.project-slideshow__dot.is-active {
    color: var(--color-accent-strong);
    font-weight: var(--fw-bold);
}

@media (prefers-reduced-motion: reduce) {

    .project-slideshow__slide,
    .project-slideshow__slide.is-active {
        transition: none;
        transform: none;
    }
}

/* No-JS fallback: static stack of all three images, no controls */
html.no-js .project-slideshow__viewport {
    aspect-ratio: auto;
    overflow: visible;
    box-shadow: none;
}

html.no-js .project-slideshow__slide {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-block-end: var(--sp-8);
}

html.no-js .project-slideshow__slide:last-child {
    margin-block-end: 0;
}

html.no-js .project-slideshow__slide img {
    height: auto;
}

html.no-js .project-slideshow__caption {
    display: block;
    position: static;
    background: none;
    padding: var(--sp-3) 0 0;
    color: var(--color-text-muted);
}

html.no-js .project-slideshow__arrow,
html.no-js .project-slideshow__dots {
    display: none;
}

/* ----------------------------------------------------------
   BB. Conversion blocks — quick quote + homepage FAQ
   ---------------------------------------------------------- */

/* Quick quote (split: persuasion on one side, form on the other) */
.quote-layout {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: clamp(2rem, 4vw, 4.5rem);
    align-items: start;
}

.quote-intro__title {
    font-family: var(--font-display);
    font-size: var(--fs-h2);
    font-weight: 800;
    line-height: 1.5;
    color: var(--color-heading);
    margin-block: .9rem 1rem;
}

.quote-intro__lead {
    color: var(--color-text-muted);
    margin-block-end: var(--sp-6);
    max-width: 46ch;
}

.quote-points {
    display: grid;
    gap: .85rem;
    margin-block-end: var(--sp-8);
}

.quote-points li {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.quote-points svg {
    width: 20px;
    height: 20px;
    color: var(--color-accent);
    flex-shrink: 0;
    margin-block-start: .18rem;
}

.quote-points b {
    color: var(--color-heading);
    font-weight: var(--fw-semibold);
}

.quote-contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-4);
    padding-block-start: var(--sp-6);
    border-block-start: 1px solid var(--color-border);
}

.quote-contact__label {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    display: block;
    margin-block-end: .2rem;
}

.quote-contact__phone {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    font-weight: 800;
    color: var(--color-heading);
}

.quote-contact__phone svg {
    width: 21px;
    height: 21px;
    color: var(--color-accent);
}

.quote-card {
    position: relative;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: clamp(1.5rem, 3vw, 2.4rem);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.quote-card::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline: 0;
    height: 4px;
    background: linear-gradient(to left, var(--color-accent), var(--color-primary));
}

.quote-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-4);
    margin-block-end: var(--sp-5);
}

.quote-card__title {
    font-family: var(--font-display);
    font-size: var(--fs-h4);
    font-weight: 700;
    color: var(--color-heading);
    margin-block-end: .35rem;
}

.quote-card__sub {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.quote-card__badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: var(--color-accent-100);
    color: var(--color-accent-strong);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    padding: .35rem .8rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
    flex-shrink: 0;
}

.quote-card__badge svg {
    width: 13px;
    height: 13px;
}

.quote-card .form-grid {
    gap: 1rem 1.25rem;
}

.quote-card .form-control {
    background: var(--color-bg);
}

.quote-card__note {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    margin-block-start: var(--sp-4);
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    line-height: 1.8;
}

.quote-card__note svg {
    width: 15px;
    height: 15px;
    color: var(--color-success);
    flex-shrink: 0;
    margin-block-start: .15rem;
}

/* Homepage FAQ (question list + sticky help card) */
.faq-layout {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
}

.faq-aside {
    position: sticky;
    top: calc(var(--header-height-scrolled) + 1.5rem);
}

.faq-help {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    padding: clamp(1.6rem, 3vw, 2.2rem);
    color: rgba(255, 255, 255, .78);
    background:
        radial-gradient(420px 240px at 100% 0%, rgba(255, 255, 255, .12), transparent 60%),
        linear-gradient(155deg, #1A1D24, #0B0D11 75%);
    box-shadow: var(--shadow-lg);
    margin-block-start: var(--sp-6);
}

.faq-help::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--texture-noise);
    background-size: 160px 160px;
    opacity: .2;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.faq-help>* {
    position: relative;
    z-index: 1;
}

.faq-help__icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 74, 31, .16);
    color: var(--color-accent);
    margin-block-end: var(--sp-4);
}

.faq-help__icon svg {
    width: 22px;
    height: 22px;
}

.faq-help__title {
    font-family: var(--font-display);
    font-size: var(--fs-h4);
    font-weight: 700;
    color: #fff;
    margin-block-end: .5rem;
}

.faq-help__text {
    font-size: var(--fs-sm);
    line-height: 1.9;
    margin-block-end: var(--sp-5);
}

.faq-help__phone {
    display: flex;
    align-items: center;
    gap: .7rem;
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    font-weight: 800;
    color: #fff;
    margin-block-end: var(--sp-4);
}

.faq-help__phone svg {
    width: 22px;
    height: 22px;
    color: var(--color-accent);
}

.faq-help__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.faq-help__actions .btn {
    font-size: var(--fs-sm);
}

.faq-layout .accordion {
    gap: .7rem;
}

.faq-layout .accordion__item {
    background: var(--color-surface);
}

.faq-layout .accordion__btn {
    font-size: var(--fs-body);
}

/* CTA band micro-note */
.cta-band__note {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-block-start: var(--sp-5);
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, .55);
}

.cta-band__note svg {
    width: 15px;
    height: 15px;
    color: var(--color-accent);
}

/* Responsive: stack the conversion layouts */
@media (max-width: 992px) {

    .quote-layout,
    .faq-layout {
        grid-template-columns: 1fr;
    }

    /* Pull the questions above the promo card: answers are what the visitor
     came for, the support card works better as a closing CTA. */
    .faq-aside {
        display: contents;
    }

    .faq-intro {
        order: 1;
    }

    .faq-layout .accordion {
        order: 2;
    }

    .faq-help {
        order: 3;
        margin-block-start: 0;
    }
}

@media (max-width: 560px) {
    .quote-contact {
        flex-direction: column;
        align-items: flex-start;
    }

    .quote-contact .btn {
        width: 100%;
    }

    .faq-help__actions .btn {
        width: 100%;
    }
}
/* === graphics.css === */
/* =============================================================
   آریانا — graphics.css
   Aurora mesh · constellation canvas · custom cursor
   Magnetic buttons · kinetic typography
   Pure CSS3 · no dependencies · degrades gracefully
   ============================================================= */

/* ---------- 1. Aurora mesh ----------
   A drifting, blurred multi-radial layer injected by graphics.js
   behind hero / page-hero content. Transform-only animation keeps
   it on the compositor (no repaint). */
.fx-aurora {
  position: absolute;
  inset: -25%;
  pointer-events: none;
  background:
    radial-gradient(38% 42% at 22% 28%, rgba(255, 74, 31, .30), transparent 62%),
    radial-gradient(34% 40% at 78% 22%, rgba(255, 106, 61, .20), transparent 62%),
    radial-gradient(46% 46% at 60% 84%, rgba(255, 74, 31, .16), transparent 60%);
  filter: blur(48px);
  opacity: .62;
  will-change: transform;
  animation: fx-aurora-drift 24s ease-in-out infinite alternate;
}
@keyframes fx-aurora-drift {
  from { transform: translate3d(-3%, 2%, 0) scale(1.02); }
  to   { transform: translate3d(4%, -3%, 0) scale(1.14); }
}

/* ---------- 2. Constellation canvas ---------- */
.fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: .8;
}

/* ---------- 3. Custom cursor (fine pointers only) ---------- */
.fx-cursor,
.fx-cursor-dot {
  position: fixed;
  top: 0;
  left: 0; /* physical: the cursor is transformed with physical pixels */
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0);
  will-change: transform;
}
.fx-cursor {
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  border: 1px solid rgba(255, 74, 31, .5);
  background: radial-gradient(circle, rgba(255, 74, 31, .10), transparent 70%);
  transition: width .28s var(--ease-smooth), height .28s var(--ease-smooth),
              margin .28s var(--ease-smooth), border-color .28s var(--ease-smooth),
              background-color .28s var(--ease-smooth), opacity .3s var(--ease-smooth);
}
.fx-cursor-dot {
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--color-accent, #FF4A1F);
  transition: opacity .3s var(--ease-smooth), transform .2s var(--ease-smooth);
}
/* hovering an interactive element */
.fx-cursor.is-active {
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-color: rgba(255, 74, 31, .9);
  background: radial-gradient(circle, rgba(255, 74, 31, .18), transparent 68%);
}
.fx-cursor.is-active + .fx-cursor-dot { transform: scale(.4); }
.fx-cursor.is-text { width: 3px; height: 30px; margin: -15px 0 0 -1.5px; border-radius: 2px; }
.fx-cursor.is-hidden,
.fx-cursor-dot.is-hidden { opacity: 0; }

/* ---------- 4. Magnetic buttons ----------
   JS writes --mx / --my; CSS owns the transform so the hover
   lift can coexist with the magnetic offset. */
.filter-chip {
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0);
  transition: transform .3s var(--ease-out), background-color var(--t-fast),
              color var(--t-fast), border-color var(--t-fast);
}
.filter-chip:hover { transform: translate3d(var(--mx, 0px), calc(var(--my, 0px) - 2px), 0); }

/* ---------- 5. Kinetic typography ----------
   JS splits headings into .split-word spans; the words rise with a
   stagger once the heading enters the viewport. */
.split-text .split-word {
  display: inline-block;
  transform: translateY(.55em);
  opacity: 0;
  transition: transform .8s var(--ease-out), opacity .7s var(--ease-out);
  transition-delay: var(--word-delay, 0ms);
  will-change: transform;
}
.split-text.is-visible .split-word { transform: none; opacity: 1; }

/* ---------- 6. Section divider flourish ---------- */
.fx-rule {
  display: block;
  width: 68px;
  height: 2px;
  margin-block: var(--sp-5) var(--sp-6);
  background: linear-gradient(to left, var(--color-accent), transparent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform .9s var(--ease-out) .1s;
}
.split-text.is-visible .fx-rule,
.is-visible > .fx-rule { transform: scaleX(1); }

/* ---------- Accessibility: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .fx-aurora { animation: none; }
  .split-text .split-word { transform: none; opacity: 1; transition: none; }
  .fx-cursor, .fx-cursor-dot { display: none; }
}

/* === responsive.css === */
/* =============================================================
   Ø¢Ø±ÛŒØ§Ù†Ø§ â€” responsive.css
   Breakpoints: 1200 / 992 / 768 / 560 â€” mobile-first friendly overrides
   Identity: Porcelain Â· Ink Â· Ember
   ============================================================= */

/* ---------- Base: mobile CTA bar hidden on desktop ---------- */
.mobile-cta { display: none; }

/* ---------- â‰¤ 1200px : large tablets / small laptops ---------- */
@media (max-width: 1200px) {
  .process-grid { grid-template-columns: repeat(3, 1fr); row-gap: var(--sp-8); }
  .process-grid::before { display: none; }

  /* Bento: 6 cols â†’ 2 cols; feature spans the row, halves sit side by side */
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento__item { grid-column: auto; grid-row: auto; }
  .bento__item--feature { grid-column: 1 / -1; grid-row: auto; }
  .bento__item--third:last-child { grid-column: 1 / -1; }

  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-col--contact { grid-column: 1 / -1; }
}

/* ---------- â‰¤ 1440px : header fits only ~1440px and up ---------- */
/* The full row (brand + 6-item nav + phone + language + theme + CTA) needs
   ~1340px of content width, so below 1440px we switch to the hamburger to
   avoid h-scroll / clipping */
@media (max-width: 1440px) {
  .main-nav, .header-phone, .header-actions .btn { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ---------- â‰¤ 992px : tablets ---------- */
@media (max-width: 992px) {
  :root { --header-height: 72px; --header-height-scrolled: 64px; }

  /* Reveal animations: drop the horizontal offsets so un-revealed
     sections can't widen the document and cause horizontal scroll */
  [data-reveal="left"], [data-reveal="right"] { transform: translateY(26px); }

  /* Single-column split: cap the grid track so long unsplittable words
     (min-content) can't widen the document at narrow viewports */
  .split { grid-template-columns: minmax(0, 1fr); }
  .split > * { min-width: 0; }

  /* Hero: single column, panel stacks under the copy */
  .hero__grid { grid-template-columns: 1fr; gap: var(--sp-12); }
  .hero__panel { max-width: 520px; margin-inline: auto; width: 100%; }

  .split { grid-template-columns: 1fr; }
  .split__reverse .split__media { order: 0; }
  .split__media { max-width: 620px; }

  /* Model: stage above the copy, filling the device height so the
     crystal is the section's hero; the square canvas is centred
     inside the tall panel (see .model-stage__inner) */
  .model-section .split { gap: var(--sp-10); }
  .model-section .model-stage {
    order: -1;
    max-width: none;
    aspect-ratio: auto;
    height: clamp(380px, calc(100svh - var(--header-outer-height) - 3rem), 680px);
  }

  /* Stats manifest: 4 â†’ 2 (hairline dividers switch to rows) */
  .stats-band .grid--4 { grid-template-columns: 1fr 1fr; gap: 0; }
  .stats-band__card {
    border-inline-start: 0;
    border-block-start: 1px solid var(--color-border);
    padding: var(--sp-5) 0 var(--sp-5) var(--sp-8);
  }
  .stats-band__card:nth-child(1),
  .stats-band__card:nth-child(2) { border-block-start: 0; padding-block-start: 0; }
  .stats-band__card:nth-child(even) {
    border-inline-start: 1px solid var(--color-border);
    padding-inline-start: var(--sp-8);
  }
  .stats-band__card:first-child { padding-inline-start: 0; }

  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }

  .product-layout { grid-template-columns: 1fr; }
  .sidebar-layout { grid-template-columns: 1fr; }
  .sidebar-layout > aside { order: 2; }
  /* the table of contents must come before the prose on mobile */
  .sidebar-layout > .toc-col { order: -1; }
  .toc { position: static; }

  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured__media { min-height: 240px; }
}

/* ---------- â‰¤ 768px : large phones / small tablets ---------- */
@media (max-width: 768px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }

  /* Process steps â†’ horizontal snap-scroll rail */
  .process-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: var(--sp-4);
    padding-block-end: var(--sp-4);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .process-grid::-webkit-scrollbar { display: none; }
  .process-step { min-width: 240px; scroll-snap-align: center; flex-shrink: 0; }

  /* Filter chips â†’ horizontal snap-scroll rail */
  .filter-bar {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    margin-inline: calc(var(--container-pad) * -1);
    padding-inline: var(--container-pad);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-bar::-webkit-scrollbar { display: none; }
  .filter-chip { flex-shrink: 0; scroll-snap-align: start; }

  /* Search form: stack input + button, no scroll rail */
  .filter-bar--search {
    flex-direction: column;
    align-items: stretch;
    overflow-x: visible;
    scroll-snap-type: none;
    margin-inline: 0;
    padding-inline: 0;
  }
  .filter-bar--search input.form-control { flex: 1 1 auto; min-width: 0; max-width: none; width: 100%; margin-block-end: .6rem; }
  .filter-bar--search .filter-chip { width: 100%; }

  /* Search pill: input stays on row 1 with the icon; submit wraps to a full-width row */
  .search-box { flex-wrap: wrap; gap: .5rem; }
  .search-box__input { flex: 1 1 0; min-width: 0; }
  .search-box__submit { flex: 1 1 100%; justify-content: center; }
  .search-box-tags { margin-block: .7rem 2rem; }

  /* Bento â†’ single column */
  .bento { grid-template-columns: 1fr; }
  .bento__item--feature,
  .bento__item--third:last-child { grid-column: auto; }

  /* Parallax band: lighter mobile treatment */
  .parallax-band { min-height: auto; }
  .parallax-band__bg { inset: 0; }
  .parallax-band__bg img { opacity: .45; }

  /* Model stage: chips hug the panel edges, clear of the crystal */
  .model-stage { max-width: none; }
  .model-chip { max-width: 64%; }
  .model-chip--1 { inset-inline-end: 0; top: 3%; }
  .model-chip--2 { inset-inline-start: 0; bottom: 2%; }

  .form-grid { grid-template-columns: 1fr; }

  /* Quote request: intro above the form card on narrow screens */
  .quote-request__grid { grid-template-columns: 1fr; gap: var(--sp-8); }
  .quote-request__intro { padding-inline-end: 0; border-inline-end: 0; }

  /* Spec sheet: key above value on narrow screens */
  .spec-sheet__row { grid-template-columns: 1fr; gap: .3rem; padding-block: .8rem; }

  .service-row { grid-template-columns: 60px 1fr; }
  .service-row .link-more { grid-column: 2; justify-self: start; }
  .service-row .service-card__icon { width: 56px; height: 56px; }
  .service-row:has(.service-card__icon img) { grid-template-columns: 112px 1fr; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: var(--sp-8) var(--sp-6); }
  .footer-col--brand, .footer-col--contact { grid-column: 1 / -1; }

  .next-prev { grid-template-columns: 1fr; }
  .next-prev a.next-item { text-align: start; align-items: flex-start; }

  .split__media-badge { inset-block-end: -0.8rem; inset-inline-start: 1rem; padding: .9rem 1.2rem; }

  .cta-band__actions .btn { width: 100%; }
  .cta-band__phone { margin-inline: auto; }

}

/* ≤ 768px & touch only : mobile CTA bottom bar
   The bar and its layout side-effects (FAB / float-contact hiding,
   body bottom padding, toast offset) are a mobile-only UI element.
   Gated on `pointer: coarse` so they never leak into a desktop
   window that happens to be narrow or heavily zoomed, where a
   fixed bottom call/quote bar would look out of place.
*/
@media (max-width: 768px) and (pointer: coarse) {
  /* Mobile bottom action bar replaces the back-to-top FAB.
     Only pages that actually ship the bar (body.has-mobile-cta)
     hide the FAB and reserve space for it. */
  body.has-mobile-cta { padding-block-end: calc(84px + env(safe-area-inset-bottom, 0px)); }
  body.has-mobile-cta .back-to-top { display: none; }
  body.has-mobile-cta .float-contact { display: none; }
  .mobile-cta {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    position: fixed;
    inset-inline: 0;
    inset-block-end: 0;
    z-index: calc(var(--z-header) + 10);
    padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--color-surface) 88%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
    border-block-start: 1px solid var(--color-border);
    box-shadow: 0 -12px 30px -14px rgba(21, 23, 28, .2);
  }
  [data-theme="dark"] .mobile-cta {
    background: color-mix(in srgb, var(--color-surface) 92%, transparent);
  }
  .mobile-cta__call {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    color: var(--color-heading);
    padding: .65rem .9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border-strong);
    background: var(--color-surface);
    flex-shrink: 0;
  }
  .mobile-cta__call svg { width: 16px; height: 16px; color: var(--color-accent); }
  .mobile-cta .btn { flex: 1; text-align: center; }
  /* keep toast above the bar */
  .toast-container { inset-block-end: calc(var(--sp-5) + 88px + env(safe-area-inset-bottom, 0px)); }
}
/* ---------- â‰¤ 560px : phones ---------- */
@media (max-width: 560px) {
  :root { --container-pad: 1rem; }

  /* Header: keep brand + icon buttons inside narrow viewports
     (at 320px the default row overflows and clips the buttons) */
  .header-inner { gap: var(--sp-3); }
  .brand { flex-shrink: 1; min-width: 0; }
  .brand__logo { width: 38px; height: 38px; }
  .brand__name { min-width: 0; }
  .brand__title { font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand__subtitle { display: none; }
  .icon-btn { width: 44px; height: 44px; }
  .icon-btn svg { width: 20px; height: 20px; }
  /* language pill: compact, height-matched to the 44px icon buttons */
  .lang-toggle { height: 44px; min-width: 44px; padding-inline: .55rem; gap: .35rem; font-size: .75rem; }
  .lang-toggle svg { width: 18px; height: 18px; }

  /* Hero: video off (poster layer stays) â€” CSS safety net for JS-free */
  .hero__video { display: none; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__trust { gap: var(--sp-4); }
  .hero__trust-item { padding-inline-end: var(--sp-4); border-inline-end-width: 0; }
  .hero__panel-meta { flex-wrap: wrap; gap: var(--sp-4); }

  /* Stats manifest: 2 â†’ 1 column */
  .stats-band .grid--4 { grid-template-columns: 1fr; }
  .stats-band__card {
    border-inline-start: 0;
    border-block-start: 1px solid var(--color-border);
    padding: var(--sp-4) 0;
    padding-inline-start: 0;
  }
  .stats-band__card:first-child { border-block-start: 0; padding-block-start: 0; }
  .stats-band__card:nth-child(2) { border-block-start: 1px solid var(--color-border); padding-block-start: var(--sp-4); }
  .stats-band__num { font-size: 2rem; }

  .process-step { min-width: 200px; }

  .model-section .model-stage { height: clamp(340px, calc(100svh - var(--header-outer-height) - 2rem), 600px); }
  .model-chip { padding: .5rem .7rem; max-width: 72%; }
  .model-chip .lbl { font-size: .68rem; line-height: 1.5; }

  .marquee__group span { font-size: 1.05rem; }

  .footer-top { grid-template-columns: 1fr; }

  .product-gallery__thumbs { grid-template-columns: repeat(4, 1fr); gap: .5rem; }

  .modal { padding: var(--sp-5); }

  .author-box { flex-direction: column; text-align: center; align-items: center; }

  .testimonial-card__quote { position: static; margin-block-end: var(--sp-3); }

  .breadcrumb { font-size: var(--fs-xs); }
}

/* ---------- Accessibility: reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .marquee__track { animation: none; }
  .model-stage__orbit,
  .model-stage__ticks,
  .model-chip { animation: none; }
  .hero__video { display: none; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .mask-line > span { transform: none; }
}

/* === utilities.css === */
/* =============================================================
   آریانا — utilities.css
   Scroll-reveal animations + small helper utilities
   ============================================================= */

/* ---------- Scroll reveal (JS adds .is-visible) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translateX(30px); }
[data-reveal="right"] { transform: translateX(-30px); }
[data-reveal="zoom"]  { transform: scale(.94); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Layout helpers ---------- */
.flex { display: flex; }
.flex--wrap { flex-wrap: wrap; }
.flex--between { display: flex; align-items: center; justify-content: space-between; }
.flex--center { display: flex; align-items: center; justify-content: center; }
.flex--items-center { display: flex; align-items: center; }
.flex--col { flex-direction: column; }

.text-center { text-align: center; }
.text-start { text-align: start; }

.mt-0 { margin-block-start: 0 !important; }
.mt-4 { margin-block-start: var(--sp-4); }
.mt-6 { margin-block-start: var(--sp-6); }
.mt-8 { margin-block-start: var(--sp-8); }
.mt-10 { margin-block-start: var(--sp-10); }
.mb-0 { margin-block-end: 0 !important; }
.mb-4 { margin-block-end: var(--sp-4); }
.mb-6 { margin-block-end: var(--sp-6); }
.mb-8 { margin-block-end: var(--sp-8); }
.mx-auto { margin-inline: auto; }

.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }

.w-full { width: 100%; }
.grid-item--full { grid-column: 1 / -1; }

/* ---------- Display helpers (Bootstrap 5.3 style d-*) ---------- */
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-block { display: block !important; }
.d-table { display: table !important; }
.d-table-row { display: table-row !important; }
.d-table-cell { display: table-cell !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-none { display: none !important; }

/* ---------- Sprite icon default ---------- */
svg.icon { width: 1em; height: 1em; flex-shrink: 0; display: inline-block; vertical-align: -0.15em; }
svg.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Icon box colors ---------- */
.icon-box {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-box svg { width: 24px; height: 24px; }
.icon-box--blue { background: var(--color-secondary-50); color: var(--color-secondary); }
.icon-box--gold { background: var(--color-accent-100); color: var(--color-accent-strong); }
.icon-box--green { background: var(--color-success-bg); color: var(--color-success); }

/* ---------- Screen reader only ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Filter groups (FAQ) ---------- */
.filter-group { display: grid; gap: var(--sp-5); margin-block-end: var(--sp-10); }
.filter-group.is-hidden { display: none; }

/* ---------- Text helpers (replace repeated inline style attrs) ---------- */
.text-sm { font-size: var(--fs-sm); }
.text-muted { color: var(--color-text-muted); }

/* ---------- Small heading helper (replaces inline font-size overrides) ---------- */
.h-sm { font-size: var(--fs-h3); }
.h-xs { font-size: var(--fs-h4); }
.h-lg { font-size: var(--fs-h2); }

/* ---------- Divider ---------- */
.divider { height: 1px; background: var(--color-border); border: 0; margin-block: var(--sp-10); }

/* ---------- Persian number helpers ---------- */
.num { font-feature-settings: "ss01"; }

/* ---------- Section reveal no-JS fallback ---------- */
.no-js [data-reveal] { opacity: 1; transform: none; }

/* ---------- Film-grain noise overlay ----------
   feTurbulence data-URI; used by .hero, .parallax-band, .cta-band */
.noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--texture-noise);
  background-size: 160px 160px;
  opacity: .28;
  mix-blend-mode: overlay;
}

/* ---------- Scroll progress bar (JS drives scaleX) ---------- */
.scroll-progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: 3px;
  z-index: calc(var(--z-header) + 1);
  pointer-events: none;
  background: linear-gradient(to left, var(--color-primary), var(--color-accent));
  transform: scaleX(0);
  transform-origin: 100% 50%; /* RTL: fills from the right */
  will-change: transform;
}
[data-theme="dark"] .scroll-progress {
  background: linear-gradient(to left, var(--color-primary-500), var(--color-accent));
}

/* ---------- Bento sparkline ---------- */
.bento__spark { opacity: .95; }
.bento__spark polyline {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Line-mask reveal (modern trend) ----------
   Wrap an element in .mask-line > span inside a [data-reveal] parent */
.mask-line { display: block; overflow: hidden; }
.mask-line > span {
  display: block;
  transform: translateY(112%);
  transition: transform .9s var(--ease-out) .15s;
  will-change: transform;
}
[data-reveal].is-visible .mask-line > span { transform: none; }
.no-js .mask-line > span { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .mask-line > span { transform: none; transition: none; }
}

/* ---------- Performance hint ---------- */
.site-footer { content-visibility: auto; contain-intrinsic-size: auto 620px; }

/* ============================================================
   UX POLISH — typography, anchors, focus, mobile safety
   ============================================================ */

/* Balanced headline wrapping (avoids a lone word on the last line) */
:where(h1, h2, h3, .hero__title, .section-head__title, .split__title, .cta-band__title, .parallax-band__title) {
  text-wrap: balance;
}
:where(p, li, .hero__lead, .section-head__lead) { text-wrap: pretty; }

/* Anchor targets clear the sticky header */
:where(section[id], [id][data-anchor]) {
  scroll-margin-block-start: calc(var(--header-height-scrolled) + 1.25rem);
}

/* A single, consistent visible focus ring for every interactive element */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Selection color follows the brand */
::selection { background: color-mix(in srgb, var(--color-accent) 28%, transparent); color: var(--color-heading); }

/* Smooth theme switching without animating the whole page forever */
html.theme-anim,
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
  transition: background-color .35s var(--ease-smooth), border-color .35s var(--ease-smooth), color .35s var(--ease-smooth) !important;
}

/* Mobile CTA bar must never cover hero content or the scroll cue
   (touch devices only — matches the pointer:coarse gate in responsive.css) */
@media (max-width: 768px) and (pointer: coarse) {
  body.has-mobile-cta .hero {
    padding-block-end: calc(6rem + 84px + env(safe-area-inset-bottom, 0px));
  }
  body.has-mobile-cta .hero__cue { display: none; }
}

@media (max-width: 560px) {
  .hero__trust {
    display: grid;
    grid-template-columns: 1fr;
    gap: .7rem;
    text-align: start;
    max-width: 320px;
    margin-inline: auto;
  }
  .hero__trust-item {
    padding: 0;
    border: 0;
    gap: .65rem;
  }
  .hero__trust-item .num { font-size: 1.2rem; }
}

/* ============================================================
   SPACING UTILITIES (Bootstrap-compatible)
   Naming:  .{m|p}{side}-{size}
   side:  (blank)=all, t=top, b=bottom, s=start/left, e=end/right,
          x=horizontal (s+e), y=vertical (t+b)
   size:  0, 1, 2, 3, 4, 5, auto (margin only)
   ============================================================ */

/* NOTE: utility spacing intentionally re-uses the design tokens declared in
   style.css (--sp-1 … --sp-24) instead of re-declaring a second, conflicting
   scale here. Loading a second scale after style.css used to silently
   override every component gap/padding on the site. */

/* ---------- MARGIN : all sides ---------- */
.m-0 { margin: var(--sp-0) !important; }
.m-1 { margin: var(--sp-1) !important; }
.m-2 { margin: var(--sp-2) !important; }
.m-3 { margin: var(--sp-3) !important; }
.m-4 { margin: var(--sp-4) !important; }
.m-5 { margin: var(--sp-5) !important; }
.m-auto { margin: auto !important; }

/* ---------- MARGIN : top ---------- */
.mt-1 { margin-top: var(--sp-1) !important; }
.mt-2 { margin-top: var(--sp-2) !important; }
.mt-3 { margin-top: var(--sp-3) !important; }
.mt-5 { margin-top: var(--sp-5) !important; }
.mt-auto { margin-top: auto !important; }

/* ---------- MARGIN : bottom ---------- */
.mb-1 { margin-bottom: var(--sp-1) !important; }
.mb-2 { margin-bottom: var(--sp-2) !important; }
.mb-3 { margin-bottom: var(--sp-3) !important; }
.mb-5 { margin-bottom: var(--sp-5) !important; }
.mb-auto { margin-bottom: auto !important; }

/* ---------- MARGIN : start (left in LTR) ---------- */
.ms-0 { margin-inline-start: var(--sp-0) !important; }
.ms-1 { margin-inline-start: var(--sp-1) !important; }
.ms-2 { margin-inline-start: var(--sp-2) !important; }
.ms-3 { margin-inline-start: var(--sp-3) !important; }
.ms-4 { margin-inline-start: var(--sp-4) !important; }
.ms-5 { margin-inline-start: var(--sp-5) !important; }
.ms-auto { margin-inline-start: auto !important; }

/* ---------- MARGIN : end (right in LTR) ---------- */
.me-0 { margin-inline-end: var(--sp-0) !important; }
.me-1 { margin-inline-end: var(--sp-1) !important; }
.me-2 { margin-inline-end: var(--sp-2) !important; }
.me-3 { margin-inline-end: var(--sp-3) !important; }
.me-4 { margin-inline-end: var(--sp-4) !important; }
.me-5 { margin-inline-end: var(--sp-5) !important; }
.me-auto { margin-inline-end: auto !important; }

/* ---------- MARGIN : horizontal ---------- */
.mx-0 { margin-inline: var(--sp-0) !important; }
.mx-1 { margin-inline: var(--sp-1) !important; }
.mx-2 { margin-inline: var(--sp-2) !important; }
.mx-3 { margin-inline: var(--sp-3) !important; }
.mx-4 { margin-inline: var(--sp-4) !important; }
.mx-5 { margin-inline: var(--sp-5) !important; }

/* ---------- MARGIN : vertical ---------- */
.my-0 { margin-block: var(--sp-0) !important; }
.my-1 { margin-block: var(--sp-1) !important; }
.my-2 { margin-block: var(--sp-2) !important; }
.my-3 { margin-block: var(--sp-3) !important; }
.my-4 { margin-block: var(--sp-4) !important; }
.my-5 { margin-block: var(--sp-5) !important; }
.my-auto { margin-block: auto !important; }

/* ---------- PADDING : all sides ---------- */
.p-0 { padding: var(--sp-0) !important; }
.p-1 { padding: var(--sp-1) !important; }
.p-2 { padding: var(--sp-2) !important; }
.p-3 { padding: var(--sp-3) !important; }
.p-4 { padding: var(--sp-4) !important; }
.p-5 { padding: var(--sp-5) !important; }

/* ---------- PADDING : top ---------- */
.pt-0 { padding-top: var(--sp-0) !important; }
.pt-1 { padding-top: var(--sp-1) !important; }
.pt-2 { padding-top: var(--sp-2) !important; }
.pt-3 { padding-top: var(--sp-3) !important; }
.pt-4 { padding-top: var(--sp-4) !important; }
.pt-5 { padding-top: var(--sp-5) !important; }

/* ---------- PADDING : bottom ---------- */
.pb-0 { padding-bottom: var(--sp-0) !important; }
.pb-1 { padding-bottom: var(--sp-1) !important; }
.pb-2 { padding-bottom: var(--sp-2) !important; }
.pb-3 { padding-bottom: var(--sp-3) !important; }
.pb-4 { padding-bottom: var(--sp-4) !important; }
.pb-5 { padding-bottom: var(--sp-5) !important; }

/* ---------- PADDING : start ---------- */
.ps-0 { padding-inline-start: var(--sp-0) !important; }
.ps-1 { padding-inline-start: var(--sp-1) !important; }
.ps-2 { padding-inline-start: var(--sp-2) !important; }
.ps-3 { padding-inline-start: var(--sp-3) !important; }
.ps-4 { padding-inline-start: var(--sp-4) !important; }
.ps-5 { padding-inline-start: var(--sp-5) !important; }

/* ---------- PADDING : end ---------- */
.pe-0 { padding-inline-end: var(--sp-0) !important; }
.pe-1 { padding-inline-end: var(--sp-1) !important; }
.pe-2 { padding-inline-end: var(--sp-2) !important; }
.pe-3 { padding-inline-end: var(--sp-3) !important; }
.pe-4 { padding-inline-end: var(--sp-4) !important; }
.pe-5 { padding-inline-end: var(--sp-5) !important; }

/* ---------- PADDING : horizontal ---------- */
.px-0 { padding-inline: var(--sp-0) !important; }
.px-1 { padding-inline: var(--sp-1) !important; }
.px-2 { padding-inline: var(--sp-2) !important; }
.px-3 { padding-inline: var(--sp-3) !important; }
.px-4 { padding-inline: var(--sp-4) !important; }
.px-5 { padding-inline: var(--sp-5) !important; }

/* ---------- PADDING : vertical ---------- */
.py-0 { padding-block: var(--sp-0) !important; }
.py-1 { padding-block: var(--sp-1) !important; }
.py-2 { padding-block: var(--sp-2) !important; }
.py-3 { padding-block: var(--sp-3) !important; }
.py-4 { padding-block: var(--sp-4) !important; }
.py-5 { padding-block: var(--sp-5) !important; }

/* === preloader.css === */
/* ==========================================================================
   PAGE PRELOADER
   A full-viewport branded overlay shown while the page loads.
   - Driven by preloader.js: fades out when the page is ready
     (minimum on-screen time ~1.3s, hard cap 5s), then removed from the DOM.
   - No-JS fallback: the html.no-js rule below auto-fades it at ~5s,
     so the page is never blocked forever without JavaScript.
   - Theme-aware: every color is a template token with a safe fallback,
     so the overlay blends with light/dark identically to the page behind it.
   - No layout impact: position:fixed → zero CLS.
   ========================================================================== */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 10000; /* above the custom cursor (9999) and header (400) */
  display: grid;
  place-items: center;
  background: var(--color-bg, #F5F4F0);
  color: var(--color-heading, #15171C);
  text-align: center;
  overflow: hidden;
  transition: opacity .45s ease, visibility 0s linear .45s;
}

.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ---------- Core (column: crystal → brand → latin → bar → status) ---------- */
.preloader__core {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 24px;
  animation: pl-rise .55s cubic-bezier(.22, .61, .36, 1) both;
}

/* Rotating ember crystal — the brand mark while you wait */
.preloader__crystal {
  width: 74px;
  height: 74px;
  color: var(--color-accent, #FF4A1F);
  overflow: visible;
  animation: pl-spin 2.8s linear infinite;
}

.preloader__crystal .facet {
  opacity: .62;
}

.preloader__brand {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .01em;
  animation: pl-fade .5s ease .08s both;
}

.preloader__latin {
  direction: ltr;
  margin: -6px 0 0;
  font-family: var(--font-latin, 'Inter', sans-serif);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .45em;
  text-indent: .45em; /* optically re-center the tracked-out text */
  text-transform: uppercase;
  color: var(--color-text-muted, #6A6D75);
  animation: pl-fade .5s ease .16s both;
}

/* Indeterminate sweep bar */
.preloader__bar {
  position: relative;
  width: 132px;
  height: 2px;
  margin-top: 6px;
  border-radius: 2px;
  background: var(--color-border, #E2E0D7);
  overflow: hidden;
  animation: pl-fade .5s ease .24s both;
}

.preloader__bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 40%;
  border-radius: inherit;
  background: linear-gradient(90deg,
    transparent,
    var(--color-accent, #FF4A1F) 55%,
    transparent);
  animation: pl-sweep 1.5s ease-in-out infinite;
}

.preloader__status {
  margin: 0;
  font-size: .78rem;
  color: var(--color-text-muted, #6A6D75);
  animation: pl-fade .5s ease .3s both;
}

/* ---------- Motion ---------- */
@keyframes pl-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

@keyframes pl-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pl-spin {
  to { transform: rotate(360deg); }
}

/* Sweep: bar is 132px, ::after is 40% (= 52.8px).
   -100% → fully off the left edge; 250% → fully off the right edge. */
@keyframes pl-sweep {
  from { transform: translateX(-100%); }
  to   { transform: translateX(250%); }
}

/* ---------- No-JS fallback ----------
   Without JavaScript the .no-js class is never removed, so schedule the
   fade at 4.55s + 0.45s duration → the page is never blocked past ~5s.
   With JS, main.js strips .no-js shortly after start, which cancels this
   animation and lets preloader.js take over the timing.               */
html.no-js .preloader {
  animation: pl-fadeout-fallback .45s ease 4.55s forwards;
}

@keyframes pl-fadeout-fallback {
  to { opacity: 0; visibility: hidden; }
}

/* ---------- Reduced motion ----------
   No spinning / sweeping / rising — a calm static mark; the overlay still
   fades out (nearly instant) and JS still manages the 5s cap.          */
@media (prefers-reduced-motion: reduce) {
  .preloader__core,
  .preloader__crystal,
  .preloader__brand,
  .preloader__latin,
  .preloader__bar,
  .preloader__status {
    animation: none !important;
  }
  .preloader__bar::after {
    display: none;
  }
  .preloader {
    transition-duration: .01s; /* hide immediately, no fade */
  }
  html.no-js .preloader {
    animation: pl-fadeout-fallback .01s linear 4.6s forwards !important;
  }
}
