/* K&W Development Partner - palette ricavata dal logo:
   nero, avorio (lettere), navy (balena), cobalto e azzurro ghiaccio (onda) */

/* Font ospitati nel sito: nessuna dipendenza da Google Fonts, resa identica ovunque */
@font-face {
    font-family: 'Bodoni Moda';
    font-style: normal; font-weight: 400 900; font-display: swap;
    src: url('../fonts/bodoni-moda-latin-opsz-normal.woff2') format('woff2');
}
@font-face {
    font-family: 'Bodoni Moda';
    font-style: italic; font-weight: 400 900; font-display: swap;
    src: url('../fonts/bodoni-moda-latin-opsz-italic.woff2') format('woff2');
}
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/jost-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/jost-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Jost'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/jost-latin-500-normal.woff2') format('woff2'); }

:root {
    /* colori fissi del marchio */
    --black: #050608;
    --navy: #14264a;
    --navy-deep: #0b1730;
    --cobalt: #1f5da8;
    --ice: #9cc7ee;
    --ivory: #efebe2;
    --foam: #f4f8fc;
    --line: rgba(156, 199, 238, 0.22);

    --font-display: 'Bodoni Moda', 'Didot', 'Bodoni 72', 'Times New Roman', serif;
    --font-body: 'Jost', 'Helvetica Neue', Arial, sans-serif;
    --header-h: 104px;
    --gutter: clamp(1.25rem, 5vw, 4.5rem);

    /* spazio attorno ai pannelli video */
    --frame-x: clamp(.75rem, 2.4vw, 2.25rem);
    --frame-gap: clamp(1.75rem, 4vw, 3rem);

    /* Tema "Nero" (predefinito) */
    --page-bg: #050608;
    --alt-bg: #0b1220;
    --footer-bg: #050608;
    --header-rgb: 5, 6, 8;
    --sec-head: #f4f8fc;
    --sec-text: #d7d3ca;
    --sec-accent: #9cc7ee;
    --sec-line: rgba(156, 199, 238, 0.22);
    --card-bg: #0b1730;
    --veil-rgb: 5, 6, 8;
    --btn-bg: #efebe2;
    --btn-fg: #050608;
    --btn-hover: #1f5da8;
    --btn-hover-fg: #f4f8fc;
}

/* Le zone scure (video, header, footer, approccio) usano sempre i colori chiari, in ogni tema */
.panel, .approach, .site-header, .site-footer, .dock {
    --sec-head: #f4f8fc;
    --sec-text: #d7d3ca;
    --sec-accent: #9cc7ee;
    --sec-line: rgba(156, 199, 238, 0.22);
    color: var(--sec-text);
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--sec-text);
    background: var(--page-bg);
    overflow-x: hidden;
    transition: background-color .4s ease, color .4s ease;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: fixed; top: -100px; left: 1rem; z-index: 200;
    background: var(--ivory); color: var(--black); padding: .6rem 1rem; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
.section :focus-visible { outline-color: var(--cobalt); }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

/* Tipografia */
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; color: var(--sec-head); letter-spacing: .005em; }
/* opsz limitato: a corpo molto grande i filetti di Bodoni diventano troppo sottili sopra ai video */
h1 { font-size: clamp(2.6rem, 6.4vw, 5.4rem); font-variation-settings: 'opsz' 40; }
h2 { font-size: clamp(2rem, 4.4vw, 3.6rem); font-variation-settings: 'opsz' 40; }
h3 { font-size: 1.5rem; }

.eyebrow {
    font-size: .75rem; font-weight: 500; letter-spacing: .32em; text-transform: uppercase;
    color: var(--sec-accent); margin-bottom: 1.1rem;
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ivory); max-width: 40rem; margin-top: 1.5rem; }
.draft-note { font-size: .8rem; color: #8090a8; font-style: italic; margin-top: 1.25rem; letter-spacing: .02em; }

/* Header: sempre scuro, logo grande */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--header-h); padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(180deg, rgba(var(--header-rgb), .9), rgba(var(--header-rgb), 0));
    transition: background .3s ease, border-color .3s ease;
    border-bottom: 1px solid transparent;
}
.site-header.scrolled {
    background: rgba(var(--header-rgb), .92);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-bottom-color: var(--line);
}
.brand { display: block; line-height: 0; }
.brand img { height: 86px; width: auto; }

