/* ============================================================
   Nome Cognome — Pittore Astratto
   Stile minimal ed elegante. Modifica i colori qui sotto.
   ============================================================ */

:root {
  --bg: #faf9f7;          /* sfondo bianco caldo */
  --ink: #1a1a1a;         /* testo quasi nero */
  --muted: #6b6b66;       /* testo secondario */
  --line: #e3e1dc;        /* linee sottili */
  --accent: #1a1a1a;      /* colore di richiamo (bottoni) */
  --max: 1200px;          /* larghezza massima contenuto */
}

/* ---------- Reset essenziale ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  background: rgba(250, 249, 247, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo {
  font-family: "Jost", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.06em;
}
.nav a {
  margin-left: clamp(1rem, 3vw, 2.2rem);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s;
}
.nav a:hover { color: var(--ink); }

/* Targhetta lingua ITA / ENG */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: clamp(1rem, 3vw, 2.2rem);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}
.lang-switch a {
  color: var(--muted);
  transition: color 0.25s;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.active {
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  pointer-events: none;       /* la lingua corrente non è cliccabile */
}
.lang-sep { color: var(--line); }

/* Header responsive: su schermi stretti il logo resta a sinistra,
   la lingua va a destra sulla stessa riga e il menu va sotto, a sinistra */
@media (max-width: 640px) {
  .site-header {
    flex-wrap: wrap;
    gap: 0.6rem 1rem;
    justify-content: flex-start;
    text-align: left;
  }
  .lang-switch { margin-left: auto; }
  .nav {
    order: 3;
    width: 100%;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0 1.3rem;
  }
  .nav a { margin-left: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 4rem clamp(1.2rem, 6vw, 6rem);
  overflow: hidden;
  isolation: isolate;
}

/* Slideshow di sfondo: dissolvenza + zoom lento (effetto cinematografico) */
.hero-slideshow { position: absolute; inset: 0; z-index: -2; }
.hero-slideshow .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  will-change: opacity, transform;
  animation: heroKenBurns 21s infinite;
}
.hero-slideshow .slide:nth-child(1) { animation-delay: 0s; }
.hero-slideshow .slide:nth-child(2) { animation-delay: 7s; }
.hero-slideshow .slide:nth-child(3) { animation-delay: 14s; }

@keyframes heroKenBurns {
  0%   { opacity: 0; transform: scale(1.0); }
  4%   { opacity: 1; }
  28%  { opacity: 1; }
  33%  { opacity: 0; transform: scale(1.09); }
  100% { opacity: 0; transform: scale(1.09); }
}

/* Velo scuro per rendere leggibile il testo bianco sopra le immagini */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(20,19,18,0.50) 0%, rgba(20,19,18,0.32) 45%, rgba(20,19,18,0.60) 100%);
}

/* Quando c'è il video, testo bianco e contenuto centrato/limitato */
.hero .hero-text {
  max-width: var(--max);
  margin: 0 auto;
  color: #fff;
}
.hero h1 { color: #fff; }
.hero .eyebrow { color: rgba(255,255,255,0.82); }
.hero .hero-sub { color: rgba(255,255,255,0.9); }
.hero .btn { border-color: #fff; color: #fff; }
.hero .btn:hover { background: #fff; color: var(--ink); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 1.2rem;
}

/* Chi preferisce meno animazioni: niente dissolvenze, resta la prima immagine */
@media (prefers-reduced-motion: reduce) {
  .hero-slideshow .slide { animation: none; }
  .hero-slideshow .slide:nth-child(1) { opacity: 1; transform: none; }
}
.hero h1 {
  font-size: clamp(2.6rem, 8vw, 6.5rem);
  line-height: 0.98;
  font-weight: 300;
  margin-bottom: 1.5rem;
  max-width: 13ch;          /* i nomi lunghi vanno a capo invece di sforare */
  overflow-wrap: break-word;
}
.hero-sub {
  max-width: 40ch;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: var(--muted);
  margin: 0 0 2.5rem;
}

/* ---------- Bottone ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 2.2rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.3s, color 0.3s;
}
.btn:hover { background: var(--accent); color: var(--bg); }

/* ---------- Titoli sezione ---------- */
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 2.5rem;
  font-weight: 300;
}
.section-title:has(+ .section-intro) { margin-bottom: 1rem; }
.section-intro {
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 2.5rem;
}

/* ---------- Galleria (masonry con colonne) ---------- */
.gallery-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem clamp(1.2rem, 6vw, 6rem);
}
.gallery {
  column-count: 3;
  column-gap: 1.5rem;
}
.art {
  margin: 0 0 1.5rem;
  break-inside: avoid;
}
.art a { display: block; overflow: hidden; }
.art img {
  width: 100%;
  transition: transform 0.6s ease, filter 0.6s ease;
  cursor: zoom-in;
}
.art:hover img { transform: scale(1.04); }
.art figcaption {
  margin-top: 0.7rem;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--muted);
}

