/* ==========================================================================
   FIRAL S.R.L. — Foglio di stile principale
   Stile: Minimal pulito · Mobile-first · Accessibilità AA
   ========================================================================== */

/* Reset & base
   ----------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Palette FIRAL — colori del marchio */
  --firal-blue:        #0083D7;   /* blu corporate primario */
  --firal-blue-dark:   #0066A8;   /* hover / scuro */
  --firal-blue-light:  #30A0E0;   /* azzurro accento */
  --firal-red:         #E20A16;   /* rosso accento */
  --firal-grey:        #3A3A3A;   /* grigio wordmark */

  --color-bg: #ffffff;
  --color-bg-subtle: #f5f9fc;
  --color-bg-muted: #eaf3fa;
  --color-text: #1f2937;
  --color-text-muted: #4b5563;
  --color-text-light: #6b7280;
  --color-border: #e5e7eb;
  --color-border-strong: #cbd5e1;
  --color-accent: var(--firal-blue);
  --color-accent-hover: var(--firal-blue-dark);
  --color-accent-light: #e7f4fc;

  /* Tipografia */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spaziature */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 880px;

  /* Radius e shadow */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);

  /* Transizioni */
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern', 'liga';
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover,
a:focus-visible {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Tipografia
   ----------------------------------- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2rem, 4.5vw + 1rem, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.625rem, 2.5vw + 0.75rem, 2.5rem);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.25rem, 1vw + 1rem, 1.5rem);
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: var(--space-sm);
  color: var(--color-text-muted);
  max-width: 65ch;
}

p.lead {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--color-text);
  max-width: 60ch;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

/* Layout — container
   ----------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-lg);
  }
}

/* Skip link (accessibilità)
   ----------------------------------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-sm);
  background: var(--color-text);
  color: var(--color-bg);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-sm);
  color: var(--color-bg);
}

/* Header
   ----------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.site-logo:hover,
.site-logo:focus-visible {
  color: var(--color-accent);
  text-decoration: none;
}

.site-logo__mark {
  width: 32px;
  height: 32px;
  background-color: var(--color-accent);
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
}

.site-logo__img {
  height: 48px;
  width: auto;
  display: block;
}

/* Logo nel footer: piastra bianca per leggibilità su sfondo scuro */
.site-footer .site-logo {
  background-color: #ffffff;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
}
.site-footer .site-logo__img { height: 44px; width: auto; }

/* Nav primaria
   ----------------------------------- */
.site-nav {
  display: none;
}

.site-nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.site-nav__link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-xs) 0;
  position: relative;
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  color: var(--color-text);
  text-decoration: none;
}

.site-nav__link[aria-current="page"] {
  color: var(--color-text);
  font-weight: 600;
}

.site-nav__link[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

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

/* Mobile nav toggle
   ----------------------------------- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: var(--color-text);
}

.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  display: block;
  width: 22px;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  position: relative;
  transition: transform var(--transition), top var(--transition), background-color var(--transition);
}

.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: '';
  position: absolute;
  left: 0;
}

.nav-toggle__icon::before { top: -7px; }
.nav-toggle__icon::after  { top:  7px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__icon { background-color: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after  { top: 0; transform: rotate(-45deg); }

/* Mobile nav (off-canvas semplice)
   ----------------------------------- */
@media (max-width: 767.98px) {
  .site-nav {
    display: block;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-100%);
    transition: transform var(--transition), opacity var(--transition);
    opacity: 0;
    pointer-events: none;
  }
  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-sm) var(--space-md);
  }
  .site-nav__link {
    display: block;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border);
  }
  .site-nav__list li:last-child .site-nav__link { border-bottom: 0; }
  .site-nav__link[aria-current="page"]::after { display: none; }
}

/* Sezioni
   ----------------------------------- */
.section {
  padding: var(--space-xl) 0;
}

@media (min-width: 768px) {
  .section { padding: var(--space-2xl) 0; }
}

.section--subtle { background-color: var(--color-bg-subtle); }

