/* ==========================================================
   NautiFix — foglio di stile principale
   Palette: blu profondo, celeste, verde acqua
   ========================================================== */
:root {
  --navy: #07324f;
  --blue: #0a4d7a;
  --ocean: #0a6ea8;
  --sky: #4fc3f7;
  --sky-soft: #e6f6fd;
  --teal: #18b6a0;
  --teal-dark: #0f8f7e;
  --sun: #ffc94a;
  --ink: #0d2236;
  --muted: #5b7186;
  --line: #d9e6ef;
  --bg: #ffffff;
  --bg-alt: #f3f9fc;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(7, 50, 79, .10);
  --shadow-lg: 0 24px 60px rgba(7, 50, 79, .18);
  --grad: linear-gradient(120deg, var(--ocean), var(--teal));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ocean); text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }

.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .7em 1.3em; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(24, 182, 160, .35); }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(24, 182, 160, .45); }
.btn-light { background: #fff; color: var(--blue); box-shadow: var(--shadow); }
.btn-ghost { border-color: var(--line); color: var(--blue); background: transparent; }
.btn-lg { padding: .9em 1.6em; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(217, 230, 239, .7);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: .55rem; font-size: 1.45rem; color: var(--blue); font-weight: 600; }
.brand strong { color: var(--teal); font-weight: 800; }
.brand.light { color: #fff; }
.menu { display: flex; align-items: center; gap: 1.2rem; }
.menu > a:not(.btn) { color: var(--ink); font-weight: 600; font-size: .95rem; position: relative; }
.menu > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 2px; width: 0;
  background: var(--teal); transition: width .2s;
}
.menu > a:not(.btn):hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--blue); transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #dff4fd 0%, #bfe9f9 45%, #8fd8f2 100%);
  padding: 72px 0 150px;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.sun {
  position: absolute; top: 60px; right: 8%; width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, #ffe08a 0%, var(--sun) 55%, rgba(255, 201, 74, 0) 72%);
  animation: glow 6s ease-in-out infinite;
}
@keyframes glow { 50% { transform: scale(1.08); } }
.waves { position: absolute; bottom: 0; left: 0; width: 200%; height: 220px; animation: drift 18s linear infinite; }
.waves .w1 { fill: var(--sky); opacity: .45; }
.waves .w2 { fill: var(--ocean); opacity: .55; }
.waves .w3 { fill: var(--teal); opacity: .9; }
@keyframes drift { to { transform: translateX(-25%); } }

.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.pill {
  display: inline-block; padding: .35em .9em; border-radius: 999px;
  background: rgba(255, 255, 255, .75); color: var(--blue); font-weight: 600; font-size: .9rem;
  box-shadow: 0 4px 12px rgba(7, 50, 79, .08); margin-bottom: 1rem;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; color: var(--navy); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: #234a66; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6rem 0 2rem; }
.hero-stats { list-style: none; padding: 0; margin: 0; display: flex; gap: 2rem; flex-wrap: wrap; }
.hero-stats strong { display: block; font-size: 1.7rem; color: var(--navy); }
.hero-stats span { font-size: .88rem; color: #2f5876; }

.quick-card {
  background: #fff; border-radius: 24px; padding: 28px; box-shadow: var(--shadow-lg);
  display: grid; gap: 14px;
}
.quick-card h2 { font-size: 1.3rem; color: var(--navy); }
.quick-card label, .form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--ink); }
select, input, textarea {
  font: inherit; font-weight: 400; width: 100%; padding: .75em .9em;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(24, 182, 160, .15); }
