/* ==========================================================================
   Dico Agency – foglio di stile principale
   ========================================================================== */

:root {
    --accent: #C90972;
    --accent-soft: #FDE8F2;
    --accent-light: #F7B8D9;
    --accent-dark: #A30658;
    --title: #3D3D3D;
    --text: #7A7A7A;
    --black: #0E0E0E;
    --white: #FFFFFF;
    --off: #F7F5F6;
    --line: #ECECEC;
    --radius: 18px;
    --radius-lg: 28px;
    --container: 1240px;
    --header-h: 84px;
    --font: "Helvetica Neue", Helvetica, Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset e base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

img, video, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; }

h1, h2, h3 {
    margin: 0;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--title);
}

p { margin: 0 0 1em; }

ul { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

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

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 200;
    background: var(--black);
    color: var(--white);
    padding: .6rem 1rem;
    border-radius: 8px;
}
.skip-link:focus { top: 1rem; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: var(--header-h);
    transition: background .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-scrolled {
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--line);
}
body.menu-open .site-header { background: transparent; box-shadow: none; backdrop-filter: none; }

.site-header__inner {
    max-width: var(--container);
    height: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-header__logo img { width: 48px; height: 48px; object-fit: contain; }
body.menu-open .site-header__logo img { filter: brightness(0) invert(1); }

.menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: 0;
    cursor: pointer;
    padding: 10px 0;
    font: inherit;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 13px;
    color: var(--title);
}
body.menu-open .menu-toggle { color: var(--white); }

.menu-toggle__bars {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--accent);
    display: grid;
    place-content: center;
    gap: 5px;
    transition: background .3s var(--ease);
}
body.menu-open .menu-toggle__bars { background: var(--white); }
.menu-toggle__bars span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform .35s var(--ease), opacity .2s;
}
body.menu-open .menu-toggle__bars span { background: var(--accent); }
body.menu-open .menu-toggle__bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .menu-toggle__bars span:nth-child(2) { opacity: 0; }
body.menu-open .menu-toggle__bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Menu overlay ---------- */
.menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: var(--accent);
    color: var(--white);
    overflow-y: auto;
    clip-path: circle(0% at calc(100% - 50px) 42px);
    visibility: hidden;
    transition: clip-path .7s var(--ease), visibility 0s linear .7s;
}
body.menu-open .menu-overlay {
    clip-path: circle(150% at calc(100% - 50px) 42px);
    visibility: visible;
    transition: clip-path .7s var(--ease), visibility 0s;
}
.menu-overlay__inner {
    max-width: var(--container);
    min-height: 100%;
    margin: 0 auto;
    padding: calc(var(--header-h) + 30px) 24px 48px;
    display: grid;
    gap: 48px;
    align-content: center;
}
.menu-list > li { border-bottom: 1px solid rgba(255, 255, 255, .25); }
.menu-list > li > a,
.menu-list__parent {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 14px 0;
    font-size: clamp(30px, 5.5vw, 60px);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
    line-height: 1.1;
    color: var(--white);
    transition: transform .3s var(--ease), opacity .3s;
}
.menu-list > li > a:hover { transform: translateX(10px); }
.menu-list__num {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .05em;
    opacity: .75;
    min-width: 32px;
}
.menu-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 0 0 18px 48px;
}
.menu-sub a {
    display: inline-block;
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 999px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    color: var(--white);
    transition: background .25s, color .25s;
}
.menu-sub a:hover { background: var(--white); color: var(--accent); }

.menu-overlay__social-title {
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}

body.menu-open .menu-list > li { animation: menuIn .6s var(--ease) both; }
body.menu-open .menu-list > li:nth-child(1) { animation-delay: .15s; }
body.menu-open .menu-list > li:nth-child(2) { animation-delay: .2s; }
body.menu-open .menu-list > li:nth-child(3) { animation-delay: .25s; }
body.menu-open .menu-list > li:nth-child(4) { animation-delay: .3s; }
body.menu-open .menu-list > li:nth-child(5) { animation-delay: .35s; }
body.menu-open .menu-list > li:nth-child(6) { animation-delay: .4s; }
@keyframes menuIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}

