/* ==========================================================================
   Scainetti Sail — foglio di stile
   ========================================================================== */

:root {
  --navy: #132A40;
  --navy-deep: #0B1B2B;
  --ivory: #FAF6EF;
  --sand: #F1E9D8;
  --terracotta: #B5502F;
  --terracotta-dark: #8F3D22;
  --teal: #4C7C82;
  --ink: #1D2733;
  --muted: #5B6672;
  --line: #DED5C1;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 0;
  line-height: 1.15;
  font-weight: 600;
}

p { margin: 0; }

a { color: var(--terracotta); }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

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

/* ---------- Bottoni ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  line-height: 1;
}

.btn-primary {
  background: var(--terracotta);
  color: #fff;
}
.btn-primary:hover { background: var(--terracotta-dark); }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: #fff; }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.12); border-color: #fff; }

.btn svg { flex-shrink: 0; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo span {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  margin: 0 auto 0 40px;
  padding: 0;
  list-style: none;
}
.main-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
}
.main-nav a:hover { color: var(--terracotta); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 880px) {
  .main-nav {
    position: absolute;
    top: 88px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--line);
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .2s ease;
  }
  .main-nav.is-open { max-height: 320px; }
  .main-nav li { width: 100%; }
  .main-nav a {
    display: block;
    padding: 16px 32px;
    border-top: 1px solid var(--line);
  }
  .header-cta { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */

.hero {
  padding: 72px 0;
  background: linear-gradient(180deg, #FAF6EF 0%, #F1E9D8 100%);
}
.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: 56px;
  align-items: center;
}
.hero-eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(34px, 4.2vw, 54px);
  margin-bottom: 20px;
}
.hero p.lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 28px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

.hero-photo {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(19,42,64,0.35);
  aspect-ratio: 13 / 14;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 880px) {
  .hero { padding: 40px 0 48px; }
  .hero .container { grid-template-columns: 1fr; gap: 28px; }
  .hero-photo { order: -1; aspect-ratio: 16 / 10; border-radius: 16px; }
  .hero-photo img { object-position: 50% 15%; }
}

/* ---------- Fascia statistiche ---------- */

.stats {
  background: var(--navy);
  padding: 32px 0;
}
.stats .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.stat {
  text-align: center;
  padding: 8px 44px;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.stat:last-child { border-right: none; }
.stat .num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: #fff;
}
.stat .label {
  font-size: 13px;
  color: #B9C2CC;
  margin-top: 4px;
}

@media (max-width: 640px) {
  .stat { padding: 8px 20px; border-right: none; }
}

/* ---------- Sezione generica ---------- */

.section { padding: 72px 0; }
.section-sand { background: var(--sand); }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(26px, 3vw, 32px); margin-bottom: 10px; }
.section-head p { color: var(--muted); font-size: 15.5px; }

/* ---------- Chi è Paolo ---------- */

.about .container {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 56px;
  align-items: center;
}
.about h2 { font-size: clamp(26px, 3vw, 34px); margin-bottom: 16px; }
.about p { color: var(--muted); font-size: 16.5px; line-height: 1.75; max-width: 480px; }

