/* Wiva Consulting — landing energia
   Palette allineata al sito principale: navy #1D1A4E / #13255B, blu elettrico #1E4EC4 */

:root {
  --navy: #13255B;
  --navy-deep: #0C1638;
  --indigo: #1D1A4E;
  --blue: #1E4EC4;
  --blue-bright: #3E7BFF;
  --amber: #FFB547;
  --amber-soft: #FFD79A;
  --ink: #16192A;
  --body: #4B5163;
  --muted: #757C8E;
  --line: #E2E6F0;
  --tint: #F3F5FA;
  --tint-2: #E8EDF9;
  --white: #FFFFFF;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(19, 37, 91, .06), 0 4px 12px rgba(19, 37, 91, .06);
  --shadow-md: 0 8px 28px rgba(19, 37, 91, .10);
  --shadow-lg: 0 24px 60px rgba(12, 22, 56, .18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

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

h1, h2, h3 { color: var(--ink); line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.22rem; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--blue); }
em { font-style: italic; }

.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 2.5rem); }
.center { text-align: center; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: .75rem 1.25rem;
}
.skip:focus { left: .5rem; top: .5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  padding: .8rem 1.4rem; border-radius: 999px; border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-bright) 100%);
  color: #fff; box-shadow: 0 6px 20px rgba(30, 78, 196, .32);
}
.btn-primary:hover { box-shadow: 0 10px 28px rgba(30, 78, 196, .42); }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.btn-sm { padding: .55rem 1.05rem; font-size: .92rem; }
.btn-lg { padding: 1rem 1.9rem; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); font-size: 1.08rem; }
.brand strong { font-weight: 800; }
.brand-mark {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff;
}
.brand-mark svg { width: 17px; height: 17px; }
.header-nav { display: flex; gap: 1.5rem; margin-left: auto; }
.header-nav a { color: var(--body); text-decoration: none; font-weight: 550; font-size: .96rem; }
.header-nav a:hover { color: var(--blue); }
.header-inner > .btn { margin-left: .25rem; }
.header-tel {
  display: inline-flex; align-items: center; gap: .4rem; text-decoration: none;
  color: var(--navy); font-weight: 700; font-size: .95rem; white-space: nowrap;
}
.header-tel svg { width: 16px; height: 16px; color: var(--blue); }
.header-tel:hover { color: var(--blue); }
@media (max-width: 860px) {
  .header-nav { display: none; }
  .header-tel { margin-left: auto; }
}
@media (max-width: 520px) {
  .header-tel span { display: none; }
  .header-tel { padding: .5rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 88% -10%, rgba(62, 123, 255, .38), transparent 60%),
    radial-gradient(700px 500px at 10% 110%, rgba(255, 181, 71, .16), transparent 60%),
    linear-gradient(165deg, var(--indigo) 0%, var(--navy-deep) 100%);
  color: #fff; padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(4rem, 7vw, 6.5rem);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 50% 30%, #000, transparent 75%);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.hero h1 { color: #fff; margin-bottom: 1.1rem; }
.grad {
  background: linear-gradient(100deg, var(--amber-soft), var(--amber) 55%, #FFE7BE);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { font-size: 1.12rem; color: rgba(255, 255, 255, .82); max-width: 46ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: rgba(255, 255, 255, .72); margin-bottom: 1rem;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(255, 181, 71, .2); }
.eyebrow.center { color: var(--blue); justify-content: center; display: flex; }

.hero-points { list-style: none; padding: 0; margin: 1.6rem 0; display: grid; gap: .7rem; }
.hero-points li {
  position: relative; padding-left: 1.9rem; color: rgba(255, 255, 255, .88); font-size: 1rem;
}
.hero-points li::before {
  content: ""; position: absolute; left: 0; top: .45rem; width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255, 181, 71, .16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFB547' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 11px; background-repeat: no-repeat; background-position: center;
}
.hero-points strong { color: #fff; font-weight: 700; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero-note { margin-top: 1.2rem; font-size: .9rem; color: rgba(255, 255, 255, .6); }

.hero-card {
  background: #fff; border-radius: var(--radius-lg); padding: 1.8rem;
  box-shadow: var(--shadow-lg); position: sticky; top: 88px;
}
.hero-card h2 { font-size: 1.4rem; margin-bottom: .35rem; }
.hero-card-sub { font-size: .93rem; color: var(--muted); margin-bottom: 1.3rem; }

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { position: static; }
}

/* ---------- Form ---------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .88rem; font-weight: 650; color: var(--ink); margin-bottom: .38rem; }
input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%; font: inherit; font-size: .98rem; color: var(--ink);
  padding: .72rem .9rem; border: 1.5px solid var(--line); border-radius: 11px;
  background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23757C8E' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .8rem center; background-size: 16px; padding-right: 2.4rem; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3.5px rgba(30, 78, 196, .14);
}
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #D93E4C; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .86rem; color: var(--muted); margin: .35rem 0 1.1rem; line-height: 1.5; }
.check input { margin-top: .22rem; width: 17px; height: 17px; accent-color: var(--blue); flex: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 620px) { .grid-2 { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin: .9rem 0 0; font-size: .92rem; font-weight: 600; min-height: 1.2em; }
.form-msg.ok { color: #1B7F4C; }
.form-msg.err { color: #D93E4C; }
.form-foot { margin: .9rem 0 0; font-size: .8rem; color: var(--muted); text-align: center; }

/* ---------- Trust bar ---------- */
.trustbar { background: var(--tint); border-bottom: 1px solid var(--line); padding: 2.2rem 0; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.trust-item { display: flex; gap: .8rem; align-items: flex-start; }
.trust-item svg { width: 24px; height: 24px; flex: none; color: var(--blue); margin-top: .15rem; }
.trust-item p { margin: 0; display: flex; flex-direction: column; }
.trust-item strong { color: var(--ink); font-size: .97rem; font-weight: 700; }
.trust-item span { font-size: .87rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 900px) { .trust-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .trust-grid { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-alt { background: var(--tint); }
.section-title { margin-bottom: .7rem; }
.section-sub { color: var(--muted); font-size: 1.05rem; max-width: 62ch; }
.section-sub.center { margin-inline: auto; margin-bottom: 3rem; }

/* ---------- Cards ---------- */
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
@media (max-width: 900px) { .cards-2 { grid-template-columns: 1fr; } }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 2rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
}
.card-accent { border-color: rgba(30, 78, 196, .28); box-shadow: var(--shadow-md); }
.card > p { color: var(--body); }
.card > .btn { margin-top: auto; }
.card-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.1rem; }
.card-icon svg { width: 26px; height: 26px; }
.card-icon.blue { background: var(--tint-2); color: var(--blue); }
.card-icon.amber { background: #FFF3E0; color: #E08A1E; }

.ticks { list-style: none; padding: 0; margin: 1.2rem 0 1.8rem; display: grid; gap: .65rem; }
.ticks li { position: relative; padding-left: 1.75rem; font-size: .96rem; color: var(--body); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .42rem; width: 17px; height: 17px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E4EC4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat;
}

/* ---------- Simulatore ---------- */
.sim-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 4rem); align-items: center; }
@media (max-width: 900px) { .sim-grid { grid-template-columns: 1fr; } }
.sim-copy .eyebrow { color: var(--blue); }
.sim-note {
  display: flex; gap: .7rem; align-items: flex-start; margin-top: 1.5rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem;
}
.sim-note svg { width: 20px; height: 20px; flex: none; color: var(--muted); margin-top: .15rem; }
.sim-note p { margin: 0; font-size: .85rem; color: var(--muted); line-height: 1.5; }

.sim-panel { background: #fff; border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-md); border: 1px solid var(--line); }
.sim-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.sim-row label { font-size: .9rem; font-weight: 650; color: var(--ink); }
.sim-row output { font-size: 1.5rem; font-weight: 800; color: var(--blue); font-variant-numeric: tabular-nums; }
input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px; margin: 1rem 0 .4rem;
  border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--blue-bright)) no-repeat,
              var(--tint-2); background-size: var(--fill, 20%) 100%; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 3px solid var(--blue); box-shadow: var(--shadow-sm); cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--blue); cursor: grab;
}
input[type="range"]:focus-visible { outline: 3px solid rgba(30, 78, 196, .3); outline-offset: 3px; }
.sim-scale { display: flex; justify-content: space-between; font-size: .78rem; color: var(--muted); }

