/* ============================================================
   MD22 TEAM · Marco D'Elia · Landing editoriale (crema + sezioni dark)
   Native CSS, no build. Accento unico: lime. Display: Archivo · Body: Inter
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --cream: #faf7f3;
  --cream-2: #f2ece2;
  --ink: #16150f;
  --ink-soft: #45433b;
  --muted: #65625a;
  --line: rgba(20, 19, 12, .12);
  --line-strong: rgba(20, 19, 12, .24);

  --dark: #0e0f0c;
  --on-dark: #f3f1ea;
  --on-dark-muted: #a7a89c;
  --line-dark: rgba(255, 255, 255, .12);

  --lime: #c6f24e;
  --lime-deep: #b4e234;
  --lime-ink: #16150f;

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --pill: 999px;
  --maxw: 1280px;
  --gutter: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(.16, 1, .3, 1);

  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: 1.0312rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.dark :focus-visible, .nav.scrolled :focus-visible { outline-color: var(--lime); }

/* ---------- Layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(72px, 11vw, 150px); position: relative; }
.section-head { margin-bottom: clamp(36px, 5vw, 64px); }
.eyebrow {
  font-family: var(--font-body); font-size: .8rem; font-weight: 600;
  letter-spacing: .02em; color: var(--muted); display: inline-flex; align-items: center; gap: 9px;
}
.eyebrow::before { content: "/"; color: var(--lime-deep); font-weight: 700; }
.dark .eyebrow { color: var(--on-dark-muted); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: .98; letter-spacing: -.03em; }
.h-display { font-weight: 900; text-transform: uppercase; letter-spacing: -.045em; line-height: .86; }
h2 { font-size: clamp(2.4rem, 6vw, 5rem); }
h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
p { max-width: 64ch; }
.lead { font-size: clamp(1.05rem, 1.7vw, 1.35rem); color: var(--ink-soft); }
.mark-hl { background: var(--lime); color: var(--lime-ink); padding: 0 .12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; border-radius: 3px; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em; justify-content: center;
  padding: .95em 1.6em; border-radius: var(--pill); font-weight: 600; font-size: .96rem;
  letter-spacing: -.01em; border: 1px solid transparent; white-space: nowrap;
  transition: transform .25s var(--ease), background-color .25s var(--ease), border-color .25s var(--ease), color .2s;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn-primary { background: var(--lime); color: var(--lime-ink); }
.btn-primary:hover { background: var(--lime-deep); transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0) scale(.985); }
.btn-outline { border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); transform: translateY(-2px); }
.dark .btn-outline { border-color: var(--line-dark); color: var(--on-dark); }
.dark .btn-outline:hover { border-color: var(--on-dark); }
.btn-lg { padding: 1.05em 1.9em; font-size: 1.02rem; }

/* ---------- Decorative marks (sparkle / lightning) ---------- */
.mk { display: inline-block; color: var(--ink); filter: drop-shadow(3px 4px 0 var(--lime)); }
.dark .mk { color: var(--on-dark); filter: drop-shadow(3px 4px 0 var(--lime)); }

