/* Variante B – impostazione editoriale-sportiva (blocchi ispirati a projectinvictus.it),
   colore del marchio Arjus: il teal della maglia (#045a6e) per CTA, barre e footer. */
/* IBM Plex Sans (SIL Open Font License) ospitato sul sito: nessuna chiamata a Google Fonts.
   È un font variabile: un file per alfabeto copre i pesi 400–700. */
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --brand: #045a6e;            /* teal maglia – testo bianco 7.8:1 */
  --brand-hover: #034858;
  --brand-deep: #02323e;       /* sezioni scure */
  --brand-tint: #e8f2f4;
  --brand-light: #9fd8e4;      /* accento su teal/scuro */

  --bg: #ffffff;
  --bg-alt: #f6f7f7;
  --surface: #ffffff;
  --line: #e3e7e8;
  --line-strong: #c4ccce;
  --text: #2c2d33;             /* 13.0:1 su bianco */
  --heading: #111111;
  --muted: #5b6066;            /* 6.3:1 su bianco */

  --accent: var(--brand);
  --accent-hover: var(--brand-hover);
  --accent-deep: var(--brand);
  --on-accent: #ffffff;
  --accent-ink: var(--brand);  /* teal come testo – 7.8:1 su bianco */
  --focus: var(--brand);
  --hl: var(--brand);

  --paper: var(--brand-deep);
  --paper-surface: #063f4d;
  --paper-line: #0d5262;
  --paper-text: #ffffff;
  --paper-heading: #ffffff;
  --paper-muted: #c3d9de;      /* 10.6:1 su --paper */
  --paper-accent-ink: var(--brand-light);
  --paper-focus: #ffffff;
  --paper-hl: var(--brand-light);

  --header-bg: rgb(255 255 255 / 0.95);
  --footer-bg: var(--brand);
  --footer-line: rgb(255 255 255 / 0.18);
  --footer-text: #ffffff;
  --footer-muted: #d4e6ea;     /* 6.1:1 su --brand */

  --cta-bg: var(--brand-deep);
  --cta-text: #ffffff;
  --cta-btn-bg: #ffffff;
  --cta-btn-text: var(--brand-deep);
  --cta-btn-hover: var(--brand-tint);

  --tag-bg: var(--brand-tint);
  --tag-text: var(--brand);
  --paper-tag-bg: #0b4b5a;
  --paper-tag-text: #e2f1f4;
  --cert-bg: #ffffff;
  --card-cta-btn-hover: var(--brand-tint);

  --font-display: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display-weight: 700;
  --display-style: normal;
  --display-transform: none;
  --display-tracking: -0.015em;
  --display-lh: 1.12;
  --eyebrow-font: var(--font-body);
  --btn-font: var(--font-body);
  --btn-weight: 600;
  --btn-size: 1rem;
  --btn-tracking: 0;

  --h1-size: clamp(2.25rem, 1.6rem + 3vw, 4rem);
  --h2-size: clamp(1.75rem, 1.35rem + 1.9vw, 2.75rem);
  --page-h1: clamp(2.1rem, 1.5rem + 2.8vw, 3.6rem);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-btn: 999px;
  --shadow: 0 16px 40px rgb(2 50 62 / 0.12);
  --shadow-soft: 0 6px 20px rgb(2 50 62 / 0.06);
  --section-y: clamp(4.5rem, 7vw + 1rem, 8rem);
}