.sim-choice { border: 0; padding: 0; margin: 1.5rem 0 0; }
.sim-choice legend { font-size: .9rem; font-weight: 650; color: var(--ink); padding: 0; margin-bottom: .6rem; }
.sim-choice label {
  display: flex; align-items: center; gap: .55rem; font-size: .95rem; padding: .5rem 0; cursor: pointer;
}
.sim-choice input { width: 18px; height: 18px; accent-color: var(--blue); }

.sim-result {
  margin: 1.5rem 0; padding: 1.4rem; border-radius: var(--radius); text-align: center;
  background: linear-gradient(150deg, var(--indigo), var(--navy)); color: #fff;
}
.sim-result-label { margin: 0; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.65); font-weight: 650; }
.sim-result-value { margin: .35rem 0 .4rem; font-size: clamp(1.5rem, 3.4vw, 2rem); font-weight: 800; color: var(--amber); font-variant-numeric: tabular-nums; }
.sim-result-hint { margin: 0; font-size: .84rem; color: rgba(255,255,255,.7); line-height: 1.5; }

/* ---------- Steps ---------- */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 3rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.8rem; box-shadow: var(--shadow-sm); }
.step-n {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff;
  font-weight: 800; font-size: 1.05rem; margin-bottom: 1rem;
}
.steps p { margin: 0; font-size: .96rem; }

