/* =======================================================================
   ANAXIMAE — DESIGN SYSTEM
   Refined minimalism. Editorial typography. Generous whitespace.
   ======================================================================= */

/* --- Imports tipografici --------------------------------------------------
   Fraunces: serif moderna con ottica variabile, perfetta per display headlines
   Inter Tight: sans neutra raffinata per body text
   Mantengo solo i pesi che uso → 4 file di font totali, performance OK
--------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=Inter+Tight:wght@400;500;600&display=swap');

/* --- Reset & base --------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    overflow-x: hidden;
}

/* --- Variabili ------------------------------------------------------------ */
:root {
    /* Tavolozza: blu navy del wordmark Anaximae + bianco caldo + accent teal del monogramma */
    --paper: #FBFAF7;             /* off-white caldo, non bianco asettico */
    --paper-soft: #F4F2EC;        /* sezioni alternate */
    --ink: #0E1A2B;               /* navy quasi nero come il wordmark */
    --ink-soft: #4A5468;
    --ink-mute: #8A92A3;
    --line: #E5E2DA;              /* divider sottili */
    --accent: #1B7888;            /* teal del monogramma "Ae" */
    --accent-deep: #0E3A47;       /* gradient deep del monogramma */
    --accent-glow: rgba(27, 120, 136, 0.08);

    /* Tipografia */
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter Tight', -apple-system, sans-serif;

    /* Spacing scale (basata su 8px grid) */
    --space-xs: 0.5rem;     /* 8px */
    --space-s: 1rem;        /* 16px */
    --space-m: 1.5rem;      /* 24px */
    --space-l: 2.5rem;      /* 40px */
    --space-xl: 4rem;       /* 64px */
    --space-2xl: 6rem;      /* 96px */
    --space-3xl: 9rem;      /* 144px */

    /* Layout */
    --max-width: 1200px;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* --- Typography ----------------------------------------------------------- */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.1;
    color: var(--ink);
    font-feature-settings: "ss01", "ss02";
}

/* Display gigante per hero */
.display {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(2.5rem, 6.5vw, 5.25rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-variation-settings: "opsz" 144;
}

.display em {
    font-style: italic;
    font-weight: 400;
    color: var(--accent);
}

/* H2 sezione — più contenuto, comunque editorial */
h2, .h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 400;
    letter-spacing: -0.015em;
    font-variation-settings: "opsz" 96;
}

h3, .h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 500;
    letter-spacing: -0.01em;
    font-family: var(--font-body);
    color: var(--ink);
}

/* Eyebrow: piccolo label sopra le sezioni, rara presenza */
.eyebrow {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    display: inline-block;
}

p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ink-soft);
    max-width: 65ch;
    /* Look editoriale: giustificazione su entrambi i lati con sillabazione
       automatica per evitare i "buchi" tipici dell'italiano e francese
       che hanno parole lunghe. Richiede lang="it"/"fr" sull'<html>, già
       presente nel sito. */
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    hanging-punctuation: first last;
}

/* Eccezione: il "lead" (frase grande sotto al titolo nei hero) resta
   allineato a sinistra. Una sola frase corta giustificata fa più male
   che bene — i pochi spazi vengono allargati artificialmente. */
p.lead {
    font-size: 1.25rem;
    line-height: 1.55;
    color: var(--ink);
    max-width: 38ch;
    font-weight: 400;
    text-align: left;
    hyphens: none;
    -webkit-hyphens: none;
}

a {
    color: var(--ink);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

strong { font-weight: 600; color: var(--ink); }

/* --- Layout primitives ---------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section {
    padding: var(--space-3xl) 0;
}

.section-tight {
    padding: var(--space-2xl) 0;
}

.section-soft { background: var(--paper-soft); }

/* Border separator usato fra sezioni quando serve */
.divider {
    border: none;
    height: 1px;
    background: var(--line);
    margin: 0;
}

/* --- Header / nav --------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(251, 250, 247, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

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

.nav-brand img {
    height: 22px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.95rem;
    color: var(--ink-soft);
    font-weight: 400;
    transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--ink);
}

/* Selettore lingua */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.lang-switch a {
    padding: 0.25rem 0.5rem;
    color: var(--ink-mute);
    border-radius: 3px;
    transition: color 0.15s ease, background 0.15s ease;
}

.lang-switch a.active {
    color: var(--ink);
    background: var(--paper-soft);
}

.lang-switch a:hover {
    color: var(--ink);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--ink);
}

