/* ==========================================================================
   SafeTec — "Void" theme
   --------------------------------------------------------------------------
   Visual layer based on the Refero DESIGN.md for the Dala style
   (styles.refero.design/style/e5f5f8cf-e68d-4ed1-bbf5-6b67569af648):
   pure black canvas, one violet action colour, amber labels, huge
   weight-400 headlines with tight tracking, ultra-light (200) body copy,
   no cards, no shadows, outlined-triangle particles.

   Loaded AFTER styles.css and only overrides how things look. It does not
   rename or remove any class, id or text, so script.js, mobile.js,
   translations.js and three-scene.js keep working unchanged.
   To roll back the look, remove the <link> to this file (and the
   constellation.js <script>) from index.html.
   ========================================================================== */

:root {
    /* DESIGN.md tokens */
    --color-void: #000000;
    --color-bone-white: #ffffff;
    --color-ash-gray: #9a9a9a;
    --color-silver-mist: #bdbdbd;
    --color-electric-iris: #8052ff;
    --color-electric-iris-hover: #9370ff;
    --color-saffron-spark: #ffb829;
    --color-deep-verdant: #15846e;
    --hairline: rgba(255, 255, 255, 0.14);
    --hairline-strong: rgba(255, 255, 255, 0.28);

    /* PPNeueMontreal is a commercial face; DESIGN.md names Inter as the substitute */
    --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --text-caption: 12px;
    --text-nav-label: 14px;
    --text-body: 18px;
    --text-heading-2xs: 24px;
    --text-heading-xs: 27px;
    --text-display: clamp(42px, calc(10px + 5.4vw), 96px);
    --text-heading-lg: clamp(40px, calc(16px + 4.2vw), 78px);
    --text-heading: clamp(34px, calc(18px + 2.2vw), 48px);
    --tracking-display: -0.04em;
    --tracking-label: 0.06em;

    --radius-card: 24px;
    --radius-button: 24px;
    --radius-pill: 9999px;

    /* Re-point the legacy tokens of styles.css at the new palette, so every
       existing rule that reads them follows the theme. */
    --primary-color: var(--color-electric-iris);
    --primary-dark: #6a3cf0;
    --secondary-color: var(--color-bone-white);
    --accent-color: var(--color-electric-iris);
    --accent-2: var(--color-saffron-spark);
    --text-color: var(--color-bone-white);
    --text-light: var(--color-silver-mist);
    --bg-light: var(--color-void);
    --bg-dark: var(--color-void);
    --gradient-1: linear-gradient(var(--color-void), var(--color-void));
    --gradient-bg: linear-gradient(var(--color-electric-iris), var(--color-electric-iris));
    --gradient-text: linear-gradient(var(--color-bone-white), var(--color-bone-white));
    --glass-bg: transparent;
    --glass-border: var(--hairline);
    /* "Elevation: none" */
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
    --shadow-xl: none;
    --shadow-glow: none;
    --ds-3d-glow-lg: none;
    --3d-elevation-xs: none;
    --3d-elevation-sm: none;
    --3d-elevation-md: none;
    --3d-elevation-lg: none;
    --3d-glow-indigo: none;
    --3d-glow-cyan: none;

    color-scheme: dark;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
/* Only <body> gets the colour: it propagates to the page canvas, which keeps
   the fixed constellation canvas (z-index: -1) visible above it. */
body {
    background-color: var(--color-void);
    color: var(--color-bone-white);
    font-family: var(--font-sans);
    font-feature-settings: "ss01" on;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    display: none;
}

::selection {
    background: var(--color-electric-iris);
    color: var(--color-bone-white);
}

a:focus-visible,
button:focus-visible,
.language-toggle:focus-visible,
.language-option:focus-visible,
.cookie-banner__button:focus-visible {
    outline: 2px solid var(--color-electric-iris);
    outline-offset: 3px;
}

.container {
    max-width: 1280px;
}

/* Fixed particle canvas drawn by constellation.js */
.constellation {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* The mouse-follow glow from script.js is styled inline; recolour it */
.cursor-glow {
    background: radial-gradient(circle, rgba(128, 82, 255, 0.09) 0%, transparent 70%) !important;
}

/* Section surfaces: everything floats on the black void */
.about,
.services,
.products,
.contact,
.footer {
    background: transparent;
}

.about::before,
.services::before,
.hero::before {
    display: none;
}

/* --------------------------------------------------------------------------
   Typography roles
   -------------------------------------------------------------------------- */
.hero__title,
.section__title,
.contact__title,
.product__title,
.stat__number,
.nav__logo-text,
.footer__logo-text {
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    /* literal white: some older WebViews reject currentColor here and would
       keep styles.css's transparent fill, hiding the logo entirely */
    -webkit-text-fill-color: #ffffff;
    color: var(--color-bone-white);
    animation: none;
    font-weight: 400;
}

.section__title {
    font-size: var(--text-heading-lg);
    line-height: 1.04;
    letter-spacing: var(--tracking-display);
    text-align: start;
    margin-bottom: 1.5rem;
}

.section__subtitle {
    font-size: 16px;
    font-size: clamp(16px, calc(14px + 0.3vw), var(--text-body));
    font-weight: 200;
    line-height: 1.5;
    color: var(--color-silver-mist);
    text-align: start;
    margin-left: 0;
    margin-right: 0;
    margin-inline: 0;
    max-width: 34rem;
}

/* Amber label above a headline block (new element, reuses translated nav text) */
.section__eyebrow,
.contact__eyebrow {
    display: block;
    margin-bottom: 18px;
    color: var(--color-saffron-spark);
    font-size: var(--text-caption);
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Header & navigation
   -------------------------------------------------------------------------- */
.header {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 0;
}

.header::before {
    display: none;
}

.header.scrolled {
    background: rgba(0, 0, 0, 0.78);
    box-shadow: none;
}

/* Blur only on desktop: on mobile a backdrop-filter on .header would become
   the containing block of the fixed menu button and full-screen menu. */
@media (min-width: 969px) {
    .header.scrolled {
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
}

.nav__logo-text {
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.nav__logo-text:hover {
    transform: none;
}

.nav__logo-text::after {
    display: none;
}

.nav__menu {
    gap: 0.75rem;
    gap: clamp(0.75rem, 2.2vw, 2rem);
}

.nav__link {
    color: var(--color-ash-gray);
    font-size: var(--text-nav-label);
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    background: none;
    border-radius: 0;
    padding: 0.75rem 0.25rem;
}

.nav__link::before {
    display: none;
}

.nav__link:hover,
.nav__link.active {
    color: var(--color-bone-white);
    background: none;
    transform: none;
}

.language-toggle {
    color: var(--color-bone-white);
    background: transparent;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius-pill);
    font-size: var(--text-nav-label);
    font-weight: 600;
    letter-spacing: 0.025em;
}

.language-toggle:hover,
.language-toggle:focus-visible,
.language-toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--color-bone-white);
    box-shadow: none;
}

.language-menu {
    background: var(--color-void);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-card);
    box-shadow: none;
    scrollbar-color: var(--color-electric-iris) transparent;
}

.language-menu::-webkit-scrollbar-thumb {
    background: var(--color-electric-iris);
    background-clip: padding-box;
}

.language-option {
    color: var(--color-silver-mist);
    border-radius: 18px;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--color-bone-white);
}

