/* 
 * I Have a Dream Academy - BRAND CONSOLIDATION 9.5
 * Cinematic & Premium Digital System
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Playfair+Display:ital,wght@0,700;1,400&display=swap');

:root {
    --bg: #0A0A0A;
    --gold: #D4AF37;
    --text: #ffffff;
    --muted: rgba(255, 255, 255, 0.7);
    --radius: 14px;
    --transition: 0.6s cubic-bezier(0.22, 1, 0.36, 1);

    --font-main: 'Inter', sans-serif;
    --font-accent: 'Playfair Display', serif;
    --container-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

section {
    padding: 100px 20px;
}

.footer {
    padding: 80px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #050505;
}

.footer__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.text-gold {
    color: var(--gold);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

img {
    border-radius: var(--radius);
}

a,
button {
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

/* TITOLI UNIFICATI (COERENZA MATEMATICA) */
h1,
.h1 {
    font-family: var(--font-accent);
    font-size: clamp(2.2rem, 4vw, 4.5rem);
    letter-spacing: -1px;
    line-height: 1.05;
    text-transform: uppercase;
}

h2,
.h2 {
    font-family: var(--font-accent);
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.1;
    margin-bottom: 2rem;
}

h3,
.h3 {
    font-family: var(--font-accent);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

/* BOTTONI UNIFICATI */
.btn {
    display: inline-block;
    padding: 16px 36px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    border-radius: var(--radius);
    font-size: 0.75rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--gold);
    color: #000 !important;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.25);
}

.btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-outline:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
    transform: translateY(-3px);
}

/* HEADER */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: var(--transition);
}

.header.is-scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

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

.header__nav {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.header__links {
    display: flex;
    gap: 2rem;
}

.header__link {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    opacity: 0.7;
}

.header__link:hover,
.header__link.is-active {
    opacity: 1;
    color: var(--gold);
}

/* MOTION SYSTEM (FONDAMENTALE) */
.reveal,
.reveal-left,
.reveal-right {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
    will-change: transform, opacity;
}

.reveal-left {
    transform: translateX(-30px);
}

.reveal-right {
    transform: translateX(30px);
}

.reveal.active,
.reveal-left.active,
.reveal-right.active {
    opacity: 1;
    transform: translate(0);
}

.stagger>* {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.stagger.active>* {
    opacity: 1;
    transform: translateY(0);
}

/* SOCIAL LIVE SECTION */
.social-live {
    text-align: center;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 40px 0;
}

.social-grid div {
    aspect-ratio: 1/1;
    background: #222;
    border-radius: 10px;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.social-grid div:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.social-handle {
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* HERO */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #000;
}

.hero__video-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.7));
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    padding-left: 0;
    width: 100%;
    text-align: center;
    margin: 0 auto;
}

/* VIDEO/IMAGE HERO POSITIONING */
.hero__video-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* Valore base cinematico */
    opacity: 0.8;
    z-index: 1;
    background-size: cover;
    background-position: top;
}

.video-pos-top {
    object-position: center 30%;
    background-position: center 30%;
}

.video-pos-center {
    object-position: center 50%;
    background-position: center 50%;
}

.video-pos-low {
    object-position: center 70%;
    background-position: center 70%;
}

.video-pos-bottom {
    object-position: center 80%;
    background-position: center 80%;
}

/* MAESTRI CAST SYSTEM */
.maestro-spotlight,
.maestro-cast-card {
    position: relative;
    background: #111;
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Bordo base quasi invisibile */
}

/* Border Draw Effect */
.maestro-spotlight::before,
.maestro-cast-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 3px solid var(--gold);
    border-radius: var(--radius);
    z-index: 10;
    pointer-events: none;

    /* Animazione disegno: usiamo clip-path per farlo "partire e chiudersi" */
    clip-path: inset(0 100% 100% 0);
    /* Inizia nell'angolo in alto a sx */
    transition: clip-path 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.maestro-spotlight:hover::before,
.maestro-cast-card:hover::before {
    clip-path: inset(0 0 0 0);
    /* Si chiude su tutto il perimetro */
}

.maestro-spotlight:hover,
.maestro-cast-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(-6px);
}

.maestro-spotlight {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
}

.maestro-spotlight__img {
    aspect-ratio: 3/4; /* Rapporto verticale costante */
    width: 100%;
    overflow: hidden;
}

.maestro-spotlight__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 1s ease;
    border-radius: 0;
}

.maestro-spotlight:hover .maestro-spotlight__img img {
    transform: scale(1.05);
}

.maestro-spotlight__content {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.maestro-spotlight__content h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin: 1rem 0;
}

.maestro-spotlight__content p {
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.view-profile {
    color: var(--gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
}

/* CAST GRID */
.maestri-cast-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.maestro-cast-card__img {
    aspect-ratio: 3/4;
    width: 100%;
    overflow: hidden;
}

.maestro-cast-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    border-radius: 0;
}

.maestro-cast-card__info {
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 1) 10%, transparent);
    position: absolute;
    bottom: 0;
    width: 100%;
}

.maestro-cast-card h3 {
    font-size: 1.6rem;
    color: #fff;
    margin-top: 5px;
}

.maestro-cast-card:hover .maestro-cast-card__img img {
    transform: scale(1.08);
}

/* MOBILE TOGGLE (Hidden on Desktop) */
.header__toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.header__toggle span {
    width: 30px;
    height: 2px;
    background: #fff;
    transition: 0.3s;
}

/* MOBILE NAV OVERLAY (Hidden by Default) */
.mobile-nav {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.mobile-nav.is-active {
    display: flex;
}

.mobile-nav__close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 3rem;
    color: #fff;
    cursor: pointer;
}

.mobile-nav__links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.mobile-nav__link {
    font-size: 1.5rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
}

/* ==========================================================================
   AUDIT RESPONSIVO (SOLO REGOLE DI LAYOUT)
   ========================================================================== */

@media (max-width: 991px) {
    .header__nav { display: none; }
    .header__toggle { display: flex; }
    .maestri-cast-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; } /* 2 Colonne su Mobile */
    .social-grid { grid-template-columns: 1fr; }
    .maestro-spotlight { grid-template-columns: 1fr; }
    .maestro-spotlight__img { width: 75%; margin: 0 auto; border-radius: var(--radius); } /* Ridotta di 1/4 e centrata */
    .maestro-spotlight__content { text-align: center; padding: 40px 20px; }
    /* Rimosso height: 400px fisso per evitare il taglio verticale */
}

/* 📱 Mobile piccolo: Sotto 481px */
@media (max-width: 480px) {
    .maestri-cast-grid { grid-template-columns: 1fr; gap: 20px; }
    .maestro-spotlight__img { width: 100%; } /* Torna a 100% per non essere troppo piccola sui micro-schermi */
}

/* Extra Small (Phone): < 576px */
@media (max-width: 575px) {
    .logo-img { height: 60px !important; }
    section { padding: 60px 15px; }
    .footer__grid { grid-template-columns: 1fr; text-align: center; }
    .footer-contact, .footer-socials { align-items: center !important; justify-content: center !important; text-align: center !important; }
}

/* Small (Landscape Phone/Small Tablet): ≥ 576px */
@media (min-width: 576px) and (max-width: 991px) {
    .footer__grid { grid-template-columns: repeat(2, 1fr); text-align: left; }
}

/* Desktop Fixes */
@media (min-width: 992px) {
    .footer__grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1920px) {
    /* Regole per monitor ultra-wide se necessarie */
}