/* ---------- Social links ---------- */
.social-links { display: flex; flex-wrap: wrap; gap: 12px; }
.social-links a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 12px;
    border: 1.5px solid var(--title);
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    color: var(--title);
    transition: background .25s, color .25s, border-color .25s;
}
.social-links a svg { width: 22px; height: 22px; }
.social-links a:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }

.social-links--accent a { border-color: var(--accent); color: var(--accent); }
.social-links--accent a:hover { background: var(--accent); color: var(--white); }

.social-links--light a { border-color: rgba(255, 255, 255, .7); color: var(--white); }
.social-links--light a:hover { background: var(--white); color: var(--accent); border-color: var(--white); }

.social-links--icons a {
    width: 46px;
    height: 46px;
    padding: 0;
    justify-content: center;
}

/* ---------- Bottoni ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 28px;
    border-radius: 999px;
    border: 1.5px solid var(--title);
    background: transparent;
    font: inherit;
    font-weight: 700;
    font-size: 16px;
    color: var(--title);
    text-decoration: none;
    cursor: pointer;
    transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.btn svg { width: 20px; height: 20px; }
.btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
    box-shadow: 0 12px 28px rgba(201, 9, 114, .25);
}
.btn--solid,
.btn--accent {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}
.btn--solid:hover,
.btn--accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn--light {
    border-color: var(--white);
    color: var(--white);
}
.btn--light:hover { background: var(--white); color: var(--accent); border-color: var(--white); }
.btn--full { width: 100%; }

/* ---------- Eyebrow e titoli ---------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--accent);
}
.eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    background: currentColor;
}
.eyebrow--plain::before { display: none; }
.eyebrow--light { color: var(--white); }

.section { padding: clamp(80px, 11vw, 150px) 0; }

.section-title {
    font-size: clamp(36px, 5.4vw, 72px);
    font-weight: 800;
    max-width: 16ch;
    color: var(--title);
}

.lead { font-size: clamp(18px, 1.6vw, 22px); color: var(--text); line-height: 1.55; }

/* ---------- Hero con video di sfondo ----------
   Il video YouTube è un iframe a tutto schermo che copre sempre l'hero
   mantenendo il rapporto 16:9: larghezza = max(100vw, 177.78vh),
   altezza = larghezza * 9/16, centrato con translate. Nessun bordo visibile.
   ---------------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    padding: calc(var(--header-h) + 40px) 0 160px;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(135deg, #0E0E0E 0%, #3A0221 100%);
    color: var(--white);
}
.hero__video {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: var(--black);
}
.hero__video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100vw, 177.78vh);
    height: calc(max(100vw, 177.78vh) * 9 / 16);
    max-width: none;
    transform: translate(-50%, -50%);
    border: 0;
    pointer-events: none;
}
.hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(90deg, rgba(14, 14, 14, .85) 0%, rgba(14, 14, 14, .5) 55%, rgba(14, 14, 14, .3) 100%),
        linear-gradient(0deg, rgba(14, 14, 14, .65), transparent 45%);
}
.hero__inner { position: relative; z-index: 1; }
.hero__title {
    font-size: clamp(40px, 7vw, 104px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.02;
    max-width: 15ch;
    margin-bottom: 48px;
    color: var(--white);
}
.hero .eyebrow { color: var(--accent-light); }
.hero__play { margin-top: 0; }

/* ---------- Loghi clienti (sovrapposti all'hero) ---------- */
.logos {
    position: relative;
    z-index: 2;
    margin: -90px auto 0;
    padding: 36px 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    max-width: calc(var(--container) - 48px);
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(14, 14, 14, .08);
}
.marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track {
    display: flex;
    width: max-content;
    animation: marquee 45s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; }
