:root {
  /* Brand: blu per i testi, oro per i dettagli */
  --navy: #13294b;        /* testo principale e titoli */
  --navy-2: #1d3a6e;      /* pulsanti e superfici blu */
  --navy-deep: #0c1c36;   /* sezioni scure e footer */
  --ink-soft: #4a5873;    /* testo secondario */
  --gold: #c9a24b;        /* dettagli, linee, icone */
  --gold-bright: #e2c27a; /* oro su sfondo blu */
  --gold-deep: #8a6a1f;   /* oro per piccoli testi su sfondo chiaro */
  --gold-soft: #f5edda;   /* sfondi delle icone */
  --bg: #faf8f3;
  --bg-alt: #f0f2f7;
  --surface: #ffffff;
  --line: #e4e0d4;
  --ok: #2f7a4f;
  --error: #a8402a;
  --radius: 14px;
  --shadow: 0 14px 34px rgba(19, 41, 75, .10);
  --serif: "Fraunces", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--navy);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: var(--navy-2); }
::selection { background: var(--gold-bright); color: var(--navy-deep); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; color: var(--navy); }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* Etichetta sopra i titoli, con filetto oro */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 600;
  color: var(--gold-deep); margin-bottom: .9em;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--gold); border-radius: 2px; }

/* Parola evidenziata nel titolo principale */
.hl { position: relative; white-space: nowrap; }
.hl::after {
  content: ""; position: absolute; left: -2px; right: -2px; bottom: .06em; height: .2em;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  border-radius: 3px; z-index: -1; opacity: .75;
}
.hero-copy h1 { position: relative; z-index: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font: 600 1rem/1 var(--sans);
  padding: .95em 1.5em; border-radius: 999px; border: 2px solid var(--navy-2);
  background: var(--navy-2); color: #fff; text-decoration: none; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s, transform .15s, box-shadow .2s;
}
.btn:hover { background: var(--navy); border-color: var(--gold); box-shadow: 0 6px 18px rgba(19, 41, 75, .22); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn-ghost { background: transparent; color: var(--navy-2); border-color: var(--navy-2); }
.btn-ghost:hover { background: transparent; color: var(--navy); border-color: var(--gold); box-shadow: none; }
.btn-small { padding: .7em 1.1em; font-size: .9rem; }
.btn-large { padding: 1.1em 2.1em; font-size: 1.1rem; }
.btn-gold, .btn-light {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: var(--navy-deep); border-color: transparent;
}
.btn-gold:hover, .btn-light:hover {
  background: linear-gradient(135deg, #ecd39a, var(--gold-bright));
  border-color: transparent; color: var(--navy-deep);
  box-shadow: 0 10px 28px rgba(201, 162, 75, .35);
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 248, 243, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .6; }
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.brand em { font-style: normal; color: var(--gold-deep); }
.brand-mark { width: 28px; height: 28px; color: var(--gold); }
.main-nav { display: flex; gap: 22px; margin-left: auto; }
.main-nav a { position: relative; color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 500; padding: 4px 0; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--gold); transform: scaleX(0); transition: transform .2s; }
.main-nav a:hover { color: var(--navy); }
.main-nav a:hover::after { transform: scaleX(1); }

/* Hero */
.hero {
  padding: 72px 0 88px;
  background:
    radial-gradient(600px 380px at 85% 30%, rgba(201, 162, 75, .16), transparent 70%),
    radial-gradient(500px 300px at 0% 100%, rgba(29, 58, 110, .07), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--ink-soft); font-size: .95rem; }
.hero-points li { padding-left: 26px; position: relative; }
.hero-points li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 8px; border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg); }

/* Illustrazione: palazzo veneziano di sera, finestre illuminate d'oro */
.hero-art { filter: drop-shadow(0 24px 40px rgba(19, 41, 75, .25)); }
.arches { width: 100%; height: auto; }
.art-bg { fill: var(--navy-deep); }
.art-facade rect { fill: var(--navy-2); }
.art-windows path { fill: var(--gold-bright); }
.art-windows .door { fill: var(--gold); }
.art-water path { fill: var(--navy); opacity: 1; }
.art-water .wave { fill: none; stroke: var(--gold); stroke-width: 2; opacity: .8; }
.art-tool circle { fill: var(--gold); }
.art-tool path { fill: none; stroke: var(--navy-deep); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p:last-child { color: var(--ink-soft); }

.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.service {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.service::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(201, 162, 75, .5); }
.service:hover::before { transform: scaleX(1); }
.service p { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.service-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--navy-2); display: grid; place-items: center; margin-bottom: 16px; transition: background .25s; }
.service-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--gold-bright); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.service:hover .service-icon { background: var(--navy-deep); }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.two-col > div > p { color: var(--ink-soft); }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.feature-list li { background: var(--surface); border-radius: var(--radius); padding: 20px 22px; border-left: 4px solid var(--gold); box-shadow: 0 2px 10px rgba(19, 41, 75, .04); }
.feature-list strong { display: block; margin-bottom: 4px; color: var(--navy); }
.feature-list span { color: var(--ink-soft); font-size: .95rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; }
.steps::before { content: ""; position: absolute; top: 24px; left: 24px; right: 24px; height: 0; border-top: 2px dashed rgba(201, 162, 75, .55); }
.steps li { position: relative; }
.step-num {
  position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--navy-2); color: var(--gold-bright); font-family: var(--serif); font-size: 1.25rem;
  margin-bottom: 16px; box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px var(--gold);
}
.steps p { color: var(--ink-soft); font-size: .95rem; }

