/* ============================================================
   PRIMARIS GROUP — Shared design system
   Used across homepage, division pages, about, contact
   ============================================================ */

:root {
  /* Brand */
  --navy: #1a2e4a;
  --navy-deep: #11203a;
  --navy-soft: #233b5e;
  --blue: #2563eb;          /* RIGENIND / institutional */
  --blue-hover: #1d4ed8;
  --blue-soft: #93c5fd;
  --teal: #01CEAE;          /* Opentra */
  --teal-hover: #00b598;
  --teal-soft: #5eead4;
  --orange: #f59e0b;        /* logo accent */
  --green: #22c55e;         /* logo accent */

  /* Dark surfaces */
  --text: #ffffff;
  --text-muted: #b8c5d6;
  --text-dim: #8a99b3;
  --card-border: rgba(255, 255, 255, 0.1);
  --card-bg: rgba(255, 255, 255, 0.03);
  --grid: rgba(255, 255, 255, 0.04);
  --grid-strong: rgba(255, 255, 255, 0.07);

  /* Light surfaces */
  --light-bg: #f7f8fa;
  --light-bg-alt: #ffffff;
  --light-text: #0f1729;
  --light-text-muted: #4a5568;
  --light-text-dim: #6b7a90;
  --light-border: #e5e9f0;
  --light-card-shadow: 0 12px 32px -12px rgba(15, 23, 41, 0.08), 0 2px 6px -2px rgba(15, 23, 41, 0.04);

  /* Layout */
  --max-w: 1440px;
  --pad-x: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--navy);
  color: var(--text);
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

/* ============================================================
   NAV (dark)
   ============================================================ */
.nav {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px var(--pad-x);
  max-width: var(--max-w);
  margin: 0 auto;
}
.nav.nav-light { color: var(--light-text); }

.logo {
  display: flex;
  align-items: center;
  height: 36px;
  flex-shrink: 0;
}
.logo img {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}
.nav.nav-light .nav-links a { color: var(--light-text-muted); }
.nav.nav-light .nav-links a:hover,
.nav.nav-light .nav-links a.active { color: var(--light-text); }

.nav-cta {
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--card-border);
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.2s;
}
.nav-cta:hover { background: rgba(255,255,255,0.1); }
.nav.nav-light .nav-cta {
  color: var(--light-text);
  background: rgba(15,23,41,0.05);
  border-color: var(--light-border);
}
.nav.nav-light .nav-cta:hover { background: rgba(15,23,41,0.1); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.005em;
  border: none;
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
  color: white;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
}
.btn-primary {
  background: var(--blue);
  box-shadow: 0 8px 24px -8px rgba(37, 99, 235, 0.6);
}
.btn-primary:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px rgba(37, 99, 235, 0.7);
}
.btn-secondary {
  background: var(--teal);
  box-shadow: 0 8px 24px -8px rgba(1, 206, 174, 0.55);
}
.btn-secondary:hover {
  background: var(--teal-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -8px rgba(1, 206, 174, 0.7);
}
.btn-ghost {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--card-border);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-light-ghost {
  background: transparent;
  border: 1px solid var(--light-border);
  color: var(--light-text);
}
.btn-light-ghost:hover { background: rgba(15,23,41,0.05); }
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  position: relative;
  width: 100%;
  padding: 120px var(--pad-x);
}
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-dark {
  background: var(--navy);
  color: var(--text);
}
.section-dark-deep {
  background: var(--navy-deep);
  color: var(--text);
}
.section-light {
  background: var(--light-bg-alt);
  color: var(--light-text);
}
.section-light-alt {
  background: var(--light-bg);
  color: var(--light-text);
}

.section-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 50%, black 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 50%, black 30%, transparent 90%);
  pointer-events: none;
}

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 8px 14px;
  border: 1px solid var(--card-border);
  border-radius: 100px;
  background: rgba(255,255,255,0.02);
  margin-bottom: 24px;
}
.section-light .eyebrow,
.section-light-alt .eyebrow {
  color: var(--light-text-dim);
  border-color: var(--light-border);
  background: var(--light-bg);
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 10px var(--teal);
}