.section__header {
  margin-bottom: var(--space-lg);
  max-width: var(--container-narrow);
}

@media (min-width: 768px) {
  .section__header { margin-bottom: var(--space-xl); }
}

/* Hero
   ----------------------------------- */
.hero {
  padding: var(--space-xl) 0 var(--space-2xl);
  background: linear-gradient(180deg, var(--color-bg-subtle) 0%, var(--color-bg) 100%);
}

@media (min-width: 768px) {
  .hero { padding: var(--space-2xl) 0; }
}

.hero__content {
  max-width: var(--container-narrow);
}

.hero h1 { margin-bottom: var(--space-md); }

.hero p.lead { margin-bottom: var(--space-lg); }

/* Hero con video di sfondo
   ----------------------------------- */
.hero--video {
  position: relative;
  overflow: hidden;
  background: #0d1b2a;
  padding: var(--space-2xl) 0;
  min-height: 520px;
  display: flex;
  align-items: center;
}

@media (min-width: 768px) {
  .hero--video { min-height: 640px; }
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  /* Overlay più scuro sul lato sinistro (dove c'è il testo) per garantire
     leggibilità anche quando il video mostra elementi chiari (loghi, cerchi bianchi). */
  background:
    linear-gradient(95deg, rgba(0, 15, 35, 0.82) 0%, rgba(0, 30, 60, 0.55) 55%, rgba(0, 0, 0, 0.45) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.25) 100%);
  z-index: 1;
}

.hero--video > .container { position: relative; z-index: 2; width: 100%; }

.hero--video h1,
.hero--video p.lead {
  color: #ffffff;
  /* Ombra leggera che dà profondità al testo bianco e lo rende leggibile
     anche se il video sotto cambia improvvisamente colore. */
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.35);
}

.hero--video .eyebrow {
  color: #7dd3fc;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero--video p.lead { color: rgba(255, 255, 255, 0.92); }

.hero--video .btn--primary {
  background-color: #ffffff;
  color: var(--color-text);
  border-color: #ffffff;
}

.hero--video .btn--primary:hover,
.hero--video .btn--primary:focus-visible {
  background-color: var(--firal-blue);
  color: #ffffff;
  border-color: var(--firal-blue);
}

.hero--video .btn--secondary {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
  background-color: transparent;
}

.hero--video .btn--secondary:hover,
.hero--video .btn--secondary:focus-visible {
  background-color: #ffffff;
  color: var(--color-text);
  border-color: #ffffff;
}

/* Hero — variante split: video sinistra, testo destra
   ----------------------------------- */
.hero--split {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  background: var(--color-bg);
  padding: 0;
  overflow: hidden;
}

@media (min-width: 880px) {
  .hero--split {
    grid-template-columns: 1fr 1fr;
    min-height: 560px;
  }
}

@media (min-width: 1200px) {
  .hero--split {
    min-height: 640px;
  }
}

.hero--split__media {
  position: relative;
  background: #0d1b2a;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

@media (min-width: 880px) {
  .hero--split__media {
    aspect-ratio: auto;
  }
}

.hero--split__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero--split__body {
  display: flex;
  align-items: center;
  padding: var(--space-xl) var(--space-md);
}

@media (min-width: 768px) {
  .hero--split__body {
    padding: var(--space-2xl) var(--space-lg);
  }
}

@media (min-width: 1200px) {
  .hero--split__body {
    padding: var(--space-2xl) var(--space-xl);
  }
}

.hero--split__content {
  max-width: 540px;
}

.hero--split h1,
.hero--split p.lead {
  color: var(--color-text);
  text-shadow: none;
}

/* Variante anteprima — testo a destra (URL ?hero=right)
   ----------------------------------- */
[data-hero-variant="right"] .hero--video .hero__content {
  margin-left: auto;
  margin-right: 0;
  max-width: 540px;
}

[data-hero-variant="right"] .hero--video .hero__overlay {
  /* Specchiamo il gradiente: scuro a destra (dove va il testo) */
  background:
    linear-gradient(265deg, rgba(0, 15, 35, 0.82) 0%, rgba(0, 30, 60, 0.55) 55%, rgba(0, 0, 0, 0.40) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.20) 100%);
}

/* Variante anteprima — testo in basso (URL ?hero=bottom)
   ----------------------------------- */
[data-hero-variant="bottom"] .hero--video {
  align-items: flex-end;
}

[data-hero-variant="bottom"] .hero--video .hero__content {
  max-width: 760px;
  padding-bottom: var(--space-md);
}

[data-hero-variant="bottom"] .hero--video .hero__overlay {
  /* Centro chiaro, fascia scura solo in basso dove sta il testo */
  background:
    linear-gradient(180deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0) 35%,
      rgba(0, 0, 0, 0.45) 65%,
      rgba(0, 15, 35, 0.85) 100%);
}

