/* Euro V.I.M. — stile condiviso (home e pagine interne) */
:root {
  --ink: #0d0f12; --ink-2: #171a1f; --ink-3: #20242a;
  --paper: #eeece7; --paper-2: #e2dfd8;
  --fg: #f2f0eb; --muted: #a3a7ad;
  --fg-p: #14171c; --muted-p: #55585e;
  --accent: #ffc928;          /* giallo segnaletica: superfici, linee, testi su fondo scuro */
  --accent-ink: #7a5a00;      /* stesso giallo, scurito per testi piccoli su carta (5.3:1) */
  --navy: #1c295b;            /* blu del logo */
  --line: rgba(242, 240, 235, .14); --line-p: rgba(20, 23, 28, .14);
  --spectrum: linear-gradient(90deg, #0d4f8b 0%, #00a3d9 14%, #00913a 38%, #9cc23a 54%, #ffd84a 70%, #f08a2c 85%, #d40000 100%);
  --display: "Unbounded", "Arial Black", sans-serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gx: 5vw; --gut: clamp(16px, 2vw, 24px);
  --sec: clamp(64px, 10vw, 160px);
  --e-out: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--ink); color: var(--fg); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { color: var(--fg); font-family: var(--sans); font-size: clamp(1rem, .95rem + .25vw, 1.125rem); line-height: 1.5; background: var(--ink); overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--accent); color: #000; padding: 10px 14px; }
.skip:focus { left: 8px; }

/* Voci tipografiche */
.label { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; font-weight: 500; }
.label b { font-weight: 500; color: var(--accent); }
[data-theme="paper"] .label b { color: var(--accent-ink); }
.d1, .d2, .d3 { font-family: var(--display); font-weight: 700; line-height: .95; letter-spacing: -.035em; hyphens: auto; overflow-wrap: anywhere; text-wrap: balance; }
.d1 { font-size: clamp(2rem, 7vw, 6.6rem); }
.d2 { font-size: clamp(1.75rem, 4.6vw, 4.4rem); }
.d3 { font-size: clamp(1.25rem, 2.2vw, 2rem); line-height: 1.05; letter-spacing: -.02em; }
.lead { max-width: 52ch; color: var(--muted); }
[data-theme="paper"] .lead, [data-theme="paper"] p { color: var(--muted-p); }
p { max-width: 65ch; }
.reveal-mask { padding-block: .08em; margin-block: -.08em; }

/* Griglia e sezioni */
.wrap { width: 100%; max-width: 1680px; margin: 0 auto; padding: 0 var(--gx); }
[data-theme="paper"] { background: var(--paper); color: var(--fg-p); }
[data-theme="paper"] .d1, [data-theme="paper"] .d2 { color: var(--navy); }
[data-theme="ink"] { background: var(--ink); color: var(--fg); }
.sec { position: relative; padding: var(--sec) 0; }
.spectrum { height: 4px; background: var(--spectrum); }

/* Pulsanti */
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid currentColor; text-decoration: none; font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; background: none; color: inherit; cursor: pointer; white-space: nowrap; transition: background .25s, color .25s, border-color .25s; }
.pill .ar { display: inline-block; transition: transform .25s var(--e-out); }
.pill:hover .ar { transform: translateX(4px); }
.pill.y { background: var(--accent); color: #111; border-color: var(--accent); }
.pill.y:hover { background: #ffd95e; }
.pill.n { background: var(--navy); color: #fff; border-color: var(--navy); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* Header: logo + isola */
.top { position: fixed; z-index: 30; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px var(--gx); pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { display: block; background: rgba(13, 15, 18, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 8px 12px; border: 1px solid var(--line); }
.brand img { width: 128px; height: auto; }
.island { display: flex; align-items: center; gap: 6px; background: rgba(13, 15, 18, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 999px; padding: 5px; color: var(--fg); }
.island .now { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; padding: 0 12px; white-space: nowrap; }
.island .now b { color: var(--accent); font-weight: 500; margin-right: 6px; }
.island .pill { min-height: 40px; padding: 0 16px; border-color: transparent; }
.menu-btn i { width: 14px; height: 8px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; display: inline-block; }
.menu { position: fixed; inset: 0; z-index: 40; background: var(--ink); color: var(--fg); padding: 96px var(--gx) 40px; overflow-y: auto; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.menu[hidden] { display: none; }
.menu ol { list-style: none; display: grid; gap: 2px; }
.menu li a { display: flex; align-items: baseline; gap: 16px; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: clamp(1.3rem, 4vw, 2.6rem); letter-spacing: -.02em; padding: 8px 0; border-bottom: 1px solid var(--line); }
.menu li a span { font-family: var(--mono); font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: .08em; }
.menu li a:hover, .menu li a[aria-current="page"] { color: var(--accent); }
.menu li.sub a { font-size: clamp(1rem, 2.4vw, 1.5rem); padding-left: 36px; }
.menu .close { position: absolute; top: 18px; right: var(--gx); }

/* Dock mobile */
.dock { display: none; }
@media (max-width: 767px) {
  .dock { display: flex; position: fixed; z-index: 30; left: 12px; right: 12px; bottom: 12px; gap: 8px; padding-bottom: env(safe-area-inset-bottom); }
  .dock .pill { flex: 1; justify-content: center; background: rgba(13, 15, 18, .85); color: var(--fg); border-color: var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .dock .pill.y { background: var(--accent); color: #111; border-color: var(--accent); }
  .island .now, .island .cta { display: none; }
  .brand img { width: 104px; }
  body { padding-bottom: 76px; }
}

/* Card e foto */
.cross { position: relative; }
.cross::before, .cross::after { content: ""; position: absolute; width: 14px; height: 14px; border-color: var(--accent); border-style: solid; z-index: 2; pointer-events: none; }
.cross::before { top: -6px; left: -6px; border-width: 1px 0 0 1px; }
.cross::after { bottom: -6px; right: -6px; border-width: 0 1px 1px 0; }
.ph { background: var(--ink-3); overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; }

/* Footer */
.foot { background: #08090b; color: var(--muted); font-size: 15px; }
.foot .spectrum { height: 3px; }
.foot .cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px var(--gut); padding-top: 64px; padding-bottom: 40px; }
.foot h3 { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg); font-weight: 500; margin-bottom: 12px; }
.foot ul { list-style: none; display: grid; gap: 6px; }
.foot a { text-decoration: none; } .foot a:hover { color: var(--fg); }
.foot .legal { border-top: 1px solid var(--line); padding-top: 20px; padding-bottom: 28px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-family: var(--mono); font-size: 13px; letter-spacing: .04em; }
.foot img { width: 150px; margin-bottom: 16px; }
@media (max-width: 1023px) { .foot .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .foot .cols { grid-template-columns: 1fr; } }

/* Moduli */
.form { display: grid; gap: 16px; max-width: 760px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-family: var(--mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.form input, .form textarea, .form select { font: inherit; font-family: var(--sans); font-size: 17px; text-transform: none; letter-spacing: 0; padding: 12px 14px; border: 1px solid var(--line-p); background: #fff; color: var(--fg-p); border-radius: 0; min-height: 48px; width: 100%; }
.form textarea { min-height: 120px; resize: vertical; }
.form fieldset { border: 1px solid var(--line-p); padding: 14px 16px; display: flex; flex-wrap: wrap; gap: 10px 20px; }
.form legend { font-family: var(--mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; padding: 0 6px; }
.form .chk { display: flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: 16px; letter-spacing: 0; text-transform: none; }
.form .chk input { width: 20px; height: 20px; min-height: 0; accent-color: var(--navy); }
.form .note { font-size: 14px; color: var(--muted-p); }
@media (max-width: 600px) { .form .row2 { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Voci di navigazione visibili su desktop */
.island .nl { display: none; font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: 0 12px; min-height: 40px; align-items: center; color: var(--fg); }
.island .nl:hover, .island .nl[aria-current="page"] { color: var(--accent); }
@media (min-width: 1180px) { .island .nl { display: inline-flex; } }

/* ---- Abbellimenti (giro 3) ---- */
/* Card: freccia nel titolo, filo spettro che si allunga sotto la foto */
.card .ph { position: relative; }
.card .ph::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--spectrum); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--e-out); }
.card .go { display: inline-block; font-family: var(--sans); font-weight: 400; opacity: 0; transform: translateX(-8px); transition: opacity .25s, transform .3s var(--e-out); color: var(--accent); }
[data-theme="paper"] .card .go { color: var(--navy); }
@media (hover: hover) and (pointer: fine) {
  .card:hover .ph::after, .card:focus-visible .ph::after { transform: scaleX(1); }
  .card:hover .go, .card:focus-visible .go { opacity: 1; transform: none; }
}
@media (hover: none) { .card .go { opacity: 1; transform: none; } }

/* Nastro scorrevole delle lavorazioni */
.ticker { overflow: hidden; background: var(--accent); color: #111; border-block: 1px solid #000; padding: 14px 0; }
.ticker .tk { display: flex; width: max-content; align-items: center; gap: 28px; animation: tk 38s linear infinite; }
.ticker span { font-family: var(--display); font-weight: 700; font-size: clamp(1.1rem, 2.2vw, 1.9rem); letter-spacing: -.02em; text-transform: uppercase; white-space: nowrap; }
.ticker i { width: 14px; height: 14px; background: #111; transform: rotate(45deg); flex: none; }
.ticker .tk > :first-child { margin-left: 28px; }
@keyframes tk { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker .tk { animation: none; } }

/* Titolo del modulo nelle pagine lavorazione: niente sillabazioni spezzate */
.h-form { font-size: clamp(1.6rem, 2.8vw, 2.8rem); hyphens: manual; overflow-wrap: normal; max-width: 14ch; }

/* Ingressi nelle pagine interne (attivi solo con JS e movimento consentito) */
.rv-on main .ph { clip-path: inset(10% 6% 10% 6%); transition: clip-path 1.2s var(--e-out); }
.rv-on main .ph.in { clip-path: inset(0 0 0 0); }
.rv-on main :is(h2, .steps5, .list, .txt, .card, .nums > div, .tl li) { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--e-out), transform .9s var(--e-out); }
.rv-on main :is(h2, .steps5, .list, .txt, .card, .nums > div, .tl li).in { opacity: 1; transform: none; }
.rv-on main .cards .card:nth-child(3n+2) { transition-delay: .08s; } .rv-on main .cards .card:nth-child(3n) { transition-delay: .16s; }

/* Grana leggera sui fondi scuri, per togliere l'effetto "piatto da schermo" */
[data-theme="ink"], .cta-band, .foot { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
