/* <3:core — token del marchio (dal logo: verde terminale su nero) */
@font-face {
  font-family: "Core Pixel";
  src: url("assets/fonts/core-pixel.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #080e0a;
  --surface: #0f1a13;
  --surface-2: #1a2b20;
  --ink: #e9f3ec;
  --muted: #a3b8aa;
  --accent: #39e072;
  --accent-2: #2bb35a;
  --deep: #1f6b38;
  --paper: #e9f3ec;
  --black: #080e0a;
  --hot: #ff7a45;
  /* contorno nero di un pixel più un'ombra a gradino: il testo si legge anche sopra il mosaico */
  --px-shadow: 2px 0 0 var(--bg), -2px 0 0 var(--bg), 0 2px 0 var(--bg), 0 -2px 0 var(--bg), 3px 3px 0 var(--bg);

  /* Core Pixel è il nostro carattere (tools/build-font.py); il testo corrente usa il monospazio del sistema */
  --pixel: "Core Pixel", system-ui, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* il testo corrente è nel monospazio di sistema: niente file da scaricare né licenze */
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* il pixel del carattere è 1/8 di em: le misure a multipli di 8px restano nitide */
  --t-xl: clamp(40px, 9vw, 136px);
  --t-l: clamp(40px, 6.4vw, 104px);
  --t-m: clamp(32px, 3.6vw, 56px);
  --t-statement: clamp(22px, 2.2vw, 32px);
  --t-body: 18px;
  --t-small: 15px;

  /* margini che crescono con lo schermo: oltre 1280px di contenuto la pagina resta al centro */
  --margin: max(clamp(20px, 5vw, 96px), calc((100vw - 1280px) / 2));
  --gutter: clamp(16px, 2.4vw, 40px);
  /* stesso spazio sopra e sotto ogni sezione; sotto si aggiunge l'altezza del bordo a pixel della sezione dopo, che ci sale sopra */
  --pad-y: clamp(96px, 12svh, 144px);
  --edge-h: calc(100vw / 96 * 5);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@supports (font-size: round(down, 10px, 8px)) {
  :root {
    --t-xl: round(down, clamp(40px, 9vw, 136px), 8px);
    --t-l: round(down, clamp(40px, 6.4vw, 104px), 8px);
    --t-m: round(down, clamp(32px, 3.6vw, 56px), 8px);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--t-body)/1.6 var(--mono);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  cursor: var(--cursor, auto);
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: var(--accent); color: var(--black); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--margin); top: -60px; z-index: 50; background: var(--accent); color: var(--black); padding: 10px 16px; }
.skip:focus { top: 12px; }

/* ---------- bottoni e link ---------- */
.btn {
  --btn-c: var(--accent); --btn-ink: var(--black); --btn-hover: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  background: transparent; color: var(--btn-c);
  font: 400 16px/1 var(--pixel); text-transform: uppercase; text-decoration: none; border: 0; cursor: pointer;
  box-shadow: inset 0 0 0 3px var(--btn-c), 4px 4px 0 var(--btn-c);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s, color .2s;
}
/* ombra a gradino, come un pixel spostato: si schiaccia quando premi */
.btn:hover { transform: translate(-2px, -2px); background: var(--btn-c); color: var(--btn-ink); box-shadow: inset 0 0 0 3px var(--btn-c), 6px 6px 0 var(--btn-hover); }
.btn:active { transform: translate(4px, 4px); box-shadow: inset 0 0 0 3px var(--btn-c); }
.btn-ink { --btn-c: var(--black); --btn-ink: var(--accent); --btn-hover: var(--deep); }
.btn-s { min-height: 40px; padding: 0 14px; font-size: 14px; }
.link { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; font-weight: 600; }
.link:hover { color: var(--accent); }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.link-btn:hover { color: var(--accent); }

/* ---------- navigazione ---------- */
.nav {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; gap: 32px;
  padding: 24px var(--margin);
}
.wordmark { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 400 24px/1 var(--pixel); text-transform: uppercase; text-shadow: var(--px-shadow); }
.nav nav { display: flex; gap: 8px; margin-left: auto; }
.nav nav a { text-decoration: none; font-weight: 700; font-size: 15px; padding: 8px 12px; text-shadow: var(--px-shadow); transition: background-color .2s, color .2s, text-shadow .2s; }
.nav nav a:hover { background: var(--accent); color: var(--black); text-shadow: none; }
/* sul computer "Parliamone" è il bottone a destra; nel menu del telefono è l'ultima voce */
.nav nav .nav-cta { display: none; }

.menu-btn {
  display: none; align-items: center; min-height: 44px; margin-left: 12px; padding: 0 16px;
  border: 0; background: var(--bg); color: var(--accent); box-shadow: inset 0 0 0 3px var(--accent);
  font: 400 16px/1 var(--pixel); text-transform: uppercase; cursor: pointer;
}

/* ---------- hero: il mosaico, con il testo in una finestra nera ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(120px, 17svh, 176px) var(--margin) 120px;
}
#mosaic { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: pan-y; }
.hero-copy { position: relative; z-index: 2; display: grid; justify-items: center; gap: 36px; }
.hero-title { margin: 0; padding: 0 8px; font: 400 var(--t-xl)/1.12 var(--pixel); text-transform: uppercase; text-shadow: 0.0625em 0 0 var(--bg), -0.0625em 0 0 var(--bg), 0 0.0625em 0 var(--bg), 0 -0.0625em 0 var(--bg), 0.125em 0.125em 0 var(--bg); }
.hero-title .line { display: block; }
.beat {
  /* alto come le maiuscole e battuto dal centro: al massimo non tocca la riga sopra */
  display: inline-block; width: 1.07em; height: 0.875em; vertical-align: 0;
  fill: var(--accent); margin: 0 0.125em; filter: drop-shadow(0.125em 0.125em 0 var(--bg));
  animation: beat 1.3s infinite; transform-origin: 50% 50%;
}
@keyframes beat {
  0%, 40%, 100% { transform: scale(1); }
  12% { transform: scale(1.14); }
  24% { transform: scale(1.02); }
  32% { transform: scale(1.09); }
}
.hero-sub { margin: 0; max-width: 60ch; font-size: 18px; line-height: 1.5; text-wrap: balance; font-weight: 700; text-shadow: var(--px-shadow); }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; padding: 4px 8px 8px; }

