@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Inconsolata:wght@300;400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #080808;
  --surface:  #111111;
  --surface2: #181818;
  --line:     #222222;
  --text:     #e8e4dc;
  --muted:    #666660;
  --accent:   #c8a96e;
  --accent2:  #8b6f3e;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inconsolata', monospace;
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

/* ─── CURSORE CUSTOM ─── */
.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: transform .1s ease, background .2s;
}

.cursor-ring {
  position: fixed;
  width: 32px;
  height: 32px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width .35s ease, height .35s ease, border-color .2s, opacity .2s;
  opacity: 0.5;
}

.cursor-ring.hover {
  width: 56px;
  height: 56px;
  opacity: 1;
  border-color: var(--accent);
}

/* ─── NOISE OVERLAY ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 9999;
}

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  border-bottom: 1px solid transparent;
  transition: border-color .4s, background .4s;
}
nav.scrolled {
  background: rgba(8,8,8,0.92);
  border-color: var(--line);
  backdrop-filter: blur(8px);
}

.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
}
.nav-links a {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width .3s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

/* ─── LOGO ─── */
.nav-logo-img {
  height: 78px;
  width: auto;
  display: block;
  filter: invert(1) brightness(0.85);
  transition: opacity .2s;
}
.nav-logo-img:hover { opacity: 0.7; }

/* ─── SECTIONS ─── */
.section {
  padding: 100px 48px;
  border-top: 1px solid var(--line);
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 64px;
}

.section-num {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ─── GALLERY ─── */
.gallery-grid {
  columns: 3;
  column-gap: 12px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform .6s cubic-bezier(.25,.46,.45,.94), filter .4s;
  filter: brightness(0.9) saturate(0.8);
}
.gallery-item:hover img {
  transform: scale(1.04);
  filter: brightness(1) saturate(1);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 50%);
  opacity: 0;
  transition: opacity .4s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }

.gallery-item-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 2px;
}
.gallery-item-meta {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--accent);
}

/* ─── LIGHTBOX ─── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.lightbox.open { opacity: 1; pointer-events: all; }

.lightbox img {
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
  border: 1px solid var(--line);
}

.lightbox-close {
  position: absolute;
  top: 32px; right: 40px;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .2s;
  background: none;
  border: none;
  cursor: none;
}
.lightbox-close:hover { color: var(--accent); }

.lightbox-info {
  position: absolute;
  bottom: 40px; left: 48px;
}
.lightbox-info h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 4px;
}
.lightbox-info p { font-size: 0.65rem; color: var(--muted); letter-spacing: 0.1em; }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 48px;
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  transition: color .2s, padding-left .3s;
}
.contact-link:hover { color: var(--accent); padding-left: 8px; }
.contact-link .arrow { font-size: 1rem; color: var(--line); transition: color .2s; }
.contact-link:hover .arrow { color: var(--accent); }


/* ─── FOOTER ─── */
footer {
  padding: 40px 48px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--muted);
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  nav { padding: 20px 28px; }
  .section { padding: 72px 28px; }
  .gallery-grid { columns: 2; }
  footer { padding: 32px 28px; }
}

@media (max-width: 600px) {
  .nav-links { display: none; }
  .section { padding: 56px 20px; }
  .gallery-grid { columns: 1; }
  footer { flex-direction: column; gap: 12px; text-align: center; }
}

@media print {
  * { animation: none !important; opacity: 1 !important; }
  body { background: white; color: black; cursor: auto; }
  nav, .lightbox, .cursor-dot, .cursor-ring { display: none; }
}

/* ─── LOGO ─── */
.nav-logo-img {
  height: 48px;
  width: auto;
  display: block;
  filter: invert(1) brightness(0.85);
  transition: opacity .2s;
}
.nav-logo-img:hover { opacity: 0.7; }

.footer-logo-img {
  height: 36px;
  width: auto;
  display: block;
  filter: invert(1) brightness(0.4);
}

/* ─── HAMBURGER MENU ─── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: none;
  padding: 4px;
  z-index: 101;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--muted);
  transition: transform .3s ease, opacity .3s ease, background .2s;
}
.hamburger:hover span { background: var(--accent); }

/* Animazione → X */
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Menu mobile a tutto schermo */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(8,8,8,0.97);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}
.mobile-menu a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.mobile-menu a:hover { color: var(--accent); }

@media (max-width: 600px) {
  .hamburger { display: flex; }
  .nav-links  { display: none; }
}
