/* ==================================
   FONTS
================================== */
@font-face {
    font-family: 'Bergen Mono';
    src: url('../assets/BergenMono-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Neue Haas Grotesk Display Pro';
    src: url('../assets/neue-haas-display-pro/NeueHaasDisplayLight.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Neue Haas Grotesk Display Pro';
    src: url('../assets/neue-haas-display-pro/NeueHaasDisplayRoman.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Neue Haas Grotesk Display Pro';
    src: url('../assets/neue-haas-display-pro/NeueHaasDisplayRomanItalic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: 'Neue Haas Grotesk Display Pro';
    src: url('../assets/neue-haas-display-pro/NeueHaasDisplayMediu.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Neue Haas Grotesk Display Pro';
    src: url('../assets/neue-haas-display-pro/NeueHaasDisplayMediumItalic.ttf') format('truetype');
    font-weight: 500;
    font-style: italic;
}

/* ==================================
   RESET & BASE
================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

img,
video {
    user-select: none;
    -webkit-user-drag: none;
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

body {
    font-family: 'Neue Haas Grotesk Display Pro', 'Helvetica Neue', Arial, sans-serif;
    background-color: #ffffff;
    color: #000;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: #342152;
    color: #fff;
}

/* Custom Cursor */
body {
    cursor: none;
    /* Hide default cursor */
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    background-color: transparent !important;
    mix-blend-mode: difference;
    border-radius: 0 !important;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease;
}

.custom-cursor::before,
.custom-cursor::after {
    content: '';
    position: absolute;
    background-color: #ffffff;
    pointer-events: none;
}

.custom-cursor::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 1.5px;
    transform: translateY(-50%);
}

.custom-cursor::after {
    left: 50%;
    top: 0;
    width: 1.5px;
    height: 100%;
    transform: translateX(-50%);
}

.custom-cursor.on-dark {
    background-color: transparent !important;
}

.custom-cursor.hovered {
    transform: translate(-50%, -50%) scale(1.55);
    opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
    body:not(.dossier-page) a,
    body:not(.dossier-page) button,
    body:not(.dossier-page) summary,
    body:not(.dossier-page) .nav-toggle,
    body:not(.dossier-page) .grid-card {
        cursor: none !important;
    }
}


/* Hide custom cursor on mobile/touch devices */
@media (max-width: 768px),
(hover: none) {
    body {
        cursor: auto !important;
    }

    .custom-cursor {
        display: none !important;
    }
}

.mono {
    font-family: 'Bergen Mono', monospace;
}

/* ==================================
   UTILITIES
================================== */
.container,
.header-inner {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 40px;
    padding-right: 40px;
    box-sizing: border-box;
    width: 100%;
}

.text-block {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: left;
}

@media (max-width: 768px) {
    .container,
    .header-inner {
        padding-left: 20px;
        padding-right: 20px;
    }
    .text-block {
        max-width: 100%;
        width: 100%;
    }
}

/* ==================================
   HEADER
================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 30px 0;
    mix-blend-mode: difference;
    color: #fff;
    pointer-events: none;
    box-sizing: border-box;
    /* Hidden during hero phases */
    opacity: 0;
    filter: blur(6px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                filter  0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Revealed after hero — same fade-in-blur feel */
.site-header.nav-visible {
    opacity: 1;
    filter: blur(0px);
    pointer-events: auto;
}


.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.logo {
    font-family: 'Neue Haas Grotesk Display Pro', sans-serif;
    font-weight: 400;
    font-size: 24px;
    letter-spacing: -1px;
    pointer-events: auto;
}

.nav-toggle {
    font-family: 'Bergen Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    cursor: pointer;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .site-header {
        padding: 20px 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}

.full-image-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

/* ==================================
   HERO SECTION — Two-phase fixed hero
================================== */
.hero {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #000000;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 0;
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center center;
}

/* Spacer: 260vh — intro sequence (what-if / logo / contract modal) */
.hero-spacer {
    height: 260vh;
    width: 100%;
    pointer-events: none;
    flex-shrink: 0;
    transition: opacity 0.8s ease;
}

/* Main content layer — hidden during intro, revealed after contract signing */
.main-content {
    position: relative;
    z-index: 1;
    background: #ffffff;
    width: 100%;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.97) translateY(24px);
    filter: blur(12px);
    transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.1s cubic-bezier(0.16, 1, 0.3, 1),
                filter 1.1s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 1.1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, filter;
}

/* Teaser video section — cinema expanding reveal */
.teaser-replay-section {
    width: 100%;
    background: #000;
    padding: 0;
    position: relative;
    overflow: hidden;
    clip-path: inset(3% 4% round 20px);
    transition: clip-path 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* State when Intro is complete */
body.intro-complete .hero {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

body.intro-complete .hero-spacer {
    display: none;
}

body.intro-complete .main-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    filter: none;
    will-change: auto;
}

body.intro-complete .teaser-replay-section {
    clip-path: inset(0% 0% round 0px);
}



/* ── Phase 1: What-if question ── */
.hero-whatif {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    max-width: min(780px, 88vw);
    padding: 0 24px;
    z-index: 2;
    will-change: opacity, transform;
}

.hero-whatif-text {
    font-family: 'Neue Haas Grotesk Display Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: clamp(28px, 4.5vw, 58px);
    font-weight: 300;
    line-height: 1.18;
    letter-spacing: -0.025em;
    color: #000;
    margin: 0;
}

/* Each word animated individually */
.hero-whatif-text .word {
    display: inline-block;
    opacity: 0;
    filter: blur(10px);
    animation: wordReveal 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: opacity, filter;
}

@keyframes wordReveal {
    to {
        opacity: 1;
        filter: blur(0px);
    }
}

/* ── Phase 2: ALUA identity (revealed on scroll) ── */
.hero-identity {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    will-change: opacity, transform;
}


.hero-logo-img {
    width: 72%;
    max-width: 720px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.04));
}

.hero-subtitle {
    font-family: 'Bergen Mono', monospace;
    font-size: clamp(11px, 1.4vw, 13px);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: #111;
    margin: 0;
}

/* ── Scroll indicator ── */
.hero-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(0, 0, 0, 0.35);
    text-decoration: none;
    font-size: 10px;
    letter-spacing: 2px;
    z-index: 2;
    transition: color 0.3s ease;
    animation: scrollPulse 2.2s infinite ease-in-out;
    /* Delayed so it appears after the text animation completes */
    opacity: 0;
    animation: scrollIndicatorIn 0.6s ease forwards 2.5s, scrollPulse 2.2s infinite ease-in-out 3.1s;
}

.hero-scroll-indicator:hover { color: #000; }
.scroll-arrow { font-size: 14px; }

@keyframes scrollIndicatorIn {
    to { opacity: 1; }
}

@keyframes scrollPulse {
    0%, 100% { transform: translateX(-50%) translateY(0);    opacity: 0.45; }
    50%       { transform: translateX(-50%) translateY(7px); opacity: 1;    }
}

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


/* ==================================
   CONTRACT PANEL (hero phase 3)
================================== */
.contract-panel {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: min(680px, 92vw);
    height: 56vh;
    background: #fff;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -16px 60px rgba(0,0,0,0.22), 0 -4px 16px rgba(0,0,0,0.10);
    z-index: 50;
    display: flex;
    flex-direction: column;
    overflow: visible;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.contract-panel.panel-active {
    pointer-events: auto;
}

.contract-panel.dismissed {
    transform: translateX(-50%) translateY(120%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}


/* FIRMA button — floats above the panel */
.firma-btn-wrap {
    position: absolute;
    top: -52px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 2;
}

.firma-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #000;
    color: #fff;
    border: none;
    font-family: 'Bergen Mono', monospace;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    transition: background 0.2s, transform 0.2s;
}

.firma-btn:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
}

.firma-btn.signed {
    background: #2d6a4f;
}

/* PDF iframe container */
.contract-frame-wrap {
    position: relative;
    flex: 1;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.contract-iframe {
    width: 100%;
    height: 100%;
    min-height: 100%;
    border: none;
    display: block;
    border-radius: 14px 14px 0 0;
}


/* ==================================
   CENTERED SIGNATURE DIALOG (Motion-Primitives style)
================================== */
.sign-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sign-dialog-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.sign-dialog-content {
    position: relative;
    width: min(500px, 90vw);
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 28px 24px;
    box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08);
    transform: scale(0.92) translateY(12px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sign-dialog-backdrop.active .sign-dialog-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.sign-dialog-close {
    position: absolute;
    top: 18px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
}

.sign-dialog-close:hover {
    color: #000;
    background: rgba(0, 0, 0, 0.05);
}

.sign-dialog-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sign-dialog-title {
    font-family: 'Neue Haas Grotesk Display Pro', sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #000;
    margin: 0;
    letter-spacing: -0.01em;
}

.sign-dialog-desc {
    font-family: sans-serif;
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.sign-canvas-container {
    position: relative;
    background: #f9f9f9;
    border: 1.5px dashed rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 16px 12px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Ctext y='28' font-size='26'%3E%E2%9C%8D%EF%B8%8F%3C/text%3E%3C/svg%3E") 0 28, crosshair;
}

.sign-line-label {
    font-family: 'Bergen Mono', monospace;
    font-size: 9.5px;
    letter-spacing: 1.5px;
    color: rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.sign-canvas {
    width: 100%;
    height: 130px;
    background: transparent;
    display: block;
    cursor: inherit;
    touch-action: none;
}

.sign-dialog-footer {
    text-align: center;
}

.sign-dialog-hint {
    font-family: 'Bergen Mono', monospace;
    font-size: 10px;
    color: #888;
    letter-spacing: 0.5px;
}



/* ==================================
   AWARD POPUP MODAL — ALUA INSTITUTIONAL NOTICE
================================== */
.award-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 12, 0.62);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.award-modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.award-modal-card {
    position: relative;
    width: min(460px, 100%);
    background: #ffffff;
    border: 1px solid #000000;
    border-radius: 0 !important;
    padding: 0;
    box-shadow: 0 32px 80px rgba(10, 10, 12, 0.38);
    transform: translateY(24px) scale(0.97);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

.award-modal-backdrop.active .award-modal-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.award-modal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 20px;
    background: #f6f7f9;
    border-bottom: 1px solid #000000;
}

.award-label {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #342152;
    font-weight: 600;
}

.award-modal-close {
    position: static;
    background: transparent;
    border: none;
    border-radius: 0 !important;
    width: auto;
    height: auto;
    font-size: 11px;
    letter-spacing: 1.4px;
    color: #000000;
    cursor: pointer;
    padding: 2px 0;
    opacity: 0.7;
    transition: opacity 0.2s, color 0.2s;
}

.award-modal-close:hover {
    background: transparent;
    color: #d32f2f;
    opacity: 1;
    transform: none;
}

.award-modal-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 220px;
    overflow: hidden;
    border-bottom: 1px solid #000000;
    background: #0a0a0c;
}

.award-modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.award-modal-header {
    padding: 24px 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.award-stamp {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #d32f2f;
}

.award-title {
    font-family: 'Neue Haas Grotesk Display Pro', sans-serif;
    font-size: 28px;
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.08;
    margin: 2px 0 4px;
    color: #000000;
}

.award-desc {
    font-size: 14px;
    line-height: 1.55;
    color: #3a3d45;
    margin: 0;
}

.award-actions {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #000000;
}

.award-link,
.award-link:not(.secondary):not(.polimi),
.award-link.polimi,
.award-link.secondary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border: none;
    border-bottom: 1px solid #000000;
    border-radius: 0 !important;
    background: #ffffff;
    color: #000000;
    text-decoration: none;
    font-family: 'Bergen Mono', monospace;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    text-align: left;
    transition: background 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                padding-left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.award-link:last-child {
    border-bottom: none;
}

.award-link.primary {
    background: #342152;
    color: #ffffff;
}

.award-link.primary:hover {
    background: #000000;
    color: #ffffff;
    padding-left: 30px;
}

.award-link.polimi:hover,
.award-link.secondary:hover {
    background: #000000;
    color: #ffffff;
    padding-left: 30px;
}

.award-link.polimi:hover {
    background: #1f1235;
    border-color: #1f1235;
}

.award-link.secondary {
    background: transparent;
    border: 1.5px solid rgba(0, 0, 0, 0.2);
    color: #555;
}

.award-link.secondary:hover {
    border-color: #000;
    color: #000;
    background: rgba(0, 0, 0, 0.04);
}


@media (max-width: 768px) {
    .award-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .award-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .award-link {
        align-self: stretch !important;
        text-align: center;
    }
}

/* ==================================
   MANIFESTO / INTRO
================================== */
.manifesto {
    padding: 180px 40px;
    background: #fff;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.manifesto-text {
    font-size: clamp(24px, 4vw, 56px);
    line-height: 1.1;
    max-width: 1400px;
    margin: 0 auto;
    font-weight: 400;
}

.manifesto-text p {
    margin-bottom: 60px;
    opacity: 0.2;
    transition: opacity 0.8s ease;
}

.manifesto-text p.active {
    opacity: 1;
}

.highlight {
    font-weight: 500;
}

/* ==================================
   FLOW SECTIONS (Dynamic Scroll)
================================== */
.flow-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 100px 0;
    border-top: 1px solid #000;
    overflow: hidden;
    box-sizing: border-box;
    max-width: 100%;
}


.flow-header {
    margin: 0 auto 60px;
    padding: 0 40px;
    max-width: 1400px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}

@media (max-width: 768px) {
    .flow-section {
        padding: 60px 0;
    }
    .flow-header {
        padding: 0 20px;
    }
}


.flow-step {
    font-family: 'Bergen Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
    opacity: 0.6;
}

.flow-title {
    font-size: 6vw;
    line-height: 0.9;
    letter-spacing: -2px;
    text-transform: uppercase;
    font-weight: 400;
}

/* Layout Variations */
.flow-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    align-items: start;
    box-sizing: border-box;
    /* Added for safety */
    padding: 0 40px;
    /* Match header inner padding */
}

.flow-text {
    position: sticky;
    top: 150px;
}

.flow-media {
    position: relative;
    /* Ensure captions inside flow-media don't overflow */
    max-width: 100%;
}

.flow-media img {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 20px;
}

/* Full Width Image Section */
.flow-section.full-media {
    padding: 0;
    height: auto;
    min-height: auto;
}

.full-image-container {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

.full-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.overlay-text {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    /* 80px matches the visual alignment of Logo/Flow-Titles (40px + 40px) */
    padding: 0 80px !important;
    transform: translateY(-50%);
    color: #fff;
    text-align: left;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 2;
}

@media (max-width: 768px) {
    .overlay-text {
        padding: 0 40px !important;
        /* Match header mobile alignment */
    }
}

.overlay-text h3,
.overlay-text p {
    max-width: 500px;
    /* Keeps text block narrow but aligned to left of grid */
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 80px;
    width: 100%;
    padding: 0 80px;
    /* Match header inner padding */
    box-sizing: border-box;
}

/* Trace Grid (Sguardo) */
.trace-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 1400px;
    /* Constrain to grid */
    margin: 0 auto;
    /* Center the grid */
    box-sizing: border-box;
    padding: 0 40px;
}

.trace-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.trace-item:hover img {
    transform: scale(0.98);
}

/* Responsive */
@media (max-width: 768px) {
    .flow-content {
        grid-template-columns: 1fr;
        padding: 0;
        /* Section already has 40px padding */
    }

    .flow-text {
        position: relative;
        top: 0;
        margin-bottom: 40px;
    }

    .trace-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0;
        /* Section already has 40px padding */
    }
}


/* ==================================
   MENU OVERLAY
================================== */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #000;
    z-index: 90;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.menu-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
    align-items: flex-start;
}

.menu-link {
    font-family: 'Neue Haas Grotesk Display Pro', sans-serif;
    font-size: 48px;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 400;
    letter-spacing: -1px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.menu-overlay.active .menu-link {
    opacity: 1;
    transform: translateY(0);
}

.menu-footer {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
    align-items: flex-start;
}

@media (min-width: 769px) {
    .menu-footer {
        display: grid;
        grid-template-columns: repeat(3, auto);
        gap: 60px;
        align-items: baseline;
    }
}

.menu-link:hover {
    color: #999;
}

/* ==================================
   DATA GRIDS (Pillars, Tone, Team)
================================== */
.data-grid-section {
    padding: 100px 0;
    border-top: 1px solid #000;
}

.section-header-small {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 2px solid #000;
    padding-bottom: 20px;
}

.section-title-small {
    font-size: 24px;
    font-weight: 400;
    text-transform: uppercase;
}

.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: #000;
    /* Border effect */
    border: 2px solid #000;
}

.grid-card {
    background: #fff;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

.grid-card:hover {
    background: #000;
    color: #fff;
}

.team-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.team-linkedin-link {
    display: inline-block;
    margin-top: 16px;
    font-family: 'Bergen Mono', monospace;
    font-size: 11px;
    text-transform: lowercase;
    text-decoration: underline;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.team-linkedin-link:hover {
    opacity: 1;
}

.grid-card:hover .team-linkedin-link {
    color: #fff;
    opacity: 0.85;
}

.card-title {
    font-size: 18px;
    font-weight: 400;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.card-desc {
    font-family: 'Bergen Mono', monospace;
    font-size: 12px;
    line-height: 1.5;
    opacity: 0.7;
}

/* ==================================
   RISK TIERS TABLE
================================== */
.risk-table {
    width: 100%;
    border: 2px solid #000;
    border-collapse: collapse;
    font-family: 'Bergen Mono', monospace;
    font-size: 12px;
    margin-top: 20px;
}

.risk-row {
    border-bottom: 1px solid #000;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
}

.risk-row:last-child {
    border-bottom: none;
}

.risk-cell {
    padding: 20px;
    border-right: 1px solid #000;
    display: flex;
    align-items: center;
}

.risk-cell:first-child {
    padding-left: 0;
}

.risk-cell:last-child {
    border-right: none;
    padding-right: 0;
}

.risk-level {
    font-weight: 400;
    text-transform: uppercase;
    font-size: 14px;
}

.risk-desc {
    line-height: 1.4;
}

/* ==================================
   CINEMA SECTION
================================== */
.cinema-section {
    height: 100vh;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.cinema-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cinema-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: left;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.cinema-video:hover+.cinema-overlay {
    opacity: 0;
}

.play-button {
    font-size: 80px;
    color: #fff;
    mix-blend-mode: difference;
}

/* ==================================
   APP & ECOSYSTEM
================================== */
.app-section {
    background: #000;
    color: #fff;
    padding: 100px 40px;
    text-align: center;
}

.app-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.app-mockup {
    width: 300px;
    /* Placeholder for phone width */
    height: 600px;
    border: 2px solid #fff;
    border-radius: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Bergen Mono', monospace;
    opacity: 0.5;
}

.btn-download {
    display: inline-block;
    padding: 20px 40px;
    border: 1px solid #fff;
    color: #fff;
    text-decoration: none;
    font-family: 'Bergen Mono', monospace;
    text-transform: uppercase;
    transition: background 0.3s ease, color 0.3s ease;
}

.btn-download:hover {
    background: #fff;
    color: #000;
}

/* ==================================
   DOCUMENTATION
================================== */
.doc-section {
    padding: 100px 0;
    background: #f4f4f4;
    border-top: 1px solid #000;
}

.doc-download-card {
    border: 2px solid #000;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
    text-decoration: none;
    color: #000;
}

.doc-download-card:hover {
    background: #000;
    color: #fff;
}

.doc-info h4 {
    font-size: 24px;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 400;
}

.doc-icon {
    font-size: 40px;
}

/* ==================================
   HERO BLUR FIX
================================== */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
    /* Strong blur for aesthetic */
    filter: blur(40px);
}

.site-footer {
    background: #000;
    color: #fff;
    padding: 100px 0 40px;
    width: 100%;
    box-sizing: border-box;
}

/* Old rule removed */

.footer-big-text {
    font-size: clamp(32px, 8vw, 100px);
    line-height: 0.9;
    font-weight: 400;
    letter-spacing: -2px;
    color: #fff;
    max-width: 100%;
    word-wrap: break-word;
}

.footer-meta {
    display: flex;
    justify-content: space-between;
    font-family: 'Bergen Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.5;
    border-top: 1px solid #333;
    padding-top: 20px;
}

/* ==================================
   LANGUAGE SWITCHER
================================== */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Bergen Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
}

.language-switcher span {
    opacity: 0.5;
}

.lang-option {
    background: none;
    border: none;
    color: #fff;
    font-family: 'Bergen Mono', monospace;
    font-size: 10px;
    text-transform: uppercase;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    padding: 0;
    margin: 0 5px;
}

.lang-option:hover {
    opacity: 0.8;
}

.lang-option.active {
    opacity: 1;
    font-weight: bold;
    text-decoration: underline;
}

.lang-separator {
    opacity: 0.3;
}


/* ==================================
   MOBILE OPTIMIZATION
================================== */
@media (max-width: 768px) {

    /* Layout & Spacing */
    .container {
        padding: 0;
        /* Remove padding - parent sections already have 40px */
    }

    .manifesto {
        padding-top: 60px;
        padding-bottom: 60px;
        padding-left: 0;
        padding-right: 0;
    }

    .flow-section,
    .data-grid-section,
    .app-section,
    .doc-section {
        padding-top: 60px;
        padding-bottom: 60px;
        padding-left: 0;
        padding-right: 0;
    }

    /* Grids: Stack vertically */
    .grid-3-col {
        grid-template-columns: 1fr;
    }

    .grid-card {
        min-height: auto;
        padding: 30px;
    }

    /* Typography */
    .hero-subtitle {
        font-size: 10px;
        letter-spacing: 1px;
    }

    .manifesto-text {
        font-size: 24px;
    }

    .flow-title {
        font-size: 40px !important;
    }

    .hero-video-wrapper video {
        /* Ensure video covers even on mobile vertical */
        height: 100vh;
        object-fit: cover;
    }

    .app-text .flow-title {
        font-size: 32px !important;
    }

    .site-header {
        padding: 30px 40px;
        /* Match all other sections */
    }

    .text-block {
        font-size: 16px;
    }

    /* Risk Table: Cards instead of Table */
    .risk-row {
        display: flex;
        flex-direction: column;
        border-bottom: 2px solid #000;
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .risk-cell {
        border-right: none;
        padding: 10px 0;
    }

    .risk-price {
        justify-content: flex-start;
        color: #666;
    }

    /* Documentation Cards: Stack */
    .doc-download-card {
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
        gap: 20px;
    }

    /* Menu: Smaller Text */
    .menu-link {
        font-size: 32px;
    }

    /* Footer: Fit text */
    .footer-big-text {
        font-size: 40px;
    }

    .footer-content {
        gap: 40px;
        padding: 0;
        /* Footer section already has padding */
    }
}

/* ==================================
   VIBE COLLAGE
================================== */
.vibe-collage {
    margin-top: 60px;
    width: 100%;
}

.vibe-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
}

.vibe-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.v-main {
    grid-row: 1 / span 2;
    height: 500px;
    /* Force height */
}

.v-small {
    height: 240px;
}

/* ==================================
   STICKY GALLERY
================================== */
.sticky-gallery-section {
    position: relative;
    height: 400vh;
    /* Scrollytelling height */
    background: #000;
}

.sticky-wrapper {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sticky-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.sticky-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.sticky-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000;
    opacity: 0;
    /* Cambio netto e istantaneo tra le foto senza sfumatura */
    transition: none;
}

.sticky-img.active {
    opacity: 1;
}

/* Variante sfondo bianco per Tone of Voice */
.sticky-gallery-section.white-bg {
    background: #ffffff;
}
.sticky-gallery-section.white-bg .sticky-wrapper {
    background: #ffffff;
}
.sticky-gallery-section.white-bg .sticky-img {
    background-color: #ffffff;
}

/* ── Transizione a scorrimento dal basso verso l'alto su Tone of Voice ──
   Ciascuna nuova foto scorre dal basso (translateY 100%) andando a coprire
   la foto precedente, creando un effetto scheda fisso su sfondo bianco.
──────────────────────────────────────────────────────────────── */
.sticky-gallery-section.tone-slide-gallery .sticky-img {
    opacity: 1 !important;
    transform: translateY(100%);
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
    background-color: #ffffff;
    will-change: transform;
}

.sticky-gallery-section.tone-slide-gallery .sticky-img:nth-child(1) { z-index: 1; transform: translateY(0%); }
.sticky-gallery-section.tone-slide-gallery .sticky-img:nth-child(2) { z-index: 2; }
.sticky-gallery-section.tone-slide-gallery .sticky-img:nth-child(3) { z-index: 3; }
.sticky-gallery-section.tone-slide-gallery .sticky-img:nth-child(4) { z-index: 4; }
.sticky-gallery-section.tone-slide-gallery .sticky-img:nth-child(5) { z-index: 5; }
.sticky-gallery-section.tone-slide-gallery .sticky-img:nth-child(6) { z-index: 6; }
.sticky-gallery-section.tone-slide-gallery .sticky-img:nth-child(7) { z-index: 7; }
.sticky-gallery-section.tone-slide-gallery .sticky-img:nth-child(8) { z-index: 8; }

.sticky-gallery-section.tone-slide-gallery .sticky-img.active,
.sticky-gallery-section.tone-slide-gallery .sticky-img.passed {
    transform: translateY(0%);
}

.sticky-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    pointer-events: none;
}

/* ── Gallery Scroll Indicator with Inverted Color (mix-blend-mode: difference) ── */
.gallery-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    mix-blend-mode: difference;
    text-decoration: none;
    font-size: 10px;
    letter-spacing: 2px;
    z-index: 100;
    pointer-events: none;
    animation: galleryScrollPulse 2.2s infinite ease-in-out;
}

.gallery-scroll-indicator .scroll-arrow {
    font-size: 14px;
    line-height: 1;
}

@keyframes galleryScrollPulse {
    0%, 100% { transform: translateX(-50%) translateY(0);    opacity: 0.75; }
    50%       { transform: translateX(-50%) translateY(7px); opacity: 1;    }
}

/* ── Flaiano Philosophical Quote Box ── */
.flaiano-quote-box {
    background: #f8f8f8;
    border-left: 3px solid #342152;
    padding: 24px 28px;
    margin: 30px 0 40px;
}

.flaiano-quote {
    font-family: 'Neue Haas Grotesk Display Pro', 'Helvetica Neue', sans-serif;
    font-size: clamp(18px, 2.2vw, 26px);
    font-weight: 300;
    line-height: 1.3;
    color: #111111;
    margin: 0 0 10px;
    letter-spacing: -0.015em;
}

.flaiano-author {
    font-size: 12px;
    color: #666666;
    letter-spacing: 1px;
}

/* ── Algorithm & Labor Illusion 3-Card Grid ── */
.algo-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 20px;
}

.algo-card {
    background: #f9f9f9;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.algo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    border-color: #342152;
}

.algo-card-title {
    font-family: 'Neue Haas Grotesk Display Pro', sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #000000;
    margin: 0;
}

.algo-formula {
    font-size: 13px;
    font-weight: 600;
    background: #342152;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 2px;
    letter-spacing: 0.5px;
    width: fit-content;
}

.algo-card-desc {
    font-size: 13px;
    line-height: 1.55;
    color: #555555;
    margin: 0;
}

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

/* ==================================
   MACHINE TABS
================================== */
.machine-tabs-container {
    margin-top: 40px;
    border: 1px solid #000;
}

.tab-headers {
    display: flex;
    border-bottom: 1px solid #000;
}

.tab-btn {
    flex: 1;
    padding: 20px;
    background: #fff;
    border: none;
    border-right: 1px solid #000;
    font-family: 'Bergen Mono', monospace;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s;
}

.tab-btn:last-child {
    border-right: none;
}

.tab-btn.active {
    background: #000;
    color: #fff;
}

.tab-body {
    padding: 40px;
    min-height: 200px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .vibe-grid {
        grid-template-columns: 1fr;
    }

    .v-main {
        grid-row: auto;
        height: 300px;
    }

    .v-small {
        height: 180px;
    }

    .sticky-gallery-section {
        height: 300vh;
    }

    /* Machine Tabs on Mobile */
    .tab-headers {
        flex-direction: column;
    }

    .tab-btn {
        border-right: none;
        border-bottom: 1px solid #000;
        padding: 15px;
        font-size: 12px;
    }

    .tab-body {
        padding: 20px;
    }
}

/* ==================================
   LARGE MOCKUPS GRID
================================== */
.mockup-grid-large {
    margin-top: 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.mockup-img-large {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.full-width {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .mockup-grid-large {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}


/* ==================================
   NEW SECTIONS CSS (STATS, RISK, APP)
================================== */

/* ══════════════════════════════════════════════
   SCENARIO — Sequenza a scorrimento su sfondo viola
══════════════════════════════════════════════ */
.scenario-scroll-section {
    background: #342152;
    color: #fff;
    border-top: 1px solid #000;
    position: relative;
}

/* ── Header sticky posizionato dentro il container (top: 80px) ──────
   Allineato esattamente ai margini del container (1400px max-width)
──────────────────────────────────────────────────────────────── */
.scenario-sticky-header {
    position: sticky;
    top: 80px;
    z-index: 30;
    background: #342152;
    padding-top: 10px;
    padding-bottom: 20px;
    margin-bottom: 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.35);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.scenario-sticky-header .scenario-title {
    color: #fff !important;
    margin: 0;
    font-size: 24px;
    font-weight: 400;
    text-transform: uppercase;
}
.scenario-sticky-header .scenario-sub {
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    letter-spacing: 2px;
    font-family: 'Bergen Mono', monospace;
}

/* ── Budget di scroll (250vh) per la sequenza di pinning ── */
.scenario-pin-wrapper {
    height: 250vh;
    position: relative;
}

/* Frame sticky centrato verticalmente nella schermata */
.scenario-sticky-frame {
    position: sticky;
    top: 150px;
    height: calc(100vh - 170px);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

/* ── Le due fasi (testo grande e numeri) sovrapposte nello stesso frame ── */
.scenario-phase-text,
.scenario-phase-stats {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.scenario-phase-text.active,
.scenario-phase-stats.active {
    pointer-events: auto;
}

/* Testo grande: identico a .manifesto-text p (left-aligned, stesso font e size) */
.scenario-big-text {
    font-size: clamp(24px, 4vw, 56px);
    line-height: 1.1;
    font-weight: 400;
    color: #fff;
    margin: 0;
    max-width: 1400px;
}

/* Animazione fade-in-blur per singola parola (TextEffect) */
@keyframes scenarioWordIn {
    from { opacity: 0; filter: blur(14px); transform: translateY(10px); }
    to   { opacity: 1; filter: blur(0px);  transform: translateY(0); }
}
.scenario-word {
    display: inline-block;
    opacity: 0;
    animation: scenarioWordIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Griglia delle carte numeri */
.scenario-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

#scenario .stat-card {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(4px);
    padding: 30px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
}

#scenario .stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.45);
}
#scenario .stat-desc {
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.75);
}

/* ── TextRoll — animazione a rullo verticale sui numeri ──────────
   Ogni carattere di .stat-value scorre dal basso verso l'alto.
   L'elemento contiene 2 span (top e real), quindi l'altezza totale
   è 2.2em. Spostando di -50%, il secondo span entra perfettamente in vista.
──────────────────────────────────────────────────────────────── */
#scenario .stat-value {
    font-family: 'Neue Haas Grotesk Display Pro', sans-serif;
    font-size: clamp(54px, 5vw, 76px);
    font-weight: 300;
    font-synthesis: none;
    letter-spacing: -0.03em;
    color: #ffffff !important;
    margin-bottom: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    line-height: 1;
}

.roll-char {
    display: inline-block;
    overflow: hidden;
    height: 1.1em;
    line-height: 1.1em;
    vertical-align: middle;
}

.roll-char-inner {
    display: flex;
    flex-direction: column;
    transform: translateY(0%);
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.roll-char-top {
    display: block;
    height: 1.1em;
    line-height: 1.1em;
    user-select: none;
    opacity: 0.3;
    filter: blur(3px);
}

.roll-char-real {
    display: block;
    height: 1.1em;
    line-height: 1.1em;
    opacity: 1;
    filter: blur(0px);
}

/* Quando attivo: sposta verso l'alto di 1 riga (50% dell'altezza totale 2.2em) */
.text-roll-active .roll-char-inner {
    transform: translateY(-50%);
}

/* Cursore bianco sulla sezione scura */
.scenario-scroll-section .custom-cursor { filter: invert(1); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .scenario-sticky-header {
        top: 70px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .scenario-sticky-frame {
        top: 130px;
        height: auto;
    }
    .scenario-stats-grid {
        grid-template-columns: 1fr;
    }
}


.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 60px;
}

.stat-card {
    border: 1px solid #ddd;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: 'Bergen Mono', monospace;
    font-size: 60px;
    font-weight: bold;
    color: #342152;
    margin-bottom: 10px;
}

.stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: #888;
}

.stat-desc {
    font-size: 14px;
    line-height: 1.5;
}

/* Risk Tiers */
.risk-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 40px 0;
}

.risk-card {
    background: #f9f9f9;
    padding: 20px;
    border: 1px solid #eee;
    transition: transform 0.3s ease;
}

.risk-card:hover {
    transform: translateY(-5px);
    border-color: #342152;
}

.tier-badge {
    background: #000;
    color: #fff;
    padding: 4px 8px;
    font-size: 10px;
    font-family: 'Bergen Mono', monospace;
    display: inline-block;

    margin-bottom: 15px;
}

/* Mobile Adjustments for Risk Table */
@media (max-width: 768px) {
    .risk-invoice-container {
        padding: 20px;
    }

    .invoice-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    /* Hide table header on mobile */
    .inv-row.header {
        display: none;
    }

    /* Make rows look like cards */
    .inv-row {
        flex-direction: column;
        align-items: flex-start;
        border-bottom: 2px solid #eee;
        padding: 20px 0;
        gap: 10px;
    }

    .inv-cell {
        width: 100%;
        padding: 5px 0;
        text-align: left;
    }

    .col-id {
        font-size: 14px;
        opacity: 0.5;
    }

    .col-class {
        font-size: 18px;
        font-weight: bold;
    }

    .col-desc {
        font-size: 14px;
        color: #666;
    }

    .col-val {
        font-size: 16px;
        border-right: none;
        /* Remove border from last cell in desktop view */
        text-align: left;
        color: #342152;
        font-weight: bold;
    }

    /* Add labels for mobile clarity if needed, or rely on context */
    .col-val::before {
        content: "AFFINITÀ: ";
        font-size: 12px;
        opacity: 0.6;
        font-weight: normal;
    }
}

.risk-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.warning-text {
    color: red;
    font-size: 12px;
    margin-top: 10px;
    font-family: 'Bergen Mono', monospace;
}

.malus-block {
    background: #342152;
    color: #fff;
    padding: 30px;
    margin-top: 40px;
}

/* App Section */
.app-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.app-features {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.app-features li {
    margin-bottom: 15px;
    color: #fff;
    font-size: 14px;
}



/* ==================================
   REFINED RISK TIERS
================================== */
.risk-grid-tight {
    display: flex;
    flex-direction: column;
    border-top: 2px solid #000;
}

/* ==================================
   RISK TIERS V3 (INVOICE STYLE)
================================== */
.risk-invoice-container {
    padding: 20px;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 20px;
    border-bottom: 4px solid #000;
    margin-bottom: 0;
}

.invoice-body {
    border-bottom: 1px solid #000;
}

.inv-row {
    display: grid;
    grid-template-columns: 0.5fr 2fr 3fr 1fr;
    border-bottom: 1px solid #ccc;
    min-height: 80px;
}

.inv-row.header {
    background: #f4f4f4;
    border-bottom: 2px solid #000;
    min-height: 40px;
    align-items: center;
}

.inv-row:last-child {
    border-bottom: none;
}

.inv-cell {
    padding: 20px;
    display: flex;
    align-items: center;
    border-right: 1px solid #eee;
}

.inv-cell:last-child {
    border-right: none;
    justify-content: flex-end;
}

.col-id {
    color: #999;
}

.col-class {
    font-weight: 400;
    text-transform: uppercase;
    font-size: 16px;
    gap: 10px;
}

.col-desc {
    font-size: 16px;
    color: #444;
    line-height: 1.4;
}

.col-val {
    font-size: 18px;
    font-weight: 400;
}

/* Status Dots */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.green {
    background: #00cc66;
}

.status-dot.yellow {
    background: #ffcc00;
}

.status-dot.orange {
    background: #ff6600;
}

.status-dot.red {
    background: #ff0000;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

.alert-row {
    background: #fff0f0;
}

.invoice-footer {
    padding: 30px;
    background: #000;
    color: #fff;
    margin-top: 40px;
    border: 1px solid #000;
}

.inv-malus .title {
    display: block;
    margin-bottom: 10px;
    font-size: 12px;
    color: #aaa;
}

.inv-malus p {
    font-size: 16px;
    line-height: 1.5;
    max-width: 800px;
}

@media (max-width: 900px) {
    .inv-row {
        grid-template-columns: 1fr;
        padding: 20px 0;
        gap: 10px;
        border-bottom: 2px solid #000;
        height: auto;
    }

    .inv-row.header {
        display: none;
    }

    .inv-cell {
        padding: 5px 20px;
        border: none;
        justify-content: flex-start !important;
        display: block;
    }

    .col-id {
        font-size: 10px;
        opacity: 0.5;
    }

    .col-val {
        border-top: 1px solid #eee;
        padding-top: 15px;
        margin-top: 5px;
        width: 100%;
        color: #342152;
    }
}

/* ==================================
   APP SECTION (RESTORATION)
================================== */
.mockup-box-placeholder {
    width: 300px;
    height: 600px;
    border: 4px solid #333;
    border-radius: 40px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
}

.white-border {
    border: 1px solid #fff;
    color: #fff;
    padding: 15px 30px;
    text-decoration: none;
    font-family: 'Bergen Mono', monospace;
    text-transform: uppercase;
    font-size: 12px;
    transition: all 0.3s;
}

.white-border:hover {
    background: #fff;
    color: #000;
}

@media (max-width: 768px) {

    /* Global Layout Fixes */
    .container {
        padding: 0;
        /* Sections already provide 40px padding */
    }

    .section-header-small {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
    }



    /* App Section Mobile */
    .app-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .app-text-block {
        margin: 0 auto;
    }

    .app-mockup-visual {
        margin: 40px auto;
    }

    .mockup-box-placeholder {
        width: 100%;
        /* Responsive width */
        max-width: 300px;
        height: 500px;
        /* Slightly smaller */
    }

    .flow-title {
        font-size: 40px !important;
    }

    /* Exam Presentation Button */
    .btn-presentation {
        display: inline-flex;
        align-items: center;
        gap: 15px;
        background: #000;
        color: #fff;
        padding: 20px 40px;
        font-family: 'Bergen Mono', monospace;
        font-size: 16px;
        text-transform: uppercase;
        text-decoration: none;
        border: 2px solid #000;
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .btn-presentation:hover {
        background: #fff;
        color: #000;
        letter-spacing: 1px;
    }

    .btn-icon {
        font-size: 20px;
        transition: transform 0.3s;
    }

    .btn-presentation:hover .btn-icon {
        transform: translateX(5px);
    }
}


/* ==================================
   PRINT PROTECTION
================================== */
@media print {

    html,
    body {
        background: #000 !important;
        color: #000 !important;
        height: 100vh !important;
        overflow: hidden !important;
        display: block !important;
    }

    /* Hide everything */
    body * {
        display: none !important;
    }

    /* Show only a block message if needed, or just black */
    body::before {
        content: "ALUA PROTECTED CONTENT";
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        width: 100%;
        font-family: 'Bergen Mono', monospace;
        font-size: 24px;
        color: #333 !important;
        /* Slightly visible on black */
        background: #000 !important;
        z-index: 99999;
        position: fixed;
        top: 0;
        left: 0;
    }
}

/* ==================================
   LAYOUT OPTIMIZATIONS - 2026-02-07
================================== */

/* App Section - Simplified & Centered */
.app-content-centered {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.app-text-block {
    text-align: left;
    margin: 0 auto;
}

/* Risk Assessment - Cleaner Table */
.risk-invoice-container {
    background: #fff;
    border: 2px solid #000;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    border-bottom: 2px solid #000;
    background: #f9f9f9;
}

.inv-row {
    display: grid;
    grid-template-columns: 80px 2fr 3fr 1fr;
    border-bottom: 1px solid #ddd;
    min-height: 60px;
    align-items: center;
}

.inv-row.header {
    background: #000;
    color: #fff;
    font-weight: 400;
}

.inv-cell {
    padding: 20px;
    border-right: 1px solid #ddd;
}

.inv-cell:last-child {
    border-right: none;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-dot.green {
    background: #4caf50;
}

.status-dot.yellow {
    background: #ffc107;
}

.status-dot.red {
    background: #f44336;
}

/* Enhanced Mobile Optimizations */
@media (max-width: 768px) {

    /* App Section */
    .app-content-centered .flow-title {
        font-size: clamp(32px, 10vw, 60px) !important;
    }

    .app-mockup-visual img {
        max-width: 280px;
    }

    .app-text-block>div {
        padding: 20px;
        margin-bottom: 20px;
    }

    /* Risk Assessment */
    .invoice-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 20px;
    }

    .inv-row {
        grid-template-columns: 1fr;
        padding: 15px 0;
    }

    .inv-cell {
        padding: 8px 20px;
        border: none;
    }

    .col-val {
        padding-top: 15px;
        border-top: 1px solid #eee;
        margin-top: 10px;
    }

    /* Global Typography */
    .text-block {
        font-size: 15px;
        line-height: 1.6;
    }

    .footer-big-text {
        font-size: clamp(32px, 10vw, 60px);
    }
}

/* ==================================
   RISK ASSESSMENT - POLISHED INSTITUTIONAL PANEL
================================== */
.risk-panel-container {
    background: #ffffff;
    border: 1px solid rgba(52, 33, 82, 0.18);
    border-radius: 4px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.04);
    margin-top: 50px;
    overflow: hidden;
}

.risk-panel-header {
    background: #342152;
    color: #ffffff;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    letter-spacing: 1.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.risk-tier-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border-bottom: 1px solid rgba(52, 33, 82, 0.12);
}

.risk-tier-card {
    position: relative;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #ffffff;
    border-right: 1px solid rgba(52, 33, 82, 0.12);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.risk-tier-card:last-child {
    border-right: none;
}

.risk-tier-card:hover {
    background: #fbfbfe;
}

.tier-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.tier-1 .tier-top-bar { background: #00b894; }
.tier-2 .tier-top-bar { background: #fdcb6e; }
.tier-3 .tier-top-bar { background: #e17055; }
.tier-4 .tier-top-bar { background: #d63031; }

.tier-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tier-class-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 2px;
    background: rgba(52, 33, 82, 0.06);
    color: #342152;
    letter-spacing: 1px;
}

.tier-affinity-val {
    font-size: 20px;
    font-weight: 500;
    color: #111111;
}

.tier-title {
    font-family: 'Neue Haas Grotesk Display Pro', sans-serif;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #000000;
    margin: 0;
}

.tier-desc {
    font-size: 13px;
    line-height: 1.55;
    color: #555555;
    margin: 0;
    flex-grow: 1;
}

.tier-protocol-badge {
    margin-top: 10px;
    font-size: 10px;
    font-weight: 600;
    color: #d63031;
    background: rgba(214, 48, 49, 0.08);
    padding: 6px 10px;
    border-radius: 2px;
    border-left: 2px solid #d63031;
    letter-spacing: 0.5px;
}

/* Integrated Malus Box */
.risk-malus-box {
    background: #fcfcfc;
    padding: 32px 30px;
    border-left: 4px solid #342152;
}

.risk-malus-box .malus-title {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: #342152;
    margin-bottom: 12px;
}

.risk-malus-box p {
    font-size: 14px;
    line-height: 1.6;
    color: #444444;
    margin: 0;
}

@media (max-width: 1024px) {
    .risk-tier-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .risk-tier-card:nth-child(2) {
        border-right: none;
    }
    .risk-tier-card {
        border-bottom: 1px solid rgba(52, 33, 82, 0.12);
    }
}

@media (max-width: 640px) {
    .risk-tier-grid {
        grid-template-columns: 1fr;
    }
    .risk-tier-card {
        border-right: none;
    }
    .risk-panel-header {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }
}

.red-card {
    border-left: 4px solid #f44336;
}

.black-card {
    border-left: 4px solid #000;
}

/* Mobile: Stack cards */
@media (max-width: 768px) {
    .risk-cards-simple {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 40px;
    }

    .risk-card-simple {
        padding: 20px 15px !important;
        margin-left: -10px;
        margin-right: -10px;
        width: calc(100% + 20px);
    }

    .risk-card-header h4 {
        font-size: 15px;
    }

    .risk-card-desc {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }

    .risk-card-value .mono {
        font-size: 18px;
    }
}

/* ==================================
   FOOTER MOBILE IMPROVEMENTS
================================== */
@media (max-width: 768px) {
    .site-footer {
        padding: 60px 20px;
    }

    .footer-content {
        gap: 40px;
        padding: 0;
        /* Footer section already has padding */
    }

    .footer-content>div {
        text-align: left;
    }

    .footer-big-text {
        font-size: clamp(28px, 9vw, 50px);
        line-height: 1.1;
        text-align: left;
    }

    .footer-meta {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 15px;
        padding-top: 30px;
    }

    .footer-meta img {
        order: -1;
        margin-bottom: 10px;
    }
}

/* ==================================
   MOBILE TEXT FIX - MINIMAL & SAFE
================================== */
@media (max-width: 768px) {

    /* Only fix text wrapping for paragraphs */
    p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Expand Risk Assessment cards slightly */
    .risk-card-simple {
        padding: 20px 18px;
    }

    .risk-card-desc {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* ==================================
   GLOBAL LAYOUT FIXES
================================== */
html,
body {
    max-width: 100%;
    /* overflow-x: hidden; REMOVED to fix sticky elements */
}

.flow-section,
.data-grid-section,
.app-section,
.doc-section,
.site-footer,
.hero {
    max-width: 100%;
    box-sizing: border-box;
    /* overflow-x: hidden; REMOVED to fix sticky elements */
}

/* Specific Element Fixes */
.hero-logo-img {
    width: 60%;
    max-width: 800px;
}

.hero-title {
    font-size: clamp(40px, 12vw, 120px);
}

.hero-video {
    width: 100%;
    max-width: 100%;
}

.footer-big-text {
    font-size: clamp(32px, 8vw, 100px);
    max-width: 100%;
    word-wrap: break-word;
}

/* Button & Link Constraints */
.btn-download,
.btn-presentation,
.menu-link {
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {

    .btn-download,
    .btn-presentation {
        display: block;
        margin-left: 0 !important;
        margin-right: auto !important;
        text-align: left;
        width: fit-content;
    }
}

/* ==================================
   CONTACT FORM
================================== */
.contact-form-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 80px;
    padding: 0 40px;
    /* Aligned with others */
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .contact-form-container {
        padding: 0;
        /* Footer provides consistent spacing */
    }
}

.contact-form-header {
    margin-bottom: 40px;
    text-align: left;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 20px;
    /* Vertical gap 40px, Horizontal 20px */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.full-width {
    grid-column: 1 / -1;
}

.contact-form-label {
    font-family: 'Bergen Mono', monospace;
    font-size: 10px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
    display: block;
    /* Ensure it takes full width to align text correctly */
}

.contact-form-input,
.contact-form-textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid #333;
    padding: 10px 0;
    color: #fff;
    font-family: 'Neue Haas Grotesk Display Pro', sans-serif;
    font-size: 16px;
    width: 100%;
    border-radius: 0;
    outline: none;
    transition: border-color 0.3s;
}

.contact-form-input:focus,
.contact-form-textarea:focus {
    border-color: #fff;
}

.contact-form-textarea {
    resize: vertical;
    min-height: 40px;
}

.btn-submit {
    background: #fff;
    color: #000;
    border: none;
    padding: 15px 40px;
    font-family: 'Bergen Mono', monospace;
    font-size: 12px;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
    width: 100%;
    letter-spacing: 1px;
}

.btn-submit:hover {
    background: #ccc;
}

#form-status {
    font-family: 'Bergen Mono', monospace;
    font-size: 12px;
    margin-top: 20px;
    text-align: center;
    min-height: 20px;
}

@media (max-width: 768px) {
    .contact-form-container {
        padding: 0;
        margin-bottom: 40px;
        /* Remove border on mobile for cleaner look or keep it? */
        /* User said "occupa orizzontalmente troppo poco spazio" -> Removing internal padding helps */
    }

    .contact-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contact-form-header h3 {
        font-size: 24px !important;
    }

    .form-group.full-width {
        grid-column: span 1;
    }

    /* Utility: Hide on Mobile */
    .mobile-hide {
        display: none !important;
    }
}

/* ==================================
   VIDEO PLAY OVERLAY BUTTON
================================== */
.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 0;
    pointer-events: auto;
}

.video-play-overlay:hover {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.9;
}

.video-play-overlay svg {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}


.teaser-replay-section {
    position: relative !important;
}

.cinema-section {
    position: relative;
}

/* Hide play button when video is playing in fullscreen */
video:fullscreen+.video-play-overlay,
video:-webkit-full-screen+.video-play-overlay,
video:-moz-full-screen+.video-play-overlay {
    display: none;
}

/* ==================================
   TRACES MARQUEE
================================== */
.traces-marquee-section {
    padding: 0;
    background: #000;
    overflow: hidden;
    border-bottom: none;
    /* User requested NO line */
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 60s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-item {
    flex: 0 0 auto;
    height: 300px;
    /* Fixed height for consistency */
    width: auto;
    /* Width adapts to image aspect ratio */
    margin-right: 0;
    overflow: hidden;
    position: relative;
    border-right: 1px solid #fff;
    background: #000;
}

.marquee-item img {
    height: 100%;
    width: auto;
    object-fit: contain;
    /* Ensure full image is visible */
    /* Original colors, no grayscale */
    transition: transform 0.5s ease;
}

.marquee-item:hover img {
    transform: scale(1.05);
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ==================================
   EXPERIENCE SECTION (Social Proof)
================================== */
.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
    padding: 0 40px;
    margin-top: 60px;
}

.experience-item {
    /* Allow varying aspect ratios or keep uniform? 
       Exhibition photos might be landscape/portrait mix. 
       Masonry is hard with pure CSS grid without JS.
       Let's stick to a robust grid. */
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    background: #000;
}

.experience-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    opacity: 0.9;
}

.experience-item:hover img {
    transform: scale(1.05);
    opacity: 1;
}

/* ==================================
   TEAM BACKSTAGE SLIDER
================================== */
.team-backstage-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 40px;
    padding-right: 40px;
    margin-bottom: 60px;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    cursor: grab;
}

.team-backstage-slider::-webkit-scrollbar {
    display: none;
}

.backstage-item {
    flex: 0 0 400px;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
}

.backstage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.backstage-item:hover img {
    filter: grayscale(0%);
}

@media (max-width: 768px) {
    .marquee-item {
        height: 200px;
    }

    .experience-grid {
        grid-template-columns: repeat(1, 1fr);
        padding: 0;
        /* Section already has 40px padding */
    }

    .backstage-item {
        flex: 0 0 80vw;
    }
}

.team-photo-container {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    margin-bottom: 15px;
    background: #eee;
}

.team-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease, transform 0.5s ease;
}

.grid-card:hover .team-photo-container img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.app-mockup-img {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border-radius: 40px;
    transition: transform 0.5s ease;
}

.app-mockup-img:hover {
    transform: scale(1.02);
}

@media (max-width: 900px) {
    .app-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
        text-align: left !important;
    }

    .app-info h2 {
        text-align: left !important;
        font-size: 50px !important;
    }

    .app-info .text-block {
        margin: 0 0 20px 0 !important;
    }

    /* Align buttons to left */
    .app-info>div:last-child {
        justify-content: flex-start !important;
    }

    .app-visual {
        order: -1;
        margin-bottom: 20px;
        justify-content: center !important;
        /* Image can still be centered or left? usually centered looks ok, but request was about text alignment. I'll keep image centered for now as it's a visual element. */
    }

    .app-visual img {
        max-width: 280px !important;
        transform: none !important;
    }
}

/* ==================================
   PROJECT MAP SECTION
================================== */
.project-map-section {
    background: #f9f9f9;
    border-top: 2px solid #000;
    padding: 60px 0;
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 768px) {
    .project-map-section {
        padding-top: 60px;
        padding-bottom: 60px;
        padding-left: 0;
        padding-right: 0;
    }
}

/* ==================================
   MASTER UNIFIED MOBILE ALIGNMENT SYSTEM (EXACT 20px RAIL)
================================== */
@media (max-width: 768px) {
    /* 1. Outer section wrappers have ZERO horizontal padding so .container owns the exact 20px rail */
    .site-footer,
    .doc-section,
    .project-map-section,
    .section-padding,
    .manifesto,
    .data-grid-section,
    .scenario-scroll-section,
    .app-section,
    .risk-section,
    .cinema-section,
    .flow-section,
    .hero {
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    /* 2. Header and all content containers share the EXACT same 20px left/right imaginary alignment lines */
    .header-inner,
    .container,
    .flow-header,
    .flow-content,
    .footer-content {
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    /* 3. Nested elements inside .container must NOT add extra horizontal padding */
    .section-header-small,
    .flow-content .container,
    .container .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* 2. Inner Text Blocks, Cards & Content (Full 100% Width within 16px Container) */
    .manifesto-text,
    .text-block,
    .app-info,
    .flow-text,
    .risk-panel,
    .presentation-box,
    .doc-download-card,
    .algo-card,
    .morph-card-trigger,
    .risk-malus-box,
    .script-details,
    .project-map-section .container,
    .presentation-box .container {
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* 3. Grid Layouts collapse to single responsive column */
    .app-grid,
    .two-col,
    .risk-grid,
    .team-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        width: 100% !important;
    }

    .morph-card-modal-scroll {
        padding: 24px 16px !important;
    }

    /* 4. SCENARIO SECTION MOBILE FLUID LAYOUT */
    .scenario-scroll-section {
        padding-top: 40px !important;
        padding-bottom: 60px !important;
        height: auto !important;
    }

    .scenario-sticky-header {
        position: relative !important;
        top: 0 !important;
        margin-bottom: 24px !important;
        z-index: 1 !important;
    }

    .scenario-pin-wrapper {
        height: auto !important;
        position: relative !important;
    }

    .scenario-sticky-frame {
        position: relative !important;
        top: 0 !important;
        height: auto !important;
        display: block !important;
        transform: none !important;
    }

    .scenario-phase-text,
    .scenario-phase-stats {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        margin-bottom: 32px !important;
    }

    .scenario-big-text {
        font-size: 20px !important;
        line-height: 1.35 !important;
        max-width: 100% !important;
    }

    .scenario-word {
        opacity: 1 !important;
        animation: none !important;
    }

    .scenario-stats-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        width: 100% !important;
    }

    #scenario .stat-card {
        padding: 20px 16px !important;
    }

    /* 5. App Visuals & Buttons */
    .app-visual {
        justify-content: center !important;
        padding-left: 0 !important;
        margin-top: 24px;
    }

    .hero-logo-img {
        width: 96% !important;
        margin-bottom: 16px !important;
    }

    .hero-subtitle {
        font-size: 10px !important;
        letter-spacing: 1.5px !important;
        margin-bottom: 20px !important;
    }

    .hero-cta-btn {
        width: 100%;
        max-width: 100%;
        padding: 14px 14px !important;
        font-size: 11px !important;
        text-align: center;
        box-sizing: border-box;
    }

    .contract-panel {
        width: 95vw !important;
        height: 66vh !important;
        height: 66dvh !important;
        border-radius: 16px 16px 0 0 !important;
    }

    .firma-btn-wrap {
        top: -46px !important;
    }

    .firma-btn {
        padding: 10px 20px !important;
        font-size: 10px !important;
    }
}

/* ==================================
   MORPHING DIALOG (Motion Primitives Zoom)
================================== */
img:not(.logo):not(.hero-logo-img):not(.award-modal-img) {
    cursor: zoom-in;
    transition: filter 0.3s ease, transform 0.3s ease;
}

img:not(.logo):not(.hero-logo-img):not(.award-modal-img):hover {
    filter: brightness(1.05);
}

.morph-dialog-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.morph-dialog-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.morph-dialog-image {
    position: fixed;
    z-index: 100000;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
    pointer-events: none;
    display: none;
    will-change: transform, left, top, width, height, border-radius;
    cursor: zoom-out;
}

.morph-dialog-close {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    color: #111111;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100001;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s, background 0.2s ease, color 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}

.morph-dialog-backdrop.active .morph-dialog-close {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.morph-dialog-close:hover {
    background: #342152;
    color: #ffffff;
    transform: scale(1.1);
}

/* ==================================
   MORPHING CARD DIALOG (Expandable Banner)
================================== */
.morph-card-trigger {
    cursor: pointer;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.morph-card-trigger:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(52, 33, 82, 0.08);
}

.morph-plus-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(52, 33, 82, 0.08);
    color: #342152;
    font-family: 'Bergen Mono', monospace;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    transition: background 0.2s ease, color 0.2s ease, transform 0.25s ease;
    flex-shrink: 0;
}

.morph-card-trigger:hover .morph-plus-badge {
    background: #342152;
    color: #ffffff;
    transform: rotate(90deg);
}

.morph-card-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.morph-card-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.morph-card-modal {
    position: fixed;
    z-index: 100000;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: none;
    flex-direction: column;
    pointer-events: none;
    will-change: transform, left, top, width, height, border-radius;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.morph-card-backdrop.active .morph-card-modal {
    display: flex;
    pointer-events: auto;
}

.morph-card-modal-scroll {
    overflow-y: auto;
    max-height: calc(85vh - 40px);
    padding: 36px 32px;
    -webkit-overflow-scrolling: touch;
}

.morph-card-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    color: #222222;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100002;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.morph-card-close-btn:hover {
    background: #342152;
    color: #ffffff;
    transform: scale(1.1);
}


/* ==========================================================================
   ALUA 2026 REDESIGN — THESIS IDENTITY, PARALLAX CONTRACT & FILM GATE
   Palette: Deep Violet #342152 · Sage #8FA396 · Powder Blue #9BB2C4
            Cool Steel #F6F7F9 / #E4E6EB · Obsidian #0A0A0C · Stamp Red #D32F2F
   ========================================================================== */
:root {
    --alua-violet: #342152;
    --alua-violet-deep: #1d1130;
    --alua-sage: #8fa396;
    --alua-powder: #9bb2c4;
    --alua-cool-bg: #f6f7f9;
    --alua-steel: #e4e6eb;
    --alua-ink: #0a0a0c;
    --alua-red: #d32f2f;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    pointer-events: auto;
}

.header-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: 'Bergen Mono', monospace;
    font-size: 11px;
    letter-spacing: 1.2px;
    color: #fff;
}

.header-lang-switch .lang-option {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-family: inherit;
    font-size: inherit;
    letter-spacing: inherit;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.header-lang-switch .lang-option.active,
.header-lang-switch .lang-option:hover {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.nav-film-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 12px;
    letter-spacing: 1.2px;
    padding: 4px 0;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.nav-film-btn:hover {
    opacity: 1;
}

/* Two-Column Menu Overlay with Technical Sub-Menu */
.menu-overlay {
    padding: 96px 48px 48px;
    overflow-y: auto;
    align-items: flex-start;
    justify-content: center;
}

.menu-overlay-grid {
    width: 100%;
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: start;
}

.menu-overlay-grid .menu-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
}

.menu-overlay-grid .menu-link {
    font-size: clamp(24px, 3vw, 40px);
    line-height: 1.15;
    text-align: left;
}

.menu-col-label {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--alua-powder);
    margin-bottom: 12px;
    display: block;
}

.menu-tech-col {
    border-left: 1px solid rgba(255, 255, 255, 0.16);
    padding-left: 40px;
}

.menu-submenu {
    width: 100%;
}

.menu-submenu-toggle {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    letter-spacing: 2px;
    color: #fff;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    user-select: none;
}

.menu-submenu-toggle::-webkit-details-marker {
    display: none;
}

.submenu-plus {
    font-size: 18px;
    transition: transform 0.25s ease;
}

.menu-submenu[open] .submenu-plus {
    transform: rotate(45deg);
}

.menu-submenu-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 20px;
}

.submenu-link {
    font-family: 'Bergen Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.6px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    padding: 6px 0;
    transition: color 0.2s, transform 0.2s;
    display: inline-block;
}

.submenu-link:hover {
    color: #fff;
    transform: translateX(6px);
}

.submenu-link.accent {
    color: var(--alua-powder);
}

.submenu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 8px 0;
}

/* =====================================================
   INTRO SPACER & SUPER-FAST PARALLAX CONTRACT PANEL
   ===================================================== */
.hero-spacer {
    height: 350vh;
}

.contract-panel {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(105%);
    width: min(700px, 94vw);
    height: 82vh;
    height: 82dvh;
    background: #ffffff;
    border-radius: 10px 10px 0 0;
    border: 1px solid var(--alua-steel);
    border-bottom: none;
    box-shadow: 0 -24px 80px rgba(10, 10, 12, 0.22), 0 -4px 18px rgba(52, 33, 82, 0.12);
    z-index: 60;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    will-change: transform, opacity;
}

.contract-panel.panel-active {
    pointer-events: auto;
}

.contract-panel.dismissed {
    transform: translateX(-50%) translateY(-115%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}

.contract-panel-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--alua-cool-bg);
    border-bottom: 1px solid var(--alua-steel);
    gap: 12px;
    flex-shrink: 0;
}

.contract-bar-id {
    font-size: 10px;
    letter-spacing: 1.6px;
    color: var(--alua-violet);
    font-weight: 600;
}

.contract-bar-status {
    font-size: 10px;
    letter-spacing: 1.5px;
    color: var(--alua-red);
}

.contract-skip-mini {
    background: transparent;
    border: 1px solid rgba(10, 10, 12, 0.2);
    color: var(--alua-ink);
    font-size: 10px;
    letter-spacing: 1.2px;
    padding: 5px 10px;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.contract-skip-mini:hover {
    background: var(--alua-violet);
    border-color: var(--alua-violet);
    color: #fff;
}

.contract-progress-track {
    width: 100%;
    height: 3px;
    background: var(--alua-steel);
    flex-shrink: 0;
}

.contract-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--alua-violet), var(--alua-red));
    will-change: width;
}