/* ---------- Floating pill nav ---------- */
.nav { position: fixed; top: 16px; left: 0; right: 0; z-index: 100; display: flex; justify-content: center; pointer-events: none; padding-inline: 14px; }
/* base = pill CHIARA (sopra l'hero scuro) */
.nav-pill {
  pointer-events: auto; display: flex; align-items: center; gap: clamp(14px, 2vw, 26px);
  background: var(--cream); color: var(--ink); border: 1px solid var(--line); border-radius: var(--pill);
  padding: 7px 7px 7px 22px; box-shadow: 0 16px 36px -20px rgba(0, 0, 0, .35);
  max-width: calc(100% - 4px); transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.nav-pill .brand { font-family: var(--font-display); font-weight: 800; font-size: 1rem; letter-spacing: .01em; color: var(--ink); white-space: nowrap; transition: color .35s var(--ease); }
.nav-pill .brand b { color: var(--ink); transition: color .35s var(--ease); }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 22px); }
.nav-links a { font-size: .9rem; color: var(--muted); font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-pill .cta { background: var(--lime); color: var(--lime-ink); font-weight: 600; font-size: .88rem; padding: 9px 16px; border-radius: var(--pill); transition: background-color .2s, transform .2s var(--ease); white-space: nowrap; }
.nav-pill .cta:hover { background: var(--lime-deep); transform: translateY(-1px); }
.nav-toggle { display: none; width: 38px; height: 38px; border-radius: 50%; background: rgba(0, 0, 0, .06); align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { content: ""; display: block; width: 16px; height: 1.6px; background: var(--ink); position: relative; transition: transform .3s var(--ease), opacity .2s, background-color .35s; }

/* scrolled = pill SCURA (sopra il corpo crema) */
.nav.scrolled .nav-pill { background: var(--ink); color: var(--on-dark); border-color: transparent; }
.nav.scrolled .nav-pill .brand { color: var(--on-dark); }
.nav.scrolled .nav-pill .brand b { color: var(--lime); }
.nav.scrolled .nav-links a { color: var(--on-dark-muted); }
.nav.scrolled .nav-links a:hover { color: var(--on-dark); }
.nav.scrolled .nav-toggle { background: rgba(255, 255, 255, .1); }
.nav.scrolled .nav-toggle span, .nav.scrolled .nav-toggle span::before, .nav.scrolled .nav-toggle span::after { background: var(--on-dark); }
.nav-toggle span::before { position: absolute; top: -5px; }
.nav-toggle span::after { position: absolute; top: 5px; }
body.menu-open .nav-toggle span { background: transparent; }
body.menu-open .nav-toggle span::before { transform: translateY(5px) rotate(45deg); }
body.menu-open .nav-toggle span::after { transform: translateY(-5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 76px 14px auto 14px; z-index: 99; display: none; flex-direction: column;
  background: var(--ink); color: var(--on-dark); border-radius: var(--radius-lg); padding: 14px;
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .6); transform: translateY(-10px); opacity: 0; pointer-events: none; visibility: hidden;
  transition: transform .3s var(--ease), opacity .3s var(--ease), visibility .3s;
}
body.menu-open .mobile-menu { transform: none; opacity: 1; pointer-events: auto; visibility: visible; }
.mobile-menu a { padding: 14px 12px; font-size: 1.05rem; font-weight: 600; color: var(--on-dark); border-bottom: 1px solid var(--line-dark); }
.mobile-menu a:last-of-type { border-bottom: 0; }
.mobile-menu .cta { margin-top: 12px; background: var(--lime); color: var(--lime-ink); border-radius: var(--pill); text-align: center; }

/* ---------- HERO (dark, split type + foto) ---------- */
.hero { background: var(--dark); color: var(--on-dark); position: relative; overflow: hidden; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 132px 0 52px; }
.hero::before { content: ""; position: absolute; left: 28%; top: 44%; width: 62vw; height: 62vw; max-width: 780px; max-height: 780px; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(198, 242, 78, .13), transparent 62%); pointer-events: none; }
.hero .wrap { position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-role { position: relative; display: inline-block; }
.hero-role h1 { font-size: clamp(2.6rem, 7.6vw, 6.6rem); }
.hero-role .mk-spark { position: absolute; left: -.12em; top: -.4em; width: clamp(28px, 5vw, 66px); }
.hero-role .mk-bolt { position: absolute; right: -.24em; bottom: -.12em; width: clamp(24px, 4vw, 54px); }
.hero-sub { margin-top: 26px; max-width: 42ch; color: var(--on-dark-muted); font-size: clamp(1.02rem, 1.5vw, 1.2rem); }
.hero-cta { margin-top: 30px; display: flex; gap: 13px; flex-wrap: wrap; }
.hero-photo { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5; border: 1px solid var(--line-dark); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7); }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 56%, rgba(10, 11, 8, .42)); }
.hero-meta { margin-top: clamp(30px, 4.5vw, 56px); display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.hero-meta .copy { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.3rem, 2.6vw, 2rem); letter-spacing: -.02em; }
.hero-meta .since { font-size: .82rem; letter-spacing: .14em; color: var(--on-dark-muted); text-transform: uppercase; }
.hero-meta .since b { color: var(--lime); }

