:root {
    --font-display: 'Bebas Neue', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;

    --color-bg: #080808;
    --color-surface: #0f0f0f;
    --color-surface-2: #141414;
    --color-border: #1a1a1a;
    --color-text-hi: #f0f0f0;
    --color-text-lo: #7a7a7a;
    --color-text-mid: #999;
    --color-accent: #e8c200;
    --color-accent-dim: rgba(232, 194, 0, 0.1);

    /* Legacy aliases per i componenti esistenti */
    --font-color: var(--color-text-hi);
    --background-color: var(--color-bg);
    --background-secondary: var(--color-surface);
    --background-dark: #000;
    --paper-color: var(--color-surface);
    --accent-color: var(--color-accent);
    --accent-deep: var(--color-accent);
    --button-color: var(--color-text-hi);

    /* Layout */
    --media-radius: 0px;
    --section-padding: 96px 0;
    --section-grid-gap: 48px;
    --container-max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text-hi);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

/* ── Container ── */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Tipografia ── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.02em;
    color: var(--color-text-hi);
    margin: 0;
}

h1 { font-size: clamp(72px, 12vw, 140px); }
h2 { font-size: clamp(40px, 6vw, 72px); }
h3 { font-size: clamp(24px, 3vw, 36px); }
h4 { font-size: 20px; }

p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* eyebrow: neutro, senza accento — il colore è riservato alla release */
.eyebrow {
    font-family: var(--font-body);
    font-size: 10px;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--color-text-mid);
    margin: 0 0 20px;
    font-weight: 400;
    display: block;
}

section { padding: var(--section-padding); }

/* ── Bottoni — monocromatici ── */
.btn, a.btn, button.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-text-hi);
    color: var(--color-bg);
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    border: none;
    border-radius: 0;
    padding: 14px 28px;
    cursor: pointer;
    transition: opacity 200ms ease, transform 350ms cubic-bezier(0.16, 1, 0.3, 1);
    line-height: 1;
}

.btn:hover, a.btn:hover, button.btn:hover {
    opacity: 0.80;
    color: var(--color-bg);
    background: var(--color-text-hi);
    transform: none;
    box-shadow: none;
}

.btn:focus, .btn:active {
    background: var(--color-text-hi);
    color: var(--color-bg);
    box-shadow: none;
    outline: 2px solid var(--color-text-hi);
    outline-offset: 3px;
}

.btn-ghost {
    background: transparent !important;
    color: var(--color-text-hi) !important;
    border: 1px solid var(--color-border) !important;
}

.btn-ghost:hover {
    background: var(--color-surface-2) !important;
    border-color: rgba(240, 240, 240, 0.2) !important;
    color: var(--color-text-hi) !important;
    opacity: 1 !important;
}

.btn-outline {
    background: transparent !important;
    color: var(--color-text-mid) !important;
    border: 1px solid var(--color-border) !important;
}

.btn-outline:hover {
    background: var(--color-surface-2) !important;
    color: var(--color-text-hi) !important;
    border-color: rgba(240, 240, 240, 0.2) !important;
    opacity: 1 !important;
}

/* ── Header ── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 24px 0;
    transition: background 300ms ease, padding 300ms ease, border-color 300ms ease;
    border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
    background: rgba(8, 8, 8, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 16px 0;
    border-bottom-color: var(--color-border);
}

.site-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.site-header__brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.site-header__brand-mark {
    font-family: var(--font-display);
    font-size: 26px;
    letter-spacing: 3px;
    color: var(--color-text-hi);
    line-height: 1;
    min-height: auto;
    padding: 0;
    background: none;
    border-radius: 0;
}

.site-header__nav {
    display: flex;
    align-items: center;
    gap: 36px;
    flex-wrap: nowrap;
}

.site-header__nav a {
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-text-lo);
    font-weight: 400;
    transition: color 200ms ease;
    white-space: nowrap;
}

.site-header__nav a:hover { color: var(--color-text-hi); }

/* Pagina corrente: testo pieno + filetto in accento */
.site-header__nav a.is-active {
    color: var(--color-text-hi);
    position: relative;
}

.site-header__nav a.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -7px;
    height: 1px;
    background: var(--color-accent);
}

/* CTA header: neutro */
.site-header__cta {
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-text-hi);
    border: 1px solid var(--color-border);
    padding: 10px 18px;
    transition: border-color 200ms ease, background 200ms ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.site-header__cta:hover {
    border-color: rgba(240, 240, 240, 0.3);
    background: rgba(240, 240, 240, 0.04);
    color: var(--color-text-hi);
}

.site-header__cta.is-active {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* ── Footer ── */
footer {
    padding: 56px 0 40px;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-lo);
}

.site-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: end;
}

.site-footer__name {
    font-family: var(--font-display);
    font-size: 36px;
    letter-spacing: 3px;
    color: var(--color-text-hi);
    line-height: 1;
    margin-bottom: 10px;
}

.site-footer__line {
    font-size: 11px;
    color: var(--color-text-lo);
    margin-top: 6px;
    letter-spacing: 1px;
    line-height: 1.6;
}

.site-footer__line a {
    color: var(--color-text-lo);
    transition: color 200ms ease;
}

.site-footer__line a:hover { color: var(--color-text-hi); }

.site-footer__links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.site-footer__links a {
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-text-lo);
    transition: color 200ms ease;
}

.site-footer__links a:hover { color: var(--color-text-hi); }

footer a { color: var(--color-text-lo); }

/* ── Section heading condiviso ── */
.section-heading { margin-bottom: 56px; }

