/* ==========================================================================
   NectaPlanner — base.css
   Reset, struttura e componenti condivisi tra le 4 varianti.
   I colori/typografia specifici sono nei file v1.css … v4.css.
   Variabili di brand (override per variante):
     --navy  #1a3a52   --green #1d9e75
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body, system-ui, sans-serif);
  color: var(--text, #1f2933);
  background: var(--bg, #ffffff);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-head, inherit); line-height: 1.15; margin: 0 0 .4em; color: var(--heading, var(--navy)); }
p { margin: 0 0 1rem; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; height: auto; display: block; }

.container { width: min(1160px, 92vw); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.eyebrow { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; color: var(--green); }
.lead { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--muted, #52606d); max-width: 56ch; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font: inherit; font-weight: 600; cursor: pointer;
  padding: .85rem 1.5rem; border-radius: var(--radius-btn, 10px);
  border: 2px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  text-align: center; line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark, #178563); box-shadow: 0 10px 24px -10px var(--green); }
.btn-ghost { background: transparent; color: var(--heading, var(--navy)); border-color: var(--border, #d9e0e6); }
.btn-ghost:hover { border-color: var(--green); color: var(--green); }
.btn-lg { padding: 1rem 1.8rem; font-size: 1.02rem; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 6px; }

/* ---- Header / navbar ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg, rgba(255,255,255,.85));
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid transparent; transition: box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 6px 24px -16px rgba(16,24,40,.4); border-bottom-color: var(--border, #e6ebf0); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; }
.nav-logo { display: inline-flex; align-items: center; }
.nav-logo img { height: 36px; width: auto; }
.nav-menu { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2rem); }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 1.8rem); list-style: none; margin: 0; padding: 0; }
.nav-links a { font-weight: 600; font-size: .98rem; color: var(--nav-link, var(--heading)); position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--green); transition: width .2s ease; }
.nav-links a:hover::after { width: 100%; }
.lang-switch { display: inline-flex; border: 1px solid var(--border, #d9e0e6); border-radius: 999px; overflow: hidden; }
.lang-switch button { font: inherit; font-weight: 700; font-size: .82rem; padding: .35rem .7rem; border: 0; background: transparent; color: var(--muted, #52606d); cursor: pointer; }
.lang-switch button.is-active { background: var(--navy); color: #fff; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 44px; height: 44px; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--border, #d9e0e6); border-radius: 10px; cursor: pointer; }
.nav-toggle span { width: 22px; height: 2px; background: var(--heading, var(--navy)); border-radius: 2px; }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 1rem;
    background: var(--bg, #fff); border-bottom: 1px solid var(--border, #e6ebf0);
    padding: 1.2rem 6vw 1.6rem; transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav[data-nav].is-open .nav-menu { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .nav-menu .btn { width: 100%; justify-content: center; }
}

/* ---- Features grid ---- */
.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--card, #fff); border: 1px solid var(--border, #e6ebf0); border-radius: var(--radius-card, 16px); padding: 1.5rem; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(16,24,40,.45); border-color: var(--green); }
.card .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--icon-bg, rgba(29,158,117,.12)); color: var(--green); margin-bottom: 1rem; }
.card .ico svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.12rem; margin-bottom: .35rem; }
.card p { margin: 0; color: var(--muted, #52606d); font-size: .96rem; }

/* ---- Hero product visual placeholder (per screenshot reali) ---- */
.visual-frame {
  border-radius: 16px; overflow: hidden; border: 1px solid var(--border, #e6ebf0);
  background: var(--card, #fff); box-shadow: 0 30px 60px -30px rgba(16,24,40,.45);
}
.visual-frame .bar { display: flex; gap: 6px; padding: 12px 14px; background: var(--navy); }
.visual-frame .bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,.35); }
.visual-ph {
  aspect-ratio: 16 / 10; display: grid; place-items: center; text-align: center; padding: 1.5rem;
  background:
    linear-gradient(120deg, rgba(29,158,117,.08), rgba(26,58,82,.06)),
    repeating-linear-gradient(45deg, transparent 0 18px, rgba(26,58,82,.04) 18px 19px);
  color: var(--muted, #52606d); font-size: .9rem; font-weight: 600;
}
.visual-ph span { display: inline-block; border: 1.5px dashed var(--border, #c7d0d8); border-radius: 10px; padding: .7rem 1rem; background: rgba(255,255,255,.6); }

/* ---- Contact form ---- */
.form-wrap { background: var(--card, #fff); border: 1px solid var(--border, #e6ebf0); border-radius: 20px; padding: clamp(1.4rem, 3vw, 2.4rem); box-shadow: 0 30px 60px -40px rgba(16,24,40,.5); }
.demo-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .demo-form .form-row { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.form-group label { font-weight: 600; font-size: .9rem; color: var(--heading, var(--navy)); }
.form-group label .req { color: var(--green); }
.form-group label .opt { color: var(--muted, #8a97a3); font-weight: 500; }
.form-group input, .form-group textarea {
  font: inherit; padding: .8rem .9rem; border-radius: 10px; border: 1.5px solid var(--border, #d9e0e6);
  background: var(--input-bg, #fff); color: var(--text, #1f2933); transition: border-color .15s ease, box-shadow .15s ease;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(29,158,117,.18); }
.form-group.has-error input, .form-group.has-error textarea { border-color: #e02424; box-shadow: 0 0 0 3px rgba(224,36,36,.14); }
.field-error { color: #c81e1e; font-size: .82rem; min-height: 1em; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-privacy { font-size: .82rem; color: var(--muted, #6b7682); margin: .4rem 0 1rem; }
.form-result { border-radius: 10px; padding: .85rem 1rem; font-weight: 600; font-size: .94rem; margin-bottom: 1rem; }
.form-result.is-success { background: rgba(29,158,117,.12); color: #0f7a59; border: 1px solid rgba(29,158,117,.35); }
.form-result.is-error { background: rgba(224,36,36,.08); color: #b91c1c; border: 1px solid rgba(224,36,36,.3); }
.demo-form .btn { width: 100%; justify-content: center; }

/* ---- Footer ---- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.78); padding: 3.5rem 0 2rem; }
.site-footer a { color: rgba(255,255,255,.78); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer img { height: 34px; margin-bottom: 1rem; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; font-size: .95rem; }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.14); display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; font-size: .86rem; color: rgba(255,255,255,.6); }

/* ---- Reveal on scroll ---- */
[data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal][data-reveal="2"] { transition-delay: .08s; }
[data-reveal][data-reveal="3"] { transition-delay: .16s; }

.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; }