.contract-viewport {
    position: relative;
    flex: 1;
    overflow: hidden;
    background: #ffffff;
}

.contract-scroll-img {
    display: block;
    width: 100%;
    height: auto;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    pointer-events: none;
}

/* =====================================================
   MANDATORY FULLSCREEN FILM GATE (alua_video.webm)
   ===================================================== */
.film-gate {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--alua-ink);
    z-index: 250;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(24px) scale(0.985);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.film-gate.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.film-gate.exiting {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-48px);
}

.film-gate-top {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 36px;
    background: linear-gradient(to bottom, rgba(10, 10, 12, 0.85), transparent);
}

.film-gate-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.film-gate-logo {
    height: 20px;
    width: auto;
    filter: invert(1);
}

.film-gate-tag {
    font-size: 11px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.7);
}

.film-audio-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    padding: 6px 4px;
    cursor: pointer;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.film-audio-btn:hover {
    color: #ffffff;
}

.film-video-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--alua-ink);
    z-index: 1;
}

.film-gate-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: none;
}

/* Custom cursor in video play/pause mode (|| or ▶) */
.custom-cursor.video-mode {
    width: auto;
    height: auto;
    min-width: 28px;
    background-color: transparent !important;
    mix-blend-mode: difference;
    border-radius: 0;
    color: #ffffff;
    font-family: 'Bergen Mono', monospace;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 3px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.custom-cursor.video-mode::before,
.custom-cursor.video-mode::after {
    display: none;
}

.film-gate-bottom {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 24px 36px 28px;
    background: linear-gradient(to top, rgba(10, 10, 12, 0.88) 25%, transparent);
    pointer-events: none;
}

.film-progress-track {
    width: min(560px, 86vw);
    height: 2px;
    background: rgba(255, 255, 255, 0.22);
    overflow: hidden;
}

.film-progress-fill {
    height: 100%;
    width: 0%;
    background: #ffffff;
    transition: width 0.15s linear;
}

/* Skip video styled like [ SCROLL ] ↓ label — NO rectangle */
.film-skip-btn {
    pointer-events: auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 8px 16px;
    cursor: pointer;
    transition: color 0.25s ease;
}

.film-skip-btn:hover {
    color: #ffffff;
}

.skip-arrow {
    font-size: 14px;
    line-height: 1;
    animation: skipArrowPulse 2.2s infinite ease-in-out;
}

@keyframes skipArrowPulse {
    0%, 100% { transform: translateY(0); opacity: 0.55; }
    50%      { transform: translateY(6px); opacity: 1; }
}

body.film-locked {
    overflow: hidden !important;
}

/* =====================================================
   EDITORIAL NARRATIVE COMPONENTS
   ===================================================== */
.chapter-kicker {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--alua-steel);
    padding-bottom: 16px;
    margin-bottom: 56px;
    gap: 16px;
    flex-wrap: wrap;
}

