/* ============================================================
   BCUBE — Premium Redesign
   Stack: HTML5 + CSS3 + Vanilla JS + GSAP + Lenis
   ============================================================ */

/* ── CUSTOM PROPERTIES ─────────────────────────────────────── */
:root {
    --bg:            #f5f5f0;
    --bg-alt:        #ebebe6;
    --bg-card:       #ffffff;
    --text:          #0d0d0f;
    --text-2:        #6e6e73;
    --text-3:        #aeaeb2;
    --border:        rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.14);
    --accent:        #0071e3;
    --accent-hover:  #0077ed;
    --fit-accent:    #0071e3;
    --med-accent:    #00897b;
    --clinic-accent: #b07844;
    --nav-h:         64px;
    --nav-bg:        rgba(245, 245, 240, 0.88);
    --nav-blur:      20px;
    --section-gap:   120px;
    --container:     1180px;
    --r:             14px;
    --r-sm:          8px;
    --font:          'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --ease:          cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out:      cubic-bezier(0, 0, 0.2, 1);
    --t:             0.35s;
}

[data-theme="dark"] {
    --bg:            #080c14;
    --bg-alt:        #0e1420;
    --bg-card:       #111827;
    --text:          #f0f0eb;
    --text-2:        #8d8d99;
    --text-3:        #56565e;
    --border:        rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.12);
    --nav-bg:        rgba(8, 12, 20, 0.88);
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

/* ── UTILITIES ──────────────────────────────────────────────── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}
.eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}
.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
/* ── BUTTONS ────────────────────────────────────────────────── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    padding: 14px 28px;
    border-radius: 50px;
    transition: background var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 113, 227, 0.35);
}
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    padding: 13px 28px;
    border-radius: 50px;
    border: 1px solid var(--border-strong);
    transition: all var(--t) var(--ease);
}
.btn-ghost:hover {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
    transform: translateY(-2px);
}

/* ── LOADER ─────────────────────────────────────────────────── */
.loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s var(--ease), visibility 0.6s var(--ease);
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner  { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.loader-logo img {
    height: 60px;
    mix-blend-mode: multiply;
    animation: loaderPulse 1.4s ease-in-out infinite;
}
[data-theme="dark"] .loader-logo img {
    mix-blend-mode: normal;
    filter: none;
    border-radius: 8px;
}
@keyframes loaderPulse { 0%,100%{opacity:1} 50%{opacity:0.5} }
.loader-bar {
    width: 180px; height: 2px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}
.loader-fill {
    height: 100%; width: 0%;
    background: var(--accent);
    border-radius: 2px;
    animation: loaderFill 1.6s var(--ease-out) forwards;
}
@keyframes loaderFill { to { width: 100%; } }

/* ── CURSOR ─────────────────────────────────────────────────── */
.cursor-dot {
    position: fixed;
    top: 0; left: 0;
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s var(--ease), opacity 0.3s var(--ease);
    mix-blend-mode: normal;
}
.cursor-dot.expanded {
    width: 44px; height: 44px;
    background: rgba(0, 113, 227, 0.12);
    border: 1.5px solid rgba(0, 113, 227, 0.5);
}
@media (hover: none) { .cursor-dot { display: none; } }

/* ── SCROLL PROGRESS ────────────────────────────────────────── */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px; width: 0%;
    background: var(--accent);
    z-index: 9997;
    transition: width 0.05s linear;
    transform-origin: left;
}

