/* --- Base Styles & Typography --- */
:root {
    --dark-bg: #0a0a0a;
    --light-text: #f0f0f0;
    --accent-color: #e6b800; /* Un oro/ambra per richiamare il sole/tramonto */
    --secondary-accent: #8b4513; /* Un marrone più scuro per i dettagli */
    --klara-font: 'Lexend Giga', sans-serif; /* Nuovo font per il logo KLARA */
    --main-titles-font: 'Lexend Giga', sans-serif; /* Per gli altri titoli h2, h3 */
    --body-font: 'Lora', serif; /* Per il corpo del testo e il prologo */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    cursor: none !important; /* Nasconde il cursore di sistema per l'intero body, forzando l'override */
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: var(--main-titles-font); /* Tutti i titoli useranno Lexend Giga */
    color: var(--light-text);
    margin-bottom: 1em;
}

/* Override per i titoli principali e il logo che devono usare Lexend Giga */
.klara-logo, .klara-title {
    font-family: var(--klara-font);
    font-weight: 100; /* Lexend Giga Thin 100 */
}

/* Specifiche per i vari livelli di titolo */
h1 { font-size: 3em; } /* Già gestito da .klara-logo */
h2 { font-size: 2.5em; font-weight: 300; } /* Lexend Giga Light 300 */
h3 { font-size: 1.8em; font-weight: 400; } /* Lexend Giga Regular 400 */

p {
    margin-bottom: 1em;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--light-text);
}

.section-padding {
    padding: 80px 0;
    text-align: center;
}

.section-title {
    font-size: 2.8em;
    font-weight: 300; /* Lexend Giga Light 300 */
    margin-bottom: 1.5em;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 15px auto 0;
}

/* --- Header --- */
.main-header {
    background-color: rgba(0, 0, 0, 0.7); /* Leggermente trasparente */
    padding: 20px 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
    top: 0;
    left: 0;
    display: flex; /* Per allineare logo e bottone */
    align-items: center;
    justify-content: space-between; /* Spazia logo e bottone */
    
    /* L'intero header parte nascosto */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out; /* Transizione per l'apparizione */
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Di default, il logo nella header è nascosto */
.main-header .klara-logo {
    font-size: 2.5em; /* Manteniamo la dimensione per il logo nell'header */
    letter-spacing: 2px;
    color: var(--light-text);
    margin: 0;
    text-align: left;
    font-family: var(--klara-font); /* Assicurati che usi Lexend Giga Thin */
    font-weight: 100;
}

/* Bottone Play/Stop - SEMPRE VISIBILE */
.music-toggle-button {
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 1.5em; /* Dimensione icona */
    cursor: pointer;
    transition: color 0.3s ease; /* Mantiene la transizione per l'hover */
    z-index: 1001;
    padding: 0 10px; /* Spazio intorno all'icona */
}

.music-toggle-button:hover {
    color: var(--accent-color);
}

/* Quando la classe 'scrolled' è applicata al main-header, l'intero header diventa visibile */
.main-header.scrolled {
    opacity: 1;
    visibility: visible;
}

/* --- Hero Section --- */
#hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--light-text);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;

    /* REGOLE PER IL PARALLAX */
    background-image: url('klara.png'); /* La tua immagine */
    background-size: cover; /* Copre l'intera area */
    background-position: center center; /* Centra l'immagine */
    background-attachment: fixed; /* Questo crea l'effetto parallax */
    filter: brightness(0.7) contrast(1.1); /* Applica il filtro direttamente allo sfondo */
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    /* Sfondo sfumato per migliorare la leggibilità del testo */
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 50%, rgba(0,0,0,0.6) 100%);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Per posizionare Klara in alto e malinconia in basso */
    align-items: flex-start; /* Allinea a sinistra */
    padding: 15vh 10vw; /* Padding per staccare dai bordi */
}

.hero-content .klara-title {
    font-family: var(--klara-font); /* Lexend Giga Thin 100 */
    font-size: 6em; /* Grande come nell'immagine */
    letter-spacing: 5px;
    margin-top: 0;
    margin-bottom: 0;
    text-align: left;
    line-height: 1;
    animation: fadeIn 2s ease-out;
}

.hero-content .klara-subtitle {
    font-family: var(--body-font); /* Lora Italic 400 */
    font-size: 2.2em;
    font-style: italic;
    font-weight: 400;
    text-align: left;
    margin-top: auto; /* Sposta in basso */
    margin-bottom: 10vh; /* Sposta più in alto del footer implicito */
    line-height: 1;
    animation: fadeIn 2.5s ease-out 0.5s backwards;
}