.language-option[aria-selected="true"] {
    background: rgba(128, 82, 255, 0.18);
    color: var(--color-bone-white);
}

.language-option[aria-selected="true"]::after {
    color: var(--color-electric-iris);
}

.nav__toggle {
    background: transparent;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius-button);
}

.nav__toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--color-bone-white);
    transform: none;
}

.nav__toggle span {
    background: var(--color-bone-white);
}

@media (max-width: 968px) {
    /* styles.css forces a white bar here with !important */
    .header:not(.menu-open) {
        background: rgba(0, 0, 0, 0.86) !important;
        box-shadow: none !important;
    }

    .nav__menu {
        background: rgba(0, 0, 0, 0.97);
    }

    .nav__link {
        font-size: var(--text-heading-2xs);
        font-weight: 400;
        letter-spacing: -0.02em;
        text-transform: none;
        color: var(--color-bone-white);
        background: none;
        border: 0;
        border-bottom: 1px solid var(--hairline);
        border-radius: 0;
        padding: 1rem 0.5rem;
    }

    .nav__link:hover,
    .nav__link:active {
        background: none;
        color: var(--color-saffron-spark);
        border-color: var(--hairline);
        box-shadow: none;
        transform: none;
    }

    .nav__toggle {
        background: rgba(0, 0, 0, 0.6);
    }

    .language-toggle {
        background: rgba(0, 0, 0, 0.6);
    }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
/* overflow: clip (not hidden) so focus/scrollIntoView can never scroll the
   hero sideways — its decorative children overflow it to the right. */
@supports (overflow: clip) {
    .hero {
        overflow: clip;
    }

    /* The right column now touches the container edge, so the 100px
       pre-reveal offset of .scroll-reveal-right would widen the page. */
    .about,
    .services,
    .products,
    .contact {
        overflow-x: clip;
    }
}

@media (min-width: 969px) {
    .hero__container {
        grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    }
}

.hero__title {
    font-size: var(--text-display);
    line-height: 1;
    letter-spacing: var(--tracking-display);
    margin-bottom: 30px;
}

.hero__subtitle {
    font-size: 16px;
    font-size: clamp(16px, calc(14px + 0.3vw), var(--text-body));
    font-weight: 200;
    line-height: 1.5;
    color: var(--color-silver-mist);
    max-width: 32rem;
    margin-bottom: 36px;
}

@media (max-width: 968px) {
    .hero__container {
        text-align: start;
    }

    .hero__cta {
        justify-content: flex-start;
    }
}

/* Ambient triangles generated by script.js (.particle) */
.particle {
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 2.5 18 16.5H2Z' fill='none' stroke='%23ffb829' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    border-radius: 0;
    animation-name: themeTriangleDrift;
}

.particle:nth-child(5n + 2) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 2.5 18 16.5H2Z' fill='none' stroke='%238052ff' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.particle:nth-child(5n + 3) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 2.5 18 16.5H2Z' fill='none' stroke='%2315846e' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.particle:nth-child(5n + 4) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 2.5 18 16.5H2Z' fill='none' stroke='%23ffffff' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.particle:nth-child(5n + 5) {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 2.5 18 16.5H2Z' fill='none' stroke='%23c86bff' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E");
}

@keyframes themeTriangleDrift {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.35;
    }
    50% {
        transform: translate(70px, -90px) rotate(150deg);
        opacity: 0.85;
    }
}

/* Buttons: one filled violet pill for the primary action */
.btn {
    border-radius: var(--radius-button);
    font-size: var(--text-nav-label);
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    padding-left: 22px;
    padding-right: 22px;
    padding-inline: 22px;
}

.btn::before {
    display: none;
}

.btn--primary {
    background: var(--color-electric-iris);
    color: var(--color-bone-white);
    box-shadow: none;
    animation: none;
}

.btn--primary:hover {
    background: var(--color-electric-iris-hover);
    box-shadow: none;
}

.btn--secondary {
    background: transparent;
    color: var(--color-bone-white);
    border: 1px solid var(--hairline-strong);
}

.btn--secondary:hover {
    background: transparent;
    color: var(--color-bone-white);
    border-color: var(--color-bone-white);
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   Hero 3D viewer — floats on the void instead of sitting in a glass box
   -------------------------------------------------------------------------- */
.hero__mode-switch {
    background: transparent;
    border: 1px solid var(--hairline);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 4px;
}

.hero__mode-switch .mode-switch-btn {
    color: var(--color-ash-gray);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
}

.hero__mode-switch .mode-switch-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-bone-white);
    border-color: transparent;
    transform: none;
}

.hero__mode-switch .mode-switch-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-bone-white);
    border-color: transparent;
    box-shadow: none;
    text-shadow: none;
}