/* ---------- bordi a pixel tra le sezioni di colore diverso ---------- */
[data-edge] { position: relative; }
.px-edge { position: absolute; left: 0; right: 0; bottom: calc(100% - 1px); color: var(--edge); pointer-events: none; }
.px-edge svg { width: 100%; height: auto; shape-rendering: crispEdges; }

/* ---------- titoli ---------- */
.h2 { margin: 0 0 56px; font: 400 var(--t-l)/1.125 var(--pixel); text-transform: uppercase; }
/* il cursore del terminale dopo ogni titolo */
.h2::after, .contact-title::after { content: "_" / ""; color: var(--accent); animation: blink 1.1s steps(1) infinite; }
.statement { margin: 0; font-size: var(--t-statement); line-height: 1.25; font-weight: 500; }

/* ---------- servizi ---------- */
.services-intro {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 32px; align-items: end;
  padding: var(--pad-y) var(--margin) calc(var(--pad-y) + var(--edge-h));
}
.services-intro .h2 { grid-column: 1 / 8; margin: 0; }
.services-side { grid-column: 8 / 13; display: grid; gap: 32px; }
.jump { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.jump a { display: flex; align-items: center; gap: 16px; padding: 14px 16px; background: var(--surface); text-decoration: none; font: 400 20px/1 var(--pixel); text-transform: uppercase; transition: background-color .2s, color .2s, padding .3s var(--ease); }
.jump a:hover { background: var(--accent); color: var(--black); padding-left: 24px; }
.jump svg { width: 20px; height: 20px; fill: currentColor; }

.svc {
  min-height: 100svh;
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 48px; align-items: center;
  padding: var(--pad-y) var(--margin) calc(var(--pad-y) + var(--edge-h));
}
.svc-copy { grid-column: 1 / 5; }
.svc-demo { grid-column: 6 / 13; min-width: 0; }
.svc-title { margin: 0 0 28px; font: 400 var(--t-m)/1.1 var(--pixel); text-transform: uppercase; }
.svc-text { margin: 0 0 32px; font-size: 20px; line-height: 1.5; max-width: 42ch; }
.svc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-weight: 600; }
.svc-list li { display: flex; gap: 14px; align-items: baseline; }
.svc-list li::before { content: ""; flex: none; width: 10px; height: 10px; background: currentColor; }
.demo-caption { margin: 20px 0 0; font-size: var(--t-small); }