.credential-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.credential-card li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15.5px;
}
.credential-card ul { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.credential-card svg { flex-shrink: 0; color: var(--teal); }

@media (max-width: 880px) {
  .about .container { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Griglia servizi ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 22px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -18px rgba(19,42,64,0.25);
}
.service-icon {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--ivory);
  display: flex; align-items: center; justify-content: center;
  color: var(--terracotta);
}
.service-card h3 { font-size: 15.5px; font-family: var(--font-body); font-weight: 600; }
.service-card p { font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.service-card .linkarrow {
  color: var(--terracotta);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
}
.service-card .linkarrow:hover { color: var(--terracotta-dark); }

/* ---------- Banner CTA ---------- */

.banner {
  background: var(--navy-deep);
  color: #fff;
  padding: 48px 0;
}
.banner .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.banner h3 { color: #fff; font-size: clamp(22px, 3vw, 26px); margin-bottom: 8px; }
.banner p { color: #C7CDD3; font-size: 15px; max-width: 560px; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy);
  color: #EDE7DA;
  padding: 56px 0 0;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-brand { display: flex; flex-direction: column; gap: 14px; }
.footer-brand .logo span { color: #fff; }
.footer-brand p { font-size: 14px; line-height: 1.6; color: #C7C0AF; max-width: 280px; }
.footer-col { display: flex; flex-direction: column; gap: 14px; }
.footer-col .heading {
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #9CA3AF;
}
.footer-col a {
  color: #CFC9BC; text-decoration: none; font-size: 14px;
  display: flex; align-items: center; gap: 8px;
}
.footer-col a:hover { color: #fff; }
.footer-col span.muted { font-size: 14px; color: #C7C0AF; }

.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: space-between;
  padding: 20px 0;
  border-top: 1px solid rgba(237,231,218,0.15);
  font-size: 13px;
  color: rgba(237,231,218,0.55);
}

@media (max-width: 720px) {
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- Pagine interne: hero secondario ---------- */

.page-hero {
  background: var(--navy-deep);
  color: #fff;
  padding: 56px 0;
}
.breadcrumb { font-size: 13px; color: #B9C2CC; margin-bottom: 12px; }
.breadcrumb a { color: #B9C2CC; text-decoration: none; }
.breadcrumb a:hover { color: #fff; }
.page-hero h1 { color: #fff; font-size: clamp(28px, 3.6vw, 36px); margin-bottom: 10px; }
.page-hero p { color: #C7CDD3; font-size: 15.5px; max-width: 560px; }

/* ---------- Corso GMDSS ---------- */

.course-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.course-layout p { margin-bottom: 22px; font-size: 16px; line-height: 1.75; }
.course-layout p:last-of-type { margin-bottom: 0; }

.note-box {
  display: flex; align-items: center; gap: 10px;
  margin-top: 6px;
  padding: 14px 18px;
  background: var(--sand);
  border-radius: 12px;
  width: fit-content;
  color: var(--navy);
  font-size: 14px; font-weight: 500;
}
.note-box svg { flex-shrink: 0; color: var(--terracotta); }

.price-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.price-card .label { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.price-card .price {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 600; color: var(--navy);
}
.price-card .price small { font-size: 15px; font-weight: 400; color: var(--muted); }
.price-list {
  list-style: none; margin: 0; padding: 18px 0 0;
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px;
}
.price-list li { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.5; }
.price-list svg { flex-shrink: 0; margin-top: 2px; color: var(--teal); }

@media (max-width: 880px) {
  .course-layout { grid-template-columns: 1fr; gap: 32px; }
}

.topics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 40px;
  margin-top: 28px;
}
.topics-grid div { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.topics-grid svg { flex-shrink: 0; margin-top: 2px; color: var(--terracotta); }

@media (max-width: 640px) {
  .topics-grid { grid-template-columns: 1fr; }
}

/* ---------- Materiale didattico ---------- */

.material-list { display: flex; flex-direction: column; gap: 14px; margin: 28px 0; }
.material-row {
  display: flex; align-items: center; gap: 18px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 24px;
  transition: border-color .15s ease;
}
.material-row:hover { border-color: var(--terracotta); }
.material-row .service-icon { flex-shrink: 0; }
.material-row span { font-size: 15.5px; line-height: 1.5; }

/* ---------- Form contatti ---------- */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
@media (max-width: 880px) {
  .contact-layout { grid-template-columns: 1fr; gap: 32px; }
}

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-field { flex: 1 1 200px; display: flex; flex-direction: column; }
.form-field label {
  font-size: 13.5px; font-weight: 600; color: var(--navy); margin-bottom: 6px;
}
.form-field input, .form-field textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FBF9F4;
  color: var(--ink);
}
.form-field input:focus, .form-field textarea:focus {
  outline: 2px solid var(--terracotta);
  outline-offset: 1px;
}
.form-field.has-error input,
.form-field.has-error textarea { border-color: #B3261E; }
.field-error { font-size: 12.5px; color: #B3261E; margin-top: 4px; }

/* honeypot anti-spam: nascosto agli utenti, visibile ai bot */
.hp-field { position: absolute; left: -9999px; top: -9999px; }

.form-alert {
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14.5px;
  line-height: 1.5;
}
.form-alert.success { background: #E4F1E1; color: #1E4620; }
.form-alert.error { background: #FBE8E6; color: #7A1F17; }

.contact-side {
  display: flex; flex-direction: column; gap: 20px;
}
.contact-card {
  background: var(--navy); color: #fff;
  border-radius: 20px; padding: 32px;
  display: flex; flex-direction: column; gap: 16px;
}
.contact-card .heading {
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #9FB0BE;
}
.contact-card .whatsapp-row { display: flex; align-items: center; gap: 12px; }
.contact-card .whatsapp-row .icon-circle {
  width: 42px; height: 42px; border-radius: 999px;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-card .whatsapp-row .small { font-size: 13px; color: #B9C2CC; }
.contact-card .whatsapp-row .phone {
  font-family: var(--font-display); font-size: 20px; font-weight: 600;
}
.contact-card .note { font-size: 13.5px; line-height: 1.6; color: #B9C2CC; }

.contact-card-light {
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  padding: 28px; display: flex; align-items: center; gap: 14px;
}
.contact-card-light svg { flex-shrink: 0; color: var(--terracotta); }
.contact-card-light .title { font-size: 15px; font-weight: 600; color: var(--navy); }
.contact-card-light .sub { font-size: 13.5px; color: var(--muted); }