/* Animazioni per il testo principale e sottotitolo */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: translate(-50%, 60%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, 50%) scale(1); }
}

/* --- Animated Tagline --- */
.animated-tagline-wrapper {
    position: absolute;
    bottom: 50%; /* Centra verticalmente come prima */
    left: 50%;
    transform: translate(-50%, 50%);
    width: 80%; /* Limita la larghezza per il testo */
    height: 3em; /* Altezza fissa per evitare salti di layout */
    overflow: hidden; /* Nasconde le linee non attive */
    display: flex; /* Per centrare il testo all'interno */
    align-items: center;
    justify-content: center;
    font-family: var(--body-font); /* Lora Italic 400 */
    font-size: 1.5em;
    font-style: italic;
    color: var(--light-text);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    white-space: nowrap; /* Evita che le linee vadano a capo */
    opacity: 0; /* Inizialmente nascosto, verrà mostrato da JS */
    animation: fadeInScale 2s ease-out 1s forwards; /* Mantiene l'animazione iniziale */
}

.tagline-line {
    position: absolute;
    opacity: 0;
    transform: scale(1); /* Stato iniziale e di riposo */
    transition: opacity 2s ease-in-out, transform 2s ease-in-out; /* Transizione per opacità e trasformazione */
    text-align: center;
    width: 100%; /* Occupa tutta la larghezza del wrapper */
}

.tagline-line.active {
    opacity: 1;
    transform: scale(1); /* Stato attivo: completamente visibile, dimensione normale */
}

/* CLASSE PER L'ANIMAZIONE DI USCITA */
.tagline-line.is-exiting {
    opacity: 0;
    transform: scale(1.2); /* Si dissolve e si ingrandisce */
}


/* --- About Section --- */
#about p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1em;
}

.about-narrative {
    margin-top: 50px;
    text-align: justify;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.about-narrative p {
    margin-bottom: 1.5em;
    line-height: 1.8;
}

/* --- Origins Section --- */
#origins {
    background-color: #111; /* Sfondo leggermente diverso per staccare da About */
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.origins-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: justify; /* Testo giustificato per un aspetto più "letterario" */
}

.origins-content p {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 1.5em;
    color: #d0d0d0;
}

/* --- Volume One Section (Prologue) --- */
#volume-one {
    background-color: var(--dark-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#volume-one p {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1em;
}

.prologue {
    background-color: #1a1a1a;
    padding: 40px;
    margin-top: 50px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    border-left: 5px solid var(--accent-color);
    text-align: left;
}

.prologue-title {
    color: var(--accent-color);
    font-size: 1.6em;
    font-weight: 400; /* Lexend Giga Regular 400 */
    margin-bottom: 25px;
    text-align: center;
}

.prologue blockquote {
    font-style: italic;
    color: #c0c0c0;
    font-size: 1.05em;
    line-height: 1.8;
}

.prologue blockquote p {
    margin-bottom: 1em;
    text-indent: 1.5em;
}

.prologue blockquote p:last-child {
    margin-bottom: 0;
}

.prologue-credit {
    margin-top: 15px;
    text-align: right;
    font-style: italic;
    font-size: 0.65em !important; /* Più piccolo rispetto al testo del prologo */
    color: #b0b0b0; /* Colore più tenue */
    font-family: var(--body-font); /* Lora Italic 400 */
}

/* --- Contributori Section --- */
#contributors {
    background-color: #111; /* Sfondo leggermente diverso per staccare */
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#contributors .contributor-list {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 0;
    text-align: center; /* Centrato per default */
}

#contributors .contributor-list p {
    font-size: 1.05em;
    line-height: 1.6;
    color: #d0d0d0;
    margin-bottom: 0.8em; /* Spazio tra i contributori se ce ne saranno di più */
}

#contributors .contributor-list strong {
    color: var(--accent-color); /* Per evidenziare il ruolo */
}


/* --- Call to Action (CTA) --- */
.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--dark-bg);
    padding: 15px 30px;
    border-radius: 5px;
    font-family: var(--main-titles-font); /* Lexend Giga Medium 500 */
    font-weight: 500;
    font-size: 1.1em;
    text-transform: uppercase;
    margin: 15px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    background-color: var(--light-text);
    transform: translateY(-3px);
    color: var(--dark-bg);
}

