/* ==========================================================================
   KMT · Krav Maga Italia — Il team
   Design system: stesso impianto del sito Team Di Salvo (dark, editoriale),
   accento rosso KMT Italia + tricolore
   ========================================================================== */

:root {
  --bg: #0a0a0b;
  --bg-2: #111113;
  --bg-3: #18181b;
  --bg-4: #202024;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --txt: #f4efe6;
  --txt-2: #c9c4ba;
  --muted: #8f8a80;
  --accent: #ee3a3f;        /* testo/linee su fondo scuro */
  --accent-btn: #c8141e;    /* fondo bottoni, bande */
  --accent-btn-2: #de1e29;
  --accent-dim: rgba(238, 58, 63, 0.14);
  --it-green: #009246;
  --it-white: #f4efe6;
  --it-red: #ce2b37;

  --font-display: "Bebas Neue", "Oswald", Impact, sans-serif;
  --font-cond: "Barlow Condensed", "Oswald", sans-serif;
  --font-body: "Barlow", "Helvetica Neue", Arial, sans-serif;

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* film grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: screen;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--accent-btn); color: #fff; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--accent-btn); color: #fff; padding: 10px 16px; font-family: var(--font-cond); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; transition: top 0.2s; }
.skip-link:focus { top: 12px; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

.display { font-family: var(--font-display); line-height: 0.92; letter-spacing: 0.005em; text-transform: uppercase; }
.display--xl { font-size: clamp(3.6rem, 11vw, 9.5rem); }
.display--l  { font-size: clamp(3rem, 7vw, 6.2rem); }
.display--m  { font-size: clamp(2.4rem, 5vw, 4.2rem); }
.display--s  { font-size: clamp(1.8rem, 3vw, 2.6rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-cond); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); }

.lead { font-size: clamp(1.05rem, 1.4vw, 1.3rem); color: var(--txt-2); line-height: 1.55; max-width: 60ch; }
.muted { color: var(--muted); }
.red { color: var(--accent); }
.outline { color: transparent; -webkit-text-stroke: 1.5px var(--txt); }

/* tricolore */
.tricolore { display: flex; height: 4px; width: 84px; }
.tricolore span { flex: 1; }
.tricolore span:nth-child(1) { background: var(--it-green); }
.tricolore span:nth-child(2) { background: var(--it-white); }
.tricolore span:nth-child(3) { background: var(--it-red); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px;
  font-family: var(--font-cond); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1;
  border: 1.5px solid var(--accent-btn);
  color: #fff;
  background: var(--accent-btn);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  transition: transform 0.25s var(--ease), background 0.25s, color 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-btn-2); border-color: var(--accent-btn-2); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--ghost { background: transparent; color: var(--txt); border-color: var(--line-strong); }
.btn--ghost:hover { background: rgba(255,255,255,0.06); border-color: var(--txt); }
.btn--wa { background: #25d366; border-color: #25d366; color: #04140a; }
.btn--wa:hover { background: #3ee07a; border-color: #3ee07a; }
.btn--sm { padding: 12px 18px; font-size: 0.92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-cond); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); font-size: 0.95rem;
}
.link-arrow svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.link-arrow:hover svg { transform: translateX(6px); }

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

.header { position: fixed; inset: 0 0 auto 0; z-index: 100; transition: background 0.35s, border-color 0.35s, transform 0.35s var(--ease); border-bottom: 1px solid transparent; }
.header.is-scrolled { background: rgba(10, 10, 11, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.header.is-hidden { transform: translateY(-100%); }
body.nav-open .header { z-index: 103; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-color: transparent; transform: none; }

.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 84px; transition: height 0.3s; }
.header.is-scrolled .header__inner { height: 70px; }

/* wordmark tipografico KMT · Krav Maga Italia */
.brand { display: inline-flex; flex-direction: column; line-height: 1; }
.brand__kmt { font-family: var(--font-display); font-size: 2.3rem; letter-spacing: 0.02em; line-height: 0.85; }
.brand__kmt b { font-weight: 400; color: var(--accent); }
.brand__sub { display: flex; align-items: center; gap: 6px; font-family: var(--font-cond); font-weight: 700; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; margin-top: 3px; }
.brand__sub b { color: var(--accent); font-weight: 700; }
.brand .tricolore { width: 100%; height: 3px; margin-top: 4px; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav a {
  position: relative;
  font-family: var(--font-cond); font-weight: 600; font-size: 1rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--txt-2); padding: 6px 0; transition: color 0.2s;
}
.nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform 0.3s var(--ease); }
.nav a:hover, .nav a[aria-current="true"] { color: var(--txt); }
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); transform-origin: left; }