@media (max-width: 767px) {
    /* uppercase + tracking would wrap the two tabs onto two lines */
    .hero__mode-switch .mode-switch-btn {
        font-size: 13px;
        letter-spacing: 0;
        text-transform: none;
    }
}

.mode-switch-btn.active .mode-icon {
    color: var(--color-electric-iris);
    filter: none;
}

.hero__3d-stage {
    /* a faint violet wash keeps the dark 3D models readable on the void */
    background:
        radial-gradient(ellipse 38% 34% at 50% 52%, rgba(128, 82, 255, 0.16) 0%, rgba(128, 82, 255, 0) 100%),
        radial-gradient(ellipse 60% 54% at 50% 52%, rgba(0, 0, 0, 0.94) 0%, rgba(0, 0, 0, 0.75) 58%, rgba(0, 0, 0, 0) 84%);
    border: 0;
    border-radius: var(--radius-card);
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.hero__3d-stage::before,
.hero__3d-stage::after {
    display: none;
}

.hero__3d-hud--top,
.hero__3d-hud--bottom {
    background: transparent;
    border: 0;
}

.hero__3d-ambient-glow {
    background: radial-gradient(ellipse 45% 40% at 50% 50%, rgba(128, 82, 255, 0.1) 0%, transparent 70%);
}

.hero__3d-models-pill {
    background: transparent;
    border: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.hero__3d-models-pill .model-pill-btn {
    background: transparent;
    border: 1px solid var(--hairline);
    color: var(--color-ash-gray);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
}

.hero__3d-models-pill .model-pill-btn:hover {
    background: transparent;
    color: var(--color-bone-white);
    border-color: var(--hairline-strong);
    transform: none;
}

.hero__3d-models-pill .model-pill-btn.active {
    background: transparent;
    color: var(--color-bone-white);
    border-color: var(--color-electric-iris);
    box-shadow: none;
}

.model-pill-indicator {
    background: rgba(255, 255, 255, 0.25);
}

.model-pill-btn.active .model-pill-indicator {
    background: var(--color-electric-iris);
    box-shadow: none;
}

.hero__3d-status {
    color: var(--color-ash-gray);
    font-family: inherit;
    background: transparent;
    border: 0;
}

.status-pulse--cyan,
.status-pulse--green {
    background: var(--color-saffron-spark);
    box-shadow: none;
}

.hero__3d-tools .tool-btn {
    background: transparent;
    border: 1px solid var(--hairline);
    border-radius: var(--radius-pill);
    color: var(--color-silver-mist);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
}

.hero__3d-tools .tool-btn:hover {
    background: transparent;
    color: var(--color-bone-white);
    border-color: var(--hairline-strong);
    transform: none;
}

.hero__3d-tools .tool-btn.active {
    background: transparent;
    color: var(--color-saffron-spark);
    border-color: rgba(255, 184, 41, 0.5);
    box-shadow: none;
}

/* "Arraste para orbitar • Scroll para zoom"
   styles.css pins this hint with a fixed `bottom: 48px` (74px on phones), but
   the bottom HUD has a different height at every breakpoint, so the text
   landed on the tool buttons / status line. Instead it now sits in the flex
   column right above the HUD, with zero height (the canvas keeps exactly the
   same size) and its text hanging upward over the bottom of the canvas. */
.hero__3d-hud--bottom {
    order: 1;
}

.hero__3d-hint {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    flex: none;
    height: 0;
    min-height: 0;
    padding: 0 12px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: visible;
    white-space: normal;
    color: var(--color-ash-gray);
    font-family: inherit;
    text-shadow: none;
    opacity: 0.75;
}

.hero__3d-hint span {
    display: block;
    max-width: 100%;
    margin-bottom: 10px;
    text-align: center;
    text-wrap: balance;
}

/* Hero "cards" mode */
.hero__card,
.hero__card--1,
.hero__card--2,
.hero__card--3 {
    background: var(--color-void);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-card);
    box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
    .hero__card:hover,
    .hero__card.is-active {
        box-shadow: none;
        border-color: rgba(255, 255, 255, 0.5);
    }
}

.hero__card-header {
    background: transparent;
    border-bottom: 1px solid var(--hairline);
}

.dot--red,
.dot--yellow,
.dot--green {
    box-shadow: none;
}

.dot--red {
    background-color: var(--color-electric-iris);
}

.dot--yellow {
    background-color: var(--color-saffron-spark);
}

.dot--green {
    background-color: var(--color-deep-verdant);
}

.hero__card-tag {
    color: var(--color-ash-gray);
}

.card-status-badge,
.card-info-bottom,
.metric-pill,
.game-progress-box,
.game-hud-footer,
.card-route-display,
.code-terminal {
    background: transparent;
    border: 1px solid var(--hairline);
}

.card-status-badge--system {
    color: var(--color-silver-mist);
    border-color: rgba(21, 132, 110, 0.6);
}

.route-icon-box,
.game-hud-icon {
    background: transparent;
    border: 1px solid rgba(128, 82, 255, 0.55);
    color: var(--color-electric-iris);
}

.route-target-box {
    background: transparent;
    border: 1px solid rgba(255, 184, 41, 0.5);
    color: var(--color-saffron-spark);
}

.route-path-line,
.game-progress-fill {
    background: var(--color-electric-iris);
    box-shadow: none;
}

.route-path-dot {
    background: var(--color-saffron-spark);
    box-shadow: none;
}

.card-info-meta,
.metric-pill-label,
.game-progress-labels,
.game-hud-footer {
    color: var(--color-ash-gray);
}

.token-kw {
    color: var(--color-saffron-spark);
}

.token-var {
    color: var(--color-bone-white);
}

.token-fn,
.token-bool,
.metric-pill-val {
    color: #a78bff;
}

.hud-pill--lvl {
    background: transparent;
    color: var(--color-saffron-spark);
    border-color: rgba(255, 184, 41, 0.45);
}

.hud-pill--fps {
    background: transparent;
    color: #a78bff;
    border-color: rgba(128, 82, 255, 0.55);
}

.hero__visual-hint {
    color: var(--color-ash-gray);
}

.visual-dot {
    background: rgba(255, 255, 255, 0.22);
}

.visual-dot.active {
    background: var(--color-electric-iris);
    box-shadow: none;
}

/* --------------------------------------------------------------------------
   Cards → floating blocks (no containers, no tilt)
   -------------------------------------------------------------------------- */
/* script.js tilts .service/.product on mousemove through inline styles. Those
   blocks are now full-width text compositions, where the tilt would reach
   ~60deg, so it is neutralised once they have been revealed. */
.service.visible,
.product.visible {
    transform: none !important;
}

.service,
.product {
    transform-style: flat;
    perspective: none;
}

/* --------------------------------------------------------------------------
   About — two-column asymmetric block
   -------------------------------------------------------------------------- */
.about__content {
    max-width: none;
    text-align: start;
}

.about__text {
    font-size: 16px;
    font-size: clamp(16px, calc(14px + 0.3vw), var(--text-body));
    font-weight: 200;
    line-height: 1.5;
    color: var(--color-bone-white);
}

.about__text + .about__text {
    color: var(--color-silver-mist);
}

@media (min-width: 969px) {
    .about__content {
        display: grid;
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        column-gap: 3rem;
        column-gap: clamp(3rem, 7vw, 7.5rem);
        align-items: start;
    }

    .about__content > .section__title {
        grid-column: 1;
        grid-row: 1 / span 5;
        margin-bottom: 0;
    }

    .about__content > .section__eyebrow,
    .about__content > .about__text,
    .about__content > .about__stats {
        grid-column: 2;
    }
}

.about__stats {
    justify-content: flex-start;
    margin-top: 2.5rem;
}

.stat {
    text-align: start;
}

.stat::after {
    background: var(--hairline);
}

.stat__number {
    font-size: 48px;
    font-size: clamp(48px, calc(20px + 3.6vw), 78px);
    letter-spacing: var(--tracking-display);
    line-height: 1;
}

.stat__symbol {
    color: var(--color-saffron-spark);
    font-size: 0.6em;
    font-weight: 400;
    margin-left: 0;
    margin-left: 0.08em;
    margin-inline-start: 0.08em;
    letter-spacing: 0;
    text-shadow: none;
}

.stat__label {
    color: var(--color-ash-gray);
    font-size: var(--text-caption);
    font-weight: 600;
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Services & Products headers — title left, supporting copy right
   -------------------------------------------------------------------------- */
@media (min-width: 969px) {
    .services > .container,
    .products > .container {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
        column-gap: 3rem;
        column-gap: clamp(3rem, 7vw, 7.5rem);
    }

    .services .section__eyebrow,
    .products .section__eyebrow {
        grid-column: 1 / -1;
    }

    .services .section__title,
    .products .section__title {
        grid-column: 1;
        margin-bottom: 0;
    }

    .services .section__subtitle,
    .products .section__subtitle {
        grid-column: 2;
        align-self: end;
        margin-bottom: 0.6rem;
    }

    .services__grid,
    .products__card {
        grid-column: 1 / -1;
        margin-top: 3.5rem;
        margin-top: clamp(3.5rem, 6vw, 6rem);
    }
}

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */
.services__grid {
    gap: 2.5rem 2rem;
    gap: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 4vw, 3.5rem);
}

.service {
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 0;
    border-top: 1px solid var(--hairline);
    border-radius: 0;
    box-shadow: none;
    padding: 30px 0 0;
    overflow: visible;
}

.service::before {
    display: none;
}

.service:hover {
    box-shadow: none;
    border-color: var(--color-electric-iris);
}

.services .service__icon {
    width: auto;
    inline-size: auto;
    height: auto;
    block-size: auto;
    width: auto;
    height: auto;
    justify-content: flex-start;
    background: none;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 24px;
}

.services .service__icon svg {
    width: 32px;
    inline-size: 32px;
    width: 32px;
    height: 32px;
    color: var(--color-electric-iris);
    stroke-width: 1.5;
}

.service__title {
    font-size: var(--text-heading-xs);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-bone-white);
}

