/* =========================================================================
   Pierangela Cattini — Portfolio
   Foglio di stile principale
   Palette:  #100F0D fondo · #EDE9E1 testo · #B89B6E oro (accento)
   ========================================================================= */

/* ---------- Design tokens ---------- */
:root {
  --bg:        #100F0D;
  --bg-soft:   #151310;
  --bg-img:    #1a1815;
  --ink:       #EDE9E1;
  --ink-70:    rgba(237, 233, 225, 0.78);
  --ink-55:    rgba(237, 233, 225, 0.55);
  --ink-45:    rgba(237, 233, 225, 0.45);
  --gold:      #B89B6E;
  --line:      rgba(237, 233, 225, 0.10);

  --font-body:    "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-serif:   "Cormorant Garamond", Georgia, serif;
  --font-signature: "Mrs Saint Delafield", "Sacramento", cursive;

  --header-h: 74px;
  --wrap:     1400px;
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3, p { margin: 0; }

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

/* Utility: visually hidden but accessible */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  background: var(--gold);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 14px;
  text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(16, 15, 13, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(237, 233, 225, 0.08);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px 40px;
  min-height: var(--header-h);
}

.site-header__nav {
  display: flex;
  gap: 32px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-header__nav--right { justify-self: end; }

.site-header__nav a {
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.25s var(--ease), color 0.25s var(--ease);
}
.site-header__nav a:hover,
.site-header__nav a:focus-visible { opacity: 1; color: var(--gold); }

.brand {
  grid-column: 2;
  text-align: center;
  text-decoration: none;
  font-family: var(--font-signature);
  font-size: 34px;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}

/* Switch lingua */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-left: 22px;
  margin-left: 4px;
  border-left: 1px solid rgba(237, 233, 225, 0.18);
}
.lang-switch a {
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.25s var(--ease), color 0.25s var(--ease);
}
.lang-switch a:hover,
.lang-switch a:focus-visible { opacity: 1; color: var(--gold); }
.lang-switch__current { color: var(--gold); }
.lang-switch__sep { opacity: 0.35; }
/* Nel menu mobile lo switch è più grande e senza bordo */
.mobile-menu .lang-switch {
  border-left: 0;
  padding-left: 0;
  margin-left: 0;
  margin-top: 12px;
  gap: 14px;
  font-size: 20px;
}

/* Hamburger */
.nav-toggle {
  display: none;
  justify-self: start;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  width: 22px;
  height: 1px;
  background: var(--ink);
  display: block;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--bg);
  z-index: 39;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding-top: 64px;
  font-family: var(--font-serif);
  font-size: 28px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu a { text-decoration: none; color: var(--ink); }
.mobile-menu a:hover { color: var(--gold); }

/* ---------- Layout helpers ---------- */
.section {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 120px 64px;
  scroll-margin-top: 90px;
}

.section__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.1;
  margin: 0;
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  padding: 48px 64px;
  min-height: 86vh;
  max-width: 1500px;
  margin-inline: auto;
}
.hero__name-col { flex: 0 0 26%; text-align: right; }
.hero__image-col { flex: 0 0 34%; max-width: 460px; }
.hero__text-col { flex: 0 0 26%; text-align: left; }

.hero__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1.1;
  margin: 0 0 18px;
}
.hero__role {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: rgba(237, 233, 225, 0.6);
}
.hero__image {
  width: 100%;
  aspect-ratio: 318 / 640;
  object-fit: cover;
  background: var(--bg-img);
}
.hero__quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(16px, 1.35vw, 19px);
  line-height: 1.7;
  color: rgba(237, 233, 225, 0.85);
}
.hero__quote-sign {
  display: block;
  margin-top: 16px;
  font-style: normal;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--gold);
  opacity: 0.85;
}

/* ---------- Dichiarazione d'artista ---------- */
.statement {
  max-width: 880px;
  margin-inline: auto;
  padding: 20px 64px 40px;
  text-align: center;
}
.statement__lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(26px, 3.2vw, 36px);
  color: var(--gold);
  margin: 0 0 26px;
}
.statement__body {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.95;
  color: rgba(237, 233, 225, 0.86);
  margin: 0 0 30px;
}
.statement__sign {
  font-family: var(--font-signature);
  font-size: 34px;
  color: var(--ink);
  opacity: 0.7;
  margin: 0;
}