body { font-weight: 400; }
.btn { padding: 1.05rem 1.6rem; min-height: 3.25rem; }
.btn-ghost { border-width: 1.5px; }
.eyebrow { display: none; }   /* niente "occhielli" sopra ogni titolo */
.page-hero { border-bottom: 0; }
.site-header { border-bottom-color: transparent; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav-list a { font-weight: 500; }
@media (min-width: 64em) { .nav-list > li > a::after { background: var(--brand); } }
.fab { background: var(--brand); color: #fff; box-shadow: 0 0 0 2px #fff, var(--shadow); }

/* ---------- Logotipo (A-vetta + RJUS) ---------- */
.brand { color: var(--heading); --logo-size: 2.35rem; --logo-accent: var(--brand); text-decoration: none; }
.footer-brand a, .brand-logo { text-decoration: none; }
.brand-logo { display: inline-grid; justify-items: start; line-height: 1; }
.brand-word { display: inline-flex; align-items: flex-end; gap: 0.1em; font: 700 var(--logo-size)/0.8 var(--font-display); letter-spacing: 0.01em; }
.brand-mark { height: 1.02em; width: auto; overflow: visible; color: var(--logo-accent); }
.brand-sub { font: 600 calc(var(--logo-size) * 0.235)/1 var(--font-body); letter-spacing: 0.32em; text-transform: uppercase; margin-top: 0.55em; color: var(--logo-accent); }
.footer-brand .brand-logo { --logo-size: 2.2rem; --logo-accent: var(--brand-light); color: #fff; margin-bottom: var(--s-4); }

/* ---------- Header trasparente sopra l'hero scuro (solo home) ---------- */
.has-film .site-header { margin-bottom: calc(-1 * var(--header-h)); transition: background-color var(--dur) var(--ease); }
.has-film .site-header:not(.is-scrolled) { background: transparent; color: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
.has-film .site-header:not(.is-scrolled) .brand { color: #fff; --logo-accent: var(--brand-light); }
.has-film .site-header:not(.is-scrolled) .nav-toggle { color: #fff; border-color: rgb(255 255 255 / 0.4); }
.has-film .site-header:not(.is-scrolled) :focus-visible { outline-color: #fff; }
@media (min-width: 64em) {
  .has-film .site-header:not(.is-scrolled) .nav-list > li > a:hover,
  .has-film .site-header:not(.is-scrolled) .nav-list > li > a[aria-current] { color: #fff; }
  .has-film .site-header:not(.is-scrolled) .nav-list > li > a::after { background: var(--brand-light); }
  .has-film .site-header .nav-sub { color: var(--text); }
  .has-film .site-header .nav-sub a:hover { color: var(--accent-ink); }
  .has-film .site-header .nav-sub :focus-visible { outline-color: var(--focus); }
}
body.nav-open .site-header { background: #fff !important; color: var(--text) !important; }
body.nav-open .site-header .brand { color: var(--heading) !important; }
body.nav-open .site-header .brand { --logo-accent: var(--brand) !important; }
body.nav-open .site-header .brand-mark, body.nav-open .site-header .brand-sub { color: var(--brand) !important; }
body.nav-open .site-header .nav-toggle { color: var(--text) !important; border-color: var(--line) !important; }

/* ---------- Hero con foto ---------- */
.film { position: relative; background: #131514; color: #fff; overflow: hidden; --heading: #fff; }
.film-media { position: relative; aspect-ratio: 4 / 5; max-height: 44svh; width: 100%; }
.film-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.film-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(19 21 20 / 0.55) 0%, transparent 28%, transparent 62%, #131514 100%); }
.film-body { position: relative; z-index: 1; padding-block: 0 var(--s-7); }
.film h1 { margin-bottom: var(--s-5); font-size: clamp(2.25rem, 1.4rem + 2.8vw, 3.6rem); }
.film .claim-line { display: block; }
.film .h1-kicker { display: block; font-size: 0.875rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brand-light); margin-bottom: var(--s-3); }
.film .lead { color: rgb(255 255 255 / 0.86); max-width: 44ch; margin-bottom: var(--s-6); }
.film .btn-primary { background: #fff; color: var(--brand-deep); }
.film .btn-primary:hover { background: var(--brand-tint); }
.film .text-link { color: #fff; border-bottom-color: var(--brand-light); }
.film .text-link:hover { color: var(--brand-light); }
.film :focus-visible { outline-color: #fff; }
@media (min-width: 56em) {
  .film { min-height: min(100svh, 50rem); display: grid; align-items: center; }
  .film-media { position: absolute; inset: 0 0 0 46%; aspect-ratio: auto; max-height: none; width: auto; }
  .film-media::after { background: linear-gradient(90deg, #131514 0%, rgb(19 21 20 / 0.4) 18%, transparent 45%), linear-gradient(180deg, rgb(19 21 20 / 0.6), transparent 25%); }
  .film-body { padding-block: calc(var(--header-h) + var(--s-8)) var(--s-8); }
  .film-copy { max-width: 41rem; }
}

/* ---------- Percorsi: card che si impilano ---------- */
.stack { display: grid; gap: var(--s-5); }
.stack-card { background: var(--bg-alt); border-radius: var(--radius-lg); overflow: hidden; display: grid; border: 1px solid var(--line); }
.stack-card img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 30%; }
.stack-body { padding: clamp(1.5rem, 3vw, 3rem); display: grid; gap: var(--s-4); align-content: center; }
.stack-num { font: 600 0.875rem/1 var(--font-body); letter-spacing: 0.14em; color: var(--brand); }
.stack-body h3 { font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.5rem); }
.stack-body p { color: var(--muted); max-width: 44ch; font-size: var(--step-0); }
.stack-body .btn { justify-self: start; margin-top: var(--s-2); }
@media (min-width: 56em) {
  .stack-card { grid-template-columns: 1fr 1fr; height: clamp(22rem, 62vh, 30rem); position: sticky; top: calc(var(--header-h) + var(--s-5) + var(--i, 0) * 0.9rem); box-shadow: 0 -10px 30px rgb(2 50 62 / 0.06); }
  .stack-card > img { aspect-ratio: auto; height: 100%; min-height: 0; }
  .stack-card:nth-child(even) img { order: 2; }
}
@media (prefers-reduced-motion: reduce) { .stack-card { position: static; } }

/* ---------- Video in palestra ---------- */
.reels { display: grid; grid-auto-flow: column; grid-auto-columns: min(68vw, 16rem); gap: var(--s-4); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--s-3); scrollbar-width: none; }
.reels::-webkit-scrollbar, .cert-cards::-webkit-scrollbar { display: none; }
.reel { scroll-snap-align: start; margin: 0; }
.reel-frame { position: relative; aspect-ratio: 9 / 16; border-radius: var(--radius-lg); overflow: hidden; background: #0a2a33; }
.reel-frame video { width: 100%; height: 100%; object-fit: cover; }
.reel figcaption { margin-top: var(--s-3); font-weight: 600; color: #fff; }
@media (min-width: 64em) { .reels { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto; overflow: visible; } }
.vid-toggle {
  position: absolute; z-index: 2; right: var(--s-3); bottom: var(--s-3); width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.5); background: rgb(0 0 0 / 0.45); color: #fff; display: grid; place-items: center; cursor: pointer;
}
.vid-toggle svg { width: 18px; height: 18px; }
.vid-toggle .i-play { display: none; }
.vid-toggle[aria-pressed="true"] .i-play { display: block; }
.vid-toggle[aria-pressed="true"] .i-pause { display: none; }
.vid-toggle:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ---------- Attestati: card scure ---------- */
.cert-cards { position: relative; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr)); }
@media (max-width: 47.99em) { /* su mobile gli attestati scorrono in orizzontale invece di impilarsi */
  .cert-cards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(78vw, 18rem); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: var(--s-2); }
  .cert-card { scroll-snap-align: start; }
}
.cert-card { position: relative; background: var(--brand-deep); color: #fff; border-radius: var(--radius-lg); padding: var(--s-4); display: grid; gap: var(--s-3); align-content: start; --heading: #fff; }
.cert-card .cert-img { background: #fff; border-radius: var(--radius); padding: var(--s-2); display: block; }
.cert-card .cert-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.cert-card h3 { font-size: var(--step-1); line-height: 1.25; margin-top: var(--s-2); }
.cert-card p { color: var(--paper-muted); font-size: var(--step--1); line-height: 1.5; }
.cert-card .btn { justify-self: start; background: #fff; color: var(--brand-deep); font-size: 0.9375rem; min-height: 2.75rem; padding: 0.7rem 1.2rem; margin-top: var(--s-1); }
.cert-card .btn:hover { background: var(--brand-tint); }
.cert-card :focus-visible { outline-color: #fff; }

/* ---------- Varie ---------- */
.section.dark { background: var(--paper); color: var(--paper-text); --heading: #fff; }
.section.dark .muted { color: var(--paper-muted); }
.section.dark :focus-visible { outline-color: #fff; }
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.cert-zoom { background: var(--brand); color: #fff; }
.cta-band .container { padding-block: clamp(4rem, 7vw, 6rem); }
.site-footer { border-top: 0; }
.site-footer address a, .footer-grid a { color: #fff; }

@media (max-width: 55.99em) {
  .film h1 { font-size: clamp(2rem, 1.5rem + 2.6vw, 2.6rem); margin-bottom: var(--s-4); }
  .film .lead { font-size: var(--step-0); margin-bottom: var(--s-5); }
  .film .h1-kicker { margin-bottom: var(--s-2); }
  .page-hero-media img { aspect-ratio: 4 / 3; object-position: center 45%; }
}

/* ---------- Modulo contatti ---------- */
.form-wrap { max-width: 52rem; }
.contact-form { display: grid; gap: var(--s-5); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.25rem, 3vw, 2.5rem); }
.form-grid { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 40em) { .form-grid { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }
.field { display: grid; gap: var(--s-2); }
.field label { font-weight: 600; font-size: var(--step--1); color: var(--heading); }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--text); background: #fff; width: 100%;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 0.8rem 0.9rem; min-height: 48px;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; border-color: var(--brand); }
.field input:user-invalid, .field textarea:user-invalid { border-color: #b3261e; }
.check { display: grid; grid-template-columns: 24px 1fr; gap: var(--s-3); align-items: start; font-size: var(--step--1); color: var(--text); cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--brand); }
.check a { color: var(--brand); }
.contact-form .btn { justify-self: start; }
.form-status:empty { display: none; }
.form-status.is-error { color: #b3261e; font-weight: 600; background: #fdecea; border-radius: var(--radius-sm); padding: var(--s-3) var(--s-4); }
.form-note { font-size: var(--step--1); color: var(--muted); }
.form-note a { color: var(--brand); }
.form-note--warn { background: var(--brand-tint); color: var(--brand-deep); padding: var(--s-3) var(--s-4); border-radius: var(--radius-sm); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.site-footer address a { word-break: break-all; }

/* Privacy e cookie policy (documenti LegalBlink in iframe) */
.legal-frame { display: block; width: 100%; height: min(75vh, 900px); margin-top: var(--s-6); border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.legal-open { margin-top: var(--s-3); font-size: var(--step--1); }
.legal-open a { color: var(--brand); }