/* ---------- INTRO "Ciao" (cream) ---------- */
.intro .grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.intro .big { font-family: var(--font-display); font-weight: 900; font-size: clamp(4rem, 12vw, 10rem); line-height: .82; letter-spacing: -.05em; }
.intro .big .mk { width: clamp(40px, 6vw, 86px); vertical-align: -.06em; margin-left: .08em; }
.intro .portrait { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 5 / 5.4; border: 1px solid var(--line); box-shadow: 0 30px 60px -34px rgba(0, 0, 0, .5); }
.intro .portrait img { width: 100%; height: 100%; object-fit: cover; }
.intro .lead { margin-top: 24px; }
.intro .who { margin-top: 26px; display: flex; align-items: center; gap: 14px; }
.intro .who .sig { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.intro .who .role { color: var(--muted); font-size: .92rem; }

/* ---------- Cursor reveal: addominali "sotto" la maglia (sezione Coach) ----------
   .rp-abs = strato inferiore (torso nudo) · .rp-shirt = strato superiore (maglia)
   che viene "forato" da una maschera radiale ancorata al cursore. */
@property --rp-r { syntax: "<length>"; inherits: false; initial-value: 0px; }

.reveal-photo .rp-abs,
.reveal-photo .rp-shirt { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reveal-photo .rp-abs { z-index: 1; }
.reveal-photo .rp-shirt {
  z-index: 2; --rp-r: 0px;
  -webkit-mask-image: radial-gradient(circle at var(--rp-x, 50%) var(--rp-y, 50%), transparent calc(var(--rp-r) - 34px), #000 var(--rp-r));
          mask-image: radial-gradient(circle at var(--rp-x, 50%) var(--rp-y, 50%), transparent calc(var(--rp-r) - 34px), #000 var(--rp-r));
  transition: --rp-r .45s var(--ease);
}
.reveal-photo.is-active .rp-shirt { --rp-r: 132px; }

/* lente luminosa che segue il cursore (accento lime del sito) */
.reveal-photo .rp-lens {
  position: absolute; z-index: 3; top: 0; left: 0; width: 264px; height: 264px; margin: -132px 0 0 -132px;
  transform: translate(var(--rp-px, -999px), var(--rp-py, -999px));
  border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity .3s var(--ease);
  border: 1.5px solid rgba(198, 242, 78, .9);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25), 0 10px 36px -6px rgba(198, 242, 78, .45);
}
.reveal-photo.is-active .rp-lens { opacity: 1; }

/* hint: invito all'interazione, sparisce al primo hover */
.reveal-photo .rp-hint {
  position: absolute; z-index: 4; left: 50%; bottom: 16px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: var(--pill);
  background: rgba(14, 15, 12, .62); color: var(--on-dark); border: 1px solid var(--line-dark);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-family: var(--font-body); font-size: .8rem; font-weight: 600; letter-spacing: .01em;
  pointer-events: none; opacity: 0; transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.reveal-photo .rp-hint svg { width: 16px; height: 16px; }
.has-js .reveal-photo .rp-hint { opacity: 1; }
.reveal-photo.is-active .rp-hint { opacity: 0; transform: translateX(-50%) translateY(8px); }

@media (prefers-reduced-motion: reduce) {
  .reveal-photo .rp-shirt { transition: none; }
  .reveal-photo .rp-hint, .reveal-photo .rp-lens { display: none; }
}

/* ---------- MANIFESTO (cream) ---------- */
.manifesto { text-align: center; }
.manifesto p { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 3.6vw, 3.1rem); line-height: 1.12; letter-spacing: -.025em; max-width: 18ch; margin-inline: auto; color: var(--ink); }
.manifesto .sub { font-family: var(--font-body); font-weight: 400; font-size: 1.05rem; color: var(--muted); max-width: 56ch; margin: 28px auto 0; letter-spacing: 0; }

/* ---------- SERVIZI (editorial list) ---------- */
.svc-list { border-top: 1px solid var(--line); }
.svc {
  display: grid; grid-template-columns: 64px 1fr 1.1fr auto; gap: clamp(16px, 3vw, 40px);
  align-items: start; padding: clamp(26px, 3vw, 40px) 0; border-bottom: 1px solid var(--line);
  transition: background-color .3s var(--ease); position: relative;
}
.svc:hover { background: var(--cream-2); }
.svc .n { font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--ink-soft); letter-spacing: .04em; padding-top: .4em; }
.svc h3 { font-size: clamp(1.5rem, 2.6vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; }
.svc .desc { color: var(--muted); font-size: 1rem; max-width: 46ch; }
.svc .tag { align-self: center; font-size: .8rem; font-weight: 600; color: var(--ink); border: 1px solid var(--line-strong); padding: 7px 13px; border-radius: var(--pill); white-space: nowrap; }

/* ---------- RISULTATI (project cards) ---------- */
.results-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.results-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 3vw, 36px); margin-top: clamp(34px, 4vw, 56px); }
.rcard { display: block; }
.rcard .thumb { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 3; background: var(--cream-2); border: 1px solid var(--line); }
.rcard .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.rcard:hover .thumb img { transform: scale(1.04); }
.gallery .thumb { aspect-ratio: 3 / 4; }
.gallery .thumb img { object-position: center 18%; }
.rcard:nth-child(odd) { margin-top: 0; }
.rcard:nth-child(even) { margin-top: clamp(0px, 5vw, 56px); }

/* ---------- TESTIMONIANZE ---------- */
.tst-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tst { background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.tst .stars { display: flex; gap: 3px; color: var(--lime-deep); }
.tst .stars svg { width: 16px; height: 16px; }
.tst blockquote { font-size: 1.02rem; color: var(--ink); line-height: 1.5; }
.tst .who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.tst .av { width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: var(--cream); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; flex: none; }
.tst .who b { display: block; font-size: .94rem; }
.tst .who span { font-size: .84rem; color: var(--muted); }

/* ---------- CONTATTI (Parliamone + form dark) ---------- */
.contact .grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(34px, 5vw, 76px); align-items: center; }
.contact .big { font-family: var(--font-display); font-weight: 900; font-size: clamp(3rem, 8vw, 6.5rem); line-height: .86; letter-spacing: -.045em; }
.contact .sub { color: var(--muted); margin-top: 22px; font-size: 1.08rem; max-width: 40ch; }
.contact .channels { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 20px; }
.contact .channels a { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: .95rem; border-bottom: 1px solid transparent; transition: border-color .2s; }
.contact .channels a svg { width: 19px; height: 19px; }
.contact .channels a:hover { border-color: var(--ink); }

.form-card { background: var(--dark); color: var(--on-dark); border-radius: var(--radius-lg); padding: clamp(26px, 3vw, 40px); }
.form { display: grid; gap: 15px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .82rem; font-weight: 600; color: var(--on-dark); }
.field input, .field select, .field textarea {
  width: 100%; background: rgba(255, 255, 255, .05); border: 1px solid var(--line-dark);
  color: var(--on-dark); border-radius: var(--radius-sm); padding: 13px 15px; font: inherit; font-size: .96rem;
  transition: border-color .2s, background-color .2s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--on-dark-muted); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--lime); background: rgba(255, 255, 255, .08); }