@media (max-width: 760px) {
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--paper);
        padding: 1.5rem var(--gutter);
        gap: 1.25rem;
        align-items: flex-start;
        border-bottom: 1px solid var(--line);
    }
    .nav-links.is-open { display: flex; }
}

/* --- Hero ----------------------------------------------------------------- */
.hero {
    padding: var(--space-3xl) 0 var(--space-2xl);
    position: relative;
    overflow: hidden;
}

/* Glow sottile dietro al hero, suggerisce profondità senza essere chiassoso */
.hero::before {
    content: "";
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 920px;
}

.hero .display {
    margin-bottom: var(--space-l);
}

.hero p.lead {
    margin-top: var(--space-m);
    max-width: 52ch;
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 999px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: var(--ink);
    color: var(--paper);
}

.btn-primary:hover {
    background: var(--accent-deep);
    color: var(--paper);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

.btn-ghost:hover {
    border-color: var(--ink);
    color: var(--ink);
}

.btn .arrow {
    transition: transform 0.2s ease;
    display: inline-block;
}

.btn:hover .arrow {
    transform: translateX(3px);
}

/* --- Sezione cards generiche --------------------------------------------- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-l);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-l);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-l);
}

@media (max-width: 900px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; gap: var(--space-m); }
}

@media (min-width: 760px) and (max-width: 1100px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Card di featured (es: Zeppelin Map) */
.feature-card {
    background: var(--paper-soft);
    padding: var(--space-l);
    border-radius: 16px;
    border: 1px solid var(--line);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(14, 26, 43, 0.06);
}

/* Approach pillar (3 colonne sulla home / about) */
.pillar {
    padding: var(--space-m) 0;
    border-top: 1px solid var(--line);
}

.pillar h3 {
    margin-bottom: var(--space-s);
}

.pillar .eyebrow {
    margin-bottom: var(--space-s);
    color: var(--ink-mute);
}

/* --- Section header layout (titolo a sx, contenuto a dx) ------------------ */
.section-header {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-xl);
    align-items: start;
}

.section-header .eyebrow {
    margin-bottom: var(--space-s);
}

@media (max-width: 900px) {
    .section-header {
        grid-template-columns: 1fr;
        gap: var(--space-m);
    }
}

/* --- Featured project (home) --------------------------------------------- */
.featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.featured-text h2 {
    margin-bottom: var(--space-m);
}

.featured-text p {
    margin-bottom: var(--space-m);
}

.featured-visual {
    aspect-ratio: 4/5;
    background: linear-gradient(135deg, var(--accent-deep) 0%, var(--accent) 100%);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.15) 0%, transparent 50%);
}

.featured-visual img {
    width: 60%;
    max-width: 280px;
    height: auto;
    position: relative;
    z-index: 1;
    filter: brightness(1.1);
}

@media (max-width: 900px) {
    .featured { grid-template-columns: 1fr; }
}

/* --- About / Founder section --------------------------------------------- */
.founder {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-2xl);
    align-items: start;
    padding: var(--space-2xl) 0;
}

.founder-photo {
    aspect-ratio: 4/5;
    background: var(--paper-soft);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-mute);
    font-size: 0.85rem;
    overflow: hidden;
}

.founder-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.founder-text .eyebrow {
    margin-bottom: var(--space-s);
}

.founder-text h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    margin-bottom: var(--space-s);
}

.founder-text .name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--accent);
    margin-bottom: var(--space-m);
}

.founder-text p { margin-bottom: var(--space-s); }

@media (max-width: 760px) {
    .founder { grid-template-columns: 1fr; }
}

/* --- Timeline / Approach (3 step) ---------------------------------------- */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.step {
    padding: var(--space-l);
    border-right: 1px solid var(--line);
    position: relative;
}