.service__description {
    font-size: 16px;
    font-size: clamp(16px, calc(14px + 0.25vw), 17px);
    font-weight: 200;
    line-height: 1.55;
    color: var(--color-silver-mist);
}

@media (max-width: 480px) {
    .service {
        padding: 24px 0 0;
    }
}

/* --------------------------------------------------------------------------
   Products — zigzag rows (visual / text alternate sides)
   -------------------------------------------------------------------------- */
.products__card.products__card--four-products {
    grid-template-columns: minmax(0, 1fr);
    gap: 4rem;
    gap: clamp(4rem, 9vw, 7.5rem);
    max-width: none;
}

.product {
    --product-accent: var(--color-electric-iris);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    column-gap: 2rem;
    column-gap: clamp(2rem, 6vw, 6rem);
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    height: auto;
}

.product:nth-child(2) {
    --product-accent: var(--color-deep-verdant);
}

.product:nth-child(3) {
    --product-accent: var(--color-saffron-spark);
}

.product:nth-child(even) > .product__image {
    order: 2;
}

.product:hover {
    box-shadow: none;
}

.product__image,
.product--deflatoken .product__image {
    background: transparent;
    padding: 0;
    min-height: 220px;
    min-height: clamp(220px, 26vw, 340px);
    border-radius: var(--radius-card);
}

/* The old shimmer layer becomes a scatter of outlined triangles in the
   product's accent colour (an SVG mask over a flat fill). */
