*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #e3e3e8;
  --bg-alt: #ffffff;
  --text: #222222;
  --muted: #6b6b6b;
  --primary: #00335a;
  --primary-soft: #0f4f7a;
  --accent: #c89b3c;
  --border-soft: #e1e1e6;
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.06);
  --radius-card: 18px;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* Layout base */
.container {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

.section {
  padding: 5rem 0;
}

.section-header {
  max-width: 640px;
  margin: 0 auto 2.5rem auto;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--muted);
  line-height: 1.6;
}

.two-cols {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
  gap: 2rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.75rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  background: #ddd;
}

.logo-text {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--muted);
  position: relative;
  padding-bottom: 0.1rem;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.2s ease;
}

.main-nav a:hover {
  color: var(--text);
}

.main-nav a:hover::after {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(0, 51, 90, 0.8), rgba(20, 88, 130, 0.7)),
    url("img/hero-bg.jpg") center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-content {
  position: relative;
  padding-block: 5rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  opacity: 0.9;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3rem);
  max-width: 540px;
  margin-bottom: 1rem;
}

.hero-text {
  max-width: 600px;
  font-size: 1.5rem;
  line-height: 1.6;
  opacity: 0.96;
  margin-bottom: 1.5rem;
}

/* Pulsanti */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.btn-primary {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: rgba(0, 0, 0, 0.12);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* Box testo */
.text-box-muted {
  background: var(--bg-alt);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

/* Grids */
.grid {
  display: grid;
  gap: 1.75rem;
}

/* Aree di attività */
.section-areas {
  background: var(--bg-alt);
}

.areas-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.area-card {
  background: #ffffff;
  border-radius: var(--radius-card);
  padding-bottom: 1.5rem;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.area-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.area-card h3 {
  font-size: 1.1rem;
  margin: 1rem 1.25rem 0.5rem 1.25rem;
}

.area-card p {
  margin: 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Numeri */
.section-numbers {
  background: #f0f2f7;
}

.numbers-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.number-card {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 1.75rem 1.5rem;
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.number {
  display: block;
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--primary-soft);
}

.number-card .label {
  display: block;
  margin-top: 0.4rem;
  color: var(--muted);
}

/* Valori */
.section-values {
  background: var(--bg-alt);
}

.values-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.value-card {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
}

/* Team */
.section-team {
  background: var(--bg-alt);
}

.team-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.team-card {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 1.5rem 1.5rem 1.75rem;
  box-shadow: var(--shadow-soft);
  text-align: left;
}

.team-card img {
  width: 100%;
  height: 190px;
  border-radius: 14px;
  object-fit: cover;
  margin-bottom: 0.9rem;
}

.team-card .role {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.team-card .bio {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Social wall */
.section-social {
  background: #f7f8fb;
}

.social-placeholder {
  border-radius: var(--radius-card);
  padding: 2.5rem;
  border: 1px dashed #c4c7d1;
  text-align: center;
  color: var(--muted);
}

/* Contatti */
.section-contacts {
  background: var(--bg-alt);
}

.contact-box {
  background: #fff;
  border-radius: var(--radius-card);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: #fff;
  padding-block: 2rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer a {
  color: #d7e5ff;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.privacy-btn {
  background: transparent;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: #fff;
  padding: 0.45rem 1.2rem;
  cursor: pointer;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 1rem;
  z-index: 40;
  display: none;
}

.cookie-inner {
  width: min(780px, 100% - 2rem);
  margin: 0 auto;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  padding: 1.5rem 1.5rem 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.cookie-inner h3 {
  margin-top: 0;
  margin-bottom: 0.4rem;
}

.cookie-inner p {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.cookie-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Cookie modal */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 15, 0.7);
}

.cookie-modal-dialog {
  width: min(520px, 100% - 2rem);
  background: #ffffff;
  border-radius: 20px;
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  position: relative;
}

.cookie-close {
  position: absolute;
  top: 0.7rem;
  right: 0.9rem;
  border: none;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

.cookie-intro {
  color: var(--muted);
  font-size: 0.95rem;
}

.cookie-category {
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: #f7f7fa;
  margin-top: 0.85rem;
}

.cookie-category-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.cookie-category h4 {
  margin: 0;
}

.badge {
  display: inline-flex;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: #d9e2ff;
  color: #192b74;
}

.cookie-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #c7c7d1;
  transition: 0.2s;
  border-radius: 999px;
}

.slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 4px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: 0.2s;
}

.switch input:checked + .slider {
  background: var(--primary-soft);
}

.switch input:checked + .slider::before {
  transform: translateX(18px);
}

/* === Animazioni scroll (reveal) === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-soft {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.5s ease-out,
    transform 0.5s ease-out;
}

.reveal-soft.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out;
}

.reveal-left.in-view {
  opacity: 1;
  transform: translateX(0);
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    row-gap: 0.3rem;
  }

  .two-cols {
    grid-template-columns: 1fr;
  }

  .cookie-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .cookie-inner {
    padding: 1.2rem 1.25rem 1.1rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .hero {
    min-height: 60vh;
  }
  .hero-content {
    padding-block: 4rem;
  }
  .hero h1 {
    font-size: 1.9rem;
  }
}