.marquee__item { padding: 0 clamp(28px, 4vw, 56px); }
.marquee__item img {
    height: 70px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
    filter: grayscale(1);
    opacity: .7;
    transition: filter .3s, opacity .3s;
}
.marquee__item img:hover { filter: none; opacity: 1; }
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ---------- Chi siamo ---------- */
.about { padding-top: clamp(80px, 9vw, 120px); }
.about__grid {
    display: grid;
    gap: 40px;
    align-items: center;
}
.about__media {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: var(--accent-soft);
    border-radius: var(--radius-lg);
    padding: 15%;
}
.about__media img { width: 100%; height: auto; object-fit: contain; }
.about__body .section-title { margin-bottom: 28px; }
.about__text { font-size: clamp(18px, 1.6vw, 22px); color: var(--text); margin-bottom: 32px; }

/* ---------- Banda parole ---------- */
.words {
    padding: 20px 0 clamp(70px, 9vw, 120px);
    overflow: hidden;
}
.words__track {
    display: flex;
    width: max-content;
    animation: marquee 38s linear infinite;
}
.words__group { display: flex; align-items: center; flex-shrink: 0; }
.words__item {
    font-size: clamp(54px, 10vw, 150px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    white-space: nowrap;
    padding: 0 .2em;
    color: var(--title);
}
.words__item:nth-child(odd) { color: transparent; -webkit-text-stroke: 2px var(--accent); }
.words__sep {
    font-size: clamp(28px, 4vw, 56px);
    color: var(--accent);
    padding: 0 .3em;
}

/* ---------- Carosello (base) ---------- */
.carousel { position: relative; }
.carousel__viewport {
    overflow: hidden;
    margin: 0 -24px;
    padding: 0 24px;
}
.carousel__track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 4px 0 20px;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__track > * {
    flex: 0 0 auto;
    scroll-snap-align: start;
}
.carousel__arrow {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1.5px solid var(--title);
    background: var(--white);
    color: var(--title);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background .25s, color .25s, border-color .25s;
}
.carousel__arrow svg { width: 22px; height: 22px; }
.carousel__arrow:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }
.carousel__arrow[disabled] { opacity: .35; pointer-events: none; }
.carousel__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}
.carousel__dots:empty { display: none; }
.carousel__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 0;
    padding: 0;
    background: var(--line);
    cursor: pointer;
    transition: background .25s, transform .25s;
}
.carousel__dot.is-active { background: var(--accent); transform: scale(1.2); }

/* ---------- Case study ---------- */
.projects { background: var(--accent-soft); }
.projects__head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 48px;
}
.projects .carousel__arrow--prev,
.projects .carousel__arrow--next { position: absolute; top: 40%; z-index: 2; }
.projects .carousel__arrow--prev { left: -8px; }
.projects .carousel__arrow--next { right: -8px; }
.carousel--projects .carousel__track { gap: 24px; }

.case-card { width: min(78vw, 360px); }
.case-card__link { display: block; text-decoration: none; }
.case-card img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--radius-lg);
    background: var(--white);
    transition: transform .6s var(--ease);
}
.case-card__link:hover img { transform: scale(1.04); }
.case-card__text {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 18px 4px 0;
}
.case-card__title { font-size: 24px; font-weight: 800; color: var(--title); }
.case-card__cat {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--accent);
    white-space: nowrap;
}
.projects__cta { margin-top: 48px; text-align: left; }

/* ---------- Servizi a righe ---------- */
.services { padding-bottom: clamp(60px, 8vw, 110px); }
.services .section-title { margin-bottom: 56px; }
.services__list {
    display: grid;
    border-top: 1px solid var(--line);
}
.service-row {
    display: grid;
    gap: 16px;
    align-items: center;
    padding: 36px 0;
    border-bottom: 1px solid var(--line);
    transition: background .3s var(--ease), padding .3s var(--ease);
}
.service-row:hover { padding-left: 16px; padding-right: 16px; background: var(--off); }
.service-row__title {
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 800;
}
.service-row__text { margin: 0; color: var(--text); }
.service-row__btn { justify-self: start; padding: 12px 24px; }