.invalid { border-color: #e5484d !important; }
.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.field legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: 6px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  text-align: center; padding: .6em .3em; border: 1.5px solid var(--line); border-radius: 10px;
  font-weight: 600; font-size: .85rem; cursor: pointer; transition: .15s;
}
.seg input:checked + label { border-color: var(--teal); background: #e8f8f5; color: var(--teal-dark); }
.seg input:focus-visible + label { box-shadow: 0 0 0 4px rgba(24, 182, 160, .2); }
.fine { font-size: .82rem; color: var(--muted); margin: 0; text-align: center; }

/* ---------- Trust bar ---------- */
.trust { background: var(--navy); color: #d5ecf7; }
.trust-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 18px 0; font-weight: 600; font-size: .95rem; }
.trust-row span {
  display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 8px;
  border-radius: 50%; background: rgba(24, 182, 160, .25); color: #6ff0dc;
}

/* ---------- Sezioni ---------- */
.section { padding: 96px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.section-head h2, .split h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); color: var(--navy); }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.eyebrow {
  display: inline-block; font-weight: 800; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal-dark); margin-bottom: .6rem;
}
.eyebrow.light { color: #8ff3e3; }

/* Cards servizi */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: transform .2s, box-shadow .2s, border-color .2s; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--grad);
  transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card .icon {
  width: 56px; height: 56px; display: grid; place-items: center; font-size: 1.7rem;
  border-radius: 16px; background: var(--sky-soft); margin-bottom: 16px;
}
.card h3 { font-size: 1.2rem; color: var(--navy); }
.card p { color: var(--muted); font-size: .97rem; }
.link { font-weight: 700; color: var(--teal-dark); }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: s; }
.steps li { position: relative; background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.steps .num {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--grad); color: #fff; font-weight: 800; font-size: 1.15rem; margin-bottom: 14px;
}
.steps h3 { font-size: 1.1rem; color: var(--navy); }
.steps p { color: var(--muted); margin: 0; font-size: .95rem; }

/* Split layout */
.split { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.split.center { align-items: center; }
.checks { list-style: none; padding: 0; margin: 1.2rem 0 1.8rem; display: grid; gap: .55rem; }
.checks li { padding-left: 2rem; position: relative; }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: .1em; width: 1.35rem; height: 1.35rem; border-radius: 50%;
  display: grid; place-items: center; font-size: .8rem; font-weight: 800; color: #fff; background: var(--teal);
}

