/* ── FONT SELF-HOSTED (GDPR: nessuna chiamata a server terzi) ── */
@font-face { font-family:'Barlow'; font-style:normal; font-weight:400; font-display:swap; src:url('../fonts/barlow-400.woff2') format('woff2'); }
@font-face { font-family:'Barlow'; font-style:normal; font-weight:500; font-display:swap; src:url('../fonts/barlow-500.woff2') format('woff2'); }
@font-face { font-family:'Barlow'; font-style:normal; font-weight:600; font-display:swap; src:url('../fonts/barlow-600.woff2') format('woff2'); }
@font-face { font-family:'Barlow Condensed'; font-style:normal; font-weight:500; font-display:swap; src:url('../fonts/barlow-condensed-500.woff2') format('woff2'); }
@font-face { font-family:'Barlow Condensed'; font-style:normal; font-weight:600; font-display:swap; src:url('../fonts/barlow-condensed-600.woff2') format('woff2'); }
@font-face { font-family:'Barlow Condensed'; font-style:normal; font-weight:700; font-display:swap; src:url('../fonts/barlow-condensed-700.woff2') format('woff2'); }
@font-face { font-family:'Barlow Condensed'; font-style:normal; font-weight:800; font-display:swap; src:url('../fonts/barlow-condensed-800.woff2') format('woff2'); }

/* ── RESET & ROOT ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── EP3D palette: navy profondo · ciano elettrico · argento metallico ── */
  --bg:  #071019;          /* navy più profondo */
  --bg2: #0b1a27;          /* sezione navy */
  --bg3: #102636;          /* card */
  --bg4: #16344c;          /* card hover */
  --light:  #eef3f8;       /* bianco freddo */
  --light2: #e3edf4;
  --light3: #d7e3ec;
  --text:  #eaf3fb;        /* bianco freddo */
  --text2: #93aabd;        /* acciaio attenuato */
  --text3: #5c7285;        /* acciaio spento */
  --text-dark:  #0b1c2a;   /* navy inchiostro (sezioni chiare) */
  --text-dark2: #45606f;
  --accent:       #1583cb;  /* azzurro elettrico EP3D */
  --accent-light: #37a8ec;
  --accent-bright:#63c3f6;  /* highlight / bagliore */
  --accent-dim:  rgba(21,131,203,0.12);
  --accent-dim2: rgba(55,168,236,0.26);
  --accent-glow: rgba(55,168,236,0.45);
  --silver: #c3d3df;        /* testo metallico */
  --border:  rgba(137,193,234,0.11);
  --border2: rgba(137,193,234,0.24);
  --border-light: rgba(11,28,42,0.10);
  --border-light2: rgba(11,28,42,0.20);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── SFONDO TECNICO: bagliore navy + griglia blueprint (solo sezioni scure) ── */
