/* K-Studio — stile del sito
   Font: per ora font di sistema. TODO: scegliere un font e ospitarlo in locale (niente Google Fonts remoti, per il GDPR). */

:root {
  --paper: #f5f3ee;
  --paper-2: #ebe8e0;
  --ink: #15181d;
  --ink-2: #3c424b;
  --muted: #6b717a;
  --line: #d9d5cb;
  --accent: #ff5b1f;      /* arancione "sicurezza" industriale */
  --accent-ink: #c73d0b;
  --dark: #15181d;
  --radius: 14px;
  --font: "Helvetica Neue", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.2rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); letter-spacing: -0.03em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 820px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 1.2em;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); }

/* Bottoni */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .95em 1.5em; border-radius: 999px; border: 2px solid var(--ink);
  background: var(--ink); color: #fff; font: inherit; font-weight: 600; font-size: .98rem;
  text-decoration: none; cursor: pointer; transition: transform .15s, background .15s, border-color .15s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.btn-small { padding: .6em 1.1em; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { color: #fff; }
.link-arrow { font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.link-arrow::after { content: " →"; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: inline-flex; align-items: center; gap: .45em; text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.logo-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  background: var(--ink); color: var(--paper); font-weight: 800; position: relative;
}
.logo-mark::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--paper); }
.logo-light .logo-mark { background: var(--paper); color: var(--ink); }
.logo-light .logo-mark::after { border-color: var(--dark); }
.nav { display: flex; align-items: center; gap: 2rem; }
.nav a:not(.btn) { text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ink-2); }
.nav a:not(.btn):hover { color: var(--ink); }
.nav-toggle { display: none; }

/* Hero */
.hero { padding: 72px 0 96px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 34em; margin-bottom: 2em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.6rem; }
.hero-points { list-style: none; padding: 0; margin: 2.4em 0 0; display: flex; flex-wrap: wrap; gap: .6em 1.6em; color: var(--ink-2); font-size: .93rem; }
.hero-points li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: .45em; }

.hero-visual { position: relative; padding: 0 0 48px 40px; }
.hero-photo {
  margin: 0; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 4.4;
  box-shadow: 0 50px 90px -40px rgba(21,24,29,.55);
}
.hero-photo { position: relative; background: var(--dark); }
.hero-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.12);
  transition: opacity 1.4s ease, transform 7s ease-out;
}
.hero-photo img.is-active { opacity: 1; transform: scale(1); }

/* La chat cambia insieme alla foto: le slide sono sovrapposte, l'altezza è quella della più lunga */
.float-chat { display: grid; }
.fc-slide { grid-area: 1 / 1; opacity: 0; transform: translateY(8px); transition: opacity .6s ease, transform .6s ease; }
.fc-slide.is-active { opacity: 1; transform: none; transition-delay: .5s; }

.float {
  position: absolute; background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-radius: 18px; box-shadow: 0 24px 50px -20px rgba(21,24,29,.45); font-size: .88rem;
}
.float-chat { left: 0; bottom: 0; width: min(86%, 380px); padding: 18px; }
.fc-q { margin: 0 0 12px auto; width: fit-content; max-width: 88%; background: var(--dark); color: var(--paper); padding: 10px 14px; border-radius: 14px 14px 4px 14px; }
.fc-a { margin: 0; display: flex; gap: 10px; color: var(--ink-2); line-height: 1.5; }
.fc-a strong { color: var(--ink); }
.fc-a .chat-dot { width: 22px; height: 22px; margin-top: 2px; }

/* Sezioni */
.section { padding: 104px 0; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head p:not(.eyebrow) { color: var(--ink-2); font-size: 1.08rem; }

.problem { background: #fff; border-block: 1px solid var(--line); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card { padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.card p { color: var(--ink-2); margin: 0; }
.num { display: block; font-weight: 700; color: var(--accent); font-size: .9rem; margin-bottom: 1.4em; letter-spacing: .05em; }

.service { padding: 36px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); position: relative; transition: transform .2s, box-shadow .2s; }
.service:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -28px rgba(21,24,29,.35); }
.service::before { content: ""; display: block; width: 36px; height: 4px; background: var(--accent); border-radius: 2px; margin-bottom: 24px; }
.service p { color: var(--ink-2); margin: 0; }