.header__cta { display: flex; align-items: center; gap: 14px; }

.burger { display: none; width: 48px; height: 48px; position: relative; z-index: 102; }
.burger span { position: absolute; left: 12px; width: 24px; height: 2px; background: var(--txt); transition: transform 0.3s var(--ease), opacity 0.2s, top 0.3s var(--ease); }
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 23px; }
.burger span:nth-child(3) { top: 30px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 23px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { top: 23px; transform: rotate(-45deg); }

.drawer {
  position: fixed; inset: 0; z-index: 101; background: var(--bg);
  display: flex; flex-direction: column; justify-content: center;
  padding: 100px var(--gutter) 40px;
  transform: translateY(-100%); visibility: hidden;
  transition: transform 0.5s var(--ease), visibility 0s linear 0.5s;
  overflow-y: auto;
}
.drawer.is-open { transform: translateY(0); visibility: visible; transition: transform 0.5s var(--ease), visibility 0s; }
.drawer__nav a {
  display: block; font-family: var(--font-display); font-size: clamp(2.6rem, 10vw, 4rem); line-height: 1.05;
  padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--txt);
  opacity: 0; transform: translateY(20px); transition: opacity 0.4s, transform 0.5s var(--ease);
}
.drawer.is-open .drawer__nav a { opacity: 1; transform: none; }
.drawer.is-open .drawer__nav a:nth-child(1) { transition-delay: 0.08s; }
.drawer.is-open .drawer__nav a:nth-child(2) { transition-delay: 0.14s; }
.drawer.is-open .drawer__nav a:nth-child(3) { transition-delay: 0.2s; }
.drawer.is-open .drawer__nav a:nth-child(4) { transition-delay: 0.26s; }
.drawer.is-open .drawer__nav a:nth-child(5) { transition-delay: 0.32s; }
.drawer__foot { margin-top: 32px; display: flex; flex-direction: column; gap: 16px; }
.drawer__foot .btn { width: 100%; }

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

.hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-items: end; padding: 140px 0 72px; overflow: hidden; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -2; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; filter: saturate(0.35) contrast(1.1) brightness(0.55); transform: scale(1.06); animation: heroZoom 14s var(--ease) forwards; }
@keyframes heroZoom { to { transform: scale(1); } }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 4%, rgba(10,10,11,0.55) 45%, rgba(10,10,11,0.75) 100%),
    linear-gradient(90deg, rgba(10,10,11,0.85) 0%, rgba(10,10,11,0.3) 70%);
}
.hero__kmt {
  position: absolute; z-index: -1; right: -2vw; top: 50%; transform: translateY(-55%);
  font-family: var(--font-display); font-size: clamp(14rem, 38vw, 34rem); line-height: 0.8; letter-spacing: -0.01em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(244, 239, 230, 0.12); pointer-events: none; user-select: none;
}
.hero__kmt b { font-weight: 400; -webkit-text-stroke-color: rgba(238, 58, 63, 0.4); }
.hero__title { margin: 18px 0 24px; font-size: clamp(3.4rem, 9vw, 8.6rem); }
.hero__title .line { display: block; }
.hero__lead { max-width: 52ch; margin-bottom: 30px; }
.hero__meta {
  display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 14px 48px;
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line);
}
.hero__meta div { display: grid; gap: 2px; }
.hero__meta strong { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 3.4vw, 3rem); line-height: 1; color: var(--accent); }
.hero__meta span { font-family: var(--font-cond); letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.78rem; color: var(--muted); }