/* Section header */
.section-head {
  max-width: 760px;
  margin-bottom: 72px;
}
.section-head h2 {
  font-size: clamp(34px, 3.4vw, 52px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 20px;
  text-wrap: balance;
}
.section-head h2 .accent-teal {
  background: linear-gradient(120deg, currentColor 30%, var(--teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-head h2 .accent-blue {
  color: var(--blue);
}
.section-head p {
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.55;
  font-weight: 500;
}
.section-dark .section-head p,
.section-dark-deep .section-head p { color: var(--text-muted); }
.section-light .section-head p,
.section-light-alt .section-head p { color: var(--light-text-muted); }

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--navy-deep);
  color: var(--text-muted);
  padding: 80px var(--pad-x) 32px;
  position: relative;
}
.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, black 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 0%, black 30%, transparent 90%);
  pointer-events: none;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--card-border);
}
.footer-brand .logo { margin-bottom: 20px; }
.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  max-width: 320px;
  color: var(--text-dim);
}
.footer-col h4 {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}
.footer-bottom .legal-links {
  display: flex;
  gap: 24px;
}
.footer-bottom a:hover { color: var(--text); }

/* ============================================================
   COMPLIANCE STRIP
   ============================================================ */
.compliance-strip {
  background: var(--light-bg);
  border-top: 1px solid var(--light-border);
  border-bottom: 1px solid var(--light-border);
  padding: 28px var(--pad-x);
}
.compliance-strip-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
}
.compliance-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light-text-dim);
}
.compliance-items {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.compliance-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--light-text);
}
.compliance-item svg {
  width: 18px;
  height: 18px;
  stroke: var(--blue);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.compliance-item .sub {
  font-weight: 500;
  color: var(--light-text-muted);
  font-size: 13px;
}

/* ============================================================
   PAGE HERO (smaller hero for sub-pages)
   ============================================================ */
.page-hero {
  position: relative;
  padding: 80px var(--pad-x) 100px;
  background:
    radial-gradient(ellipse 70% 50% at 80% 30%, rgba(1, 206, 174, 0.08), transparent 60%),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(37, 99, 235, 0.10), transparent 60%),
    var(--navy);
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 30%, black 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse 100% 80% at 50% 30%, black 30%, transparent 90%);
  pointer-events: none;
}
.page-hero-inner {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
}
.page-hero h1 {
  font-size: clamp(40px, 4.5vw, 64px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 20px;
  text-wrap: balance;
  max-width: 880px;
}
.page-hero p {
  font-size: clamp(16px, 1.25vw, 19px);
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.6;
  font-weight: 500;
}

/* ============================================================
   UTILITIES — fade reveal
   ============================================================ */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal-up.in { opacity: 1; transform: translateY(0); }

/* ============================================================
   BREAKPOINTS
   ============================================================ */
@media (max-width: 980px) {
  :root { --pad-x: 24px; }
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .compliance-strip-inner { gap: 16px; }
  .compliance-items { gap: 18px; }
  .section { padding: 80px var(--pad-x); }
}

/* ========================================================================
   MENU MOBILE (hamburger) — aggiunto per Primaris Group, maggio 2026
   ======================================================================== */

.nav-burger {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  padding: 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
}
.nav-burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 1px;
  transition: all .3s ease;
}
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--navy);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
}
.mobile-menu ul a {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.mobile-menu ul a:hover { color: var(--teal); }
.mobile-menu-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--teal);
  color: var(--navy);
  border-radius: 99px;
  font-weight: 700;
  text-decoration: none;
  font-size: 16px;
  margin-top: 12px;
}
.mobile-menu-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 980px) {
  .nav-burger { display: flex; }
  .nav-cta { display: none; } /* Nascondo "Contattaci →" da nav su mobile, è già nel menu */
}

/* Quando il menu è aperto, blocca lo scroll */
body.no-scroll { overflow: hidden; }


/* ========================================================================
   COOKIE BANNER MINIMAL — solo cookie tecnici, niente analytics
   ======================================================================== */

.cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 540px;
  margin: 0 auto;
  background: var(--navy);
  color: #fff;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px;
  padding: 18px 22px;
  z-index: 300;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
  display: none; /* Mostrato da JS solo se non già accettato */
  font-size: 14px;
  line-height: 1.55;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner p {
  margin: 0 0 14px 0;
  color: rgba(255,255,255,.85);
}
.cookie-banner a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cookie-btn {
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.cookie-btn-primary {
  background: var(--teal);
  color: var(--navy);
}
.cookie-btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
}
