/* =========================================================================
   web7 — marketing site design system
   -------------------------------------------------------------------------
   Loaded by cms/base_site.html. Tailwind (Play CDN) supplies layout
   utilities (grid, flex, gap, spacing); this file owns the visual language:
   tokens, typography, buttons, cards, forms and the shared block components.

   Theme: light tokens live on :root, dark tokens on html.dark (the class is
   applied before first paint by the inline script in base_site.html).
   Colours are RGB channels so they compose with alpha:
       color: rgb(var(--c-fg) / 0.7);
   The same tokens are exposed to Tailwind (e.g. text-fg-muted, bg-surface).

   Selectors that style form controls and buttons use doubled / element
   qualified selectors on purpose: Tailwind's preflight is injected after this
   file at runtime and would otherwise win on equal specificity.

   Sections:
     1. Tokens            8. Tags, badges, icon tiles
     2. Base              9. Forms & alerts
     3. Typography       10. Header, navigation, footer
     4. Layout           11. Block components
     5. Buttons & links  12. Article prose & rich text
     6. Cards            13. Motion
     7. Media
   ========================================================================= */

/* 1. Tokens ------------------------------------------------------------- */

:root {
    /* Neutrals */
    --c-bg: 250 250 250;
    --c-surface: 255 255 255;
    --c-surface-2: 244 244 245;
    --c-surface-3: 235 235 238;
    --c-line: 228 228 231;
    --c-line-strong: 208 208 214;
    --c-fg: 12 12 14;
    --c-fg-muted: 82 82 91;
    --c-fg-subtle: 113 113 122;

    /* Brand */
    --c-brand: 224 74 150;          /* #e04a96 brand pink: accents, focus rings */
    --c-brand-fg: 184 40 111;       /* brand-coloured text on the page background (WCAG AA) */
    --c-brand-fill: 204 47 126;     /* primary button fill (AA with white text) */
    --c-brand-fill-hover: 182 36 110;
    --c-on-brand: 255 255 255;
    --c-cyan: 45 184 224;           /* secondary accent */
    --c-cyan-fg: 10 104 140;        /* >= 4.5:1 on cyan-tinted tags */
    --c-violet-fg: 124 88 200;
    --c-success: 22 163 74;
    --c-success-fg: 21 128 61;
    --c-danger: 220 38 38;
    --c-danger-fg: 185 28 28;

    /* Type */
    --font-headline: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;

    --text-display: clamp(2.5rem, 1.3rem + 4.4vw, 4.75rem);
    --text-h1: clamp(2.25rem, 1.55rem + 2.6vw, 3.75rem);
    --text-h2: clamp(1.875rem, 1.45rem + 1.6vw, 2.75rem);
    --text-h3: clamp(1.125rem, 1.06rem + 0.28vw, 1.3125rem);
    --text-lead: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
    --text-sm: 0.875rem;
    --text-xs: 0.8125rem;

    /* Space & layout */
    --space-section: clamp(4.5rem, 3rem + 5vw, 7.5rem);
    --space-section-sm: clamp(3rem, 2.25rem + 3vw, 4.75rem);
    --space-stack: clamp(2.25rem, 1.75rem + 2vw, 3.5rem);   /* section header -> content */
    --container: 76rem;
    --container-md: 64rem;
    --container-narrow: 46rem;
    --gutter: clamp(1.25rem, 0.75rem + 2.5vw, 2rem);
    --header-h: 4.5rem;

    /* Shape & depth */
    --radius-sm: 0.375rem;
    --radius-md: 0.625rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-full: 9999px;
    --shadow-sm: 0 1px 2px rgb(16 16 20 / 0.05);
    --shadow-md: 0 1px 2px rgb(16 16 20 / 0.04), 0 10px 28px -14px rgb(16 16 20 / 0.18);
    --shadow-lg: 0 28px 56px -28px rgb(16 16 20 / 0.28);

    /* Motion */
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --dur-fast: 150ms;
    --dur: 240ms;
    --dur-slow: 520ms;

    color-scheme: light;
}

html.dark {
    --c-bg: 19 19 19;
    --c-surface: 26 26 28;
    --c-surface-2: 32 32 35;
    --c-surface-3: 42 42 46;
    --c-line: 44 44 49;
    --c-line-strong: 66 66 73;
    --c-fg: 244 244 245;
    --c-fg-muted: 170 170 180;
    --c-fg-subtle: 134 134 145;
    --c-brand-fg: 255 176 207;
    --c-brand-fill-hover: 222 60 141;
    --c-cyan-fg: 117 209 255;
    --c-violet-fg: 182 160 245;
    --c-success-fg: 134 239 172;
    --c-danger-fg: 252 165 165;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.35);
    --shadow-md: 0 1px 2px rgb(0 0 0 / 0.3), 0 14px 32px -16px rgb(0 0 0 / 0.65);
    --shadow-lg: 0 32px 64px -32px rgb(0 0 0 / 0.8);
    color-scheme: dark;
}

:root:lang(ar) {
    --font-headline: "Noto Sans Arabic", "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
    --font-body: "Noto Sans Arabic", "Inter", ui-sans-serif, system-ui, sans-serif;
}

/* 2. Base --------------------------------------------------------------- */

html {
    scroll-padding-top: calc(var(--header-h) + 1rem);
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body.site-body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background-color: rgb(var(--c-bg));
    color: rgb(var(--c-fg));
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    font-kerning: normal;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: rgb(var(--c-brand) / 0.28);
}

