/*
 * Grafica kx del sito di kliveer.cloud: base comune (token, tipografia, pulsanti, intestazione, fascia finale,
 * domande frequenti, piè di pagina). Ogni pagina aggiunge il suo CSS (kx-home.css, ...).
 * Tenere ogni file sotto i 40 KB. Alzare $KX_ASSETS_VER in kx/head.php a ogni modifica.
 */

:root {
    --ink: #111318;
    --ink-2: #353a46;
    --muted: #646a78;
    --line: #e5e7ee;
    --line-2: #d6d9e2;
    --bg: #ffffff;
    --sand: #fbf6ea;
    --tint: #f3f6fa;
    --frame: #e9f0f5;
    --brand: #0ba5bf;
    --brand-ink: #0a7d90;
    --brand-deep: #075e6c;
    --brand-pale: #e3f4f7;
    --amber: #9a6700;
    --amber-dot: #f2b705;
    --ok: #13895b;
    --ok-bg: #e5f5ec;
    --warn: #9a5b00;
    --warn-bg: #fff2d6;
    --info: #3b55c4;
    --info-bg: #e9edfc;
    --ko: #c23a32;
    --ko-bg: #fde9e7;
    --night: #0f1115;
    --radius: 14px;
    --radius-lg: 28px;
    --shadow: 0 1px 2px rgba(17, 19, 24, .05), 0 10px 30px -12px rgba(17, 19, 24, .14);
    --shadow-lg: 0 2px 4px rgba(17, 19, 24, .04), 0 24px 48px -20px rgba(17, 19, 24, .22);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --wrap: 1280px;
    --gut: 40px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body.kx {
    margin: 0; background: var(--bg); color: var(--ink-2);
    font-family: var(--font); font-size: 17px; line-height: 1.6;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    font-feature-settings: "cv11", "ss01";
}
/* reset a specificità zero (:where): le classi dei componenti vincono sempre */
:where(.kx) img { max-width: 100%; height: auto; display: block; }
:where(.kx) a { color: inherit; text-decoration: none; }
:where(.kx) p { margin: 0; }
:where(.kx) ul, :where(.kx) ol { margin: 0; padding: 0; list-style: none; }
:where(.kx) h1, :where(.kx) h2, :where(.kx) h3, :where(.kx) h4 { margin: 0; color: var(--ink); font-weight: 700; }
:where(.kx) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.kx :focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 3px; border-radius: 6px; }

.kx-wrap { width: 100%; max-width: calc(var(--wrap) + var(--gut) * 2); margin: 0 auto; padding: 0 var(--gut); }
.kx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kx-skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff !important; padding: 10px 16px; border-radius: 8px; }
.kx-skip:focus { top: 12px; }
.kx-center { text-align: center; }

/* ---------- icone dello sprite ---------- */
.kx-ic {
    width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7;
    stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle;
    --kv-i2: transparent;
}

/* ---------- tipografia ---------- */
.kx-h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.06; letter-spacing: -.04em; }
.kx-h2 { font-size: clamp(32px, 3.9vw, 50px); line-height: 1.1; letter-spacing: -.038em; max-width: 18ch; }
.kx-h3 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; letter-spacing: -.032em; }
.kx-h4 { font-size: 22px; line-height: 1.25; letter-spacing: -.02em; }
.kx-hl { color: var(--brand-ink); }
.kx-eyebrow {
    font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--amber); margin-bottom: 18px !important;
}
.kx-lead { font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 56ch; }
.kx-muted { color: var(--muted); }
.kx-mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; letter-spacing: -.01em; }
.kx-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- elenco con spunte ---------- */
.kx-checks { display: grid; gap: 14px; margin: 26px 0 0 !important; }
.kx-checks li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); }
.kx-checks__dot {
    width: 22px; height: 22px; border-radius: 50%; background: var(--amber-dot); color: #fff;
    display: grid; place-items: center; flex: none; margin-top: 2px;
}
.kx-checks__dot .kx-ic { width: 14px; height: 14px; stroke-width: 3; }
.kx-checks--lg li { font-size: 17px; }

