/* ═══════════════════════════════════════════
   EKOS — Stili del sito (ex "CSS aggiuntivo" del Customizer)
   Classi custom (copper, surface…), menu mobile fullscreen.
   Caricato sia sul sito sia nell'editor a blocchi.
   ═══════════════════════════════════════════ */

/* ── Header scuro quando si scrolla.
   Niente backdrop-filter qui: creerebbe un "containing
   block" che intrappola l'overlay dentro l'header ── */
.ekos-header.is-scrolled {
  background-color: rgba(12, 12, 15, 0.92);
  border-bottom: 1px solid var(--border);
}

/* ── Blocco scroll pagina con menu aperto (senza JS) ── */
body:has(#ekos-mobile-nav.is-open) {
  overflow: hidden;
}

/* ── Menu mobile: overlay fullscreen trasparente con blur ──
   Sfrutta la classe .is-open già gestita dal JS del tema.
   z-index 40 = sotto l'header (50): logo e tasto Menu/Close
   restano sempre visibili e cliccabili. ── */
#ekos-mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 40;
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: calc(5.5rem + env(safe-area-inset-top, 0px)) 2rem calc(3rem + env(safe-area-inset-bottom, 0px));
  padding-top: calc(5.5rem + env(safe-area-inset-top, 0px));
  background-color: rgba(10, 10, 13, 0.55);
  background-image: radial-gradient(ellipse 90% 60% at 50% 40%, rgba(153, 211, 238, 0.08), transparent 70%);
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  backdrop-filter: blur(22px) saturate(1.25);
  overscroll-behavior: contain;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-2vh);
  transition: opacity 0.45s cubic-bezier(0.32, 0.72, 0, 1),
              transform 0.45s cubic-bezier(0.32, 0.72, 0, 1),
              visibility 0s linear 0.45s;
  border-top: 0;
}

#ekos-mobile-nav.is-open {
  display: flex;
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.45s cubic-bezier(0.32, 0.72, 0, 1),
              transform 0.45s cubic-bezier(0.32, 0.72, 0, 1);
}

#ekos-mobile-nav nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 28rem;
  margin: 0 auto;
  width: 100%;
}

#ekos-mobile-nav nav > a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1.35;
  letter-spacing: normal;
  text-transform: none;
  text-decoration: none;
  opacity: 0;
  transform: translateY(18px);
  filter: blur(8px);
  transition: opacity 0.5s cubic-bezier(0.32, 0.72, 0, 1),
              transform 0.5s cubic-bezier(0.32, 0.72, 0, 1),
              filter 0.5s cubic-bezier(0.32, 0.72, 0, 1),
              color 0.25s ease;
}

#ekos-mobile-nav.is-open nav > a {
  opacity: 1;
  transform: none;
  filter: blur(0);
}
#ekos-mobile-nav.is-open nav > a:nth-child(1) { transition-delay: 0.06s, 0.06s, 0.06s, 0s; }
#ekos-mobile-nav.is-open nav > a:nth-child(2) { transition-delay: 0.12s, 0.12s, 0.12s, 0s; }
#ekos-mobile-nav.is-open nav > a:nth-child(3) { transition-delay: 0.18s, 0.18s, 0.18s, 0s; }
#ekos-mobile-nav.is-open nav > a:nth-child(4) { transition-delay: 0.24s, 0.24s, 0.24s, 0s; }
#ekos-mobile-nav.is-open nav > a:nth-child(5) { transition-delay: 0.3s, 0.3s, 0.3s, 0s; }

#ekos-mobile-nav nav > div {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  opacity: 0;
  transition: opacity 0.5s ease 0.35s;
}
#ekos-mobile-nav.is-open nav > div {
  opacity: 1;
}

/* Tasto Menu: pill con transizione fluida, sempre sopra l'overlay */
.ekos-menu-toggle {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  position: relative;
  z-index: 50;
  transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}
.ekos-menu-toggle:hover {
  border-color: var(--border);
}
.ekos-menu-toggle:active {
  transform: scale(0.94);
}

@media (min-width: 768px) {
  .ekos-menu-toggle {
    display: none;
  }
  #ekos-mobile-nav {
    display: none;
  }
}