/* ── NAV ────────────────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 900;
    border-bottom: 1px solid transparent;
    transition: background var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.nav.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(var(--nav-blur));
    -webkit-backdrop-filter: blur(var(--nav-blur));
    border-bottom-color: var(--border);
    box-shadow: 0 1px 0 var(--border);
}
.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-logo-link { flex-shrink: 0; line-height: 0; }
.nav-logo-img {
    height: 38px;
    mix-blend-mode: multiply;
    transition: opacity var(--t) var(--ease);
}
.nav-logo-img:hover { opacity: 0.75; }
[data-theme="dark"] .nav-logo-link {
    background: rgba(255,255,255,0.9);
    border-radius: 6px;
    padding: 3px 8px;
}
[data-theme="dark"] .nav-logo-img {
    mix-blend-mode: normal;
    filter: none;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0 auto;
}
.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    padding: 7px 14px;
    border-radius: 50px;
    transition: color var(--t) var(--ease), background var(--t) var(--ease);
}
.nav-link:hover, .nav-link.active {
    color: var(--text);
    background: var(--border);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.lang-switcher { display: flex; align-items: center; gap: 4px; }
.lang-sep { font-size: 12px; color: var(--text-3); }
.lang-btn {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-2);
    padding: 4px 4px;
    transition: color var(--t) var(--ease);
}
.lang-btn.active { color: var(--text); }
.lang-btn:hover  { color: var(--text); }
.theme-btn {
    width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: var(--text-2);
    border: 1px solid var(--border);
    font-size: 13px;
    transition: all var(--t) var(--ease);
}
.theme-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--border); }
/* ── MEMBER AREA BUTTON ─────────────────────────────────────── */
.nav-member {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border: 1px solid rgba(0,113,227,0.45);
    border-radius: 50px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.025em;
    text-decoration: none;
    background: rgba(0,113,227,0.05);
    position: relative;
    overflow: hidden;
    transition: color 0.28s var(--ease), border-color 0.28s var(--ease), box-shadow 0.28s var(--ease);
    animation: memberPulse 3.5s ease-in-out infinite;
}
.nav-member::after {
    content: '';
    position: absolute; inset: 0;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.28s var(--ease);
}
.nav-member:hover {
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 22px rgba(0,113,227,0.32);
    animation: none;
}
.nav-member:hover::after { opacity: 1; }
.nav-member-icon,
.nav-member span { position: relative; z-index: 1; }
.nav-member-icon {
    font-size: 11px;
    transition: transform 0.35s var(--ease);
}
.nav-member:hover .nav-member-icon { transform: rotate(-15deg) scale(1.2); }

@keyframes memberPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,113,227,0); }
    50%       { box-shadow: 0 0 0 4px rgba(0,113,227,0.12); }
}

.nav.over-hero .nav-member {
    border-color: rgba(255,255,255,0.35);
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.07);
    animation: memberPulseLight 3.5s ease-in-out infinite;
}
.nav.over-hero .nav-member:hover {
    border-color: rgba(255,255,255,0.9);
    color: #fff;
    background: rgba(255,255,255,0.14);
    box-shadow: 0 4px 22px rgba(0,0,0,0.25);
    animation: none;
}
.nav.over-hero .nav-member::after { background: rgba(255,255,255,0.12); }
@keyframes memberPulseLight {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
    50%       { box-shadow: 0 0 0 4px rgba(255,255,255,0.1); }
}

.mobile-member {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: 1px solid rgba(0,113,227,0.5);
    border-radius: 50px;
    color: var(--accent);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 12px;
    transition: all 0.25s var(--ease);
}
.mobile-member:hover { background: rgba(0,113,227,0.08); }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 4px;
    margin-left: auto;
}
.hamburger span {
    display: block;
    width: 22px; height: 1.5px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--t) var(--ease), opacity var(--t) var(--ease);
}
.hamburger.open span:first-child { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:last-child  { transform: translateY(-7.5px) rotate(-45deg); }

/* ── MOBILE NAV ─────────────────────────────────────────────── */
.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 850;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    padding: 100px 40px 60px;
    transform: translateX(100%);
    transition: transform 0.55s cubic-bezier(0.77, 0, 0.175, 1);
    pointer-events: none;
}
.mobile-nav.open { transform: translateX(0); pointer-events: all; }
.mobile-nav-inner { display: flex; flex-direction: column; gap: 0; flex: 1; justify-content: center; }
.mobile-link {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    transition: color var(--t) var(--ease), padding-left var(--t) var(--ease);
    display: block;
}
.mobile-link:last-of-type { border-bottom: none; }
.mobile-link:hover { color: var(--accent); padding-left: 10px; }
.mobile-bottom {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 40px;
}
.mobile-cta {
    display: inline-flex;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    padding: 13px 32px;
    border-radius: 50px;
    transition: background var(--t) var(--ease);
}
.mobile-cta:hover { background: var(--accent-hover); }
.mobile-lang { display: flex; align-items: center; gap: 6px; }

/* ── HERO — Dark Cinematic ───────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100svh;
    background: #06080f;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: var(--nav-h);
}

/* Immagine evocativa sfondo */
.hero-img-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-bg-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    opacity: 0.18;
    filter: grayscale(0.2) brightness(0.9);
    transition: opacity 1.2s ease;
}

/* Canvas particelle */
.hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    opacity: 0.7;
}