.field textarea { resize: vertical; min-height: 92px; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23a7a89c' stroke-width='2'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 15px center; }
.form .btn { width: 100%; margin-top: 4px; }
.form .privacy { font-size: .8rem; color: var(--on-dark-muted); }
.form .privacy a { color: var(--on-dark); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- FOOTER (dark + watermark) ---------- */
.footer { background: var(--dark); color: var(--on-dark); padding-top: clamp(56px, 8vw, 96px); overflow: hidden; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: clamp(32px, 5vw, 64px); }
.footer .statement { font-family: var(--font-display); font-weight: 800; font-size: clamp(2.2rem, 4.4vw, 3.6rem); line-height: .98; letter-spacing: -.03em; }
.footer .statement .mark-hl { background: var(--lime); }
.fcol h2 { font-family: var(--font-body); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--on-dark-muted); margin-bottom: 18px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.fcol h2::before { content: "/"; color: var(--lime-deep); }
.fcol a, .fcol p { display: block; color: var(--on-dark); font-size: .98rem; margin-bottom: 12px; transition: color .2s; }
.fcol a:hover { color: var(--lime); }
.socials { display: flex; gap: 12px; margin-top: 8px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-dark); display: grid; place-items: center; color: var(--on-dark); transition: background-color .2s, color .2s, border-color .2s; }
.socials a svg { width: 18px; height: 18px; }
.socials a:hover { background: var(--lime); color: var(--lime-ink); border-color: var(--lime); }
.footer-watermark { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; letter-spacing: -.04em; line-height: .8; font-size: clamp(5rem, 26vw, 24rem); color: transparent; -webkit-text-stroke: 1px var(--line-dark); margin-top: clamp(30px, 5vw, 60px); white-space: nowrap; user-select: none; }
.footer-bottom { border-top: 1px solid var(--line-dark); margin-top: clamp(20px, 3vw, 36px); padding: 24px 0 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--on-dark-muted); font-size: .84rem; }
.footer-bottom a { color: var(--on-dark-muted); }
.footer-bottom a:hover { color: var(--on-dark); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .07s; }
.reveal[data-d="2"] { transition-delay: .14s; }
.reveal[data-d="3"] { transition-delay: .21s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .rcard .thumb img, .svc { transition: none !important; }
}