/* marquee */
.marquee { position: relative; overflow: hidden; background: var(--accent-btn); color: #fff; padding: 14px 0; transform: rotate(-1.2deg) scale(1.02); z-index: 2; }
.marquee__track { display: flex; width: max-content; animation: marquee 34s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { font-family: var(--font-display); font-size: clamp(1.4rem, 2.4vw, 2rem); letter-spacing: 0.06em; padding: 0 28px; display: inline-flex; align-items: center; gap: 28px; white-space: nowrap; }
.marquee__item::after { content: "✦"; font-size: 0.8em; opacity: 0.6; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding: clamp(80px, 10vw, 140px) 0; position: relative; scroll-margin-top: 40px; }
.section--alt { background: var(--bg-2); }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head--split { grid-template-columns: 1fr auto; align-items: end; gap: 18px 48px; }
.section-head .display { margin-top: 6px; }
.section-head p { max-width: 58ch; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }

.frame { position: relative; overflow: hidden; background: var(--bg-3); }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.offset-frame { position: relative; }
.offset-frame::before { content: ""; position: absolute; inset: 24px -24px -24px 24px; border: 1.5px solid var(--accent); z-index: 0; pointer-events: none; }
.offset-frame .frame { position: relative; z-index: 1; }

/* manifesto */
.manifesto { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(2.2rem, 5.4vw, 4.8rem); line-height: 0.98; max-width: 18ch; }
.manifesto em { font-style: normal; color: var(--accent); }

/* values */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--line); border: 1px solid var(--line); margin-top: clamp(48px, 6vw, 80px); }
.value { background: var(--bg); padding: 36px 28px; display: grid; gap: 12px; align-content: start; }
.value__num { font-family: var(--font-cond); font-weight: 600; letter-spacing: 0.18em; color: var(--accent); font-size: 0.9rem; }
.value__title { font-family: var(--font-display); font-size: 2rem; line-height: 1; }
.value p { color: var(--txt-2); font-size: 0.98rem; }

/* direttore tecnico */
.director { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.director .display { margin: 14px 0 6px; }
.director__role { font-family: var(--font-cond); font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 22px; }
.creds { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); border: 1px solid var(--line); margin: 28px 0 30px; }
.creds li { background: var(--bg-2); padding: 16px 18px; font-family: var(--font-cond); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.02em; display: flex; gap: 12px; align-items: baseline; }
.creds li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.creds li::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--accent); transform: rotate(45deg) translateY(-2px); }
.quote { border-left: 3px solid var(--accent); padding: 4px 0 4px 20px; color: var(--txt-2); font-size: 1.08rem; max-width: 56ch; }

