/* ============================================================
   NexaMind — Public website
   Design system & global styles
   ============================================================ */

/* -- Reset minimo -- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* -- Design tokens -- */
:root {
  --c-ink: #0E1B33;
  --c-ink-soft: #1A2747;
  --c-primary: #1E88E5;
  --c-primary-hover: #1565C0;
  --c-bg: #FFFFFF;
  --c-surface: #F7F8FA;
  --c-surface-2: #EFF2F7;
  --c-border: #E5E7EB;
  --c-border-strong: #D1D5DB;
  --c-muted: #5B6478;
  --c-muted-soft: #8A93A6;
  --c-success: #0F766E;
  --c-warning: #B45309;

  --ff-display: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ff-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ff-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  --s-1: 4px;  --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 24px; --s-6: 32px;  --s-7: 48px;  --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px;

  --container: 1240px;
  --container-narrow: 880px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 320ms;
}

body {
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
  font-feature-settings: 'ss01', 'cv11';
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--c-ink);
}

h1 { font-size: clamp(2.5rem, 5.5vw, 4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; font-weight: 600; letter-spacing: 0; }

p { color: var(--c-muted); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.55; color: var(--c-muted); max-width: 64ch; }

.eyebrow {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: var(--s-4);
}

.container { width: 100%; max-width: min(var(--container), 100vw); margin: 0 auto; padding: 0 var(--s-5); }
.container--narrow { max-width: var(--container-narrow); }

/* ============ HEADER ============ */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.header.is-scrolled { border-bottom-color: var(--c-border); background: rgba(255,255,255,0.95); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: var(--s-5); }
.header__brand { display: flex; align-items: center; gap: var(--s-2); }
.header__brand img, .header__brand svg { height: 32px; width: auto; }
.header__brand span { font-family: var(--ff-display); font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; }
.header__nav { display: flex; align-items: center; gap: var(--s-6); }
.header__nav > a,
.header__menu > a {
  font-size: 0.94rem; font-weight: 500; color: var(--c-ink);
  padding: var(--s-2) 0; position: relative;
  transition: color var(--dur) var(--ease);
}
.header__nav > a:hover,
.header__menu > a:hover,
.header__menu:focus-within > a { color: var(--c-primary); }
.header__nav > a.is-active,
.header__menu > a.is-active { color: var(--c-primary); }
.header__menu { position: relative; display: flex; align-items: center; }
.header__menu > a { display: inline-flex; align-items: center; gap: 7px; }
.header__chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--dur) var(--ease);
}
.header__submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  min-width: 250px;
  padding: var(--s-2);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: 0 18px 48px rgba(14, 27, 51, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms;
  z-index: 120;
}
.header__submenu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 14px;
}
.header__submenu a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--r-md);
  color: var(--c-ink);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease;
}
.header__submenu a:hover,
.header__submenu a:focus-visible,
.header__submenu a[aria-current="page"] { color: var(--c-primary); background: var(--c-surface); }
.header__menu:hover .header__submenu,
.header__menu:focus-within .header__submenu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.header__menu:hover .header__chevron,
.header__menu:focus-within .header__chevron { transform: translateY(2px) rotate(225deg); }
.header__cta { display: flex; align-items: center; gap: var(--s-3); }
.header__lang {
  font-size: 0.85rem; font-weight: 500; color: var(--c-muted);
  font-family: var(--ff-mono); letter-spacing: 0.05em;
  padding: var(--s-2) var(--s-3); border-radius: var(--r-sm);
  transition: all var(--dur) var(--ease);
}
.header__lang:hover { color: var(--c-ink); background: var(--c-surface); }
.header__burger { display: none; padding: var(--s-2); }
.header__burger svg { width: 24px; height: 24px; }

/* Drawer mobile */
.drawer {
  position: fixed; inset: 0; z-index: 110;
  background: #fff;
  transform: translateX(100%);
  transition: transform var(--dur) var(--ease);
  display: flex; flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }
.drawer__top { display: flex; align-items: center; justify-content: space-between; padding: var(--s-4) var(--s-5); height: 72px; border-bottom: 1px solid var(--c-border); }
.drawer__nav { display: flex; flex-direction: column; padding: var(--s-6) var(--s-5); gap: var(--s-4); }
.drawer__nav a { font-family: var(--ff-display); font-size: 1.5rem; font-weight: 500; color: var(--c-ink); }
.drawer__group { display: grid; gap: var(--s-3); }
.drawer__subnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2) var(--s-4); padding-left: var(--s-4); border-left: 2px solid var(--c-border); }
.drawer__subnav a { font-family: var(--ff-body); font-size: 0.94rem; line-height: 1.35; color: var(--c-muted); }
.drawer__subnav a:hover,
.drawer__subnav a:focus-visible,
.drawer__subnav a[aria-current="page"] { color: var(--c-primary); }
.drawer__cta { margin-top: auto; padding: var(--s-5); border-top: 1px solid var(--c-border); }
.drawer__cta .btn { width: 100%; justify-content: center; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3) var(--s-5);
  font-size: 0.94rem; font-weight: 500;
  border-radius: var(--r-md);
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: var(--c-primary-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(30,136,229,0.25); }
.btn--secondary { background: var(--c-bg); color: var(--c-ink); border-color: var(--c-border-strong); }
.btn--secondary:hover { border-color: var(--c-ink); }
.btn--ghost { background: transparent; color: var(--c-ink); }
.btn--ghost:hover { background: var(--c-surface); }
.btn--on-ink { background: #fff; color: var(--c-ink); }
.btn--on-ink:hover { background: var(--c-surface-2); }
.btn--on-ink-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.3); }
.btn--on-ink-ghost:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.6); }
.btn .arrow { transition: transform var(--dur) var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ============ SECTIONS ============ */
.section { padding: var(--s-9) 0; }
.section--surface { background: var(--c-surface); }
.section--ink { background: var(--c-ink); color: #fff; }
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: #fff; }
.section--ink p { color: rgba(255,255,255,0.72); }
.section--ink .eyebrow { color: #7AB7F0; }
.section--ink .lead { color: rgba(255,255,255,0.85); }

.section-head { max-width: 760px; margin-bottom: var(--s-8); }
.section-head--center { margin: 0 auto var(--s-8); text-align: center; }

/* ============ HERO ============ */
.hero { padding: var(--s-9) 0 var(--s-9); position: relative; overflow: hidden; }
.hero__inner { max-width: 880px; }
.hero h1 { margin-bottom: var(--s-5); }
.hero__lead { font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.5; color: var(--c-muted); max-width: 64ch; }
.hero__cta { display: flex; gap: var(--s-3); margin-top: var(--s-7); flex-wrap: wrap; }
.hero__meta { display: flex; gap: var(--s-6); margin-top: var(--s-7); padding-top: var(--s-6); border-top: 1px solid var(--c-border); flex-wrap: wrap; }
.hero__meta-item { display: flex; flex-direction: column; gap: var(--s-1); }
.hero__meta-label { font-family: var(--ff-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-muted-soft); }
.hero__meta-value { font-weight: 500; color: var(--c-ink); }

.page-hero { padding: var(--s-8) 0 var(--s-7); }
.page-hero h1 { margin-bottom: var(--s-4); }
.breadcrumb { font-family: var(--ff-mono); font-size: 0.85rem; color: var(--c-muted-soft); margin-bottom: var(--s-4); }
.breadcrumb a { color: var(--c-muted); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb span { margin: 0 var(--s-2); }

/* ============ CAPABILITY GRID ============ */
.capabilities { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-1); border: 1px solid var(--c-border); border-radius: var(--r-lg); overflow: hidden; background: var(--c-border); }
.capability { background: #fff; padding: var(--s-7); display: flex; flex-direction: column; gap: var(--s-3); }
.capability__num { font-family: var(--ff-mono); font-size: 0.85rem; color: var(--c-muted-soft); letter-spacing: 0.1em; }
.capability h3 { font-size: 1.2rem; }
.capability p { font-size: 0.96rem; }

/* ============ ECOSYSTEM CARDS ============ */
.ecosystem { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.ecosystem__card {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-lg);
  padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-3);
  transition: all var(--dur) var(--ease);
}
.ecosystem__card:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(14,27,51,0.06); border-color: var(--c-border-strong); }
.ecosystem__card--active { border-color: var(--c-primary); }
.ecosystem__card--cta { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.ecosystem__card--cta h4 { color: #fff; }
.ecosystem__card--cta p { color: rgba(255,255,255,0.7); }
.ecosystem__status { font-family: var(--ff-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; align-self: flex-start; padding: 4px 8px; border-radius: 4px; }
.ecosystem__status--on { background: rgba(15,118,110,0.1); color: var(--c-success); }
.ecosystem__status--off { background: var(--c-surface-2); color: var(--c-muted); }
.ecosystem__status--dev { background: rgba(30,136,229,0.1); color: var(--c-primary); }
.ecosystem__link { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--c-primary); font-weight: 500; font-size: 0.94rem; margin-top: auto; }
.ecosystem__card--cta .ecosystem__link { color: #fff; }

/* ============ METHOD STEPS ============ */
.method { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-5); }
.method__step { background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--s-6); }
.method__num { font-family: var(--ff-mono); font-size: 0.85rem; color: var(--c-primary); letter-spacing: 0.1em; display: block; margin-bottom: var(--s-4); }
.method__step h4 { margin-bottom: var(--s-3); }
.method__step p { font-size: 0.95rem; }

/* ============ VERTICAL CARDS ============ */
.verticals { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.vertical-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-lg);
  padding: var(--s-6); display: flex; flex-direction: column;
  transition: all var(--dur) var(--ease);
}
.vertical-card:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(14,27,51,0.06); }
.vertical-card--active { border-color: var(--c-primary); border-width: 1.5px; }
.vertical-card--dev { background: var(--c-surface); }
.vertical-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-3); margin-bottom: var(--s-4); }
.vertical-card__sector { font-family: var(--ff-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-muted-soft); margin-bottom: var(--s-1); }
.vertical-card__name { font-size: 1.35rem; }
.vertical-card__desc { font-size: 0.95rem; margin-bottom: var(--s-4); }
.vertical-card__features { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--c-border); }
.vertical-card__feature { font-size: 0.88rem; color: var(--c-muted); display: flex; gap: var(--s-2); }
.vertical-card__feature::before { content: "—"; color: var(--c-muted-soft); }
.vertical-card__link { display: inline-flex; align-items: center; gap: var(--s-2); color: var(--c-primary); font-weight: 500; font-size: 0.94rem; margin-top: auto; }