/* Bottoni
   ----------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.875rem 1.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}

.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary {
  background-color: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-border-strong);
}

.btn--secondary:hover,
.btn--secondary:focus-visible {
  background-color: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* Numeri / KPI istituzionali
   ----------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

@media (min-width: 768px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
  }
}

.stat__number {
  display: block;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-text);
  line-height: 1.1;
}

.stat__label {
  display: block;
  margin-top: var(--space-xs);
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* Cards / griglia prodotti
   ----------------------------------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

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

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

.card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-accent-light);
  color: var(--color-accent);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: 1.5rem;
}

.card h3 { margin-bottom: var(--space-xs); }
.card p { margin-bottom: 0; font-size: 0.95rem; }

/* Evento in evidenza (con locandina)
   ----------------------------------- */
.event-feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: var(--color-bg);
}

@media (min-width: 880px) {
  .event-feature {
    grid-template-columns: 5fr 7fr;
  }
}

.event-feature__image {
  background-color: var(--color-bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  position: relative;
}

.event-feature__image img {
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: contain;
  display: block;
}

.event-feature__image--placeholder {
  background: linear-gradient(135deg, var(--firal-blue) 0%, var(--firal-blue-dark) 100%);
  color: rgba(255, 255, 255, 0.92);
  text-align: center;
  padding: var(--space-lg);
  font-size: 0.95rem;
  line-height: 1.5;
  flex-direction: column;
  gap: var(--space-sm);
}

.event-feature__body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

@media (min-width: 880px) {
  .event-feature__body { padding: var(--space-xl); }
}

.event-feature__type {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--firal-red);
}

.event-feature__title {
  font-size: clamp(1.5rem, 2vw + 1rem, 2rem);
  margin-bottom: 0.25rem;
}

.event-feature__subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.event-feature__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.event-feature__meta dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
}

.event-feature__meta dd {
  font-size: 1rem;
  color: var(--color-text);
  margin-top: 0.2rem;
}

/* Card eventi
   ----------------------------------- */