:focus-visible {
    outline: 2px solid rgb(var(--c-brand));
    outline-offset: 3px;
}

.site-main {
    position: relative;
    flex: 1 0 auto;
    padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
}

.site-main:focus {
    outline: none;
}

.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.skip-link:focus {
    position: fixed;
    z-index: 200;
    inset-inline-start: max(1rem, env(safe-area-inset-left, 0px));
    top: max(1rem, env(safe-area-inset-top, 0px));
    width: auto;
    height: auto;
    margin: 0;
    padding: 0.75rem 1rem;
    clip: auto;
    border-radius: var(--radius-md);
    background: rgb(var(--c-brand-fill));
    color: rgb(var(--c-on-brand));
    font-weight: 600;
    font-size: var(--text-sm);
    text-decoration: none;
    box-shadow: var(--shadow-lg);
}

/* Material Symbols: fixed 1em box so ligature text never shifts layout before the font loads. */
.material-symbols-outlined {
    font-family: "Material Symbols Outlined";
    font-weight: normal;
    font-style: normal;
    font-size: 1.5rem;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    width: 1em;
    overflow: hidden;
    flex-shrink: 0;
    white-space: nowrap;
    direction: ltr;
    font-feature-settings: "liga";
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
    user-select: none;
    -webkit-font-smoothing: antialiased;
}

[dir="rtl"] .icon-dir {
    transform: scaleX(-1);
}

.sr-only-focusable:not(:focus):not(:focus-within) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* 3. Typography --------------------------------------------------------- */

.text-display,
.text-h1,
.text-h2,
.text-h3 {
    font-family: var(--font-headline);
    font-weight: 700;
    color: rgb(var(--c-fg));
    text-wrap: balance;
    overflow-wrap: break-word;
}

.text-display { font-size: var(--text-display); line-height: 1.03; letter-spacing: -0.035em; }
.text-h1 { font-size: var(--text-h1); line-height: 1.06; letter-spacing: -0.03em; }
.text-h2 { font-size: var(--text-h2); line-height: 1.12; letter-spacing: -0.025em; }
.text-h3 { font-size: var(--text-h3); line-height: 1.3; letter-spacing: -0.012em; font-weight: 600; }

.text-lead {
    font-size: var(--text-lead);
    line-height: 1.6;
    color: rgb(var(--c-fg-muted));
    text-wrap: pretty;
}

.text-body { color: rgb(var(--c-fg-muted)); line-height: 1.65; }
.text-muted { color: rgb(var(--c-fg-muted)); }
.text-subtle { color: rgb(var(--c-fg-subtle)); }

.text-gradient {
    background: linear-gradient(100deg, rgb(var(--c-brand-fg)) 15%, rgb(var(--c-violet-fg)) 85%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-headline);
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgb(var(--c-brand-fg));
}

.meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.75rem;
    font-size: var(--text-xs);
    color: rgb(var(--c-fg-subtle));
}

.meta > * + *::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    margin-inline-end: 0.75rem;
    vertical-align: middle;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.6;
}

:lang(ar) .text-display,
:lang(ar) .text-h1,
:lang(ar) .text-h2,
:lang(ar) .text-h3,
:lang(ar) .eyebrow,
:lang(ar) .prose-article h2,
:lang(ar) .prose-article h3 {
    letter-spacing: 0;
}

:lang(ar) .text-display,
:lang(ar) .text-h1 {
    line-height: 1.25;
}

/* 4. Layout ------------------------------------------------------------- */

.container-site {
    width: 100%;
    max-width: calc(var(--container) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
}

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

.section {
    position: relative;
    padding-block: var(--space-section);
}

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

.section--alt {
    background-color: rgb(var(--c-surface-2) / 0.6);
    border-block: 1px solid rgb(var(--c-line) / 0.7);
}

/* Two plain sections in a row share one gap instead of stacking both paddings. */
.section:not(.section--alt) + .section:not(.section--alt) {
    padding-top: 0;
}

.hero + .section:not(.section--alt),
.page-hero + .section:not(.section--alt) {
    padding-top: var(--space-section-sm);
}

.section-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    max-width: 44rem;
    margin-bottom: var(--space-stack);
}

.section-header--center {
    align-items: center;
    margin-inline: auto;
    text-align: center;
}

.section-header__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    margin-bottom: var(--space-stack);
}

.section-header__row > .section-header {
    margin-bottom: 0;
}

/* Grids that stay balanced for any item count (orphans span the row on tablets). */
.grid-auto {
    display: grid;
    gap: clamp(1rem, 0.75rem + 0.8vw, 1.5rem);
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .grid-auto { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
    .grid-auto--3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
    .grid-auto--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-auto--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.split {
    display: grid;
    gap: clamp(2rem, 1rem + 4vw, 4.5rem);
    align-items: center;
}

@media (min-width: 1024px) {
    .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split--media-end > .split__media { order: 2; }
}

.split + .split {
    margin-top: var(--space-section-sm);
}

/* 5. Buttons & links ---------------------------------------------------- */

.btn {
    --btn-h: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: var(--btn-h);
    padding: 0.5rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-headline);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.005em;
    text-align: center;
    text-decoration: none;
    text-wrap: balance;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition:
        background-color var(--dur-fast) var(--ease-out),
        border-color var(--dur-fast) var(--ease-out),
        color var(--dur-fast) var(--ease-out),
        box-shadow var(--dur) var(--ease-out),
        translate var(--dur-fast) var(--ease-out);
}

.btn:focus-visible {
    outline: 2px solid rgb(var(--c-brand));
    outline-offset: 3px;
}

.btn:active { translate: 0 1px; }

.btn.btn--lg { --btn-h: 3.25rem; padding-inline: 1.625rem; font-size: 1rem; }
.btn.btn--sm { --btn-h: 2.5rem; padding-inline: 1rem; font-size: 0.875rem; }
.btn.btn--block { display: flex; width: 100%; }

.btn.btn--primary {
    background-color: rgb(var(--c-brand-fill));
    color: rgb(var(--c-on-brand));
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14), 0 10px 24px -12px rgb(var(--c-brand) / 0.7);
}

