@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap');

:root {
  --ink: #14151A;
  --ink-dark: #1B1E3D;
  --muted: #5B6472;
  --border: #E3E6EC;
  --bg-soft: #F6F7FB;
  --accent: #5B4FE0;
  --accent-hover: #4a40c0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, sans-serif;
  color: var(--ink);
  background: #FFFFFF;
}
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #33417A; }
a, button { transition: background-color .15s ease-out, color .15s ease-out, box-shadow .15s ease-out, transform .15s ease-out, border-color .15s ease-out; }
input, textarea, select { transition: border-color .15s ease-out, box-shadow .15s ease-out; font-family: Inter, sans-serif; }
h1, h2, h3 { font-family: Sora, sans-serif; color: var(--ink-dark); margin: 0; }

@keyframes dc-fade-slide-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dc-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { background: var(--accent-hover); color: #FFFFFF; transform: translateY(-1px); }
.btn-link { font-size: 16px; font-weight: 600; color: var(--accent); border-bottom: 1px solid transparent; }
.btn-link:hover { border-bottom-color: currentColor; }
.link-arrow { font-size: 16px; font-weight: 600; color: var(--accent); }
.link-arrow:hover { text-decoration: underline; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #FFFFFF; border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo-link { display: flex; align-items: center; }
.logo-img { height: 32px; display: block; }
.mnav-toggle { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 8px; background: #FFFFFF; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.mnav-toggle span { width: 20px; height: 2px; background: var(--ink-dark); display: block; transition: transform .2s ease-out, opacity .2s ease-out; }
.mnav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mnav-toggle.open span:nth-child(2) { opacity: 0; }
.mnav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.desktop-nav { display: flex; align-items: center; gap: 32px; }
.desktop-nav > a { font-size: 15px; font-weight: 500; color: var(--ink); }
.desktop-nav > a.active { color: var(--accent); }
.btn-nav { padding: 12px 24px !important; font-size: 15px !important; white-space: nowrap; }

.nav-dropdown { position: relative; }
.dropdown-trigger { font-size: 15px; font-weight: 500; color: var(--ink); }
.dropdown-trigger.active { color: var(--accent); }
.dropdown-panel {
  position: absolute; top: 100%; left: 0; padding-top: 10px; min-width: 248px;
  display: none; animation: dc-fade-slide-in .15s ease-out;
}
.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel,
.nav-dropdown.open .dropdown-panel { display: flex; }
.dropdown-panel { flex-direction: column; }
.dropdown-panel > a {
  padding: 7px 12px; border-radius: 6px; color: var(--ink); display: flex; flex-direction: column; gap: 2px;
  background: #FFFFFF;
}
.dropdown-panel { background: #FFFFFF; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 4px 16px rgba(20,21,26,0.08); padding: 8px; }
.dropdown-panel > a:hover, .dropdown-panel > a:focus { background: var(--bg-soft); }
.ddx-title { font-size: 14px; font-weight: 500; }
.ddx-sub { font-size: 11px; font-weight: 500; }

.mobile-nav { display: none; flex-direction: column; padding: 8px 24px 24px; gap: 4px; border-top: 1px solid var(--border); background: #FFFFFF; animation: dc-fade-slide-in .18s ease-out; }
.mobile-nav > a { padding: 14px 4px; font-size: 16px; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--border); display: block; }
.mobile-nav > a.mnav-sub { padding-left: 20px; font-size: 15px; color: var(--muted); }
.btn-nav-mobile { margin-top: 12px; text-align: center; border-bottom: none !important; }
.mobile-nav.open { display: flex; }
body.mnav-open { overflow: hidden; }

@media (max-width: 899px) {
  .desktop-nav { display: none; }
  .mnav-toggle { display: flex; }
}

/* Layout helpers */
main, article.product-page { display: block; }
.hero { max-width: 1200px; margin: 0 auto; padding: 96px 24px 80px; display: flex; flex-wrap: wrap; align-items: center; gap: 48px; }
.hero-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero-title { font-weight: 700; font-size: clamp(1.9rem, 4.2vw, 3rem); line-height: 1.15; }
.hero-lead { font-size: 1.15rem; line-height: 1.6; color: var(--muted); margin: 0; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.hero-media { flex: 1 1 380px; min-width: 0; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.hero-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 480px) { .hero-title { font-size: 1.65rem !important; } }

.band { background: var(--bg-soft); padding: 64px 24px; }
.band-inner { max-width: 900px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 40px; }
.band-copy { flex: 1 1 320px; min-width: 0; }
.band-copy h2, .band-plain-inner h2 { font-weight: 600; font-size: 1.5rem; margin: 0 0 12px; }
.band-copy p { font-size: 1.05rem; line-height: 1.6; margin: 0; }
.band-media { flex: 1 1 260px; min-width: 0; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.band-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.band-plain-inner { max-width: 900px; margin: 0 auto; }
.band-plain-inner.center { max-width: 760px; text-align: center; }
.band-plain-inner p { font-size: 1.05rem; line-height: 1.6; margin: 0; }
.band-plain-inner .pp-pair + .pp-pair { margin-top: 40px; }

.band-dark { background: var(--ink-dark); padding: 80px 24px; }
.band-dark-inner { max-width: 760px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.band-dark-inner h2 { color: #FFFFFF; font-size: 1.85rem; }
.band-dark-inner p { color: #C7CADA; font-size: 1.05rem; line-height: 1.6; margin: 0; max-width: 560px; }

.section { max-width: 1200px; margin: 0 auto; padding: 96px 24px; }
.section-narrow { max-width: 760px; }
.section.center, .center { text-align: center; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h1, .section-head h2 { font-weight: 600; font-size: 2rem; margin: 0 0 12px; }
.section-head p { font-size: 1.1rem; color: var(--muted); margin: 0; }
.section > h2.center { text-align: center; font-size: 2rem; margin-bottom: 40px; }
.lead-block { font-size: 1.05rem; line-height: 1.6; margin: 0 0 24px; }

.card-grid { display: grid; gap: 24px; }
.card-grid-main { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-bottom: 24px; }
.card-grid-small { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { text-decoration: none; color: inherit; border: 1px solid var(--border); border-radius: 10px; background: #FFFFFF; display: block; }
.card:hover { box-shadow: 0 4px 16px rgba(20,21,26,0.08); transform: translateY(-2px); border-color: var(--accent); }
.card:hover { border-color: var(--accent); }
.card-main { padding: 32px; }
.card-small { padding: 24px; }
.card-dot { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); margin-bottom: 16px; }
.card-logo { width: 32px; height: 32px; object-fit: contain; border-radius: 8px; margin-bottom: 14px; display: block; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, white); padding: 4px 10px; border-radius: 6px; margin-bottom: 12px; }
.card[style*="--accent"] .badge { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, white); }
.card h3 { font-size: 1.4rem; margin: 0 0 8px; }
.card-small h3 { font-size: 1.2rem; }
.card p { font-size: 1rem; line-height: 1.5; color: var(--muted); margin: 0 0 16px; }
.card-small p { font-size: 0.95rem; margin: 0 0 14px; }
.card-cta { font-size: 14px; font-weight: 600; color: var(--accent); }
.card-small .card-cta { font-size: 13px; }
.section-more { text-align: center; margin-top: 32px; }

.sector-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.sector-box { background: var(--bg-soft); border-radius: 10px; padding: 20px; }
.sector-box h3 { font-size: 1.05rem; margin: 0 0 6px; }
.sector-box p { font-size: 0.9rem; line-height: 1.5; color: var(--muted); margin: 0; }
.sector-link { text-decoration: none; color: inherit; display: block; border: 1px solid var(--border); background: #FFFFFF; }
.sector-link p { margin: 0 0 8px; }
.sector-link:hover { box-shadow: 0 4px 16px rgba(20,21,26,0.08); transform: translateY(-2px); border-color: var(--accent); }

.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.why-grid h3 { font-size: 1.15rem; margin: 0 0 8px; }
.why-grid p { font-size: 0.95rem; line-height: 1.5; color: var(--muted); margin: 0; }

.text-stack { display: flex; flex-direction: column; gap: 18px; }
.text-stack p { font-size: 1.05rem; line-height: 1.6; margin: 0; }

/* Soluzioni list */
.sol-list { max-width: 1000px; margin: 0 auto; padding: 32px 24px 96px; display: flex; flex-direction: column; gap: 24px; }
.sol-row { text-decoration: none; color: inherit; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 10px; padding: 32px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.sol-row:hover { box-shadow: 0 4px 16px rgba(20,21,26,0.08); transform: translateY(-2px); }
.sol-row-left { flex: 1 1 280px; }
.sol-row-left h3 { font-size: 1.4rem; margin: 0 0 8px; }
.sol-row-left p { font-size: 0.95rem; line-height: 1.5; color: var(--muted); margin: 0; }
.sol-row-right { flex: 1 1 320px; display: flex; flex-direction: column; gap: 10px; }
.sol-row-right p { font-size: 0.95rem; margin: 0; }
.sol-row-right strong { color: var(--ink-dark); }
.row-logo { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; margin-bottom: 10px; display: block; }

/* Contact page */
.contact-grid { max-width: 1000px; margin: 0 auto; padding: 0 24px 96px; display: flex; flex-wrap: wrap; gap: 48px; }
.contact-form-wrap { flex: 1 1 420px; min-width: 0; }
#contact-form { display: flex; flex-direction: column; gap: 20px; border: 1px solid var(--border); border-radius: 10px; padding: 32px; animation: dc-fade-in .2s ease-out; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; color: var(--ink); }
.field input, .field textarea, .field select { border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; font-size: 15px; background: #FFFFFF; }
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; }
.field input.error { border-color: #C1401D; }
.field-error { font-size: 13px; color: #C1401D; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-error { border: 1px solid #C1401D; border-radius: 8px; padding: 12px 16px; background: color-mix(in srgb, #C1401D 8%, white); font-size: 14px; color: #8A2E14; }
#submit-btn { background: var(--accent); color: #FFFFFF; font-weight: 600; font-size: 16px; padding: 14px 28px; border-radius: 8px; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
#submit-btn:hover { background: var(--accent-hover); }
#submit-btn[disabled] { opacity: 0.75; cursor: default; }
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); border-top-color: #FFFFFF; display: block; animation: dc-spin .6s linear infinite; }
.form-success { flex: 1 1 420px; min-width: 0; border: 1px solid #2E8B57; border-radius: 10px; padding: 32px; background: color-mix(in srgb, #2E8B57 8%, white); animation: dc-fade-in .25s ease-out; }
.form-success h3 { font-size: 1.3rem; margin: 0 0 8px; }
.form-success p { font-size: 1rem; margin: 0; }
.contact-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.contact-side h3 { font-size: 1.1rem; margin: 0 0 12px; }
.contact-links { display: flex; flex-direction: column; gap: 8px; font-size: 1rem; }
.contact-links a:nth-child(3) { color: var(--ink); }
.map-frame { width: 100%; height: 220px; border: 1px solid var(--border); border-radius: 10px; }

/* Product page */
.pp-hero { max-width: 1200px; margin: 0 auto; padding: 64px 24px 80px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.pp-hero-copy { flex: 1 1 420px; min-width: 0; }
.pp-hero-copy h1 { font-weight: 700; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: 0 0 16px; }
.pp-promise { font-size: 1.25rem; font-weight: 500; line-height: 1.4; color: #33417A; margin: 0 0 16px; }
.pp-description { font-size: 1.05rem; line-height: 1.6; color: var(--muted); margin: 0 0 32px; max-width: 520px; }
.pp-external { font-size: 15px; font-weight: 600; border-bottom: 1px solid transparent; }
.pp-external:hover { border-bottom-color: currentColor; }
.pp-hero-visual { flex: 1 1 380px; min-width: 0; }
.pp-hero-media { aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); box-shadow: 0 4px 16px rgba(20,21,26,0.06); border-left: 4px solid var(--accent); }
.pp-hero-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pp-hero-placeholder { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: 0 4px 16px rgba(20,21,26,0.06); border-left: 4px solid var(--accent); }
.pp-window-bar { background: var(--bg-soft); padding: 10px 14px; display: flex; gap: 6px; border-bottom: 1px solid var(--border); }
.pp-window-bar span { width: 9px; height: 9px; border-radius: 50%; background: var(--border); display: block; }
.pp-window-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.pp-bar { height: 14px; width: 55%; opacity: 0.25; border-radius: 4px; }
.pp-field { height: 36px; background: var(--bg-soft); border-radius: 6px; border: 1px solid var(--border); }
.pp-line { height: 10px; width: 40%; background: var(--border); border-radius: 4px; margin-top: 6px; }
.pp-placeholder-note { font-size: 12px; color: var(--muted); font-style: italic; margin: 10px 4px 0; }
.pp-pair h2 { font-weight: 600; font-size: 1.75rem; margin: 0 0 12px; }
.pp-pair p { color: var(--ink); }
.pp-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.pp-benefit { display: flex; gap: 12px; align-items: flex-start; }
.pp-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 8px; flex-shrink: 0; }
.pp-benefit p { font-size: 1rem; line-height: 1.5; margin: 0; }
.pp-two-col { display: flex; flex-wrap: wrap; gap: 48px; }
.pp-two-col > div { flex: 1 1 380px; min-width: 0; }
.pp-two-col h2 { font-weight: 600; font-size: 1.75rem; margin: 0 0 20px; }
.pp-features { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.pp-features li { font-size: 1rem; line-height: 1.5; padding-left: 18px; position: relative; }
.pp-features li::before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; background: var(--accent, #5B4FE0); border-radius: 50%; }
.pp-note { margin-top: 16px; border: 1px dashed #B2B6CA; border-radius: 8px; padding: 14px 16px; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); background: #FFFFFF; }
.pp-two-col > div:last-child p { font-size: 1.05rem; line-height: 1.6; }

/* Footer */
.site-footer { background: var(--ink-dark); color: #FFFFFF; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 64px 24px 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 32px; }
.footer-brand { font-family: Sora, sans-serif; font-weight: 700; font-size: 20px; margin-bottom: 12px; color: #FFFFFF; }
.footer-tagline { font-size: 14px; line-height: 1.6; color: #C7CADA; max-width: 280px; margin: 0; }
.footer-heading { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #8B90AC; margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: #E3E6EC; }
.footer-links a:hover { color: #FFFFFF; }
.footer-social { display: flex; gap: 14px; margin-top: 18px; }
.footer-social a { font-size: 13px; color: #8B90AC; }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding: 24px 24px; border-top: 1px solid #2C2F55; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 12px; color: #8B90AC; }
