/* ==========================================================================
   ProximaTIC — Full d'estils principal
   --------------------------------------------------------------------------
   Sense dependències externes ni build step.

   NOTA SOBRE TIPOGRAFIA: s'usa la pila de fonts del sistema per no carregar
   fonts de tercers (privacitat + rendiment). Pendent valorar l'autoallotjament
   de Space Grotesk / Inter. Vegeu docs/06-Logo-i-imatge-corporativa.md.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variables de marca
   -------------------------------------------------------------------------- */
:root {
    /* Colors */
    --navy:        #0B1026;
    --navy-2:      #101635;
    --navy-card:   #141A38;
    --red:         #E8392B;
    --orange:      #FF8A3D;
    --cyan:        #4FD1FF;
    --indigo:      #6C7BFF;

    --ink:         #151A2D;
    --body:        #3C4257;
    --muted:       #5A6172;
    --line:        #E3E7F0;
    --surface:     #FFFFFF;
    --surface-alt: #F5F7FB;
    --white:       #F7F9FF;

    /* Tipografia */
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
                 Arial, "Noto Sans", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    /* Formes */
    --radius:    14px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    --shadow-sm: 0 1px 2px rgba(11, 16, 38, .06), 0 2px 8px rgba(11, 16, 38, .05);
    --shadow-md: 0 6px 18px rgba(11, 16, 38, .09);
    --shadow-lg: 0 18px 45px rgba(11, 16, 38, .16);

    --container: 1120px;
    --header-h:  72px;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--body);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

h1, h2, h3, h4 {
    margin: 0 0 .5em;
    color: var(--ink);
    line-height: 1.2;
    letter-spacing: -0.015em;
}

p { margin: 0 0 1rem; }

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

/* Accessibilitat --------------------------------------------------------- */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 1rem; top: -4rem;
    z-index: 100;
    background: var(--red);
    color: #fff;
    padding: .7rem 1.1rem;
    border-radius: var(--radius);
    transition: top .2s ease;
}
.skip-link:focus { top: 1rem; text-decoration: none; }

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--muted { background: var(--surface-alt); }
.section--dark {
    background:
        radial-gradient(90% 70% at 100% 0%, rgba(79, 209, 255, .14) 0%, transparent 60%),
        radial-gradient(90% 70% at 0% 100%, rgba(232, 57, 43, .18) 0%, transparent 60%),
        linear-gradient(155deg, var(--navy) 0%, var(--navy-2) 100%);
    color: rgba(247, 249, 255, .82);
}
.section--dark .section-title,
.section--dark h3 { color: var(--white); }

/* --------------------------------------------------------------------------
   4. Capçaleres de secció i tipografia d'ajuda
   -------------------------------------------------------------------------- */
.section-head {
    max-width: 720px;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin: 0 0 .75rem;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--red);
}
.eyebrow--light { color: var(--cyan); }
.eyebrow__num { font-variant-numeric: tabular-nums; opacity: .75; }

.section-title {
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    margin-bottom: .6rem;
}

.section-lead {
    font-size: clamp(1rem, 1.6vw, 1.12rem);
    color: var(--muted);
    max-width: 62ch;
}
.section--dark .section-lead { color: rgba(247, 249, 255, .72); }