.cta-button.secondary {
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.cta-button.secondary:hover {
    background-color: var(--accent-color);
    color: var(--dark-bg);
}

/* --- Social Section --- */
#social .social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

#social .social-links a {
    font-size: 2.5em;
    color: var(--light-text);
    transition: color 0.3s ease, transform 0.3s ease;
}

#social .social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-5px);
}

/* --- Footer --- */
footer {
    background-color: #000;
    color: #777;
    padding: 40px 0;
    font-size: 0.9em;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer p {
    margin: 0.5em 0;
}

/* --- Custom Cursor (Klara's Gaze) --- */
/* Forza il cursore a "none" per tutti gli elementi interattivi */
a, button, summary, .music-toggle-button, .cta-button, .social-links a, .partner-card, .press-card {
    cursor: none !important;
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px; /* Dimensione dell'anello */
    height: 20px;
    border: 1px solid rgba(230, 184, 0, 0.5); /* Colore accent, semi-trasparente */
    border-radius: 50%;
    pointer-events: none; /* Importante: permette ai click di passare attraverso */
    transform: translate(-50%, -50%); /* Centra il cursore sulla posizione del mouse */
    z-index: 9999; /* Assicura che sia sempre in cima */
    transition: width 0.2s ease-out, height 0.2s ease-out, border-color 0.2s ease-out, background-color 0.2s ease-out, box-shadow 0.2s ease-out;
    box-shadow: 0 0 5px rgba(230, 184, 0, 0.3); /* Bagliore sottile */
}

.custom-cursor.hover {
    width: 30px; /* Ingrandisce al passaggio del mouse */
    height: 30px;
    border-color: var(--accent-color); /* Bordo più solido */
    background-color: rgba(230, 184, 0, 0.1); /* Leggero riempimento */
    box-shadow: 0 0 10px var(--accent-color); /* Bagliore più forte */
}

/* Assicurati che il cursore di sistema sia visibile su input di testo */
input[type="text"], textarea {
    cursor: text !important; /* Forza il cursore di testo */
}

/* --- Partners Section --- */
#partners {
    background-color: #0f0f0f;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.partners-intro {
    max-width: 700px;
    margin: 0 auto 50px;
    text-align: center;
}

.partners-subtitle {
    font-size: 1.1em;
    color: #c8c8c8;
    font-style: italic;
    margin-top: -10px;
    margin-bottom: 0;
}

.partners-showcase {
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 30px;
    align-items: stretch;
    max-width: 900px;
    margin: 0 auto;
}

.partner-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.015) 100%);
    border: 1px solid rgba(230, 184, 0, 0.12);
    border-radius: 14px;
    min-height: 240px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
    color: var(--light-text);
}

.partner-card:hover {
    transform: translateY(-6px);
    border-color: rgba(230, 184, 0, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    color: var(--light-text);
}

.partner-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    padding: 10px;
    margin-bottom: 24px;
}

.partner-logo-wrap img {
    max-width: 100%;
    max-height: 90px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0.98);
    transition: transform 0.35s ease, filter 0.35s ease;
}

.partner-card:hover .partner-logo-wrap img {
    transform: scale(1.02);
    filter: brightness(1.05);
}

.partner-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
    text-align: center;
}

.partner-name {
    font-family: var(--main-titles-font);
    font-size: 1em;
    font-weight: 300;
    letter-spacing: 1px;
    color: var(--light-text);
    text-transform: uppercase;
}

.partner-link {
    font-family: var(--body-font);
    font-size: 0.95em;
    font-style: italic;
    color: var(--accent-color);
    opacity: 0.9;
}

/* Wrapper CTA se usi il blocco HTML aggiornato */
.cta-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* --- Press Section --- */
#press {
    background-color: var(--dark-bg);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.press-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    align-items: stretch;
    max-width: 900px;
    margin: 0 auto;
}

.press-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px 28px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.015) 100%);
    border: 1px solid rgba(230, 184, 0, 0.12);
    border-radius: 14px;
    min-height: 200px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
    color: var(--light-text);
    text-align: center;
}

.press-card:hover {
    transform: translateY(-6px);
    border-color: rgba(230, 184, 0, 0.35);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    color: var(--light-text);
}

.press-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 10px;
    margin-bottom: 20px;
}

.press-logo-wrap img {
    max-width: 100%;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0.98);
    transition: transform 0.35s ease, filter 0.35s ease;
}

