/* Conectao / AGgroup — sito vendita macchine IA. Un sistema, due pelli. */

:root {
  --maxw: 1120px;
  --radius: 10px;
  --dur: .45s;
  --ease: cubic-bezier(.22,.8,.28,1);
}

/* ── Pelle CH (AGgroup): design system AGtech — Asap, blu unico, grigi ── */
body.brand-ch {
  --bg: #ffffff;
  --bg-alt: #f4f5f6;
  --ink: #3a3a39;
  --ink-soft: #6e6f70;
  --line: #e2e3e4;
  --accent: #005ca9;
  --accent-ink: #ffffff;
  --card: #ffffff;
  --font-display: "Asap", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --ink: #2e2e2e;
}

/* ── Pelle RD/mondo (Conectao): navy, rosso, Ubuntu ───────────────────── */
body.brand-do {
  --bg: #fdfbf7;
  --bg-alt: #f4eee3;
  --ink: #1e325c;
  --ink-soft: #4a5a7d;
  --line: #e2dbcc;
  --accent: #d11327;
  --accent-ink: #ffffff;
  --card: #ffffff;
  --font-display: "Ubuntu", "Segoe UI", sans-serif;
  --font-body: "Ubuntu", "Segoe UI", sans-serif;
  --font-mono: "Ubuntu Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ── Header ───────────────────────────────────────────────────────────── */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -.02em; text-decoration: none; }
.logo .dot { color: var(--accent); }
nav.main { margin-left: auto; display: flex; gap: 22px; }
nav.main a { text-decoration: none; font-size: .92rem; color: var(--ink-soft); }
nav.main a:hover { color: var(--ink); }
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  padding: 12px 22px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--ink); box-shadow: none; }
.btn.small { padding: 8px 16px; font-size: .85rem; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { padding: 84px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.kicker {
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 18px;
}
h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.08; letter-spacing: -.025em;
  margin-bottom: 22px;
}
.hero p.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 34em; margin-bottom: 30px; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* La firma: i dati che rimbalzano dentro la macchina e non escono mai */
.machine { position: relative; aspect-ratio: 1 / .82; }
.machine svg { width: 100%; height: 100%; display: block; }
.machine .cap {
  position: absolute; left: 0; right: 0; bottom: -8px; text-align: center;
  font-family: var(--font-mono); font-size: .78rem; color: var(--ink-soft);
}
.machine .led { animation: led 2.4s steps(1) infinite; }
@keyframes led { 0%,70% { opacity: 1; } 71%,78% { opacity: .15; } 79%,100% { opacity: 1; } }

/* ── Sezioni ──────────────────────────────────────────────────────────── */
section { padding: 72px 0; }
section.alt { background: var(--bg-alt); }
h2 {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 12px;
}
.section-intro { color: var(--ink-soft); max-width: 40em; margin-bottom: 44px; }

/* Come funziona: tre pezzi */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.trio .piece {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px;
}
.trio .piece .tag { font-family: var(--font-mono); font-size: .75rem; color: var(--accent); letter-spacing: .1em; }
.trio .piece h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 10px 0 8px; }
.trio .piece p { font-size: .95rem; color: var(--ink-soft); }

