/* Mostra fotografica Roberto Scottini, Trento 2026
   Mondo visivo: sala buia, fotografie illuminate, luce d'alba come unico accento. */

:root {
  --ink:        #0C1014;
  --ink-2:      #131A21;
  --paper:      #F2EEE8;
  --paper-dim:  #A9B2BB;
  --gold:       #E0A063;
  --gold-ink:   #12171B;
  --line:       rgba(242, 238, 232, 0.12);
  --line-soft:  rgba(242, 238, 232, 0.07);

  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans:  'Geist', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 2px;

  --gutter: clamp(1.25rem, 5vw, 5rem);
  --measure: 66ch;
}

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

html {
  color-scheme: dark;
  scrollbar-color: rgba(242, 238, 232, 0.22) var(--ink);
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold); color: var(--gold-ink); }

a { color: inherit; text-decoration-color: rgba(224, 160, 99, 0.55); text-underline-offset: 0.22em; }
a:hover { text-decoration-color: var(--gold); }

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

img { display: block; max-width: 100%; }
.sprite { position: absolute; }

/* Le fotografie non si trascinano, non si selezionano e non rispondono
   al tasto destro: sopra ognuna c'e' un livello trasparente. */
.hero__half img, .plate img, .about__portrait img {
  -webkit-user-drag: none; -khtml-user-drag: none; user-drag: none;
  -webkit-touch-callout: none;
  user-select: none; -webkit-user-select: none;
  pointer-events: none;
}
.plate__frame {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 34px 70px -34px rgba(0, 0, 0, 0.85);
}
.plate__frame::after { content: ""; position: absolute; inset: 0; z-index: 1; }

h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
p { margin: 0; }

.sr {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.nb { white-space: nowrap; }

.skip {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -120%);
  z-index: 100; background: var(--gold); color: var(--gold-ink);
  padding: 0.65rem 1.1rem; font-size: 0.9rem; text-decoration: none;
  transition: transform 160ms var(--ease-out);
}
.skip:focus-visible { transform: translate(-50%, 0); }

/* ---------- barra superiore ---------- */

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 92px; padding: 0 var(--gutter);
  transition: background-color 240ms var(--ease-out), border-color 240ms var(--ease-out),
              backdrop-filter 240ms var(--ease-out);
  border-bottom: 1px solid transparent;
}
.topbar[data-stuck="true"] {
  background: rgba(12, 16, 20, 0.82);
  backdrop-filter: blur(14px) saturate(120%);
  border-bottom-color: var(--line-soft);
}
.topbar__brand { display: block; line-height: 0; }
.topbar__brand img { width: clamp(200px, 27vw, 310px); height: auto; opacity: 0.96; }
.topbar__meta {
  font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--paper-dim); text-align: right;
}
@media (max-width: 560px) { .topbar__meta { display: none; } }

/* ---------- hero ---------- */

.hero { position: relative; min-height: 100dvh; display: grid; isolation: isolate; }
.hero__stage {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px; background: rgba(242, 238, 232, 0.16);
}
.hero__half { position: relative; margin: 0; overflow: hidden; }
.hero__half img { width: 100%; height: 100%; object-fit: cover; }
.hero__half--left img  { object-position: 84% 50%; }
.hero__half--right img { object-position: 16% 50%; }

.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(9, 12, 16, 0.58) 0%, rgba(9, 12, 16, 0.16) 26%,
                    rgba(9, 12, 16, 0.58) 52%, rgba(9, 12, 16, 0.88) 74%,
                    rgba(9, 12, 16, 0.96) 90%, var(--ink) 100%);
}