.grad {
    background: linear-gradient(100deg, var(--orange), var(--red) 55%, #ff6b6b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* --------------------------------------------------------------------------
   5. Botons
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .8rem 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    font: inherit;
    font-weight: 600;
    font-size: .95rem;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
    background: linear-gradient(100deg, var(--orange), var(--red));
    color: #fff;
    box-shadow: 0 8px 22px rgba(232, 57, 43, .32);
}
.btn--primary:hover { box-shadow: 0 12px 28px rgba(232, 57, 43, .42); }

.btn--ghost {
    background: rgba(247, 249, 255, .06);
    border-color: rgba(247, 249, 255, .35);
    color: var(--white);
}
.btn--ghost:hover { background: rgba(247, 249, 255, .14); }

.btn--outline {
    border-color: var(--line);
    color: var(--ink);
    background: #fff;
}
.btn--outline:hover { border-color: var(--red); color: var(--red); }

.btn--block { width: 100%; }
.btn--sm { padding: .6rem 1.1rem; font-size: .88rem; }

/* --------------------------------------------------------------------------
   6. Capçalera i navegació
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 16, 38, .82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(247, 249, 255, .09);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: var(--white);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand__mark { display: block; width: 38px; height: 38px; }
.brand__accent { color: var(--cyan); }
.brand--light { color: var(--white); }

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

.nav__list { display: flex; align-items: center; gap: 1.4rem; }

.nav__link {
    color: rgba(247, 249, 255, .82);
    font-size: .94rem;
    font-weight: 500;
    padding: .35rem 0;
    border-bottom: 2px solid transparent;
}
.nav__link:hover,
.nav__link.is-active { color: var(--white); border-bottom-color: var(--cyan); text-decoration: none; }

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    padding: 0 10px;
    background: transparent;
    border: 1px solid rgba(247, 249, 255, .22);
    border-radius: 10px;
    cursor: pointer;
}
.nav-toggle__bar {
    display: block;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3.5rem, 9vw, 7rem);
    background:
        radial-gradient(115% 90% at 10% 0%, rgba(232, 57, 43, .24) 0%, transparent 55%),
        radial-gradient(100% 85% at 92% 100%, rgba(79, 209, 255, .18) 0%, transparent 58%),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 58%, var(--navy) 100%);
    color: rgba(247, 249, 255, .84);
}

.hero__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1.6px 1.6px at 14% 24%, rgba(247,249,255,.75), transparent 100%),
        radial-gradient(1.4px 1.4px at 32% 68%, rgba(247,249,255,.55), transparent 100%),
        radial-gradient(1.8px 1.8px at 58% 18%, rgba(247,249,255,.6), transparent 100%),
        radial-gradient(1.3px 1.3px at 72% 82%, rgba(247,249,255,.5), transparent 100%),
        radial-gradient(1.7px 1.7px at 88% 34%, rgba(79,209,255,.7), transparent 100%),
        radial-gradient(1.4px 1.4px at 46% 92%, rgba(247,249,255,.45), transparent 100%),
        radial-gradient(1.5px 1.5px at 8% 78%, rgba(255,138,61,.6), transparent 100%);
    background-repeat: no-repeat;
    opacity: .9;
}

.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 3.5rem);
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin: 0 0 1.2rem;
    padding: .45rem 1rem;
    border: 1px solid rgba(79, 209, 255, .35);
    border-radius: var(--radius-pill);
    background: rgba(79, 209, 255, .08);
    color: var(--white);
    font-size: .84rem;
    font-weight: 600;
}
.hero__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--orange);
    box-shadow: 0 0 0 4px rgba(255, 138, 61, .22);
}

.hero__title {
    font-size: clamp(2.1rem, 5.6vw, 3.5rem);
    color: var(--white);
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.hero__lead {
    font-size: clamp(1rem, 1.7vw, 1.15rem);
    max-width: 56ch;
    color: rgba(247, 249, 255, .78);
    margin-bottom: 1.8rem;
}
.hero__lead strong { color: var(--white); }

.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 1.8rem; }

.hero__points {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1.6rem;
    font-size: .9rem;
    color: rgba(247, 249, 255, .72);
}
.hero__points li { display: inline-flex; align-items: center; gap: .5rem; }
.hero__points li::before {
    content: "✦";
    color: var(--cyan);
    font-size: .8rem;
}

.hero__visual { display: flex; justify-content: center; }
.orbit-art { width: 100%; max-width: 460px; height: auto; }

/* --------------------------------------------------------------------------
   8. Targetes de serveis
   -------------------------------------------------------------------------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
    gap: 1.25rem;
}

.card {
    position: relative;
    padding: 1.6rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(79, 209, 255, .55);
}

.card--highlight {
    border-color: rgba(232, 57, 43, .4);
    background: linear-gradient(150deg, rgba(255, 138, 61, .09), rgba(232, 57, 43, .06));
}
.card--highlight::after {
    /* L'etiqueta ve del markup (`data-badge`), perquè és text traduïble. */
    content: attr(data-badge);
    position: absolute;
    top: -10px; right: 1.1rem;
    padding: .15rem .65rem;
    background: linear-gradient(100deg, var(--orange), var(--red));
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-radius: var(--radius-pill);
}

