/* DT Lidea · stili di base, barra, home e piè di pagina. Le pagine interne sono in blog.css. */

/* caratteri ospitati localmente (nessuna richiesta a Google) */
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/Lexend.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/Montserrat.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* motivo "origami": triangoli a filo, tono su tono (come le pieghe dell'airone del logo) */
  --fold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='42' viewBox='0 0 48 42'%3E%3Cg fill='none' stroke='%237290c0' stroke-opacity='.13' stroke-width='1'%3E%3Cpath d='M0 0L24 42L48 0Z'/%3E%3Cpath d='M24 0L12 21H36Z'/%3E%3C/g%3E%3C/svg%3E");
  --fold-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='42' viewBox='0 0 48 42'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.08' stroke-width='1'%3E%3Cpath d='M0 0L24 42L48 0Z'/%3E%3Cpath d='M24 0L12 21H36Z'/%3E%3C/g%3E%3C/svg%3E");
  --blue: #365484;        /* blu scuro del logo */
  --blue-dark: #2b456e;
  --blue-light: #7290c0;  /* blu chiaro del logo */
  --mist: #d8dee4;        /* grigio-azzurro del logo */
  --bg: #ffffff;
  --bg2: #f1f4f8;
  --card: #ffffff;
  --ink: #2a2d36;
  --muted: #646a78;
  --line: #e1e6ee;
  --wa: #1f9d55;
  --head: 'Lexend', 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
  --wrap: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--body); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
/* piè di pagina sempre in fondo, anche nelle pagine corte */
body { min-height: 100vh; display: flex; flex-direction: column; }
body.admin-bar { min-height: calc(100vh - 32px); }
.site-main { flex: 1 0 auto; width: 100%; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--blue-light); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding-top: 72px; padding-bottom: 72px; }
/* pagine interne: contenuto centrato; la home usa fasce a tutta larghezza */
body:not(.home) .site-main { max-width: var(--wrap); margin: 0 auto; padding: 0 20px 40px; }

/* ---------- titoli ---------- */
.kicker { text-align: center; text-transform: uppercase; letter-spacing: .18em; font-size: 12px; font-weight: 600; color: var(--blue); }
.kicker a { text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 600; line-height: 1.2; color: var(--ink); }
h2 { text-align: center; font-size: 38px; margin: 6px 0 40px; }
h3 { font-size: 21px; margin-bottom: 6px; }