.btn.btn--primary:hover {
    background-color: rgb(var(--c-brand-fill-hover));
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.14), 0 14px 30px -12px rgb(var(--c-brand) / 0.8);
}

.btn.btn--secondary {
    background-color: rgb(var(--c-surface));
    border-color: rgb(var(--c-line-strong));
    color: rgb(var(--c-fg));
    box-shadow: var(--shadow-sm);
}

.btn.btn--secondary:hover {
    background-color: rgb(var(--c-surface-2));
    border-color: rgb(var(--c-fg-subtle) / 0.7);
}

.btn.btn--ghost {
    background-color: transparent;
    color: rgb(var(--c-fg));
    padding-inline: 0.875rem;
}

.btn.btn--ghost:hover { background-color: rgb(var(--c-fg) / 0.06); }

.btn__icon {
    font-size: 1.125rem;
    transition: translate var(--dur) var(--ease-out);
}

.btn:hover .btn__icon { translate: 3px 0; }
[dir="rtl"] .btn:hover .btn__icon { translate: -3px 0; }

.btn-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

@media (max-width: 639.98px) {
    .btn-group--stack-mobile { flex-direction: column; align-items: stretch; align-self: stretch; }
    .btn-group--stack-mobile > .btn { width: 100%; }
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-height: 2.75rem;
    font-family: var(--font-headline);
    font-size: 0.9375rem;
    font-weight: 600;
    color: rgb(var(--c-fg));
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-out);
}

.link-arrow .material-symbols-outlined {
    font-size: 1.125rem;
    color: rgb(var(--c-brand-fg));
    transition: translate var(--dur) var(--ease-out);
}

.link-arrow:hover { color: rgb(var(--c-brand-fg)); }

.link-arrow:hover .material-symbols-outlined,
.card--interactive:hover .link-arrow .material-symbols-outlined {
    translate: 3px 0;
}

[dir="rtl"] .link-arrow:hover .material-symbols-outlined,
[dir="rtl"] .card--interactive:hover .link-arrow .material-symbols-outlined {
    translate: -3px 0;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border: 1px solid rgb(var(--c-line-strong));
    border-radius: var(--radius-full);
    background-color: rgb(var(--c-surface));
    color: rgb(var(--c-fg));
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

button.icon-btn { background-color: rgb(var(--c-surface)); }

.icon-btn:hover {
    border-color: rgb(var(--c-brand) / 0.6);
    color: rgb(var(--c-brand-fg));
}

.icon-btn svg { width: 1.125rem; height: 1.125rem; }
.icon-btn .material-symbols-outlined { font-size: 1.375rem; }

/* 6. Cards -------------------------------------------------------------- */

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background-color: rgb(var(--c-surface));
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.75rem;
    padding: clamp(1.5rem, 1.25rem + 0.8vw, 2rem);
}

.card__footer {
    margin-top: auto;
    padding-top: 1rem;
}

.card__footer--ruled {
    border-top: 1px solid rgb(var(--c-line));
    padding-top: 1.25rem;
}

/* One soft brand glow for emphasised cards (e.g. the wide service card). */
.card--glow::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(28rem 16rem at 100% 0%, rgb(var(--c-brand) / 0.1), transparent 70%);
}

.card--glow > * { position: relative; }

.card--interactive {
    transition:
        border-color var(--dur) var(--ease-out),
        box-shadow var(--dur) var(--ease-out),
        translate var(--dur) var(--ease-out);
}

.card--interactive:hover {
    border-color: rgb(var(--c-line-strong));
    box-shadow: var(--shadow-md);
    translate: 0 -2px;
}

/* Stretched link: the heading link covers the card so the whole card is clickable,
   while screen readers announce only the heading text as the link name. */
.card-link {
    color: inherit;
    text-decoration: none;
}

.card-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: var(--radius-lg);
}

.card-link:focus-visible { outline: none; }
.card-link:focus-visible::after { box-shadow: inset 0 0 0 2px rgb(var(--c-brand)); }
.card--interactive:hover .card-link { color: rgb(var(--c-brand-fg)); }

.card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: rgb(var(--c-surface-2));
    border-bottom: 1px solid rgb(var(--c-line));
}

.card__media--4x3 { aspect-ratio: 4 / 3; }

.card__media picture,
.card__media img {
    display: block;
    width: 100%;
    height: 100%;
}

.card__media img {
    object-fit: cover;
    transition: scale var(--dur-slow) var(--ease-out);
}

.card--interactive:hover .card__media img { scale: 1.03; }

.card__media-overlay {
    position: absolute;
    inset-inline: 1rem;
    bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.card__placeholder {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60% 80% at 20% 10%, rgb(var(--c-brand) / 0.18), transparent 70%),
        radial-gradient(50% 70% at 90% 90%, rgb(var(--c-cyan) / 0.14), transparent 70%),
        rgb(var(--c-surface-2));
}

/* 7. Media -------------------------------------------------------------- */

