@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root{
  --ink:#111111;
  --gray:#9a9a9a;
  --gray-light:#c4c4c4;
  --tile-bg:#eeeeee;
  --line:#e7e7e7;
  --wrap:1180px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *{ animation-duration:.001ms !important; transition-duration:.001ms !important; }
}

body{
  margin:0;
  background:#ffffff;
  color:var(--ink);
  font-family:'Inter', Arial, sans-serif;
  -webkit-font-smoothing:antialiased;
}

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

:focus-visible{ outline:2px solid var(--ink); outline-offset:3px; }

.mono{ font-family:'IBM Plex Mono', monospace; }

/* ---------- HEADER ---------- */
.site-header{
  position:sticky; top:0; z-index:40;
  background:#ffffffee;
  backdrop-filter:blur(6px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  max-width:var(--wrap); margin:0 auto;
  padding:22px 32px;
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
}
.header-nav{
  display:flex; gap:22px; list-style:none; margin:0; padding:0;
}
.header-nav button{
  font-family:'Inter', sans-serif;
  font-size:14px; color:var(--gray);
  background:none; border:none; cursor:pointer; padding:4px 0;
  transition:color .15s ease;
}
.header-nav button:hover{ color:var(--ink); }
.header-nav button.active{ color:var(--ink); font-weight:600; }

.header-logo{
  font-weight:700; font-size:17px; text-align:center;
  letter-spacing:-0.01em;
  background:none; border:none; cursor:pointer; color:var(--ink);
}

.header-social{
  display:flex; gap:16px; justify-content:flex-end;
  font-size:13px; font-weight:600;
}
.header-social a{ display:flex; align-items:center; }
.header-social svg{ width:17px; height:17px; }

@media (max-width:720px){
  .header-inner{ grid-template-columns:1fr; gap:12px; padding:18px 20px; text-align:center; }
  .header-nav{ justify-content:center; flex-wrap:wrap; }
  .header-social{ justify-content:center; }
}

/* ---------- GRID VIEW ---------- */
.grid-wrap{ max-width:var(--wrap); margin:0 auto; padding:0 32px 80px; }
.category-intro{ padding:56px 0 8px; }
.category-intro h1{
  font-size:22px; font-weight:600; margin:0 0 24px; text-align: center !important;
}
.category-intro p{
  color:var(--gray); font-size:14px; margin:0; max-width:52ch;
}

.tile-grid{ display:flex; flex-direction:column; }
.tile-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  min-height:380px;
  border-top:1px solid var(--line);
}
.tile-row:last-child{ border-bottom:1px solid var(--line); }
.tile-row.reverse .tile-image{ order:2; }
.tile-row.reverse .tile-text{ order:1; }

.tile{
  display:flex; align-items:center; justify-content:center;
  position:relative; overflow:hidden;
}
.tile-image{ background:var(--tile-bg); cursor:pointer; }
.tile-image img{
  width:100%; height:100%; object-fit:cover;
  transition:transform .5s ease;
}
.tile-image:hover img{ transform:scale(1.03); }

.tile-text{
  background:var(--tile-bg);
  cursor:pointer;
  text-align:center;
  padding:20px;
  transition:background .2s ease;
}
.tile-text:hover{ background:#e4e4e4; }
.tile-text h3{
  font-size:15px; font-weight:600; letter-spacing:0.02em;
  margin:0 0 8px; text-transform:uppercase;
}
.tile-text span{
  font-size:13px; color:var(--gray);
}

@media (max-width:760px){
  .tile-row{ grid-template-columns:1fr; min-height:0; }
  .tile-row.reverse .tile-image{ order:1; }
  .tile-row.reverse .tile-text{ order:2; }
  .tile-image{ aspect-ratio:4/3; }
  .tile-text{ padding:36px 20px; }
}

/* ---------- PROJECT DETAIL ---------- */
.project-view{ padding-bottom:px; }
.project-hero{
  max-width:760px; margin:0 auto; padding:72px 32px 40px;
  text-align:center;
}
.project-back{
  display:inline-flex; align-items:center; gap:6px;
  font-size:13px; color:var(--gray); margin-bottom:28px;
  background:none; border:none; cursor:pointer;
}
.project-back:hover{ color:var(--ink); }
.project-hero h1{
  font-size:26px; font-weight:700; letter-spacing:0.02em;
  text-transform:uppercase; margin:0 0 14px;
}
.project-hero .subtitle{
  color:var(--gray); font-size:15px; margin:0 0 10px;
}
.project-hero .description{
  color:#555; font-size:15px; line-height:1.6; margin:0 auto;
  max-width:52ch;
}
.project-meta{
  margin-top:22px; font-size:12.5px; color:var(--gray-light);
}

.project-cover{
  max-width:560px; margin:24px auto 0; padding:0 32px;
}
.project-cover img{ width:100%; border-radius:2px; }

.project-spreads{ margin-top:0px; }
.project-spreads img{display: block;
    margin: 0 auto;
  width:100%; margin-bottom:50px;
  width: 100%; max-width: 1200px;
}
.gate-view {
  min-height: 30vh;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 40px 20px;
}

.gate-box {
  max-width: 300px;
  width: 100%;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px;
  margin: 0 auto !important;
}

.gate-box form,
.gate-box .gate-form {
  width: 100%;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px;
}

.gate-box input[type="password"] {
  width: 100%;
  max-width: 280px;
  padding: 10px 14px;
  text-align: center;
  box-sizing: border-box;
}

.gate-box button {
  padding: 10px 24px;
  cursor: pointer;
}

.gate-box h1,
.gate-box h2,
.gate-view h1,
.gate-view h2 {
  white-space: nowrap !important;
  font-size: 30px;
}

/* ---------- CONTACT ---------- */
.contact-view{ max-width:520px; margin:0 auto; padding:80px 32px 120px; }
.contact-view h1{ font-size:26px; font-weight:600; margin:0 0 40px; text-align:center; }
.field{ margin-bottom:22px;}
.field label{
  display:block; font-size:13px; color:var(--gray); margin-bottom:8px;
}
.field input, .field textarea{
  width:100%; border:1px solid var(--line); border-radius:2px;
  padding:12px 14px; font-family:'Inter', sans-serif; font-size:14px;
  background:#fff; color:var(--ink);
}
.field textarea{ min-height:140px; resize:vertical; }
.field input:focus, .field textarea:focus{ outline:none; border-color:var(--ink); }
.submit-btn{
  background:var(--ink); color:#fff; border:none;
  padding:13px 28px; border-radius:20px; font-size:14px;
  cursor:pointer; display:block; margin:8px auto 0;
  transition:opacity .2s ease;
}
.submit-btn:hover{ opacity:0.85; }
.form-note{
  text-align:center; font-size:12.5px; color:var(--gray); margin-top:16px;
}

/* ---------- BACK TO TOP ---------- */
.to-top{
  position:fixed; right:24px; bottom:24px; z-index:30;
  width:42px; height:42px; border-radius:50%;
  background:#f0f0f0; border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; opacity:0; pointer-events:none;
  transition:opacity .25s ease;
}
.to-top.visible{ opacity:1; pointer-events:auto; }
.to-top:hover{ background:#e4e4e4; }

/* ---------- FOOTER ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px;
  text-align: center;
  font-size: 12px;
  color: var(--gray-light);
}

.footer-social {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.footer-social a {
  color: var(--text-color, #111111);
  display: inline-flex;
  transition: opacity 0.2s ease;
}

.footer-social a:hover {
  opacity: 0.6; /* Effetto sfumato al passaggio del mouse */
}
