/* ============================================================
   LATINA SCHERMA — stylesheet
   Palette: navy / blue / sky / white / grey, gold as rare accent
   Display type: Barlow Condensed (technical, fast, "blade-like")
   Body type: Source Sans 3 (clean, readable)
   Signature motif: the fencing "piste" — nav bar reads as a strip
   viewed from above, with guard-line / warning-line tick marks.
   ============================================================ */

:root{
  --navy: #12213F;
  --navy-700: #1B2E52;
  --blue: #1D5FA8;
  --sky: #2E9BD6;
  --gold: #F2A93B;
  --white: #FFFFFF;
  --grey-50: #F5F7FA;
  --grey-100: #E8ECF1;
  --grey-300: #C4CCD6;
  --grey-500: #8B94A3;
  --grey-700: #4B5563;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;

  --container: 1180px;
  --radius: 4px;
  --shadow-soft: 0 4px 22px rgba(18, 33, 63, 0.08);
  --shadow-lift: 0 10px 30px rgba(18, 33, 63, 0.16);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ margin: 0; padding: 0; list-style: none; }
h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
  color: var(--navy);
  text-transform: uppercase;
}
h1{ font-size: clamp(2.2rem, 4vw, 3.4rem); letter-spacing: 0.02em; }
h2{ font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h3{ font-size: 1.3rem; }
p{ margin: 0 0 1em; color: var(--grey-700); }
.container{
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
:focus-visible{
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- eyebrow / kicker ---------- */
.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.6em;
}
.eyebrow::before{
  content: "";
  width: 26px; height: 2px;
  background: var(--gold);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header{
  background: var(--white);
  border-bottom: 1px solid var(--grey-100);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-top{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--container);
  margin: 0 auto;
  gap: 16px;
}
.brand{
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img{
  height: 70px;
  width: auto;
}
.brand-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  color: var(--navy);
  white-space: nowrap;
}
.header-spacer{ flex: 1; }
.header-cta{
  display: none;
}
@media (min-width: 1180px){
  .header-cta{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--blue);
    padding: 10px 18px;
    border-radius: var(--radius);
  }
  .header-cta:hover{ background: var(--navy); }
}

.header-docs{
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-docs a{
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--blue);
  white-space: nowrap;
  padding: 9px 16px;
  border: 1px solid var(--grey-300);
  border-radius: var(--radius);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.header-docs a:hover{
  color: var(--navy);
  border-color: var(--blue);
  background: var(--grey-50);
}
@media (max-width: 620px){
  .header-docs{ gap: 8px; }
  .header-docs a{ font-size: 0.7rem; padding: 8px 12px; }
}

/* ---------- piste nav ---------- */
.piste-nav{
  background: var(--navy);
  position: relative;
}
.piste-nav::before{ /* center line of the strip */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: rgba(255,255,255,0.08);
}
.piste-list{
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}
.piste-list::-webkit-scrollbar{ display: none; }
.piste-list li{
  position: relative;
  border-right: 1px solid rgba(255,255,255,0.08);
  flex: 0 0 auto;
}
.piste-list li:first-child{ border-left: 1px solid rgba(255,255,255,0.08); }
.piste-list a{
  display: block;
  padding: 15px 22px;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.82);
  white-space: nowrap;
  position: relative;
  transition: color 0.2s ease;
}
.piste-list a::after{ /* guard-line marker */
  content: "";
  position: absolute;
  left: 22px; right: 22px; bottom: 0;
  height: 3px;
  background: var(--sky);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.piste-list a:hover,
.piste-list a.active{ color: var(--white); }
.piste-list a:hover::after,
.piste-list a.active::after{ transform: scaleX(1); }
.piste-list a.active::after{ background: var(--gold); }

.nav-toggle{
  display: none;
  background: none;
  border: none;
  width: 42px; height: 42px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content: "";
  display: block;
  width: 24px; height: 2px;
  background: var(--navy);
  position: relative;
  transition: 0.2s ease;
}
.nav-toggle span::before{ position: absolute; top: -8px; }
.nav-toggle span::after{ position: absolute; top: 8px; }

@media (max-width: 720px){
  .nav-toggle{ display: inline-flex; }
  .piste-list{
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .piste-list.open{ max-height: 420px; overflow-y: auto; }
  .piste-list li{ border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .piste-list li:first-child{ border-left: none; }
}

/* ============================================================
   HERO / PAGE HEADER (for sub-pages)
   ============================================================ */
.page-hero{
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 60%, var(--blue) 130%);
  color: var(--white);
  padding: 64px 0 56px;
  position: relative;
  overflow: hidden;
}
.page-hero::after{
  content: "";
  position: absolute;
  right: -10%; bottom: -60%;
  width: 480px; height: 480px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 50%;
}
.page-hero h1{ color: var(--white); margin-bottom: 0.3em; }
.page-hero .eyebrow{ color: var(--sky); }
.page-hero .lead{
  color: rgba(255,255,255,0.82);
  max-width: 640px;
  font-size: 1.08rem;
}

/* ============================================================
   HOME HERO CAROUSEL
   ============================================================ */
.carousel{
  position: relative;
  overflow: hidden;
  background: var(--navy);
  aspect-ratio: 16 / 9;
  max-height: 620px;
}
.carousel-track{
  display: flex;
  height: 100%;
  transition: transform 0.7s cubic-bezier(.65,.05,.36,1);
}
.carousel-slide{
  flex: 0 0 100%;
  position: relative;
  height: 100%;
}
.carousel-slide svg{ width: 100%; height: 100%; display: block; }
.carousel-slide img{ width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-caption{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 40px 24px;
  background: linear-gradient(to top, rgba(10,17,33,0.78), transparent);
  color: var(--white);
}
.carousel-caption span{
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.carousel-dots{
  position: absolute;
  bottom: 18px; right: 32px;
  display: flex; gap: 8px;
}
.carousel-dots button{
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.7);
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.carousel-dots button.active{ background: var(--gold); border-color: var(--gold); }
.carousel-arrow{
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(10,17,33,0.35);
  border: none;
  color: var(--white);
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease;
}
.carousel-arrow:hover{ background: rgba(10,17,33,0.65); }
.carousel-arrow.prev{ left: 16px; }
.carousel-arrow.next{ right: 16px; }

/* ============================================================
   SPONSOR STRIP (sempre visibile, homepage, a coppie)
   ============================================================ */
.sponsor-strip-section{
  background: var(--grey-50);
  padding: 56px 0 64px;
  text-align: center;
}
.sponsor-strip-section .eyebrow{ justify-content: center; }
.sponsor-strip{
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 180px));
  justify-content: center;
  gap: 20px 24px;
}
.sponsor-strip-item{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.sponsor-strip-item img{
  width: 100%;
  height: 80px;
  object-fit: contain;
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius);
  padding: 8px;
}
.sponsor-strip-item span{
  font-size: 0.78rem;
  color: var(--grey-700);
  text-align: center;
}

/* ============================================================
   SECTIONS (generic)
   ============================================================ */
.section{ padding: 70px 0; }
.section.alt{ background: var(--grey-50); }
.section-head{ max-width: 640px; margin-bottom: 36px; }
.section-head.center{ margin-left: auto; margin-right: auto; text-align: center; }

.divider{
  height: 3px;
  width: 64px;
  background: linear-gradient(90deg, var(--sky), var(--gold));
  margin: 18px 0 34px;
  border-radius: 2px;
}
.divider.center{ margin-left: auto; margin-right: auto; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-primary{ background: var(--blue); color: var(--white); }
.btn-primary:hover{ background: var(--navy); }
.btn-outline{ border-color: var(--grey-300); color: var(--navy); background: transparent; }
.btn-outline:hover{ border-color: var(--blue); color: var(--blue); }
.btn-ghost{ color: var(--blue); padding-left: 0; padding-right: 0; }

/* ============================================================
   WEAPONS (le-armi.html)
   ============================================================ */
.weapon-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 860px){
  .weapon-grid{ grid-template-columns: repeat(3, 1fr); }
}
.weapon-card{
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
}
.weapon-card .art{
  background: var(--navy);
  aspect-ratio: 16/10;
}
.weapon-card .art svg{ width: 100%; height: 100%; }
.weapon-card .art img{ width: 100%; height: 100%; object-fit: cover; }
.weapon-card .body{ padding: 24px; flex: 1; display: flex; flex-direction: column; }
.weapon-card .tag{
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(29,95,168,0.08);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.weapon-card ul{ margin-top: 12px; }
.weapon-card ul li{
  padding-left: 18px;
  position: relative;
  font-size: 0.93rem;
  color: var(--grey-700);
  margin-bottom: 6px;
}
.weapon-card ul li::before{
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 8px; height: 2px;
  background: var(--sky);
}

/* ============================================================
   MAESTRI (i-maestri.html)
   ============================================================ */
.maestri-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 640px){ .maestri-grid{ grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px){ .maestri-grid{ grid-template-columns: repeat(3, 1fr); } }
.maestro-card{
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-soft);
  text-align: center;
}
.maestro-avatar{
  width: 96px; height: 96px;
  border-radius: 50%;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--blue), var(--sky));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.02em;
}
.maestro-card h3{ margin-bottom: 2px; }
.maestro-role{
  font-size: 0.85rem;
  color: var(--blue);
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.maestro-bio{ font-size: 0.93rem; text-align: left; }
.maestro-cv{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.85rem;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  border: 1px solid var(--grey-100);
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.maestro-cv:hover{ border-color: var(--blue); color: var(--navy); }

.maestro-role{
  font-size: 0.85rem;
  color: var(--blue);
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.maestro-contact{
  font-size: 0.85rem;
  color: var(--grey-700);
  margin-bottom: 12px;
}
/* ============================================================
   ORARI / TARIFFE (table)
   ============================================================ */
.table-wrap{
  overflow-x: auto;
  border: 1px solid var(--grey-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
table{
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  background: var(--white);
}
thead th{
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  text-align: left;
  padding: 14px 18px;
}
tbody td{
  padding: 14px 18px;
  border-bottom: 1px solid var(--grey-100);
  font-size: 0.95rem;
  color: var(--grey-700);
}
tbody tr:last-child td{ border-bottom: none; }
tbody tr:nth-child(even){ background: var(--grey-50); }

.price-note{
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--grey-500);
}

/* ============================================================
   RECLAMI (form + steps)
   ============================================================ */
.steps{
  display: grid;
  gap: 18px;
  margin-bottom: 8px;
}
.step{
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius);
}
.step .num{
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--sky);
  min-width: 34px;
}
.step h3{ margin-bottom: 4px; font-size: 1.05rem; }
.step p{ margin: 0; font-size: 0.93rem; }

.contact-form{
  display: grid;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}
.form-row{ display: grid; gap: 6px; }
.form-row label{
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--navy);
}
.form-row input, .form-row select, .form-row textarea{
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 14px;
  border: 1px solid var(--grey-300);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus{
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(29,95,168,0.14);
}
.form-note{ font-size: 0.85rem; color: var(--grey-500); }

/* ============================================================
   CHI SIAMO (timeline / storia)
   ============================================================ */
.story-layout{
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px){
  .story-layout{ grid-template-columns: 1.1fr 0.9fr; align-items: start; }
}
.value-list{ display: grid; gap: 18px; margin-top: 8px; }
.value-item{ display: flex; gap: 14px; }
.value-item .mark{
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  flex: none;
}
.value-item h3{ font-size: 1rem; margin-bottom: 3px; }
.value-item p{ font-size: 0.92rem; margin: 0; }

.stat-strip{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--grey-100);
  border: 1px solid var(--grey-100);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 28px;
}
.stat-strip div{
  background: var(--white);
  padding: 22px 16px;
  text-align: center;
}
.stat-strip strong{
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--blue);
}
.stat-strip span{
  font-size: 0.8rem;
  color: var(--grey-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay{
  position: fixed; inset: 0;
  background: rgba(12, 20, 38, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.modal-overlay.open{ display: flex; }
.modal{
  background: var(--white);
  border-radius: var(--radius);
  max-width: 560px;
  width: 100%;
  max-height: 84vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lift);
  position: relative;
}
.modal-head{
  position: sticky; top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-head h3{ color: var(--white); margin: 0; }
.modal-close{
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.modal-body{ padding: 22px 24px 26px; }
.modal-body iframe{ width: 100%; height: 60vh; border: 1px solid var(--grey-100); border-radius: var(--radius); }

.race-list{ display: grid; gap: 10px; }
.race-item{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--grey-100);
  border-radius: var(--radius);
  font-size: 0.92rem;
}
.race-item .date{
  font-family: var(--font-display);
  color: var(--blue);
  white-space: nowrap;
}
.sponsor-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.sponsor-item{
  border: 1px solid var(--grey-100);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.sponsor-item .logo-box{
  width: 100%; height: 150px;
  background: var(--grey-50);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--grey-500);
  font-family: var(--font-display);
  font-size: 0.75rem;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.sponsor-item span{ font-size: 0.85rem; color: var(--navy); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer{
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  padding-top: 60px;
}
.footer-grid{
  display: grid;
  gap: 40px;
  grid-template-columns: 1fr;
  padding-bottom: 40px;
}
@media (min-width: 860px){
  .footer-grid{ grid-template-columns: 1.2fr 0.9fr 0.9fr; }
}
.footer-grid h4{
  color: var(--white);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}
.footer-map{
  border: 0;
  width: 100%;
  height: 220px;
  border-radius: var(--radius);
  filter: grayscale(0.2);
}
.footer-address{ font-size: 0.92rem; margin-top: 12px; color: rgba(255,255,255,0.75); }
.footer-list{ display: grid; gap: 10px; font-size: 0.92rem; }
.footer-list a:hover{ color: var(--sky); }
.footer-social{ display: flex; gap: 12px; margin-top: 14px; }
.footer-social a{
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.footer-social a:hover{ background: var(--sky); border-color: var(--sky); }
.footer-bottom{
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.visually-hidden{
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}