/* ── Prodotti ─────────────────────────────────────────────────────────── */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.product {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; display: flex; flex-direction: column; gap: 12px;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.product:hover { border-color: var(--ink); transform: translateY(-2px); }
.product.flagship { grid-column: span 2; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.product.flagship .sector, .product.flagship p { color: color-mix(in srgb, var(--bg) 75%, var(--ink)); }
.product .name { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: -.02em; }
.product .sector { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.product p { font-size: .97rem; color: var(--ink-soft); flex: 1; }
.product .row { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.product .base { font-size: .78rem; color: var(--ink-soft); font-family: var(--font-mono); }
.product.flagship .btn { background: var(--bg); color: var(--ink); }

/* ── Macchine / tagli ─────────────────────────────────────────────────── */
table.cuts { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.cuts th, table.cuts td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); }
table.cuts th { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
table.cuts td.cut-name { font-family: var(--font-display); font-weight: 700; white-space: nowrap; }
.cuts-note { font-size: .85rem; color: var(--ink-soft); margin-top: 16px; }
.table-scroll { overflow-x: auto; }

/* ── Perché on-premise ────────────────────────────────────────────────── */
.reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.reason { border-top: 3px solid var(--accent); padding-top: 16px; }
.reason h3 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 8px; }
.reason p { font-size: .93rem; color: var(--ink-soft); }

/* ── Contatto ─────────────────────────────────────────────────────────── */
.contact-box {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px; max-width: 560px;
}
.contact-box label { display: block; font-size: .85rem; font-weight: 600; margin: 16px 0 6px; }
.contact-box input, .contact-box select, .contact-box textarea {
  width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px;
  font-family: var(--font-body); font-size: .95rem; background: var(--bg); color: var(--ink);
}
.contact-box .btn { margin-top: 22px; }
.contact-ok { display: none; padding: 18px 0; font-weight: 600; }

/* ── Contatto a due colonne ───────────────────────────────────────────── */
.contactsplit { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.contactsplit .contact-box { max-width: none; }
.contact-side .photo { aspect-ratio: 3/2; margin-bottom: 22px; }
.contact-card {
  background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--accent);
  border-radius: 6px; padding: 26px;
}
.contact-card h3 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 8px; }
.contact-card p { font-size: .92rem; color: var(--ink-soft); margin-bottom: 16px; }
.contact-card .btn { margin: 0 8px 10px 0; }
.contact-card .cmeta { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-soft); margin-top: 12px; }
@media (max-width: 860px) { .contactsplit { grid-template-columns: 1fr; gap: 24px; } }

/* ── Pulsante WhatsApp fisso ──────────────────────────────────────────── */
.wafab {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; background: #25d366;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(0,0,0,.25);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.wafab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 16px 36px rgba(0,0,0,.3); }
.wafab svg { width: 30px; height: 30px; fill: #fff; }

/* ── Striscia conformità ──────────────────────────────────────────────── */
.lawstrip {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 6px; padding: 20px 26px; margin-top: 40px; background: var(--card);
  flex-wrap: wrap;
}
.lawstrip strong { font-family: var(--font-display); }
.lawstrip span { color: var(--ink-soft); font-size: .93rem; }

/* ── Footer ───────────────────────────────────────────────────────────── */
footer.site { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: .85rem; color: var(--ink-soft); }
footer.site .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ── Demo modal ───────────────────────────────────────────────────────── */
.demo-overlay {
  position: fixed; inset: 0; z-index: 100; display: none;
  background: color-mix(in srgb, var(--ink) 55%, transparent);
  padding: 4vh 16px; overflow-y: auto;
}
.demo-overlay.open { display: block; }
.demo-shell {
  max-width: 860px; margin: 0 auto; background: var(--card);
  border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.demo-bar {
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  background: var(--ink); color: var(--bg);
}
.demo-bar .demo-title { font-family: var(--font-display); font-weight: 700; }
.demo-bar .demo-note { font-family: var(--font-mono); font-size: .72rem; opacity: .7; margin-left: auto; }
.demo-bar button { background: none; border: 0; color: var(--bg); font-size: 1.3rem; cursor: pointer; padding: 2px 6px; }
.demo-body { padding: 26px; min-height: 380px; }

/* dentro le demo */
.chat { display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 78%; padding: 12px 16px; border-radius: 14px; font-size: .95rem; white-space: pre-line; }
.msg.user { align-self: flex-end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: var(--bg-alt); border-bottom-left-radius: 4px; }
.msg.ai.typing::after { content: "▋"; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.chip {
  border: 1.5px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 9px 16px; font-size: .87rem; cursor: pointer; font-family: var(--font-body);
  transition: border-color .2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip:disabled { opacity: .4; cursor: default; }

.demo-table { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 10px; }
.demo-table th, .demo-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.demo-table th { font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; }
.badge.hi { background: #fde8e7; color: #b3261e; }
.badge.mid { background: #fdf3e0; color: #9a6a00; }
.badge.ok { background: #e6f4ea; color: #137333; }
body.brand-do .badge.hi { background: #fbe3e6; }

.stepper { display: flex; gap: 0; margin-bottom: 26px; flex-wrap: wrap; }
.step { flex: 1; min-width: 120px; text-align: center; padding: 10px 6px; border-bottom: 3px solid var(--line); font-size: .8rem; color: var(--ink-soft); }
.step.done { border-color: var(--accent); color: var(--ink); font-weight: 600; }

.offline-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: .74rem;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; margin-bottom: 16px;
}
.offline-pill .lamp { width: 8px; height: 8px; border-radius: 50%; background: #137333; }

.demo-progress { height: 6px; background: var(--bg-alt); border-radius: 4px; overflow: hidden; margin: 18px 0; }
.demo-progress > div { height: 100%; width: 0; background: var(--accent); transition: width 1.2s var(--ease); }

/* ── Immagini editoriali ──────────────────────────────────────────────── */
.photo { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero .photo { aspect-ratio: 4/3; }
.product .thumb { aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; margin-bottom: 6px; }
.product .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.product:hover .thumb img { transform: scale(1.03); }

/* ── Pagina prodotto ──────────────────────────────────────────────────── */
.page-hero { padding: 64px 0 48px; }
.page-hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.page-hero .photo { aspect-ratio: 3/2; }
.crumb { font-family: var(--font-mono); font-size: .78rem; margin-bottom: 20px; }
.crumb a { color: var(--ink-soft); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.benefits { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px 32px; }
.benefit { border-left: 3px solid var(--accent); padding-left: 16px; }
.benefit strong { font-family: var(--font-display); display: block; margin-bottom: 4px; }
.benefit p { font-size: .93rem; color: var(--ink-soft); }
.beforeafter { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.ba { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.ba.oggi { border-top: 3px solid var(--ink-soft); }
.ba.dopo { border-top: 3px solid var(--accent); }
.ba h3 { font-family: var(--font-display); font-size: 1rem; margin-bottom: 12px; }
.ba ul { list-style: none; }
.ba li { padding: 7px 0; font-size: .93rem; color: var(--ink-soft); border-bottom: 1px dashed var(--line); }
.ba li:last-child { border-bottom: 0; }

/* ── Screenshot reale con cornice browser ─────────────────────────────── */
.appshot { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,.10); margin: 30px 0; }
.appshot-bar { display: flex; gap: 6px; padding: 10px 14px; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.appshot-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.appshot-bar span:first-child { background: var(--accent); opacity: .7; }
.appshot img { display: block; width: 100%; }
.appshot-cap { font-family: var(--font-mono); font-size: .75rem; color: var(--ink-soft); margin-top: -18px; margin-bottom: 26px; }

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 34px 18px 0; position: relative;
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.4rem; color: var(--accent); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--ink-soft); font-size: .96rem; max-width: 42em; }

/* ── Prova / barra fiducia ────────────────────────────────────────────── */
.proofline { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 26px; font-family: var(--font-mono); font-size: .78rem; color: var(--ink-soft); }
.proofline span::before { content: "— "; color: var(--accent); }

/* ── Loghi prodotto (lockup a strisce, dal foglio Loghi Prodotti) ─────── */
.bname svg.picon { width: 36px; height: 36px; margin-right: 12px; vertical-align: -5px; }
.plogo { margin-bottom: 12px; }
.plogo svg { width: 46px; height: 46px; display: block; }

/* ── Sezione tecnologia ───────────────────────────────────────────────── */
.techsplit { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; margin-bottom: 44px; }
.techsplit .photo { aspect-ratio: 4/3; }
.techsplit .benefit + .benefit { margin-top: 22px; }
.technote { font-size: .85rem; color: var(--ink-soft); margin-top: 14px; }
@media (max-width: 860px) { .techsplit { grid-template-columns: 1fr; gap: 24px; } }

/* ── Bande prodotto a tutta larghezza (pattern conectaogroup.com.do) ──── */
.bands { display: block; }
.band {
  position: relative; display: flex; align-items: center;
  min-height: 264px; padding: 34px 0; overflow: hidden; text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.08); background: #1c2733;
}
.band .bfeats { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 13px; max-width: 56em; }
.band .bfeat { font-size: .82rem; color: rgba(255,255,255,.78); }
.band .bfeat::before { content: "—"; color: #7da7d4; margin-right: 7px; }
.band img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: brightness(.62) saturate(.9);
  transition: transform .8s var(--ease), filter .5s var(--ease);
}
.band::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(16,26,38,.72) 0%, rgba(16,26,38,.25) 55%, rgba(16,26,38,.05) 100%);
}
.band:hover img { transform: scale(1.04); filter: brightness(.75) saturate(1); }
.band .vlabel {
  position: relative; z-index: 2; writing-mode: vertical-rl; transform: rotate(180deg);
  margin: 0 26px 0 30px; font-family: var(--font-mono); font-size: .66rem;
  letter-spacing: .32em; text-transform: uppercase; color: rgba(255,255,255,.55);
  white-space: nowrap;
}
.band .btext { position: relative; z-index: 2; }
.band .bname, .band .bclaim { display: block; }
.band .bname {
  font-family: var(--font-display); font-weight: 800; color: #fff;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem); letter-spacing: -.01em; line-height: 1.05;
}
.band .bname .accentword { color: #8fb8e0; }
.band .bclaim { color: rgba(255,255,255,.82); font-size: .95rem; margin-top: 6px; max-width: 46em; }
.band .bbtns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.band .bbtn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: .82rem;
  padding: 8px 18px; border-radius: 999px; border: 1.5px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.band .bbtn.solid { background: #fff; color: #16324f; }
.band .bbtn.solid:hover { background: #e8f0f8; }
.band .bbtn.line { border-color: rgba(255,255,255,.55); color: #fff; background: transparent; }
.band .bbtn.line:hover { border-color: #fff; background: rgba(255,255,255,.08); }
@media (max-width: 860px) {
  .band { height: auto; min-height: 150px; padding: 22px 0; }
  .band .vlabel { display: none; }
  .band .btext { padding-left: 22px; padding-right: 18px; }
  .band .bclaim { display: none; }
  .band .bbtns { margin-top: 10px; }
}

/* ── Blog ─────────────────────────────────────────────────────────────── */
.postlist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.postcard {
  display: block; text-decoration: none; background: var(--card);
  border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 6px;
  padding: 28px; transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.postcard:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(20,40,60,.12); }
.postcard .pdate { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-soft); letter-spacing: .1em; }
.postcard h3 { font-weight: 700; font-size: 1.2rem; margin: 10px 0 8px; color: var(--ink); }
.postcard p { color: var(--ink-soft); font-size: .95rem; }
.postcard .pmore { color: var(--accent); font-weight: 600; font-size: .9rem; display: inline-block; margin-top: 14px; }
.prose { max-width: 46em; }
.prose p { margin-bottom: 1.1em; }
.prose h2 { font-size: 1.4rem; margin: 1.6em 0 .5em; }
.prose ul { margin: 0 0 1.1em 1.2em; }
.prose li { margin-bottom: .4em; }
.prose a { color: var(--accent); }
.prose .pquote { border-left: 3px solid var(--accent); padding-left: 18px; color: var(--ink-soft); margin: 1.4em 0; font-size: 1.05rem; }
@media (max-width: 860px) { .postlist { grid-template-columns: 1fr; } }

/* ── Motion: solo dove parla — niente fade-up generico ────────────────── */
.reveal { opacity: 1; transform: none; }
.products .product { opacity: 0; transform: translateY(10px); transition: opacity .55s var(--ease), transform .55s var(--ease), border-color var(--dur) var(--ease); }
.products .product.in { opacity: 1; transform: none; }
.products .product:nth-child(2).in { transition-delay: .08s; }
.products .product:nth-child(3).in { transition-delay: .16s; }
.products .product:nth-child(4).in { transition-delay: .24s; }
.products .product:nth-child(5).in { transition-delay: .32s; }
.chip:active { transform: scale(.97); }
.btn:active { transform: translateY(0) scale(.98); }

/* Tavola tecnica: quote e didascalie della macchina */
.machine text { user-select: none; }
.machine .dim { stroke: var(--ink-soft); stroke-width: 1; }
.machine .dim-label { font-size: 10px; fill: var(--ink-soft); letter-spacing: .08em; }

/* ── Mobile: progettato, non ristretto ────────────────────────────────── */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .page-hero .wrap { grid-template-columns: 1fr; gap: 26px; }
  .benefits, .beforeafter { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 48px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 30px; }
  .hero p.lead { font-size: 1.02rem; }
  /* su telefono la macchina diventa una vignetta compatta sotto il titolo */
  .machine { max-width: 300px; margin: 0 auto; }
  .machine .dim, .machine .dim-label { display: none; }
  .cta-row { flex-direction: column; }
  .cta-row .btn { text-align: center; width: 100%; }
  header.site .wrap { height: 56px; }
  nav.main { display: none; }
  section { padding: 48px 0; }
  .trio, .reasons { grid-template-columns: 1fr; gap: 14px; }
  .trio .piece { padding: 20px; }
  .products { grid-template-columns: 1fr; gap: 14px; }
  .product { padding: 22px; }
  .product.flagship { grid-column: span 1; }
  .product p { font-size: .92rem; }
  /* la tabella tagli su telefono diventa schede impilate */
  table.cuts, table.cuts tbody, table.cuts tr, table.cuts td { display: block; width: 100%; }
  table.cuts thead { display: none; }
  table.cuts tr { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 6px 0; background: var(--card); }
  table.cuts td { border: 0; padding: 6px 16px; }
  table.cuts td.cut-name { padding-top: 12px; }
  .contact-box { padding: 24px; }
  .demo-overlay { padding: 0; }
  .demo-shell { border-radius: 0; min-height: 100vh; }
  .demo-body { padding: 16px; }
  .msg { max-width: 88%; }
}

/* ── Overrides pelle CH: linguaggio weare.ag-tech.ch ──────────────────── */
body.brand-ch { --radius: 16px; }
body.brand-ch .btn { border-radius: 999px; font-weight: 600; font-family: var(--font-body); }
body.brand-ch .kicker {
  font-family: var(--font-body); font-weight: 600; font-size: .78rem;
  letter-spacing: .22em; color: var(--ink-soft);
}
body.brand-ch h1 { font-family: var(--font-body); font-weight: 300; letter-spacing: -.02em; line-height: 1.16; font-size: clamp(2rem, 3.8vw, 3rem); }
body.brand-ch h1 strong { font-weight: 600; }
body.brand-ch .typed { display: inline-block; min-width: 8.5ch; }

/* menu principale: presente, con sottolineatura blu animata */
body.brand-ch nav.main { gap: 26px; }
body.brand-ch nav.main a {
  color: var(--ink); font-weight: 600; font-size: .95rem;
  position: relative; padding: 6px 0;
}
body.brand-ch nav.main a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--accent); transition: right .3s var(--ease);
}
body.brand-ch nav.main a:hover { color: var(--accent); }
body.brand-ch nav.main a:hover::after { right: 0; }
body.brand-ch nav.main a[href*="conformita"] {
  background: #e3eefb; color: var(--accent); padding: 6px 14px; border-radius: 999px;
}
body.brand-ch nav.main a[href*="conformita"]::after { display: none; }
body.brand-ch nav.main a[href*="conformita"]:hover { background: #cfe2f6; }

/* card stile "Sito Web": riga blu spessa, hover con vita */
body.brand-ch .trio .piece {
  border: 1px solid var(--line); border-top: 3px solid var(--accent);
  border-radius: 6px; box-shadow: 0 1px 2px rgba(20,40,60,.04);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
body.brand-ch .trio .piece:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(20,40,60,.12); }
body.brand-ch .trio .piece .tag { color: var(--ink-soft); letter-spacing: .18em; font-family: var(--font-body); font-weight: 600; font-size: .72rem; }
body.brand-ch .trio .piece h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.12rem; }

/* sezioni scure alternate */
body.brand-ch section.darkband { background: #142a40; }
body.brand-ch section.darkband h2 { color: #fff; }
body.brand-ch section.darkband .section-intro { color: #b9c7d6; }
body.brand-ch section.darkband .trio .piece {
  background: #1b3450; border-color: rgba(255,255,255,.1); border-top-color: #7da7d4;
  box-shadow: none;
}
body.brand-ch section.darkband .trio .piece:hover { box-shadow: 0 14px 32px rgba(0,0,0,.35); }
body.brand-ch section.darkband .trio .piece .tag { color: #7da7d4; }
body.brand-ch section.darkband .trio .piece h3 { color: #fff; }
body.brand-ch section.darkband .trio .piece p { color: #b9c7d6; }

/* animazioni d'ingresso: card e grafici */
body.brand-ch .trio .piece, body.brand-ch .chartcard {
  opacity: 0; transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease), box-shadow .35s var(--ease);
}
body.brand-ch .trio .piece.in, body.brand-ch .chartcard.in { opacity: 1; transform: none; }
body.brand-ch .trio .piece:nth-child(2) { transition-delay: .1s; }
body.brand-ch .trio .piece:nth-child(3) { transition-delay: .2s; }
body.brand-ch .trio .piece.in:hover { transform: translateY(-4px); transition-delay: 0s; }
.chartcard svg rect { transform-box: fill-box; transform-origin: left center; transform: scaleX(0); transition: transform 1s var(--ease); }
.chartcard svg text { opacity: 0; transition: opacity .5s var(--ease) .7s; }
.chartcard.in svg rect { transform: scaleX(1); }
.chartcard.in svg text { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  body.brand-ch .trio .piece, body.brand-ch .chartcard { opacity: 1; transform: none; }
  .chartcard svg rect { transform: scaleX(1); } .chartcard svg text { opacity: 1; }
}

/* ── Impatto: ingresso orchestrato dell'hero ──────────────────────────── */
@keyframes agRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
body.brand-ch .hero .kicker   { animation: agRise .7s var(--ease) both .05s; }
body.brand-ch .hero h1        { animation: agRise .7s var(--ease) both .15s; }
body.brand-ch .hero .lead     { animation: agRise .7s var(--ease) both .3s; }
body.brand-ch .hero .cta-row  { animation: agRise .7s var(--ease) both .45s; }
body.brand-ch .hero .proofline{ animation: agRise .7s var(--ease) both .6s; }
body.brand-ch .hero .photo    { animation: agRise .9s var(--ease) both .25s; }
@keyframes agBreathe { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
body.brand-ch h1 .bluedot { animation: agBreathe 2.6s ease-in-out infinite .9s; }
body.brand-ch .hero .photo {
  border-radius: 16px; border: 0;
  box-shadow: 0 34px 80px rgba(20,42,64,.28);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
body.brand-ch .hero .photo:hover { transform: translateY(-5px); box-shadow: 0 44px 96px rgba(20,42,64,.34); }

/* filigrana gigante nelle sezioni scure */
body.brand-ch section.darkband { position: relative; overflow: hidden; }
body.brand-ch section.darkband::before {
  content: attr(data-word); position: absolute; right: -6px; bottom: -22px;
  font-family: var(--font-display); font-weight: 800; font-size: clamp(4rem, 11vw, 9rem);
  line-height: 1; letter-spacing: -.03em; color: rgba(255,255,255,.05);
  pointer-events: none; white-space: nowrap;
}
body.brand-ch section.darkband .wrap { position: relative; z-index: 1; }

/* topbar rifinita */
body.brand-ch .topbar .topbar-links { display: inline-flex; gap: 20px; }
body.brand-ch .topbar .langsel { display: inline-flex; gap: 11px; margin-right: 24px; font-size: .78rem; }
body.brand-ch .topbar .langsel a { opacity: .8; }
body.brand-ch .topbar .langsel a:hover { opacity: 1; text-decoration: underline; }
body.brand-ch .topbar .langsel strong { border-bottom: 2px solid #fff; }
body.brand-ch .topbar .topbar-links a { display: inline-flex; align-items: center; gap: 7px; }
body.brand-ch .topbar .topbar-links a:first-child::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #7de08f;
  animation: agBreathe 2.2s ease-in-out infinite;
}
body.brand-ch .topbar a:hover { text-decoration: underline; }
@media (max-width: 860px) {
  body.brand-ch .topbar .wrap > span:first-child { display: none; }
  body.brand-ch section.darkband::before { font-size: 3.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  body.brand-ch .hero .kicker, body.brand-ch .hero h1, body.brand-ch .hero .lead,
  body.brand-ch .hero .cta-row, body.brand-ch .hero .proofline, body.brand-ch .hero .photo,
  body.brand-ch h1 .bluedot { animation: none; }
}
body.brand-ch h2 { font-weight: 700; }
body.brand-ch .bluedot { color: var(--accent); }
body.brand-ch .typed { color: #6f9fd8; font-weight: 600; border-right: 3px solid #6f9fd8; padding-right: 3px; }
body.brand-ch .product.flagship {
  background: var(--accent); border-color: var(--accent); color: #fff; border-radius: 24px;
}
body.brand-ch .product.flagship .sector, body.brand-ch .product.flagship p { color: #cfe0f0; }
body.brand-ch .product.flagship .btn { background: #fff; color: var(--accent); }
body.brand-ch .topbar {
  background: var(--accent); color: #fff; font-size: .82rem;
}
body.brand-ch .topbar .wrap { display: flex; justify-content: space-between; padding-top: 7px; padding-bottom: 7px; }
body.brand-ch .topbar a { color: #fff; text-decoration: none; }
body.brand-ch footer.site { border-top: 1px solid var(--line); }

/* logo AG ufficiale + "we are." */
body.brand-ch .logo { display: inline-flex; flex-direction: column; line-height: 1.05; color: #93928e; text-decoration: none; }
body.brand-ch .logo .lrow { display: inline-flex; align-items: baseline; gap: 5px; }
body.brand-ch .logo .agimg { height: 26px; width: auto; align-self: center; }
body.brand-ch .logo .agrest { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: #93928e; }
body.brand-ch .logo .tagline {
  font-size: .58rem; font-weight: 400; color: #9e9e9e; letter-spacing: .08em; margin-top: 2px;
}
@media (max-width: 860px) {
  body.brand-ch .hero::after { display: none; }
}

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