  @font-face { font-family: "Copperplate"; src: url("../fonts/copperplate-heavy.otf") format("opentype"); font-display: swap; }
  @font-face { font-family: "Lato"; src: url("../fonts/lato-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
  @font-face { font-family: "Lato"; src: url("../fonts/lato-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

  /* Colori del sito Joomla attuale: nero, rosso, bianco, grigio chiaro */
  :root {
    --black: #000000;
    --red: #ff0000;
    --white: #ffffff;
    --grey: #e0e0e0;
    --ink: #1a1a1a;
    --muted: #d6d6d6;
    --display: "Copperplate", "Copperplate Gothic Bold", Georgia, serif;
    --text: "Lato", "Segoe UI", Arial, sans-serif;
    --gutter: 20px;
    --section-y: 48px;
  }
  @media (min-width: 720px) { :root { --gutter: 32px; --section-y: 72px; } }

  * { box-sizing: border-box; margin: 0; padding: 0; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
  body { font-family: var(--text); background: var(--grey); color: var(--ink); font-size: 16px; line-height: 1.6; overflow-x: hidden; }
  a { color: inherit; text-decoration: none; }
  img { display: block; max-width: 100%; height: auto; }
  button { font: inherit; }
  .wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

  /* Icone social (SVG inline, colore dal testo) */
  .ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .ico.fill { fill: currentColor; stroke: none; }

  /* Barra superiore nera */
  .topbar { background: var(--black); color: var(--red); }
  .topbar .wrap { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
  .topbar .logo img { width: min(240px, 62vw); }
  .socials { display: flex; gap: 12px; align-items: center; }
  .socials a {
    width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--red); border-radius: 50%; color: var(--red); transition: background .2s, color .2s;
  }
  .socials a:hover, .socials a:focus-visible { background: var(--red); color: var(--black); }
  .topbar .extra { display: none; }

  /* Navigazione bianca */
  .nav { background: var(--white); border-bottom: 3px solid var(--red); position: sticky; top: 0; z-index: 30; }
  .nav .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
  .nav ul { display: none; list-style: none; }
  .nav a.item {
    display: inline-block; font-family: var(--display); font-size: 14px; text-transform: uppercase; letter-spacing: .04em;
    color: #000; padding: 6px 0; border-bottom: 2px solid transparent;
  }
  .nav a.item:hover, .nav a.item:focus-visible, .nav a.item.on { color: var(--red); border-bottom-color: var(--red); }
  .menu-btn {
    display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px;
    background: none; border: 0; color: #000; font-family: var(--display); font-size: 14px; text-transform: uppercase; letter-spacing: .06em; cursor: pointer;
  }
  .menu-btn .bars { width: 24px; height: 16px; position: relative; }
  .menu-btn .bars span { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); transition: transform .25s, opacity .25s; }
  .menu-btn .bars span:nth-child(1) { top: 0; }
  .menu-btn .bars span:nth-child(2) { top: 7px; }
  .menu-btn .bars span:nth-child(3) { bottom: 0; }
  .nav.open .menu-btn .bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .menu-btn .bars span:nth-child(2) { opacity: 0; }
  .nav.open .menu-btn .bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Menu a tendina su mobile e tablet */
  .mobile-menu { display: none; }
  .nav.open .mobile-menu { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border-bottom: 3px solid var(--red); box-shadow: 0 16px 30px rgba(0,0,0,.35); }
  .mobile-menu a { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 var(--gutter); font-family: var(--display); text-transform: uppercase; font-size: 16px; color: #000; border-bottom: 1px solid #e6e6e6; }
  .mobile-menu a:hover, .mobile-menu a:focus-visible { color: var(--red); }
  .mobile-menu a::after { content: "›"; color: var(--red); font-size: 22px; }

  /* Hero con la foto dell'officina */
  .hero {
    position: relative; min-height: min(78svh, 760px); display: flex; align-items: center; color: var(--white); overflow: hidden;
    background: #000 url("../img/home_corousel_composito_00.webp") 60% center / cover no-repeat;
    padding: 56px 0;
  }
  .hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.6) 55%, rgba(0,0,0,.25) 100%); }
  .hero .wrap { position: relative; z-index: 1; }
  .hero h1 { font-family: var(--display); font-size: clamp(30px, 7vw, 68px); line-height: 1.08; text-transform: uppercase; max-width: 16ch; }
  .hero h1 span { color: var(--red); }
  .hero p { font-size: clamp(16px, 1.8vw, 20px); max-width: 52ch; margin-top: 16px; color: #f2f2f2; }

  .btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
  .btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px;
    font-family: var(--display); text-transform: uppercase; font-size: 14px; letter-spacing: .06em; text-align: center;
    border: 2px solid var(--red); background: var(--red); color: var(--white); transition: background .2s, color .2s, border-color .2s;
  }
  .btn:hover, .btn:focus-visible { background: var(--black); border-color: var(--black); }
  .btn.ghost { background: transparent; color: var(--white); border-color: var(--white); }
  .btn.ghost:hover, .btn.ghost:focus-visible { background: var(--white); color: var(--black); }

  /* Sezioni */
  section { padding: var(--section-y) 0; }
  .title { font-family: var(--display); font-size: clamp(24px, 4vw, 36px); text-transform: uppercase; text-align: center; color: #000; }
  .title::after { content: ""; display: block; width: 72px; height: 3px; background: var(--red); margin: 14px auto 0; }
  .intro { text-align: center; max-width: 680px; margin: 22px auto 0; color: var(--ink); font-size: clamp(16px, 2vw, 18px); line-height: 1.65; }

  .cards { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 36px; }
  .card { background: var(--black); color: var(--white); position: relative; overflow: hidden; border-top: 4px solid var(--red); display: flex; flex-direction: column; }
  .card .img { height: 180px; background: #111 center / cover no-repeat; }
  .card .body { padding: 22px 22px 26px; display: flex; flex-direction: column; flex: 1; }
  .card h3 { font-family: var(--display); font-size: 19px; text-transform: uppercase; color: var(--red); }
  .card p { font-size: 15px; color: var(--muted); margin-top: 8px; }
  .card a.more { align-self: flex-start; margin-top: auto; padding-top: 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--white); border-bottom: 1px solid var(--red); }
  .card a.more:hover, .card a.more:focus-visible { color: var(--red); }
  .card.carbon .img { background-image: url("../img/carbon.webp"); }
  .card.officina .img { background-image: url("../img/02home_Miuraracing.webp"); }

  /* Reparto corse */
  .corse { background: var(--black); color: var(--white); }
  .corse .wrap { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
  .corse .photo { aspect-ratio: 16 / 10; background: #111 url("../img/Fornasari_Home_PirelliCUP.webp") center / cover no-repeat; border: 3px solid var(--red); }
  .corse h2 { font-family: var(--display); font-size: clamp(26px, 4vw, 40px); text-transform: uppercase; line-height: 1.1; }
  .corse h2 span { color: var(--red); }
  .corse p { color: var(--muted); margin-top: 14px; font-size: 17px; }
  .corse .pirelli { width: min(200px, 50vw); margin-top: 22px; }
  .corse .note { font-size: 13px; color: #9a9a9a; margin-top: 16px; text-transform: uppercase; letter-spacing: .1em; }

  /* Sponsor */
  .sponsors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 32px; }
  .sponsors span { background: var(--white); border: 1px solid #bbb; padding: 18px 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: #555; text-align: center; }

  /* Contatti */
  footer { background: var(--black); color: var(--white); padding: 48px 0 28px; border-top: 4px solid var(--red); }
  .foot { display: grid; grid-template-columns: 1fr; gap: 28px; }
  footer h4 { font-family: var(--display); color: var(--red); font-size: 15px; text-transform: uppercase; margin-bottom: 10px; letter-spacing: .06em; }
  footer p, footer li { font-size: 15px; color: var(--muted); list-style: none; }
  footer ul { padding: 0; }
  footer li + li { margin-top: 6px; }
  footer a:hover, footer a:focus-visible { color: var(--red); }
  footer .socials { justify-content: flex-start; }
  .legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: #8a8a8a; }
  .legal a:hover, .legal a:focus-visible { color: var(--red); }

  /* Tablet */
  @media (min-width: 600px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
    .sponsors { grid-template-columns: repeat(3, 1fr); }
    .legal { flex-direction: row; justify-content: space-between; }
  }

  /* Desktop piccolo e tablet orizzontale: menu completo */
  @media (min-width: 960px) {
    .topbar .wrap { grid-template-columns: 1fr auto 1fr; justify-items: stretch; padding-top: 18px; padding-bottom: 18px; }
    .topbar .logo { justify-self: center; }
    .topbar .socials { justify-self: start; }
    .topbar .extra { display: flex; justify-content: flex-end; align-items: center; gap: 16px; }
    .topbar .extra a { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--white); }
    .topbar .extra a:hover { color: var(--red); }
    .topbar .logo img { width: 260px; }
    .nav ul { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 26px; }
    .nav .wrap { justify-content: center; }
    .menu-btn { display: none; }
    .mobile-menu { display: none !important; }
    .cards { grid-template-columns: repeat(3, 1fr); }
    .hero { padding: 80px 0; }
    .corse .wrap { grid-template-columns: 1fr 1fr; gap: 48px; }
    .foot { grid-template-columns: 1.2fr 1fr 1fr; }
    .sponsors { grid-template-columns: repeat(5, 1fr); }
  }

  /* Mobile: pulsanti a tutta larghezza, pochi elementi, testi leggibili */
  @media (max-width: 599px) {
    .btns .btn { width: 100%; }
    .hero { background-position: 68% center; min-height: 82svh; }
    .hero::before { background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.85) 100%); }
  }

  @media (hover: none) {
    .card:active { transform: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
  }

  /* Modulo di contatto */
  .contatti-form { background: var(--grey); padding-bottom: 80px; }
  .contact { display: grid; gap: 16px; margin-top: 32px; max-width: 760px; margin-left: auto; margin-right: auto; }
  .contact .field { display: flex; flex-direction: column; gap: 6px; }
  .contact .field.full { grid-column: 1 / -1; }
  .contact label { font-family: var(--display); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #000; }
  .contact label .opt { font-family: var(--text); text-transform: none; color: var(--grey-dark, #6a6a6a); font-weight: 400; }
  .contact input[type="text"], .contact input[type="email"], .contact input[type="tel"], .contact select, .contact textarea {
    font: inherit; font-size: 16px; padding: 12px 14px; border: 1.5px solid #9a9a9a; border-radius: 0; background: #fff; color: #111; width: 100%; min-height: 48px;
  }
  .contact textarea { min-height: 140px; resize: vertical; }
  .contact input:focus, .contact select:focus, .contact textarea:focus { outline: 3px solid rgba(255,0,0,.35); outline-offset: 1px; border-color: var(--red); }
  .contact .check { flex-direction: row; align-items: flex-start; gap: 12px; }
  .contact .check input { margin-top: 4px; width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--red); }
  .contact .check label { font-family: var(--text); text-transform: none; font-size: 14px; letter-spacing: 0; font-weight: 400; }
  .contact .err { color: #b00014; font-size: 14px; }
  .contact button.btn { width: 100%; cursor: pointer; }
  .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
  .form-ok { text-align: center; margin-top: 24px; font-weight: 700; color: #000; border-left: 4px solid var(--red); background: #fff; padding: 14px 18px; max-width: 760px; margin-left: auto; margin-right: auto; }

  @media (min-width: 720px) {
    .contact { grid-template-columns: 1fr 1fr; }
    .contact button.btn { width: auto; justify-self: start; }
  }