.media-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius-xl);
    background-color: rgb(var(--c-surface-2));
    box-shadow: var(--shadow-lg);
}

.media-frame picture,
.media-frame img {
    display: block;
    width: 100%;
    height: 100%;
}

.media-frame img { object-fit: cover; }

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--radius-full);
    background-color: rgb(var(--c-brand) / 0.14);
    color: rgb(var(--c-brand-fg));
    font-family: var(--font-headline);
    font-size: 0.875rem;
    font-weight: 600;
}

.avatar picture,
.avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar--lg { width: 3.5rem; height: 3.5rem; font-size: 1rem; }

/* 8. Tags, badges, icon tiles ------------------------------------------ */

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 1.625rem;
    padding: 0.125rem 0.625rem;
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius-full);
    background-color: rgb(var(--c-surface-2));
    color: rgb(var(--c-fg-muted));
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

.tag--brand {
    background-color: rgb(var(--c-brand) / 0.1);
    border-color: rgb(var(--c-brand) / 0.28);
    color: rgb(var(--c-brand-fg));
}

.tag--cyan {
    background-color: rgb(var(--c-cyan) / 0.1);
    border-color: rgb(var(--c-cyan) / 0.3);
    color: rgb(var(--c-cyan-fg));
}

.tag--on-media {
    background-color: rgb(12 12 14 / 0.72);
    border-color: rgb(255 255 255 / 0.16);
    color: #fff;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 100%;
    padding: 0.375rem 0.875rem;
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius-full);
    background-color: rgb(var(--c-surface) / 0.75);
    color: rgb(var(--c-fg-muted));
    font-size: var(--text-xs);
    font-weight: 500;
    line-height: 1.35;
    box-shadow: var(--shadow-sm);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.badge__dot {
    width: 0.4375rem;
    height: 0.4375rem;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: rgb(var(--c-brand));
    box-shadow: 0 0 0 3px rgb(var(--c-brand) / 0.2);
}

.icon-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border: 1px solid rgb(var(--c-brand) / 0.2);
    border-radius: var(--radius-md);
    background-color: rgb(var(--c-brand) / 0.1);
    color: rgb(var(--c-brand-fg));
}

.icon-tile .material-symbols-outlined { font-size: 1.375rem; }

.icon-tile--cyan {
    border-color: rgb(var(--c-cyan) / 0.24);
    background-color: rgb(var(--c-cyan) / 0.1);
    color: rgb(var(--c-cyan-fg));
}

.icon-tile--lg { width: 3.25rem; height: 3.25rem; }
.icon-tile--lg .material-symbols-outlined { font-size: 1.625rem; }

.check-list {
    display: grid;
    gap: 1rem;
}

.check-list__item {
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
}

.check-list__icon {
    margin-top: 0.1875rem;
    font-size: 1.25rem;
    color: rgb(var(--c-brand-fg));
}

.check-list--cyan .check-list__icon { color: rgb(var(--c-cyan-fg)); }

.inline-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    font-size: var(--text-sm);
    color: rgb(var(--c-fg-muted));
}

.inline-points li {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.inline-points .material-symbols-outlined {
    font-size: 1.125rem;
    color: rgb(var(--c-brand-fg));
}

/* 9. Forms & alerts ----------------------------------------------------- */

.form-grid {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.form-label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: rgb(var(--c-fg));
}

.form-label__optional {
    font-weight: 400;
    color: rgb(var(--c-fg-subtle));
}

input.form-input,
textarea.form-input,
select.form-input {
    width: 100%;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgb(var(--c-line-strong));
    border-radius: var(--radius-md);
    background-color: rgb(var(--c-surface));
    color: rgb(var(--c-fg));
    font-family: var(--font-body);
    font-size: 1rem;   /* >= 16px prevents iOS zoom on focus */
    line-height: 1.5;
    box-shadow: var(--shadow-sm);
    -webkit-appearance: none;
    appearance: none;
    transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}

html.dark input.form-input,
html.dark textarea.form-input,
html.dark select.form-input {
    background-color: rgb(var(--c-bg));
}

input.form-input::placeholder,
textarea.form-input::placeholder {
    color: rgb(var(--c-fg-subtle));
    opacity: 1;
}

input.form-input:hover,
textarea.form-input:hover,
select.form-input:hover {
    border-color: rgb(var(--c-fg-subtle) / 0.8);
}

input.form-input:focus,
textarea.form-input:focus,
select.form-input:focus {
    outline: none;
    border-color: rgb(var(--c-brand));
    box-shadow: 0 0 0 3px rgb(var(--c-brand) / 0.22);
}

input.form-input:user-invalid,
textarea.form-input:user-invalid {
    border-color: rgb(var(--c-danger));
}

textarea.form-input {
    min-height: 9rem;
    resize: vertical;
}

select.form-input {
    padding-inline-end: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23888'%3E%3Cpath d='M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4Z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.125rem;
    cursor: pointer;
}

[dir="rtl"] select.form-input { background-position: left 0.75rem center; }

select.form-input--compact {
    min-height: 2.75rem;
    padding-block: 0.5rem;
    padding-inline-start: 0.875rem;
    font-size: 0.875rem;
    box-shadow: none;
}

.form-help {
    font-size: var(--text-xs);
    line-height: 1.5;
    color: rgb(var(--c-fg-subtle));
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius-md);
    background-color: rgb(var(--c-surface));
    color: rgb(var(--c-fg));
    font-size: var(--text-sm);
    line-height: 1.5;
}