/* ---------- FAQ ---------- */
.faq { margin-top: 2.5rem; display: grid; gap: .8rem; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 1.3rem;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 2rem 1.1rem 0; position: relative;
  font-weight: 650; color: var(--ink); font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 0; top: 1.35rem; width: 15px; height: 15px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231E4EC4' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-size: contain; background-repeat: no-repeat; transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p { margin: 0; padding: 0 0 1.2rem; font-size: .96rem; color: var(--body); }
.faq summary:focus-visible { outline: 3px solid rgba(30, 78, 196, .3); outline-offset: 2px; border-radius: 6px; }

/* ---------- CTA finale ---------- */
.cta-section { background: linear-gradient(170deg, var(--indigo), var(--navy-deep)); }
.cta-card { background: #fff; border-radius: var(--radius-lg); padding: clamp(1.8rem, 4vw, 3rem); box-shadow: var(--shadow-lg); }
.cta-head { text-align: center; margin-bottom: 2rem; }
.cta-head p { color: var(--muted); max-width: 52ch; margin-inline: auto; }

/* ---------- Pagine legali ---------- */
.legal h1 { margin-bottom: .6rem; }
.legal h2 { font-size: 1.15rem; margin-top: 2.2rem; margin-bottom: .5rem; }
.legal p { font-size: 1rem; }
.legal .btn { margin-top: 2rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.6); padding: 2.5rem 0; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: .8rem; text-align: center; }
.footer-brand { display: inline-flex; align-items: center; gap: .55rem; color: #fff; font-size: 1.05rem; }
.footer-contacts { margin: 0; font-size: .98rem; display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.footer-contacts a { color: #fff; text-decoration: none; font-weight: 600; }
.footer-contacts a:hover { text-decoration: underline; }
.footer-legal { margin: 0; font-size: .82rem; }
.footer-legal a { color: rgba(255,255,255,.75); }