.step:last-child {
    border-right: none;
}

.step-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--accent);
    line-height: 1;
    margin-bottom: var(--space-m);
    font-style: italic;
}

.step h3 {
    margin-bottom: var(--space-s);
}

@media (max-width: 900px) {
    .steps {
        grid-template-columns: 1fr;
    }
    .step {
        border-right: none;
        border-bottom: 1px solid var(--line);
    }
    .step:last-child {
        border-bottom: none;
    }
}

/* --- Capabilities (4 colonne split) -------------------------------------- */
.capabilities {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl) var(--space-2xl);
}

.capability {
    border-top: 1px solid var(--line);
    padding-top: var(--space-m);
}

.capability h3 {
    margin-bottom: var(--space-s);
    color: var(--ink);
}

@media (max-width: 760px) {
    .capabilities { grid-template-columns: 1fr; }
}

/* --- CTA section --------------------------------------------------------- */
.cta {
    text-align: center;
    padding: var(--space-3xl) var(--gutter);
    background: var(--ink);
    color: var(--paper);
    border-radius: 24px;
    margin: var(--space-2xl) 0;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(27,120,136,0.25) 0%, transparent 60%);
    pointer-events: none;
}

.cta-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.cta h2 {
    color: var(--paper);
    margin-bottom: var(--space-s);
    font-weight: 300;
}

.cta p {
    color: rgba(251,250,247,0.75);
    margin: 0 auto var(--space-l);
    max-width: 540px;
    /* Eccezione: il p dentro la card CTA scura è centrato e breve. La
       giustificazione su testo centrato non ha senso. */
    text-align: center;
    hyphens: none;
    -webkit-hyphens: none;
}

.cta .btn-primary {
    background: var(--paper);
    color: var(--ink);
}

.cta .btn-primary:hover {
    background: var(--accent);
    color: var(--paper);
}

/* --- Contacts page ------------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    padding: var(--space-2xl) 0;
}

.contact-block {
    border-top: 1px solid var(--line);
    padding-top: var(--space-m);
}

.contact-block .eyebrow {
    margin-bottom: var(--space-s);
}

.contact-block .value {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--ink);
    word-break: break-word;
}

.contact-block .value a:hover { color: var(--accent); }

@media (max-width: 760px) {
    .contact-grid { grid-template-columns: 1fr; gap: var(--space-l); }
}

/* --- Privacy / legal long-form ------------------------------------------- */
.legal {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--space-2xl) 0;
}

.legal h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: var(--space-l); }
.legal h2 {
    font-size: 1.5rem;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-m);
}
.legal h3 {
    font-size: 1.1rem;
    margin-top: var(--space-l);
    margin-bottom: var(--space-s);
}
.legal p {
    margin-bottom: var(--space-m);
    max-width: none;
}
.legal ul {
    margin: 0 0 var(--space-m) 1.25rem;
    color: var(--ink-soft);
}
.legal ul li { margin-bottom: 0.5rem; }
.legal .meta {
    font-size: 0.875rem;
    color: var(--ink-mute);
    border-bottom: 1px solid var(--line);
    padding-bottom: var(--space-m);
    margin-bottom: var(--space-l);
}

/* --- Footer -------------------------------------------------------------- */
.site-footer {
    border-top: 1px solid var(--line);
    padding: var(--space-xl) 0 var(--space-l);
    background: var(--paper);
    margin-top: var(--space-2xl);
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-l);
    margin-bottom: var(--space-xl);
}

.footer-brand img {
    height: 18px;
    margin-bottom: var(--space-s);
}

.footer-brand p {
    font-size: 0.875rem;
    max-width: 28ch;
    color: var(--ink-mute);
    /* Eccezione: micro-firma del footer, due righe brevi → niente justify */
    text-align: left;
    hyphens: none;
    -webkit-hyphens: none;
}

.footer-col h4 {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-mute);
    margin-bottom: var(--space-s);
}

.footer-col ul {
    list-style: none;
}