.press-logo-wrap .press-source-logo-text {
    font-family: var(--main-titles-font);
    font-size: 1.5em;
    font-weight: 500;
    color: var(--accent-color);
    text-transform: uppercase;
}

.press-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
}

.press-article-title {
    font-family: var(--body-font);
    font-size: 1.1em;
    font-weight: 400;
    line-height: 1.4;
    color: var(--light-text);
    margin-bottom: 5px;
}

.press-details {
    font-family: var(--body-font);
    font-size: 0.9em;
    font-style: italic;
    color: #b0b0b0;
}

/* ==================================================
   STRUMENTI DI INTELLIGENZA ARTIFICIALE
   ================================================== */

.ai-tools-intro {
    max-width: 900px;
    margin: 0 auto 3.5rem;
    text-align: center;
}

.ai-tools-intro p:not(.section-eyebrow) {
    margin: 1rem auto;
    line-height: 1.8;
}

.section-eyebrow {
    margin-bottom: 0.8rem;
    color: #c9a96e;
    font-family: "Lexend Giga", sans-serif;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.ai-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.ai-tool-card {
    position: relative;
    display: flex;
    gap: 1.25rem;
    padding: 1.8rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        background-color 0.35s ease;
}

.ai-tool-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #c9a96e;
    transition: width 0.45s ease;
}

.ai-tool-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.055);
    border-color: rgba(201, 169, 110, 0.45);
}

.ai-tool-card:hover::before {
    width: 100%;
}

/* L’ultima scheda occupa tutta la riga */
.ai-tool-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: calc(50% - 0.75rem);
    width: 100%;
    justify-self: center;
}

.ai-tool-icon {
    display: flex;
    flex: 0 0 54px;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    color: #c9a96e;
    background: rgba(201, 169, 110, 0.08);
    border: 1px solid rgba(201, 169, 110, 0.28);
    border-radius: 50%;
    font-size: 1.2rem;
}

.ai-tool-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ai-tool-content h3 {
    margin: 0 0 0.45rem;
    color: #fff;
    font-family: "Lexend Giga", sans-serif;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.08em;
}

.ai-tool-category {
    margin: 0 0 1rem;
    color: #c9a96e;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ai-tool-content > p:not(.ai-tool-category) {
    margin: 0 0 1.25rem;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.7;
}

.ai-tool-link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.55rem;
    margin-top: auto;
    color: #fff;
    font-family: "Lexend Giga", sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.ai-tool-link:hover,
.ai-tool-link:focus-visible {
    color: #c9a96e;
}

.ai-tool-link i {
    font-size: 0.65rem;
}

.ai-tools-manifesto {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    max-width: 850px;
    margin: 4rem auto 0;
    padding: 2rem;
    background: rgba(201, 169, 110, 0.055);
    border-left: 1px solid #c9a96e;
}

.ai-tools-manifesto > i {
    flex: 0 0 auto;
    margin-top: 0.25rem;
    color: #c9a96e;
    font-size: 1.5rem;
}

.ai-tools-manifesto blockquote {
    margin: 0;
}

.ai-tools-manifesto blockquote p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-family: "Lora", serif;
    font-size: 1.15rem;
    font-style: italic;
    line-height: 1.8;
}