.card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    margin-bottom: .9rem;
    border-radius: 12px;
    background: rgba(79, 209, 255, .12);
    color: var(--red);
}
.card--highlight .card__icon { background: rgba(232, 57, 43, .12); color: var(--red); }
.card__icon svg { width: 22px; height: 22px; }

.card__title { font-size: 1.1rem; margin-bottom: .4rem; }
.card__text { font-size: .94rem; color: var(--muted); margin-bottom: 0; }

.card__link {
    display: inline-block;
    margin-top: .9rem;
    font-size: .9rem;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   9. Secció Dolibarr: pilars i crida
   -------------------------------------------------------------------------- */
.pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.pillar {
    padding: 1.6rem 1.5rem;
    background: rgba(247, 249, 255, .05);
    border: 1px solid rgba(247, 249, 255, .12);
    border-radius: var(--radius-lg);
    transition: border-color .2s ease, background .2s ease;
}
.pillar:hover { border-color: rgba(79, 209, 255, .45); background: rgba(247, 249, 255, .08); }

.pillar__num {
    display: inline-block;
    margin-bottom: .7rem;
    font-size: 1.6rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(100deg, var(--orange), var(--red));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.pillar__title { font-size: 1.12rem; margin-bottom: .35rem; }
.pillar__text { font-size: .94rem; margin: 0; color: rgba(247, 249, 255, .72); }

.callout {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: clamp(1.4rem, 3vw, 2rem);
    border: 1px solid rgba(79, 209, 255, .3);
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, rgba(79, 209, 255, .09), rgba(108, 123, 255, .07));
}
.callout__text { margin: 0; max-width: 62ch; color: rgba(247, 249, 255, .85); }
.callout__text strong { color: var(--white); }

/* --------------------------------------------------------------------------
   10. Sobre nosaltres
   -------------------------------------------------------------------------- */
.about {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: start;
}
.about__subtitle { font-size: clamp(1.15rem, 2.4vw, 1.5rem); }
.about__text p { color: var(--body); }

.checklist { display: grid; gap: .65rem; margin-top: 1.4rem; }
.checklist li {
    position: relative;
    padding-left: 1.9rem;
    font-size: .95rem;
}
.checklist li::before {
    content: "";
    position: absolute;
    left: 0; top: .35em;
    width: 1.1rem; height: .6rem;
    border-left: 2px solid var(--red);
    border-bottom: 2px solid var(--red);
    transform: rotate(-45deg);
}

.about__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.stat {
    padding: 1.4rem 1.2rem;
    text-align: center;
    border-radius: var(--radius-lg);
    background: var(--surface-alt);
    border: 1px solid var(--line);
}
.stat__value {
    display: block;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(100deg, var(--orange), var(--red));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat__label { font-size: .86rem; color: var(--muted); }

/* --------------------------------------------------------------------------
   11. Àmbits de treball
   -------------------------------------------------------------------------- */
.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}
.project {
    padding: 1.6rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .22s ease;
}
.project:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.project__sector {
    margin: 0 0 .5rem;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--red);
}
.project__title { font-size: 1.06rem; }
.project__text { font-size: .93rem; color: var(--muted); }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .9rem; }
.tag {
    padding: .22rem .7rem;
    font-size: .76rem;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
}

/* --------------------------------------------------------------------------
   12. Contacte i formulari
   -------------------------------------------------------------------------- */
.contact {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: start;
}

.contact__details { display: grid; gap: .9rem; margin-top: 1.6rem; }
.contact__details li { display: grid; gap: .1rem; font-size: .95rem; }
.contact__details a { color: var(--cyan); }
.contact__label {
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(247, 249, 255, .55);
}