.footer-col li { margin-bottom: 0.5rem; }
.footer-col a {
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.footer-col a:hover { color: var(--ink); }

.footer-bottom {
    border-top: 1px solid var(--line);
    padding-top: var(--space-m);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--ink-mute);
    flex-wrap: wrap;
    gap: var(--space-s);
}

/* Dati legali SASU completi — riga sotto al copyright/SIREN.
   Obbligatori per legge LCEN art. 6 III su tutti i siti francesi.
   Stile più piccolo e tenue del footer-bottom, info "ufficiali" in
   tono discreto. */
.footer-legal {
    margin-top: var(--space-s);
    padding-top: var(--space-s);
    font-size: 0.72rem;
    line-height: 1.7;
    color: var(--ink-mute);
    opacity: 0.75;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
}
.footer-legal span {
    /* white-space:nowrap impedisce che le voci legali si spezzino tra parole
       quando vanno a capo. Su mobile va naturalmente multilinea. */
    white-space: nowrap;
}
.footer-legal .sep {
    opacity: 0.5;
}

@media (max-width: 760px) {
    .footer-inner { grid-template-columns: 1fr 1fr; gap: var(--space-l); }
    .footer-brand { grid-column: 1 / -1; }
    .footer-legal { font-size: 0.68rem; gap: 0.3rem; }
}

/* --- Animations ---------------------------------------------------------- */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .fade-up { opacity: 1; transform: none; }
}

/* --- Utilities ----------------------------------------------------------- */
.text-center { text-align: center; }
.mt-l { margin-top: var(--space-l); }
.mt-xl { margin-top: var(--space-xl); }
.mb-l { margin-bottom: var(--space-l); }

/* Decorative inline mark pattern */
.mono-deco {
    font-family: var(--font-display);
    font-style: italic;
    color: var(--accent);
}

/* =======================================================================
   ANAXIMAE — EXTENSIONS (v2)
   New: Projects index page · cursor-aware hero glow · marquee · word reveal
        capabilities glow border · stagger reveal · footer skyline.
   Tutte le aggiunte sono additive — non rompo nulla del design esistente.
   ======================================================================= */

/* --- Hero "wow" : cursor-aware glow ------------------------------------ */
/* Il pseudo-element ::before del hero esisteva già come glow centrato.
   Lo trasformo in un blob che insegue lentamente il cursore via JS che
   imposta --hero-mouse-x/y come custom properties. Se JS non gira, resta
   centrato come prima. */
.hero {
    /* Variabili default → centro hero */
    --hero-mouse-x: 50%;
    --hero-mouse-y: 30%;
}

.hero::before {
    /* Override del glow esistente: ora segue il cursore con transition lenta */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: none;
    background:
        radial-gradient(circle at var(--hero-mouse-x) var(--hero-mouse-y),
            var(--accent-glow) 0%, transparent 50%);
    transition: background 1.2s ease;
}

/* --- Word-by-word reveal sul display headline -------------------------- */
/* JS spezza il h1.display in <span class="word"> dopo il page load
   e li rivela uno alla volta con stagger. Se JS è off, il display è
   già visibile (il fade-up generale sul .hero-inner copre il caso). */
.display .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.4em);
    transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.display .word.is-revealed {
    opacity: 1;
    transform: translateY(0);
}
/* Stesso pattern per <em> tag dentro al display */
.display em .word {
    color: var(--accent);
    font-style: italic;
    font-weight: 400;
}

/* --- Marquee "engineered with" sotto al hero --------------------------- */
.marquee {
    overflow: hidden;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 1.5rem 0;
    background: var(--paper);
    position: relative;
    /* Gradient mask sui bordi laterali — effetto fade-out */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 50s linear infinite;
    /* will-change su trasform → GPU accelerato */
    will-change: transform;
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    padding: 0 2.5rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-mute);
    white-space: nowrap;
}

.marquee-item::after {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    margin-left: 2.5rem;
    opacity: 0.5;
}
.marquee-item:last-child::after { display: none; }

