/* ============================================================
   DIADE – Associazione Italiana per la Didattica Digitale
   Etica e Adattiva
   style.css · Foglio di stile principale
   ============================================================ */


/* ── FONT LOCALI (@font-face) ──────────────────────────────── */
/* I font sono serviti dalla cartella /fonts/ del sito stesso. */
/* Nessuna comunicazione a server di terze parti.              */

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/cg-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/cg-300i.woff2') format('woff2');
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/cg-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/cg-400i.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('fonts/cg-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('fonts/dm-300.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('fonts/dm-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DM Sans';
  src: url('fonts/dm-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}


/* ── VARIABILI ─────────────────────────────────────────────── */
:root {
  --ink:       #152e4b;
  --deep:      #152e4b;
  --accent:    #c9974a;
  --accent2:   #7eb8a4;
  --light:     #f4f6f9;
  --white:     #ffffff;
  --mid:       #4a637f;
  --border:    rgba(21, 46, 75, .10);
}


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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--light);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
}


/* ── NAVIGAZIONE ───────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(244, 246, 249, .96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5vw;
  height: 68px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

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

.nav-logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--deep);
  letter-spacing: .04em;
}

.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 0 14px;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  transition: color .2s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--accent);
}

/* Hamburger mobile */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: .3s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  z-index: 99;
  background: var(--light);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  padding: 20px 5vw;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  padding: 12px 0;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.mobile-menu a:hover {
  color: var(--accent);
}


/* ── HERO ──────────────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 120px 5vw 80px;
  position: relative;
  overflow: hidden;
  background: var(--deep);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(201, 151, 74, .18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 10% 80%, rgba(126, 184, 164, .15) 0%, transparent 55%),
    linear-gradient(160deg, #152e4b 0%, #0c1e33 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  border: 1px solid rgba(201, 151, 74, .5);
  color: var(--accent);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 40px;
  margin-bottom: 36px;
}

.hero-content h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 28px;
}

.hero-content h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, .7);
  max-width: 640px;
  margin: 0 auto 48px;
  font-weight: 300;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, .4);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.scroll-hint span {
  display: block;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .4), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: .4; }
  50%       { opacity: 1; }
}


/* ── PULSANTI ──────────────────────────────────────────────── */
.btn-primary {
  background: var(--accent);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 4px;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: opacity .2s, transform .2s;
}

.btn-primary:hover {
  opacity: .88;
  transform: translateY(-2px);
}

.btn-outline {
  background: var(--accent);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 4px;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: opacity .2s, transform .2s;
}

.btn-outline:hover {
  opacity: .88;
  transform: translateY(-2px);
}

.btn-accent {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  padding: 16px 40px;
  border-radius: 4px;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  transition: opacity .2s, transform .2s;
}

.btn-accent:hover {
  opacity: .88;
  transform: translateY(-2px);
}


/* ── SEZIONI – ELEMENTI COMUNI ─────────────────────────────── */
section {
  padding: 40px 5vw;
}

section:nth-child(even) {
  background: var(--white);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--deep);
  margin-bottom: 40px;
}

.section-title em {
  font-style: italic;
}


/* ── CHI SIAMO ─────────────────────────────────────────────── */
.chi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.chi-text p {
  margin-bottom: 20px;
}

.chi-text p:last-child {
  margin-bottom: 0;
}

.chi-card {
  background: var(--deep);
  color: var(--white);
  padding: 48px 40px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.chi-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(201, 151, 74, .2);
}

.chi-card-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.5;
  color: rgba(255, 255, 255, .9);
  margin-bottom: 24px;
}

.chi-card-attr {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}

.chi-tag {
  display: inline-block;
  margin-top: 32px;
  border: 1px solid var(--border);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 40px;
  color: var(--mid);
}


/* ── COSA FACCIAMO ─────────────────────────────────────────── */
#cosa-facciamo {
  background: #f0f3f7;
}

.cosa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

.cosa-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 36px 32px;
  transition: transform .25s, box-shadow .25s;
}

.cosa-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(26, 26, 46, .08);
}

.cosa-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 300;
  color: rgba(201, 151, 74, .25);
  line-height: 1;
  margin-bottom: 16px;
}

.cosa-title {
  font-weight: 500;
  font-size: .95rem;
  color: var(--deep);
  margin-bottom: 12px;
}