/* ---------- pulsanti e link ---------- */
.kx-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.kx-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 50px; padding: 0 24px; border-radius: 10px; border: 2px solid transparent;
    font-size: 16px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap;
    transition: background-color .18s, border-color .18s, color .18s, box-shadow .18s;
}
.kx-btn .kx-ic { width: 18px; height: 18px; stroke-width: 2.2; transition: transform .18s; }
.kx-btn:hover .kx-ic { transform: translateX(3px); }
.kx-btn--sm { min-height: 42px; padding: 0 16px; font-size: 15px; border-radius: 9px; }
.kx-btn--primary { background: var(--brand-ink); color: #fff !important; }
.kx-btn--primary:hover { background: var(--brand-deep); }
.kx-btn--outline { border-color: var(--brand-ink); color: var(--brand-ink) !important; background: transparent; }
.kx-btn--outline:hover { background: var(--brand-pale); }
.kx-btn--white { background: #fff; color: var(--brand-deep) !important; }
.kx-btn--white:hover { background: var(--brand-pale); }
.kx-btn--ghost-white { border-color: rgba(255, 255, 255, .85); color: #fff !important; }
.kx-btn--ghost-white:hover { background: rgba(255, 255, 255, .12); }
.kx-link {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 28px;
    font-weight: 650; color: var(--brand-ink) !important;
}
.kx-link .kx-ic { width: 18px; height: 18px; stroke-width: 2.2; transition: transform .18s; }
.kx-link:hover { color: var(--brand-deep) !important; }
.kx-link:hover .kx-ic { transform: translateX(4px); }

/* ---------- sezioni ---------- */
.kx-section { padding: 120px 0; }
.kx-section--tight-top { padding-top: 0; }
.kx-section--tint { background: var(--tint); }
.kx-split-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: end; margin-bottom: 56px; }

/* riquadri con icona (toni: violet, green, amber, coral, navy) */
.kx-tile { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-pale); color: var(--brand-ink); display: grid; place-items: center; flex: none; }
.kx-tile .kx-ic { width: 22px; height: 22px; }
.kx-tile--violet { background: #ecebfd; color: #4b3fc4; }
.kx-tile--green { background: var(--ok-bg); color: var(--ok); }
.kx-tile--amber { background: var(--warn-bg); color: var(--warn); }
.kx-tile--coral { background: #fde9e3; color: #b8462a; }
.kx-tile--navy { background: #e6eaf3; color: #233466; }

/* ---------- intestazione ---------- */
.kx-header {
    position: sticky; top: 0; z-index: 50; background: #fff;
    border-bottom: 1px solid transparent; transition: border-color .2s;
}
/* solo su desktop: il backdrop-filter farebbe da contenitore al menu mobile (position: fixed) e lo taglierebbe */
@media (min-width: 1121px) {
    .kx-header { background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
}
.kx-header.is-scrolled { border-bottom-color: var(--line); }
.kx-header--sand { background: rgba(251, 246, 234, .94); }
/* intestazione color sabbia finché si è sopra un'apertura sabbia (body.kx--sand-top) */
.kx--sand-top .kx-header:not(.is-scrolled) { background: var(--sand); }
.kx--sand-top.kx-nav-open .kx-header { background: #fff; }
.kx-header__bar { display: flex; align-items: center; gap: 36px; height: 76px; }
.kx-logo img { height: 30px; width: auto; }
.kx-nav { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.kx-nav__list { display: flex; align-items: center; gap: 4px; }
.kx-nav__item { position: relative; }
.kx-nav__link {
    display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 8px;
    font-size: 15px; font-weight: 550; color: var(--ink) !important;
}
.kx-nav__link:hover, .kx-nav__item--sub.is-open > .kx-nav__link { background: rgba(17, 19, 24, .05); }
.kx-nav__chev { width: 16px; height: 16px; stroke-width: 2.2; transition: transform .2s; }
.kx-nav__item--sub.is-open .kx-nav__chev { transform: rotate(180deg); }
.kx-nav__actions { display: flex; align-items: center; gap: 12px; }
.kx-nav__login { font-size: 15px; font-weight: 550; color: var(--ink) !important; padding: 0 6px; }
.kx-nav__login:hover { color: var(--brand-ink) !important; }
.kx-lang { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; padding: 2px; }
.kx-lang a { font-size: 12px; font-weight: 700; letter-spacing: .04em; padding: 5px 8px; border-radius: 6px; color: var(--muted) !important; }
.kx-lang a[aria-current] { background: var(--ink); color: #fff !important; }

/* tendine */
.kx-mega {
    position: absolute; top: calc(100% + 10px); left: -16px; width: 760px; z-index: 60;
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .16s, transform .16s, visibility .16s;
}
.kx-mega::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.kx-mega--narrow { width: 560px; }
.kx-nav__item--sub.is-open .kx-mega,
.kx:not(.kx-touch) .kx-nav__item--sub:hover .kx-mega,
.kx-nav__item--sub:focus-within .kx-mega { opacity: 1; visibility: visible; transform: none; }
.kx-mega__inner {
    display: grid; grid-template-columns: 1fr 220px; gap: 8px; padding: 12px;
    background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg);
}
.kx-mega--narrow .kx-mega__inner { grid-template-columns: 1fr; }
.kx-mega__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.kx-mega__link { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; }
.kx-mega__link:hover { background: var(--tint); }
.kx-mega__link b, .kx-mega__feature b { display: block; font-size: 15px; font-weight: 650; color: var(--ink); line-height: 1.3; }
.kx-mega__link small, .kx-mega__feature small { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.kx-mega__ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-pale); color: var(--brand-ink); flex: none; }
.kx-mega__ic .kx-ic { width: 20px; height: 20px; }
.kx-mega__ic--ai { background: var(--ink); color: #fff; }
.kx-mega__side { display: flex; flex-direction: column; gap: 8px; }
.kx-mega__feature {
    display: flex; flex-direction: column; gap: 10px; padding: 18px 16px 20px; border-radius: 14px;
    background: linear-gradient(160deg, #fbf6ea 0%, #e3f4f7 100%);
}
.kx-mega__feature:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.kx-mega__all { margin-top: auto; display: flex; align-items: center; gap: 6px; padding: 12px 14px; font-size: 14px; font-weight: 650; color: var(--brand-ink) !important; border-radius: 10px; }
.kx-mega__all:hover { background: var(--tint); }
.kx-mega__all .kx-ic { width: 16px; height: 16px; stroke-width: 2.2; }

/* hamburger */
.kx-burger { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 10px; place-items: center; }
.kx-burger__bars { display: grid; gap: 5px; width: 22px; }
.kx-burger__bars i { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.kx-burger[aria-expanded="true"] .kx-burger__bars i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.kx-burger[aria-expanded="true"] .kx-burger__bars i:nth-child(2) { opacity: 0; }
.kx-burger[aria-expanded="true"] .kx-burger__bars i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1120px) {
    .kx-header__bar { gap: 16px; }
    .kx-burger { display: grid; }
    .kx-nav {
        position: fixed; inset: 76px 0 0 0; background: #fff; flex-direction: column; align-items: stretch;
        justify-content: flex-start; gap: 0; padding: 8px var(--gut) 32px; overflow-y: auto;
        visibility: hidden; opacity: 0; transition: opacity .18s, visibility .18s;
    }
    .kx-nav.is-open { visibility: visible; opacity: 1; }
    .kx-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .kx-nav__item { border-bottom: 1px solid var(--line); }
    .kx-nav__link { width: 100%; height: 56px; padding: 0; justify-content: space-between; font-size: 17px; border-radius: 0; }
    .kx-nav__link:hover, .kx-nav__item--sub.is-open > .kx-nav__link { background: none; }
    .kx-mega, .kx-mega--narrow { position: static; width: auto; opacity: 1; visibility: visible; transform: none; display: none; padding-bottom: 12px; }
    .kx-nav__item--sub.is-open .kx-mega { display: block; }
    .kx:not(.kx-touch) .kx-nav__item--sub:hover .kx-mega { display: none; }
    .kx:not(.kx-touch) .kx-nav__item--sub.is-open:hover .kx-mega { display: block; }
    .kx-mega::before { display: none; }
    .kx-mega__inner { grid-template-columns: 1fr; border: 0; box-shadow: none; padding: 0; }
    .kx-mega__grid { grid-template-columns: 1fr; }
    .kx-mega__feature { flex: none; }
    .kx-nav__actions { flex-wrap: wrap; gap: 12px; padding-top: 24px; }
    .kx-nav__actions .kx-btn { flex: 1 1 200px; min-height: 50px; font-size: 16px; }
    .kx-nav__login { order: 3; width: 100%; text-align: center; padding: 12px 0; }
    body.kx-nav-open { overflow: hidden; }
}

/* ---------- fascia finale ---------- */
.kx-cta {
    display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center;
    padding: 72px 80px; border-radius: var(--radius-lg); background: var(--brand-deep); color: #fff;
    position: relative; overflow: hidden;
}
.kx-cta::after {
    content: ""; position: absolute; right: -120px; top: -160px; width: 460px; height: 460px; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(11, 165, 191, .55), rgba(11, 165, 191, 0)); pointer-events: none;
}
.kx-cta > * { position: relative; z-index: 1; }
.kx-cta__h { color: #fff !important; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.1; letter-spacing: -.035em; max-width: 20ch; }
.kx-cta__h span { color: #9fe8f2; }
.kx-cta p { margin-top: 16px; color: rgba(255, 255, 255, .82); max-width: 52ch; }
.kx-cta__btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

/* ---------- domande frequenti ---------- */
.kx-faq { display: grid; grid-template-columns: 1fr 1.45fr; gap: 64px; align-items: start; }
.kx-faq__head p { margin-top: 18px; color: var(--muted); }
.kx-faq__head a { color: var(--brand-ink) !important; font-weight: 650; }
.kx-faq__item { border-bottom: 1px solid var(--line-2); }
.kx-faq__item summary {
    list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px;
    padding: 26px 0; font-size: 19px; font-weight: 650; color: var(--ink); letter-spacing: -.015em; line-height: 1.35;
}
.kx-faq__item summary::-webkit-details-marker { display: none; }
.kx-faq__ic { width: 38px; height: 38px; border-radius: 50%; background: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 1px 2px rgba(17, 19, 24, .08); }
.kx-faq__ic .kx-ic { width: 18px; height: 18px; stroke-width: 2.2; transition: transform .2s; }
.kx-faq__item[open] .kx-faq__ic .kx-ic { transform: rotate(180deg); }
.kx-faq__item p { padding: 0 64px 26px 0; color: var(--ink-2); }

/* ---------- piè di pagina ---------- */
.kx-footer { background: var(--night); color: rgba(255, 255, 255, .72); padding: 88px 0 40px; font-size: 15px; }
.kx-footer__top { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px; }
.kx-footer__logo img { height: 32px; width: auto; }
.kx-footer__brand p { margin-top: 20px; max-width: 36ch; line-height: 1.6; }
.kx-footer__contact a { color: #fff !important; font-weight: 600; }
.kx-footer__contact span { font-size: 14px; }
.kx-footer__social { display: flex; gap: 10px; margin-top: 22px !important; }
.kx-footer__social a { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .08); color: #fff !important; }
.kx-footer__social a:hover { background: rgba(255, 255, 255, .16); }
.kx-footer__col h2 { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 18px; }
.kx-footer__col li + li { margin-top: 10px; }
.kx-footer__col a { color: rgba(255, 255, 255, .86) !important; }
.kx-footer__col a:hover { color: #fff !important; text-decoration: underline; text-underline-offset: 3px; }
.kx-footer__bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: 72px; padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; color: rgba(255, 255, 255, .55);
}
.kx-footer__bottom a { color: rgba(255, 255, 255, .7) !important; }
.kx-footer__bottom a:hover { color: #fff !important; }

/* ---------- adattamento ---------- */
@media (max-width: 1080px) {
    .kx-footer__top { grid-template-columns: 1fr 1fr 1fr; }
    .kx-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
    :root { --gut: 24px; }
    .kx-section { padding: 88px 0; }
    .kx-split-head { grid-template-columns: 1fr; gap: 20px; margin-bottom: 40px; }
    .kx-cta { grid-template-columns: 1fr; padding: 48px 32px; }
    .kx-cta__btns { justify-content: flex-start; }
    .kx-faq { grid-template-columns: 1fr; gap: 24px; }
    .kx-faq__item p { padding-right: 0; }
}
@media (max-width: 560px) {
    :root { --gut: 16px; }
    body.kx { font-size: 16px; }
    .kx-section { padding: 72px 0; }
    .kx-section--tight-top { padding-top: 0; }
    .kx-btns .kx-btn { width: 100%; }
    .kx-cta { padding: 40px 22px; border-radius: 20px; }
    .kx-cta__btns .kx-btn { width: 100%; }
    .kx-faq__item summary { font-size: 17px; padding: 20px 0; }
    .kx-footer__top { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
}