@media (max-width: 900px) { .gallery { column-count: 2; } }
@media (max-width: 560px) { .gallery { column-count: 1; } }

/* ---------- Area feed Instagram automatico ---------- */
.ig-feed { min-height: 200px; }

/* Tasto "vedi tutte le opere su Instagram" sotto il feed */
.ig-cta { text-align: center; margin-top: 2.8rem; }

/* Segnaposto mostrato finché non incolli il codice del widget */
.ig-placeholder {
  border: 1px dashed var(--line);
  border-radius: 2px;
  padding: clamp(2.5rem, 6vw, 5rem) 1.5rem;
  text-align: center;
  color: var(--muted);
}
.ig-placeholder p { margin: 0 0 0.8rem; }
.ig-placeholder-note { font-size: 0.85rem; max-width: 46ch; margin: 0 auto 2rem; }
.ig-placeholder .btn { margin-top: 0.5rem; }

/* ---------- Lightbox solo CSS (:target) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(20, 19, 18, 0.92);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
}
.lightbox:target {
  opacity: 1;
  visibility: visible;
}
.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lb-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2.5rem;
  line-height: 1;
  color: #fff;
  opacity: 0.8;
}
.lb-close:hover { opacity: 1; }

/* ---------- Biografia ---------- */
.bio-section {
  background: #f3f1ec;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.bio-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem clamp(1.2rem, 6vw, 6rem);
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.bio-portrait img {
  width: 100%;
  max-width: 320px;       /* la foto attuale è piccola: evitiamo di ingrandirla troppo */
  aspect-ratio: 1 / 1;    /* quadrata, come la foto originale */
  object-fit: cover;
  border-radius: 2px;
}
@media (max-width: 760px) { .bio-portrait img { max-width: 240px; } }
.bio-text p {
  max-width: 56ch;
  margin: 0 0 1.2rem;
  color: #44443f;
}
@media (max-width: 760px) {
  .bio-grid { grid-template-columns: 1fr; }
}

/* ---------- Contatti ---------- */
.contact-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 6rem clamp(1.2rem, 6vw, 6rem);
  text-align: center;
}
.contact-lead {
  color: var(--muted);
  margin: 0 0 2.5rem;
}
.contact-links {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-links a {
  font-family: "Fraunces", serif;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.2rem;
  transition: border-color 0.3s;
}
.contact-links a:hover { border-color: var(--ink); }

/* Icone social: solo logo, minimal, in tinta col sito */
.contact-links a.social-icon {
  display: inline-flex;
  align-items: center;
  border-bottom: 0;
  padding-bottom: 0;
  color: var(--muted);
  transition: color 0.3s ease, transform 0.3s ease;
}
.contact-links a.social-icon:hover {
  color: var(--ink);
  transform: translateY(-2px);
}
.social-svg { display: block; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

/* ---------- Accessibilità: meno animazioni se richiesto ---------- */
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