.zones { display: flex; flex-wrap: wrap; gap: 10px; }
.zone { padding: .55em 1em; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 500; font-size: .95rem; color: var(--navy); }
.zone-main { background: var(--navy-2); border-color: var(--navy-2); color: #fff; display: inline-flex; align-items: center; gap: 8px; }
.zone-main::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-bright); }
.zone-maybe { border-style: dashed; border-color: var(--gold); color: var(--ink-soft); }

details { border-bottom: 1px solid var(--line); padding: 18px 0; }
summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; color: var(--navy); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--gold); font-size: 1.5rem; line-height: 1; transition: transform .2s; }
details[open] summary::after { content: "–"; }
summary:hover { color: var(--navy-2); }
details p { color: var(--ink-soft); margin: 12px 0 0; }

/* Chiamata finale: blu pieno con riflessi oro */
.cta {
  position: relative; overflow: hidden;
  background:
    radial-gradient(500px 260px at 50% 0%, rgba(226, 194, 122, .22), transparent 70%),
    linear-gradient(160deg, var(--navy-2), var(--navy-deep));
  color: #fff; padding: 104px 0; text-align: center;
}
.cta::before, .cta::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); width: 80px; height: 2px; background: var(--gold); }
.cta::before { top: 44px; }
.cta::after { bottom: 44px; }
.cta-inner { max-width: 720px; position: relative; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255, 255, 255, .82); font-size: 1.1rem; }
.cta .btn { margin-top: 12px; }
.cta-note { font-size: .9rem !important; margin-top: 14px; color: var(--gold-bright) !important; opacity: .9; }

.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, .72); padding: 36px 0; font-size: .9rem; border-top: 2px solid var(--gold); }
.site-footer strong { color: var(--gold-bright); font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--gold-bright); }
.site-footer p { margin: 4px 0 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* Wizard */
.wizard-backdrop { position: fixed; inset: 0; background: rgba(12, 28, 54, .65); z-index: 100; display: grid; place-items: center; padding: 16px; }
.wizard-backdrop[hidden] { display: none; }
.wizard { position: relative; background: var(--surface); width: 100%; max-width: 620px; max-height: calc(100vh - 32px); overflow-y: auto; border-radius: 20px; padding: 36px 32px 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); border-top: 4px solid var(--gold); }
.wizard-close { position: absolute; top: 12px; right: 14px; border: 0; background: none; font-size: 2rem; line-height: 1; color: var(--ink-soft); cursor: pointer; padding: 4px 8px; }
.wizard-close:hover { color: var(--navy); }
.wizard-progress { height: 6px; background: var(--bg-alt); border-radius: 99px; overflow: hidden; margin-bottom: 10px; }
.wizard-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); transition: width .3s; }
.wizard-count { font-size: .8rem; color: var(--gold-deep); font-weight: 600; letter-spacing: .04em; margin-bottom: 18px; }
.wizard h3 { font-size: 1.45rem; margin-bottom: .3em; }
.wizard .hint { color: var(--ink-soft); font-size: .95rem; margin-bottom: 18px; }

.options { display: grid; gap: 10px; }
.options.cols-2 { grid-template-columns: 1fr 1fr; }
.option { position: relative; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option label { display: block; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 500; color: var(--navy); transition: border-color .15s, background .15s; }
.option label small { display: block; font-weight: 400; color: var(--ink-soft); font-size: .85rem; margin-top: 2px; }
.option label:hover { border-color: var(--gold); }
.option input:checked + label { border-color: var(--navy-2); background: rgba(29, 58, 110, .06); box-shadow: inset 0 0 0 1px var(--navy-2), inset 4px 0 0 var(--gold); }
.option input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 500; font-size: .92rem; margin-bottom: 6px; color: var(--navy); }
.field input, .field textarea, .field select { width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--navy); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 75, .18); }
.field textarea { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-soft); }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--navy-2); }

.wizard-error { color: var(--error); font-weight: 500; font-size: .92rem; min-height: 1.4em; margin: 12px 0 0; }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; }
.wizard-nav .btn { min-width: 120px; }

.wizard-result { text-align: center; padding: 12px 0; }
.wizard-result .icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; font-size: 1.8rem; }
.wizard-result .icon.ok { background: var(--navy-2); color: var(--gold-bright); box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--gold); }
.wizard-result .icon.no { background: var(--gold-soft); color: var(--gold-deep); }
.wizard-result p { color: var(--ink-soft); }
.wizard-result .btn { margin: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Responsive */
@media (max-width: 960px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .main-nav { display: none; }
  .header-inner .btn { margin-left: auto; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 40px 0 56px; }
  .hero-grid, .two-col { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { max-width: 340px; }
  .section { padding: 60px 0; }
  .services, .steps { grid-template-columns: 1fr; }
  .options.cols-2 { grid-template-columns: 1fr; }
  .wizard { padding: 32px 20px 22px; }
  .brand span { font-size: .95rem; }
}
@media (max-width: 520px) {
  .header-inner > .btn { display: none; }
  .hl { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
.site-footer .footer-login { opacity: .7; font-size: .85rem; }
.site-footer .footer-login:hover { opacity: 1; }