/* Gradient radiale morbido al centro */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 40%,
            rgba(0,113,227,0.08) 0%,
            transparent 70%),
        radial-gradient(ellipse 40% 40% at 80% 70%,
            rgba(0,137,123,0.05) 0%,
            transparent 60%);
    pointer-events: none;
}

/* Contenuto hero */
.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
    padding: 60px 24px 80px;
    max-width: 900px;
    width: 100%;
}

/* Logo fantasma pervasivo */
.hero-logo-ghost {
    position: absolute;
    width: min(92vw, 1080px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}
.hero-logo-ghost-img {
    width: 100%;
    height: auto;
    filter: brightness(30) saturate(0);
    opacity: 0.032;
    animation: ghostBreathe 10s ease-in-out infinite alternate;
}
@keyframes ghostBreathe {
    from { opacity: 0.028; transform: scale(1); }
    to   { opacity: 0.048; transform: scale(1.025); }
}

/* Logo badge — protagonista assoluto */
.hero-badge {
    background: rgba(255,255,255,0.97);
    border-radius: 28px;
    padding: 56px 96px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 52px;
    position: relative;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.06),
        0 40px 100px rgba(0,0,0,0.55),
        0 0 120px rgba(0,113,227,0.22),
        0 0 240px rgba(0,113,227,0.08);
    opacity: 0;
    animation: badgeIn 1.1s 0.35s var(--ease-out) forwards;
}
.hero-badge::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 29px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent 60%);
    pointer-events: none;
}
.hero-badge-img {
    height: 340px;
    width: auto;
    display: block;
    position: relative;
    z-index: 1;
}
@keyframes badgeIn {
    from { opacity: 0; transform: scale(0.88) translateY(16px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Tagline orizzontale */
.hero-tagline-row {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: clamp(1.1rem, 2.4vw, 1.8rem);
    font-weight: 300;
    letter-spacing: 0.02em;
    color: rgba(240,240,235,0.55);
    margin-bottom: 28px;
    opacity: 0;
    animation: fadeUp 0.8s 1.1s var(--ease-out) forwards;
}
.hero-tagline-row .ht-dot { color: rgba(240,240,235,0.18); font-size: 0.6em; }
.ht-pill {
    font-weight: 700;
    transition: opacity var(--t) var(--ease);
}
.ht-pill:hover { opacity: 0.75; letter-spacing: 0.1em; }
.ht-pill.ht-fit    { color: #0071e3; }
.ht-pill.ht-med    { color: #00897b; }
.ht-pill.ht-clinic { color: #b07844; }

/* Payoff */
.hero-payoff {
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.01em;
    color: rgba(240,240,235,0.88);
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeIn 0.9s 1.1s var(--ease-out) forwards;
}

/* CTA row */
.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeUp 0.8s 1.5s var(--ease-out) forwards;
}
/* Location label */
.hero-location {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(240,240,235,0.3);
    opacity: 0;
    animation: fadeIn 0.8s 1.8s var(--ease-out) forwards;
}

/* Scroll hint */
.hero-scroll-hint {
    position: absolute;
    bottom: 36px; left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeIn 1s 2.2s var(--ease-out) forwards;
}
.scroll-line {
    width: 1px; height: 56px;
    background: linear-gradient(to bottom, rgba(0,113,227,0.8), transparent);
    animation: scrollAnim 2.5s ease-in-out infinite;
    transform-origin: top;
}
@keyframes scrollAnim { 0%,100%{transform:scaleY(1);opacity:1} 50%{transform:scaleY(0.5);opacity:0.2} }

/* Nav sopra hero scuro: testo bianco */
.nav.over-hero .nav-link { color: rgba(255,255,255,0.6); }
.nav.over-hero .nav-link:hover,
.nav.over-hero .nav-link.active { color: #fff; background: rgba(255,255,255,0.08); }
.nav.over-hero .lang-btn { color: rgba(255,255,255,0.5); }
.nav.over-hero .lang-btn.active { color: rgba(255,255,255,0.9); }
.nav.over-hero .lang-sep { color: rgba(255,255,255,0.2); }
.nav.over-hero .theme-btn { color: rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.12); }
.nav.over-hero .theme-btn:hover { color: #fff; border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.06); }
.nav.over-hero .hamburger span { background: rgba(255,255,255,0.85); }
.nav.over-hero .nav-logo-link { background: rgba(255,255,255,0.9); border-radius: 8px; padding: 3px 10px; }
.nav.over-hero .nav-logo-img { mix-blend-mode: normal; filter: none; }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }

/* ── FERITOIA ────────────────────────────────────────────────── */
.feritoia {
    position: relative;
    height: 160px;
    overflow: hidden;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: #06080f;
}

/* Sbiadisce i bordi laterali per integrare la feritoia nella pagina */
.feritoia::before,
.feritoia::after {
    content: '';
    position: absolute;
    inset-block: 0;
    width: 18%;
    z-index: 2;
    pointer-events: none;
}
.feritoia::before {
    left: 0;
    background: linear-gradient(to right, var(--bg) 0%, transparent 100%);
}
.feritoia::after {
    right: 0;
    background: linear-gradient(to left, var(--bg) 0%, transparent 100%);
}

/* Ogni frame è l'immagine grande che si muove dietro alla feritoia */
.feritoia-frame {
    position: absolute;
    /* Molto più grande della feritoia: 160% wide, 700px tall */
    width: 160%;
    height: 700px;
    top: -230px;
    left: -30%;
    background-size: cover;
    background-position: center 40%;
    opacity: 0;
    will-change: transform, opacity;
}

.f1 {
    background-image: url('https://images.unsplash.com/photo-1571019614242-c5c5dee9f50b?w=1800&q=80');
    animation: fFade1 24s ease-in-out infinite, fDrift 24s ease-in-out infinite 0s;
}
.f2 {
    background-image: url('https://images.unsplash.com/photo-1576091160550-2173dba999ef?w=1800&q=80');
    animation: fFade2 24s ease-in-out infinite, fDrift 24s ease-in-out infinite -8s;
}
.f3 {
    background-image: url('https://images.unsplash.com/photo-1544367567-0f2fcb009e0b?w=1800&q=80');
    animation: fFade3 24s ease-in-out infinite, fDrift 24s ease-in-out infinite -16s;
}

/* Movimento diagonale — la parte visibile nella feritoia scivola lentamente */
@keyframes fDrift {
    0%   { transform: translate(0%,   0%);   }
    50%  { transform: translate(-7%,  -18%); }
    100% { transform: translate(-14%, -36%); }
}

/* Ogni immagine è visibile per ~8s su 24s, con crossfade da 2s */
@keyframes fFade1 {
    0%   { opacity: 1; }
    33%  { opacity: 1; }
    42%  { opacity: 0; }
    100% { opacity: 0; }
}
@keyframes fFade2 {
    0%   { opacity: 0; }
    33%  { opacity: 0; }
    42%  { opacity: 1; }
    75%  { opacity: 1; }
    84%  { opacity: 0; }
    100% { opacity: 0; }
}
@keyframes fFade3 {
    0%   { opacity: 0; }
    66%  { opacity: 0; }
    75%  { opacity: 1; }
    100% { opacity: 1; }
}

.pillars-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 12px;
}
.pill-link {
    font-size: 14px;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 50px;
    border: 1px solid var(--border-strong);
    color: var(--text-2);
    letter-spacing: 0.02em;
    transition: all var(--t) var(--ease);
}
.pill-link:hover { transform: translateY(-2px); }
.pill-fit:hover    { border-color:var(--fit-accent);    color:var(--fit-accent);    background:rgba(0,113,227,0.06); }
.pill-med:hover    { border-color:var(--med-accent);    color:var(--med-accent);    background:rgba(0,137,123,0.06); }
.pill-clinic:hover { border-color:var(--clinic-accent); color:var(--clinic-accent); background:rgba(176,120,68,0.06); }

/* ── PILLAR SECTIONS ────────────────────────────────────────── */
.pillar {
    padding: 100px 0;
    border-top: 1px solid var(--border);
    overflow: hidden;
}
.pillar-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}
.pillar-reverse .pillar-inner {
    direction: rtl;
}
.pillar-reverse .pillar-inner > * { direction: ltr; }

.pillar-img-wrap {
    border-radius: var(--r);
    overflow: hidden;
    aspect-ratio: 3/4;
    position: relative;
}
.pillar-img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.9s var(--ease);
    will-change: transform;
}
.pillar-img-wrap:hover .pillar-img { transform: scale(1.05); }

[data-pillar="clinic"] .pillar-img {
    filter: brightness(0.92) contrast(1.08) saturate(0.75) hue-rotate(190deg);
}
[data-pillar="clinic"] .pillar-img-wrap::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(176,120,68,0.08) 0%, rgba(0,60,120,0.22) 100%);
    pointer-events: none;
}