/* Riduzione movimento per chi la richiede */
@media (prefers-reduced-motion: reduce) {
  #ekos-mobile-nav,
  #ekos-mobile-nav.is-open,
  #ekos-mobile-nav nav > a {
    transition: opacity 0.15s ease;
    transform: none;
    filter: none;
  }
}

/* ═══════════════════════════════════════════
   VANILLA UTILITIES — sostituiscono Tailwind CDN
   (nessuna dipendenza esterna per il layout)
   Breakpoint: md = 768px · lg = 1024px
   ═══════════════════════════════════════════ */
:root {
  --copper: #99D3EE; /* ex rame, ora azzurro brand */
  --copper-soft: #488eaf;
}

/* ── display ── */
.block { display: block; }
.hidden { display: none; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* ── flex ── */
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.order-1 { order: 1; }
.order-2 { order: 2; }

/* ── gap ── */
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-14 { gap: 3.5rem; }
.gap-16 { gap: 4rem; }
.gap-x-6 { column-gap: 1.5rem; }
.gap-y-12 { row-gap: 3rem; }

/* ── space-y (margine tra fratelli verticali) ── */
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-y-10 > * + * { margin-top: 2.5rem; }
.space-y-16 > * + * { margin-top: 4rem; }

/* ── divide ── */
.divide-y > * + * { border-top-width: 1px; border-top-style: solid; }
.divide-border > * + * { border-top-color: var(--border); }

/* ── grid ── */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ── margin / padding ── */
.mx-auto { margin-left: auto; margin-right: auto; }
.-mx-4 { margin-left: -1rem; margin-right: -1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }
.mt-20 { margin-top: 5rem; }
.mt-24 { margin-top: 6rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-7 { padding-left: 1.75rem; padding-right: 1.75rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-5 { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.py-28 { padding-top: 7rem; padding-bottom: 7rem; }
.py-32 { padding-top: 8rem; padding-bottom: 8rem; }
.pt-8 { padding-top: 2rem; }
.pt-24 { padding-top: 6rem; }
.pt-32 { padding-top: 8rem; }
.pt-40 { padding-top: 10rem; }
.pb-12 { padding-bottom: 3rem; }
.pb-16 { padding-bottom: 4rem; }
.pb-24 { padding-bottom: 6rem; }
.pb-32 { padding-bottom: 8rem; }
.pl-6 { padding-left: 1.5rem; }
.pl-8 { padding-left: 2rem; }

/* ── width / height ── */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-px { width: 1px; }
.w-3 { width: 0.75rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.h-px { height: 1px; }
.h-3 { height: 0.75rem; }
.h-4 { height: 1rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.h-20 { height: 5rem; }
.h-full { height: 100%; }
.max-w-xs { max-width: 20rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }
.max-w-\[22ch\] { max-width: 22ch; }
.min-h-\[60vh\] { min-height: 60vh; }
.min-h-\[80vh\] { min-height: 80vh; }
.min-h-\[100svh\] { min-height: 100svh; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-\[4\/3\] { aspect-ratio: 4 / 3; }
.aspect-\[16\/10\] { aspect-ratio: 16 / 10; }
.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }

/* ── position ── */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.inset-x-0 { left: 0; right: 0; }
.top-0 { top: 0; }
.top-2 { top: 0.5rem; }
.right-8 { right: 2rem; }
.bottom-8 { bottom: 2rem; }
.-bottom-6 { bottom: -1.5rem; }
.-left-6 { left: -1.5rem; }
.-left-\[41px\] { left: -41px; }
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.overflow-hidden { overflow: hidden; }
.break-inside-avoid { break-inside: avoid; }

/* ── typography ── */
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-7xl { font-size: 4.5rem; line-height: 1; }
.text-\[9px\] { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }
.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }
.not-italic { font-style: normal; }
.text-center { text-align: center; }
.tabular-nums { font-variant-numeric: tabular-nums; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-\[0\.2em\] { letter-spacing: 0.2em; }
.tracking-\[0\.22em\] { letter-spacing: 0.22em; }
.tracking-\[0\.25em\] { letter-spacing: 0.25em; }
.tracking-\[0\.3em\] { letter-spacing: 0.3em; }
.leading-tight { line-height: 1.25; }
.leading-snug { line-height: 1.375; }
.leading-relaxed { line-height: 1.625; }
.leading-\[0\.98\] { line-height: 0.98; }
.leading-\[1\.02\] { line-height: 1.02; }
.leading-\[1\.05\] { line-height: 1.05; }
.leading-\[1\.1\] { line-height: 1.1; }

/* ── text colors ── */
.text-foreground { color: var(--foreground); }
.text-background { color: var(--background); }
.text-copper { color: var(--copper); }
.text-copper\/80 { color: color-mix(in oklab, var(--copper) 80%, transparent); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-muted-foreground\/60 { color: color-mix(in oklab, var(--muted-foreground) 60%, transparent); }
.text-muted-foreground\/70 { color: color-mix(in oklab, var(--muted-foreground) 70%, transparent); }

/* ── backgrounds ── */
.bg-transparent { background-color: transparent; }
.bg-background { background-color: var(--background); }
.bg-border { background-color: var(--border); }
.bg-copper { background-color: var(--copper); }
.bg-copper\/60 { background-color: color-mix(in oklab, var(--copper) 60%, transparent); }
.bg-surface { background-color: var(--surface); }
.bg-surface\/40 { background-color: color-mix(in oklab, var(--surface) 40%, transparent); }
.bg-surface\/60 { background-color: color-mix(in oklab, var(--surface) 60%, transparent); }
.bg-gradient-to-b { background-image: linear-gradient(to bottom, var(--tw-gradient-stops, transparent, transparent)); }
.bg-gradient-to-t { background-image: linear-gradient(to top, var(--tw-gradient-stops, transparent, transparent)); }
.from-background { --tw-gradient-from: var(--background); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent); }
.from-copper { --tw-gradient-from: var(--copper); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, transparent); }
.via-background\/30 { --tw-gradient-stops: var(--tw-gradient-from, transparent), color-mix(in oklab, var(--background) 30%, transparent), var(--tw-gradient-to, transparent); }
.via-background\/40 { --tw-gradient-stops: var(--tw-gradient-from, transparent), color-mix(in oklab, var(--background) 40%, transparent), var(--tw-gradient-to, transparent); }
.to-transparent { --tw-gradient-to: transparent; }
.to-background\/60 { --tw-gradient-to: color-mix(in oklab, var(--background) 60%, transparent); }
.bg-\[radial-gradient\(ellipse_at_center\,transparent_40\%\,var\(--background\)_100\%\)\] {
  background-image: radial-gradient(ellipse at center, transparent 40%, var(--background) 100%);
}

/* ── borders ── */
.border { border-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-y { border-top-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-bottom-style: solid; }
.border-l { border-left-width: 1px; border-left-style: solid; }
.border-l-2 { border-left-width: 2px; border-left-style: solid; }
.border-border { border-color: var(--border); }
.border-copper { border-color: var(--copper); }
.border-copper\/60 { border-color: color-mix(in oklab, var(--copper) 60%, transparent); }
.rounded-full { border-radius: 9999px; }
.ring-4 { box-shadow: 0 0 0 4px var(--tw-ring-color, transparent); }
.ring-background { --tw-ring-color: var(--background); }
.ring-copper\/20 { --tw-ring-color: color-mix(in oklab, var(--copper) 20%, transparent); }

/* ── opacity / effects ── */
.opacity-0 { opacity: 0; }
.opacity-40 { opacity: 0.4; }
.opacity-70 { opacity: 0.7; }
.resize-none { resize: none; }
.placeholder\:text-muted-foreground\/50::placeholder {
  color: color-mix(in oklab, var(--muted-foreground) 50%, transparent);
}

/* ── transitions ── */
.transition-colors { transition-property: color, background-color, border-color; transition-duration: 0.15s; }
.transition-all { transition-property: all; transition-duration: 0.15s; }
.transition-opacity { transition-property: opacity; transition-duration: 0.15s; }
.transition-transform { transition-property: transform; transition-duration: 0.15s; }
.duration-500 { transition-duration: 0.5s; }
.duration-\[1200ms\] { transition-duration: 1200ms; }
.ease-out { transition-timing-function: cubic-bezier(0, 0, 0.2, 1); }

/* ── hover / focus / group ── */
.hover\:bg-foreground:hover { background-color: var(--foreground); }
.hover\:bg-surface\/40:hover { background-color: color-mix(in oklab, var(--surface) 40%, transparent); }
.hover\:bg-surface\/60:hover { background-color: color-mix(in oklab, var(--surface) 60%, transparent); }
.hover\:border-copper:hover { border-color: var(--copper); }
.hover\:border-copper\/60:hover { border-color: color-mix(in oklab, var(--copper) 60%, transparent); }
.hover\:text-copper:hover { color: var(--copper); }
.hover\:text-foreground:hover { color: var(--foreground); }
.focus\:border-copper:focus { border-color: var(--copper); }
.focus\:outline-none:focus { outline: none; }
.group-hover\:opacity-80 { transition: opacity 0.3s ease; }
.group:hover .group-hover\:opacity-80 { opacity: 0.8; }
.group-hover\:opacity-100 { transition: opacity 0.3s ease; }
.group:hover .group-hover\:opacity-100 { opacity: 1; }
.group-hover\:scale-105 { transition: transform 0.5s ease; }
.group:hover .group-hover\:scale-105 { transform: scale(1.05); }
.group-hover\:w-12 { transition: width 0.5s ease; }
.group:hover .group-hover\:w-12 { width: 3rem; }
.group-hover\:w-16 { transition: width 0.5s ease; }
.group:hover .group-hover\:w-16 { width: 4rem; }

/* ── form base ── */
input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="search"], textarea, select {
  font: inherit;
  color: var(--foreground);
}
button { font: inherit; }

/* ── responsive: md (≥768px) ── */
@media (min-width: 768px) {
  .md\:block { display: block; }
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:flex-row { flex-direction: row; }
  .md\:items-center { align-items: center; }
  .md\:gap-24 { gap: 6rem; }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:grid-cols-\[240px_1fr\] { grid-template-columns: 240px 1fr; }
  .md\:col-span-2 { grid-column: span 2 / span 2; }
  .md\:h-12 { height: 3rem; }
  .md\:p-10 { padding: 2.5rem; }
  .md\:pl-12 { padding-left: 3rem; }
  .md\:py-40 { padding-top: 10rem; padding-bottom: 10rem; }
  .md\:-left-10 { left: -2.5rem; }
  .md\:-left-\[49px\] { left: -49px; }
  .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .md\:text-5xl { font-size: 3rem; line-height: 1; }
  .md\:text-6xl { font-size: 3.75rem; line-height: 1; }
  .md\:text-7xl { font-size: 4.5rem; line-height: 1; }
}

/* ── responsive: lg (≥1024px) ── */
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:items-center { align-items: center; }
  .lg\:items-end { align-items: flex-end; }
  .lg\:order-1 { order: 1; }
  .lg\:order-2 { order: 2; }
  .lg\:text-\[5\.5rem\] { font-size: 5.5rem; line-height: 1; }
}


/* ── Editor a blocchi (plugin EKOS Blocks) ── */
/* Formato "Accento rame" nei titoli. */
.ekos-accent { font-style: italic; color: var(--copper); }

/* Blocco "Testo libero": tipografia leggibile per paragrafi, titoletti, elenchi. */
.ekos-prose { color: var(--muted-foreground); font-size: 1.125rem; line-height: 1.75; }
.ekos-prose > * + * { margin-top: 1.5rem; }
.ekos-prose h2, .ekos-prose h3, .ekos-prose h4 { color: var(--foreground); line-height: 1.2; margin-top: 3rem; }
.ekos-prose h2 { font-size: 2.25rem; }
.ekos-prose h3 { font-size: 1.75rem; }
.ekos-prose h4 { font-size: 1.375rem; }
.ekos-prose strong { color: var(--foreground); font-weight: 600; }
.ekos-prose a { color: var(--copper); text-decoration: underline; text-underline-offset: 3px; }
.ekos-prose a:hover { color: var(--foreground); }
.ekos-prose ul { list-style: disc; padding-left: 1.5rem; }
.ekos-prose ol { list-style: decimal; padding-left: 1.5rem; }
.ekos-prose li + li { margin-top: .5rem; }
.ekos-prose blockquote { border-left: 2px solid var(--copper); padding-left: 1.5rem; font-family: var(--font-display); font-style: italic; font-size: 1.375rem; color: var(--foreground); }
.ekos-prose img { width: 100%; height: auto; }
.ekos-prose figcaption { margin-top: .75rem; font-family: var(--font-mono); font-size: 10px; letter-spacing: .25em; text-transform: uppercase; }
.ekos-prose hr { border: 0; border-top: 1px solid var(--border); margin: 3rem 0; }