/* --------------------------------------------------------------------------
   Team grid
   -------------------------------------------------------------------------- */

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  font-family: var(--font-cond); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.85rem;
  padding: 11px 16px; border: 1px solid var(--line-strong); color: var(--txt-2);
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.filter:hover { border-color: var(--accent); color: var(--txt); }
.filter[aria-pressed="true"] { background: var(--accent-btn); border-color: var(--accent-btn); color: #fff; }
.filter sup { font-size: 0.7em; margin-left: 3px; opacity: 0.7; vertical-align: top; }

.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; }
.member { position: relative; display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line); transition: border-color 0.3s, transform 0.4s var(--ease); }
.member[hidden] { display: none; }
.member:hover { border-color: var(--accent); transform: translateY(-4px); }
.member__img { aspect-ratio: 4/5; overflow: hidden; background: var(--bg-3); }
.member__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.member:hover .member__img img { transform: scale(1.04); }
.member__body { padding: 16px 18px 18px; display: grid; gap: 4px; flex: 1; align-content: start; }
.member__name { font-family: var(--font-display); font-size: 1.7rem; line-height: 1; }
.member__role { font-family: var(--font-cond); font-size: 0.95rem; color: var(--txt-2); line-height: 1.3; }
.member__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); font-family: var(--font-cond); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.78rem; }
.member__where { color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.member__where svg { width: 14px; height: 14px; color: var(--accent); }
.member__more { color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.member__more svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.member:hover .member__more svg { transform: translateX(4px); }
/* l'intera card è cliccabile */
.member__open::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.member__site { position: relative; z-index: 2; justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-family: var(--font-cond); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.04em; color: var(--accent); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.member__site:hover { border-color: var(--accent); }
.member__site svg { width: 14px; height: 14px; flex: none; }
.profile__site { margin-top: 22px; white-space: normal; text-align: center; }
.member__badge { justify-self: start; margin-bottom: 6px; background: var(--accent-btn); color: #fff; font-family: var(--font-cond); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.72rem; padding: 5px 9px; }

/* card segnaposto (foto non ancora disponibile) — stessa grafica delle card ufficiali */
.ph { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 50% 40%, #2a2a2e 0%, #121214 70%); }
.ph__kmt { position: absolute; top: 9%; left: 0; right: 0; text-align: center; font-family: var(--font-display); font-size: clamp(5rem, 12vw, 9rem); line-height: 0.8; color: rgba(244,239,230,0.1); z-index: -1; }
.ph__kmt b { font-weight: 400; color: rgba(206,43,55,0.35); }
.ph__ini { font-family: var(--font-display); font-size: clamp(4rem, 9vw, 6rem); color: var(--txt); line-height: 1; margin-top: -10%; }
.ph__region { position: absolute; top: 5%; right: 7%; font-family: var(--font-display); font-size: 1.4rem; letter-spacing: 0.06em; }
.profile .ph__region { left: 7%; right: auto; }
.ph__band { position: absolute; left: 0; right: 6%; bottom: 7%; background: var(--accent-btn); padding: 12px 16px 10px; clip-path: polygon(0 8%, 96% 0, 100% 50%, 97% 100%, 0 94%); }
.ph__band strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; line-height: 1; letter-spacing: 0.03em; }
.ph__band span { font-family: var(--font-cond); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   Territorio
   -------------------------------------------------------------------------- */

.regions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--line); border: 1px solid var(--line); }
.region { background: var(--bg); padding: 28px 26px; display: grid; gap: 10px; align-content: start; transition: background 0.25s; }
.region:hover { background: var(--bg-3); }
.region__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.region__name { font-family: var(--font-display); font-size: 2rem; line-height: 1; }
.region__count { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--accent); }
.region ul { display: grid; gap: 2px; }
.region li a { font-family: var(--font-cond); font-weight: 600; font-size: 1.05rem; color: var(--txt-2); display: inline-flex; gap: 8px; align-items: baseline; padding: 2px 0; transition: color 0.2s; }
.region li a:hover { color: var(--accent); }
.region li small { font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* --------------------------------------------------------------------------
   Stage / eventi
   -------------------------------------------------------------------------- */

.event__date { display: inline-flex; align-items: center; gap: 14px; margin: 18px 0 8px; font-family: var(--font-cond); font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.95rem; }
.event__date span { background: var(--accent-btn); color: #fff; padding: 6px 10px; }
.checks { display: grid; gap: 12px; margin: 24px 0; }
.checks li { display: flex; gap: 14px; align-items: flex-start; color: var(--txt-2); }
.checks li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 9px; background: var(--accent); transform: rotate(45deg); }

/* CTA band */
.cta-band { position: relative; overflow: hidden; isolation: isolate; padding: clamp(90px, 12vw, 160px) 0; text-align: center; border-top: 1px solid var(--line); }
.cta-band::before { content: "KMT"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: -1; font-family: var(--font-display); font-size: clamp(16rem, 40vw, 36rem); line-height: 0.8; color: transparent; -webkit-text-stroke: 1px rgba(238,58,63,0.18); white-space: nowrap; }
.cta-band .display { margin: 16px auto 22px; max-width: 16ch; }
.cta-band .lead { margin-inline: auto; margin-bottom: 36px; }
.cta-band .btn-row { justify-content: center; }
.cta-band .eyebrow { justify-content: center; }

/* --------------------------------------------------------------------------
   Dialog profilo
   -------------------------------------------------------------------------- */

.profile { width: min(100% - 32px, 1040px); max-height: min(92vh, 900px); padding: 0; border: 1px solid var(--line-strong); background: var(--bg-2); color: var(--txt); overflow: hidden; }
.profile::backdrop { background: rgba(0, 0, 0, 0.78); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.profile[open] { animation: pop 0.4s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.profile__inner { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); max-height: inherit; }
.profile__img { background: var(--bg-3); position: relative; min-height: 420px; }
.profile__img img, .profile__img .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.profile__body { padding: clamp(28px, 4vw, 48px); overflow-y: auto; overscroll-behavior: contain; max-height: min(92vh, 900px); }
.profile__body .display { margin: 12px 0 6px; font-size: clamp(2.4rem, 4.4vw, 3.6rem); }
.profile__role { font-family: var(--font-cond); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.profile__body p { color: var(--txt-2); }
.profile__body h3 { font-family: var(--font-cond); font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.8rem; color: var(--muted); margin: 26px 0 12px; }
.profile__list { display: grid; gap: 8px; }
.profile__list li { display: flex; gap: 12px; align-items: baseline; font-family: var(--font-cond); font-weight: 600; font-size: 1.08rem; }
.profile__list li::before { content: ""; flex: none; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg) translateY(-2px); }
.profile__claim { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); font-family: var(--font-display); font-size: 1.6rem; line-height: 1.05; text-transform: uppercase; }
.profile__close { position: absolute; top: 12px; right: 12px; z-index: 3; width: 44px; height: 44px; display: grid; place-items: center; background: rgba(10,10,11,0.8); border: 1px solid var(--line-strong); transition: background 0.2s, border-color 0.2s; }
.profile__close:hover { background: var(--accent-btn); border-color: var(--accent-btn); }
.profile__close svg { width: 20px; height: 20px; }
.profile__nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; }
html.dialog-open, body.dialog-open { overflow: hidden; }
/* blocca la pagina sotto anche su iOS (la posizione viene ripristinata da main.js) */
body.dialog-open { position: fixed; left: 0; right: 0; width: 100%; }

/* prose (privacy) */
.prose { max-width: 72ch; color: var(--txt-2); }
.prose h2 { font-family: var(--font-display); font-size: 2rem; color: var(--txt); margin: 40px 0 14px; }
.prose ul { list-style: disc; padding-left: 22px; margin: 0 0 1em; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--accent); }
.breadcrumb { font-family: var(--font-cond); letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.78rem; color: var(--muted); margin-bottom: 20px; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 8px; opacity: 0.5; }

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

.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 72px 0 32px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; }
.footer__brand { display: grid; gap: 18px; align-content: start; justify-items: start; }
.footer__brand p { color: var(--muted); font-size: 0.95rem; max-width: 38ch; }
.footer h4 { font-family: var(--font-cond); font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.8rem; color: var(--accent); margin-bottom: 18px; }
.footer ul { display: grid; gap: 4px; }
.footer li a { display: inline-block; padding: 5px 0; color: var(--txt-2); transition: color 0.2s; font-size: 0.98rem; }
.footer li a:hover { color: var(--accent); }
.footer__contact li { color: var(--txt-2); font-size: 0.98rem; padding: 4px 0; }
.footer__contact strong { display: block; font-family: var(--font-cond); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.footer__bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; font-size: 0.85rem; color: var(--muted); }
.footer__bottom a { display: inline-block; padding: 6px 0; }
.footer__bottom a:hover { color: var(--accent); }