.chapter-num {
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--alua-violet);
    font-weight: 600;
}

.chapter-stamp {
    font-size: 11px;
    letter-spacing: 1.6px;
    color: var(--alua-red);
}

.stamp-inline {
    color: var(--alua-violet);
    font-size: 0.78em;
    letter-spacing: 1px;
}

/* 6-Photo Asymmetric Vibe Editorial Mosaic */
.vibe-editorial-mosaic {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-top: 84px;
}

.mosaic-item {
    margin: 0;
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mosaic-item.mosaic-lead {
    grid-column: span 8;
    grid-row: span 2;
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
    display: block;
    border-radius: 2px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: zoom-in;
}

.mosaic-item.mosaic-lead img {
    min-height: 520px;
}

.mosaic-item:hover img {
    transform: scale(1.015);
}

.mosaic-item figcaption {
    font-size: 10px;
    letter-spacing: 1.5px;
    color: #6b707a;
}

.section-cool-bg {
    background: var(--alua-cool-bg);
}

.editorial-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.editorial-pullquote {
    font-size: clamp(24px, 2.8vw, 36px);
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--alua-ink);
    font-weight: 400;
    margin-bottom: 28px;
}

.editorial-display {
    font-size: clamp(32px, 3.6vw, 52px);
    line-height: 1.06;
    letter-spacing: -0.025em;
    font-weight: 400;
    color: var(--alua-ink);
    margin: 14px 0 24px;
}

