/* ===================================================
   Falegnameria Vascelli Daniele — stile scuro elegante
   =================================================== */

:root {
  --bg: #14110f;
  --bg-alt: #1b1714;
  --surface: #211c19;
  --surface-hover: #2a2420;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f1ece4;
  --text-muted: #a89e93;
  --accent: #c9a877;
  --accent-soft: rgba(201, 168, 119, 0.15);
  --shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  --radius: 10px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand-name {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 17, 15, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 34px;
  height: 34px;
  opacity: 0.95;
}

.brand-name {
  font-size: 1.05rem;
  line-height: 1.1;
}

.brand-name small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Hamburger button */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 200;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.menu-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(320px, 82vw);
  height: 100vh;
  background: var(--bg-alt);
  border-left: 1px solid var(--border);
  padding: 90px 32px 32px;
  transform: scale(0.96);
  transform-origin: top right;
  transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 150;
  overflow-y: auto;
}

.nav-menu.open {
  right: 0;
  transform: scale(1);
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.4);
}

.nav-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu li {
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateX(16px);
}

.nav-menu.open li {
  animation: nav-item-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nav-menu.open li:nth-child(1) { animation-delay: 0.06s; }
.nav-menu.open li:nth-child(2) { animation-delay: 0.1s; }
.nav-menu.open li:nth-child(3) { animation-delay: 0.14s; }
.nav-menu.open li:nth-child(4) { animation-delay: 0.18s; }
.nav-menu.open li:nth-child(5) { animation-delay: 0.22s; }
.nav-menu.open li:nth-child(6) { animation-delay: 0.26s; }
.nav-menu.open li:nth-child(7) { animation-delay: 0.3s; }

@keyframes nav-item-in {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.nav-menu a {
  display: block;
  padding: 16px 4px;
  font-size: 1.05rem;
  color: var(--text);
  transition: color 0.25s ease, padding-left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--accent);
  padding-left: 10px;
}

.nav-menu .nav-section-label {
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin: 28px 0 8px;
}

.nav-menu .nav-section-label:first-of-type {
  margin-top: 0;
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 7, 0.55);
  backdrop-filter: blur(0px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    backdrop-filter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 140;
}

.nav-overlay.open {
  opacity: 1;
  backdrop-filter: blur(4px);
  pointer-events: auto;
}

body.nav-locked {
  overflow: hidden;
}

/* ---------- Hero (home page) ---------- */

.hero {
  padding: 110px 24px 90px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201, 168, 119, 0.08), transparent 60%),
    var(--bg);
}

.hero-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 28px;
  opacity: 0.9;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 18px;
}

.hero p {
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ---------- Sezioni generiche ---------- */

.page-header {
  padding: 70px 24px 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.page-header .eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 14px;
}

.page-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 14px;
}

.page-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ---------- Categories grid (home) ---------- */

.categories-section {
  padding: 70px 24px;
}

.categories-section h2 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 40px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.category-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  background: var(--surface-hover);
  border-color: var(--accent);
}

.category-card .icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  color: var(--accent);
}

.category-card h3 {
  font-size: 1.1rem;
  margin: 0 0 8px;
}

.category-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* ---------- Gallery grid (category pages) ---------- */

.gallery-section {
  padding: 60px 24px 90px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.gallery-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.gallery-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.gallery-card .photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--bg-alt);
}

.gallery-card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card .info {
  padding: 20px 22px 24px;
}

.gallery-card h3 {
  font-size: 1.1rem;
  margin: 0 0 8px;
}

.gallery-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- Pagina di dettaglio progetto ---------- */

.back-link {
  display: inline-block;
  margin: 28px 24px 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--accent);
}

.project-gallery-section {
  padding: 20px 24px 90px;
}

.project-main {
  position: relative;
  max-width: 860px;
  margin: 0 auto 20px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  box-shadow: var(--shadow);
}

.project-main img {
  width: 100%;
  height: 640px;
  object-fit: contain;
  display: block;
  cursor: zoom-in;
  background: var(--bg-alt);
}

.project-expand {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(20, 17, 15, 0.55);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(3px);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.project-expand svg {
  width: 18px;
  height: 18px;
}

.project-expand:hover {
  background: rgba(20, 17, 15, 0.85);
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 560px) {
  .project-main img {
    height: 380px;
  }
}

/* ---------- Lightbox (foto a schermo intero) ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 7, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(20, 17, 15, 0.6);
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(20, 17, 15, 0.9);
  border-color: var(--accent);
  color: var(--accent);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(20, 17, 15, 0.55);
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.lightbox-nav:hover {
  background: rgba(20, 17, 15, 0.85);
  border-color: var(--accent);
  color: var(--accent);
}

.lightbox-nav.prev {
  left: 20px;
}

.lightbox-nav.next {
  right: 20px;
}

@media (max-width: 560px) {
  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
  .lightbox-close {
    width: 38px;
    height: 38px;
    top: 12px;
    right: 12px;
  }
}

.project-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(20, 17, 15, 0.55);
  color: var(--text);
  font-size: 1.7rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(3px);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.project-nav:hover {
  background: rgba(20, 17, 15, 0.85);
  border-color: var(--accent);
  color: var(--accent);
}

.project-nav.prev {
  left: 14px;
}

.project-nav.next {
  right: 14px;
}

@media (max-width: 560px) {
  .project-nav {
    width: 38px;
    height: 38px;
    font-size: 1.4rem;
  }
}

.project-thumbs {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.project-thumbs .thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  width: 100px;
  height: 76px;
  cursor: pointer;
  background: none;
  flex-shrink: 0;
  transition: border-color 0.2s ease, opacity 0.2s ease;
  opacity: 0.75;
}

.project-thumbs .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.project-thumbs .thumb:hover {
  opacity: 1;
}

.project-thumbs .thumb.active {
  border-color: var(--accent);
  opacity: 1;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 60px 24px 30px;
}

.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
}

.footer-col h4 {
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.78rem;
  color: var(--accent);
  margin: 0 0 18px;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--text-muted);
  transition: color 0.2s ease;
  font-size: 0.94rem;
}

.footer-col a:hover {
  color: var(--accent);
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-list span {
  color: var(--text-muted);
  font-size: 0.94rem;
}

.footer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.footer-brand img {
  width: 30px;
  height: 30px;
}

.footer-col p.tagline {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 320px;
  margin: 0;
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