/* ---------- avviso in cima ---------- */
.ribbon { background: var(--blue); color: #fff; text-align: center; font-size: 14px; font-weight: 500; padding: 8px 16px; }

/* ---------- barra in alto ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.95); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.admin-bar .topbar { top: 32px; }
.topbar-inner { max-width: var(--wrap); margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 20px; }
.brand img { height: 46px; width: auto; }
.topnav { display: flex; gap: 26px; font-size: 14px; font-weight: 500; }
.topnav a { text-decoration: none; color: var(--muted); padding: 4px 0; border-bottom: 2px solid transparent; }
.topnav a:hover { color: var(--blue); }
.topnav a[aria-current="page"] { color: var(--blue-dark); border-bottom-color: var(--blue); }
.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--blue-dark); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- pulsanti ---------- */
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }
.cta-left { justify-content: flex-start; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 15px; border: 1.5px solid transparent; transition: background .2s, color .2s, border-color .2s; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #188547; }
.btn-main { background: var(--blue); color: #fff; }
.btn-main:hover { background: var(--blue-dark); }
.btn-ghost { border-color: var(--blue); color: var(--blue-dark); background: #fff; }
.btn-ghost:hover { background: var(--bg2); }

/* ---------- home: parte alta ---------- */
.hero { background: var(--fold), linear-gradient(180deg, var(--bg2) 0%, #fff 100%); text-align: center; padding: 72px 20px 76px; }
.hero-title { margin: 0; line-height: 0; }
.hero-logo { width: 250px; max-width: 70%; margin: 0 auto 22px; }
.tagline { font-family: var(--head); font-weight: 600; font-size: 30px; color: var(--blue-dark); }
.divider { width: 70px; height: 2px; background: var(--blue-light); margin: 20px auto; }
.lead { max-width: 660px; margin: 0 auto; color: var(--muted); font-size: 17px; }
.lead strong { color: var(--ink); }

/* ---------- schede dei servizi ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.features-1 { grid-template-columns: minmax(0, 420px); justify-content: center; }
.features-2, .features-4 { grid-template-columns: repeat(2, 1fr); }
.feature { position: relative; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 8px; padding: 28px 24px; transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(43,69,110,.1); }
.feature p { color: var(--muted); font-size: 15px; }
.icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(54,84,132,.1); color: var(--blue-dark); margin-bottom: 16px; }
.icon svg { width: 24px; height: 24px; }
.badge { position: absolute; top: 18px; right: 18px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--blue-light); padding: 3px 9px; border-radius: 999px; }

/* ---------- riquadro "In evidenza" (gestionali) ---------- */
.spot { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.spot .kicker, .spot h2 { text-align: left; }
.spot h2 { margin-bottom: 14px; }
.spot-lead { color: var(--muted); font-size: 17px; margin-bottom: 18px; }
.checks { list-style: none; display: grid; gap: 9px; }
.checks li { padding-left: 28px; position: relative; font-size: 15px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: rgba(54,84,132,.14); box-shadow: inset 0 0 0 1.5px var(--blue); }
.checks li::after { content: ""; position: absolute; left: 5px; top: 8px; width: 6px; height: 3px; border-left: 2px solid var(--blue-dark); border-bottom: 2px solid var(--blue-dark); transform: rotate(-45deg); }
.mock { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgba(43,69,110,.13); overflow: hidden; font-size: 13px; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--blue-dark); color: #e3e7f0; font-weight: 600; }
.mock-bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.25); }
.mock-bar span { margin-left: 8px; }
.mock-body { padding: 16px; }
.mock-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.mock-stats div { background: var(--bg2); border-radius: 8px; padding: 10px 12px; }
.mock-stats b { display: block; font-family: var(--head); font-size: 20px; color: var(--blue-dark); }
.mock-stats small { color: var(--muted); font-size: 11px; }
.mock-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.mock-row.head { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.mock-row .ok, .mock-row .warn { justify-self: start; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.mock-row .ok { background: #e3f3ea; color: #1f7a45; }
.mock-row .warn { background: #fbefd9; color: #946200; }

/* ---------- come lavoro ---------- */
.band { background: var(--fold), var(--bg2); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.steps-3 { grid-template-columns: repeat(3, 1fr); }
.steps-2 { grid-template-columns: repeat(2, 1fr); max-width: 640px; margin: 0 auto; }
.steps-1 { grid-template-columns: minmax(0, 360px); justify-content: center; }
.step { text-align: center; }
.step-n { width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 14px; display: grid; place-items: center; font-family: var(--head); font-weight: 600; font-size: 22px; background: var(--blue); color: #fff; }
.step p { color: var(--muted); font-size: 15px; }

/* ---------- lavori (home, elenco, correlati) ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: -14px 0 30px; }
.filters a { font-size: 13px; font-weight: 500; padding: 7px 14px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--muted); text-decoration: none; }
.filters a:hover { border-color: var(--blue-light); color: var(--blue-dark); }
.filters a[aria-current="page"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.work { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.work:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(43,69,110,.13); }
.work-img, .card-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg2); }
.work-img img, .card-img img { width: 100%; height: 100%; object-fit: cover; }
.img-placeholder { display: grid; place-items: center; width: 100%; height: 100%; background: var(--fold), var(--bg2); }
.img-placeholder img { width: 34%; height: auto; opacity: .55; object-fit: contain; }
.work-body { padding: 14px 16px 16px; }
.work-cat { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--blue); font-weight: 600; }
.work-title { font-size: 18px; margin: 2px 0 0; }
.work-title a { text-decoration: none; }
.work-title a:hover { color: var(--blue); }
.more-link { text-align: center; margin-top: 30px; }
.more-link a { color: var(--blue-dark); font-weight: 600; text-decoration: none; }
.more-link a:hover { text-decoration: underline; }

/* ---------- separatore con l'airone ---------- */
.sep { display: flex; align-items: center; justify-content: center; gap: 14px; max-width: 320px; margin: 0 auto; }
.sep::before, .sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.sep svg { width: 22px; height: 22px; color: var(--blue-light); }

/* ---------- contatti in home ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 30px; }
.contact-card p { color: var(--muted); }
.contact-card .big { font-family: var(--head); font-weight: 600; font-size: 30px; color: var(--blue-dark); text-decoration: none; display: block; margin: 4px 0 14px; }

/* ---------- piè di pagina ---------- */
.site-foot { background: var(--fold-light), var(--blue-dark); color: #e3e7f0; padding: 44px 20px 30px; font-size: 14px; }
.foot-inner { max-width: var(--wrap); margin: auto; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 24px; }
.foot-name { font-family: var(--head); font-size: 24px; font-weight: 600; color: #fff; }
.foot-tag { color: #b9c5dc; }
.foot-contacts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.foot-contacts a { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; color: #fff; }
.foot-contacts a:hover { text-decoration: underline; }
.foot-contacts svg { width: 16px; height: 16px; }
.foot-social { display: flex; gap: 8px; }
.foot-social a { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); }
.foot-social a:hover { background: rgba(255,255,255,.2); text-decoration: none; }
.foot-legal { max-width: var(--wrap); margin: 26px auto 0; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); color: #b9c5dc; font-size: 13px; }
.foot-legal a { color: #fff; }

/* ---------- WhatsApp fisso ---------- */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--wa); color: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.2); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .25s, transform .25s; }
.wa-float.show { opacity: 1; pointer-events: auto; transform: none; }
.wa-float svg { width: 28px; height: 28px; }

/* ---------- "Nuovo sito in arrivo" (anteprima) ---------- */
.coming-soon { min-height: 100vh; display: grid; place-items: center; background: var(--fold), linear-gradient(180deg, var(--bg2) 0%, #fff 100%); }
.soon { text-align: center; padding: 40px 20px; }
.soon-logo { width: 260px; max-width: 70%; margin: 0 auto 22px; }

/* ---------- telefono e tablet ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .topnav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(43,69,110,.1); padding: 6px 20px 14px; }
  .nav-open .topnav { display: flex; }
  .topnav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .topnav a:last-child { border-bottom: 0; }
  .topnav a[aria-current="page"] { border-bottom-color: var(--line); color: var(--blue); }
  .features, .works { grid-template-columns: repeat(2, 1fr); }
  .steps, .steps-3 { grid-template-columns: repeat(2, 1fr); }
  .spot { grid-template-columns: 1fr; gap: 32px; }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 782px) {
  .admin-bar .topbar { top: 46px; }
  body.admin-bar { min-height: calc(100vh - 46px); }
}
@media (max-width: 600px) {
  .brand img { height: 38px; }
  .features, .features-2, .features-4, .works, .steps, .steps-2, .steps-3 { grid-template-columns: 1fr; }
  .section { padding-top: 54px; padding-bottom: 54px; }
  h2 { font-size: 29px; margin-bottom: 30px; }
  .tagline { font-size: 24px; }
  .hero { padding: 48px 16px 56px; }
  .lead { font-size: 16px; }
  .mock-stats b { font-size: 16px; }
  .mock { font-size: 12px; }
  .contact-card { padding: 22px; }
  .contact-card .big { font-size: 26px; }
  .foot-inner { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .feature, .work, .card, .wa-float { transition: none; }
  .feature:hover, .work:hover, .card:hover { transform: none; }
}
.soon-legal { margin-top: 34px; font-size: 13px; }
.soon-legal a { color: var(--muted); }

/* ---------- airone in volo all'apertura (vedi dtlidea.js) ---------- */
.volo-airone { position: fixed; top: 0; left: 0; z-index: 60; width: 180px; height: auto; pointer-events: none; opacity: 0; transform-origin: 0 0; will-change: transform, opacity; }
@media (max-width: 600px) { .volo-airone { width: 120px; } }
@media (prefers-reduced-motion: reduce) { .volo-airone { display: none; } }

/* ---------- comparsa morbida allo scorrimento (vedi dtlidea.js) ---------- */
.anima .sale { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.3,1); }
.anima .sale.su { opacity: 1; transform: none; }
.anima .about-photo.sale { transform: translateX(-24px); }
.anima .about-photo.sale.su { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .anima .sale { opacity: 1; transform: none; transition: none; }
}