/* ---------- Motion ---------- */
/* anti-flash: con JS i titoli a maschera partono nascosti finche' non rivelati */
.has-js [data-reveal="lines"] { opacity: 0; }
.has-js [data-reveal="lines"].in { opacity: 1; }
.r-line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.r-line-in { display: block; transform: translateY(112%); transition: transform .9s var(--ease); }
[data-reveal="lines"].in .r-line-in { transform: none; }

/* foto hero: scale-in alla comparsa */
.hero-photo img { transform: scale(1.09); transition: transform 1.2s var(--ease); }
.hero-photo.in img { transform: none; }

/* freccia dei bottoni: nudge in hover */
.btn svg { transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }

/* float perpetuo dei marchietti */
@media (prefers-reduced-motion: no-preference) {
  .hero-role .mk-spark { animation: floaty 5s var(--ease) infinite; }
  .hero-role .mk-bolt { animation: floaty 6.2s var(--ease) .4s infinite; }
  .intro .big .mk { animation: floaty 5.4s var(--ease) infinite; display: inline-block; }
}
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-7px) rotate(5deg); } }

/* marquee lime (uno solo per pagina) */
.marquee { background: var(--lime); color: var(--lime-ink); overflow: hidden; border-block: 1px solid rgba(20, 19, 12, .14); }
.marquee-track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-row { display: inline-flex; align-items: center; padding: 16px 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.05rem, 2.1vw, 1.6rem); text-transform: uppercase; letter-spacing: -.01em; white-space: nowrap; }
.marquee-row span { padding-inline: 26px; }
.marquee-row svg { width: 16px; height: 16px; flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* typewriter (hero) */
[data-typewriter] { min-height: 2.6em; }
.tw-text { white-space: pre-wrap; }
.tw-cursor { display: inline-block; width: .58em; height: 1.05em; background: var(--lime); margin-left: .1em; vertical-align: -.16em; animation: tw-blink 1s steps(1) infinite; }
@keyframes tw-blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .r-line-in { transform: none; transition: none; }
  .has-js [data-reveal="lines"] { opacity: 1; }
  .hero-photo img { transform: none; transition: none; }
  .marquee-track { animation: none; transform: none; }
  .btn:hover svg { transform: none; }
  .tw-cursor { animation: none; }
}