.kicker-violet {
    display: block;
    font-size: 11px;
    letter-spacing: 1.8px;
    color: var(--alua-violet);
    margin-bottom: 12px;
}

.kicker-red {
    display: block;
    font-size: 11px;
    letter-spacing: 1.8px;
    color: var(--alua-red);
    margin-bottom: 14px;
}

.alua-callout-violet {
    background: #ffffff;
    border-left: 3px solid var(--alua-violet);
    padding: 24px 28px;
    box-shadow: 0 4px 20px rgba(52, 33, 82, 0.05);
}

.alua-callout-violet p {
    font-size: 13px;
    line-height: 1.7;
    color: var(--alua-violet);
    margin: 0;
}

.card-index {
    display: block;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--alua-violet);
    margin-bottom: 14px;
    opacity: 0.75;
}

.grid-card:hover .card-index {
    color: var(--alua-powder);
}

/* Identity System Box (Palette & Typography Specimen) */
.identity-system-box {
    margin-top: 64px;
    background: var(--alua-cool-bg);
    border: 1px solid var(--alua-steel);
    border-top: 3px solid var(--alua-violet);
    padding: 40px;
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 48px;
    align-items: start;
}

.identity-box-label {
    display: block;
    font-size: 11px;
    letter-spacing: 1.8px;
    color: #6b707a;
    margin-bottom: 24px;
}