.pillar-content {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.pillar-tag-row { display: flex; align-items: center; gap: 10px; }
.pillar-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--fit-accent);
    flex-shrink: 0;
}
[data-pillar="med"]    .pillar-dot { background: var(--med-accent); }
[data-pillar="clinic"] .pillar-dot { background: var(--clinic-accent); }
.pillar-tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--fit-accent);
}
[data-pillar="med"]    .pillar-tag { color: var(--med-accent); }
[data-pillar="clinic"] .pillar-tag { color: var(--clinic-accent); }
.pillar-title {
    font-size: clamp(2.4rem, 4vw, 3.8rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.pillar-title em {
    font-style: normal;
    font-weight: 700;
    color: var(--fit-accent);
}
[data-pillar="med"]    .pillar-title em { color: var(--med-accent); }
[data-pillar="clinic"] .pillar-title em { color: var(--clinic-accent); }
.pillar-desc {
    font-size: 17px;
    color: var(--text-2);
    line-height: 1.7;
}
.pillar-subdesc {
    font-size: 15px;
    color: var(--text-2);
    line-height: 1.7;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    margin-top: -6px;
}
.pillar-list {
    display: flex;
    flex-direction: column;
}
.pillar-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--text-2);
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    transition: color var(--t) var(--ease), padding-left var(--t) var(--ease);
}
.pillar-list li::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--fit-accent);
    flex-shrink: 0;
    opacity: 0.6;
}
[data-pillar="med"]    .pillar-list li::before { background: var(--med-accent); }
[data-pillar="clinic"] .pillar-list li::before { background: var(--clinic-accent); }
.pillar-list li:hover { color: var(--text); padding-left: 4px; }
.pillar-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--fit-accent);
    margin-top: 4px;
    transition: gap var(--t) var(--ease);
}
.pillar-cta:hover { gap: 14px; }
[data-pillar="med"]    .pillar-cta { color: var(--med-accent); }
[data-pillar="clinic"] .pillar-cta { color: var(--clinic-accent); }

