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

:root {
  --bg:        #0d0d0d;
  --bg-2:      #141414;
  --surface:   #1a1a1a;
  --border:    #2a2a2a;
  --text:      #e8e8e8;
  --text-muted:#888;
  --accent:    #ffffff;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;
  --nav-h:     64px;
  --max-w:     1280px;
  --ease:      cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ─── Scroll-bar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { background: var(--accent); color: var(--bg); }

.btn-outline {
  border-color: var(--text-muted);
  color: var(--text-muted);
}
.btn-outline:hover { background: var(--text-muted); color: var(--bg); }

/* ─── Navigation ────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  z-index: 100;
  transition: background 0.3s var(--ease), backdrop-filter 0.3s;
}
.nav.scrolled {
  background: rgba(13,13,13,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}
.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-burger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ─── Hero ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--nav-h) 2rem 4rem;
  background: var(--bg);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://annafaoro.wordpress.com/wp-content/uploads/2024/11/000029.jpg') center/cover no-repeat;
  opacity: 0.18;
  filter: blur(3px);
  transform: scale(1.04);
}

.hero-content { max-width: 700px; position: relative; z-index: 1; }

.hero-tag {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 2.5rem;
}
.hero-title em { font-style: italic; color: var(--text-muted); }

.hero-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  writing-mode: vertical-rl;
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%,100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
  50%      { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

/* ─── Section shared ────────────────────────────────────────── */
section { padding: 6rem 2.5rem; }
h2 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  margin-bottom: 2.5rem;
}

/* ─── Portfolio ─────────────────────────────────────────────── */
.portfolio { background: var(--bg-2); }

.section-header {
  max-width: var(--max-w);
  margin: 0 auto 3rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.section-header h2 { margin-bottom: 0; }

.filter-tabs { display: flex; gap: 0.5rem; }
.filter-btn {
  padding: 0.4rem 1rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

/* Gallery columns */
.gallery {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.gallery-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-item {
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s var(--ease);
}
.gallery-item:hover img { transform: scale(1.04); }

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 1.2rem;
}
.gallery-item:hover .overlay { opacity: 1; }
.overlay-caption {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.85);
}

/* Placeholder colorati per le foto (rimuovi quando aggiungi le vere immagini) */
.img-placeholder {
  background: var(--surface);
  width: 100%;
}

/* ─── Lightbox ──────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] { display: none; }

.lightbox-inner {
  max-width: 90vw;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 85dvh;
  object-fit: contain;
}
.lightbox-caption {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.75rem;
  transition: color 0.2s;
  line-height: 1;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { color: var(--accent); }

.lightbox-close { top: 1.5rem; right: 1.5rem; font-size: 2rem; }
.lightbox-prev  { left: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 2rem; }
.lightbox-next  { right: 1.5rem; top: 50%; transform: translateY(-50%); font-size: 2rem; }

/* ─── About ─────────────────────────────────────────────────── */
.about { background: var(--bg-2); padding-bottom: 2rem; }

.about-centered {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.about-centered h2 { margin-bottom: 1.5rem; }
.about-centered p  { color: var(--text-muted); font-size: 1.05rem; line-height: 1.75; }

/* ─── Contatti ──────────────────────────────────────────────── */
.contatti { background: var(--bg-2); padding-top: 2rem; }

.contatti-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.contatti-sub {
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-size: 1rem;
}

.contact-form { text-align: left; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
label {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
input, textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 300;
  padding: 0.75rem 1rem;
  outline: none;
  resize: vertical;
  transition: border-color 0.2s;
  width: 100%;
}
input:focus, textarea:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--border); }

.contact-form .btn { width: 100%; justify-content: center; display: block; text-align: center; }

.form-feedback {
  margin-top: 1rem;
  font-size: 0.85rem;
  text-align: center;
  min-height: 1.2em;
  color: var(--accent);
}
.form-feedback.error { color: #e07070; }

.contatti-social {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 3rem;
}
.contatti-social a {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.contatti-social a:hover { color: var(--accent); border-color: var(--accent); }

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ─── Fade-in animation ─────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { padding: 0 1.5rem; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(13,13,13,0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 3rem 2rem;
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.4s var(--ease), opacity 0.4s;
    pointer-events: none;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-burger { display: flex; }

  .gallery { gap: 8px; }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .form-row { grid-template-columns: 1fr; }

  section { padding: 4rem 1.5rem; }
}

@media (max-width: 480px) {
  .gallery { gap: 6px; }
  .section-header { flex-direction: column; }
}