.product__image::before {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--product-accent);
    --scatter: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 360' fill='none' stroke='%23fff' stroke-linejoin='round'%3E%3Cpath d='M385.2 139.6L409.0 153.8L384.9 167.3ZM385.2 139.6L397.0 160.5' stroke-opacity='0.35' stroke-width='1.6'/%3E%3Cpath d='M287.4 65.3L295.5 49.9L304.7 64.6ZM287.4 65.3L300.1 57.3' stroke-opacity='0.65' stroke-width='1.6'/%3E%3Cpath d='M424.7 153.8L433.4 153.4L429.4 161.1Z' stroke-opacity='0.8' stroke-width='1.2'/%3E%3Cpath d='M74.1 162.7L80.3 165.8L74.5 169.7Z' stroke-opacity='0.65' stroke-width='1.2'/%3E%3Cpath d='M72.6 200.4L68.5 197.1L73.4 195.2Z' stroke-opacity='0.65' stroke-width='1.2'/%3E%3Cpath d='M92.9 197.2L72.2 178.7L98.6 170.1ZM92.9 197.2L85.4 174.4' stroke-opacity='0.35' stroke-width='1.6'/%3E%3Cpath d='M433.9 157.5L428.3 168.3L421.8 158.0Z' stroke-opacity='0.65' stroke-width='1.2'/%3E%3Cpath d='M470.6 174.9L467.7 166.7L476.2 168.3Z' stroke-opacity='0.5' stroke-width='1.2'/%3E%3Cpath d='M322.0 16.9L308.4 14.2L317.5 3.8ZM322.0 16.9L313.0 9.0' stroke-opacity='0.65' stroke-width='1.2'/%3E%3Cpath d='M82.2 189.2L71.4 198.0L69.2 184.3ZM82.2 189.2L70.3 191.1' stroke-opacity='0.5' stroke-width='1.2'/%3E%3Cpath d='M316.7 30.8L322.2 37.5L313.7 38.9Z' stroke-opacity='0.35' stroke-width='1.2'/%3E%3Cpath d='M245.2 96.9L234.9 98.0L239.1 88.5Z' stroke-opacity='0.8' stroke-width='1.2'/%3E%3Cpath d='M340.3 9.0L355.9 32.0L328.2 34.0ZM340.3 9.0L342.0 33.0' stroke-opacity='0.5' stroke-width='1.6'/%3E%3Cpath d='M347.8 129.9L352.6 137.1L344.0 137.7Z' stroke-opacity='0.8' stroke-width='1.2'/%3E%3Cpath d='M358.0 158.6L374.8 180.7L347.3 184.2ZM358.0 158.6L361.0 182.4' stroke-opacity='0.8' stroke-width='1.6'/%3E%3Cpath d='M1.1 214.7L22.6 207.9L17.7 229.9ZM1.1 214.7L20.2 218.9' stroke-opacity='0.65' stroke-width='1.6'/%3E%3Cpath d='M385.1 68.5L391.5 74.3L383.3 77.0Z' stroke-opacity='0.65' stroke-width='1.2'/%3E%3Cpath d='M359.4 197.9L361.6 202.7L356.4 202.2Z' stroke-opacity='1' stroke-width='1.2'/%3E%3Cpath d='M280.6 99.2L289.0 78.3L302.9 96.0ZM280.6 99.2L296.0 87.2' stroke-opacity='0.65' stroke-width='1.6'/%3E%3Cpath d='M277.4 262.4L286.7 247.8L294.7 263.2ZM277.4 262.4L290.7 255.5' stroke-opacity='0.8' stroke-width='1.6'/%3E%3Cpath d='M191.5 264.7L193.4 254.4L201.3 261.1Z' stroke-opacity='0.35' stroke-width='1.2'/%3E%3Cpath d='M111.1 119.0L119.7 117.8L116.5 125.8Z' stroke-opacity='0.65' stroke-width='1.2'/%3E%3Cpath d='M383.9 143.5L380.1 147.0L378.9 141.9Z' stroke-opacity='0.8' stroke-width='1.2'/%3E%3Cpath d='M150.4 112.9L148.6 126.7L137.6 118.3ZM150.4 112.9L143.1 122.5' stroke-opacity='0.5' stroke-width='1.2'/%3E%3Cpath d='M382.9 108.4L390.7 112.1L383.5 117.0Z' stroke-opacity='0.5' stroke-width='1.2'/%3E%3Cpath d='M341.5 283.8L339.1 275.5L347.6 277.6Z' stroke-opacity='0.5' stroke-width='1.2'/%3E%3Cpath d='M97.5 151.6L94.9 158.0L90.6 152.5Z' stroke-opacity='0.8' stroke-width='1.2'/%3E%3Cpath d='M379.9 253.7L404.8 266.0L381.8 281.4ZM379.9 253.7L393.3 273.7' stroke-opacity='1' stroke-width='1.6'/%3E%3Cpath d='M420.1 201.0L420.0 211.3L411.0 206.0Z' stroke-opacity='0.8' stroke-width='1.2'/%3E%3Cpath d='M133.9 59.1L140.1 62.3L134.3 66.0Z' stroke-opacity='1' stroke-width='1.2'/%3E%3Cpath d='M346.9 178.5L374.1 184.2L355.6 204.8ZM346.9 178.5L364.9 194.5' stroke-opacity='0.5' stroke-width='1.6'/%3E%3Cpath d='M371.1 275.6L357.4 264.9L373.5 258.4ZM371.1 275.6L365.4 261.7' stroke-opacity='0.8' stroke-width='1.6'/%3E%3Cpath d='M91.9 113.3L83.4 115.0L86.2 106.8Z' stroke-opacity='1' stroke-width='1.2'/%3E%3Cpath d='M315.9 255.4L288.3 257.1L300.6 232.3ZM315.9 255.4L294.4 244.7' stroke-opacity='0.5' stroke-width='1.6'/%3E%3Cpath d='M303.0 82.7L311.8 72.0L316.7 85.0ZM303.0 82.7L314.3 78.5' stroke-opacity='0.35' stroke-width='1.2'/%3E%3Cpath d='M353.0 99.1L355.9 91.0L361.5 97.5Z' stroke-opacity='0.5' stroke-width='1.2'/%3E%3Cpath d='M187.7 48.8L190.6 40.6L196.2 47.2Z' stroke-opacity='0.35' stroke-width='1.2'/%3E%3Cpath d='M239.3 95.1L234.2 96.3L235.7 91.3Z' stroke-opacity='0.65' stroke-width='1.2'/%3E%3Cpath d='M132.7 78.2L148.7 85.0L134.9 95.4ZM132.7 78.2L141.8 90.2' stroke-opacity='0.65' stroke-width='1.6'/%3E%3Cpath d='M228.3 296.1L237.7 291.6L236.9 302.0Z' stroke-opacity='0.35' stroke-width='1.2'/%3E%3Cpath d='M83.2 134.1L74.8 131.9L80.9 125.8Z' stroke-opacity='0.5' stroke-width='1.2'/%3E%3Cpath d='M308.6 60.2L313.2 67.5L304.6 67.9Z' stroke-opacity='0.5' stroke-width='1.2'/%3E%3Cpath d='M284.5 259.4L291.0 247.2L298.3 258.9ZM284.5 259.4L294.6 253.0' stroke-opacity='0.65' stroke-width='1.2'/%3E%3Cpath d='M69.1 91.8L64.2 93.6L65.2 88.4Z' stroke-opacity='0.65' stroke-width='1.2'/%3E%3Cpath d='M46.2 187.1L41.0 182.6L47.6 180.3Z' stroke-opacity='0.35' stroke-width='1.2'/%3E%3Cpath d='M69.8 114.5L64.4 121.3L61.2 113.2Z' stroke-opacity='0.8' stroke-width='1.2'/%3E%3C/svg%3E");
    -webkit-mask: var(--scatter) center / contain no-repeat;
    mask: var(--scatter) center / contain no-repeat;
    animation: themeScatterFloat 14s ease-in-out infinite alternate;
    opacity: 0.9;
}