/* ---------- Premium FX ---------- */
/* intro / sipario */
#intro { position: fixed; inset: 0; z-index: 200; background: var(--dark); display: none; align-items: center; justify-content: center; transform: translateY(0); }
.has-js #intro { display: flex; }
#intro .intro-word { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 5vw, 3rem); letter-spacing: .02em; color: var(--on-dark); opacity: 0; transform: translateY(14px); }
#intro .intro-word b { color: var(--lime); }
#intro .intro-bar { position: absolute; bottom: 0; left: 0; height: 3px; width: 0; background: var(--lime); }
.has-js #intro .intro-word { animation: introWord .7s var(--ease) .05s forwards; }
.has-js #intro .intro-bar { animation: introBar 1.05s var(--ease) forwards; }
.has-js #intro { animation: introUp .7s var(--ease) 1.15s forwards; }
#intro.done { display: none; }
@keyframes introWord { to { opacity: 1; transform: none; } }
@keyframes introBar { to { width: 100%; } }
@keyframes introUp { to { transform: translateY(-101%); } }
body.intro-active { overflow: hidden; }

/* barra avanzamento scroll */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform: scaleX(0); transform-origin: 0 50%; background: var(--lime); z-index: 120; }
@supports (animation-timeline: scroll()) {
  .progress { animation: progress linear; animation-timeline: scroll(root); }
}
@keyframes progress { to { transform: scaleX(1); } }

/* grana fine */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 115; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* spotlight hero che segue il mouse */
.hero::before { z-index: 0; }
.hero .wrap { z-index: 2; }
.hero-spot { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .45s var(--ease);
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 32%), rgba(198, 242, 78, .16), transparent 62%); }
.hero:hover .hero-spot { opacity: 1; }

/* tilt 3D foto hero + cta magnetica */
.hero-grid { perspective: 1100px; }
.hero-photo { transform-style: preserve-3d; transition: transform .35s var(--ease), opacity .7s var(--ease); will-change: transform; }
.btn[data-magnetic] { transition: transform .3s var(--ease), background-color .25s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  #intro { display: none; }
  .progress, .hero-spot { display: none; }
  .hero-photo { transition: none; }
}
/* niente grana/spotlight su touch (performance) */
@media (hover: none) {
  body::after, .hero-spot { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-photo { max-width: 420px; }
  .intro .grid, .contact .grid { grid-template-columns: 1fr; }
  .intro .portrait { max-width: 460px; aspect-ratio: 16 / 12; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer .statement { grid-column: 1 / -1; }
  .svc { grid-template-columns: 40px 1fr; gap: 6px 18px; }
  .svc .desc { grid-column: 2; }
  .svc .tag { display: none; }
}
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu { display: flex; }
  .tst-grid { grid-template-columns: 1fr; }
  .tst:nth-child(3) { display: none; }
}
@media (max-width: 680px) {
  .hero { min-height: auto; padding-top: 118px; }
  .results-grid { grid-template-columns: 1fr; }
  .rcard:nth-child(even) { margin-top: 0; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-meta { flex-direction: column; align-items: flex-start; gap: 10px; }
}