.alert .material-symbols-outlined { font-size: 1.25rem; }

.alert--success {
    border-color: rgb(var(--c-success) / 0.4);
    background-color: rgb(var(--c-success) / 0.08);
}

.alert--success .material-symbols-outlined { color: rgb(var(--c-success-fg)); }

.alert--error {
    border-color: rgb(var(--c-danger) / 0.4);
    background-color: rgb(var(--c-danger) / 0.08);
}

.alert--error .material-symbols-outlined { color: rgb(var(--c-danger-fg)); }

/* 10. Header, navigation, footer ---------------------------------------- */

.site-header {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 50;
    padding-top: env(safe-area-inset-top, 0px);
    background-color: rgb(var(--c-bg) / 0.82);
    border-bottom: 1px solid rgb(var(--c-line) / 0.8);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
}

.site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: var(--header-h);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    border-radius: var(--radius-sm);
}

.site-logo img {
    height: 2.25rem;
    width: auto;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.site-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding-inline: 0.75rem;
    border-radius: var(--radius-md);
    color: rgb(var(--c-fg-muted));
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}

.site-nav-link:hover {
    color: rgb(var(--c-fg));
    background-color: rgb(var(--c-fg) / 0.05);
}

.site-nav-link[aria-current] {
    color: rgb(var(--c-fg));
}

.site-nav-link[aria-current]::after {
    content: "";
    position: absolute;
    inset-inline: 0.75rem;
    bottom: 0.3125rem;
    height: 2px;
    border-radius: 2px;
    background-color: rgb(var(--c-brand));
}

.mobile-menu-root {
    display: grid;
    grid-template-rows: 0fr;
    pointer-events: none;
    transition: grid-template-rows 0.28s var(--ease-out);
}

.mobile-menu-root[data-open="true"] {
    grid-template-rows: 1fr;
    pointer-events: auto;
}

.mobile-menu-panel {
    max-height: calc(100dvh - var(--header-h) - env(safe-area-inset-top, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    background-color: rgb(var(--c-bg));
    border-bottom: 1px solid rgb(var(--c-line));
    box-shadow: var(--shadow-lg);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 3.25rem;
    padding-inline: var(--gutter);
    border-bottom: 1px solid rgb(var(--c-line));
    color: rgb(var(--c-fg));
    font-family: var(--font-headline);
    font-size: 1.0625rem;
    font-weight: 500;
    text-decoration: none;
}

.mobile-nav-link:focus-visible { outline-offset: -3px; }
.mobile-nav-link[aria-current] { color: rgb(var(--c-brand-fg)); }

.site-footer {
    border-top: 1px solid rgb(var(--c-line));
    background-color: rgb(var(--c-bg));
    padding-top: clamp(3rem, 2.25rem + 3vw, 4.5rem);
    padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
}

.footer-heading {
    margin-bottom: 0.75rem;
    font-family: var(--font-headline);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgb(var(--c-fg));
}

.footer-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    color: rgb(var(--c-fg-muted));
    font-size: var(--text-sm);
    text-decoration: none;
    transition: color var(--dur-fast) var(--ease-out);
}

.footer-link:hover { color: rgb(var(--c-fg)); }

/* 11. Block components -------------------------------------------------- */

/* Home hero & page heroes share a static backdrop: a masked grid and one soft glow. */
.hero,
.page-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.hero {
    padding-block: clamp(4rem, 2.5rem + 7vw, 8.5rem) clamp(3.5rem, 2.5rem + 5vw, 6.5rem);
}

.page-hero {
    padding-block: clamp(3.5rem, 2.5rem + 5vw, 6.5rem) clamp(2.5rem, 2rem + 3vw, 4.5rem);
}

.hero__backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(56rem 28rem at 50% -8%, rgb(var(--c-brand) / 0.17), transparent 70%),
        radial-gradient(36rem 22rem at 92% 12%, rgb(var(--c-cyan) / 0.09), transparent 70%);
}

.hero__backdrop::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgb(var(--c-fg) / 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgb(var(--c-fg) / 0.055) 1px, transparent 1px);
    background-size: 3.5rem 3.5rem;
    background-position: center top;
    -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 0%, #000 25%, transparent 75%);
    mask-image: radial-gradient(ellipse 75% 65% at 50% 0%, #000 25%, transparent 75%);
}

.hero__backdrop--subtle {
    opacity: 0.7;
}

.hero__inner {
    display: grid;
    gap: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
    align-items: center;
}

.hero__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.hero__content > .text-lead { max-width: 40rem; }

.hero--split .hero__content {
    align-items: flex-start;
    text-align: start;
}

@media (min-width: 1024px) {
    .hero--split .hero__inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}

.hero--split .hero__content > .text-display { font-size: clamp(2.5rem, 1.4rem + 3.6vw, 4.25rem); }

.hero__actions { margin-top: 0.75rem; }

.hero__visual { position: relative; }

.hero__visual .media-frame { aspect-ratio: 5 / 4; }

/* Logo wall */
.logo-wall {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.75rem clamp(2rem, 1rem + 4vw, 4rem);
}

.logo-wall__item img {
    display: block;
    height: 2rem;
    width: auto;
    max-width: 8.5rem;
    object-fit: contain;
}

.logo-wall--mono .logo-wall__item img {
    filter: grayscale(1) brightness(0);
    opacity: 0.55;
    transition: opacity var(--dur) var(--ease-out);
}

html.dark .logo-wall--mono .logo-wall__item img {
    filter: grayscale(1) brightness(0) invert(1);
    opacity: 0.6;
}

