/* Codewaru prototype — brand tokens */
:root {
  /* Brand */
  --brand: #e55b00;
  --brand-bright: #ff6600;
  --brand-deep: #c44a00;
  --brand-soft: rgba(229, 91, 0, 0.14);
  --brand-glow: rgba(255, 102, 0, 0.18);

  /* Marketing site (dark) */
  --bg: #121212;
  --bg-elev: #181817;
  --bg-soft: #1b1919;
  --ink: #f6f4f1;
  --ink-muted: #9a9892;
  --line: rgba(246, 244, 241, 0.12);

  /* Demo app (light — separate hierarchy) */
  --app-bg: #eef0f3;
  --app-surface: #ffffff;
  --app-sidebar: #f7f8fa;
  --app-ink: #181817;
  --app-muted: #6b6b66;
  --app-line: #e2e3e6;
  --app-accent: #e55b00;
  --app-ok: #0d8a6a;
  --app-warn: #c44a00;
  --app-info: #066aab;

  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-ui: "IBM Plex Sans", "DM Sans", system-ui, sans-serif;
  --radius: 2px;
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
}

body.is-demo-page {
  background: var(--app-bg);
  color: var(--app-ink);
  overflow: hidden;
}

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

body.is-demo-page::before {
  display: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.container-wide {
  width: min(1400px, calc(100% - 2rem));
  margin-inline: auto;
}

/* ——— Marketing nav ——— */
.nav {
  position: fixed;
  inset: 0 0 auto;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(18, 18, 18, 0.78);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s;
}

.nav.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(18, 18, 18, 0.94);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1400px, calc(100% - 2rem));
  margin-inline: auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  line-height: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.logo-word {
  height: 22px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--ink-muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand-bright);
  color: #111;
}

.btn-primary:hover {
  background: #ff7a28;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.03);
}

.btn-sm {
  padding: 0.55rem 0.95rem;
  font-size: 0.82rem;
}

.nav-cta {
  display: none;
}

@media (min-width: 900px) {
  .nav-cta {
    display: inline-flex;
  }
}

.nav-toggle {
  display: flex;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius);
  cursor: pointer;
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .nav-links {
    display: flex !important;
  }
}

@media (max-width: 899px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1rem 1.25rem 1.5rem;
    background: rgba(18, 18, 18, 0.98);
    border-bottom: 1px solid var(--line);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
  }
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: end start;
  padding: calc(var(--nav-h) + 2rem) 0 4rem;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 70% 50% at 70% 40%, var(--brand-glow), transparent 55%),
    radial-gradient(ellipse 45% 35% at 15% 75%, rgba(6, 106, 171, 0.12), transparent 50%),
    linear-gradient(180deg, transparent 40%, var(--bg) 95%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 2.5rem));
  margin-inline: auto;
  max-width: 42rem;
}

.brand-hero {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 1.35rem;
}

.brand-hero .logo-mark {
  width: clamp(48px, 8vw, 72px);
  height: clamp(48px, 8vw, 72px);
}

.brand-hero .logo-word {
  height: clamp(28px, 5vw, 42px);
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.45rem, 3.2vw, 2.15rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.hero-lead {
  color: var(--ink-muted);
  font-size: 1.05rem;
  max-width: 38ch;
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.scroll-cue {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {
  0%,
  100% {
    transform: translate(-50%, 0);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, 6px);
    opacity: 1;
  }
}

/* Sections */
.section {
  padding: 5.5rem 0;
  position: relative;
}

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-bright);
  margin-bottom: 0.85rem;
}

.section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 1rem;
  max-width: 16ch;
}

.section-intro {
  color: var(--ink-muted);
  max-width: 48ch;
  margin: 0 0 2.5rem;
  font-size: 1.05rem;
}