.cosa-text {
  font-size: .88rem;
  color: var(--mid);
  line-height: 1.7;
}


/* ── I NOSTRI VALORI ───────────────────────────────────────── */
.valori-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.valore-item {
  padding: 44px 40px;
  background: var(--white);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background .2s;
}

.valore-item:hover {
  background: #f0f4f8;
}

.valore-item:nth-child(2n) {
  border-right: none;
}

.valore-icon {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.valore-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--deep);
  margin-bottom: 12px;
}

.valore-text {
  font-size: .88rem;
  color: var(--mid);
  line-height: 1.7;
}


/* ── CHI PUÒ ADERIRE ───────────────────────────────────────── */
#chi-puo-aderire {
  background: var(--deep);
}

#chi-puo-aderire .section-title {
  color: var(--white);
}

#chi-puo-aderire .section-label {
  
}

.aderire-intro {
  color: rgba(255, 255, 255, .7);
  max-width: 640px;
  margin-bottom: 56px;
}

.soci-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.socio-card {
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  padding: 32px 28px;
  background: rgba(255, 255, 255, .05);
  transition: background .2s, border-color .2s;
}

.socio-card:hover {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(201, 151, 74, .4);
}

.socio-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-bottom: 20px;
}

.socio-type {
  font-weight: 500;
  color: var(--white);
  font-size: .95rem;
  margin-bottom: 10px;
}

.socio-desc {
  font-size: .83rem;
  color: rgba(255, 255, 255, .55);
  line-height: 1.6;
}

.socio-ref {
  font-size: .75rem;
  font-style: italic;
  color: var(--accent);
  opacity: .65;
  margin-top: 12px;
  letter-spacing: .02em;
}

.socio-disclaimer {
  margin-top: 32px;
  padding: 16px 20px;
  background: rgba(201, 151, 74, .1);
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  font-size: .85rem;
  color: rgba(255, 255, 255, .6);
  line-height: 1.7;
}

.socio-disclaimer strong {
  color: var(--white);
  font-weight: 500;
}

.aderire-cta {
  margin-top: 52px;
}


/* ── COMITATO ETICO-SCIENTIFICO ────────────────────────────── */
.comitato-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}

.comitato-left .section-title {
  margin-bottom: 20px;
}

.comitato-left > p {
  color: var(--mid);
  line-height: 1.7;
}