.logo-wall--mono .logo-wall__item:hover img { opacity: 0.9; }

/* Bento grid (services) */
.bento {
    display: grid;
    gap: clamp(1rem, 0.75rem + 0.8vw, 1.5rem);
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 768px) {
    .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; }
    .bento__cell--wide { grid-column: span 2; }
}

/* Tablet: a standard card that would sit alone on the last row fills it instead. */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .bento > .bento__cell--narrow:last-child:not(.bento__cell--narrow + .bento__cell--narrow) { grid-column: span 2; }
}

@media (min-width: 1024px) {
    .bento { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; }
    .bento__cell--wide { grid-column: span 8; }
    .bento__cell--narrow { grid-column: span 4; }
}

.accent-card {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 18rem;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid rgb(var(--c-line));
    background-color: rgb(12 12 14);
    color: #fff;
}

.accent-card picture,
.accent-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.accent-card img { object-fit: cover; opacity: 0.55; }

.accent-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgb(12 12 14 / 0.92) 10%, rgb(12 12 14 / 0.2) 70%);
}

.accent-card__content {
    position: relative;
    z-index: 1;
    padding: clamp(1.5rem, 1.25rem + 1vw, 2.25rem);
    max-width: 36rem;
}

.accent-card .eyebrow { color: rgb(117 209 255); }

/* Tech marquee: two identical groups, each at least as wide as the viewport, loop seamlessly. */
.marquee {
    --marquee-gap: 0.75rem;
    position: relative;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.marquee__track {
    display: flex;
    gap: var(--marquee-gap);
    width: max-content;
    animation: marquee-x var(--marquee-duration, 45s) linear infinite;
}

.marquee__group {
    display: flex;
    flex-shrink: 0;
    justify-content: space-around;
    gap: var(--marquee-gap);
    min-width: 100vw;
}

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

[dir="rtl"] .marquee__track { animation-name: marquee-x-rtl; }

@keyframes marquee-x { to { translate: calc(-50% - var(--marquee-gap) / 2) 0; } }
@keyframes marquee-x-rtl { to { translate: calc(50% + var(--marquee-gap) / 2) 0; } }

.marquee--static,
.marquee--static .marquee__track,
.marquee--static .marquee__group {
    -webkit-mask-image: none;
    mask-image: none;
}

.marquee--static .marquee__track {
    width: 100%;
    justify-content: center;
    animation: none;
}

.marquee--static .marquee__group {
    flex: 1 1 100%;
    min-width: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.marquee--static .marquee__group[aria-hidden="true"] { display: none; }

.tech-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    min-height: 3rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius-md);
    background-color: rgb(var(--c-surface));
    color: rgb(var(--c-fg-muted));
    font-size: var(--text-sm);
    font-weight: 500;
    white-space: nowrap;
}

.tech-chip img {
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
}

/* Stats */
.stat-grid {
    display: grid;
    gap: 2rem 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
}

.stat {
    padding-inline-start: 1.25rem;
    border-inline-start: 2px solid rgb(var(--c-line-strong));
}

.stat--highlight { border-inline-start-color: rgb(var(--c-brand)); }

.stat__value {
    font-family: var(--font-headline);
    font-size: clamp(2rem, 1.55rem + 1.6vw, 3rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    color: rgb(var(--c-fg));
    font-variant-numeric: tabular-nums;
}

.stat--highlight .stat__value { color: rgb(var(--c-brand-fg)); }

.stat__label {
    margin-top: 0.625rem;
    font-size: var(--text-sm);
    font-weight: 600;
    color: rgb(var(--c-fg));
}

.stat__caption {
    margin-top: 0.375rem;
    font-size: var(--text-sm);
    line-height: 1.55;
    color: rgb(var(--c-fg-muted));
}

/* <dt> label precedes <dd> value in the DOM (reads naturally); the value is shown first. */
.stat--dl {
    display: flex;
    flex-direction: column;
}

.stat--dl dd { margin: 0; }
.stat--dl .stat__value { order: -1; }

.stat--compact .stat__value { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem); }
.stat--compact .stat__label { margin-top: 0.375rem; font-size: var(--text-xs); font-weight: 500; color: rgb(var(--c-fg-muted)); }

/* CTA panel & promo strip */
.cta-panel {
    position: relative;
    isolation: isolate;
    display: grid;
    gap: 2rem;
    align-items: center;
    overflow: hidden;
    padding: clamp(2rem, 1.25rem + 3.5vw, 4rem);
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius-xl);
    background-color: rgb(var(--c-surface));
    box-shadow: var(--shadow-md);
}

.cta-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(42rem 22rem at 0% 0%, rgb(var(--c-brand) / 0.15), transparent 70%),
        radial-gradient(32rem 20rem at 100% 100%, rgb(var(--c-cyan) / 0.09), transparent 70%);
}

.cta-panel__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    max-width: 40rem;
}

.cta-panel__side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cta-panel__note {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--text-sm);
    color: rgb(var(--c-fg-muted));
}

.cta-panel__note .material-symbols-outlined {
    font-size: 1.125rem;
    color: rgb(var(--c-brand-fg));
}

@media (min-width: 1024px) {
    .cta-panel { grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; }
    .cta-panel__side { align-items: flex-end; }
    .cta-panel__side .btn-group { justify-content: flex-end; }
}

.promo {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: clamp(1.5rem, 1.25rem + 1.5vw, 2.5rem);
}