.points {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .points {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.point {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.point-num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--brand-bright);
  margin-bottom: 0.65rem;
}

.point h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.point p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.families {
  display: grid;
  gap: 1.25rem;
}

.family {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 1.35rem 1.35rem 1.15rem;
  transition: border-color 0.25s, transform 0.35s var(--ease);
}

.family:hover {
  border-color: rgba(255, 102, 0, 0.4);
  transform: translateY(-2px);
}

.family-name {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.85rem;
}

.family-macros {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 0.88rem;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.chip:hover {
  background: var(--brand-soft);
  border-color: rgba(255, 102, 0, 0.45);
  color: var(--brand-bright);
}

.chip.is-hot {
  border-color: rgba(255, 102, 0, 0.5);
  color: var(--brand-bright);
}

.featured {
  display: grid;
  gap: 1rem;
  margin-top: 2.5rem;
}

@media (min-width: 800px) {
  .featured {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feat-card {
  position: relative;
  min-height: 220px;
  padding: 1.35rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.35s var(--ease);
}

.feat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, transparent 30%, rgba(255, 102, 0, 0.1));
  opacity: 0;
  transition: opacity 0.3s;
}

.feat-card:hover {
  border-color: rgba(255, 102, 0, 0.45);
  transform: translateY(-3px);
}

.feat-card:hover::before {
  opacity: 1;
}

.feat-card .idx {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.feat-card h3 {
  position: relative;
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.4rem;
}

.feat-card p {
  position: relative;
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.steps {
  display: grid;
  gap: 0;
  counter-reset: step;
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(5, 1fr);
  }
}

.step {
  padding: 1.25rem 1rem 1.25rem 0;
  border-top: 1px solid var(--line);
  counter-increment: step;
}

@media (min-width: 900px) {
  .step {
    border-top: none;
    border-left: 1px solid var(--line);
    padding: 0 1rem 0 1.15rem;
  }

  .step:first-child {
    border-left: none;
    padding-left: 0;
  }
}

.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  color: var(--brand-bright);
  font-size: 0.85rem;
  margin-bottom: 0.65rem;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.step p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.cta-band {
  padding: 4.5rem 0;
  background:
    radial-gradient(ellipse 60% 80% at 10% 50%, var(--brand-glow), transparent 50%),
    var(--bg-elev);
  border-block: 1px solid var(--line);
}

.cta-band h2 {
  max-width: 14ch;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.footer {
  padding: 3.5rem 0 2rem;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
  }
}

.footer strong {
  display: block;
  font-family: var(--font-display);
  margin-bottom: 0.85rem;
  font-size: 0.95rem;
}

.footer a {
  display: block;
  color: var(--ink-muted);
  font-size: 0.9rem;
  padding: 0.25rem 0;
}

.footer a:hover {
  color: var(--brand-bright);
}

.footer-claim {
  color: var(--ink-muted);
  font-size: 0.9rem;
  max-width: 28ch;
  margin: 0.5rem 0 0;
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.badge-proto {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 200;
  background: var(--brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius);
}

/* Page manifatturiero */
.page-hero {
  padding: calc(var(--nav-h) + 3rem) 0 3rem;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 50% 60% at 85% 20%, var(--brand-glow), transparent 55%),
    linear-gradient(90deg, var(--bg) 40%, transparent);
  pointer-events: none;
}

.page-hero > .container {
  position: relative;
  z-index: 1;
}

.breadcrumb {
  position: relative;
  z-index: 1;
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a:hover {
  color: var(--brand-bright);
}

.page-hero h1 {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 14ch;
  margin: 0 0 1rem;
}

.page-hero .lead {
  position: relative;
  z-index: 1;
  color: var(--ink-muted);
  max-width: 42ch;
  font-size: 1.05rem;
  margin: 0 0 1.75rem;
}

.pain-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 800px) {
  .pain-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pain {
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}

.pain h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.pain p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.modules {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.modules th,
.modules td {
  text-align: left;
  padding: 0.95rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.modules th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink-muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modules td:first-child {
  font-weight: 600;
  color: var(--brand-bright);
  width: 34%;
}

.note {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.disclaimer {
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem;
  background: var(--brand-soft);
  border-left: 3px solid var(--brand-bright);
  font-size: 0.88rem;
  color: var(--ink);
}

/* ——— Demo embed on marketing page ——— */
.proto-embed-wrap {
  border: 1px solid var(--line);
  background: #0c0c0c;
  padding: 0.75rem;
}

.proto-embed-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.proto-embed-bar strong {
  color: var(--ink);
  font-weight: 600;
}

.proto-frame {
  border: 1px solid var(--app-line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  background: var(--app-bg);
  min-height: 560px;
}

/* ——— DEMO APP (separate visual system) ——— */
.demo-os {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-ui);
  background: var(--app-bg);
  color: var(--app-ink);
}

.demo-chrome {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 1rem;
  background: #1b1919;
  color: #f6f4f1;
  border-bottom: 2px solid var(--brand);
}

.demo-chrome-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.demo-exit {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #f6f4f1;
  padding: 0.4rem 0.7rem;
  border: 1px solid rgba(246, 244, 241, 0.25);
  border-radius: var(--radius);
  white-space: nowrap;
}

.demo-exit:hover {
  border-color: var(--brand-bright);
  color: var(--brand-bright);
}

.demo-chrome-title {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.demo-chrome-title .eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-bright);
}

.demo-chrome-title .name {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-chrome-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.demo-chrome .btn-primary {
  background: var(--brand-bright);
  color: #111;
}

.demo-chrome .btn-ghost {
  border-color: rgba(246, 244, 241, 0.25);
  color: #f6f4f1;
}

.demo-workspace {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
}

@media (min-width: 900px) {
  .demo-workspace {
    grid-template-columns: 220px 1fr;
  }
}

.demo-side {
  background: var(--app-sidebar);
  border-bottom: 1px solid var(--app-line);
  padding: 1rem 0.85rem;
}

@media (min-width: 900px) {
  .demo-side {
    border-bottom: none;
    border-right: 1px solid var(--app-line);
  }
}

.demo-company {
  padding: 0 0.5rem 1rem;
  border-bottom: 1px solid var(--app-line);
  margin-bottom: 0.85rem;
}

.demo-company .co {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--app-ink);
}

.demo-company .meta {
  font-size: 0.75rem;
  color: var(--app-muted);
  margin-top: 0.2rem;
}

.demo-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 900px) {
  .demo-nav {
    flex-direction: column;
  }
}

.demo-nav button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  color: var(--app-muted);
  padding: 0.6rem 0.65rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-family: var(--font-ui);
  border-radius: 0;
}

.demo-nav button:hover {
  color: var(--app-ink);
  background: rgba(0, 0, 0, 0.03);
}

.demo-nav button.is-active {
  color: var(--app-ink);
  background: rgba(229, 91, 0, 0.08);
  border-left-color: var(--brand);
  font-weight: 600;
}

.demo-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--app-bg);
}

.demo-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem;
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-line);
}