/* ── Animazioni entry ── */
.js-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 700ms ease, transform 700ms ease;
}

.js-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reveal clip-path — per il panel release full-bleed */
.js-clip-reveal {
    clip-path: inset(0 0 100% 0);
    transition: clip-path 1.4s cubic-bezier(0.76, 0, 0.24, 1);
}

.js-clip-reveal.is-visible {
    clip-path: inset(0 0 0% 0);
}

@media (prefers-reduced-motion: reduce) {
    .js-reveal, .js-clip-reveal {
        opacity: 1;
        transform: none;
        clip-path: none !important;
        transition: none;
    }
}

/* ── Page intro ── */
#ander-intro {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 450ms cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

#ander-intro__word {
    font-family: var(--font-display);
    font-size: clamp(56px, 10vw, 112px);
    letter-spacing: 0.25em;
    color: var(--color-text-hi);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 350ms ease, transform 350ms ease;
}

#ander-intro.is-entering #ander-intro__word {
    opacity: 1;
    transform: translateY(0);
}

#ander-intro.is-fading {
    opacity: 0;
}

.no-intro #ander-intro { display: none; }

/* ── Mobile nav ── */
.site-header__menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 9px;
    flex-shrink: 0;
}

.site-header__menu-btn__line {
    display: block;
    width: 22px;
    height: 1px;
    background: var(--color-text-hi);
    transition: transform 250ms ease, opacity 250ms ease;
    transform-origin: center;
}

.site-header__menu-btn.is-open .site-header__menu-btn__line:first-child {
    transform: translateY(3.5px) rotate(45deg);
}

.site-header__menu-btn.is-open .site-header__menu-btn__line:last-child {
    transform: translateY(-3.5px) rotate(-45deg);
}

.mobile-nav {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
}

.mobile-nav.is-open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-align: center;
}

.mobile-nav__link {
    font-family: var(--font-display);
    font-size: clamp(44px, 14vw, 64px);
    letter-spacing: 0.05em;
    color: var(--color-text-lo);
    text-transform: uppercase;
    padding: 10px 0;
    transition: color 200ms ease;
    line-height: 1;
    display: block;
}

.mobile-nav__link:hover,
.mobile-nav__link:focus { color: var(--color-text-hi); }

.mobile-nav__link.is-active {
    color: var(--color-text-hi);
    position: relative;
}

/* Trattino in accento a sinistra della voce corrente */
.mobile-nav__link.is-active::before {
    content: "";
    position: absolute;
    top: 50%;
    right: calc(100% + 18px);
    width: 22px;
    height: 1px;
    background: var(--color-accent);
}

.mobile-nav__link--cta {
    font-family: var(--font-body);
    font-size: 10px;
    letter-spacing: 4px;
    color: var(--color-text-mid);
    margin-top: 36px;
    border: 1px solid var(--color-border);
    padding: 14px 28px;
    transition: border-color 200ms ease, color 200ms ease;
}

.mobile-nav__link--cta:hover {
    border-color: rgba(240, 240, 240, 0.3);
    color: var(--color-text-hi);
}

.mobile-nav__link--cta.is-active {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.mobile-nav__link--cta.is-active::before { display: none; }

body.nav-open { overflow: hidden; }

/* ── Custom cursor ── */
@media (hover: hover) and (pointer: fine) {
    body, a, button, [role="button"] { cursor: none; }

    #ander-cursor {
        position: fixed;
        top: 0;
        left: 0;
        width: 8px;
        height: 8px;
        background: var(--color-text-hi);
        border-radius: 50%;
        pointer-events: none;
        z-index: 99998;
        mix-blend-mode: difference;
        will-change: transform;
    }
}

/* ── Scroll progress bar ── */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 1px;
    width: 0%;
    background: var(--color-accent);
    z-index: 10002;
    pointer-events: none;
    transition: width 60ms linear;
}

/* ── Hero elements reveal ── */
.ander-hero .eyebrow,
.ander-hero h1,
.ander-hero .hero-copy__lead,
.ander-hero .hero-bpm,
.ander-hero .hero-actions,
.ander-hero .hero-scroll-hint {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.75s ease, transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

body.hero-revealed .ander-hero .eyebrow        { opacity: 1; transform: translateY(0); transition-delay: 0s; }
body.hero-revealed .ander-hero h1              { opacity: 1; transform: translateY(0); transition-delay: 0.12s; }
body.hero-revealed .ander-hero .hero-copy__lead{ opacity: 1; transform: translateY(0); transition-delay: 0.28s; }
body.hero-revealed .ander-hero .hero-bpm       { opacity: 1; transform: translateY(0); transition-delay: 0.40s; }
body.hero-revealed .ander-hero .hero-actions   { opacity: 1; transform: translateY(0); transition-delay: 0.52s; }
body.hero-revealed .ander-hero .hero-scroll-hint { opacity: 1; transform: translateY(0); transition-delay: 0.7s; }

@media (prefers-reduced-motion: reduce) {
    .ander-hero .eyebrow,
    .ander-hero h1,
    .ander-hero .hero-copy__lead,
    .ander-hero .hero-bpm,
    .ander-hero .hero-actions,
    .ander-hero .hero-scroll-hint {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ── Mobile ── */
@media (max-width: 768px) {
    :root { --section-padding: 72px 0; }

    h1 { font-size: clamp(64px, 18vw, 120px); }
    h2 { font-size: clamp(36px, 10vw, 60px); }

    .site-header__nav { display: none; }
    .site-header__cta { display: none; }
    .site-header__menu-btn { display: flex; }

    .site-footer {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .site-footer__links {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px 20px;
    }
}