.svc-web { --edge: var(--accent); background: var(--accent); color: var(--black); }
/* sul computer il sito d'esempio ha più spazio: colonna del testo più stretta, margini verticali ridotti */
@media (min-width: 1001px) {
  .svc-web .svc-demo { grid-column: 5 / 13; }
  .svc-web { padding-block: 56px calc(56px + var(--edge-h)); }
}
.svc-brand { --edge: var(--surface); background: var(--surface); }
.svc-app { --edge: var(--deep); background: var(--deep); color: var(--paper); }

/* ---------- lavori ---------- */
.work, .about, .contact { min-height: 100svh; display: grid; align-content: center; }
.work { --edge: var(--bg); background: var(--bg); padding: var(--pad-y) var(--margin); }
.work-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); align-items: start; }
.work-names { grid-column: 1 / 7; margin: 0; padding: 0; list-style: none; font-size: clamp(28px, 3.4vw, 54px); line-height: 1.25; font-weight: 700; color: var(--muted); }
.work-names .item { display: inline; white-space: nowrap; }
.work-names button { background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); font-weight: 700; letter-spacing: inherit; transition: color .2s; }
.work-names button:hover, .work-names button:focus-visible, .work-names button[aria-current="true"] { color: var(--ink); }
.work-names button[aria-current="true"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; text-decoration-thickness: 5px; }
.work-preview { grid-column: 8 / 13; margin: 0; }
.work-shot { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--surface); box-shadow: 10px 10px 0 var(--accent); }
.work-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.work-shot.noimg img { object-fit: contain; padding: 14%; }
.px-cover { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(16, 1fr); grid-template-rows: repeat(10, 1fr); pointer-events: none; }
.px-cover i { background: var(--accent); opacity: 0; }
.px-cover i.on { opacity: 1; }
.work-preview figcaption { margin-top: 28px; }
.work-preview strong { color: var(--accent); font-weight: 700; }
.small { font-size: var(--t-small); color: var(--muted); margin: 40px 0 0; }

/* ---------- metodo: pannelli a tutto schermo che si impilano ---------- */
.verb-list { list-style: none; margin: 0; padding: 0; }
.verb-panel {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: grid; place-content: center; justify-items: center; gap: 28px;
  padding: 80px var(--margin); text-align: center; background: var(--bg);
}
.verb-panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.4) contrast(1.15); }
/* una trama di pixel sopra la foto, come uno schermo visto da vicino */
.verb-panel::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Cpath d='M0 5h6v1H0zM5 0h1v6H5z' fill='%23080e0a'/%3E%3C/svg%3E");
}
.verb-panel > :not(img, .verb-count) { position: relative; z-index: 1; }
.verb-count { z-index: 1; }
.verb-count { position: absolute; left: var(--margin); top: 32px; margin: 0; font: 400 24px/1 var(--pixel); color: var(--muted); }
.verb-count b { font-weight: 400; color: var(--accent); font-size: 2em; }
.verb { margin: 0; font: 400 clamp(56px, 12vw, 200px)/1 var(--pixel); text-transform: uppercase; color: var(--accent); }
.verb-text { margin: 0; max-width: 44ch; font-size: 22px; line-height: 1.45; font-weight: 500; background: var(--bg); padding: 12px 18px; }

/* ---------- chi siamo ---------- */
.about { padding: var(--pad-y) var(--margin); }
.about-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 56px; align-items: start; }
.about-left { grid-column: 1 / 7; display: grid; gap: 48px; }
.about-left .h2 { margin: 0; white-space: nowrap; }
.team-heart { width: clamp(160px, 22vw, 320px); }
/* a riposo i led si accendono a caso; passando su un mestiere si accende il suo terzo */
.team-heart rect { fill: var(--surface-2); transition: fill .3s; }
.team-heart rect.lit, .team-heart.focus rect.on { fill: var(--accent); }
.team-heart.focus rect:not(.on) { fill: var(--surface-2); }
.about-right { grid-column: 8 / 13; display: grid; gap: 48px; }
.names { list-style: none; margin: 0; padding: 0; font: 400 clamp(40px, 5vw, 80px)/1.1 var(--pixel); text-transform: uppercase; }
.names li { display: flex; align-items: baseline; gap: .35em; width: fit-content; transition: color .2s, transform .3s var(--ease); }
.names li > span[aria-hidden] { color: var(--accent); }
.names li[data-part] { cursor: pointer; }
.names li.active { color: var(--accent); transform: translateX(.25em); }
/* una luce verde attraversa la parola da sinistra a destra, come ShinyText di React Bits;
   si spegne mentre passi su un mestiere e riparte dall'ultimo che hai toccato */