@keyframes marquee-scroll {
    /* Sposta di metà larghezza (la track contiene 2 copie consecutive degli
       item, il loop sembra continuo) */
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* --- Capabilities con border-glow al hover ----------------------------- */
.capability {
    /* Aggiunta sopra le regole esistenti — diventa interactive */
    position: relative;
    transition: padding-left 0.4s ease;
    cursor: default;
}
.capability::before {
    /* Linea verticale che si "estende" dall'alto in basso al hover */
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 0;
    background: linear-gradient(180deg, var(--accent), transparent);
    transition: height 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.capability:hover {
    padding-left: 1.25rem;
}
.capability:hover::before {
    height: 100%;
}
.capability:hover h3 {
    color: var(--accent);
}
.capability h3 {
    transition: color 0.3s ease;
}

/* --- Featured project : parallax mark al hover ------------------------- */
.featured-visual {
    /* Già presente. Aggiungo cursor + smooth interaction */
    cursor: default;
    transform: translateZ(0); /* hint GPU */
}
.featured-visual img {
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.featured-visual:hover img {
    transform: scale(1.06) rotate(-2deg);
}

/* --- Step number animato in entrata ----------------------------------- */
.step.is-visible .step-number {
    /* Quando il fade-up scatta, il numero "scrive" la propria forma */
    animation: step-number-reveal 0.8s ease 0.2s both;
}
@keyframes step-number-reveal {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
        letter-spacing: -0.05em;
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        letter-spacing: 0;
    }
}

/* --- Stagger reveal interno (più progetti, più capabilities, ecc.) ---- */
/* Pattern: chi ha la classe .fade-up + var --reveal-delay viene rivelato
   con quel delay, sovrascrivendo il default 0s del transition.
   Usato sulle project-card per stagger naturale. */
.fade-up {
    transition-delay: var(--reveal-delay, 0s);
}

/* --- Hero variants ------------------------------------------------------ */
.hero-projects {
    padding-bottom: var(--space-2xl);
}

/* =======================================================================
   PROJECTS PAGE — Grid + Card design
   ======================================================================= */

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-l);
    margin-top: var(--space-l);
}

@media (min-width: 760px) {
    /* Su desktop la prima card è full width (featured), poi 2 colonne.
       Implementato col grid-auto-flow per scalare automaticamente. */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .projects-grid .project-card:first-child {
        grid-column: 1 / -1;
    }
}

/* --- Project card ------------------------------------------------------ */
.project-card {
    /* CSS custom properties locali — definite inline da Python (proj.accent_color)
       --card-accent     → colore primario del progetto
       --card-accent-deep → variant più scura per gradient */
    --card-accent: var(--accent);
    --card-accent-deep: var(--accent-deep);

    border-radius: 24px;
    overflow: hidden;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
                border-color 0.3s ease;
    position: relative;
}
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(14, 26, 43, 0.10),
                0 4px 16px rgba(14, 26, 43, 0.04);
    border-color: transparent;
}

.project-card-link {
    display: grid;
    grid-template-columns: 1fr;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

@media (min-width: 760px) {
    /* Solo per la card "featured" (full width, prima della grid),
       layout split: immagine a sinistra, testo a destra */
    .projects-grid .project-card:first-child .project-card-link {
        grid-template-columns: 5fr 4fr;
    }
}

/* --- Visual side della card --- */
.project-card-visual {
    aspect-ratio: 16 / 10;
    background:
        linear-gradient(135deg, var(--card-accent-deep) 0%, var(--card-accent) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 760px) {
    .projects-grid .project-card:first-child .project-card-visual {
        aspect-ratio: auto;
        min-height: 320px;
    }
}

/* Glow radiale che si muove al hover — dà profondità */
.project-card-glow {
    position: absolute;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 60%);
    pointer-events: none;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
                opacity 0.6s ease;
    transform: translate(-20%, -20%);
    opacity: 0.7;
}
.project-card:hover .project-card-glow {
    transform: translate(20%, 20%);
    opacity: 1;
}

/* Pattern decorativo: archi concentrici sottili (rotta/cerchio) */
.project-card-visual::before {
    content: "";
    position: absolute;
    width: 220%;
    height: 220%;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        0 0 0 80px rgba(255, 255, 255, 0.04),
        0 0 0 160px rgba(255, 255, 255, 0.02);
    top: -160%;
    left: -60%;
    pointer-events: none;
}

.project-card-mark {
    /* Il logo Zeppelin Map (e futuri loghi progetti) è in PNG arancione su trasparente.
       brightness(0) invert(1) → lo rende bianco sopra qualsiasi sfondo colorato della card.
       Per progetti con loghi già bianchi/multicolor in futuro, basta togliere il filter
       inline su quella specifica card override. */
    width: 60%;
    max-width: 280px;
    height: auto;
    position: relative;
    z-index: 1;
    /* Floating animation lievissima — simula vita */
    animation: card-mark-float 6s ease-in-out infinite;
    filter: brightness(0) invert(1) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.20));
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.project-card:hover .project-card-mark {
    transform: scale(1.06);
}
@keyframes card-mark-float {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -6px; }
}