/* ---------- Blocco AI ---------- */
.ai-block { padding: 0 0 clamp(80px, 10vw, 140px); }
.ai-block__box {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: clamp(40px, 6vw, 88px);
    display: grid;
    gap: 24px;
    justify-items: start;
    overflow: hidden;
    position: relative;
}
.ai-block__box::after {
    content: "";
    position: absolute;
    right: -120px;
    top: -120px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .25);
    pointer-events: none;
}
.ai-block__title {
    font-size: clamp(32px, 4.6vw, 60px);
    font-weight: 800;
    max-width: 20ch;
    color: var(--white);
}
.ai-block__text {
    font-size: clamp(17px, 1.5vw, 20px);
    max-width: 60ch;
    margin: 0;
    color: rgba(255, 255, 255, .9);
}

/* ---------- Recensioni ---------- */
.reviews { background: var(--black); }
.reviews .eyebrow { color: var(--accent-light); }
.reviews .section-title { color: var(--white); margin-bottom: 48px; }
.reviews .carousel__arrow { border-color: rgba(255, 255, 255, .6); color: var(--white); background: transparent; }
.reviews .carousel__arrow:hover { background: var(--accent); border-color: var(--accent); }
.reviews .carousel__dot { background: rgba(255, 255, 255, .25); }
.reviews .carousel__dot.is-active { background: var(--accent); }
.carousel--reviews .carousel__viewport { margin: 0; padding: 0; }
.review-card {
    width: min(86vw, 380px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 32px;
    background: #161616;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--radius-lg);
    color: rgba(255, 255, 255, .82);
}
.review-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.review-card__name {
    font-size: 19px;
    font-weight: 800;
    color: var(--white);
    line-height: 1.25;
}
.review-card__g { width: 26px; height: 26px; flex-shrink: 0; }
.review-card__stars { display: flex; gap: 3px; }
.review-card__stars svg { width: 18px; height: 18px; }
.review-card__text { margin: 0; font-size: 16px; line-height: 1.6; }
.review-card__text.is-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.review-card__more {
    align-self: flex-start;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    color: var(--accent-light);
    border-bottom: 1.5px solid currentColor;
}

/* ---------- Contatti ---------- */
.contact { background: var(--white); }
.contact__grid { display: grid; gap: 56px; }
.contact .section-title { margin-bottom: 24px; }
.contact__text { font-size: clamp(18px, 1.6vw, 22px); color: var(--text); margin-bottom: 40px; }
.contact__social-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--title);
    margin-bottom: 14px;
}
.contact__form-wrap {
    background: var(--accent-soft);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 4vw, 48px);
}
.contact-form { display: grid; gap: 18px; }
.contact-form__hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.field label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--title);
    margin-bottom: 6px;
}
.field input,
.field textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid transparent;
    border-radius: 14px;
    background: var(--white);
    font: inherit;
    font-size: 16px;
    color: var(--title);
    transition: border-color .25s, box-shadow .25s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input::placeholder,
.field textarea::placeholder { color: #A8A8A8; }
.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(201, 9, 114, .14);
}
.checkbox {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 15px;
    line-height: 1.45;
    color: var(--title);
    cursor: pointer;
}
.checkbox input {
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    accent-color: var(--accent);
    flex-shrink: 0;
}
.checkbox a { color: var(--accent); font-weight: 600; }