.sectors { margin-top: 56px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.sectors-label { margin: 0; font-weight: 600; font-size: .95rem; }
.sectors ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sectors li { padding: .45em 1em; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; color: var(--ink-2); background: #fff; }

/* AI */
.ai { background: var(--paper-2); }
.ai-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 72px; align-items: center; margin-bottom: 64px; }
.ai-copy p:not(.eyebrow) { color: var(--ink-2); font-size: 1.06rem; }
.ai-copy em { font-style: normal; color: var(--ink); background: #fff; padding: 0 .25em; border-radius: 4px; }
.chat { background: #fff; border-radius: 18px; padding: 28px; box-shadow: 0 40px 80px -40px rgba(21,24,29,.4), 0 0 0 1px rgba(21,24,29,.05); font-size: .95rem; }
.chat-q { margin-left: auto; max-width: 85%; background: var(--dark); color: var(--paper); padding: 14px 18px; border-radius: 16px 16px 4px 16px; margin-bottom: 22px; }
.chat-a { display: flex; gap: 14px; }
.chat-dot { flex: none; width: 28px; height: 28px; border-radius: 50%; background: conic-gradient(from 90deg, var(--accent), #ffb08f, var(--accent)); }
.chat-a p { margin: 0 0 .8em; color: var(--ink-2); }
.chat-hit { background: var(--paper); border-left: 3px solid var(--accent); padding: 12px 14px; border-radius: 0 10px 10px 0; color: var(--ink) !important; }
.chat-faded { color: #b4b0a8 !important; }
.chat-caption { margin: 14px 0 0; font-size: .75rem; color: var(--muted); text-align: right; }
.ai-checks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.ai-checks > div { padding-top: 22px; border-top: 2px solid var(--ink); }
.ai-checks p { color: var(--ink-2); margin: 0; font-size: .95rem; }

.checkup { margin-top: 56px; display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: center; background: var(--dark); color: var(--paper); border-radius: 20px; padding: 48px; position: relative; }
.checkup .plan-tag { position: static; display: inline-block; margin-bottom: 18px; }
.checkup h3 { font-size: 1.8rem; }
.checkup-copy > p { color: rgba(245,243,238,.75); max-width: 36em; }
.checkup ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; font-size: .95rem; }
.checkup li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: .6em; }
.checkup-price { border-left: 1px solid rgba(255,255,255,.14); padding-left: 48px; }
.checkup-meta { color: rgba(245,243,238,.6); font-size: .9rem; }
.checkup .btn { background: var(--accent); border-color: var(--accent); }
.checkup .btn:hover { background: #fff; border-color: #fff; color: var(--ink); }

/* Metodo */
.dark { background: var(--dark); color: var(--paper); }
.dark .eyebrow { color: var(--accent); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid rgba(255,255,255,.14); }
.steps li { padding: 32px 28px 0 0; position: relative; }
.steps li + li { padding-left: 28px; border-left: 1px solid rgba(255,255,255,.14); }
.step-n { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); font-weight: 700; margin-bottom: 22px; }
.steps p { color: rgba(245,243,238,.7); margin: 0; font-size: .97rem; }

/* Prezzi */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 36px 32px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); position: relative; }
.plan.featured { background: var(--dark); color: var(--paper); border-color: var(--dark); transform: translateY(-12px); box-shadow: 0 40px 60px -36px rgba(21,24,29,.6); }
.plan-tag { position: absolute; top: -13px; left: 32px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .35em .9em; border-radius: 999px; margin: 0; }
.plan-desc { color: var(--muted); font-size: .95rem; min-height: 3.2em; }
.featured .plan-desc { color: rgba(245,243,238,.65); }
.price { font-size: 3rem; font-weight: 700; letter-spacing: -0.04em; margin: .2em 0 .5em; line-height: 1; }
.price span { font-size: 1.4rem; vertical-align: top; margin-right: 4px; position: relative; top: 6px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 32px; flex: 1; }
.plan li { padding: .55em 0; border-top: 1px solid var(--line); font-size: .95rem; }
.featured li { border-color: rgba(255,255,255,.12); }
.plan li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: .6em; }
.featured .btn { background: var(--accent); border-color: var(--accent); }
.featured .btn:hover { background: #fff; border-color: #fff; color: var(--ink); }

.extras { margin-top: 48px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; }
.extras div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .96rem; }
.extras span { color: var(--ink-2); }
.extras strong { white-space: nowrap; }
.note { margin-top: 24px; color: var(--muted); font-size: .9rem; }

/* Perché */
.why { background: var(--paper-2); }
.why-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 72px; }
.why-list > div { padding: 24px 0; border-top: 1px solid var(--line); }
.why-list > div:first-child { border-top: 0; padding-top: 0; }
.why-list p { color: var(--ink-2); margin: 0; }