.demo-top h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  font-family: var(--font-ui);
  color: var(--app-ink);
}

.demo-body {
  padding: 1.15rem;
  flex: 1;
  overflow: auto;
}

.demo-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1.15rem;
  background: var(--app-surface);
  border-top: 1px solid var(--app-line);
  font-size: 0.8rem;
  color: var(--app-muted);
}

.demo-footer a {
  color: var(--brand);
  font-weight: 600;
}

/* App components */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

@media (min-width: 700px) {
  .kpi-row {
    grid-template-columns: repeat(4, 1fr);
  }
}

.kpi {
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  padding: 0.85rem;
  border-radius: 4px;
}

.kpi .label {
  font-size: 0.68rem;
  color: var(--app-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.kpi .value {
  font-size: 1.45rem;
  font-weight: 700;
  margin-top: 0.25rem;
  color: var(--app-ink);
  font-variant-numeric: tabular-nums;
}

.kpi.warn .value {
  color: var(--app-warn);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 4px;
  overflow: hidden;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--app-line);
}

.data-table th {
  color: var(--app-muted);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--app-sidebar);
}

.data-table tr {
  cursor: pointer;
  transition: background 0.15s;
}

.data-table tbody tr:hover {
  background: rgba(229, 91, 0, 0.05);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid var(--app-line);
  border-radius: 3px;
  background: #fff;
}

