/* Legione Jericho — sito pubblico
   Un solo tema scuro (verde-nero, osso, arancione hi-vis), come il design approvato. */

@font-face { font-family: 'LifeCraft'; src: url('../fonts/lifecraft-legione.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Big Shoulders Display'; font-weight: 600; src: url('../fonts/big-shoulders-display-latin-600-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Big Shoulders Display'; font-weight: 800; src: url('../fonts/big-shoulders-display-latin-800-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Big Shoulders Display'; font-weight: 900; src: url('../fonts/big-shoulders-display-latin-900-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 400; src: url('../fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 500; src: url('../fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'IBM Plex Sans'; font-weight: 600; src: url('../fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 400; src: url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 600; src: url('../fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2'); font-display: swap; }

:root {
  --bg: #10120d; --bg-2: #151710; --panel: #181b14; --card: #1b1e16; --field: #10120d;
  --line: #2a2e22; --line-2: #3a3f31; --line-3: #4a5040;
  --fg: #ece6d6; --fg-2: #c9c3b1; --fg-3: #b4af9c; --muted: #a8a491; --faint: #6f6c5c;
  --accent: #f07a2a; --accent-2: #ff8c3f; --brass: #c8b07a; --warn: #ff9a5c;
  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --lc: 'LifeCraft', 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.5; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--fg); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

.wrap { max-width: 1312px; margin: 0 auto; padding-left: var(--gutter); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
@media (min-width: 900px) { .wrap { padding-left: 64px; padding-right: 64px; } }
.lc { font-family: var(--lc); }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--bg); padding: 10px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 3px; font: 600 15px/1 var(--body); text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn--primary { background: var(--accent); color: var(--bg); }
.btn--primary:hover { background: var(--accent-2); color: var(--bg); }
.btn--ghost { border-color: var(--line-3); color: var(--fg-2); font-weight: 500; }
.btn--ghost:hover { border-color: var(--fg); color: var(--fg); }
.btn--dark { background: var(--bg); color: var(--fg); align-self: flex-start; }
.btn--dark:hover { color: var(--accent); }

/* Header */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(16, 18, 13, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.nav__bar { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 44px; height: 44px; }
.brand__name { font-family: var(--lc); font-size: 23px; letter-spacing: 2px; text-transform: uppercase; }
.nav__links { display: flex; align-items: center; gap: 32px; font-size: 15px; font-weight: 500; }
.nav__links a:not(.btn) { text-decoration: none; }
.nav__toggle { display: none; width: 48px; height: 48px; margin-right: -10px; background: none; border: 0; color: var(--fg); cursor: pointer; }
.nav__toggle path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav__toggle .i-close { display: none; }
.nav__toggle[aria-expanded="true"] .i-open { display: none; }
.nav__toggle[aria-expanded="true"] .i-close { display: inline; }

@media (max-width: 899px) {
  .nav__bar { height: 64px; }
  .brand img { width: 38px; height: 38px; }
  .brand__name { font-size: 20px; }
  .nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav__links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 24px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav__links.open { display: flex; }
  .nav__links a:not(.btn) { font-family: var(--display); font-weight: 800; font-size: 30px; text-transform: uppercase; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav__links .nav__cta { margin-top: 16px; }
}

/* Hero */
.hero { position: relative; overflow: hidden; min-height: 760px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; padding: 40px 0 64px; }
@media (hover: hover) and (pointer: fine) { .hero { cursor: crosshair; } }
.hero__contours { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__contours path { fill: none; stroke: #1d2118; stroke-width: 2; }
.hero__ghost { position: absolute; left: 50%; top: 70px; transform: translate(-50%, 0); font-family: var(--lc); font-size: clamp(150px, 23vw, 330px); line-height: 1; letter-spacing: 8px; white-space: nowrap; color: transparent; -webkit-text-stroke: 2px #2f3526; pointer-events: none; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.hero__meta { position: relative; display: flex; justify-content: space-between; gap: 16px; width: 100%; font-family: var(--mono); font-size: 12px; letter-spacing: 1.5px; color: var(--muted); }
.hero__meta .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 10px; vertical-align: 1px; }
.hero__stage { position: absolute; left: 50%; top: 50%; width: min(500px, 35vw); height: min(500px, 35vw); transform: translate(-50%, -52%); perspective: 1100px; pointer-events: none; }
.hero__float { position: relative; width: 100%; height: 100%; animation: float 4.6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.hero__shadow { position: absolute; left: 12%; right: 12%; bottom: -14%; height: 8%; border-radius: 50%; background: #000; opacity: .55; filter: blur(22px); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.hero__logo { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.hero__logo img { width: 100%; height: 100%; filter: drop-shadow(0 30px 40px rgba(0,0,0,.6)); }
.hero__logo.sway { animation: sway 7s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotateY(-9deg) rotateX(3deg); } 50% { transform: rotateY(9deg) rotateX(-3deg); } }
.hero__glare { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.22), rgba(255,255,255,0) 52%); mix-blend-mode: soft-light; }
.hero__grid { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; width: 100%; }
.hero__copy { width: 340px; display: flex; flex-direction: column; gap: 22px; }
.hero__copy h1 { margin: 0; font-size: 76px; line-height: .92; text-transform: uppercase; letter-spacing: 1px; font-weight: 400; }
.hero__copy p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--fg-2); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__hud { width: 250px; margin: 0; display: flex; flex-direction: column; gap: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--muted); }
.hero__hud div { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.hero__hud div:last-child { border-bottom: 0; }
.hero__hud dt { margin: 0; } .hero__hud dd { margin: 0; color: var(--fg); font-variant-numeric: tabular-nums; }
.hero__hud dd.accent { color: var(--accent); }
.reticle { position: absolute; left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; pointer-events: none; opacity: 0; transition: opacity .2s; }
.reticle svg { display: block; } .reticle circle, .reticle path { fill: none; stroke: var(--accent); stroke-width: 2; } .reticle .c { fill: var(--accent); }

@media (max-width: 899px) {
  .hero { min-height: 0; padding: 24px 0 40px; justify-content: flex-start; gap: 0; }
  .hero__ghost { top: 90px; font-size: 150px; letter-spacing: 4px; -webkit-text-stroke-width: 1.5px; }
  .hero__stage { position: relative; left: auto; top: auto; margin: 20px auto 44px; width: min(300px, 78vw); height: min(300px, 78vw); }
  .hero__grid { flex-direction: column; align-items: stretch; gap: 28px; }
  .hero__copy { width: auto; }
  .hero__copy h1 { font-size: 60px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__hud { width: auto; flex-direction: row; flex-wrap: wrap; gap: 12px 0; border-top: 1px solid var(--line); padding-top: 16px; }
  .hero__hud div { flex: 1 1 33%; flex-direction: column; gap: 4px; border: 0; padding: 0; }
  .hero__hud div:first-child { display: none; }
  .hero__hud dd { font-size: 14px; }
  .hide-sm { display: none; }
  .reticle { display: none; }
}

/* Sections */
.section { position: relative; overflow: hidden; padding: 128px 0; }
.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-lg { display: flex; flex-direction: column; gap: 56px; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: 2px; color: var(--accent); }
.eyebrow--dark { color: var(--bg); font-weight: 600; }
.h2 { margin: 0; font-size: 64px; line-height: .95; text-transform: uppercase; font-weight: 400; text-wrap: balance; }
.h2--xl { font-size: 88px; line-height: .9; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; }
.prose { display: flex; flex-direction: column; gap: 20px; font-size: 18px; line-height: 1.7; color: var(--fg-2); padding-top: 40px; }
.prose p { margin: 0; }
.wm { position: absolute; width: 720px; height: 720px; right: -180px; top: 40px; opacity: .05; pointer-events: none; }
.wm--left { left: -140px; right: auto; top: 50%; width: 560px; height: 560px; margin-top: -280px; }
.wm--dark { left: -220px; right: auto; top: auto; bottom: -260px; width: 760px; height: 760px; opacity: .09; filter: brightness(0); }
.section > .wrap { position: relative; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 88px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats > div { padding: 36px 0; display: flex; flex-direction: column; gap: 6px; }
.stats > div + div { padding-left: 40px; border-left: 1px solid var(--line); }
.stats__n { font-size: 56px; line-height: 1; font-family: var(--lc); }
.stats > div:last-child .stats__n { font-family: var(--display); font-weight: 800; }
.stats__l { font-family: var(--mono); font-size: 13px; letter-spacing: 1.5px; color: var(--muted); }

.canto { border-top: 1px solid var(--line); padding: 120px 0; }
.canto__grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 80px; align-items: start; }
.canto__text { margin: 0; padding-left: 40px; border-left: 2px solid var(--accent); font-family: var(--display); font-weight: 600; font-size: 38px; line-height: 1.28; }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; }
.card svg * { fill: none; stroke: var(--brass); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin: 0; font-size: 28px; line-height: 1; text-transform: uppercase; font-weight: 400; }
.card p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--fg-3); }

/* Le giocate */
.giocate { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.gioc { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.gioc__img { aspect-ratio: 4 / 3; width: 100%; object-fit: cover; background: var(--bg); }
.gioc__ph { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; background: var(--bg); border-bottom: 1px solid var(--line); }
.gioc__ph img { width: 42%; opacity: .14; }
.gioc__body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 10px; }
.gioc__date { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--accent); }
.gioc__title { margin: 0; font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1; text-transform: uppercase; }
.gioc__desc { margin: 0; font-size: 15px; line-height: 1.6; color: var(--fg-3); white-space: pre-line; }

/* Unisciti */
.orange { background: var(--accent); color: var(--bg); padding: 120px 0; }
.lead { margin: 0; font-size: 18px; line-height: 1.6; max-width: 440px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { display: flex; align-items: center; gap: 24px; padding: 24px 0; border-bottom: 2px solid var(--bg); }
.steps li:last-child { border-bottom: 0; }
.steps__n { width: 56px; flex-shrink: 0; font-size: 32px; align-self: flex-start; }
.steps li > div { flex-grow: 1; display: flex; flex-direction: column; gap: 6px; }
.steps strong { font-size: 20px; font-weight: 600; }
.steps span { font-size: 15px; line-height: 1.5; }
.steps img { width: 76px; height: 76px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }

/* Contatti */
.contacts { margin: 8px 0 0; display: flex; flex-direction: column; gap: 18px; font-size: 16px; }
.contacts div { display: flex; gap: 20px; }
.contacts dt { width: 150px; flex-shrink: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--muted); padding-top: 3px; }
.contacts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.form { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 40px; display: flex; flex-direction: column; gap: 20px; align-self: start; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--mono); font-size: 12px; letter-spacing: 1px; color: var(--muted); }
.field input, .field textarea { background: var(--field); border: 1px solid var(--line-2); border-radius: 3px; color: var(--fg); padding: 14px; font: 16px var(--body); width: 100%; }
.field textarea { resize: vertical; }
.form .btn { align-self: flex-start; }
.form__status { padding: 14px 16px; border-radius: 3px; font-size: 15px; line-height: 1.5; }
.form__status.ok { background: #1f2a18; border: 1px solid #4b6b33; color: #cfe3b8; }
.form__status.err { background: #2a1a12; border: 1px solid #6b3f2a; color: var(--warn); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); }
.footer__bar { padding-top: 40px; padding-bottom: 40px; display: flex; align-items: center; justify-content: space-between; gap: 24px; font-size: 14px; color: var(--muted); }
.footer__id { display: flex; align-items: center; gap: 12px; }
.footer__id img { width: 40px; height: 40px; }
.footer__links { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.footer__links a { text-decoration: none; color: var(--fg-2); }

/* Responsive */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .giocate { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .section { padding: 80px 0; }
  .orange, .canto { padding: 72px 0; }
  .stack-lg { gap: 32px; }
  .h2 { font-size: 46px; }
  .h2--xl { font-size: 58px; }
  .split, .canto__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .prose { padding-top: 0; font-size: 17px; }
  .wm { width: 420px; height: 420px; right: -170px; }
  .wm--left { width: 380px; height: 380px; left: auto; right: -150px; top: 20px; margin-top: 0; }
  .wm--dark { width: 460px; height: 460px; left: -150px; bottom: -150px; }
  .stats { grid-template-columns: minmax(0, 1fr); margin-top: 40px; border-bottom: 0; }
  .stats > div { flex-direction: row-reverse; justify-content: space-between; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
  .stats > div + div { padding-left: 0; border-left: 0; }
  .stats__n { font-size: 40px; }
  .stats__l { font-size: 12px; }
  .canto__text { padding-left: 18px; font-size: 25px; line-height: 1.3; }
  .cards, .giocate { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .card { padding: 24px; }
  .card h3 { font-size: 26px; }
  .gioc__title { font-size: 26px; }
  .steps li { gap: 16px; padding: 18px 0; }
  .steps__n { width: 40px; font-size: 26px; }
  .steps img { width: 64px; height: 64px; }
  .btn--dark { align-self: stretch; }
  .contacts { gap: 0; border-top: 1px solid var(--line); }
  .contacts div { flex-direction: column; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .contacts dt { width: auto; font-size: 11px; padding: 0; }
  .form { padding: 22px; }
  .form .btn { align-self: stretch; }
  .footer__bar { flex-direction: column; text-align: center; padding-top: 36px; padding-bottom: 44px; }
  .footer__id { flex-direction: column; }
  .footer__id img { width: 56px; height: 56px; }
  .footer__links { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__float, .hero__logo.sway { animation: none; }
  .hero__logo, .hero__shadow, .hero__ghost { transition: none; }
}