@media (min-width: 768px) {
    .promo { flex-direction: row; align-items: center; }
}

.promo__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.5rem;
}

/* Overlay note on imagery (about mission) */
.overlay-note {
    position: absolute;
    inset-inline: 1rem;
    bottom: 1rem;
    z-index: 1;
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
    padding: 1rem 1.125rem;
    border: 1px solid rgb(var(--c-line));
    border-radius: var(--radius-lg);
    background-color: rgb(var(--c-surface) / 0.9);
    box-shadow: var(--shadow-md);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

@media (min-width: 640px) {
    .overlay-note { inset-inline: 1.5rem auto; bottom: 1.5rem; max-width: 22rem; }
}

.media-label {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1rem;
    z-index: 1;
}

/* Testimonials */
.testimonial {
    margin: 0;
}

.testimonial__quote {
    position: relative;
    color: rgb(var(--c-fg));
    font-size: 1.0625rem;
    line-height: 1.65;
    text-wrap: pretty;
}

.testimonial__mark {
    display: block;
    height: 1.75rem;
    margin-bottom: 0.25rem;
    color: rgb(var(--c-brand));
    font-family: Georgia, "Times New Roman", serif;
    font-size: 3rem;
    line-height: 1;
}

.testimonial__author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1.5rem;
}

.testimonial__name {
    font-weight: 600;
    font-size: var(--text-sm);
    color: rgb(var(--c-fg));
}

.testimonial__role {
    font-size: var(--text-xs);
    color: rgb(var(--c-fg-muted));
}

.testimonial--featured .testimonial__quote {
    font-family: var(--font-headline);
    font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.015em;
}

/* Process steps */
.steps {
    display: grid;
    gap: clamp(1rem, 0.75rem + 0.8vw, 1.5rem);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    counter-reset: step;
}

.step {
    position: relative;
    padding-top: 1.25rem;
    border-top: 2px solid rgb(var(--c-line-strong));
    counter-increment: step;
}

.step::before {
    content: counter(step, decimal-leading-zero);
    display: block;
    margin-bottom: 0.75rem;
    font-family: var(--font-headline);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    color: rgb(var(--c-brand-fg));
}

.step:first-child { border-top-color: rgb(var(--c-brand)); }

.step__meta {
    margin-top: 0.75rem;
    font-size: var(--text-xs);
    font-weight: 500;
    color: rgb(var(--c-fg-subtle));
}

/* FAQ (native disclosure; no JavaScript) */
.faq {
    border-top: 1px solid rgb(var(--c-line));
}

.faq__item {
    border-bottom: 1px solid rgb(var(--c-line));
}

.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3.5rem;
    padding-block: 1.125rem;
    color: rgb(var(--c-fg));
    font-family: var(--font-headline);
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.4;
    list-style: none;
    cursor: pointer;
}

.faq__question::-webkit-details-marker { display: none; }
.faq__question:focus-visible { outline-offset: 2px; border-radius: var(--radius-sm); }
.faq__question:hover { color: rgb(var(--c-brand-fg)); }

.faq__icon {
    font-size: 1.25rem;
    color: rgb(var(--c-fg-muted));
    transition: rotate var(--dur) var(--ease-out);
}

.faq__item[open] .faq__icon {
    rotate: 45deg;
    color: rgb(var(--c-brand-fg));
}

.faq__answer {
    max-width: 65ch;
    padding-bottom: 1.5rem;
}

/* Definition list (case study "at a glance") */
.facts {
    display: grid;
    gap: 1rem;
}

.facts__row {
    display: grid;
    gap: 0.125rem;
}

.facts dt {
    font-size: var(--text-xs);
    font-weight: 500;
    color: rgb(var(--c-fg-subtle));
}

.facts dd {
    margin: 0;
    font-weight: 600;
    color: rgb(var(--c-fg));
}

/* Contact details */
.contact-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.contact-item__label {
    margin-bottom: 0.25rem;
    font-family: var(--font-headline);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgb(var(--c-fg-subtle));
}

.contact-item__value {
    color: rgb(var(--c-fg));
    font-size: 1.0625rem;
    overflow-wrap: anywhere;
}

a.contact-item__value {
    text-decoration: underline;
    text-decoration-color: rgb(var(--c-brand) / 0.45);
    text-underline-offset: 0.2em;
}

a.contact-item__value:hover { color: rgb(var(--c-brand-fg)); }

/* Gallery carousel */
.gallery__viewport {
    display: flex;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    border-radius: var(--radius-xl);
    border: 1px solid rgb(var(--c-line));
    background-color: rgb(var(--c-surface-2) / 0.6);
}

.gallery__viewport::-webkit-scrollbar { display: none; }
.gallery__viewport:focus-visible { outline-offset: 4px; }

@media (prefers-reduced-motion: no-preference) {
    .gallery__viewport { scroll-behavior: smooth; }
}

.gallery__slide {
    flex: 0 0 100%;
    min-width: 0;
    margin: 0;
    padding: clamp(1rem, 0.5rem + 3vw, 3rem);
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.device-frame {
    max-width: 60rem;
    margin-inline: auto;
    overflow: hidden;
    border: 1px solid rgb(var(--c-line-strong));
    border-radius: var(--radius-lg);
    background-color: rgb(var(--c-surface));
    box-shadow: var(--shadow-lg);
}

.device-frame__bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid rgb(var(--c-line));
    background-color: rgb(var(--c-surface-2));
}

.device-frame__dots {
    display: flex;
    gap: 0.375rem;
}

