@import url('header-nav.css');
@import url('hero.css');
@import url('cards.css');
@import url('home.css');
@import url('article.css');
@import url('pages.css');
@import url('agora.css');
@import url('auth.css');
@import url('enhancements.css');

/* =========================
   VARIABILI – DESIGN SYSTEM
   ========================= */
:root {
  --primary:        #9e0101;
  --primary-dark:   #7a0000;
  --primary-light:  #c42b2b;
  --text-main:      #1a1a1a;
  --text-muted:     #6b7280;
  --text-light:     #9ca3af;
  --bg-page:        #ffffff;
  --bg-light:       #f8f7f5;
  --bg-card:        #ffffff;
  --border-light:   #e5e7eb;
  --border-medium:  #d1d5db;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.12), 0 4px 8px rgba(0,0,0,.06);

  --radius:     4px;
  --radius-lg:  8px;
  --radius-xl:  12px;
  --radius-pill: 999px;

  --transition: 0.22s ease;
  --transition-fast: 0.14s ease;

  --max-content: 1200px;
  --max-article: 820px;

  --header-h: 72px; /* mobile: 60px via media query in header-nav.css */

  --font-body:   system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif:  "Roboto Slab", Georgia, "Times New Roman", serif;
}

/* =========================
   RESET & BASE
   ========================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--bg-page);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  transition: color var(--transition-fast);
}

/* =========================
   UTILITY
   ========================= */
.container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* =========================
   BARRA LETTURA (progress)
   ========================= */
#read-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--primary);
  z-index: 2000;
  transition: width 0.1s linear;
}

/* =========================
   FOOTER
   ========================= */
.site-footer {
  background: #111;
  color: #d1d5db;
  padding: 3.5rem 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
}

.footer-brand > a svg,
.footer-logo {
  height: 56px;
  width: auto;
  opacity: 0.95;
  margin-bottom: 1rem;
  display: block;
}

.footer-tagline {
  font-size: 0.9rem;
  color: #9ca3af;
  line-height: 1.6;
  max-width: 260px;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.footer-social .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #d1d5db;
  background: #1f1f1f;
  text-decoration: none;
  transition: background var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.footer-social .social-link:hover {
  color: #fff;
  background: var(--primary, #9e0101);
  transform: translateY(-2px);
}

.footer-social .social-link svg {
  display: block;
  width: 18px;
  height: 18px;
}

.footer-col h4 {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 600;
  color: #f3f4f6;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col ul a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-col ul a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: var(--max-content);
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid #2d2d2d;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #6b7280;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* =========================
   SEZIONI HOME – TITOLI
   ========================= */
.home-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  padding: 0;
  margin: 2rem 0 1rem;
  border-left: 4px solid var(--primary);
  padding-left: 0.75rem;
}

h1 {
  padding: 0;
  margin: 0;
}

@media (max-width: 768px) {
  :root {
    --header-h: 60px;
  }
}