/* FAQ */
details { border-bottom: 1px solid var(--line); }
summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; font-weight: 600; font-size: 1.08rem; position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 400; color: var(--accent); transition: transform .2s; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { color: var(--ink-2); padding-bottom: 22px; margin: 0; max-width: 46em; }

/* Contatti */
.contact { background: var(--dark); color: var(--paper); }
.contact .eyebrow { color: var(--accent); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: start; }
.contact-copy p { color: rgba(245,243,238,.75); font-size: 1.08rem; }
.contact-direct a { color: var(--paper); font-weight: 600; }
.form { background: var(--paper); color: var(--ink); padding: 36px; border-radius: 18px; display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.form small { font-weight: 400; color: var(--muted); }
.form input:not([type="checkbox"]), .form textarea {
  font: inherit; font-weight: 400; padding: .8em 1em; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); width: 100%;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.form .check { display: flex; align-items: center; gap: .6em; font-weight: 400; }
.form .check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form .btn { justify-self: start; }
.form .btn:hover { color: #fff; }

/* Footer */
.site-footer { background: #0e1013; color: rgba(245,243,238,.6); padding: 40px 0; font-size: .88rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-inner p { margin: 0; }
.site-footer .logo { color: var(--paper); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Responsive */
@media (max-width: 980px) {
  .hero-grid, .why-grid, .contact-grid, .ai-grid { grid-template-columns: 1fr; gap: 56px; }
  .ai-checks { grid-template-columns: 1fr 1fr; }
  .checkup { grid-template-columns: 1fr; gap: 32px; padding: 36px; }
  .checkup-price { border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,.14); padding-top: 28px; }
  .hero-visual { max-width: 560px; }
  .pricing, .grid-3 { grid-template-columns: 1fr; }
  .plan.featured { transform: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { border-left: 0; padding-left: 0; }
  .steps li { padding-bottom: 32px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 72px 0; }
  .hero { padding: 40px 0 72px; }
  .nav-toggle { display: inline-flex; font: inherit; font-weight: 600; background: none; border: 1px solid var(--ink); border-radius: 999px; padding: .45em 1em; cursor: pointer; }
  .nav { position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 24px 24px; display: none; }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 16px; }
  .grid-2, .extras, .form-row, .steps, .ai-checks, .checkup ul { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding-left: 0; border-left: 0; border-bottom: 1px solid rgba(255,255,255,.14); }
  .hero-visual { padding: 0 0 64px; }
  .hero-photo { aspect-ratio: 4 / 5; }
  .float { font-size: .82rem; }
  .float-chat { left: 8px; width: calc(100% - 16px); }
  .form { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