.tech-bg {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.tech-bg::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(rgba(137,193,234,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(137,193,234,0.05) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 90% 70% at 30% 25%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 30% 25%, #000 20%, transparent 75%);
}
.tech-bg::after {
  content: ''; position: absolute;
  width: 640px; height: 640px; top: -140px; right: -120px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 68%);
  opacity: 0.5; filter: blur(6px);
}

/* Testo metallico argento→ciano per accenti display */
.metal {
  background: linear-gradient(160deg, #eef6fc 0%, var(--silver) 40%, var(--accent-light) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 1rem;
}
.label-light { color: var(--accent-light); }
.label-dark { color: var(--accent); }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  color: #fff;
  padding: 14px 34px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  border-radius: 3px; border: none; cursor: pointer;
  box-shadow: 0 6px 22px -8px var(--accent-glow);
  transition: box-shadow 0.25s, transform 0.15s, filter 0.2s;
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 12px 32px -8px var(--accent-glow); }

.btn-outline {
  display: inline-block;
  border: 1.5px solid var(--border2);
  color: var(--text);
  padding: 13px 32px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  border-radius: 2px; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn-outline:hover { background: rgba(255,255,255,0.06); border-color: var(--accent); color: var(--accent-light); }

.btn-outline-dark {
  display: inline-block;
  border: 1.5px solid var(--border-light2);
  color: var(--text-dark);
  padding: 13px 32px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  border-radius: 2px; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn-outline-dark:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

.btn-white {
  display: inline-block;
  background: #fff;
  color: var(--text-dark);
  padding: 14px 34px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  border-radius: 2px; border: none; cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.15s;
}
.btn-white:hover { background: var(--light2); transform: translateY(-1px); }

/* ── NAV ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  height: 72px;
  background: rgba(7,16,25,0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav-logo img { height: 44px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text2);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  transition: color 0.2s; position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ''; position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px; background: var(--accent);
}

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 22px;
  border-radius: 2px;
  font-weight: 700 !important;
}
.nav-cta:hover { background: var(--accent-light) !important; }
.nav-cta.active::after { display: none; }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 4px; flex-direction: column; gap: 5px; }
.hamburger span { display: block; width: 22px; height: 1.5px; background: var(--text); transition: 0.3s; }

/* ── PAGE HERO ── */
.page-hero {
  position: relative;
  height: 52vh; min-height: 400px;
  display: flex; align-items: flex-end;
  padding: 0 5vw 4.5rem;
  margin-top: 72px; overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(0.34) saturate(0.6) hue-rotate(178deg);
}
.page-hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 90% at 85% 12%, var(--accent-glow) 0%, transparent 55%),
    linear-gradient(to top, rgba(7,16,25,0.98) 0%, rgba(7,16,25,0.30) 100%);
}
.page-hero-content { position: relative; z-index: 2; }
.page-hero-content h1 { font-size: clamp(2.8rem, 5.5vw, 5rem); color: var(--text); }
.page-hero-content p { margin-top: 1rem; color: var(--text2); max-width: 580px; font-size: 1rem; line-height: 1.75; }

/* ── SECTION WRAPPERS ── */
.section { padding: 6rem 5vw; }
.section-sm { padding: 3.5rem 5vw; }

.on-dark { background: var(--bg); }
.on-dark2 { background: var(--bg2); }
.on-dark3 { background: var(--bg3); }
.on-light { background: var(--light); color: var(--text-dark); }
.on-light2 { background: var(--light2); color: var(--text-dark); }
.on-accent { background: var(--accent); color: #fff; }

/* ── SECTION HEADER ── */
.section-header { margin-bottom: 3.5rem; }
.section-header h2 { font-size: clamp(2rem, 3.5vw, 3.2rem); }
.section-header p { margin-top: 0.9rem; max-width: 580px; font-size: 0.97rem; line-height: 1.75; }
.on-dark .section-header p,
.on-dark2 .section-header p,
.on-dark3 .section-header p { color: var(--text2); }
.on-light .section-header p,
.on-light2 .section-header p { color: var(--text-dark2); }

/* ── STRIP CTA ── */
.strip-cta {
  background: var(--accent);
  padding: 5rem 5vw;
  display: flex; align-items: center;
  justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.strip-cta h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); color: #fff; }
.strip-cta p { color: rgba(255,255,255,0.75); margin-top: 0.4rem; font-size: 1rem; }

/* ── FOOTER ── */
.site-footer { background: var(--bg); border-top: 1px solid var(--border); }

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 3rem; padding: 4rem 5vw;
}
.footer-brand img { height: 52px; width: auto; margin-bottom: 1.2rem; }
.footer-brand p { font-size: 0.85rem; color: var(--text3); line-height: 1.7; max-width: 280px; }

.footer-col h5 {
  font-size: 11px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 1.2rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col ul a { font-size: 0.88rem; color: var(--text2); transition: color 0.2s; }
.footer-col ul a:hover { color: var(--text); }

.footer-contact p { font-size: 0.88rem; color: var(--text2); line-height: 1.9; }
.footer-contact a { color: var(--text2); transition: color 0.2s; }
.footer-contact a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.4rem 5vw;
  display: flex; align-items: center;
  justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.footer-bottom p { font-size: 12px; color: var(--text3); }
.footer-bottom a { color: var(--text3); font-size: 12px; transition: color 0.2s; }
.footer-bottom a:hover { color: var(--text2); }

/* ── SCROLL TOP ── */
#scrolltop {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  background: var(--accent); border: none; border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0; transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s; z-index: 90;
}
#scrolltop.visible { opacity: 1; transform: translateY(0); }
#scrolltop svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* ── FADE IN ── */
.fade-in { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── SHARED CARD STYLES ── */
.card-dark {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 2px; padding: 2rem 1.8rem;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.card-dark:hover { border-color: var(--accent); background: var(--bg4); transform: translateY(-4px); box-shadow: 0 16px 40px -20px var(--accent-glow); }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .site-nav { padding: 0 4vw; }
  .nav-links {
    display: none; flex-direction: column; align-items: flex-start;
    position: absolute; top: 72px; left: 0; right: 0;
    background: rgba(7,16,25,0.98);
    padding: 1.5rem 4vw 2rem;
    border-bottom: 1px solid var(--border); gap: 1.4rem;
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .section { padding: 4rem 4vw; }
  .section-sm { padding: 2.5rem 4vw; }
  .footer-main { grid-template-columns: 1fr; gap: 2rem; }
  .strip-cta { flex-direction: column; }

  /* Page hero mobile */
  .page-hero { height: 44vh; min-height: 320px; padding: 0 4vw 3rem; }
  .page-hero-content h1 { font-size: clamp(2rem, 8vw, 3rem); }

  /* About split mobile — foto sopra, testo sotto */
  .about-split { grid-template-columns: 1fr; min-height: unset; }
  .about-split-img { height: 260px; }
  .about-split-img-badge { padding: 1.2rem 1.6rem; }
  .about-split-img-badge .n { font-size: 2.5rem; }
  .about-text { padding: 3rem 4vw; }

  /* Reviews mobile — 1 colonna */
  .reviews-grid { grid-template-columns: 1fr !important; }
  .newsletter-form { flex-direction: column; min-width: unset; }
  .newsletter-form input { border-right: 1px solid var(--border2); border-bottom: none; border-radius: 2px 2px 0 0; }
  .newsletter-form button { border-radius: 0 0 2px 2px; }

  /* Blog featured mobile */
  .blog-featured { grid-template-columns: 1fr !important; }
  .blog-featured .blog-card-img { min-height: 220px; height: 220px; }

  /* Strip CTA mobile */
  .strip-cta, .cta-strip { padding: 3.5rem 4vw; text-align: center; }
}

/* ── COOKIE BANNER ── */
#cookie-banner {
  position: fixed; left: 1.2rem; right: 1.2rem; bottom: 1.2rem;
  z-index: 200; max-width: 760px; margin: 0 auto;
  background: rgba(11,26,39,0.97);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border2);
  border-radius: 6px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.7), 0 0 40px -20px var(--accent-glow);
  padding: 1.5rem 1.6rem;
  display: none;
}
#cookie-banner.show { display: block; animation: cookieUp 0.4s ease; }
@keyframes cookieUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
#cookie-banner .ck-head {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem; font-weight: 700; color: var(--text);
  margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.6rem;
}
#cookie-banner .ck-head svg { width: 20px; height: 20px; stroke: var(--accent-light); fill: none; stroke-width: 1.6; }
#cookie-banner p { font-size: 0.86rem; color: var(--text2); line-height: 1.7; margin-bottom: 1.2rem; }
#cookie-banner p a { color: var(--accent-light); text-decoration: underline; }
#cookie-banner .ck-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
#cookie-banner .ck-actions button {
  flex: 1; min-width: 150px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 12px 20px; border-radius: 3px; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, filter 0.2s;
}
.ck-reject { background: transparent; border: 1.5px solid var(--border2); color: var(--text); }
.ck-reject:hover { border-color: var(--accent-light); color: var(--accent-light); }
.ck-accept { background: linear-gradient(135deg, var(--accent-light), var(--accent)); border: none; color: #fff; box-shadow: 0 6px 22px -8px var(--accent-glow); }
.ck-accept:hover { filter: brightness(1.08); }
@media (max-width: 560px) {
  #cookie-banner { left: 0.7rem; right: 0.7rem; bottom: 0.7rem; padding: 1.3rem 1.2rem; }
  #cookie-banner .ck-actions button { flex: 1 1 100%; }
}

/* ── LIGHT SECTION TEXT OVERRIDES ── */
.on-light h1, .on-light h2, .on-light h3, .on-light h4,
.on-light2 h1, .on-light2 h2, .on-light2 h3, .on-light2 h4 {
  color: var(--text-dark);
}
.on-light p, .on-light2 p { color: var(--text-dark2); }
.on-light .label, .on-light2 .label { color: var(--accent); }

/* Page-hero label always accent */
.page-hero-content .label { color: var(--accent); }

/* value-num on dark sections */
.on-dark .value-num, .on-dark2 .value-num { color: rgba(255,255,255,0.15); }

/* strip-cta btn override */
.strip-cta a.btn-white, .cta-strip a.btn-white { color: var(--text-dark); }

/* filter btns on light bg */
.on-light .filter-btn, .on-light2 .filter-btn {
  border-color: var(--border-light2);
  color: var(--text-dark2);
  background: transparent;
}
.on-light .filter-btn.active, .on-light .filter-btn:hover,
.on-light2 .filter-btn.active, .on-light2 .filter-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