.names li.shine .w {
  background: linear-gradient(100deg, var(--ink) 30%, var(--accent) 42% 58%, var(--ink) 70%) 100% 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 10px rgb(57 224 114 / .35));
  animation: holo 2.8s linear infinite;
}
@keyframes holo { 65%, 100% { background-position: 0 0; } }
/* il <3 batte: al massimo si accende di verde, tornando piccolo torna bianco */
.names-sum span { display: inline-block; transform-origin: 0 60%; animation: lt3 1.3s infinite; }
@keyframes lt3 {
  0%, 100% { transform: scale(1); color: var(--ink); }
  45%, 55% { transform: scale(1.25); color: var(--accent); }
}
.about-small { margin: 0; color: var(--muted); font-weight: 600; }

/* ---------- contatti ---------- */
.contact { padding: var(--pad-y) var(--margin) calc(var(--pad-y) + var(--edge-h)); }
.contact-head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 24px; align-items: end; margin-bottom: 72px; }
.contact-title { grid-column: 1 / -1; margin: 0; font: 400 var(--t-xl)/1 var(--pixel); text-transform: uppercase; color: var(--accent); }
.contact-head .statement { grid-column: 1 / 8; max-width: 40ch; }
.contact-grid { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); row-gap: 48px; align-items: start; }
.composer { grid-column: 1 / 7; display: grid; gap: 40px; }
.q { border: 0; margin: 0; padding: 0; display: grid; gap: 16px; }
.q legend, .q label { display: flex; align-items: center; gap: 14px; padding: 0; margin-bottom: 16px; font: 400 24px/1 var(--pixel); text-transform: uppercase; }
.q label { margin-bottom: 0; }
.q legend b, .q label b { display: grid; place-items: center; width: 36px; height: 36px; background: var(--accent); color: var(--black); font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  min-height: 48px; padding: 0 18px; background: var(--surface); border: 0; cursor: pointer;
  font-size: 18px; font-weight: 600; transition: background-color .2s, color .2s, transform .2s var(--ease), box-shadow .2s var(--ease);
}
.chip:hover { background: var(--surface-2); }
.chip:active { transform: scale(.96); }
.chip.glow { background: var(--deep); box-shadow: inset 0 0 0 2px var(--accent); transition-duration: .6s; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--black); box-shadow: 4px 4px 0 var(--deep); transform: translate(-2px, -2px); }
.q input { min-height: 56px; width: 100%; max-width: 420px; padding: 0 18px; border: 0; background: var(--surface); color: var(--ink); font: 600 18px var(--mono); box-shadow: inset 0 -3px 0 var(--accent); }
.q input::placeholder { color: var(--muted); }
.q input:focus { outline: none; background: var(--surface-2); }

.chat { grid-column: 8 / 13; background: var(--surface); box-shadow: 12px 12px 0 var(--accent); position: sticky; top: 24px; }
.chat-top { display: flex; align-items: center; gap: 16px; padding: 20px 24px; background: var(--black); }
#fill-heart { width: 55px; height: 45px; image-rendering: pixelated; }
.chat-name { margin: 0; font: 400 24px/1 var(--pixel); text-transform: uppercase; }
.chat-sub { margin: 6px 0 0; font-size: var(--t-small); color: var(--muted); }
.chat-body { min-height: 240px; padding: 32px 24px; display: flex; align-items: flex-end; justify-content: flex-end;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M11 11h2v2h-2z' fill='%231a2b20'/%3E%3C/svg%3E"); }
.bubble { position: relative; margin: 0; max-width: 90%; padding: 16px 18px; background: var(--accent); color: var(--black); font-size: 19px; line-height: 1.4; font-weight: 500; }
.bubble::after { content: ""; position: absolute; right: -10px; bottom: 0; width: 10px; height: 10px; background: var(--accent); }
.bubble.typing { animation: pop .35s var(--ease); }
@keyframes pop { from { transform: scale(.96); } }
.chat-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: 24px; }