.device-frame__dots span {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background-color: rgb(var(--c-line-strong));
}

.device-frame__title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: rgb(var(--c-fg-muted));
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.device-frame__screen {
    position: relative;
    aspect-ratio: 16 / 10;
    background-color: rgb(var(--c-surface-2));
}

.device-frame__screen--wide { aspect-ratio: 21 / 9; }

.device-frame__screen picture,
.device-frame__screen img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.device-frame__screen img { object-fit: contain; object-position: top; }

.gallery__caption {
    max-width: 60rem;
    margin: 0.875rem auto 0;
    color: rgb(var(--c-fg-muted));
    font-size: var(--text-sm);
    text-align: center;
}

.gallery__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.gallery__dots {
    display: flex;
    align-items: center;
}

.gallery__dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--radius-full);
    cursor: pointer;
}

.gallery__dot::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: var(--radius-full);
    background-color: rgb(var(--c-line-strong));
    transition: width var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}

.gallery__dot[aria-current="true"]::before {
    width: 1.25rem;
    background-color: rgb(var(--c-brand));
}

/* Newsletter */
.inline-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 30rem;
}

@media (min-width: 640px) {
    .inline-form { flex-direction: row; }
    .inline-form input.form-input { flex: 1; }
}

/* Reading progress (blog posts): CSS scroll timeline, hidden where unsupported. */
.read-progress-bar {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 60;
    height: 3px;
    transform-origin: 0 50%;
    scale: 0 1;
    background-color: rgb(var(--c-brand));
    pointer-events: none;
}

[dir="rtl"] .read-progress-bar { transform-origin: 100% 50%; }

@supports (animation-timeline: scroll()) {
    @media (prefers-reduced-motion: no-preference) {
        .read-progress-bar {
            animation: read-progress linear both;
            animation-timeline: scroll(root);
        }
    }
}

@supports not (animation-timeline: scroll()) {
    .read-progress-bar { display: none; }
}

@keyframes read-progress { to { scale: 1 1; } }

/* 12. Article prose & rich text ---------------------------------------- */

.rich-text > * + * { margin-top: 0.875em; }

/* Editors' rich text often begins with an empty paragraph; hide it and its spacing. */
.rich-text p:empty,
.prose-article p:empty { display: none; }
.rich-text > p:empty:first-child + *,
.prose-article > p:empty:first-child + * { margin-top: 0; }

.rich-text a,
.prose-article a {
    color: rgb(var(--c-brand-fg));
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
}

.rich-text a:hover,
.prose-article a:hover { text-decoration-thickness: 2px; }

.rich-text b,
.rich-text strong { color: rgb(var(--c-fg)); font-weight: 600; }

.prose-article {
    color: rgb(var(--c-fg) / 0.84);
    font-size: 1.0625rem;
    line-height: 1.75;
    overflow-wrap: break-word;
}

.prose-article > * + * { margin-top: 1.25em; }

.prose-article h2,
.prose-article h3 {
    color: rgb(var(--c-fg));
    font-family: var(--font-headline);
    font-weight: 700;
    text-wrap: balance;
    scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

.prose-article h2 {
    margin-top: 2.25em;
    font-size: clamp(1.5rem, 1.25rem + 0.9vw, 1.875rem);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.prose-article h3 {
    margin-top: 1.8em;
    font-size: 1.25rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
    font-weight: 600;
}

.prose-article h2 + *,
.prose-article h3 + * { margin-top: 0.75em; }

.prose-article b,
.prose-article strong { color: rgb(var(--c-fg)); font-weight: 600; }

.prose-article ul,
.prose-article ol { padding-inline-start: 1.375em; }
.prose-article ul { list-style: disc; }
.prose-article ol { list-style: decimal; }
.prose-article li + li { margin-top: 0.5em; }
.prose-article li::marker { color: rgb(var(--c-brand-fg)); }

.prose-article blockquote {
    margin-block: 2em;
    padding-block: 0.25em;
    padding-inline-start: 1.25em;
    border-inline-start: 3px solid rgb(var(--c-brand));
    color: rgb(var(--c-fg));
    font-size: 1.1875rem;
    line-height: 1.6;
}

.prose-article code {
    padding: 0.125em 0.375em;
    border-radius: var(--radius-sm);
    background-color: rgb(var(--c-surface-2));
    font-family: var(--font-mono);
    font-size: 0.875em;
}

.prose-article img {
    border-radius: var(--radius-lg);
}

/* 13. Motion ------------------------------------------------------------ */

/* Progressive reveal: content is visible without JavaScript. site.js marks
   on-screen elements visible first, then enables hiding for the rest. */
.reveal-ready .reveal:not(.is-visible) {
    opacity: 0;
    translate: 0 1.25rem;
}

.reveal-ready .reveal {
    transition: opacity 0.6s var(--ease-out), translate 0.6s var(--ease-out);
}

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

    .reveal-ready .reveal:not(.is-visible) {
        opacity: 1;
        translate: none;
    }

    /* The marquee becomes a static, wrapped list. */
    .marquee,
    .marquee__track,
    .marquee__group {
        -webkit-mask-image: none;
        mask-image: none;
    }

    .marquee__track {
        width: 100%;
        padding-inline: var(--gutter);
        justify-content: center;
        animation: none !important;
    }

    .marquee__group {
        flex: 1 1 100%;
        min-width: 0;
        flex-wrap: wrap;
        justify-content: center;
    }

    .marquee__group[aria-hidden="true"] { display: none; }
    .read-progress-bar { display: none; }
}