/* ── ABOUT ──────────────────────────────────────────────────── */
.about {
    padding: var(--section-gap) 0;
    background: var(--bg-alt);
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.about-content { display: flex; flex-direction: column; gap: 20px; }
.about-lead {
    font-size: 19px;
    color: var(--text-2);
    line-height: 1.7;
    font-weight: 400;
}
.about-text { font-size: 16px; color: var(--text-2); line-height: 1.7; }
.about-stats {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}
.stat-item { display: flex; flex-direction: column; gap: 4px; }
.stat-n {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--text);
}
.stat-n .stat-suffix { font-size: 1.8rem; }
.stat-l { font-size: 13px; color: var(--text-2); font-weight: 500; }

.about-media { position: relative; }

/* ── VITRUVIAN HOLOGRAM ──────────────────────────────────── */
.vit-scene {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.vit-ring {
    position: absolute;
    top: 50%; left: 50%;
    border-radius: 50%;
    pointer-events: none;
}
.vit-ring-1 {
    width: 90%; aspect-ratio: 1/1;
    border: 1px solid rgba(0,113,227,0.30);
    animation: vitRing 24s linear infinite;
    transform: translate(-50%,-50%);
}
.vit-ring-2 {
    width: 110%; aspect-ratio: 1/1;
    border: 1px dashed rgba(0,113,227,0.16);
    animation: vitRing 44s linear infinite reverse;
    transform: translate(-50%,-50%);
}
.vit-ring-3 {
    width: 128%; aspect-ratio: 1/1;
    border: 1px solid rgba(0,137,123,0.15);
    animation: vitRing 68s linear infinite;
    transform: translate(-50%,-50%);
}
@keyframes vitRing {
    from { transform: translate(-50%,-50%) rotate(0deg); }
    to   { transform: translate(-50%,-50%) rotate(360deg); }
}

.vit-frame {
    position: relative;
    width: 80%;
    aspect-ratio: 3/4;
    border-radius: 6px;
    overflow: hidden;
    background: #030a15;
    transition: transform 0.12s ease-out, box-shadow 0.35s ease;
    box-shadow:
        0 0 0 1px rgba(0,113,227,0.22),
        0 0 40px rgba(0,113,227,0.18),
        0 0 90px rgba(0,113,227,0.09);
    will-change: transform;
}
.vit-frame:hover {
    box-shadow:
        0 0 0 1px rgba(0,113,227,0.40),
        0 0 60px rgba(0,113,227,0.28),
        0 0 130px rgba(0,113,227,0.14);
}

.vit-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    filter: invert(1) hue-rotate(185deg) saturate(2) brightness(0.55) contrast(1.2);
}