/* ---------- footer ---------- */
.footer {
  --edge: var(--accent);
  background: var(--accent); color: var(--black);
  padding: clamp(56px, 7vw, 112px) var(--margin) 28px;
}
.footer-top { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gutter); align-items: start; }
.footer-invite { grid-column: 1 / 9; }
.invite { margin: 0 0 32px; font: 400 clamp(32px, 5.4vw, 88px)/1.05 var(--pixel); text-transform: uppercase; }
.footer-links { grid-column: 10 / 13; list-style: none; margin: 0; padding: 0; font-weight: 700; }
.footer-links li + li { margin-top: 12px; }
.footer-links a { text-decoration: none; display: inline-block; padding: 2px 0; }
.footer-links a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
/* "<3:CORE_" in Core Pixel è largo 5,25em: la scritta prende tutta la larghezza */
.giant {
  margin: clamp(64px, 9vw, 140px) 0 clamp(28px, 3vw, 48px); white-space: nowrap; overflow: hidden;
  font: 400 calc((100vw - 2 * var(--margin)) / 5.3)/1 var(--pixel); text-transform: uppercase;
}
.cursor { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.legal { display: flex; justify-content: space-between; align-items: center; gap: 12px 32px; flex-wrap: wrap; font-size: var(--t-small); }
.legal p { margin: 0; }
@media (hover: none) { .kbd-hint { display: none; } }
kbd { font: 400 1em var(--pixel); background: var(--black); color: var(--accent); padding: 2px 6px; }

/* ---------- link di navigazione che si frantumano in ASCII (js/nav.js) ---------- */
a.shattered { opacity: 0; }
.ascii-fall { position: fixed; inset: 0; z-index: 60; overflow: hidden; pointer-events: none; }
.ascii-fall span { position: absolute; top: 0; left: 0; font: 400 20px/1 var(--pixel); color: var(--accent); text-shadow: 2px 2px 0 var(--bg); will-change: transform; }
.debris { position: relative; height: 0; margin-top: 24px; }
.debris span { position: absolute; width: 14px; height: 14px; display: grid; place-items: center; font: 400 14px/1 var(--pixel); color: var(--black); }

/* ---------- riga di comando ---------- */
.cmd {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  display: flex; align-items: center; gap: 6px; padding: 14px var(--margin);
  background: var(--accent); color: var(--black); font: 400 24px var(--pixel);
}
.cmd[hidden] { display: none; }
.cmd input { flex: 1; min-width: 0; background: none; border: 0; color: var(--black); font: 500 18px var(--mono); outline: none; }
.cmd input::placeholder { color: var(--deep); }
body.burst .beat, body.burst .names-sum span { animation-duration: .35s; }

/* ---------- entrate: visibili di base, animate solo se lo script è partito ---------- */
.reveal-on .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal-on .reveal.in { opacity: 1; transform: none; }

/* ---------- tablet ---------- */
@media (max-width: 1000px) {
  .nav nav { display: none; }
  .nav .btn { margin-left: auto; }
  .menu-btn { display: inline-flex; }
  /* il menu aperto prende tutto lo schermo, i link grandi come titoli */
  .nav.open nav {
    position: fixed; inset: 0; z-index: 20; margin: 0;
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    padding: 96px var(--margin); background: var(--bg);
  }
  .nav.open nav a { padding: 12px 0; font: 400 clamp(36px, 10vw, 64px)/1.1 var(--pixel); text-transform: uppercase; text-shadow: none; }
  .nav.open nav a:hover { background: none; color: var(--accent); }
  .nav.open nav .nav-cta { display: block; color: var(--accent); }
  .nav.open .menu-btn { position: fixed; top: 16px; right: var(--margin); z-index: 21; }
  .services-intro .h2, .services-side { grid-column: 1 / -1; }
  .svc { grid-template-columns: 1fr; align-content: center; }
  .svc-copy, .svc-demo { grid-column: 1 / -1; }
  .svc-text { max-width: 56ch; }
  .work-names { grid-column: 1 / -1; }
  .work-preview { grid-column: 1 / -1; margin-top: 48px; max-width: 640px; }
  .about-left, .about-right { grid-column: 1 / -1; }
  .about-left { grid-template-columns: 1fr auto; align-items: end; }
  .team-heart { width: clamp(96px, 20vw, 180px); }
  .contact-title, .contact-head .statement, .composer, .chat { grid-column: 1 / -1; }
  .chat { position: static; }
  .footer-invite, .footer-links { grid-column: 1 / -1; }
  .footer-links { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 48px; }
  .footer-links li + li { margin-top: 0; }
}

/* ---------- telefono ---------- */
@media (max-width: 639.98px) { :root { --edge-h: calc(100vw / 40 * 5); } }
@media (max-width: 640px) {
  /* sul telefono testi più compatti e meno vuoto tra le sezioni */
  :root { --t-statement: 18px; --t-body: 15px; --t-small: 13px; --pad-y: 72px; }
  .nav { padding-top: 16px; }
  .nav .btn { display: none; }
  .menu-btn { margin-left: auto; }
  .wordmark { font-size: 20px; }
  /* hero sul telefono: titolo enorme in alto a sinistra, la facciata a pixel al centro,
     testo e bottoni in basso, dove arriva il pollice */
  .hero { align-items: stretch; text-align: left; padding: 96px var(--margin) 32px; }
  .hero-copy { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
  .hero-title { padding: 0; font-size: clamp(40px, 15vw, 64px); line-height: 1.08; }
  .hero-title .brk { display: block; }
  /* a multipli di 8px il carattere a pixel resta nitido */
  @supports (font-size: round(down, 10px, 8px)) { .hero-title { font-size: round(down, clamp(40px, 15vw, 64px), 8px); } }
  .hero-sub { margin-top: auto; max-width: 34ch; font-size: 15px; font-weight: 600; text-wrap: pretty; }
  .hero-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; padding: 0 4px 4px 0; }
  .hero-actions .btn { padding: 0 12px; }
  .hero-actions .long { display: none; }
  /* il bottone principale è pieno, il secondo resta a contorno */
  .hero-actions .btn:first-child { background: var(--accent); color: var(--black); }
  .svc { row-gap: 32px; }
  .svc-title { margin-bottom: 16px; }
  .svc-text { margin-bottom: 20px; font-size: 15px; }
  /* i punti del servizio diventano etichette: meno altezza, la demo arriva prima */
  .svc-list { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
  .services-intro { row-gap: 24px; }
  .jump a { padding: 12px 14px; font-size: 16px; }
  .svc-list li { padding: 7px 10px; box-shadow: inset 0 0 0 2px currentColor; }
  .svc-list li::before { display: none; }
  .verb-text { font-size: 15px; }
  /* l'anteprima sta sopra i nomi: toccando un nome si vede subito cosa cambia */
  .work-names { font-size: 22px; }
  .work-preview { grid-row: 1; margin: 0 0 32px; }
  /* il messaggio resta in vista in fondo allo schermo mentre rispondi alle domande */
  .contact-grid { display: flex; flex-direction: column; gap: 32px; }
  .chat { position: sticky; bottom: 12px; z-index: 5; box-shadow: 6px 6px 0 var(--accent); }
  .chat-top { gap: 12px; padding: 10px 14px; }
  #fill-heart { width: 33px; height: 27px; }
  .chat-name { font-size: 18px; }
  .chat-sub { display: none; }
  .chat-body { min-height: 0; padding: 14px 14px 0; background-image: none; }
  .bubble { font-size: 15px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
  .chat-actions { gap: 8px 16px; padding: 12px 14px 14px; }
  .chat-actions .link { font-size: 14px; }
  .about-left { grid-template-columns: 1fr; gap: 32px; }
  .team-heart { width: 160px; }
  .names { font-size: 34px; }
  .about-right { gap: 32px; }
  .q legend, .q label { font-size: 20px; }
  .composer { gap: 32px; }
  .contact-head { margin-bottom: 40px; }
  .chips { gap: 8px; }
  .chip { min-height: 44px; padding: 0 14px; font-size: 15px; }
  .chat-actions .btn { width: 100%; }
  .legal { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal-on .reveal { opacity: 1; transform: none; }
}
