/* Lucia Covi — Fotografie */

@font-face { font-family: "Open Sans"; font-weight: 300; font-style: normal; font-display: swap; src: url("../fonts/open-sans-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/open-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/open-sans-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/open-sans-latin-600-normal.woff2") format("woff2"); }

:root {
  --bg: #efefed;
  --paper: #ffffff;
  --ink: #2a2a2a;
  --muted: #8b8b88;
  --line: #deded9;
  --accent: #6f6a5f;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 18px rgba(0,0,0,.06);
  --wrap: 1360px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 300 17px/1.65 "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Testata ---------- */
.site-header { background: var(--paper); text-align: center; padding: 22px 16px 16px; }
.brand { text-decoration: none; display: inline-block; }
.brand-name { display: block; font-weight: 600; font-size: 28px; letter-spacing: .06em; line-height: 1.2; }
.brand-sub { display: block; font-weight: 400; font-size: 14px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }

.site-nav { padding: 44px 16px 52px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 64px; }
.site-nav a { text-decoration: none; font-size: 21px; font-weight: 400; color: #6d6d6a; padding: 4px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

main { max-width: var(--wrap); margin: 0 auto; padding: 0 16px 72px; }

/* ---------- Home: griglia delle serie ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 40px; }
.card { display: block; background: var(--paper); text-decoration: none; box-shadow: var(--shadow); transition: transform .3s ease, box-shadow .3s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 14px 30px rgba(0,0,0,.10); }
.card-img { aspect-ratio: 1 / 1.06; overflow: hidden; background: #ddd; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.card:hover .card-img img { transform: scale(1.03); }
.card-body { padding: 20px 26px 24px; }
.card-title { margin: 0; font-size: 19px; font-weight: 400; line-height: 1.35; }
.card-sub { margin: 4px 0 0; font-size: 14px; color: var(--muted); }

.notice { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Pagina serie ---------- */
.serie-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.serie-head h1 { font-weight: 300; font-size: clamp(28px, 4vw, 40px); line-height: 1.2; margin: 0; }
.serie-head .sub { color: var(--muted); margin: 8px 0 0; letter-spacing: .03em; }
.serie-head .intro { margin-top: 24px; text-align: left; }
.serie-head .intro p { margin: 0 0 1em; }

.photos { display: flex; flex-direction: column; gap: 88px; }
.photo { margin: 0; }
.photo-open { display: block; margin: 0 auto; padding: 0; border: 0; background: none; cursor: zoom-in; max-width: 100%; }
.photo-open img { max-height: 86vh; width: auto; margin: 0 auto; box-shadow: var(--shadow); background: #ddd; }
.photo figcaption { max-width: 640px; margin: 20px auto 0; text-align: center; }
.photo .meta { font-size: 14px; letter-spacing: .05em; color: var(--muted); text-transform: uppercase; }
.photo .comment { margin: 6px 0 0; font-style: italic; font-weight: 400; color: #4a4a47; }

.serie-nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 96px; padding-top: 28px; border-top: 1px solid var(--line); font-size: 15px; }
.serie-nav a { text-decoration: none; color: #6d6d6a; }
.serie-nav a:hover { color: var(--ink); }
.serie-nav .prev, .serie-nav .next { flex: 1; }
.serie-nav .next { text-align: right; }
.serie-nav .all { text-align: center; }

/* ---------- Pagine di testo ---------- */
.page { max-width: 760px; margin: 0 auto; background: var(--paper); padding: clamp(28px, 6vw, 64px); box-shadow: var(--shadow); }
.page h1 { font-weight: 300; font-size: 34px; margin: 0 0 28px; line-height: 1.2; }
.page h2 { font-weight: 400; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 48px 0 18px; }
.portrait { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; margin: 0 auto 32px; }
.bio-lead { font-size: 19px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 64px 1fr; gap: 4px 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline .year { font-weight: 600; font-size: 15px; padding-top: 2px; }
.timeline .what { margin: 0; }
.timeline .what strong { font-weight: 600; }
.timeline .note { grid-column: 2; margin: 4px 0 0; font-size: 15px; color: #5c5c59; }

.contact { font-size: 19px; line-height: 1.9; }
.contact .name { font-weight: 600; margin-bottom: 12px; }
.contact a { text-decoration: none; border-bottom: 1px solid var(--line); }
.contact a:hover { border-bottom-color: var(--ink); }
.contact .label { display: inline-block; min-width: 92px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.links { list-style: none; margin: 0; padding: 0; }
.links li { border-top: 1px solid var(--line); }
.links li:first-child { border-top: 0; }
.links a { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 0; text-decoration: none; }
.links a:hover .site { text-decoration: underline; text-underline-offset: 4px; }
.links .site { font-size: 18px; font-weight: 400; overflow-wrap: anywhere; }
.links .desc { font-size: 14px; color: var(--muted); text-align: right; }

/* ---------- Piè di pagina ---------- */
.site-footer { text-align: center; font-size: 13px; color: var(--muted); padding: 0 16px 40px; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: #121211; color: #e8e8e4; display: none; }
.lightbox.open { display: grid; grid-template-rows: 1fr auto; }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; padding: 56px 72px 12px; min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; }
.lb-caption { text-align: center; padding: 8px 24px 24px; min-height: 64px; }
.lb-caption .meta { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #a9a9a3; }
.lb-caption .comment { margin: 4px auto 0; max-width: 680px; font-style: italic; font-weight: 400; }
.lb-btn { position: absolute; background: none; border: 0; color: #d8d8d2; cursor: pointer; padding: 12px; font: 300 42px/1 "Open Sans", sans-serif; opacity: .75; transition: opacity .2s; }
.lb-btn:hover { opacity: 1; }
.lb-close { top: 8px; right: 14px; font-size: 38px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; top: 20px; left: 24px; font-size: 13px; color: #8f8f8a; letter-spacing: .08em; }
body.lb-lock { overflow: hidden; }

/* ---------- Schermi piccoli ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand-name { font-size: 23px; }
  .site-nav { padding: 28px 16px 36px; }
  .site-nav ul { gap: 6px 28px; }
  .site-nav a { font-size: 17px; }
  .grid { gap: 24px; }
  .photos { gap: 56px; }
  .photo-open img { max-height: none; box-shadow: none; }
  .lb-stage { padding: 52px 8px 8px; }
  .lb-prev, .lb-next { display: none; }
  .timeline li { grid-template-columns: 1fr; }
  .timeline .note { grid-column: 1; }
  .links a { flex-direction: column; gap: 2px; }
  .links .desc { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
.contact { font-style: normal; }