.palette-swatches {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.swatch-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.swatch-chip {
    width: 100%;
    height: 76px;
    border-radius: 3px;
}

.swatch-name {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--alua-ink);
    font-weight: 600;
}

.swatch-hex {
    font-size: 9px;
    letter-spacing: 0.8px;
    color: #6b707a;
}

.type-pair {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.type-sample-display {
    font-size: 32px;
    font-weight: 400;
    letter-spacing: -0.025em;
    color: var(--alua-ink);
    line-height: 1.1;
}

.type-sample-mono {
    font-size: 15px;
    letter-spacing: 1.4px;
    color: var(--alua-red);
}

.type-role {
    display: block;
    font-size: 10px;
    letter-spacing: 1.4px;
    color: #6b707a;
    margin-top: 6px;
}

/* Campaign Quotes */
.campaign-quotes-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.campaign-quotes-list li {
    font-size: 18px;
    font-style: italic;
    line-height: 1.45;
    padding: 16px 20px;
    background: var(--alua-cool-bg);
    border-left: 3px solid var(--alua-violet);
    color: var(--alua-ink);
}

/* Teaser Inline Editorial Grid */
.teaser-editorial-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 48px;
    align-items: start;
}

.teaser-player-wrap {
    background: var(--alua-ink);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(10, 10, 12, 0.16);
}

