/* =========================================================
   OK Broker — stile ispirato ad Apple, palette dal logo attuale
   ========================================================= */
:root {
    --ok-purple:      #3f2870;   /* viola del logo */
    --ok-purple-deep: #1a1030;   /* sfondi scuri */
    --ok-blue:        #0083b4;   /* blu del sito attuale */
    --ok-cyan:        #01a3d4;   /* ciano del logo */
    --ok-slate:       #476069;   /* ardesia del sito attuale */
    --ok-mist:        #a0b7bf;   /* grigio-azzurro del menu attuale */

    --ink:        #1d1d1f;
    --ink-2:      #6e6e73;
    --soft:       #f5f5f7;
    --line:       #d2d2d7;
    --radius-xl:  28px;
    --radius-lg:  20px;
    --nav-h:      56px;

    --bs-body-font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    --bs-body-color: var(--ink);
    --bs-link-color-rgb: 0, 131, 180;
    --bs-link-hover-color-rgb: 1, 163, 212;
    --bs-secondary-color: var(--ink-2);
}

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { background: #fff; -webkit-font-smoothing: antialiased; letter-spacing: -.01em; }
a { text-decoration: none; }

/* ---------- Navbar vetro smerigliato ---------- */
.ok-nav {
    min-height: var(--nav-h);
    background: rgba(255, 255, 255, .78);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    padding: 0;
}
.ok-nav .navbar-brand img { mix-blend-mode: multiply; }
.ok-nav .nav-link { font-size: .875rem; color: var(--ink); opacity: .8; padding: 1.1rem .9rem !important; }
.ok-nav .nav-link:hover, .ok-nav .nav-link.active { opacity: 1; color: var(--ok-purple); }
.ok-dropdown { border: 0; border-radius: var(--radius-lg); padding: .5rem; box-shadow: 0 20px 50px rgba(26, 16, 48, .15); min-width: 320px; }
.ok-dropdown .dropdown-item { display: flex; gap: .85rem; align-items: center; border-radius: 12px; padding: .7rem .8rem; white-space: normal; }
.ok-dropdown .dropdown-item i { font-size: 1.35rem; color: var(--ok-cyan); }
.ok-dropdown .dropdown-item small { display: block; color: var(--ink-2); font-size: .78rem; }
.ok-dropdown .dropdown-item:hover { background: var(--soft); }

/* ---------- Bottoni a pillola ---------- */
.btn { border-radius: 980px; font-weight: 500; padding-inline: 1.25rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; }
.btn-lg { padding: .8rem 1.6rem; font-size: 1.0625rem; }
.btn-ok { background: var(--ok-purple); color: #fff; border: 0; }
.btn-ok:hover, .btn-ok:focus { background: #52368f; color: #fff; }
.btn-ok-light { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .25); }
.btn-ok-light:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.btn-ok-ghost { background: transparent; color: var(--ok-purple); border: 1px solid var(--ok-purple); }
.btn-ok-ghost:hover { background: var(--ok-purple); color: #fff; }
.btn-ok-outline-light { color: #fff; border: 1px solid rgba(255, 255, 255, .4); }
.btn-ok-outline-light:hover { background: #fff; color: var(--ok-purple); }
.link-apple { color: var(--ok-blue); font-weight: 500; }
.link-apple i { font-size: .75em; transition: transform .2s; display: inline-block; }
a:hover .link-apple i, .link-apple:hover i { transform: translateX(3px); }

/* ---------- Tipografia ---------- */
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 600; color: var(--ok-cyan); margin-bottom: 1rem; }
.eyebrow-dark { color: var(--ok-purple); }
.display-hero { font-size: clamp(2.75rem, 8vw, 6rem); font-weight: 800; line-height: 1.02; letter-spacing: -.045em; color: #fff; margin-bottom: 1.5rem; }
.display-section { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.06; letter-spacing: -.035em; margin-bottom: 1.25rem; }
.lead-apple { font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--ink-2); max-width: 720px; line-height: 1.45; }
.text-gradient { background: linear-gradient(90deg, var(--ok-cyan), #8f7cf0 60%, #c3b4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.text-white-75 { color: rgba(255, 255, 255, .75); }

.section { padding: clamp(4.5rem, 10vw, 8rem) 0; }
.section-tight { padding: 1rem 0; }
.bg-soft { background: var(--soft); }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    min-height: 100svh; display: flex; align-items: center;
    padding: calc(var(--nav-h) + 4rem) 0 5rem;
    background:
        radial-gradient(1200px 600px at 50% 120%, rgba(1, 163, 212, .35), transparent 60%),
        radial-gradient(900px 500px at 10% -10%, rgba(63, 40, 112, .9), transparent 60%),
        var(--ok-purple-deep);
}
.hero-sub { color: rgba(255, 255, 255, .72); font-size: clamp(1.1rem, 2.2vw, 1.5rem); max-width: 680px; margin: 0 auto 2.5rem; }
.hero-route { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-route .route { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 3.5s ease-out .3s forwards; }
.hero-route .route-2 { stroke-dasharray: 4 10; stroke-dashoffset: 0; opacity: 0; animation: fade 2s ease 1.5s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: .6; } }

/* ---------- Striscia contatti ---------- */
.quick-strip { background: #fff; border-bottom: 1px solid rgba(0, 0, 0, .06); }
.quick-item { display: flex; align-items: center; justify-content: center; gap: .9rem; padding: 1.6rem 1rem; color: var(--ink); text-align: left; transition: background .2s; }
.quick-item:hover { background: var(--soft); color: var(--ink); }
.quick-item i { font-size: 1.6rem; color: var(--ok-cyan); }
.quick-item strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ok-purple); }
@media (min-width: 768px) { .quick-strip .col-md-4 + .col-md-4 .quick-item { border-left: 1px solid rgba(0, 0, 0, .06); } }

/* ---------- Tile servizi ---------- */
.tile {
    position: relative; display: flex; flex-direction: column; height: 100%;
    min-height: 460px; padding: 2.5rem; border-radius: var(--radius-xl);
    color: var(--ink); background: var(--soft); overflow: hidden;
    transition: transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s;
}
.tile:hover { transform: scale(1.015); box-shadow: 0 30px 60px rgba(26, 16, 48, .12); color: var(--ink); }
.tile h3 { font-size: 2rem; font-weight: 700; letter-spacing: -.03em; margin: auto 0 .35rem; }
.tile-lead { font-size: 1.15rem; font-weight: 500; margin-bottom: .75rem; }
.tile-text { color: var(--ink-2); margin-bottom: 1.5rem; }
.tile-icon { font-size: 3rem; margin-top: 1.5rem; }
.tile-num { position: absolute; top: 1.5rem; right: 2rem; font-size: 5rem; font-weight: 800; opacity: .08; letter-spacing: -.05em; }
.tile-1 .tile-icon { color: var(--ok-cyan); }
.tile-2 { background: linear-gradient(160deg, var(--ok-purple), #2a1a52); color: #fff; }
.tile-2:hover { color: #fff; }
.tile-2 .tile-text { color: rgba(255, 255, 255, .7); }
.tile-2 .tile-icon, .tile-2 .link-apple { color: #7fd6f2; }
.tile-3 { background: linear-gradient(160deg, #e7eef1, #cfdde2); }
.tile-3 .tile-icon { color: var(--ok-slate); }

/* ---------- Feature scura droni/ULM ---------- */
.feature-dark {
    border-radius: var(--radius-xl); padding: clamp(2rem, 6vw, 5rem);
    background:
        radial-gradient(700px 400px at 90% 10%, rgba(1, 163, 212, .3), transparent 60%),
        linear-gradient(160deg, #23164a, var(--ok-purple-deep));
    color: #fff;
}
.mini-card {
    display: flex; flex-direction: column; gap: .3rem; height: 100%;
    padding: 1.5rem; border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
    color: #fff; transition: background .25s, transform .25s;
}
.mini-card:hover { background: rgba(255, 255, 255, .12); transform: translateY(-3px); color: #fff; }
.mini-card i { font-size: 1.8rem; color: var(--ok-cyan); margin-bottom: .5rem; }
.mini-card span { font-size: .875rem; color: rgba(255, 255, 255, .65); }

/* ---------- Rami ---------- */
.ramo { background: #fff; border-radius: var(--radius-lg); padding: 2rem 1.6rem; height: 100%; transition: transform .3s, box-shadow .3s; }
.ramo:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(26, 16, 48, .08); }
.ramo i { font-size: 2rem; color: var(--ok-purple); }
.ramo h3 { font-size: 1.25rem; font-weight: 700; margin: 1rem 0 .5rem; letter-spacing: -.02em; }
.ramo p { color: var(--ink-2); font-size: .95rem; margin: 0; }

/* ---------- Quote ---------- */
.quote { font-size: clamp(2.2rem, 5.5vw, 4.25rem); font-weight: 800; line-height: 1.05; letter-spacing: -.045em; margin: 0; color: var(--ink); }
.quote .text-gradient { background-image: linear-gradient(90deg, var(--ok-purple), var(--ok-cyan)); }

/* ---------- Contatti ---------- */
.contact-card { max-width: 760px; background: #fff; border-radius: var(--radius-xl); padding: clamp(1.5rem, 4vw, 3rem); box-shadow: 0 30px 80px rgba(26, 16, 48, .08); }
.ok-segmented { background: var(--soft); border-radius: 980px; padding: 4px; display: inline-flex; width: 100%; }
.ok-segmented .nav-item { flex: 1; }
.ok-segmented .nav-link { width: 100%; border-radius: 980px; color: var(--ink); font-weight: 500; }
.ok-segmented .nav-link.active { background: #fff; color: var(--ok-purple); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.form-control, .form-select { border-radius: 14px; border-color: var(--line); }
.form-control:focus, .form-select:focus { border-color: var(--ok-cyan); box-shadow: 0 0 0 4px rgba(1, 163, 212, .15); }
.form-check-input:checked { background-color: var(--ok-purple); border-color: var(--ok-purple); }

/* ---------- Footer ---------- */
.ok-footer { background: var(--soft); padding: 4rem 0 2.5rem; font-size: .8125rem; color: var(--ink-2); }
.ok-footer .border-bottom { border-color: var(--line) !important; }
.ok-footer h6 { font-size: .8125rem; font-weight: 600; color: var(--ink); margin-bottom: .8rem; }
.ok-footer li { margin-bottom: .45rem; }
.ok-footer a { color: var(--ink-2); }
.ok-footer a:hover { color: var(--ok-purple); text-decoration: underline; }
.footer-logo { mix-blend-mode: multiply; }
.ok-footer .legal { font-size: .75rem; line-height: 1.7; }

/* ---------- WhatsApp flottante ---------- */
.wa-float {
    position: fixed; right: 20px; bottom: 20px; z-index: 1050;
    display: flex; align-items: center; gap: .6rem;
    height: 60px; padding: 0 18px; border-radius: 980px;
    background: #25d366; color: #fff; font-weight: 600;
    box-shadow: 0 12px 30px rgba(37, 211, 102, .4);
    transition: transform .25s, box-shadow .25s;
}
.wa-float i { font-size: 1.7rem; line-height: 1; }
.wa-float:hover { color: #fff; transform: translateY(-3px); box-shadow: 0 16px 36px rgba(37, 211, 102, .5); }
.wa-float-label { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .35s ease; }
.wa-float:hover .wa-float-label, .wa-float.is-open .wa-float-label { max-width: 220px; }
@media (max-width: 575px) { .wa-float { height: 56px; padding: 0 15px; right: 16px; bottom: 16px; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s cubic-bezier(.2, .8, .2, 1), transform .9s cubic-bezier(.2, .8, .2, 1); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-route .route { animation: none; stroke-dashoffset: 0; }
    html { scroll-behavior: auto; }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 991px) {
    .ok-nav { background: rgba(255, 255, 255, .95); }
    .ok-nav .nav-link { padding: .8rem 0 !important; border-bottom: 1px solid rgba(0, 0, 0, .05); }
    .ok-dropdown { box-shadow: none; min-width: 0; }
    .tile { min-height: 380px; }
}