.hero__content {
  position: relative; z-index: 2;
  align-self: end; justify-self: center;
  width: min(64rem, 100%);
  padding: 108px var(--gutter) clamp(2.25rem, 7vh, 5rem);
  text-align: center;
}
.hero__title {
  font-size: clamp(2.35rem, 6.6vw, 5.4rem);
  line-height: 1.04;
  margin-bottom: 1.15rem;
  max-width: 16ch;
  margin-inline: auto;
  text-shadow: 0 2px 30px rgba(6, 9, 12, 0.45);
}
.hero__lead {
  font-size: clamp(1.05rem, 0.98rem + 0.5vw, 1.3rem);
  color: var(--paper); max-width: 34ch; margin: 0 auto;
  text-shadow: 0 1px 16px rgba(6, 9, 12, 0.5);
}
.hero__facts {
  width: min(72rem, 100%);
  margin: 1.9rem auto 0;
  display: grid; gap: 1.1rem 0;
  border-top: 1px solid rgba(242, 238, 232, 0.28);
  border-bottom: 1px solid rgba(242, 238, 232, 0.28);
  padding: 1.15rem 0;
  text-align: left;
}
@media (min-width: 300px) { .hero__facts { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) {
  .hero__facts { grid-template-columns: repeat(4, auto); justify-content: center; }
  .hf dd strong { text-wrap: nowrap; }
  .hf { padding: 0 clamp(1rem, 2.2vw, 1.75rem); }
}

.hf { padding: 0 clamp(0.5rem, 2vw, 1.35rem); }
@media (min-width: 300px) { .hf + .hf { border-left: 1px solid rgba(242, 238, 232, 0.2); } }
@media (min-width: 300px) and (max-width: 999px) { .hf:nth-child(odd) { border-left: 0; } }

.hf dt {
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(242, 238, 232, 0.66); margin-bottom: 0.3rem;
}
.hf dd {
  margin: 0; font-size: 0.9375rem; line-height: 1.45;
  color: rgba(242, 238, 232, 0.92);
  text-shadow: 0 1px 12px rgba(6, 9, 12, 0.65);
}
.hf dd strong { font-weight: 500; color: var(--paper); font-size: 1.0625rem; }

/* ---- avviso: quanto manca, mostra aperta, ultimo giorno ---- */

.stato {
  display: inline-flex; align-items: center; gap: 0.55rem;
  margin: 1.4rem auto 0;
  padding: 0.7rem 1.25rem;
  border: 1px solid rgba(224, 160, 99, 0.72);
  border-radius: var(--radius);
  background: rgba(11, 15, 19, 0.86);
  box-shadow: 0 12px 34px -20px rgba(224, 160, 99, 0.9);
  backdrop-filter: blur(8px);
  color: var(--gold);
  font-size: clamp(0.9375rem, 0.9rem + 0.2vw, 1.0625rem);
  font-weight: 500; letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  text-wrap: balance;
}

/* quando la data si avvicina o la mostra e' in corso l'avviso si accende */
.stato[data-stato="vicino"],
.stato[data-stato="aperta"],
.stato[data-stato="ultimo"] {
  background: var(--gold); border-color: var(--gold); color: var(--gold-ink);
  box-shadow: 0 14px 38px -16px rgba(224, 160, 99, 0.8);
  backdrop-filter: none;
}
.stato[data-stato="conclusa"] {
  color: var(--paper-dim); border-color: rgba(242, 238, 232, 0.24);
}

.stato__punto { display: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: currentColor; }
.stato[data-stato="aperta"] .stato__punto { display: block; }

@media (prefers-reduced-motion: no-preference) {
  .stato[data-stato="aperta"] .stato__punto { animation: battito 2.4s ease-in-out infinite; }
}
@keyframes battito {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.45; transform: scale(0.82); }
}

/* ---- inaugurazione, volutamente discreta ---- */

.note {
  padding: clamp(2.25rem, 6vh, 3.25rem) var(--gutter) 0;
  max-width: 68rem; margin: 0 auto; text-align: center;
}
.note__open { color: var(--paper-dim); font-size: 0.875rem; }

.cta { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin-top: 2.25rem; }

@media (min-width: 300px) and (max-width: 819px) {
  .hf { padding: 0 0.85rem; }
  .hf:nth-child(odd) { padding-left: 0; }
}

@media (max-width: 559px) {
  .stato { margin-top: 1.1rem; padding: 0.6rem 1rem; font-size: 0.9375rem; }
  .hero__title { font-size: clamp(1.85rem, 8.4vw, 2.6rem); margin-bottom: 0.85rem; }
  .hero__lead  { font-size: 1rem; max-width: 30ch; }
  .hero__facts { margin-top: 1.35rem; padding: 1rem 0; gap: 0.9rem 0; }
  .hf dt { font-size: 0.66rem; margin-bottom: 0.12rem; }
  .hf dd { font-size: 0.9375rem; }
  .hf dd strong { font-size: 1rem; }
  .cta { margin-top: 1.35rem; }
}