.tag-ok {
  color: var(--app-ok);
  border-color: rgba(13, 138, 106, 0.35);
  background: rgba(13, 138, 106, 0.06);
}

.tag-warn {
  color: var(--app-warn);
  border-color: rgba(196, 74, 0, 0.35);
  background: rgba(229, 91, 0, 0.08);
}

.tag-run {
  color: var(--brand-deep);
  border-color: rgba(229, 91, 0, 0.4);
  background: rgba(229, 91, 0, 0.08);
}

.toast {
  position: fixed;
  bottom: 4rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--app-ink);
  color: #fff;
  padding: 0.75rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s var(--ease);
  z-index: 300;
  max-width: calc(100% - 2rem);
  font-family: var(--font-ui);
}

.toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.screen {
  display: none;
}

.screen.is-on {
  display: block;
  animation: fadeIn 0.35s var(--ease);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--app-muted);
  font-weight: 500;
}

.field input {
  background: #fff;
  border: 1px solid var(--app-line);
  color: var(--app-ink);
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius);
  min-width: 8rem;
  font-family: var(--font-ui);
}

.progress {
  height: 8px;
  background: #e2e3e6;
  border-radius: 99px;
  margin: 0.75rem 0 0;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--brand);
  width: 42%;
  transition: width 0.4s var(--ease);
}

.bar-compare {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.bar-item label {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
  color: var(--app-ink);
}

.bar-track {
  height: 10px;
  background: #e2e3e6;
  border-radius: 99px;
  overflow: hidden;
}

.bar-track > i {
  display: block;
  height: 100%;
  background: var(--brand);
  font-style: normal;
}

.bar-track > i.alt {
  background: var(--app-info);
}

.demo-panel {
  margin-top: 1.25rem;
  padding: 1.1rem;
  border: 1px solid var(--app-line);
  background: var(--app-surface);
  border-radius: 4px;
}

.demo-panel strong {
  display: block;
  margin-bottom: 0.35rem;
}

.demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: var(--font-ui);
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid transparent;
}

.demo-btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.demo-btn-primary:hover {
  background: var(--brand-deep);
}

.demo-btn-ghost {
  background: #fff;
  border-color: var(--app-line);
  color: var(--app-ink);
}

.demo-btn-ghost:hover {
  border-color: #bbb;
}

.muted {
  color: var(--app-muted);
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  #hero-canvas {
    display: none;
  }

  .scroll-cue {
    display: none;
  }
}


.nav-links a.is-active {
  color: var(--brand-bright);
}


/* ——— Approfondimenti interattivi ——— */
.appr-alt {
  background: var(--bg-elev);
  border-block: 1px solid var(--line);
}

.appr-problems {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1.5rem;
}

@media (max-width: 800px) {
  .appr-problems {
    grid-template-columns: 1fr;
  }
}

.appr-problem {
  position: relative;
  padding: 1.25rem 1.25rem 1.35rem;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(229, 91, 0, 0.08), transparent 55%), var(--bg-soft);
  min-height: 11rem;
}

.appr-problem h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0.85rem 0 0.65rem;
}

.appr-problem p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.appr-problem-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-muted);
  font: 600 0.72rem/1 var(--font-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.55rem;
  margin-right: 0.35rem;
  cursor: pointer;
}

.appr-problem-tab.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.appr-checkup {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.4fr 0.8fr;
  margin-top: 1.5rem;
  align-items: start;
}

@media (max-width: 860px) {
  .appr-checkup {
    grid-template-columns: 1fr;
  }
}

.appr-checks {
  display: grid;
  gap: 0.65rem;
}

.appr-check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.appr-check:hover {
  border-color: rgba(229, 91, 0, 0.45);
}

.appr-check:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.appr-check input {
  margin-top: 0.2rem;
  accent-color: var(--brand);
  width: 1.05rem;
  height: 1.05rem;
}

.appr-score {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  padding: 1.5rem;
  border: 1px solid var(--line);
  background: var(--bg);
  text-align: center;
}