.teaser-inline-video {
    width: 100%;
    height: auto;
    display: block;
}

.script-details {
    margin-top: 28px;
    border-top: 1px solid var(--alua-ink);
    border-bottom: 1px solid var(--alua-ink);
}

.script-toggle {
    padding: 18px 0;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    letter-spacing: 1.4px;
}

.script-toggle::-webkit-details-marker {
    display: none;
}

.script-details[open] .toggle-icon {
    transform: rotate(45deg);
}

.toggle-icon {
    font-size: 20px;
    transition: transform 0.25s ease;
}

.script-content {
    padding: 8px 0 28px;
    font-style: italic;
    color: #4a4e57;
    line-height: 1.85;
}

/* EyeDeal Full-Bleed Hero & Studio Photo Grid */
.full-bleed-hero {
    position: relative;
    width: 100%;
    height: 82vh;
    overflow: hidden;
    background: var(--alua-ink);
}

.full-bleed-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.full-bleed-caption {
    position: absolute;
    bottom: 24px;
    left: 40px;
    background: rgba(10, 10, 12, 0.72);
    backdrop-filter: blur(8px);
    color: #fff;
    font-size: 11px;
    letter-spacing: 1.8px;
    padding: 8px 14px;
}

.studio-photo-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-top: 64px;
}