.comitato-pillars {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pillar {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.pillar-line {
  width: 3px;
  background: var(--accent);
  border-radius: 2px;
  min-height: 48px;
  flex-shrink: 0;
}

.pillar-text strong {
  display: block;
  font-size: .9rem;
  color: var(--deep);
  margin-bottom: 4px;
}

.pillar-text span {
  font-size: .83rem;
  color: var(--mid);
}

.comitato-right {
  background: linear-gradient(135deg, #152e4b 0%, #0c1e33 100%);
  border-radius: 12px;
  padding: 52px 48px;
  color: var(--white);
}

.comitato-right h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 300;
  margin-bottom: 24px;
  line-height: 1.3;
}

.comitato-right p {
  color: rgba(255, 255, 255, .7);
  font-size: .9rem;
  line-height: 1.7;
}

.comitato-accent-line {
  width: 40px; height: 2px;
  background: var(--accent);
  margin: 28px 0;
}


/* ── DOVE SIAMO ────────────────────────────────────────────── */
#dove-siamo {
  background: var(--light);
}

.dove-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.dove-info > p {
  margin-bottom: 32px;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 24px;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.contact-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 4px;
}

.contact-value {
  font-size: .9rem;
  color: var(--ink);
}

.dove-visual {
  display: flex;
  align-items: stretch;
}

.dove-card {
  background: var(--deep);
  border-radius: 12px;
  padding: 52px 48px;
  color: var(--white);
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  position: relative;
  overflow: hidden;
}

.dove-card::before {
  content: '';
  position: absolute;
  bottom: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(201, 151, 74, .12);
}

.dove-card::after {
  content: '';
  position: absolute;
  top: -40px; left: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(126, 184, 164, .08);
}

.dove-city {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.dove-address-block {
  position: relative;
  z-index: 1;
  margin-bottom: 28px;
}

.dove-street {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 4px;
}

.dove-region {
  font-size: .9rem;
  color: rgba(255, 255, 255, .6);
}

.dove-divider {
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.dove-note {
  font-size: .85rem;
  color: rgba(255, 255, 255, .55);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.dove-note strong {
  color: rgba(255, 255, 255, .8);
  font-weight: 500;
}


/* ── FOOTER ────────────────────────────────────────────────── */
footer {
  background: var(--ink);
  color: rgba(255, 255, 255, .5);
  padding: 48px 5vw;
  text-align: center;
}

.footer-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-tagline {
  font-style: italic;
  color: rgba(255, 255, 255, .4);
  font-size: .9rem;
  margin-bottom: 28px;
  font-family: 'Cormorant Garamond', serif;
}

.footer-meta {
  font-size: .75rem;
  line-height: 1.9;
}


/* ── ANIMAZIONI SCROLL REVEAL ──────────────────────────────── */
/* Di default visibili; l'animazione si attiva solo se JS ha caricato */
.reveal {
  opacity: 1;
  transform: translateY(0);
}

/* Quando JS è attivo, body riceve la classe .js-ready */
body.js-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s ease, transform .7s ease;
}

body.js-ready .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ── RESPONSIVE ────────────────────────────────────────────── */

/* ── Tablet (≤900px) ── */
@media (max-width: 900px) {

  /* Layout griglie → colonna singola */
  .chi-grid,
  .comitato-inner,
  .dove-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .valori-grid {
    grid-template-columns: 1fr;
  }

  .valore-item:nth-child(2n) {
    border-right: 1px solid var(--border);
  }

  /* Navigazione: nascondi link, mostra hamburger */
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Chi siamo: card ocupa tutta la larghezza */
  .chi-card {
    padding: 36px 32px;
  }

  /* Comitato */
  .comitato-right {
    padding: 40px 36px;
  }

  /* Dove siamo: la card non ha altezza fissa */
  .dove-card {
    padding: 40px 36px;
  }
}


/* ── Mobile (≤600px) ── */
@media (max-width: 600px) {

  /* Sezioni */
  section {
    padding: 60px 5vw;
  }

  /* Hero */
  #hero {
    padding: 100px 5vw 60px;
    min-height: auto;
  }

  .hero-sub {
    font-size: .95rem;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .hero-ctas .btn-primary,
  .hero-ctas .btn-outline {
    width: 100%;
    text-align: center;
  }

  /* Video responsive */
  video {
    width: 100%;
    height: auto;
  }

  /* Titoli */
  .section-title {
    font-size: clamp(1.7rem, 7vw, 2.4rem);
    margin-bottom: 28px;
  }

  /* Chi siamo */
  .chi-card {
    padding: 28px 24px;
  }

  .chi-card-quote {
    font-size: 1.25rem;
  }

  /* Cosa facciamo */
  .cosa-card {
    padding: 28px 24px;
  }

  /* Valori */
  .valore-item {
    padding: 32px 24px;
  }

  /* Soci */
  .soci-grid {
    grid-template-columns: 1fr;
  }

  .socio-card {
    padding: 24px 20px;
  }

  .aderire-intro {
    font-size: .9rem;
  }

  /* Comitato */
  .comitato-right {
    padding: 28px 20px;
  }

  .comitato-inner {
    gap: 28px;
  }

  /* Dove siamo */
  .dove-card {
    padding: 32px 24px;
  }

  .contact-item {
    padding: 16px 18px;
  }

  /* Footer */
  footer {
    padding: 40px 5vw;
  }

  /* Tabella soci: scroll orizzontale */
  .wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Pulsanti CTA a larghezza piena */
  .btn-accent {
    width: 100%;
    text-align: center;
    padding: 16px 24px;
  }
}


/* ── Mobile piccolo (≤400px) ── */
@media (max-width: 400px) {

  section {
    padding: 48px 4vw;
  }

  nav {
    padding: 0 4vw;
  }

  .nav-logo-text {
    font-size: 1.1rem;
  }

  .chi-card,
  .dove-card,
  .comitato-right {
    padding: 24px 18px;
  }

  .cosa-card,
  .socio-card,
  .valore-item {
    padding: 22px 16px;
  }

  .contact-item {
    padding: 14px 14px;
  }

  footer {
    padding: 32px 4vw;
    font-size: .8rem;
  }
}