.appr-score-ring {
  --p: 0;
  position: relative;
  width: 7.5rem;
  height: 7.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: grid;
  place-content: center;
  background:
    conic-gradient(var(--brand) calc(var(--p) * 1%), rgba(246, 244, 241, 0.12) 0);
}

.appr-score-ring::before {
  content: "";
  position: absolute;
  inset: 0.7rem;
  border-radius: 50%;
  background: var(--bg);
}

.appr-score-ring span {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.appr-score-ring small {
  position: relative;
  z-index: 1;
  display: block;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.appr-score-msg {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.appr-impact {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr 1fr 1fr;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .appr-impact {
    grid-template-columns: 1fr;
  }
}

.appr-impact-field {
  display: grid;
  gap: 0.65rem;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  background: var(--bg-soft);
}

.appr-impact-field span {
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.appr-impact-field input[type="range"] {
  width: 100%;
  accent-color: var(--brand);
}

.appr-impact-field strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.appr-impact-result {
  padding: 1.2rem 1.35rem;
  border: 1px solid rgba(229, 91, 0, 0.35);
  background: linear-gradient(145deg, rgba(229, 91, 0, 0.16), transparent 60%), var(--bg-soft);
}

.appr-impact-result p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.appr-impact-num {
  font-family: var(--font-display) !important;
  font-size: 2.2rem !important;
  color: var(--ink) !important;
  margin: 0.4rem 0 !important;
  font-weight: 700;
}

.appr-impact-year {
  font-size: 0.95rem !important;
}

.appr-flow {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.appr-flow li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 0.95rem 1.1rem;
  border: 1px solid var(--line);
  background: var(--bg);
}

.appr-flow-num {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand-bright);
  font-size: 1.05rem;
}

.appr-outcomes {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.appr-outcomes li {
  padding: 0.75rem 1rem 0.75rem 2.1rem;
  border: 1px solid var(--line);
  position: relative;
}

.appr-outcomes li::before {
  content: "";
  position: absolute;
  left: 0.9rem;
  top: 1.05rem;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--brand);
}

.appr-faq {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.appr-faq summary {
  cursor: pointer;
  font-weight: 600;
}

.appr-faq p {
  color: var(--ink-muted);
  margin: 0.75rem 0 0;
}


/* Prodotti hub */
.prod-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

@media (min-width: 800px) {
  .prod-grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

.prod-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 280px;
  padding: 1.75rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(155deg, rgba(229, 91, 0, 0.12), transparent 50%),
    var(--bg-elev);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.prod-card:hover {
  border-color: rgba(255, 102, 0, 0.5);
  transform: translateY(-3px);
}

.prod-card-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-bright);
  margin: 0 0 0.75rem;
}

.prod-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.prod-card p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 38ch;
}

.prod-card .btn {
  align-self: flex-start;
}

.prod-demo-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  margin-top: 1.5rem;
}


/* Contatti form */
.contact-layout {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.2fr 0.8fr;
  margin-top: 1.5rem;
  align-items: start;
}

@media (max-width: 860px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.contact-form {
  display: grid;
  gap: 0.85rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}

.contact-form .field {
  display: grid;
  gap: 0.35rem;
}

.contact-form label {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  border-radius: var(--radius);
  font: inherit;
}

.contact-form textarea {
  min-height: 130px;
  resize: vertical;
}

.contact-form .hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.contact-form .form-row {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 640px) {
  .contact-form .form-row {
    grid-template-columns: 1fr;
  }
}

.form-status {
  margin: 0;
  font-size: 0.92rem;
}

.form-status.is-ok {
  color: #3dceb0;
}

.form-status.is-err {
  color: #ff8a6a;
}

.contact-aside {
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, rgba(229, 91, 0, 0.1), transparent 55%), var(--bg-soft);
}

.contact-aside h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.65rem;
}

.contact-aside p {
  margin: 0 0 0.75rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.about-split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .about-split {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3.5rem;
  }
}

.about-figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}

.about-figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.team-grid {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 700px) {
  .team-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

.team-person {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.team-person h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.team-role {
  margin: 0 0 0.85rem;
  color: var(--brand-bright);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.team-person p:last-child {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
}