/* ============ FEATURE BLOCKS ============ */
.feature-block { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: center; }
.feature-block--reverse .feature-block__visual { order: -1; }
.feature-block__visual {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  padding: var(--s-6);
}
.feature-block__visual svg { max-width: 80%; opacity: 0.9; }
.feature-block__body h2 { margin-bottom: var(--s-4); }
.feature-block__body p + p { margin-top: var(--s-3); }
.feature-block__list { margin-top: var(--s-5); display: flex; flex-direction: column; gap: var(--s-4); }
.feature-block__item { display: flex; gap: var(--s-3); }
.feature-block__item-marker {
  flex-shrink: 0; width: 28px; height: 28px;
  border-radius: 50%; background: var(--c-surface-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-mono); font-size: 0.78rem; font-weight: 500;
  color: var(--c-primary);
}
.feature-block__item-body h5 { margin-bottom: 2px; }
.feature-block__item-body p { font-size: 0.95rem; }

/* ============ CTA FINAL ============ */
.cta-final {
  background: var(--c-ink); color: #fff;
  border-radius: var(--r-xl);
  padding: var(--s-9) var(--s-7);
  text-align: center;
}
.cta-final h2 { color: #fff; margin-bottom: var(--s-4); }
.cta-final p { color: rgba(255,255,255,0.8); max-width: 60ch; margin: 0 auto var(--s-6); }
.cta-final__buttons { display: inline-flex; gap: var(--s-3); flex-wrap: wrap; justify-content: center; }

/* ============ FORM ============ */
.form { background: #fff; border: 1px solid var(--c-border); border-radius: var(--r-lg); padding: var(--s-7); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); margin-bottom: var(--s-5); }
.form__field { display: flex; flex-direction: column; gap: var(--s-2); }
.form__field--full { grid-column: 1 / -1; }
.form__label { font-size: 0.88rem; font-weight: 500; color: var(--c-ink); }
.form__input, .form__textarea, .form__select {
  width: 100%; padding: var(--s-3) var(--s-4);
  border: 1px solid var(--c-border-strong); border-radius: var(--r-md);
  background: #fff; font-size: 0.96rem; line-height: 1.5;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.form__textarea { resize: vertical; min-height: 120px; }
.form__select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235B6478' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px; }
.form__input:focus, .form__textarea:focus, .form__select:focus {
  outline: 0; border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(30,136,229,0.15);
}
.form__hint { font-size: 0.82rem; color: var(--c-muted-soft); }
.form__submit-row { display: flex; align-items: center; gap: var(--s-4); justify-content: space-between; margin-top: var(--s-3); }
.form__status { font-size: 0.9rem; color: var(--c-success); }

/* ============ CONTACT INFO ============ */
.contact-info { display: flex; flex-direction: column; gap: var(--s-5); }
.contact-info__item { padding: var(--s-5); background: var(--c-surface); border-radius: var(--r-md); }
.contact-info__label { font-family: var(--ff-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-muted-soft); margin-bottom: var(--s-2); }
.contact-info__value { font-weight: 500; color: var(--c-ink); }
.contact-info__value a:hover { color: var(--c-primary); }

/* ============ AUDIENCE ============ */
.audience { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
.audience__item { padding: var(--s-5); background: var(--c-surface); border-radius: var(--r-md); border-left: 3px solid var(--c-primary); }
.audience__item h5 { margin-bottom: var(--s-2); font-size: 1rem; }
.audience__item p { font-size: 0.9rem; }

/* ============ FOOTER ============ */
.footer { background: var(--c-ink); color: rgba(255,255,255,0.7); padding: var(--s-9) 0 var(--s-6); }
.footer__grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--s-7); padding-bottom: var(--s-7); border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer__brand { display: flex; align-items: center; gap: var(--s-2); margin-bottom: var(--s-4); }
.footer__brand svg, .footer__brand img { height: 28px; width: auto; }
.footer__brand span { color: #fff; font-family: var(--ff-display); font-weight: 600; font-size: 1.1rem; }
.footer__desc { font-size: 0.92rem; max-width: 36ch; color: rgba(255,255,255,0.6); }
.footer__col h5 { color: #fff; margin-bottom: var(--s-4); font-size: 0.92rem; }
.footer__col ul { display: flex; flex-direction: column; gap: var(--s-2); }
.footer__col a { font-size: 0.92rem; color: rgba(255,255,255,0.65); transition: color var(--dur) var(--ease); }
.footer__col a:hover { color: #fff; }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; padding-top: var(--s-5); font-size: 0.85rem; color: rgba(255,255,255,0.5); gap: var(--s-5); flex-wrap: wrap; }
.footer__legal { display: flex; gap: var(--s-5); }
.footer__vat { display: inline-block; margin-left: var(--s-3); white-space: nowrap; }

/* ============ REVEAL ANIMATION ============ */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .capabilities { grid-template-columns: repeat(2, 1fr); }
  .method { grid-template-columns: repeat(2, 1fr); }
  .verticals { grid-template-columns: repeat(2, 1fr); }
  .audience { grid-template-columns: repeat(2, 1fr); }
  .feature-block { grid-template-columns: 1fr; gap: var(--s-6); }
  .feature-block--reverse .feature-block__visual { order: 0; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .section { padding: var(--s-8) 0; }
  .hero { padding: var(--s-7) 0; }
  h1 { font-size: 2.15rem; line-height: 1.16; }
  .container { padding-left: var(--s-4); padding-right: var(--s-4); }
  .header__inner { height: 64px; }
  .header__nav { display: none; }
  .header__lang { display: none; }
  .header__cta { margin-left: auto; flex: 0 0 auto; }
  .header__burger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }
  .header__burger svg { width: 24px; height: 24px; }
  .header__cta .btn { display: none; }
  .hero__cta .btn,
  .cta-final__buttons .btn {
    width: min(100%, calc(100vw - 32px));
    justify-content: center;
    white-space: normal;
    min-height: 48px;
  }
  .ecosystem { grid-template-columns: 1fr; }
  .capabilities { grid-template-columns: 1fr; }
  .method { grid-template-columns: 1fr; }
  .verticals { grid-template-columns: 1fr; }
  .audience { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .cta-final { padding: var(--s-7) var(--s-5); }
  .footer__grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   Cookie banner & preferences modal
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: var(--s-4);
  left: var(--s-4);
  right: var(--s-4);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(14, 27, 51, 0.12), 0 2px 8px rgba(14, 27, 51, 0.06);
  padding: var(--s-5);
  z-index: 9999;
  display: none;
  animation: cookie-rise 0.4s ease-out;
}
.cookie-banner.is-visible { display: block; }

@keyframes cookie-rise {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.cookie-banner__title {
  font-family: 'Inter Tight', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--c-ink);
  margin: 0 0 var(--s-2);
  letter-spacing: -0.01em;
}
.cookie-banner__text {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--c-muted);
  margin: 0 0 var(--s-4);
}
.cookie-banner__text a {
  color: var(--c-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.cookie-banner__actions {
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
}
.cookie-banner__actions .btn {
  flex: 1 1 auto;
  min-width: 140px;
  justify-content: center;
}
.btn--ghost {
  background: transparent;
  color: var(--c-ink);
  border: 1px solid var(--c-border-strong);
}
.btn--ghost:hover { background: var(--c-surface); border-color: var(--c-ink); }

/* Modal preferenze */
.cookie-modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 27, 51, 0.55);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--s-4);
}
.cookie-modal.is-open { display: flex; }
.cookie-modal__panel {
  background: var(--c-bg);
  border-radius: 14px;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--s-6);
  box-shadow: 0 24px 64px rgba(14, 27, 51, 0.25);
}
.cookie-modal__title {
  font-family: 'Inter Tight', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--c-ink);
  margin: 0 0 var(--s-3);
  letter-spacing: -0.015em;
}
.cookie-modal__intro {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--c-muted);
  margin: 0 0 var(--s-5);
}
.cookie-category {
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: var(--s-4);
  margin-bottom: var(--s-3);
}
.cookie-category__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-2);
}
.cookie-category__name {
  font-weight: 600;
  color: var(--c-ink);
  font-size: 0.98rem;
}
.cookie-category__desc {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--c-muted);
  margin: 0;
}
.cookie-category__locked {
  font-size: 0.78rem;
  color: var(--c-success);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.cookie-toggle input { opacity: 0; width: 0; height: 0; }
.cookie-toggle__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--c-border-strong);
  border-radius: 24px;
  transition: background 0.2s;
}
.cookie-toggle__slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.cookie-toggle input:checked + .cookie-toggle__slider { background: var(--c-primary); }
.cookie-toggle input:checked + .cookie-toggle__slider::before { transform: translateX(18px); }
.cookie-toggle input:disabled + .cookie-toggle__slider {
  background: var(--c-muted-soft);
  cursor: not-allowed;
  opacity: 0.6;
}