/* --- Body side della card --- */
.project-card-body {
    padding: var(--space-l);
    display: flex;
    flex-direction: column;
    gap: var(--space-s);
}

@media (min-width: 760px) {
    .projects-grid .project-card:first-child .project-card-body {
        padding: var(--space-xl) var(--space-l);
        justify-content: center;
    }
}

.project-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-s);
}

.status-badge {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    /* Pallino "live indicator" prima del testo */
}
.status-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-live {
    background: rgba(20, 160, 110, 0.12);
    color: #14A06E;
}
.status-live::before {
    /* Pallino live pulsante */
    animation: pulse-live 2s ease infinite;
}
@keyframes pulse-live {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.5); opacity: 0.5; }
}

.status-coming {
    background: rgba(238, 82, 25, 0.12);
    color: #C8400E;
}
.status-dev {
    background: rgba(27, 120, 136, 0.12);
    color: var(--accent);
}
.status-concept {
    background: rgba(138, 146, 163, 0.12);
    color: var(--ink-mute);
}

.project-card-year {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink-mute);
    letter-spacing: 0.05em;
}

.project-card-name {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.5vw, 2.25rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.015em;
    color: var(--ink);
    margin: 0;
    /* Underline disegnata che appare al hover */
    background-image: linear-gradient(var(--card-accent), var(--card-accent));
    background-size: 0 1.5px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: background-size 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: inline-block;
}
.project-card:hover .project-card-name {
    background-size: 100% 1.5px;
}

.project-card-tagline {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-style: italic;
    font-weight: 400;
    color: var(--card-accent);
    line-height: 1.3;
    margin: 0;
    /* Override generale .text-justify dei p */
    text-align: left;
    hyphens: none;
    -webkit-hyphens: none;
    max-width: none;
}

.project-card-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--ink-soft);
    /* Override del global p justify se eredita dal body */
    text-align: left;
    hyphens: none;
    -webkit-hyphens: none;
    max-width: none;
    margin: 0;
}

.project-card-footer {
    margin-top: auto;
    padding-top: var(--space-m);
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-s);
    flex-wrap: wrap;
}

.project-card-platforms {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.platform-chip {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--ink-mute);
    padding: 0.25rem 0.6rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 6px;
}

.project-card-cta {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--card-accent);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.3s ease;
}
.project-card:hover .project-card-cta {
    gap: 0.7rem;
}
.project-card-cta .arrow {
    transition: transform 0.3s ease;
}
.project-card:hover .project-card-cta .arrow {
    transform: translateX(2px);
}

/* =======================================================================
   MOBILE / REDUCED MOTION REFINEMENTS
   ======================================================================= */

@media (max-width: 760px) {
    /* Su mobile alcune animazioni eleganti diventano fastidiose, le
       attenuo o disabilito */
    .marquee-track { animation-duration: 35s; }
    .project-card-mark { animation: none; }
    .capability:hover { padding-left: 0; }
    .capability::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .display .word { opacity: 1; transform: none; }
    .marquee-track { animation: none; }
    .project-card-mark { animation: none; }
    .step.is-visible .step-number { animation: none; }
    .status-live::before { animation: none; }
}