/* Dashboard mockup */
.dash { border-radius: 22px; background: #fff; box-shadow: var(--shadow-lg); overflow: hidden; border: 1px solid var(--line); }
.dash-top { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: #eef5f9; border-bottom: 1px solid var(--line); }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff6159; } .dot.y { background: #ffbd2e; } .dot.g { background: #28c941; }
.dash-url { margin-left: 12px; font-size: .78rem; color: var(--muted); background: #fff; padding: 3px 12px; border-radius: 8px; }
.dash-body { padding: 22px; background: linear-gradient(180deg, #f7fcff, #fff); }
.boat-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.boat-head h4 { margin: 0; font-size: 1.15rem; color: var(--navy); }
.boat-head p { margin: 0; font-size: .85rem; color: var(--muted); }
.boat-avatar { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; background: var(--grad); }
.badge { margin-left: auto; font-size: .75rem; font-weight: 700; padding: .35em .8em; border-radius: 999px; }
.badge.ok { background: #e3f8f4; color: var(--teal-dark); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fff; }
.tile.wide { grid-column: span 2; }
.tile small { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-bottom: 4px; }
.tile strong { display: block; color: var(--navy); font-size: .98rem; }
.tile > span { font-size: .82rem; color: var(--muted); }
.tile .warn, .tag.warn { color: #b8620b; }
.bar { height: 8px; border-radius: 99px; background: #e7f1f6; margin: 8px 0 10px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--grad); border-radius: inherit; }
.mini { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; font-size: .86rem; }
.tag { display: inline-block; min-width: 58px; font-size: .72rem; font-weight: 700; padding: .15em .6em; margin-right: 8px; border-radius: 6px; background: #eaf3f8; color: var(--blue); text-align: center; }
.tag.warn { background: #fff1de; }
.tag.ok { background: #e3f8f4; color: var(--teal-dark); }

/* Form richiesta */
.form { display: grid; gap: 16px; }
#request-form { background: #fff; padding: 36px; border-radius: 24px; box-shadow: var(--shadow); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .9rem; color: var(--muted); }
.form label.check input { width: auto; margin-top: .3em; accent-color: var(--teal); }
.form-msg { margin: 0; font-weight: 600; min-height: 1.2em; }
.form-msg.ok { color: var(--teal-dark); }
.form-msg.err { color: #c62f35; }

/* Zone */
.zones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.zone {
  padding: 26px; border-radius: var(--radius); color: #fff; position: relative; overflow: hidden; min-height: 210px;
  background: linear-gradient(160deg, var(--ocean), var(--navy));
}
.zone:nth-child(2) { background: linear-gradient(160deg, var(--teal), var(--blue)); }
.zone:nth-child(3) { background: linear-gradient(160deg, #2a9fd8, var(--blue)); }
.zone:nth-child(4) { background: linear-gradient(160deg, #20c7a8, var(--ocean)); }
.zone::after {
  content: ""; position: absolute; left: -10%; right: -10%; bottom: -30px; height: 80px;
  background: rgba(255, 255, 255, .12); border-radius: 50%;
}
.zone-pin { font-size: 1.5rem; }
.zone h3 { margin-top: .6rem; font-size: 1.15rem; }
.zone p { opacity: .88; font-size: .93rem; margin: 0; }

/* CTA bands */
.cta-band { background: var(--grad); color: #fff; padding: 80px 0; }
.cta-band h2 { color: #fff !important; }
.cta-band p { color: rgba(255, 255, 255, .9); font-size: 1.08rem; }
.cta-actions { display: flex; justify-content: flex-end; }
.app-band { background: var(--sky-soft); padding: 64px 0; }
.app-band h2 { font-size: 1.8rem; color: var(--navy); }
.app-band p { margin: 0; color: var(--muted); }
.inline-form { display: flex; gap: 10px; justify-content: flex-end; }
.inline-form input { max-width: 320px; border-radius: 999px; padding-inline: 1.2em; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 18px 4px; }
summary {
  cursor: pointer; font-weight: 700; font-size: 1.08rem; color: var(--navy); list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.5rem; color: var(--teal); transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); margin: .8rem 0 0; }

/* Footer */
.site-footer { background: var(--navy); color: #a9c7da; padding: 64px 0 24px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
.foot-grid h4 { color: #fff; font-size: 1rem; }
.foot-grid a:not(.brand), .foot-grid span { display: block; color: #a9c7da; margin-bottom: .45rem; font-size: .93rem; }
.foot-grid a:not(.brand):hover { color: #fff; }
.foot-grid p { margin-top: 1rem; font-size: .93rem; }
.foot-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem;
}
.foot-bottom a { color: #a9c7da; }

/* Modale */
.modal {
  border: 0; border-radius: 24px; padding: 32px; width: min(420px, 100% - 32px);
  box-shadow: var(--shadow-lg); position: relative;
}
.modal::backdrop { background: rgba(7, 50, 79, .55); backdrop-filter: blur(4px); }
.modal-close-form { position: absolute; top: 10px; right: 14px; }
.modal-x { border: 0; background: none; font-size: 1.8rem; color: var(--muted); cursor: pointer; line-height: 1; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-alt); border-radius: 12px; padding: 4px; margin: 8px 0 20px; }
.tabs button { border: 0; background: none; font: inherit; font-weight: 700; padding: .6em; border-radius: 9px; color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--navy); box-shadow: 0 2px 8px rgba(7, 50, 79, .08); }
.modal .fine { margin-top: 16px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 200%); z-index: 100;
  background: var(--navy); color: #fff; padding: 14px 22px; border-radius: 14px; box-shadow: var(--shadow-lg);
  font-weight: 600; transition: transform .3s ease, visibility .3s; max-width: calc(100% - 32px); visibility: hidden;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }

/* Animazioni on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps, .zones { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .menu {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; padding: 12px 16px 20px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    display: none;
  }
  .menu.open { display: flex; }
  .menu > a:not(.btn) { padding: .8em 0; border-bottom: 1px solid var(--line); }
  .menu .btn { margin-top: 10px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 900px) {
  .hero { padding: 48px 0 140px; }
  .hero-grid, .split { grid-template-columns: 1fr; gap: 36px; }
  .sun { width: 90px; height: 90px; top: 24px; right: 4%; }
  .trust-row { grid-template-columns: 1fr 1fr; }
  .cta-actions, .inline-form { justify-content: flex-start; }
}
@media (max-width: 600px) {
  .section { padding: 64px 0; }
  .cards, .steps, .zones, .row, .foot-grid { grid-template-columns: 1fr; }
  .trust-row { grid-template-columns: 1fr; gap: 10px; }
  .dash-grid { grid-template-columns: 1fr; }
  .tile.wide { grid-column: auto; }
  .badge { margin-left: 0; }
  #request-form { padding: 22px; }
  .inline-form { flex-direction: column; }
  .inline-form input { max-width: none; }
  .hero-stats { gap: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