.cookie-modal__actions {
  display: flex;
  gap: var(--s-2);
  margin-top: var(--s-5);
  flex-wrap: wrap;
}
.cookie-modal__actions .btn { flex: 1 1 auto; min-width: 140px; justify-content: center; }

@media (max-width: 600px) {
  .cookie-banner {
    left: var(--s-2);
    right: var(--s-2);
    bottom: var(--s-2);
    padding: var(--s-4);
    max-height: min(420px, 54vh);
    overflow-y: auto;
  }
  .cookie-banner__text { font-size: 0.86rem; }
  .cookie-banner__actions .btn { min-width: 100%; }
  .cookie-modal__panel { padding: var(--s-4); }
}

/* ============================================================
   Admin stats dashboard
   ============================================================ */
.stats-page { background: var(--c-surface); min-height: 100vh; padding: var(--s-6) var(--s-4); }
.stats-container { max-width: 1100px; margin: 0 auto; }
.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s-5);
  flex-wrap: wrap;
  gap: var(--s-3);
}
.stats-header h1 {
  font-family: 'Inter Tight', sans-serif;
  font-size: 1.6rem;
  margin: 0;
  letter-spacing: -0.015em;
}
.stats-header__meta {
  font-size: 0.85rem;
  color: var(--c-muted);
  font-family: 'JetBrains Mono', monospace;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.stat-card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: var(--s-4);
}
.stat-card__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-muted);
  margin-bottom: var(--s-2);
}
.stat-card__value {
  font-family: 'Inter Tight', sans-serif;
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--c-ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-card__sub {
  font-size: 0.82rem;
  color: var(--c-muted);
  margin-top: var(--s-2);
}

.stats-section {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: var(--s-4) var(--s-5);
  margin-bottom: var(--s-4);
}
.stats-section h2 {
  font-family: 'Inter Tight', sans-serif;
  font-size: 1.05rem;
  margin: 0 0 var(--s-3);
  letter-spacing: -0.01em;
}
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.stats-table th, .stats-table td {
  text-align: left;
  padding: var(--s-2) var(--s-3);
  border-bottom: 1px solid var(--c-border);
}
.stats-table th {
  font-weight: 500;
  color: var(--c-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stats-table td.mono { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; }
.stats-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.stats-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--c-border);
  border-radius: 8px;
}
.stats-table-wrap .stats-table { min-width: 1360px; }
.stats-table--dense { font-size: 0.82rem; }
.stats-table--dense th,
.stats-table--dense td {
  padding: 0.55rem 0.65rem;
  vertical-align: top;
}
.stats-bar {
  height: 6px;
  background: var(--c-primary);
  border-radius: 3px;
  display: inline-block;
  vertical-align: middle;
  margin-right: var(--s-2);
}

.stats-empty {
  text-align: center;
  color: var(--c-muted);
  padding: var(--s-5);
  font-size: 0.95rem;
}
.stats-logout {
  font-size: 0.85rem;
  color: var(--c-muted);
  text-decoration: underline;
}

.stats-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-actions { display: flex; align-items: center; gap: var(--s-3); flex-wrap: wrap; }
.stats-note { font-size: 0.9rem; margin: 0; color: var(--c-muted); }

.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--s-5);
  background: var(--c-surface);
}
.admin-login__panel {
  width: min(100%, 420px);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-7);
  box-shadow: 0 16px 45px rgba(14, 27, 51, 0.08);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.admin-login__logo {
  height: 34px;
  width: auto;
  align-self: flex-start;
  margin-bottom: var(--s-2);
}
.admin-login h1 {
  font-size: 1.55rem;
  letter-spacing: 0;
}
.admin-login p {
  margin-top: calc(var(--s-3) * -1);
  font-size: 0.95rem;
}
.admin-alert {
  border: 1px solid rgba(180, 83, 9, 0.25);
  background: rgba(180, 83, 9, 0.08);
  color: var(--c-warning);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .stats-grid--two { grid-template-columns: 1fr; }
  .admin-login__panel { padding: var(--s-5); }
}