.contact__form {
    padding: clamp(1.4rem, 3.5vw, 2.4rem);
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.form__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.form__field { display: grid; gap: .35rem; margin-bottom: 1rem; }
.form__field label,
.form__consent span { font-size: .88rem; font-weight: 600; color: var(--ink); }
.form__field label span { color: var(--red); }

.form__field input,
.form__field select,
.form__field textarea {
    width: 100%;
    padding: .75rem .9rem;
    font: inherit;
    font-size: .95rem;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.form__field textarea { resize: vertical; min-height: 120px; }
.form__field input:focus,
.form__field select:focus,
.form__field textarea:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(79, 209, 255, .22);
}
.form__field input::placeholder,
.form__field textarea::placeholder { color: #9aa2b6; }

.form__consent {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin: .2rem 0 1.2rem;
    font-size: .88rem;
}
.form__consent input { margin-top: .28rem; width: 1.05rem; height: 1.05rem; accent-color: var(--red); }

.form__legal { margin: .8rem 0 0; font-size: .8rem; color: var(--muted); text-align: center; }

.form__hp {
    position: absolute;
    left: -9999px;
    width: 1px; height: 1px;
    overflow: hidden;
}

.alert {
    padding: .9rem 1.1rem;
    margin-bottom: 1.2rem;
    border-radius: 11px;
    font-size: .92rem;
    border: 1px solid transparent;
}
.alert--ok { background: #E9F9F0; border-color: #b6ebcd; color: #14663c; }
.alert--error { background: #FDECEC; border-color: #f6c4c4; color: #8e2020; }

/* --------------------------------------------------------------------------
   13. Peu de pàgina
   -------------------------------------------------------------------------- */
.site-footer {
    padding: clamp(2.5rem, 6vw, 4rem) 0 1.5rem;
    background: var(--navy);
    color: rgba(247, 249, 255, .68);
    font-size: .92rem;
}
.site-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
    gap: 2rem;
    padding-bottom: 2.2rem;
    border-bottom: 1px solid rgba(247, 249, 255, .1);
}
.site-footer__claim { color: var(--white); font-weight: 600; margin: 1rem 0 .4rem; }
.site-footer__note { color: rgba(247, 249, 255, .6); margin: 0; }
.site-footer__note strong { color: var(--cyan); }

.site-footer__title {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(247, 249, 255, .5);
    margin-bottom: .8rem;
}
.site-footer__col ul { display: grid; gap: .45rem; }
.site-footer__col a { color: rgba(247, 249, 255, .78); }
.site-footer__col a:hover { color: var(--cyan); }
.site-footer__domains { margin-top: 1rem; font-size: .82rem; color: rgba(247, 249, 255, .42); }

.site-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.4rem;
    font-size: .84rem;
    color: rgba(247, 249, 255, .5);
}
.site-footer__bottom p { margin: 0; }
.site-footer__star { color: var(--orange); }

/* --------------------------------------------------------------------------
   14. Pàgines interiors (legal)
   -------------------------------------------------------------------------- */
.page-head {
    padding: clamp(2.5rem, 6vw, 4rem) 0 0;
    background: linear-gradient(160deg, var(--navy), var(--navy-2));
    color: rgba(247, 249, 255, .8);
}
.page-head .eyebrow { color: var(--cyan); }
.page-head__title { color: var(--white); font-size: clamp(1.7rem, 4vw, 2.4rem); }
.page-head__lead { color: rgba(247, 249, 255, .65); margin-bottom: 0; padding-bottom: 2rem; }

.prose { max-width: 760px; }
.prose h2 {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    margin-top: 2.6rem;
    padding-top: .4rem;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; margin-top: 1.7rem; }
.prose p, .prose li { font-size: .98rem; }
.prose hr {
    margin: 2.5rem 0;
    border: 0;
    border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   15. Animació d'aparició
   -------------------------------------------------------------------------- */
html.js [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .6s ease;
}
html.js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    html.js [data-reveal] { opacity: 1; transform: none; transition: none; }
    .btn:hover, .card:hover, .project:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   16. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
    .hero__inner { grid-template-columns: 1fr; }
    .hero__visual { order: -1; }
    .orbit-art { max-width: 320px; }

    .about { grid-template-columns: 1fr; }
    .contact { grid-template-columns: 1fr; }

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

@media (max-width: 760px) {
    .nav-toggle { display: flex; }

    .nav {
        position: absolute;
        top: var(--header-h);
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.3rem clamp(1.1rem, 4vw, 2rem) 1.6rem;
        background: rgba(11, 16, 38, .98);
        border-bottom: 1px solid rgba(247, 249, 255, .1);
        box-shadow: var(--shadow-lg);
        display: none;
    }
    .nav.is-open { display: flex; }

    .nav__list { flex-direction: column; align-items: stretch; gap: .2rem; }
    .nav__link {
        display: block;
        padding: .7rem 0;
        border-bottom: 1px solid rgba(247, 249, 255, .08);
        font-size: 1rem;
    }
    .nav__link:hover, .nav__link.is-active { border-bottom-color: rgba(247, 249, 255, .08); color: var(--cyan); }
    .nav__cta { align-self: flex-start; }

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

@media (max-width: 520px) {
    .site-footer__grid { grid-template-columns: 1fr; }
    .hero__actions .btn { width: 100%; }
}

/* --------------------------------------------------------------------------
   Selector d'idioma: desplegable compacte
   -------------------------------------------------------------------------- */
.lang {
    position: relative;
    font-size: .82rem;
}

/* El marcador natiu del <details> no ens interessa. */
.lang > summary { list-style: none; }
.lang > summary::-webkit-details-marker { display: none; }

.lang__toggle {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .34rem .6rem .34rem .55rem;
    border: 1px solid rgba(247, 249, 255, .18);
    border-radius: var(--radius-pill);
    color: rgba(247, 249, 255, .82);
    cursor: pointer;
    user-select: none;
    transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

.lang__toggle:hover,
.lang__toggle:focus-visible,
.lang[open] .lang__toggle {
    color: var(--white);
    border-color: rgba(79, 209, 255, .55);
    background: rgba(247, 249, 255, .07);
    text-decoration: none;
}

.lang__toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.lang__globe { width: 15px; height: 15px; flex: none; opacity: .8; }
.lang__current { font-weight: 600; white-space: nowrap; }

.lang__caret {
    width: 11px; height: 11px; flex: none;
    opacity: .7;
    transition: transform .2s ease;
}
.lang[open] .lang__caret { transform: rotate(180deg); }

.lang__menu {
    position: absolute;
    top: calc(100% + .5rem);
    right: 0;
    z-index: 20;
    min-width: 12rem;
    /* Amb molts idiomes el menú pot ser alt: que no surti mai de la pantalla. */
    max-height: min(70vh, 26rem);
    overflow-y: auto;
    margin: 0;
    padding: .35rem;
    list-style: none;
    background: #0F1530;
    border: 1px solid rgba(247, 249, 255, .14);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.lang__menu li + li { margin-top: .1rem; }

.lang__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .45rem .6rem;
    border-radius: 8px;
    color: rgba(247, 249, 255, .82);
    text-decoration: none;
    transition: color .16s ease, background-color .16s ease;
}

.lang__item:hover { color: var(--white); background: rgba(247, 249, 255, .1); }

.lang__item.is-active {
    color: var(--cyan);
    background: rgba(79, 209, 255, .12);
    font-weight: 600;
    cursor: default;
}

.lang__check { width: 13px; height: 13px; flex: none; }

/* Dins del menú mòbil el desplegable s'obre en flux, sense tapar la resta. */
@media (max-width: 760px) {
    .lang { align-self: flex-start; margin: .3rem 0 .5rem; }
    .lang__toggle { font-size: .88rem; }
    .lang__menu {
        position: static;
        min-width: 0;
        margin-top: .5rem;
        background: rgba(247, 249, 255, .05);
        box-shadow: none;
    }
    .lang__item { padding: .55rem .6rem; }
}

/* Avís de traducció pendent a les pàgines legals */
.prose__note {
    margin-top: 2rem;
    padding: .8rem 1rem;
    border-left: 3px solid var(--cyan);
    background: rgba(79, 209, 255, .08);
    font-size: .9rem;
    border-radius: 0 4px 4px 0;
}

/* --------------------------------------------------------------------------
   Errors de validació del formulari
   -------------------------------------------------------------------------- */
.form__field input[aria-invalid="true"],
.form__field textarea[aria-invalid="true"] {
    border-color: #FF6B5A;
    background: rgba(255, 107, 90, .08);
}

.form__field input[aria-invalid="true"]:focus,
.form__field textarea[aria-invalid="true"]:focus {
    outline-color: #FF6B5A;
}

.form__error {
    margin: .4rem 0 0;
    font-size: .85rem;
    line-height: 1.5;
    color: #FFB3A7;
}