/* ---------- Gallery ---------- */
.gallery__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 56px;
}

.masonry {
  column-count: 3;
  column-gap: 28px;
}
.work {
  break-inside: avoid;
  margin: 0 0 28px;
}
.work__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.work__btn img {
  width: 100%;
  height: auto;
  object-fit: cover;
  background: var(--bg-img);
  transition: transform 0.7s var(--ease);
}
.work__btn:hover img,
.work__btn:focus-visible img { transform: scale(1.035); }

.work__caption { padding-top: 10px; }
.work__title {
  display: block;
  font-family: var(--font-serif);
  font-size: 19px;
}
.work__year {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ink-55);
  letter-spacing: 0.03em;
}

/* ---------- Biografia ---------- */
.bio { max-width: 1300px; }
.bio__inner {
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}
.bio .section__title { margin-bottom: 26px; }
.bio__text {
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-70);
  margin-bottom: 18px;
}
.bio__quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.8;
  color: rgba(237, 233, 225, 0.7);
}
.bio__quote cite { font-style: normal; opacity: 0.7; }

/* ---------- Mostre ---------- */
.exhibitions { max-width: 900px; }
.exhibitions .section__title {
  margin-bottom: 44px;
  text-align: center;
}
.exhibition {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.exhibition__year {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--gold);
}
.exhibition__desc {
  font-size: 15px;
  color: rgba(237, 233, 225, 0.82);
  line-height: 1.5;
}

/* ---------- Contatti / footer ---------- */
.site-footer {
  max-width: 900px;
  margin-inline: auto;
  padding: 120px 64px 90px;
  text-align: center;
  scroll-margin-top: 90px;
}
.site-footer .section__title { margin-bottom: 30px; }
.contact__name { font-size: 16px; color: rgba(237, 233, 225, 0.85); margin-bottom: 8px; }
.contact__line { font-size: 15px; margin-bottom: 8px; color: rgba(237, 233, 225, 0.7); }
.contact__line a { text-decoration: none; color: rgba(237, 233, 225, 0.7); transition: color 0.25s var(--ease); }
.contact__line a:hover { color: var(--gold); }
.site-footer__signature {
  margin-top: 70px;
  font-family: var(--font-signature);
  font-size: 26px;
  opacity: 0.5;
}
.site-footer__credits {
  margin-top: 22px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink-45);
}
.site-footer__credits a {
  color: var(--ink-55);
  text-decoration: none;
  border-bottom: 1px solid rgba(184, 155, 110, 0.4);
  transition: color 0.25s var(--ease);
}
.site-footer__credits a:hover,
.site-footer__credits a:focus-visible { color: var(--gold); }
.site-footer__legal {
  margin-top: 14px;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink-45);
}
.site-footer__legal a {
  color: var(--ink-55);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}
.site-footer__legal a:hover,
.site-footer__legal a:focus-visible { color: var(--gold); }
.site-footer__legal-sep { opacity: 0.4; margin: 0 6px; }

/* ---------- Pagine legali (privacy / cookie) ---------- */
.legal-back {
  justify-self: start;
  align-self: center;
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  transition: opacity 0.25s var(--ease), color 0.25s var(--ease);
}
.legal-back:hover,
.legal-back:focus-visible { opacity: 1; color: var(--gold); }

