/* ============================================
   MERIDIE ATELIER — stile globale
   ============================================ */

:root {
  --color: #8c9174;
  --color-dim: #b3b79f;
  --bg: #ffffff;
  --pad: 3rem;
  --col-width: 15rem;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--color);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.25s ease;
}

a:hover { opacity: 0.55; }

img { display: block; max-width: 100%; height: auto; }

/* ============================================
   LAYOUT
   ============================================ */

.layout {
  display: flex;
  min-height: 100vh;
}

/* --- Colonna sinistra: menu --- */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--col-width);
  height: 100vh;
  padding: var(--pad) 0 var(--pad) var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 100;
  background: var(--bg);
}

.sidebar__top { display: flex; flex-direction: column; }

.logo {
  display: inline-block;
  margin-bottom: 2.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.logo svg { display: block; }

.nav { display: flex; flex-direction: column; gap: 0.35rem; }

.nav a { width: fit-content; }

.nav a.is-active { opacity: 0.5; }

/* --- Fondo colonna: lingua, social, legale --- */

.sidebar__bottom {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.lang { display: flex; gap: 0.3rem; margin-bottom: 0.9rem; }

.lang button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.lang button:hover { opacity: 0.55; }
.lang button.is-active { opacity: 1; }
.lang button:not(.is-active) { opacity: 0.45; }
.lang span { opacity: 0.45; }

.legal { opacity: 0.7; }

/* --- Colonna destra: contenuti --- */

.main {
  margin-left: var(--col-width);
  flex: 1;
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.page-title {
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  max-width: 34rem;
  margin-bottom: 2rem;
}

.content {
  max-width: 34rem;
}

.content p {
  margin-bottom: 1.1rem;
  text-align: justify;
  text-indent: 10px;
}
.content p:last-child { margin-bottom: 0; }

.content h2 {
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 2.5rem 0 0.8rem;
}

.content h2:first-child { margin-top: 0; }

.content ul {
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
}

.content li {
  margin-bottom: 0.9rem;
  padding-left: 1.1rem;
  position: relative;
}

.content li::before {
  content: "—";
  position: absolute;
  left: 0;
}

.content li:last-child { margin-bottom: 0; }

/* ============================================
   PROGETTI
   ============================================ */

.projects {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6rem;
}

.project {
  width: 100%;
  max-width: 52rem;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  display: block;
}

.project__cover {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: opacity 0.4s ease;
}

.project:hover .project__cover { opacity: 0.82; }

.project--static { cursor: default; }
.project--static:hover .project__cover { opacity: 1; }

.project__caption {
  margin-top: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.project__title { letter-spacing: 0.12em; text-transform: uppercase; }
.project__desc { opacity: 0.7; }

/* --- Galleria in sovraimpressione --- */

.gallery {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 1000;
  overflow-y: auto;
  padding: var(--pad);
  display: none;
}

.gallery.is-open { display: block; }

.gallery__close {
  position: fixed;
  top: var(--pad);
  right: var(--pad);
  background: none;
  border: 0;
  padding: 0.4rem;
  font: inherit;
  color: inherit;
  cursor: pointer;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  z-index: 10;
  transition: opacity 0.25s ease;
}

.gallery__close:hover { opacity: 0.55; }

.gallery__inner {
  max-width: 60rem;
  margin: 4rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

body.no-scroll { overflow: hidden; }

/* ============================================
   MENU MOBILE
   ============================================ */

.menu-toggle {
  display: none;
  position: fixed;
  top: 1.4rem;
  right: 1.4rem;
  z-index: 200;
  background: none;
  border: 0;
  padding: 0.5rem;
  font: inherit;
  color: inherit;
  cursor: pointer;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ============================================
   LANDING — index.html
   ============================================ */

.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--pad);
}

.landing__title {
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.landing__instagram { margin-top: 1.2rem; display: inline-block; }

/* ============================================
   RESPONSIVE — tablet e telefono
   ============================================ */

@media (max-width: 900px) {
  :root { --pad: 1.6rem; }

  .layout { display: block; }

  .menu-toggle { display: block; }

  .sidebar {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    padding: 4.5rem var(--pad) var(--pad);
    transform: translateX(100%);
    transition: transform 0.35s ease;
    justify-content: space-between;
    overflow-y: auto;
  }

  .sidebar.is-open { transform: translateX(0); }

  .logo { margin-bottom: 2rem; }

  .nav { gap: 0.8rem; }
  .nav a { font-size: 1.1rem; letter-spacing: 0.06em; }

  .main {
    margin-left: 0;
    padding: 4.5rem var(--pad) var(--pad);
    align-items: stretch;
    text-align: left;
  }

  .content { max-width: none; }

  .projects { align-items: stretch; gap: 3.5rem; }

  .project { max-width: none; text-align: left; }

  .gallery { padding: 4.5rem var(--pad) var(--pad); }
  .gallery__close { top: 1.4rem; right: 1.4rem; }
  .gallery__inner { margin-top: 0; gap: 1rem; }
}
