:root {
  --bg: #F7F9FC;
  --paper: #FFFFFF;
  --ink: #0B132B;       /* E&A body color */
  --muted: #4A5568;
  --border: #E5EAF2;
  --primary: #1A73E8;   /* E&A link color */
  --accent: #123055;    /* Deep navy accent */
  --shadow: 0 8px 24px rgba(11,19,43,0.06);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue", sans-serif;
  line-height: 1.55;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: white;
  width: 36px; height: 36px; border-radius: 8px;
  display: grid; place-items: center; font-weight: 700; letter-spacing: 0.5px;
}
.brand-name { font-weight: 700; font-size: 18px; }
.nav { display: flex; gap: 18px; }
.nav-link { color: var(--ink); text-decoration: none; opacity: 0.85; font-weight: 600; }
.nav-link:hover { color: var(--primary); }

.hero { margin: 24px 0 8px; }
.hero h1 { margin: 0 0 6px 0; font-size: 32px; letter-spacing: 0.2px; }
.lead { margin: 0; color: var(--muted); font-size: 16px; }

.explainer { margin: 8px 0 16px; color: var(--ink); }
.explainer p { margin: 10px 0; }
.explainer a { color: var(--accent); text-decoration: none; font-weight: 600; }
.explainer a:hover { text-decoration: underline; }

/* Informational callout */
.callout {
  background: #eef6ff;
  border: 1px solid #cfe3ff;
  border-left: 4px solid var(--primary);
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--ink);
}
.callout.soon { background: #fff9ec; border-color: #ffe2b5; border-left-color: #ffb020; }

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

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow);
}
.card.empty { text-align: center; color: var(--muted); }
.eyebrow { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 6px; }
.card-title { font-size: 18px; margin: 0 0 10px; }
.meta { display: flex; gap: 14px; color: var(--muted); font-size: 13px; margin: 8px 0 14px; }

.button {
  display: inline-block;
  background: var(--primary);
  color: white; text-decoration: none; font-weight: 600;
  padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow);
}
.button:hover { filter: brightness(0.95); }
.button-outline { 
  background: transparent; 
  color: var(--accent); 
  border: 1px solid var(--accent); 
  -webkit-appearance: none; appearance: none; /* iOS focus/render */
}
.button-outline:hover { background: rgba(18,48,85,0.06); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 16px; }
.tile {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden;
  text-decoration: none; box-shadow: var(--shadow);
}
.tile-top { padding: 16px; font-weight: 700; color: var(--ink); }
.tile-bottom { padding: 14px 16px; background: #f1f5fb; color: var(--muted); border-top: 1px solid var(--border); }

.list { margin-top: 8px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.list-title { margin: 0 0 6px 0; font-size: 17px; }

.muted { color: var(--muted); }

.site-footer {
  margin-top: 36px;
  padding: 18px 0 36px;
  border-top: 1px solid var(--border);
  color: var(--muted);
}
.footer-brand { margin: 0 0 6px 0; font-weight: 600; }
/* Contact card styles */
.contact-card { margin-top: 10px; display: grid; gap: 6px; max-width: 420px; }
.contact-row { display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.contact-row strong { color: var(--muted); font-size: 12px; min-width: 78px; text-transform: uppercase; letter-spacing: 0.4px; }
.contact-card a { color: var(--accent); text-decoration: none; }
.contact-card a:hover { text-decoration: underline; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B132B;
    --paper: #0f1836;
    --ink: #EEF2F7;
    --muted: #A3ADC2;
    --border: #1e2a4a;
    --shadow: 0 10px 30px rgba(0,0,0,0.35);
  }
  .tile-bottom { background: #142147; }

  /* Migliora contrasto dei bottoni outline (es. "Apri") su sfondi scuri */
  .button-outline {
    color: #9EC1FF; /* azzurro leggibile */
    border-color: rgba(158,193,255,0.75);
    background: rgba(158,193,255,0.05);
  }
  .button-outline:hover { background: rgba(158,193,255,0.12); }

  /* Card contatti: maggiore separazione dallo sfondo */
  .card {
    background: #101c3e; /* leggermente più chiaro del body */
    border-color: #24345f;
    box-shadow: 0 12px 34px rgba(0,0,0,0.45);
  }
  .contact-row strong { color: #AFC3E6; }
  .contact-card a { color: #9EC1FF; }

  /* Callout generico: toni freddi leggibili sul dark */
  .callout {
    background: #0e2249;
    border-color: #25407a;
    border-left-color: #3B82F6; /* blu acceso per bordo */
    color: #dbe8ff;
  }
  /* Callout "giallo" (soon): sostituisci giallo accecante con ambra scura leggibile */
  .callout.soon {
    background: rgba(245, 158, 11, 0.12); /* amber-500 trasparente */
    border-color: rgba(245, 158, 11, 0.45);
    border-left-color: #F59E0B;
    color: #FFE8B0; /* testo ambra chiaro su scuro */
  }
}