/* iurisMind product section */
.product-nav { background: var(--c-bg); border-bottom: 1px solid var(--c-border); }
.product-nav__inner { display: flex; align-items: center; gap: var(--s-5); min-height: 52px; overflow-x: auto; scrollbar-width: thin; }
.product-nav__label { flex: 0 0 auto; font-family: var(--ff-display); font-weight: 700; color: var(--c-ink); }
.product-nav a { flex: 0 0 auto; padding: var(--s-4) 0; color: var(--c-muted); font-size: 0.9rem; font-weight: 500; border-bottom: 2px solid transparent; }
.product-nav a:hover, .product-nav a:focus-visible, .product-nav a[aria-current="page"] { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.product-brand {
  display: flex;
  width: fit-content;
  margin: 0 0 var(--s-4);
  border-radius: var(--r-sm);
  transition: opacity 160ms ease;
}
.product-brand:hover { opacity: 0.82; }
.product-brand:focus-visible { outline: 3px solid rgba(35, 137, 225, 0.3); outline-offset: 4px; }
.product-brand img {
  display: block;
  width: clamp(170px, 18vw, 220px);
  height: auto;
}
.product-hero { padding-bottom: var(--s-8); }
.product-hero__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr); gap: var(--s-8); align-items: end; }
.product-hero__aside { border-left: 3px solid var(--c-primary); background: var(--c-surface); padding: var(--s-5); border-radius: 0 var(--r-lg) var(--r-lg) 0; }
.product-hero__aside strong { display: block; margin-bottom: var(--s-2); }
.product-hero__aside p { font-size: 0.94rem; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.product-card { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-6); background: var(--c-bg); border: 1px solid var(--c-border); border-radius: var(--r-lg); }
.product-card--surface { background: var(--c-surface); }
.product-card__num { font-family: var(--ff-mono); color: var(--c-primary); font-size: 0.8rem; letter-spacing: 0.08em; }
.product-card p { font-size: 0.95rem; }
.product-card a { color: var(--c-primary); font-weight: 600; margin-top: auto; }
.process-list { counter-reset: product-step; display: grid; gap: var(--s-3); }
.process-step { counter-increment: product-step; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-5) 0; border-top: 1px solid var(--c-border); }
.process-step::before { content: counter(product-step, decimal-leading-zero); font-family: var(--ff-mono); color: var(--c-primary); }
.process-step h3 { font-size: 1.25rem; margin-bottom: var(--s-2); }
.process-step p { max-width: 72ch; }
.outcome-list { display: grid; gap: var(--s-3); margin-top: var(--s-4); }
.outcome-list li { position: relative; padding-left: 1.35rem; color: var(--c-muted); }
.outcome-list li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 7px; height: 7px; border-radius: 50%; background: var(--c-primary); }
.use-case { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: var(--s-6); padding: var(--s-6) 0; border-top: 1px solid var(--c-border); }
.use-case__label { font-family: var(--ff-mono); color: var(--c-primary); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.use-case h3 { margin-top: var(--s-2); }
.use-case__body p + p { margin-top: var(--s-3); }
.notice { padding: var(--s-5); border: 1px solid var(--c-border); border-left: 3px solid var(--c-primary); border-radius: var(--r-md); background: var(--c-surface); }
.notice h3 { font-size: 1.15rem; margin-bottom: var(--s-2); }
.notice p { font-size: 0.95rem; }
.split-copy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7); }
.split-copy h2, .split-copy h3 { margin-bottom: var(--s-3); }
.split-copy p + p { margin-top: var(--s-3); }
.text-link { color: var(--c-primary); font-weight: 600; }
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-hero__grid { grid-template-columns: 1fr; gap: var(--s-6); }
}
@media (max-width: 768px) {
  .product-nav__inner { gap: var(--s-4); }
  .product-nav__label { position: sticky; left: 0; background: var(--c-bg); padding-right: var(--s-2); }
  .product-grid, .split-copy, .use-case { grid-template-columns: 1fr; }
  .product-card { padding: var(--s-5); }
  .process-step { grid-template-columns: 42px minmax(0, 1fr); }
  .use-case { gap: var(--s-3); }
}