/* Strato "originale" rivelato dalla scanline */
.vit-img-reveal {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    filter: sepia(0.5) contrast(1.2) brightness(1.05) saturate(0.9);
    clip-path: inset(0% 0 90% 0);
    animation: vitReveal 3s ease-in-out infinite alternate;
    z-index: 1;
    pointer-events: none;
}
@keyframes vitReveal {
    0%   { clip-path: inset(0% 0 90% 0); }
    100% { clip-path: inset(84% 0 0% 0); }
}

.vit-scanline {
    position: absolute;
    left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0,113,227,0.55) 20%,
        rgba(120,200,255,0.95) 50%,
        rgba(0,113,227,0.55) 80%,
        transparent 100%);
    animation: vitScan 3s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 3;
}
@keyframes vitScan {
    0%   { top: 4%; }
    100% { top: 92%; }
}

.vit-grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,113,227,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,113,227,0.06) 1px, transparent 1px);
    background-size: 26px 26px;
    pointer-events: none;
    z-index: 2;
}

.vit-corner {
    position: absolute;
    width: 16px; height: 16px;
    border-color: rgba(60,150,255,0.65);
    border-style: solid;
    z-index: 4;
    pointer-events: none;
}
.c-tl { top: 12px; left: 12px; border-width: 2px 0 0 2px; }
.c-tr { top: 12px; right: 12px; border-width: 2px 2px 0 0; }
.c-bl { bottom: 12px; left: 12px; border-width: 0 0 2px 2px; }
.c-br { bottom: 12px; right: 12px; border-width: 0 2px 2px 0; }

