/* Filippo Santarossa — sito statico
   Stessi valori del progetto Claude Design: colori, misure, griglie, tipografia. */

html, body { margin: 0; padding: 0; background: #FFFFFF; }
* { box-sizing: border-box; }

body {
  color: #0E0E0E;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: #0E0E0E; text-decoration: none; }
a:hover { color: #8A8A8A; }
::selection { background: #0E0E0E; color: #FFFFFF; }

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

@keyframes fsFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #FFFFFF;
  border-bottom: 1px solid #E6E6E6;
}

.headbar {
  max-width: 1560px;
  margin: 0 auto;
  padding: 20px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

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

.brand-logo { width: 64px; height: 64px; }

.wordmark {
  font-weight: 700;
  font-size: clamp(17px, 1.7vw, 23px);
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  gap: 32px;
  flex: 0 0 auto;
  white-space: nowrap;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.main-nav a {
  color: #8A8A8A;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.main-nav a.active { color: #0E0E0E; border-bottom-color: #0E0E0E; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: calc(100vh - 105px);
  min-height: 520px;
  overflow: hidden;
  background: #0E0E0E;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 46% 34%;
  transform: scale(1.22);
  transform-origin: 46% 34%;
}


/* Playfair unisce f+i in una legatura che mangia il punto della i
   (Sanificazione): la disattivo sui titoli. */
.intro,
.pj-title,
.pj-num,
.pj-client,
.related-link,
.about-text h1 {
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "clig" 0, "dlig" 0, "hlig" 0, "rlig" 0;
}


/* Distanzia la f dalla lettera che segue: in Playfair il gancio della f
   ricade sul punto della i (Sanificazione). Alzare il valore per staccarle di più. */
.kern-f { letter-spacing: 0.07em; }

/* ---------- Work ---------- */
.work,
.about-section,
.project-page {
  max-width: 1560px;
  margin: 0 auto;
  padding: 96px 56px 120px 56px;
}

.intro {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(23px, 2.4vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 24px 0;
  max-width: 24ch;
  text-wrap: pretty;
}

.intro-sub {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8A8A8A;
  line-height: 1.9;
  margin: 0 0 80px 0;
  max-width: 60ch;
  text-wrap: pretty;
}

.project { border-top: 1px solid #E6E6E6; }
.rule { border-top: 1px solid #E6E6E6; }

.pj-details summary { list-style: none; cursor: pointer; }
.pj-details summary::-webkit-details-marker { display: none; }

.pj-row {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  align-items: baseline;
  gap: 24px;
  padding: 34px 0;
}

.pj-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: clamp(23px, 2.3vw, 33px);
  line-height: 1;
  letter-spacing: 0.01em;
  color: #2A5741;
}

.pj-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: clamp(30px, 3.4vw, 50px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: #0E0E0E;
  margin: 0;
}

.pj-marker {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8A8A8A;
  white-space: nowrap;
}

.pj-marker::after { content: "Apri +"; }
.pj-details[open] .pj-marker::after { content: "Chiudi —"; }

.pj-panel {
  animation: fsFadeUp 600ms ease both;
  padding: 8px 0 72px 0;
}

.pj-meta {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.pj-meta-inner {
  display: flex;
  align-items: baseline;
  gap: 32px;
  flex-wrap: wrap;
}

.pj-kind {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8A8A8A;
  white-space: nowrap;
}

.pj-texts { display: grid; gap: 14px; max-width: 52ch; }

.pj-client {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 19px;
  line-height: 1.4;
  margin: 0;
  color: #0E0E0E;
  text-wrap: pretty;
}

.pj-brief {
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
  color: #8A8A8A;
  text-wrap: pretty;
}

.pj-line { font-size: 16px; line-height: 1.55; margin: 0; text-wrap: pretty; }

.pj-use {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2A5741;
  margin: 0;
}

/* ---------- Gallery ---------- */
.gallery { display: grid; gap: 40px; }

.shot-frame { width: 100%; background: #F2F2F2; }

.shot-frame img { width: 100%; height: 100%; object-fit: cover; }

/* Anteprima in home: una riga piena, tutte le foto alla stessa altezza.
   Le verticali risultano più strette, non più basse. */
.gallery.preview {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
}

/* niente ritorno a capo: le foto si stringono, restano tutte alla stessa altezza */
.gallery.preview .shot { flex-basis: 0; min-width: 0; }

.gallery.preview .shot-frame { width: 100%; }


.pj-permalink {
  margin: 32px 0 0 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pj-permalink a { color: #2A5741; }

/* ---------- Pagina progetto ---------- */
.pj-head {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: baseline;
  gap: 24px;
  border-top: 1px solid #E6E6E6;
  padding: 34px 0 0 0;
}

.related {
  margin-top: 24px;
  padding-top: 32px;
  border-top: 1px solid #E6E6E6;
}

.related h2 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8A8A8A;
  margin: 0 0 20px 0;
}

.related-links { display: flex; flex-wrap: wrap; gap: 32px; }

/* niente flex qui: renderebbe elemento a sé lo span che distanzia la f,
   spezzando la parola (Sani f icazione) */
.related-link {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 19px;
  display: inline-block;
  white-space: nowrap;
}

.related-link .pj-num { font-size: 16px; margin-right: 10px; }

.back {
  margin-top: 40px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8A8A8A;
}

.back a { color: #8A8A8A; }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 72px;
  align-items: stretch;
  border-top: 1px solid #E6E6E6;
  padding-top: 32px;
  animation: fsFadeUp 600ms ease both;
}

.about-portrait {
  position: relative;
  width: 100%;
  align-self: center;
  aspect-ratio: 4 / 5;
  background: #F2F2F2;
  overflow: hidden;
  border-radius: 18px;
}

.about-portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
}

.about-text h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 44px 0;
}

.about-text p { max-width: 56ch; text-wrap: pretty; }

.about-text p.lead { font-size: 20px; line-height: 1.55; margin: 0 0 24px 0; }

.about-text p.muted { font-size: 17px; line-height: 1.6; margin: 0 0 20px 0; color: #8A8A8A; }

.about-text p:last-of-type { font-size: 17px; line-height: 1.6; margin: 0 0 56px 0; }

.nowrap { white-space: nowrap; }

.contacts {
  display: grid;
  gap: 12px;
  max-width: 480px;
  border-top: 1px solid #E6E6E6;
  padding-top: 24px;
}

.contact-row {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 16px;
  align-items: baseline;
  font-size: 17px;
}

.contact-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8A8A8A;
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 56px 40px 56px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8A8A8A;
  display: flex;
  justify-content: space-between;
}

.site-footer a { color: #8A8A8A; }

.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }

/* ---------- Responsive: stesse soglie del Design ---------- */
@media (max-width: 1024px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  .hero { height: 74vh; min-height: 460px; }
  .hero-img { transform: none; object-position: 50% 42%; }
  .about { grid-template-columns: 1fr; gap: 36px; }
  .about-portrait { max-width: 420px; }
  .about-text h1 { font-size: 34px; }
  /* su schermi medi meno foto, così non diventano francobolli */
  .gallery.preview .shot:nth-child(n+4) { display: none; }
}

@media (max-width: 760px) {
  .headbar, .work, .about-section, .project-page, .site-footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  .site-footer { flex-direction: column; gap: 8px; }
  .pj-row {
    grid-template-columns: 52px 1fr;
    gap: 4px 16px;
    padding: 22px 0;
    align-items: center;
  }
  .pj-num { font-size: 18px; }
  .pj-title { font-size: 28px; overflow-wrap: break-word; }
  .pj-marker {
    grid-column: 2;
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: 13px;
  }
  .pj-head { grid-template-columns: 52px 1fr; gap: 4px 16px; }
  .pj-meta { grid-template-columns: 1fr; gap: 12px; }
  .pj-meta > span:first-child { display: none; }
  .gallery { grid-template-columns: 1fr !important; gap: 20px; }
  .gallery > .shot { grid-column: auto !important; grid-row: auto !important; }
  .gallery > .shot > .shot-frame { height: auto !important; }
  .gallery.preview { gap: 0; }
  .gallery.preview .shot { flex: 1 1 100%; }
  .gallery.preview .shot:not(:first-child) { display: none; }
  .hero { height: 66vh; min-height: 380px; }
}

@media (max-width: 600px) {
  .headbar { padding: 12px 20px; gap: 16px; }
  .brand-logo { width: 42px; height: 42px; }
  .wordmark { font-size: 16px; white-space: normal; }
  .main-nav { gap: 16px; font-size: 11px; letter-spacing: 0.1em; }
  .about-text h1 { font-size: 30px; }
}

@media (max-width: 440px) {
  .wordmark { display: none; }
  .main-nav { gap: 14px; }
  .pj-title { font-size: 24px; }
  .pj-num { font-size: 16px; }
  .pj-row, .pj-head { grid-template-columns: 40px 1fr; }
}
