/* ═══════════════════════════════════════════════════════════
   SHOURAI — main.css
   CSS condiviso tra tutte le pagine del sito.
   Caricato prima dei CSS specifici per pagina.
   ═══════════════════════════════════════════════════════════ */

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  --clr-bg:        #07070f;
  --clr-bg-2:      #0d0d1a;
  --clr-surface:   rgba(255,255,255,0.04);
  --clr-border:    rgba(255,255,255,0.08);
  --clr-primary:   #6366f1;
  --clr-secondary: #7c3aed;
  --clr-accent:    #00d9ff;
  --clr-text:      #f0f0ff;
  --clr-muted:     rgba(240,240,255,0.55);
  --clr-subtle:    rgba(240,240,255,0.25);
  --gradient-brand: linear-gradient(135deg, #6366f1 0%, #7c3aed 50%, #00d9ff 100%);
  --gradient-glow:  linear-gradient(135deg, rgba(99,102,241,0.15) 0%, rgba(124,58,237,0.15) 50%, rgba(0,217,255,0.08) 100%);
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;
  --shadow-glow: 0 0 30px rgba(99,102,241,0.25), 0 0 60px rgba(124,58,237,0.12);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; color-scheme: dark; }

body {
  background-color: var(--clr-bg);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(99,102,241,0.35); color: #fff; }

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

:focus-visible {
  outline: 2px solid var(--clr-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Utility ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Keyframes ────────────────────────────────────────────── */
@keyframes gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

/* ── Gradient text animato ───────────────────────────────── */
.gradient-text {
  background: var(--gradient-brand);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease infinite;
}

/* ── Scroll reveal ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Skeleton shimmer ────────────────────────────────────── */
.skel {
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 6px;
}

/* ── Navbar (glassmorphism — sempre attivo nelle pag. secondarie) */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 12px 0;
  background: rgba(7,7,15,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--clr-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-logo-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

/* Nav links row (pagine secondarie) */
.nav-links-row {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links-row a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--clr-muted);
  transition: color 0.2s ease;
}
.nav-links-row a:hover,
.nav-links-row a.active { color: var(--clr-text); }

/* ── Bottoni ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 50px;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity 0.2s ease, transform 0.2s var(--ease-spring), box-shadow 0.2s ease;
  box-shadow: 0 0 20px rgba(99,102,241,0.35);
  white-space: nowrap;
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 30px rgba(99,102,241,0.5);
}
.btn-primary:active { transform: scale(0.97); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 50px;
  border: 1px solid var(--clr-border);
  color: var(--clr-text);
  font-weight: 500;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease-spring);
}
.btn-outline:hover {
  border-color: rgba(99,102,241,0.5);
  background: rgba(99,102,241,0.08);
  transform: translateY(-1px);
}
.btn-outline:active { transform: scale(0.97); }

/* Bottone "torna alla home / indietro" (pagine secondarie) */
.btn-back,
.btn-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 50px;
  border: 1px solid var(--clr-border);
  color: var(--clr-muted);
  font-size: 0.88rem;
  font-weight: 500;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s var(--ease-spring);
}
.btn-back:hover,
.btn-home:hover {
  color: var(--clr-text);
  border-color: rgba(99,102,241,0.4);
  background: rgba(99,102,241,0.08);
  transform: translateX(-2px);
}

/* Gradient animato (per bottoni CTA) */
.btn-animated {
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
}

/* ── Glass Card ───────────────────────────────────────────── */
.glass-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s var(--ease-out);
}
.glass-card:hover {
  border-color: rgba(99,102,241,0.25);
  background: rgba(255,255,255,0.06);
  transform: translateY(-4px);
}

/* ── Sezione comune ───────────────────────────────────────── */
section { padding: 100px 0; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--clr-primary);
  margin-bottom: 16px;
}
.section-label::before {
  content: '';
  display: block;
  width: 20px; height: 2px;
  background: var(--gradient-brand);
  border-radius: 2px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--clr-muted);
  max-width: 560px;
  line-height: 1.75;
}

/* ── Page Hero (struttura condivisa) ─────────────────────── */
.page-hero {
  padding: 140px 0 72px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.page-hero-content { position: relative; z-index: 1; }

.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 50px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.25);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--clr-primary);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.page-subtitle {
  font-size: 1rem;
  color: var(--clr-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

.page-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.page-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--clr-subtle);
}
.page-meta-item svg { color: var(--clr-primary); flex-shrink: 0; }

/* ── Section divider ─────────────────────────────────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--clr-border), transparent);
  margin: 56px 0;
}

/* ── Footer (bottom bar condivisa) ──────────────────────── */
footer {
  background: #04040c;
  border-top: 1px solid var(--clr-border);
  padding: 40px 0;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copy { font-size: 0.82rem; color: var(--clr-subtle); }

.footer-legal {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-legal a {
  font-size: 0.82rem;
  color: var(--clr-subtle);
  transition: color 0.2s ease;
}
.footer-legal a:hover { color: var(--clr-muted); }
.footer-legal a.current { color: var(--clr-primary); }

/* ── Responsive condiviso ────────────────────────────────── */
@media (max-width: 480px) {
  .page-hero { padding: 120px 0 48px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