@media (max-height: 760px) {
  .stato { margin-top: 0.9rem; padding: 0.5rem 0.9rem; font-size: 0.875rem; gap: 0.45rem; }
  .hero__title { font-size: clamp(1.75rem, 4.6vw, 3rem); margin-bottom: 0.8rem; }
  .hero__lead  { font-size: 0.9375rem; }
  .hero__facts { margin-top: 1rem; padding: 0.8rem 0; gap: 0.75rem 0; }
  .hf dt { font-size: 0.66rem; margin-bottom: 0.15rem; }
  .hf dd, .hf dd strong { font-size: 0.95rem; }
  .cta { margin-top: 1rem; }
  .cta .btn { padding-block: 0.8rem; }
  .hero__content { padding-top: 84px; padding-bottom: 1.1rem; }
}
@media (max-width: 560px) {
  .cta { flex-direction: column; }
  .cta .btn { justify-content: center; padding-block: 1rem; }
}

.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 1.4rem; border-radius: var(--radius);
  font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.01em;
  text-decoration: none; white-space: nowrap; border: 1px solid transparent;
  transition: transform 140ms var(--ease-out), background-color 180ms ease,
              border-color 180ms ease, box-shadow 180ms var(--ease-out);
}
.btn--solid {
  background: var(--gold); color: var(--gold-ink);
  box-shadow: 0 10px 30px -14px rgba(224, 160, 99, 0.7);
}
.btn--solid:hover { background: #EDB177; }
.btn--ghost {
  border-color: rgba(242, 238, 232, 0.34);
  background: rgba(12, 16, 20, 0.34);
  backdrop-filter: blur(6px);
  color: var(--paper);
}
.btn--ghost:hover { border-color: var(--paper); background: rgba(242, 238, 232, 0.1); }
.btn:active { transform: translateY(1px) scale(0.99); }

.ico { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }

/* ---------- testo di mostra ---------- */

.statement {
  padding: clamp(3rem, 7vh, 5rem) var(--gutter) clamp(4rem, 9vh, 7rem);
  max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto;
}
.statement__lead {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.35rem);
  line-height: 1.24; letter-spacing: -0.01em;
  color: var(--paper); margin-bottom: 1.4rem;
  max-width: 24ch;
}
.statement p { color: var(--paper-dim); max-width: var(--measure); }
.statement .statement__lead + p { margin-top: 0; }

/* ---------- fotografie ---------- */

.work { padding: 0 var(--gutter) clamp(4rem, 10vh, 7rem); }
.plate { margin: 0; }
.plate img { width: 100%; height: auto; display: block; }
.plate figcaption {
  margin-top: 0.85rem; color: var(--paper-dim);
  font-size: 0.875rem; letter-spacing: 0.02em;
}
.plate--wide { max-width: 68rem; margin: 0 auto; }
.plate--bleed { max-width: 78rem; }
.work .plate + .plate { margin-top: clamp(3rem, 7vw, 5.5rem); }

.pair {
  max-width: 68rem; margin: clamp(2.5rem, 6vw, 4.5rem) auto 0;
  display: grid; gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  align-items: end;
}
@media (max-width: 760px) { .pair { grid-template-columns: 1fr; } }

/* ---------- chi sono ---------- */

.about {
  max-width: 68rem; margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6.5rem) var(--gutter) clamp(1rem, 3vh, 2rem);
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
@media (min-width: 820px) { .about { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); } }

.about__portrait { margin: 0; max-width: 24rem; }
@media (min-width: 820px) { .about__portrait { position: sticky; top: 124px; } }
.about__portrait img { width: 100%; height: auto; display: block; }
.about__title { font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.3rem); margin-bottom: 1.1rem; }
.about__text p { color: var(--paper-dim); max-width: 56ch; }
.about__text p + p { margin-top: 1rem; }

/* ---------- link ---------- */

.follow {
  padding: clamp(3.5rem, 8vh, 6rem) var(--gutter) clamp(4rem, 9vh, 6.5rem);
  border-top: 1px solid var(--line-soft);
  max-width: 68rem; margin: 0 auto;
}
.follow__title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); margin-bottom: 2rem; }
.links { display: grid; gap: 0.75rem; }
@media (min-width: 820px) { .links { grid-template-columns: repeat(3, 1fr); } }