.ai-tools-manifesto blockquote footer {
    margin-top: 1rem;
    color: #c9a96e;
    font-family: "Lexend Giga", sans-serif;
    font-size: 0.68rem;
    font-style: normal;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ai-tools-disclaimer {
    max-width: 850px;
    margin: 1.5rem auto 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.72rem;
    line-height: 1.6;
    text-align: center;
}

/* Tablet e smartphone */
@media (max-width: 800px) {
    .ai-tools-grid {
        grid-template-columns: 1fr;
    }

    .ai-tool-card:last-child:nth-child(odd) {
        grid-column: auto;
        max-width: none;
    }
}

@media (max-width: 520px) {
    .ai-tool-card {
        flex-direction: column;
        padding: 1.4rem;
    }

    .ai-tool-icon {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    .ai-tools-manifesto {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }

    .ai-tools-manifesto blockquote p {
        font-size: 1rem;
    }
}

/* Accessibilità: riduce le animazioni se richiesto */
@media (prefers-reduced-motion: reduce) {
    .ai-tool-card,
    .ai-tool-card::before,
    .ai-tool-link {
        transition: none;
    }

    .ai-tool-card:hover {
        transform: none;
    }
}


/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    h1 { font-size: 2.5em; }
    h2 { font-size: 2em; }
    h3 { font-size: 1.5em; }
    .section-title { font-size: 2em; }

    .klara-logo { font-size: 2em; }
    .music-toggle-button { font-size: 1.2em; } /* Riduci dimensione bottone su mobile */

    .hero-content .klara-title { font-size: 4em; }
    .hero-content .klara-subtitle { font-size: 1.8em; }
    .hero-content { padding: 10vh 5vw; }

    /* Disabilita l'effetto parallax su schermi piccoli */
    .hero-image-container {
        background-attachment: scroll;
    }

    .animated-tagline-wrapper {
        font-size: 1.2em;
        width: 90%;
        height: 2.5em;
    }

    .about-narrative {
        margin-left: 20px;
        margin-right: 20px;
        text-align: left;
    }

    .origins-content {
        margin-left: 20px;
        margin-right: 20px;
        text-align: left; /* Su schermi piccoli, justify potrebbe non essere esteticamente gradevole */
    }

    .prologue {
        padding: 30px;
        margin-left: 20px;
        margin-right: 20px;
    }

    .prologue-credit {
        text-align: center; /* Centrato su schermi più piccoli per migliore leggibilità */
    }

    #contributors .contributor-list {
        margin-left: 20px;
        margin-right: 20px;
    }

    .cta-button {
        padding: 12px 25px;
        font-size: 1em;
        margin: 10px;
    }

    #social .social-links a {
        font-size: 2em;
    }

    /* REGOLE PER NASCONDERE IL CURSORE CUSTOM SU MOBILE */
    .custom-cursor {
        display: none !important; /* Nasconde completamente il cursore personalizzato */
    }

    body, a, button, summary, .music-toggle-button, .cta-button, .social-links a {
        cursor: default !important; /* Ripristina il cursore di sistema */
    }

        .partners-intro {
        margin-bottom: 35px;
    }

    .partners-showcase {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 520px;
    }

    .partner-card {
        min-height: auto;
        padding: 26px 22px;
    }

    .partner-logo-wrap {
        min-height: 100px;
        margin-bottom: 18px;
    }

    .partner-logo-wrap img {
        max-height: 72px;
    }

    .partner-name {
        font-size: 0.9em;
    }

    .partner-link {
        font-size: 0.9em;
    }

    /* Responsive adjustments for press section */
    .press-showcase {
        grid-template-columns: 1fr; /* Single column on smaller screens */
        gap: 20px;
        max-width: 520px; /* Constrain width */
    }

    .press-card {
        min-height: auto;
        padding: 26px 22px;
    }

    .press-logo-wrap {
        min-height: 50px;
        margin-bottom: 15px;
    }

    .press-logo-wrap .press-source-logo-text {
        font-size: 1.3em;
    }

    .press-article-title {
        font-size: 1em;
    }

    .press-details {
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2em; }
    h2 { font-size: 1.8em; }
    .section-title { font-size: 1.8em; }

    .klara-logo { font-size: 1.8em; }
    .music-toggle-button { font-size: 1em; } /* Ulteriore riduzione su schermi molto piccoli */

    .hero-content .klara-title { font-size: 3em; letter-spacing: 3px; }
    .hero-content .klara-subtitle { font-size: 1.5em; }
    .hero-content { padding: 8vh 3vw; }

    .animated-tagline-wrapper {
        font-size: 1em;
        width: 95%;
        height: 2em;
    }

    .cta-button {
        display: block;
        width: 80%;
        margin: 10px auto;
    }

        .partners-subtitle {
        font-size: 1em;
        padding: 0 10px;
    }

    .partners-showcase {
        gap: 16px;
    }

    .partner-card {
        padding: 22px 18px;
        border-radius: 10px;
    }

    .partner-logo-wrap {
        min-height: 80px;
        padding: 6px;
        margin-bottom: 14px;
    }

    .partner-logo-wrap img {
        max-height: 60px;
    }

    .partner-name {
        font-size: 0.9em;
    }

    .partner-link {
        font-size: 0.9em;
    }

    /* Responsive adjustments for press section */
    .press-card {
        padding: 22px 18px;
        border-radius: 10px;
    }
    .press-logo-wrap {
        min-height: 40px;
        margin-bottom: 10px;
    }
    .press-logo-wrap .press-source-logo-text {
        font-size: 1.2em;
    }
    .press-article-title {
        font-size: 0.95em;
    }
    .press-details {
        font-size: 0.8em;
    }
}