.alert {
    padding: 16px 20px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-size: 15px;
    color: var(--title);
}
.alert--ok { background: var(--white); border-left: 4px solid var(--accent); }
.alert--error { background: var(--white); border-left: 4px solid #B00020; color: #7A0016; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--black);
    color: rgba(255, 255, 255, .72);
    padding: 80px 0 32px;
    font-size: 16px;
}
.site-footer a { text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--accent-light); }
.site-footer__grid { display: grid; gap: 40px; }
.site-footer__logo { width: 44px; height: 44px; margin-bottom: 22px; filter: brightness(0) invert(1); }
.site-footer__title {
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--white);
    margin-bottom: 18px;
}
.site-footer__list { display: grid; gap: 10px; }
.site-footer__bottom {
    margin-top: 64px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, .14);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-size: 14px;
}
.site-footer__bottom p { margin: 0; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer .social-links a { border-color: rgba(255, 255, 255, .4); color: var(--white); }
.site-footer .social-links a:hover { background: var(--accent); border-color: var(--accent); color: var(--white); }

/* ---------- Lightbox video ---------- */
.lightbox {
    width: min(92vw, 1100px);
    max-height: 90vh;
    padding: 0;
    border: 0;
    border-radius: var(--radius);
    background: var(--black);
    color: var(--white);
    overflow: visible;
}
.lightbox::backdrop { background: rgba(14, 14, 14, .88); backdrop-filter: blur(4px); }
.lightbox__content {
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: var(--radius);
}
.lightbox__content iframe {
    width: 100%;
    height: 100%;
    border: 0;
}
.lightbox__video { width: 100%; height: 100%; background: #000; }
.lightbox__empty { margin: 0; padding: 24px; font-weight: 600; text-align: center; }
.lightbox__close {
    position: absolute;
    top: -56px;
    right: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: var(--accent);
    color: var(--white);
    display: grid;
    place-items: center;
    cursor: pointer;
}
.lightbox__close svg { width: 22px; height: 22px; }

/* ---------- Animazioni di ingresso ---------- */
.js [data-anim] {
    opacity: 0;
    transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.js [data-anim="up"] { transform: translateY(32px); }
.js [data-anim="left"] { transform: translateX(-32px); }
.js [data-anim="right"] { transform: translateX(32px); }
.js [data-anim="zoom"] { transform: scale(.96); }
.js [data-anim].is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (min-width: 700px) {
    .contact-form { grid-template-columns: 1fr 1fr; }
    .contact-form .field--full { grid-column: 1 / -1; }
    .site-footer__grid { grid-template-columns: repeat(2, 1fr); }
    .service-row { grid-template-columns: 1.2fr 1.4fr auto; }
    .projects .carousel__arrow--prev,
    .projects .carousel__arrow--next { top: 35%; }
    .case-card { width: 340px; }
}

@media (min-width: 1000px) {
    :root { --header-h: 96px; }
    .about__grid { grid-template-columns: 1fr 1.2fr; gap: 80px; }
    .contact__grid { grid-template-columns: 1fr 1.15fr; gap: 80px; align-items: start; }
    .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 60px; }
    .menu-overlay__inner { grid-template-columns: 1.6fr 1fr; align-items: end; }
    .projects .carousel__arrow--prev { left: -28px; }
    .projects .carousel__arrow--next { right: -28px; }
    .reviews .carousel__arrow--prev { position: absolute; left: -28px; top: 40%; z-index: 2; }
    .reviews .carousel__arrow--next { position: absolute; right: -28px; top: 40%; z-index: 2; }
}

@media (max-width: 999px) {
    .projects .carousel__arrow,
    .reviews .carousel__arrow { display: none; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .menu-toggle__label { display: none; }
    .menu-sub { padding-left: 0; }
    .logos { margin-top: -60px; border-radius: var(--radius); }
    .marquee__item img { height: 52px; max-width: 130px; }
    .hero { padding-bottom: 120px; }
    .hero__play { width: 100%; }
    .lightbox__close { top: -52px; }
    .service-row:hover { padding-left: 0; padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    .hero__video { display: none; }
    .js [data-anim] { opacity: 1; transform: none; }
    .marquee__track, .words__track { animation: none; }
    .carousel__track { scroll-behavior: auto; }
}