.event-card {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.event-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.event-card__date {
  background-color: var(--firal-blue);
  color: #ffffff;
  padding: 0.875rem var(--space-md);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.event-card__day {
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.event-card__month {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.event-card__year {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.85;
  letter-spacing: 0.05em;
}

.event-card__body {
  padding: var(--space-md) var(--space-md) var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.event-card__type {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--firal-red);
  margin-bottom: 0.4rem;
}

.event-card__body h3 {
  font-size: 1.125rem;
  margin-bottom: 0.4rem;
}

.event-card__meta {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 0.6rem;
}

.event-card__body p {
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* Sedi / location card
   ----------------------------------- */
.location {
  background-color: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.location__map {
  aspect-ratio: 16 / 9;
  background-color: var(--color-bg-muted);
}

.location__map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.location__body { padding: var(--space-lg); }
.location__city { font-size: 1.375rem; margin-bottom: var(--space-xs); }

.location__meta {
  list-style: none;
  margin-top: var(--space-sm);
  font-size: 0.95rem;
}

.location__meta li {
  display: flex;
  gap: var(--space-xs);
  padding: 0.35rem 0;
  color: var(--color-text-muted);
}

.location__meta strong {
  color: var(--color-text);
  min-width: 90px;
  display: inline-block;
}

/* Tabella prodotti / categorie
   ----------------------------------- */
.feature-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

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

.feature-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 6px;
  height: 6px;
  background-color: var(--color-accent);
  border-radius: 50%;
}

/* Form contatti
   ----------------------------------- */
.contact-form {
  display: grid;
  gap: var(--space-md);
  max-width: 640px;
}

.form-row {
  display: grid;
  gap: var(--space-md);
}

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

.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
}

.form-group label .required { color: #dc2626; }

.form-control {
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background-color: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.form-checkbox input { margin-top: 0.25rem; }

/* Contact info aside
   ----------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: start;
}

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

.contact-info {
  background-color: var(--color-bg-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.contact-info dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
}

.contact-info dt {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 0.25rem;
}

.contact-info dd { font-size: 1rem; color: var(--color-text); }

/* Footer
   ----------------------------------- */
.site-footer {
  background-color: var(--color-text);
  color: #cbd5e1;
  padding: var(--space-xl) 0 var(--space-md);
  font-size: 0.9rem;
}

.site-footer a { color: #e2e8f0; }
.site-footer a:hover,
.site-footer a:focus-visible { color: white; }

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-xl);
  }
}

.footer-brand { color: white; }
.footer-brand p { color: #94a3b8; max-width: 32ch; font-size: 0.9rem; }

.footer-title {
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.footer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-top: var(--space-md);
  border-top: 1px solid #334155;
  font-size: 0.8125rem;
  color: #94a3b8;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* Utilities
   ----------------------------------- */
.text-center { text-align: center; }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Banner cookie GDPR
   ----------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: var(--space-md);
  left: var(--space-md);
  right: var(--space-md);
  max-width: 720px;
  margin: 0 auto;
  background-color: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  padding: var(--space-md);
  z-index: 9999;
  display: none;
  font-size: 0.95rem;
  line-height: 1.55;
}

.cookie-banner.is-visible { display: block; }

@media (min-width: 768px) {
  .cookie-banner {
    padding: var(--space-md) var(--space-lg);
  }
}

.cookie-banner h2 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.cookie-banner p {
  margin-bottom: var(--space-sm);
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: var(--space-sm);
}

.cookie-banner__actions .btn {
  padding: 0.65rem 1.1rem;
  font-size: 0.875rem;
}

.cookie-banner__link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--color-accent);
  cursor: pointer;
  text-decoration: underline;
}

.cookie-banner__link:hover {
  color: var(--color-accent-hover);
}

/* Modale preferenze
   ----------------------------------- */
.cookie-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  z-index: 10000;
}

.cookie-modal.is-visible { display: flex; }

.cookie-modal__panel {
  background-color: var(--color-bg);
  border-radius: var(--radius-lg);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-lg);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.35);
}

.cookie-modal h2 { margin-bottom: 0.5rem; }
.cookie-modal p { font-size: 0.92rem; }

.cookie-option {
  border-top: 1px solid var(--color-border);
  padding: var(--space-md) 0;
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.cookie-option:first-of-type { border-top: 0; }

.cookie-option__text { flex: 1; }
.cookie-option__title {
  font-weight: 600;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cookie-option__title small {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--color-bg-muted);
  color: var(--color-text-light);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.cookie-option__desc {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle__slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--color-border-strong);
  border-radius: 24px;
  transition: background-color var(--transition);
}

.cookie-toggle__slider::before {
  content: '';
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: transform var(--transition);
}

.cookie-toggle input:checked + .cookie-toggle__slider {
  background-color: var(--firal-blue);
}

.cookie-toggle input:checked + .cookie-toggle__slider::before {
  transform: translateX(18px);
}

.cookie-toggle input:disabled + .cookie-toggle__slider {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

/* Riduzione movimento
   ----------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