.legal-main {
  max-width: 820px;
  margin-inline: auto;
  padding: 60px 24px 100px;
}
.legal-main .policy-content { color: var(--ink-70); line-height: 1.75; }
.legal-main .policy-content h1 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 10px;
}
.legal-main .policy-content h2 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.25;
  color: var(--gold);
  margin: 1.8em 0 0.4em;
}
.legal-main .policy-content h3,
.legal-main .policy-content h4 {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.35;
  color: var(--ink);
  margin: 1.4em 0 0.3em;
}
.legal-main .policy-content p,
.legal-main .policy-content li { font-size: 15.5px; }
.legal-main .policy-content a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-main .policy-content a:hover { opacity: 0.8; }
.legal-main .ppg-effective-date { color: var(--ink-45); font-size: 13px; }
.legal-main .ppg-footer { margin-top: 3em; font-size: 12.5px; color: var(--ink-45); }
.legal-main .policy-content ul,
.legal-main .policy-content ol { padding-left: 1.4em; }
.legal-main .policy-content li { margin: 0.3em 0; }
/* Contenitore generato dallo script CookieYes (cookie policy) */
.legal-main .cky-audit-table,
.legal-main table { width: 100%; border-collapse: collapse; font-size: 14px; }
.legal-main table th,
.legal-main table td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(8, 7, 6, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__panel {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1100px;
  max-height: 88vh;
  overflow: auto;
  background: var(--bg-soft);
  padding: 36px;
  border-radius: 2px;
  transform: translateY(12px);
  transition: transform 0.35s var(--ease);
}
.lightbox.is-open .lightbox__panel { transform: none; }

.lightbox__close {
  position: absolute;
  top: 16px; right: 22px;
  background: none;
  border: 0;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s var(--ease);
}
.lightbox__close:hover,
.lightbox__close:focus-visible { opacity: 1; }

.lightbox__media { flex: 1 1 420px; min-width: 260px; }
.lightbox__media img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--bg-img);
}
.lightbox__info { flex: 1 1 260px; min-width: 240px; }
.lightbox__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 30px;
  margin-bottom: 6px;
}
.lightbox__year { font-size: 13px; color: var(--ink-55); margin-bottom: 22px; }
.lightbox__meta {
  border-top: 1px solid rgba(237, 233, 225, 0.14);
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  color: rgba(237, 233, 225, 0.75);
}
.lightbox__meta dt { color: var(--ink-45); display: inline; }
.lightbox__meta dd { display: inline; margin: 0; }
.lightbox__meta > div + div { }

/* Lightbox — navigazione tra le opere */
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: none;
  border: 0;
  color: var(--ink);
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.55;
  padding: 8px 14px;
  transition: opacity 0.2s var(--ease);
  -webkit-user-select: none;
  user-select: none;
}
.lightbox__nav:hover,
.lightbox__nav:focus-visible { opacity: 1; }
.lightbox__nav--prev { left: 8px; }
.lightbox__nav--next { right: 8px; }

/* Lightbox — poesia (sempre visibile) */
.lightbox__poem {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(237, 233, 225, 0.14);
}
.lightbox__poem p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.9;
  color: rgba(237, 233, 225, 0.85);
  margin: 0 0 4px;
}

/* Prevent body scroll when an overlay is open */
body.is-locked { overflow: hidden; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 1023px) {
  .masonry { column-count: 2; }
}

@media (max-width: 768px) {
  .hero {
    flex-direction: column;
    gap: 48px;
    padding: 56px 24px;
    min-height: auto;
  }
  .hero__name-col,
  .hero__text-col { flex: 0 0 auto; text-align: center; }
  .hero__image-col { flex: 0 0 auto; }
  .hero__name { font-size: 48px; }
}

@media (max-width: 640px) {
  .site-header { padding: 16px 20px; }
  .site-header__nav { display: none; }
  .nav-toggle { display: flex; }
  .brand { font-size: 30px; }

  .section { padding: 70px 24px; }
  .site-footer { padding: 70px 24px; }
  .statement { padding: 10px 24px 20px; }
  .statement__body br { display: none; }

  .masonry { column-count: 1; }
  .exhibition { grid-template-columns: 70px 1fr; gap: 16px; }
  .lightbox { padding: 16px; }
  .lightbox__panel { padding: 24px; gap: 24px; }
  .lightbox__nav { font-size: 34px; padding: 6px 10px; }
  .lightbox__nav--prev { left: 0; }
  .lightbox__nav--next { right: 0; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .nav-toggle, .mobile-menu, .lightbox, .hero__image-col { display: none !important; }
  body { background: #fff; color: #000; }
}