.studio-card {
    margin: 0;
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.studio-card.wide {
    grid-column: span 8;
}

.studio-card img {
    width: 100%;
    height: 360px;
    object-fit: cover;
    display: block;
    border-radius: 2px;
    cursor: zoom-in;
}

.studio-card figcaption {
    font-size: 10px;
    letter-spacing: 1.4px;
    color: #6b707a;
}

/* Tech Bridge Bar (Inline Pointer to Technical Sub-Menu) */
.tech-bridge-bar {
    margin-top: 56px;
    padding: 24px 32px;
    background: var(--alua-cool-bg);
    border: 1px solid var(--alua-steel);
    border-left: 3px solid var(--alua-violet);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.tech-bridge-bar > span {
    font-size: 11px;
    letter-spacing: 1.2px;
    color: #4a4e57;
}

.tech-bridge-link {
    font-size: 12px;
    letter-spacing: 1.4px;
    color: #fff;
    background: var(--alua-violet);
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 2px;
    transition: background 0.2s;
}

.tech-bridge-link:hover {
    background: var(--alua-violet-deep);
}

.overlay-kicker {
    display: block;
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--alua-powder);
    margin-bottom: 12px;
}

.overlay-tech-link {
    display: inline-block;
    margin-top: 24px;
    font-size: 11px;
    letter-spacing: 1.6px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    padding: 11px 20px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.overlay-tech-link:hover {
    background: var(--alua-violet);
    border-color: var(--alua-violet);
}

/* ALUA Systems Section */
.app-section {
    background: var(--alua-ink);
    color: #fff;
    padding: 120px 0;
    text-align: left;
}

.app-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.app-title {
    font-size: clamp(40px, 5.5vw, 76px);
    line-height: 0.92;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.alua-claim-quote {
    margin: 32px 0;
    padding: 24px 28px;
    background: rgba(52, 33, 82, 0.28);
    border-left: 3px solid var(--alua-red);
}

.app-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 36px;
}

.btn-outline-dark {
    display: inline-flex;
    align-items: center;
    padding: 15px 26px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #c8ccd6;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 1.4px;
    transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.btn-outline-dark:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.app-visual-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
}

.app-mockup-img {
    width: 100%;
    max-width: 440px;
    display: block;
}

.app-secondary-img {
    width: 100%;
    max-width: 440px;
    display: block;
    border-radius: 4px;
    border: 1px solid #222;
}

/* Inline Award Banner & Quick Archive Pills */
.award-inline-banner {
    background: var(--alua-cool-bg);
    border: 1px solid var(--alua-steel);
    border-left: 4px solid var(--alua-violet);
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.award-inline-meta h4 {
    font-size: 20px;
    font-weight: 500;
    margin: 6px 0;
    color: var(--alua-ink);
}

.award-inline-meta p {
    font-size: 14px;
    color: #555;
    margin: 0;
}

.award-inline-link {
    font-size: 11px;
    letter-spacing: 1.5px;
    color: var(--alua-violet);
    text-decoration: none;
    border-bottom: 1px solid var(--alua-violet);
    padding-bottom: 3px;
}

.quick-archive-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.archive-pill {
    font-size: 11px;
    letter-spacing: 1.4px;
    color: var(--alua-ink);
    border: 1px solid var(--alua-steel);
    background: var(--alua-cool-bg);
    padding: 12px 18px;
    text-decoration: none;
    transition: all 0.2s;
}

.archive-pill:hover {
    background: var(--alua-violet);
    border-color: var(--alua-violet);
    color: #fff;
}

.credits-box {
    margin-top: 72px;
    padding: 40px;
    background: #fff;
    border: 1px solid var(--alua-steel);
    border-top: 3px solid var(--alua-violet);
    text-align: center;
}

/* =====================================================
   RESPONSIVE OVERRIDES (MOBILE & TABLET)
   ===================================================== */
@media (max-width: 960px) {
    .menu-overlay-grid,
    .editorial-two-col,
    .identity-system-box,
    .teaser-editorial-grid,
    .app-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .menu-tech-col {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.16);
        padding-left: 0;
        padding-top: 28px;
    }

    .palette-swatches {
        grid-template-columns: repeat(2, 1fr);
    }

    .mosaic-item,
    .mosaic-item.mosaic-lead,
    .studio-card,
    .studio-card.wide {
        grid-column: span 12;
    }

    .mosaic-item.mosaic-lead img {
        min-height: 280px;
    }

    .studio-card img {
        height: 260px;
    }

    .film-gate-video {
        object-fit: contain;
    }
}

@media (max-width: 600px) {
    .contract-panel {
        width: 96vw;
        height: 78dvh;
    }

    .contract-panel-bar {
        padding: 10px 14px;
    }

    .contract-bar-id {
        display: none;
    }

    .film-gate-top,
    .film-gate-bottom {
        padding: 16px 20px;
    }

    .film-gate-tag {
        display: none;
    }

    .nav-film-btn {
        padding: 5px 9px;
        font-size: 10px;
    }

    .full-bleed-hero {
        height: 55vh;
    }

    .full-bleed-caption {
        left: 16px;
        bottom: 16px;
        font-size: 9px;
    }
}


/* ==========================================================================
   ALUA PREMIUM MOTION SYSTEM & FULL MOBILE POLISH
   ========================================================================== */

/* Signature ALUA Editorial Reveals (Optical Focus + Weighted Glide) */
.alua-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.95s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.95s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform, filter;
}

.alua-reveal.alua-reveal-blur {
    filter: blur(8px);
    transform: translateY(20px);
}

.alua-reveal.alua-reveal-media {
    transform: translateY(24px) scale(1.03);
    transition: opacity 1.05s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.alua-reveal.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
}

/* Enhanced Film Gate Curtain Transition */
.film-gate {
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.95s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.film-gate.exiting {
    opacity: 0;
    transform: translateY(-64px) scale(1.015);
}

/* Refined Interactive Hover Transitions */
.grid-card,
.doc-download-card,
.archive-pill,
.tech-bridge-link,
.overlay-tech-link,
.btn-presentation {
    transition: background 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Technical Dossier Footer Meta & Language Switcher */
.dossier-footer-meta {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #d8dbe2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.dossier-footer-lang {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Bergen Mono', monospace;
    font-size: 11px;
    letter-spacing: 1.4px;
    color: #4a4e57;
}

.dossier-footer-lang .lang-option {
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    letter-spacing: inherit;
    color: #8e929b;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.dossier-footer-lang .lang-option.active,
.dossier-footer-lang .lang-option:hover {
    color: #342152;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Readable editorial scrim on full-bleed photo overlays */
.full-image-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 12, 0.82) 0%, rgba(10, 10, 12, 0.32) 48%, rgba(10, 10, 12, 0.12) 100%);
    pointer-events: none;
    z-index: 1;
}

.full-image-container .overlay-text {
    z-index: 2;
}

/* ==========================================================================
   COMPREHENSIVE MOBILE ADAPTATION (<= 768px & <= 480px)
   ========================================================================== */
@media (max-width: 768px) {
    html, body {
        overflow-x: clip;
        max-width: 100vw;
    }

    /* Header */
    .header-actions {
        gap: 16px;
    }

    .nav-film-btn {
        font-size: 11px;
    }

    /* Menu Overlay */
    .menu-overlay {
        padding: 84px 24px 40px;
    }

    .menu-overlay-grid {
        gap: 32px;
    }

    .menu-overlay-grid .menu-link {
        font-size: 24px;
        line-height: 1.25;
        padding: 4px 0;
    }

    .submenu-link {
        font-size: 12px;
        padding: 8px 0;
    }

    /* Intro & Parallax Contract */
    .hero-whatif-text {
        font-size: clamp(24px, 6.8vw, 36px);
        line-height: 1.22;
    }

    .hero-logo-img {
        width: 78vw;
    }

    .hero-subtitle {
        font-size: 10px;
        letter-spacing: 2px;
    }

    .contract-panel {
        width: 95vw;
        height: 80dvh;
        border-radius: 8px 8px 0 0;
    }

    /* Fullscreen Film Gate on Mobile */
    .film-gate-top {
        padding: 16px 20px;
    }

    .film-gate-bottom {
        padding: 18px 20px calc(22px + env(safe-area-inset-bottom, 0px));
        gap: 12px;
    }

    .film-gate-video {
        object-fit: contain;
    }

    /* Sections Vertical Rhythm */
    .manifesto,
    .data-grid-section,
    .flow-section,
    .doc-section,
    .app-section {
        padding-top: 72px;
        padding-bottom: 72px;
    }

    .chapter-kicker {
        margin-bottom: 36px;
        padding-bottom: 12px;
    }

    .chapter-stamp {
        font-size: 10px;
    }

    .flaiano-quote-box {
        margin-bottom: 36px;
        padding: 20px 22px;
    }

    .flaiano-quote {
        font-size: 22px;
    }

    .editorial-display {
        font-size: clamp(26px, 7.5vw, 36px);
        margin: 10px 0 18px;
    }

    .editorial-pullquote {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .text-block {
        font-size: 16px;
        line-height: 1.6;
    }

    /* Vibe Mosaic: 2-col clean rhythm on mobile */
    .vibe-editorial-mosaic {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-top: 48px;
    }

    .mosaic-item {
        grid-column: span 1;
    }

    .mosaic-item.mosaic-lead {
        grid-column: span 2;
        grid-row: span 1;
    }

    .mosaic-item img {
        min-height: 170px;
        height: 180px;
    }

    .mosaic-item.mosaic-lead img {
        min-height: 230px;
        height: 240px;
    }

    .mosaic-item figcaption {
        font-size: 9px;
        letter-spacing: 1px;
    }

    /* Identity Specimen */
    .identity-system-box {
        padding: 24px 20px;
        gap: 32px;
        margin-top: 40px;
    }

    .swatch-chip {
        height: 56px;
    }

    .type-sample-display {
        font-size: 26px;
    }

    .type-sample-mono {
        font-size: 13px;
    }

    /* Campaign & Teaser */
    .campaign-quotes-list li {
        font-size: 15px;
        padding: 14px 16px;
    }

    /* EyeDeal Studio Grid */
    .studio-photo-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 40px;
    }

    .studio-card,
    .studio-card.wide {
        grid-column: span 1;
    }

    .studio-card img {
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .tech-bridge-bar {
        padding: 20px;
        gap: 16px;
    }

    .tech-bridge-link {
        width: 100%;
        text-align: center;
    }

    /* Full-Bleed Overlays (Lo Sguardo, Il Patto, Il Contratto) */
    .full-image-container {
        height: 82dvh;
    }

    .full-image-container .overlay-text {
        padding: 24px 20px 32px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        max-width: 100% !important;
    }

    .overlay-tech-link {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
    }

    /* App Section */
    .app-title {
        font-size: clamp(34px, 10vw, 48px);
        margin-bottom: 24px;
    }

    .app-cta-row {
        flex-direction: column;
    }

    .app-cta-row a {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Exhibition 12-photo grid: crisp 2-col aligned to exact 20px rail */
    .experience-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 0 20px !important;
    }

    .experience-item img {
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }

    /* Award inline banner & Archive pills */
    .award-inline-banner {
        padding: 20px;
    }

    .quick-archive-pills {
        flex-direction: column;
    }

    .archive-pill {
        text-align: center;
    }

    .credits-box {
        padding: 28px 20px;
        margin-top: 48px;
    }

    /* Footer */
    .contact-form-grid {
        grid-template-columns: 1fr !important;
    }

    .footer-meta {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    /* Technical Dossier Mobile */
    .dossier-hero {
        padding: 112px 0 56px;
    }

    .dossier-band {
        padding: 64px 0;
    }

    .dossier-lead-copy {
        font-size: 17px;
    }

    .dossier-sec-header {
        margin-bottom: 36px;
    }

    .schematic-plate {
        padding: 24px 14px;
        margin-top: 32px;
    }

    .dossier-malus-strip {
        padding: 22px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .alua-reveal,
    .alua-reveal.alua-reveal-blur,
    .alua-reveal.alua-reveal-media {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
    }
}


/* ==========================================================================
   ALUA SHARP GEOMETRY ENFORCEMENT — ZERO ROUNDED CORNERS & BLACK BORDERS
   ========================================================================== */
*:not(.custom-cursor):not(.award-modal-close):not(.morph-dialog-close):not(.morph-card-close-btn) {
    border-radius: 0 !important;
}

.contract-panel {
    border: 1px solid #000000;
    border-bottom: none;
}

.contract-panel-bar {
    border-bottom: 1px solid #000000;
}

.contract-skip-mini {
    border: 1px solid #000000;
}

.chapter-kicker,
.section-header-small {
    border-bottom-color: #000000;
}

.alua-callout-violet,
.campaign-quotes-list li {
    border: 1px solid #000000;
    border-left: 3px solid #000000;
    box-shadow: none;
}

.identity-system-box {
    border: 1px solid #000000;
    border-top: 2px solid #000000;
}

.swatch-chip {
    border: 1px solid #000000;
}

.teaser-player-wrap {
    border: 1px solid #000000;
    box-shadow: none;
}

.tech-bridge-bar,
.award-inline-banner,
.credits-box,
.archive-pill {
    border: 1px solid #000000;
}

.tech-bridge-bar {
    border-left: 3px solid #000000;
}

.award-inline-banner {
    border-left: 3px solid #000000;
}

.credits-box {
    border-top: 2px solid #000000;
}

.award-modal-card {
    border: 1px solid #000000;
}

/* Keep sticky gallery & scenario scroll containers immune to overflow/transform traps */
.sticky-gallery-section,
.scenario-scroll-section {
    overflow: visible;
}

/* Team Social Links Row (Instagram + LinkedIn matching style) */
.team-social-links {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.team-social-links .team-linkedin-link {
    position: static;
    margin: 0;
}

.film-top-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

@media (max-width: 600px) {
    .film-top-controls {
        gap: 14px;
    }
}

/* Centered Top Brand & Bottom Controls on Film Gate */
.film-gate-top {
    justify-content: center;
    padding: 26px 24px 20px;
    pointer-events: none;
}

.film-gate-brand {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
}

.film-gate-tag {
    display: block !important;
    font-size: 10.5px;
    letter-spacing: 2.2px;
    color: rgba(255, 255, 255, 0.78);
    text-transform: uppercase;
}

.film-bottom-controls {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

@media (max-width: 600px) {
    .film-gate-top {
        padding: 18px 16px 14px;
    }

    .film-bottom-controls {
        gap: 20px;
    }
}

/* ==========================================================================
   VIDEO LITTLE PERCENTAGE + POST-VIDEO CONTRACT PARALLAX PRINT-OUT STAGE
   ========================================================================== */
.hero-spacer {
    height: 225vh;
}

.film-progress-pct {
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1;
}

/* Post-Video Thermal Contract Print-Out Parallax Section */
.contract-parallax-stage {
    position: relative;
    height: 215vh;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #000000;
    overflow: visible;
}

.contract-sticky-frame {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 84px 20px 36px;
    background: #ffffff;
    overflow: hidden;
}

.contract-sheet-window {
    position: relative;
    width: min(680px, 94vw);
    height: min(76vh, 76dvh);
    border: 1px solid #000000;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.08);
}

.contract-scroll-hint {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(0, 0, 0, 0.45);
}

@media (max-width: 768px) {
    .contract-sticky-frame {
        padding: 72px 20px 28px;
    }

    .contract-sheet-window {
        width: 100%;
        height: 74dvh;
    }
}

/* Full-Screen Edge-to-Edge Contract Parallax + Big Percentage Bottom HUD */
.contract-parallax-stage {
    height: 230vh;
    border-bottom: 1px solid #000000;
}

.contract-sticky-frame {
    padding: 0 !important;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    position: sticky;
    top: 0;
    background: #ffffff;
    overflow: hidden;
}

.contract-sheet-window {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    box-shadow: none !important;
    overflow: hidden;
    background: #ffffff;
}

.contract-bottom-hud {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 64px 20px calc(26px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, rgba(255, 255, 255, 0.96) 36%, rgba(255, 255, 255, 0.72) 72%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
}

.contract-big-pct {
    font-family: 'Neue Haas Grotesk Display Pro', sans-serif;
    font-size: clamp(52px, 7.2vw, 96px);
    font-weight: 300;
    letter-spacing: -0.04em;
    line-height: 0.95;
    color: #000000;
    font-variant-numeric: tabular-nums;
}

.contract-bottom-hud .contract-scroll-hint {
    margin-top: 2px;
    color: rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   SCROLL-DRIVEN BLACK FRAME ZOOMING FROM AFAR INTO FULLSCREEN
   ========================================================================== */
.hero-spacer {
    height: 260vh;
}

.film-gate.approaching {
    visibility: visible;
    pointer-events: none;
    transition: none !important;
    transform-origin: center center;
    will-change: transform, opacity;
}

.film-gate.approaching .film-gate-top,
.film-gate.approaching .film-gate-bottom {
    opacity: 0;
    transition: opacity 0.45s ease;
}

.film-gate.active .film-gate-top,
.film-gate.active .film-gate-bottom {
    opacity: 1;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

.film-gate.approaching .film-gate-video {
    opacity: 0;
}

.film-gate.active .film-gate-video {
    opacity: 1;
    transition: opacity 0.55s ease;
}

/* Pure #000000 Black Canvas when Video Gate is Active */
body.film-locked,
.film-gate,
.film-video-stage,
.film-gate-video {
    background: #000000 !important;
    background-color: #000000 !important;
}

/* More Visible Opening Scroll Indicator */
.hero-scroll-indicator {
    bottom: 36px;
    color: #000000;
    font-size: 12px;
    letter-spacing: 2.5px;
    gap: 8px;
    animation: scrollIndicatorIn 0.6s ease forwards 0.9s, heroScrollPulseStrong 2s infinite ease-in-out 1.5s;
}

.hero-scroll-indicator .scroll-arrow {
    font-size: 18px;
    line-height: 1;
}

@keyframes heroScrollPulseStrong {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.72; }
    50%      { transform: translateX(-50%) translateY(8px); opacity: 1; }
}


/* ==========================================================================
   TYPOGRAPHIC SCALE REFINEMENT & 60FPS PERFORMANCE POLISH
   ========================================================================== */

/* 1. Refined, Balanced Editorial Typography (keeping opening/first part bold & impactful) */
.editorial-display {
    font-size: clamp(26px, 2.8vw, 40px) !important;
    line-height: 1.1;
}

.editorial-pullquote {
    font-size: clamp(20px, 2.1vw, 28px) !important;
    line-height: 1.32;
}

.flow-title {
    font-size: clamp(28px, 3.4vw, 46px) !important;
    line-height: 1.04;
}

.app-title {
    font-size: clamp(30px, 4vw, 54px) !important;
    line-height: 0.96;
}

.footer-big-text {
    font-size: clamp(28px, 3.8vw, 52px) !important;
    line-height: 1.06;
}

.contract-big-pct {
    font-size: clamp(40px, 5vw, 68px) !important;
}

.menu-overlay-grid .menu-link {
    font-size: clamp(20px, 2.2vw, 30px) !important;
}

/* 2. Zero-Lag GPU-Only Scroll Reveals (no expensive filter: blur() per frame!) */
.alua-reveal,
.alua-reveal.alua-reveal-blur {
    opacity: 0;
    filter: none !important;
    transform: translate3d(0, 18px, 0);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: auto;
}

.alua-reveal.alua-reveal-media {
    opacity: 0;
    transform: translate3d(0, 16px, 0) scale(1.015);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: auto;
}

.alua-reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}

/* 3. GPU Containment on Heavy Media & Contract Viewport */
.contract-sheet-window {
    contain: strict;
}

.mosaic-item,
.studio-card,
.experience-item {
    contain: layout paint style;
}

.site-header {
    filter: none !important;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Minimalist Centered Play Overlay on Fullscreen Film Gate (guarantees unmuted playback on iOS & Desktop) */
.film-play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: rgba(0, 0, 0, 0.35);
    border: none;
    color: #ffffff;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.film-play-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.film-gate.approaching .film-play-overlay {
    opacity: 0;
    pointer-events: none;
}

.film-play-glyph {
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1;
    padding-left: 6px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.film-play-label {
    font-size: 11px;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

.film-play-overlay:hover .film-play-glyph {
    transform: scale(1.14);
}