.vit-hud {
    position: absolute;
    display: flex;
    flex-direction: column;
    font-family: 'SF Mono', ui-monospace, 'Courier New', monospace;
    z-index: 4;
    pointer-events: none;
    line-height: 1.35;
    animation: hudPulse 4s ease-in-out infinite;
}
.hud-tr, .hud-br { align-items: flex-end; }
.hk { color: rgba(80,160,255,0.48); font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; }
.hv { color: rgba(80,185,255,0.88); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.hud-tl { top: 34px; left: 16px; animation-delay: 0s; }
.hud-tr { top: 34px; right: 16px; animation-delay: 1s; }
.hud-bl { bottom: 34px; left: 16px; animation-delay: 2s; }
.hud-br { bottom: 34px; right: 16px; animation-delay: 3s; }
@keyframes hudPulse {
    0%,100% { opacity: 0.72; }
    50%      { opacity: 1; }
}
.about-pills { margin-top: 8px; }

/* ── INSTAGRAM ──────────────────────────────────────────────── */
.insta-section { padding: var(--section-gap) 0; }
.insta-header {
    text-align: center;
    margin-bottom: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.insta-handle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: color var(--t) var(--ease);
}
.insta-handle:hover { color: var(--accent); }
.insta-embed { max-width: 700px; margin: 0 auto 40px; }
.insta-cta-wrap { text-align: center; }

/* ── CONTACT ────────────────────────────────────────────────── */
.contact {
    padding: var(--section-gap) 0;
    background: var(--bg-alt);
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 80px;
    align-items: start;
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: calc(var(--nav-h) + 32px);
}
.contact-desc { font-size: 16px; color: var(--text-2); line-height: 1.7; max-width: 300px; }
.contact-details { display: flex; flex-direction: column; gap: 20px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.ci-icon {
    width: 38px; height: 38px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--accent);
    font-size: 14px;
    flex-shrink: 0;
}
.ci-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 4px;
}
.ci-value { font-size: 15px; color: var(--text-2); line-height: 1.5; }
.ci-value a { color: var(--text-2); transition: color var(--t) var(--ease); }
.ci-value a:hover { color: var(--accent); }
.contact-social { display: flex; gap: 10px; }
.soc-btn {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 16px;
    transition: all var(--t) var(--ease);
}
.soc-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0,113,227,0.06);
    transform: translateY(-2px);
}

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field--full { grid-column: 1/-1; }
.form-field label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-2);
}
.form-field input,
.form-field textarea,
.form-field select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 13px 16px;
    font-size: 15px;
    color: var(--text);
    outline: none;
    appearance: none;
    transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,113,227,0.1);
}
.form-field textarea { resize: vertical; min-height: 130px; }
.form-field--check { flex-direction: row; }
.check-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.5;
    cursor: pointer;
}
.check-label input[type="checkbox"] {
    width: 16px; height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--accent);
}
.btn-submit {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    padding: 15px 32px;
    border-radius: 50px;
    cursor: pointer;
    width: fit-content;
    transition: background var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.btn-submit:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 32px rgba(0,113,227,0.3);
}
.form-message {
    font-size: 14px;
    padding: 12px 16px;
    border-radius: var(--r-sm);
    display: none;
}
.form-message.success { background: rgba(0,137,123,0.1); color: #00897b; display: block; }
.form-message.error   { background: rgba(220,38,38,0.08); color: #dc2626; display: block; }

/* ── MAP ────────────────────────────────────────────────────── */
.map-wrap { width: 100%; line-height: 0; transition: filter var(--t) var(--ease); filter: grayscale(0.25); }
.map-wrap:hover { filter: grayscale(0); }
[data-theme="dark"] .map-wrap { filter: invert(0.88) hue-rotate(180deg); opacity: 0.75; }
[data-theme="dark"] .map-wrap:hover { opacity: 1; }

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer { padding: 64px 0 36px; border-top: 1px solid var(--border); }
.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}
.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { font-size: 14px; color: var(--text-2); transition: color var(--t) var(--ease); }
.footer-nav a:hover { color: var(--text); }
.footer-contacts { display: flex; flex-direction: column; gap: 10px; }
.footer-contacts a { font-size: 14px; color: var(--text-2); transition: color var(--t) var(--ease); }
.footer-contacts a:hover { color: var(--accent); }
.footer-bottom { padding-top: 32px; text-align: center; }
.footer-bottom p { font-size: 13px; color: var(--text-3); }
.footer-bottom a { color: var(--text-2); transition: color var(--t) var(--ease); }
.footer-bottom a:hover { color: var(--accent); }

/* ── SCROLL TOP ─────────────────────────────────────────────── */
.scroll-top {
    position: fixed;
    bottom: 32px; right: 32px;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--text);
    color: var(--bg);
    border-radius: 50%;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity var(--t) var(--ease), transform var(--t) var(--ease), background var(--t) var(--ease);
    pointer-events: none;
    z-index: 800;
}
.scroll-top.visible { opacity: 1; transform: translateY(0); pointer-events: all; }
.scroll-top:hover { background: var(--accent); }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    :root { --section-gap: 80px; }
    .pillar-inner  { gap: 48px; }
    .about-grid    { gap: 48px; }
    .contact-grid  { gap: 48px; }
    .footer-inner  { gap: 32px; }
}

@media (max-width: 900px) {
    .nav-links, .nav-member { display: none; }
    .hamburger { display: flex; }
    .pillar-inner,
    .pillar-reverse .pillar-inner {
        grid-template-columns: 1fr;
        direction: ltr;
        gap: 40px;
    }
    .pillar-reverse .pillar-inner > * { direction: ltr; }
    .pillar-img-wrap { aspect-ratio: 16/9; }
    .about-grid    { grid-template-columns: 1fr; }
    .contact-grid  { grid-template-columns: 1fr; }
    .contact-info  { position: static; }
    .form-row      { grid-template-columns: 1fr; }
    .footer-inner  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .hero-badge { padding: 32px 52px; margin-bottom: 36px; }
    .hero-badge-img { height: 130px; }
    .hero-tagline-row { gap: 12px; flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 600px) {
    :root { --section-gap: 60px; --nav-h: 56px; }
    .hero-badge { padding: 24px 36px; margin-bottom: 28px; border-radius: 20px; }
    .hero-badge-img { height: 90px; }
    .hero-tagline-row { font-size: 0.85rem; gap: 10px; }
    .hero-actions { flex-direction: column; }
    .hero-actions > * { width: 100%; justify-content: center; }
    .about-stats  { gap: 24px; }
    .footer-inner { grid-template-columns: 1fr; gap: 28px; }
    .pillars-nav  { gap: 8px; }
    .scroll-top   { bottom: 20px; right: 20px; }
    .pillar { padding: 64px 0; }
}