.site-nav { display: flex; align-items: center; gap: clamp(1.25rem, 3vw, 2.5rem); }
.site-nav a {
    font-size: .78rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
    text-decoration: none; color: var(--ivory); padding: .4rem 0; position: relative;
}
.site-nav a::after {
    content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
    background: var(--ice); transition: right .3s ease;
}
.site-nav a:hover::after, .site-nav a:focus-visible::after { right: 0; }
.site-nav .nav-cta { border: 1px solid var(--ice); padding: .55rem 1.1rem; }
.site-nav .nav-cta::after { display: none; }
.site-nav .nav-cta:hover { background: var(--ice); color: var(--black); }

.nav-toggle {
    display: none; width: 46px; height: 46px; background: none; border: 0; cursor: pointer;
    position: relative; color: var(--ivory);
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    content: ''; position: absolute; left: 11px; right: 11px; height: 2px; background: currentColor;
    transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle-bar { top: 22px; }
.nav-toggle-bar::before { left: 0; right: 0; top: -7px; }
.nav-toggle-bar::after { left: 0; right: 0; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

/* Pannelli con video */
.panel {
    position: relative; isolation: isolate; overflow: hidden;
    min-height: 100vh; min-height: 100svh;
    display: flex; align-items: flex-end;
    padding: calc(var(--header-h) + 2rem) 0 clamp(3rem, 9vh, 6rem);
    background: var(--navy-deep);
}
/* Pannelli incorniciati: margini laterali e spazio tra un video e l'altro */
.panel.framed {
    margin: 0 var(--frame-x) var(--frame-gap);
    border-radius: 4px; border: 1px solid var(--line);
    min-height: min(88vh, 860px); min-height: min(88svh, 860px);
    padding-top: 3rem;
}
.bg { position: absolute; inset: 0; z-index: -2; }
.bg video {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transition: opacity 1s ease; background: var(--navy-deep);
}
.bg video.on { opacity: 1; }

/* Placeholder: visibile solo se il video non esiste */
[data-videos].missing .bg::before {
    content: ''; position: absolute; inset: 0;
    background:
        repeating-linear-gradient(135deg, rgba(156, 199, 238, .06) 0 2px, transparent 2px 22px),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 60%, #050a16 100%);
}
[data-videos].missing .bg::after {
    content: attr(data-ph-label); position: absolute; top: 1.25rem; right: 1.25rem;
    font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ice);
    border: 1px dashed var(--ice); padding: .4rem .8rem; background: rgba(5, 6, 8, .55);
}

.veil { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.veil-bottom { background: linear-gradient(180deg, rgba(var(--veil-rgb), .35) 0%, rgba(var(--veil-rgb), .1) 35%, rgba(var(--veil-rgb), .85) 100%); }
.veil-left {
    background:
        linear-gradient(90deg, rgba(var(--veil-rgb), .82) 0%, rgba(var(--veil-rgb), .45) 45%, rgba(var(--veil-rgb), .05) 100%),
        linear-gradient(0deg, rgba(var(--veil-rgb), .55) 0%, transparent 40%);
}
.veil-right {
    background:
        linear-gradient(270deg, rgba(var(--veil-rgb), .82) 0%, rgba(var(--veil-rgb), .45) 45%, rgba(var(--veil-rgb), .05) 100%),
        linear-gradient(0deg, rgba(var(--veil-rgb), .55) 0%, transparent 40%);
}
.veil-center { background: radial-gradient(ellipse at center, rgba(var(--veil-rgb), .2) 0%, rgba(var(--veil-rgb), .7) 100%); }
.veil-strong { background: linear-gradient(180deg, rgba(var(--veil-rgb), .78), rgba(var(--veil-rgb), .86)); }

.panel-inner { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.panel.sector .panel-inner > * { max-width: 34rem; }
.panel.sector h2 { margin-bottom: 1.25rem; }
.panel.sector.right .panel-inner > * { margin-left: auto; text-align: left; }

.hero { align-items: flex-end; }
.hero .panel-inner { padding-bottom: 1rem; }
.hero h1 { max-width: 15ch; }

.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.25rem; }

.btn {
    display: inline-block; font-family: var(--font-body); font-size: .78rem; font-weight: 500;
    letter-spacing: .22em; text-transform: uppercase; text-decoration: none; cursor: pointer;
    padding: 1rem 1.9rem; border: 1px solid var(--ivory); transition: background .3s, color .3s, border-color .3s;
}
.btn-solid { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
.btn-solid:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: var(--btn-hover-fg); }
.btn-line { background: transparent; color: var(--ivory); }
.btn-line:hover { background: var(--ivory); color: var(--black); }

.link-arrow {
    display: block; width: fit-content; margin-top: 1.5rem; font-size: .78rem; font-weight: 500; letter-spacing: .2em;
    text-transform: uppercase; text-decoration: none; color: var(--ice); padding-bottom: .3rem;
    border-bottom: 1px solid var(--ice);
}
.link-arrow::after { content: '  \2192'; }
.link-arrow:hover { color: var(--foam); border-color: var(--foam); }

/* Sezioni */
.section { position: relative; padding: clamp(4.5rem, 12vh, 9rem) 0; }
.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }

.about { background: var(--page-bg); transition: background-color .4s ease; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.about-copy p { margin-bottom: 1.25rem; color: var(--sec-text); }

.sectors { background: var(--alt-bg); transition: background-color .4s ease; margin-bottom: var(--frame-gap); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.card { position: relative; display: block; text-decoration: none; }
.card figure { overflow: hidden; aspect-ratio: 4 / 3; background: var(--card-bg); position: relative; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.card:hover img, .card:focus-visible img { transform: scale(1.05); }
.card-num { display: block; margin-top: 1rem; font-size: .75rem; letter-spacing: .3em; color: var(--sec-accent); }
.card h3 { margin-top: .25rem; padding-bottom: .6rem; border-bottom: 1px solid var(--sec-line); transition: border-color .3s; }
.card:hover h3 { border-color: var(--sec-accent); }

/* Placeholder immagini */
.ph { position: relative; }
.ph.missing {
    background:
        repeating-linear-gradient(135deg, rgba(156, 199, 238, .06) 0 2px, transparent 2px 22px),
        linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
}
.ph.missing img { visibility: hidden; }
.ph.missing::after {
    content: attr(data-ph); position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 86%; text-align: center; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
    color: var(--ice); border: 1px dashed var(--ice); padding: .5rem .6rem; background: rgba(5, 6, 8, .45);
}

/* Separatore con la coda */
.tail { align-items: center; justify-content: center; text-align: center; min-height: 70vh; min-height: 70svh; padding-top: 3rem; padding-bottom: 3rem; }
.tail .panel-inner { text-align: center; }
.quote { font-family: var(--font-display); font-style: italic; font-size: clamp(2rem, 5vw, 4rem); color: var(--foam); line-height: 1.2; }

/* Approccio */
.approach { background: var(--navy-deep); overflow: hidden; isolation: isolate; }
.approach-bg { position: absolute; inset: 0; z-index: -2; }
.approach-bg img { width: 100%; height: 100%; object-fit: cover; }
.approach::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(5, 6, 8, .7), rgba(5, 6, 8, .55) 50%, rgba(5, 6, 8, .8));
}
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); }
.steps li { border-top: 1px solid var(--ice); padding-top: 1.25rem; }
.step-num { display: block; font-size: .75rem; letter-spacing: .3em; color: var(--ice); margin-bottom: .75rem; }
.steps h3 { margin-bottom: .6rem; }
.steps p { color: #d7d3ca; font-size: 1rem; }

/* Contatti */
.contact { align-items: center; padding-top: calc(var(--header-h) + 3rem); margin-top: var(--frame-gap); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact-info p { color: #d7d3ca; }
.contact-info h2 { margin-bottom: 1rem; }
address { font-style: normal; margin-top: 2rem; display: grid; gap: .9rem; }
address .label { display: block; font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--ice); }
address a { text-decoration: none; border-bottom: 1px solid var(--line); }
address a:hover { border-color: var(--ice); }

.form {
    background: rgba(11, 23, 48, .72); border: 1px solid var(--line); padding: clamp(1.5rem, 3vw, 2.5rem);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.field { margin-bottom: 1.15rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { display: block; font-size: .72rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--ice); margin-bottom: .4rem; }
.form input[type="text"], .form input[type="email"], .form select, .form textarea {
    width: 100%; font: inherit; font-size: 1rem; color: var(--foam);
    background: rgba(255, 255, 255, .05); border: 1px solid rgba(156, 199, 238, .3);
    padding: .8rem .9rem; border-radius: 0; appearance: none; -webkit-appearance: none;
}
.form select {
    background-image: linear-gradient(45deg, transparent 50%, var(--ice) 50%), linear-gradient(135deg, var(--ice) 50%, transparent 50%);
    background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat;
    padding-right: 2.4rem;
}
.form select option { color: #111; }
.form textarea { resize: vertical; min-height: 130px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--ice); outline-offset: 1px; border-color: var(--ice); }
.form input:user-invalid, .form textarea:user-invalid { border-color: #e59a9a; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .check { display: flex; gap: .7rem; align-items: flex-start; text-transform: none; letter-spacing: 0; font-size: .92rem; font-weight: 300; color: #d7d3ca; margin-bottom: 1.15rem; }
.form .check input { width: 20px; height: 20px; margin-top: .2rem; accent-color: var(--cobalt); flex: 0 0 auto; }
.ts-widget { min-height: 0; margin-bottom: 1rem; }
.form .btn { width: 100%; }
.form-status { margin-top: 1rem; font-size: .95rem; min-height: 1.5em; }
.form-status.ok { color: #9be2b4; }
.form-status.err { color: #f0a9a9; }

/* Footer: scritta al posto del logo, per non duplicare quello dell'header */
.site-footer { background: var(--footer-bg); border-top: 1px solid var(--line); padding: clamp(3rem, 8vh, 5rem) 0 6.5rem; transition: background-color .4s ease; }
.footer-grid { display: grid; grid-template-columns: auto 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.wordmark { display: block; text-decoration: none; }
.wordmark-main { display: block; font-family: var(--font-display); font-weight: 500; font-size: clamp(3rem, 7vw, 5rem); line-height: 1; color: var(--ivory); }
.wordmark-sub { display: block; margin-top: .6rem; font-size: .72rem; letter-spacing: .42em; text-transform: uppercase; color: var(--ice); }
.footer-legal { font-size: .92rem; color: #a3b0c3; }
.footer-legal p { margin-bottom: .35rem; }
.footer-legal a { text-decoration: none; border-bottom: 1px solid var(--line); }
.footer-legal a:hover { color: var(--foam); border-color: var(--ice); }
.copyright { text-align: center; font-size: .78rem; color: #7f8ea6; margin-top: 3rem; padding: 0 var(--gutter); }

/* Controlli fissi: musica, tema (solo bozza), pausa video */
.dock {
    position: fixed; z-index: 150; left: 0; right: 0; bottom: 0; pointer-events: none;
    display: flex; justify-content: space-between; align-items: flex-end; gap: .5rem;
    padding: 0 max(var(--frame-x), env(safe-area-inset-left, 0px)) calc(1rem + env(safe-area-inset-bottom, 0px));
}
.dock-btn {
    pointer-events: auto; display: inline-flex; align-items: center; gap: .6rem;
    font-family: var(--font-body); font-size: .72rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
    color: var(--ivory); background: rgba(5, 6, 8, .78); border: 1px solid var(--line);
    min-height: 44px;
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.dock-btn { cursor: pointer; padding: .7rem 1rem; transition: border-color .3s, color .3s; }
.dock-btn:hover { border-color: var(--ice); color: var(--foam); }
.dock-btn[disabled] { opacity: .55; cursor: default; }
.dock-icon { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ice); position: relative; flex: 0 0 auto; }
#music-btn[aria-pressed="true"] .dock-icon { background: var(--ice); }
.dock-icon-pause { border-radius: 0; border: 0; border-left: 4px solid var(--ice); border-right: 4px solid var(--ice); width: 14px; background: none; }
#pause-btn[aria-pressed="true"] .dock-icon-pause { border: 0; width: 0; height: 0; border-left: 12px solid var(--ice); border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-right: 0; background: none; }

/* Animazioni di comparsa (solo se JS attivo) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* Pagina privacy */
.legal { padding-top: calc(var(--header-h) + 4rem); background: var(--alt-bg); min-height: 100vh; }
.legal-wrap { max-width: 820px; }
.legal-title { margin-bottom: 1rem; }
.legal h2 { font-size: 1.6rem; margin: 2.2rem 0 .6rem; }
.legal p { color: var(--sec-text); margin-bottom: 1rem; }
.legal a { color: var(--sec-accent); }

/* Responsive */
@media (max-width: 1000px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    :root { --header-h: 84px; }
    .brand img { height: 66px; }
    .nav-toggle { display: block; }
    .site-nav {
        position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: -1;
        flex-direction: column; justify-content: center; gap: 1.75rem; padding: 2rem;
        background: rgba(5, 6, 8, .97); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease;
    }
    .site-nav.open { opacity: 1; visibility: visible; }
    .site-nav a { font-size: 1rem; }
    .panel.sector .panel-inner > *, .panel.sector.right .panel-inner > * { max-width: 100%; margin-left: 0; }
    .veil-left, .veil-right { background: linear-gradient(0deg, rgba(5, 6, 8, .88) 0%, rgba(5, 6, 8, .35) 60%, rgba(5, 6, 8, .2) 100%); }
    .footer-grid { grid-template-columns: 1fr; }
    .panel { padding-bottom: 6rem; }
    .panel.framed { min-height: min(84vh, 760px); min-height: min(84svh, 760px); }
}

@media (max-width: 560px) {
    body { font-size: 1rem; }
    .cards { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .btn { width: 100%; text-align: center; }
    .hero h1 { max-width: 100%; }
    .dock { gap: .35rem; }
    .dock-btn { padding: .6rem .7rem; letter-spacing: .12em; font-size: .66rem; gap: .45rem; }
}

/* Movimento ridotto: niente scorrimenti e comparse animate. I video restano attivi
   (hanno il pulsante Pausa), perche' su Windows la preferenza e' spesso attiva senza volerlo. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js .reveal { transition: none; transform: none; }
    .card img, .bg video, body { transition: none; }
}


/* Logo sovrapposto al video del globo. Nell'header il logo compare solo dopo aver superato l'hero,
   cosi' non si vede mai due volte nella stessa schermata. */
.hero-logo {
    width: min(600px, 74vw); height: auto; margin: 0 auto;
    filter: drop-shadow(0 8px 36px rgba(0, 0, 0, .65));
}
.js .site-header.has-hero-logo .brand { opacity: var(--brand-o, 0); pointer-events: none; }
.js .site-header.has-hero-logo.brand-on .brand { pointer-events: auto; }

.hero.center { align-items: center; justify-content: center; text-align: center; padding-bottom: clamp(4rem, 12vh, 7rem); }
.hero.center .panel-inner { display: flex; flex-direction: column; align-items: center; }
.hero.center h1.visually-hidden { margin: -1px; font-size: 1rem; max-width: none; }
.hero.center h1 { max-width: 20ch; font-size: clamp(1.9rem, 4.2vw, 3.4rem); margin-top: 1.5rem; }
.hero.center .lead { text-align: center; margin-left: auto; margin-right: auto; }
.hero.center .actions { justify-content: center; }
/* sfuma il fondo dell'hero nel colore del tema scelto */
.hero-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 22%; z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), var(--page-bg)); }

@media (max-width: 560px) {
    .hero-logo { width: min(340px, 82vw); }
    .hero.center .lead { display: none; }
}


/* Immagine di base sotto i video (visibile mentre il video si carica) */
.tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.hero-eyebrow { margin-top: 1.6rem; margin-bottom: 0; }

/* Separatore con la coda: velo piu' deciso, la schiuma bianca del video non deve coprire la frase */
.veil-tail { background: radial-gradient(ellipse at center, rgba(var(--veil-rgb), .66) 0%, rgba(var(--veil-rgb), .52) 45%, rgba(var(--veil-rgb), .74) 100%); }


/* Schermata d'ingresso: logo e pulsante "Enter" (il clic permette alla musica di partire) */
.gate { position: fixed; inset: 0; z-index: 600; display: flex; align-items: center; justify-content: center; background: #050608; text-align: center; padding: 2rem; opacity: 1; visibility: visible; transition: opacity .9s ease, visibility 0s linear .9s; }
html:not(.js) .gate { display: none; }
html.entered .gate { opacity: 0; visibility: hidden; pointer-events: none; }
html.js:not(.entered), html.js:not(.entered) body { overflow: hidden; }
.gate-inner { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.gate-logo { width: clamp(240px, 36vw, 460px); height: auto; filter: drop-shadow(0 0 40px rgba(156, 199, 238, .22)); animation: gate-in 1.2s ease both; }
.gate-btn { font-family: var(--font-body); font-size: .78rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: #050608; background: var(--ivory); border: 1px solid var(--ivory); padding: 1.05rem 3.2rem; cursor: pointer; transition: background .3s, color .3s, border-color .3s; animation: gate-in 1.2s ease .5s both; }
.gate-btn:hover, .gate-btn:focus-visible { background: transparent; color: var(--ivory); }
.gate-link { background: none; border: 0; cursor: pointer; font-family: var(--font-body); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ice); padding: .6rem 1rem; border-bottom: 1px solid transparent; animation: gate-in 1.2s ease .85s both; }
.gate-link:hover, .gate-link:focus-visible { color: #fff; border-bottom-color: #fff; }
.gate :focus-visible { outline-color: var(--ice); }
@keyframes gate-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .gate-logo, .gate-btn, .gate-link { animation: none; } }