/* floating WhatsApp */
.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 90; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #04140a; display: grid; place-items: center; box-shadow: 0 10px 30px rgba(37, 211, 102, 0.35); transition: transform 0.3s var(--ease); }
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; }

/* --------------------------------------------------------------------------
   Reveal animations
   -------------------------------------------------------------------------- */

[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.9s var(--ease); }
[data-reveal="scale"] { transform: scale(0.94); }
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
.hero [data-reveal] { transition-duration: 1.1s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .marquee__track, .hero__bg img, .profile[open] { animation: none; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .team { grid-template-columns: repeat(3, 1fr); }
  .values { grid-template-columns: repeat(2, 1fr); }
  .regions { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav, .header__cta .btn { display: none; }
  .burger { display: block; }
  .hero { padding: 120px 0 56px; }
  .hero__meta { grid-template-columns: repeat(2, auto); gap: 18px 40px; }
  .grid-2, .director { grid-template-columns: 1fr; }
  .director .offset-frame { max-width: 440px; margin-right: 24px; }
  .section-head--split { grid-template-columns: 1fr; }
  .team { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .offset-frame::before { inset: 16px -12px -12px 16px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  /* su mobile scorre l'intera finestra, non un contenitore interno */
  .profile { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; }
  .profile__inner { grid-template-columns: 1fr; max-height: none; overflow: visible; }
  .profile__close { position: sticky; top: 12px; margin: 12px 12px -56px auto; display: grid; }
  .profile__img { min-height: 0; aspect-ratio: 4/5; max-height: 56vh; }
  .profile__img img { object-position: center 30%; }
  .profile__body { max-height: none; overflow: visible; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .values, .regions { grid-template-columns: 1fr; }
  .creds { grid-template-columns: 1fr; }
  .member__name { font-size: 1.35rem; }
  .member__role { font-size: 0.85rem; }
  .member__body { padding: 12px 12px 14px; }
  .member__foot { padding: 10px 12px; font-size: 0.7rem; letter-spacing: 0.1em; }
  .member__more span { display: none; }
  .member__site { font-size: 0.78rem; word-break: break-all; }
  .ph__band strong { font-size: 1.1rem; }
  .ph__band span { display: none; }
  .ph__region { font-size: 1rem; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .btn-row .btn { width: 100%; }
  .filter { padding: 9px 12px; font-size: 0.78rem; }
  .wa-float { right: 14px; bottom: 14px; width: 52px; height: 52px; }
  .profile { width: 100%; max-width: 100%; max-height: 100%; height: 100%; margin: 0; border: 0; }
  .profile__inner { max-height: none; height: auto; }
}

/* 404 */
.notfound { min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: 140px 0 80px; text-align: center; }
.notfound .display--xl { color: transparent; -webkit-text-stroke: 1.5px var(--accent); }
.notfound .btn-row { justify-content: center; margin-top: 32px; }
.notfound .eyebrow { justify-content: center; }