.link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "icon label go" "icon hint go";
  column-gap: 0.9rem; align-items: center;
  padding: 1.15rem 1.25rem; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--ink-2);
  transition: border-color 180ms ease, background-color 180ms ease, transform 160ms var(--ease-out);
}
.link:hover { border-color: rgba(224, 160, 99, 0.55); background: #18212A; transform: translateY(-2px); }
.link:active { transform: translateY(0); }
.ico--brand { grid-area: icon; width: 1.4rem; height: 1.4rem; color: var(--paper); }
.link__label { grid-area: label; font-weight: 500; }
.link__hint { grid-area: hint; color: var(--paper-dim); font-size: 0.8125rem; }
.ico--go { grid-area: go; width: 1.1rem; height: 1.1rem; color: var(--paper-dim); transition: color 180ms ease, transform 180ms var(--ease-out); }
.link:hover .ico--go { color: var(--gold); transform: translate(2px, -2px); }

/* ---------- scrivimi ---------- */

.contatti {
  max-width: 68rem; margin: 0 auto;
  padding: clamp(3.5rem, 9vh, 6rem) var(--gutter) clamp(3rem, 7vh, 5rem);
  border-top: 1px solid var(--line-soft);
  display: grid; gap: clamp(2rem, 5vw, 4rem);
}
@media (min-width: 860px) { .contatti { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }

.contatti__title { font-size: clamp(1.6rem, 1.25rem + 1.4vw, 2.3rem); margin-bottom: 0.9rem; }
.contatti__intro p { color: var(--paper-dim); max-width: 40ch; }
.contatti__mail { margin-top: 1rem; }
.contatti__mail a { color: var(--gold); font-size: 0.9375rem; }

.modulo { display: grid; gap: 1.1rem; }
.campo { display: grid; gap: 0.4rem; margin: 0; }
.campo label {
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--paper-dim);
}
.campo input, .campo textarea {
  font: inherit; font-size: 1rem; color: var(--paper);
  background: rgba(242, 238, 232, 0.05);
  border: 1px solid rgba(242, 238, 232, 0.2);
  border-radius: var(--radius);
  padding: 0.8rem 0.9rem; width: 100%;
  transition: border-color 160ms ease, background-color 160ms ease;
}
.campo textarea { resize: vertical; min-height: 7rem; line-height: 1.55; }
.campo input:hover, .campo textarea:hover { border-color: rgba(242, 238, 232, 0.36); }
.campo input:focus, .campo textarea:focus {
  outline: none; border-color: var(--gold);
  background: rgba(242, 238, 232, 0.08);
}
.campo input:focus-visible, .campo textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.campo[data-errore="si"] input, .campo[data-errore="si"] textarea { border-color: #E98A7A; }

.modulo .btn { justify-self: start; }
.modulo__esito { font-size: 0.9375rem; color: var(--gold); }
.modulo__esito[data-tipo="errore"] { color: #E98A7A; }

/* ---------- piede ---------- */

.foot {
  border-top: 1px solid var(--line-soft);
  padding: clamp(2.5rem, 6vh, 3.5rem) var(--gutter) clamp(3rem, 7vh, 4rem);
  display: grid; gap: 1.75rem;
  color: var(--paper-dim); font-size: 0.875rem; line-height: 1.7;
  max-width: 68rem; margin: 0 auto;
}
@media (min-width: 880px) {
  .foot { grid-template-columns: 1fr 1fr auto; align-items: start; gap: 2rem; }
  .foot__credit { text-align: right; }
}

/* ---------- movimento ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero__half img {
    clip-path: inset(0 0 0 0);
    animation: plate-in 1100ms var(--ease-out) both;
  }
  .hero__half--left img  { animation-name: plate-in-left; }
  .hero__half--right img { animation-name: plate-in-right; }

  .hero__title, .hero__lead, .hero__when, .cta {
    animation: rise 900ms var(--ease-out) both;
  }
  .hero__title { animation-delay: 240ms; }
  .hero__lead  { animation-delay: 360ms; }
  .hero__when  { animation-delay: 440ms; }
  .cta         { animation-delay: 520ms; }

    .reveal img {
    clip-path: inset(6% 0 0 0);
    transform: scale(1.05);
    opacity: 0;
    transition: clip-path 1000ms var(--ease-out), transform 1000ms var(--ease-out), opacity 600ms ease-out;
  }
  .reveal.is-in img { clip-path: inset(0 0 0 0); transform: none; opacity: 1; }
  .reveal figcaption { opacity: 0; transition: opacity 500ms ease-out 260ms; }
  .reveal.is-in figcaption { opacity: 1; }
}

@keyframes plate-in-left {
  from { clip-path: inset(0 0 0 100%); transform: scale(1.08); }
  to   { clip-path: inset(0 0 0 0);    transform: none; }
}
@keyframes plate-in-right {
  from { clip-path: inset(0 100% 0 0); transform: scale(1.08); }
  to   { clip-path: inset(0 0 0 0);    transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