@keyframes themeScatterFloat {
    from {
        transform: translate(-1.5%, 1%) rotate(-1.5deg);
    }
    to {
        transform: translate(1.5%, -1%) rotate(1.5deg);
    }
}

.product__icon-wrapper {
    position: relative;
    background: transparent;
    border: 1px solid var(--hairline-strong);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    animation: none;
    box-shadow: none;
}

.product__icon-wrapper svg {
    color: var(--product-accent);
    stroke-width: 1.4;
}

.product__content {
    padding: 0;
}

.product__title {
    font-size: var(--text-heading);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.product__description {
    font-size: 16px;
    font-size: clamp(16px, calc(14px + 0.3vw), var(--text-body));
    font-weight: 200;
    line-height: 1.5;
    color: var(--color-silver-mist);
}

.product__features {
    gap: 6px;
}

.product__feature {
    background: transparent;
    border: 1px solid var(--hairline-strong);
    border-radius: var(--radius-pill);
    color: var(--color-silver-mist);
    font-size: var(--text-caption);
    font-weight: 600;
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
    padding: 6px 12px;
}

.product__feature:hover {
    background: transparent;
    color: var(--color-bone-white);
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: none;
    transform: none;
}

.product__actions {
    justify-content: flex-start;
}

.product__actions > .product__link,
.product__actions > .product__badge {
    flex: 0 0 auto;
    justify-content: center;
}

.product__link {
    background: var(--color-electric-iris);
    color: var(--color-bone-white);
    border: 1px solid var(--color-electric-iris);
    border-radius: var(--radius-button);
    font-size: var(--text-nav-label);
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    box-shadow: none;
}

.product__link:hover {
    background: var(--color-electric-iris-hover);
    border-color: var(--color-electric-iris-hover);
    color: var(--color-bone-white);
    box-shadow: none;
    transform: none;
}

.product__link--disabled,
.product__link--disabled:hover {
    background: transparent;
    color: var(--color-ash-gray);
    border: 1px solid var(--hairline-strong);
    font-size: var(--text-nav-label);
}

.product__badge {
    background: transparent;
    color: var(--color-saffron-spark);
    border: 1px solid rgba(255, 184, 41, 0.45);
    border-radius: var(--radius-pill);
    box-shadow: none;
    font-size: var(--text-nav-label);
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.product__badge:hover {
    box-shadow: none;
    transform: none;
}

@media (max-width: 720px) {
    .product {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 30px;
    }

    .product:nth-child(even) > .product__image {
        order: 0;
    }

    .product__image,
    .product--deflatoken .product__image {
        min-height: 220px;
    }
}

@media (max-width: 480px) {
    .product__actions > .product__link,
    .product__actions > .product__badge {
        flex: 0 0 auto;
    }
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact__container .contact__layout {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    column-gap: 3rem;
    column-gap: clamp(3rem, 7vw, 7.5rem);
    row-gap: 3rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

@media (max-width: 800px) {
    .contact__container .contact__layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

.contact__intro {
    background: none;
    padding: 0;
    justify-content: flex-start;
    color: var(--color-bone-white);
}

.contact__title {
    font-size: var(--text-heading-lg);
    line-height: 1.04;
    letter-spacing: var(--tracking-display);
    margin-bottom: 1.5rem;
}

.contact__description {
    font-size: 16px;
    font-size: clamp(16px, calc(14px + 0.3vw), var(--text-body));
    font-weight: 200;
    line-height: 1.5;
    color: var(--color-silver-mist);
}

.contact__direct {
    border-top: 1px solid var(--hairline);
}

.contact__direct-label {
    color: var(--color-ash-gray);
}

.contact__direct a {
    color: var(--color-saffron-spark);
    font-weight: 400;
}

.contact__card {
    background: transparent;
    padding: 0;
}

.contact__form-title {
    color: var(--color-bone-white);
    font-size: var(--text-heading-xs);
    font-weight: 400;
    letter-spacing: -0.02em;
}

.contact__form-description {
    color: var(--color-ash-gray);
    font-weight: 300;
}

.contact__field label {
    color: var(--color-ash-gray);
    font-size: var(--text-caption);
    font-weight: 600;
    letter-spacing: var(--tracking-label);
    text-transform: uppercase;
}

.contact__field input,
.contact__field textarea {
    background: transparent;
    color: var(--color-bone-white);
    font-weight: 300;
    border: 1px solid var(--hairline-strong);
    border-radius: 14px;
}

.contact__field input:focus,
.contact__field textarea:focus {
    border-color: var(--color-electric-iris);
    box-shadow: 0 0 0 3px rgba(128, 82, 255, 0.3);
}

.contact__field input:-webkit-autofill,
.contact__field textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--color-void) inset;
    -webkit-text-fill-color: var(--color-bone-white);
    caret-color: var(--color-bone-white);
}

.contact__submit {
    justify-self: start;
}

.contact__note {
    color: var(--color-ash-gray);
    font-weight: 300;
}

@media (max-width: 520px) {
    .contact__submit {
        justify-self: stretch;
    }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer::before {
    background: var(--hairline);
}

.footer__logo-text {
    font-size: var(--text-heading);
    letter-spacing: var(--tracking-display);
}

.footer__text {
    color: var(--color-silver-mist);
    font-weight: 200;
}

.footer__social-link {
    background: transparent;
    border: 1px solid var(--hairline-strong);
    color: var(--color-bone-white);
}

.footer__social-link:hover {
    background: transparent;
    border-color: var(--color-electric-iris);
    color: var(--color-electric-iris);
    box-shadow: none;
    transform: none;
}

.footer__bottom {
    color: var(--color-ash-gray);
    border-top: 1px solid var(--hairline);
}

/* --------------------------------------------------------------------------
   Cookie notice
   -------------------------------------------------------------------------- */
.cookie-banner {
    background: var(--color-void);
    color: var(--color-silver-mist);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-card);
    box-shadow: none;
}

.cookie-banner__title {
    color: var(--color-bone-white);
    font-weight: 400;
}

.cookie-banner__description,
.cookie-banner__preference-row p {
    color: var(--color-silver-mist);
    font-weight: 300;
}

.cookie-banner__button {
    border-radius: var(--radius-button);
    font-size: var(--text-nav-label);
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.cookie-banner__button--primary {
    background: var(--color-electric-iris);
    border-color: var(--color-electric-iris);
}

.cookie-banner__button--primary:hover {
    background: var(--color-electric-iris-hover);
}

.cookie-banner__policy-link {
    color: var(--color-saffron-spark);
}

/* --------------------------------------------------------------------------
   Final refinements
   -------------------------------------------------------------------------- */
/* One gutter for header and content.
   - Up to 968px it is exactly the value styles.css already gives .container,
     so phone/tablet content keeps its width; only the header follows it
     (it used a fixed 20px, 4-5px off the text below it).
   - On desktop it grows from ~38px to 56px. At >=1440px the content edge and
     width are the same as before (100px / 1240px at 1440). */
:root {
    --gutter: clamp(1rem, 4vw, 1.25rem);
}

@media (min-width: 969px) {
    :root {
        --gutter: clamp(1.25rem, calc(8vw - 40px), 56px);
    }
}

.container {
    max-width: calc(1240px + 2 * var(--gutter));
    padding-left: var(--gutter);
    padding-right: var(--gutter);
    padding-inline: var(--gutter);
}

/* `.header.scrolled .nav { padding: .75rem 0 }` in styles.css dropped the side
   padding as soon as the page scrolled: logo and language button jumped 20px
   sideways. Keep them on the content edges in both states. */
.header .nav,
.header.scrolled .nav {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

@media (max-width: 968px) {
    .nav__toggle {
        right: var(--gutter) !important;
    }

    [dir="rtl"] .nav__toggle {
        right: auto !important;
        left: var(--gutter) !important;
    }

    /* same 4rem step between the two fixed buttons as before */
    .language-picker {
        right: calc(var(--gutter) + 4rem);
        inset-inline-end: calc(var(--gutter) + 4rem);
    }

    /* In RTL the logo moves to the right edge, so the fixed pill has to
       mirror the menu button and sit on the left. `right` is over-constrained
       against `inset-inline-end` in RTL, which pinned the pill on top of the
       wordmark; both sides are reset here and only the physical left is set. */
    [dir="rtl"] .language-picker {
        right: auto;
        inset-inline-end: auto;
        left: calc(var(--gutter) + 4rem);
    }
}

@media (min-width: 969px) {
    .header.scrolled {
        box-shadow: inset 0 -1px 0 var(--hairline);
    }
}

/* Controls and fields sit on solid black, so the particle field never
   crosses their labels or the text being typed. */
.language-toggle,
.hero__mode-switch,
.hero__3d-models-pill .model-pill-btn,
.hero__3d-models-pill .model-pill-btn:hover,
.hero__3d-models-pill .model-pill-btn.active,
.hero__3d-tools .tool-btn,
.hero__3d-tools .tool-btn:hover,
.hero__3d-tools .tool-btn.active,
.product__feature,
.product__feature:hover,
.product__badge,
.product__link--disabled,
.product__link--disabled:hover,
.footer__social-link,
.footer__social-link:hover,
.contact__field input,
.contact__field textarea {
    background-color: var(--color-void);
}

/* opaque version of the old 6% white hover */
.language-toggle:hover,
.language-toggle:focus-visible,
.language-toggle[aria-expanded="true"] {
    background-color: #0f0f0f;
}

/* A black halo keeps the small viewer captions readable where triangles
   pass behind them (invisible against the black stage). */
.hero__3d-hint,
.hero__3d-status {
    text-shadow: 0 0 3px var(--color-void), 0 0 10px var(--color-void);
}

/* Avoid one-word (or "la!") last lines in running copy; line breaking only. */
.hero__subtitle,
.section__subtitle,
.about__text,
.service__description,
.product__description,
.contact__description,
.contact__form-description,
.footer__text {
    text-wrap: pretty;
}

.contact__direct a {
    text-decoration-thickness: 1px;
    text-underline-offset: 0.28em;
    transition: color 0.2s ease;
}

.contact__direct a:hover {
    color: var(--color-bone-white);
}

/* Phones stack the product actions full width. "Gratuito" is a label, not a
   second button, so it keeps its own width under the call to action. */
@media (max-width: 480px) {
    .product__actions > .product__badge {
        width: auto;
        align-self: flex-start;
    }
}

/* --------------------------------------------------------------------------
   Motion & print
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .particle,
    .product__image::before {
        animation: none;
    }
}

@media print {
    .constellation,
    .cursor-glow {
        display: none !important;
    }
}

/* --------------------------------------------------------------------------
   Mobile hardening (Android / Mi Browser)
   --------------------------------------------------------------------------
   Everything below is scoped to phone widths, so the desktop layout and the
   desktop 3D framing stay exactly as they were. */
@media (max-width: 968px) {
    /* The fixed bar was translucent, so page text ghosted through it while
       scrolling. Keep it opaque on phones. */
    .header:not(.menu-open) {
        background: #000 !important;
    }

    /* Keep the wordmark visible above the full-screen menu (which sits at
       z-index: 999 inside the header's stacking context). */
    .nav__logo {
        position: relative;
        z-index: 1000;
    }

    /* Keep the standard 44px tap target on the 3D HUD controls; the taller
       stage below gives the camera enough room without shrinking them. */
    .hero__3d-models-pill .model-pill-btn,
    .hero__3d-tools .tool-btn {
        min-height: 44px;
        min-block-size: 44px;
        min-height: 44px;
    }

    /* Vertical swipes belong to the page scroll, not the orbit control. */
    .hero__3d-canvas-container {
        touch-action: pan-y;
    }
}

@media (max-width: 640px) {
    /* A little more room for the model; the HUD bars are compact now. */
    .hero__3d-stage {
        height: 420px;
    }

    .hero__3d-hud--top {
        padding: 6px 8px;
    }

    .hero__3d-hud--bottom {
        padding: 6px 8px 8px;
        gap: 6px;
    }

    /* The old 140px cap ellipsised the status to "SAFEROUTE 3D • LO...". */
    .hero__3d-status {
        max-width: none;
        font-size: 0.68rem;
    }

    .hero__3d-hint {
        font-size: 0.62rem;
    }
}

@media (max-width: 380px) {
    /* 320-360px viewports: the two mode tabs wrapped onto two lines and the
       model names were ellipsised. */
    .hero__mode-switch .mode-switch-btn {
        font-size: 11px;
        padding: 6px 8px;
        gap: 4px;
        white-space: nowrap;
    }

    .hero__mode-switch .mode-switch-btn .mode-icon {
        width: 14px;
        height: 14px;
    }

    .hero__3d-models-pill {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 4px;
    }

    .hero__3d-models-pill .model-pill-btn {
        flex: 0 0 auto;
        font-size: 10.5px;
        padding: 4px 6px;
    }
}

/* --------------------------------------------------------------------------
   Legacy Android WebView fallbacks (Mi Browser / MIUI)
   --------------------------------------------------------------------------
   The inline probe in index.html adds these classes only when the engine
   lacks clamp() or CSS logical properties, so modern browsers never apply
   this block. Without it, a var() token holding clamp() resolves to "unset"
   at computed-value time: every display headline collapsed to inherited 16px
   and the fixed language/menu buttons lost their offsets. */
html.no-css-clamp {
    --text-display: 42px;
    --text-heading-lg: 40px;
    --text-heading: 34px;
    /* clamp(1rem, 4vw, 1.25rem): 15-16px on phones, 20px on tablets */
    --gutter: 16px;
    /* styles.css builds its controls from these tokens; without a fallback
       every var() use became unset (0 height/padding). */
    --fluid-control-font: 14px;
    --fluid-control-height: 44px;
    --fluid-control-padding-x: 14px;
    --fluid-control-padding-y: 10px;
}

@media (min-width: 641px) {
    html.no-css-clamp {
        --text-display: 52px;
        --text-heading-lg: 48px;
        --text-heading: 38px;
        --gutter: 20px;
    }
}

@media (min-width: 969px) {
    html.no-css-clamp {
        --text-display: 62px;
        --text-heading-lg: 54px;
        --text-heading: 42px;
        --gutter: 40px;
    }
}

@media (min-width: 1200px) {
    html.no-css-clamp {
        --text-display: 78px;
        --text-heading-lg: 64px;
        --text-heading: 46px;
        --gutter: 56px;
    }
}

/* These engines drop padding-inline/padding-block, so the physical sides need
   explicit values. --gutter already carries the fallback for each breakpoint. */
html.no-css-logical .container {
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

@media (max-width: 968px) {
    /* Both header buttons are position:fixed. Without inset-inline-end they
       fell back to their flex origin: the language pill landed over the logo
       at the left edge and the menu button vanished under it. */
    html.no-css-logical .language-picker {
        right: calc(var(--gutter) + 4rem);
        left: auto;
    }

    html.no-css-logical[dir="rtl"] .language-picker {
        right: auto;
        left: calc(var(--gutter) + 4rem);
    }

    /* The dropdown anchors with inset-inline-end:0 in styles.css. */
    html.no-css-logical .language-menu {
        right: 0;
        left: auto;
    }

    html.no-css-logical[dir="rtl"] .language-menu {
        right: auto;
        left: 0;
    }

    html.no-css-logical .nav__toggle {
        right: var(--gutter) !important;
        left: auto !important;
    }

    html.no-css-logical[dir="rtl"] .nav__toggle {
        right: auto !important;
        left: var(--gutter) !important;
    }

    /* Belt and braces: old builds can also drop currentColor in the
       non-standard text-fill property, which would leave the gradient logo
       fully transparent. */
    html.no-css-clamp .nav__logo-text,
    html.no-css-logical .nav__logo-text {
        color: #fff;
        -webkit-text-fill-color: #fff;
    }

    html.no-css-clamp .nav__toggle span,
    html.no-css-logical .nav__toggle span {
        background: #fff;
    }

    html.no-css-clamp .nav__toggle,
    html.no-css-logical .nav__toggle {
        border-color: rgba(255, 255, 255, 0.28);
    }
}
