/* Yarko Media Production — sito (ottobre 2026)
   Colori e caratteri ripresi dal vecchio sito Pixieset. */

/* Caratteri ospitati sul sito (nessuna richiesta a Google): alfabeto latino, licenza SIL Open Font License 1.1 */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/fraunces-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/figtree-latin.woff2") format("woff2");
}

:root {
  --bg: #ded8ca;          /* beige del sito attuale */
  --bg-soft: #e6e1d5;
  --ink: #121212;
  --ink-soft: rgba(18, 18, 18, 0.68);
  --line: rgba(18, 18, 18, 0.22);
  --dark: #0b0b0b;
  --on-dark: #f3efe6;
  --accent: #d18509;      /* ambra della citazione */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: max(16px, 4vw);
  --header-h: 76px;
  --fade: clamp(70px, 9vw, 140px);        /* altezza delle sfumature tra una sezione e l'altra */
  --hero-fade: clamp(70px, 10vh, 130px);  /* sfumatura in fondo al video di apertura */
  color-scheme: light;
}

@media (max-width: 759px) {
  :root { --header-h: 88px; }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 300 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; }
:where(ul[role="list"]) { list-style: none; margin: 0; padding: 0; }

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

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

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 100;
  padding: 10px 14px; background: var(--ink); color: var(--bg);
  font: 500 14px var(--sans); text-decoration: none;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }

/* Caratteri: Fraunces "morbido" (SOFT 100), il più vicino a Recoleta */
.site-logo, .site-nav, .intro-logo__text, .statement, .section-title, .quote blockquote, .link-arrow, .button {
  font-family: var(--serif);
  font-variation-settings: "SOFT" 100, "WONK" 0;
}

/* ---------- Testata ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  padding: 0 var(--gutter);
  color: #fff;
  transition: background-color .35s ease, color .35s ease, box-shadow .35s ease;
}
.site-header.is-solid {
  background: rgba(222, 216, 202, 0.97);
  color: var(--ink);
}
/* Sotto la testata niente riga: il beige sfuma nella pagina */
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 18px; pointer-events: none;
  background: linear-gradient(to bottom, rgba(222, 216, 202, .97), rgba(222, 216, 202, 0));
  opacity: 0; transition: opacity .35s ease;
}
.site-header.is-solid::after { opacity: 1; }

.site-logo {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px; font-weight: 500; letter-spacing: 0.005em;
  text-decoration: none; white-space: nowrap;
  transition: opacity .9s ease .1s;
}
.is-intro .site-logo { opacity: 0; }

.site-nav {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.site-nav__group { display: flex; gap: clamp(20px, 3vw, 44px); }
.site-nav a {
  font-size: 11.5px; font-weight: 500; letter-spacing: 0.25em; text-transform: uppercase;
  text-decoration: none;
  padding: 6px 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .3s ease;
}
.site-nav a:hover { background-size: 100% 1px; }

@media (max-width: 759px) {
  .site-header {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  }
  .site-logo { position: static; transform: none; font-size: 18px; }
  .site-nav { height: auto; justify-content: center; gap: 18px; }
  .site-nav__group { gap: 18px; }
  .site-nav a { font-size: 10.5px; letter-spacing: 0.2em; }
}

/* ---------- Apertura: video a tutto schermo + logo ---------- */

.hero {
  position: relative;
  height: 100vh; height: 100svh; min-height: 520px;
  overflow: hidden;
  background: var(--dark);
  color: #fff;
}
/* z-index 0: video e immagine restano in un livello chiuso, sempre sotto ombre, sfumatura in fondo, logo e "Scroll" */
.hero__media { position: absolute; inset: 0; z-index: 0; background: var(--dark); }
.hero__poster, .hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* I video compaiono in dissolvenza sopra l'immagine fissa quando partono davvero.
   Sono due, uno sopra l'altro: quello che sta suonando va in cima (il cambio cade su un taglio, non si vede) */
.hero__videos { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.hero__videos.is-playing { opacity: 1; }
.hero__shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 24%, rgba(0,0,0,0) 68%, rgba(0,0,0,.4) 100%);
}

.intro-logo {
  position: absolute; inset: 0; z-index: 2;
  display: none; place-items: center;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.is-intro .intro-logo { display: grid; }
.intro-logo__text {
  max-width: 13ch;
  font-size: clamp(2.6rem, 8vw, 6.5rem); font-weight: 500; line-height: 1.02; letter-spacing: -0.01em;
  text-align: center; text-wrap: balance;
  text-shadow: 0 2px 40px rgba(0, 0, 0, .25);
  opacity: 0;
}
/* Il logo appare grande al centro, resta un attimo e svanisce in dissolvenza; poi compare quello piccolo in alto */
.intro-go .intro-logo__text { animation: intro-logo 3.6s cubic-bezier(.22, .61, .36, 1) forwards; }
@keyframes intro-logo {
  0%   { opacity: 0; transform: translateY(14px); }
  24%  { opacity: 1; transform: none; }
  70%  { opacity: 1; transform: none; }
  100% { opacity: 0; transform: scale(1.02); }
}
@media (min-width: 900px) { .intro-logo__text { max-width: none; } }

/* In fondo il video sfuma nel beige della sezione successiva */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: var(--hero-fade); pointer-events: none;
  --c: var(--bg);
  background: var(--smooth-up);
}

.scroll-cue {
  position: absolute; left: 50%; bottom: calc(var(--hero-fade) + 6px); z-index: 2;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font: 500 10.5px var(--sans); letter-spacing: 0.3em; text-transform: uppercase; text-decoration: none;
  opacity: .85;
  transition: opacity .9s ease .3s;
}
.scroll-cue::after {
  content: ""; width: 1px; height: 44px; background: currentColor;
  transform-origin: top;
  animation: cue 2.4s ease-in-out infinite;
}
.is-intro .scroll-cue { opacity: 0; }
@keyframes cue {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
@media (prefers-reduced-motion: reduce) { .scroll-cue::after { animation: none; } }

/* ---------- Sezioni ---------- */

.section { padding: clamp(72px, 10vw, 140px) 0; scroll-margin-top: var(--header-h); }

/* Passaggi morbidi: in cima o in fondo a una sezione il colore vicino sfuma, senza una riga netta.
   Curva "dolce" (smoothstep), così la sfumatura sembra una linea sfocata. Nessuna animazione: non pesa.
   Le variabili stanno sugli stessi elementi che definiscono il colore --c, altrimenti non funzionano. */
.fade-top::before, .fade-bottom::after, .hero::after {
  --smooth: linear-gradient(to bottom,
    var(--c) 0%,
    color-mix(in srgb, var(--c) 97.2%, transparent) 10%,
    color-mix(in srgb, var(--c) 89.6%, transparent) 20%,
    color-mix(in srgb, var(--c) 78.4%, transparent) 30%,
    color-mix(in srgb, var(--c) 64.8%, transparent) 40%,
    color-mix(in srgb, var(--c) 50%, transparent) 50%,
    color-mix(in srgb, var(--c) 35.2%, transparent) 60%,
    color-mix(in srgb, var(--c) 21.6%, transparent) 70%,
    color-mix(in srgb, var(--c) 10.4%, transparent) 80%,
    color-mix(in srgb, var(--c) 2.8%, transparent) 90%,
    transparent 100%);
  --smooth-up: linear-gradient(to top,
    var(--c) 0%,
    color-mix(in srgb, var(--c) 97.2%, transparent) 10%,
    color-mix(in srgb, var(--c) 89.6%, transparent) 20%,
    color-mix(in srgb, var(--c) 78.4%, transparent) 30%,
    color-mix(in srgb, var(--c) 64.8%, transparent) 40%,
    color-mix(in srgb, var(--c) 50%, transparent) 50%,
    color-mix(in srgb, var(--c) 35.2%, transparent) 60%,
    color-mix(in srgb, var(--c) 21.6%, transparent) 70%,
    color-mix(in srgb, var(--c) 10.4%, transparent) 80%,
    color-mix(in srgb, var(--c) 2.8%, transparent) 90%,
    transparent 100%);
}
.fade-top, .fade-bottom { position: relative; z-index: 0; }
.fade-top::before, .fade-bottom::after {
  content: ""; position: absolute; left: 0; right: 0; z-index: -1; height: var(--fade); pointer-events: none;
}
.fade-top::before { top: 0; --c: var(--fade-top); background: var(--smooth); }
.fade-bottom::after { bottom: 0; --c: var(--fade-bottom); background: var(--smooth-up); }

.eyebrow {
  margin: 0 0 14px;
  font: 500 11.5px var(--sans); letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft);
}

.section-title { margin: 0; font-size: clamp(1.6rem, 2.4vw, 1.75rem); font-weight: 500; line-height: 1.2; }
.section-title--big { font-size: clamp(1.75rem, 3.2vw, 2.6rem); line-height: 1.18; text-wrap: balance; }

.statement {
  max-width: 26ch; margin: 0 auto clamp(64px, 9vw, 120px);
  font-size: clamp(1.75rem, 4vw, 3.25rem); font-weight: 500; line-height: 1.16; letter-spacing: .01em;
  text-align: center; text-wrap: balance;
}

.section-head {
  display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 24px;
  margin-bottom: 36px;
}
.section-head .eyebrow { grid-column: 1; grid-row: 2; margin: 10px 0 0; }
.section-lead { grid-column: 2; grid-row: 1 / span 2; justify-self: end; margin: 0; color: var(--ink-soft); font-size: 15px; }
@media (max-width: 599px) {
  .section-head { grid-template-columns: 1fr; }
  .section-lead { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
}

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 500; text-decoration: none;
  border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.link-arrow::after { content: "→"; transition: transform .25s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

/* Lavori: un collage unico su un cilindro che gira, su fondo nero.
   Senza JavaScript diventa una semplice striscia da scorrere */
.works {
  --collage-h: clamp(380px, 30vw + 200px, 640px);
  --works-bg: #0b0b0b;
  --fade-top: var(--bg);
  position: relative;
  background: var(--works-bg);
  /* sopra c'è spazio per la sfumatura dal beige al nero; sotto il nero continua nella citazione */
  padding: calc(var(--fade) + 12px) 0 0;
}
.featured { padding-bottom: 0; }   /* il collage chiude la sezione: niente fascia chiara prima della citazione */
.featured .section-head { margin-bottom: 8px; }
.works__stage { position: relative; height: calc(var(--collage-h) + 24px); overflow: hidden; outline: none; }
.works__ring { display: flex; align-items: center; gap: 8px; height: 100%; padding: 0 var(--gutter); overflow-x: auto; }
.works__photo {
  flex: none; position: relative; height: calc(var(--collage-h) / 2); width: calc(var(--collage-h) / 2 * var(--r, 1.5));
  background: var(--ph, #1b1b1b);   /* colore medio della foto, mentre si carica */
}
.works__photo img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; user-select: none; }
/* Le foto compaiono con una dissolvenza breve quando sono scaricate */
.js .works__photo img { opacity: 0; transition: opacity .6s ease; }
.js .works__photo img.is-loaded { opacity: 1; }

/* Con JavaScript: le foto vanno in colonne e le colonne si dispongono sul cilindro */
.js .works__stage { perspective: 2000px; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.js .works__stage.is-dragging { cursor: grabbing; }
.js .works__ring { position: absolute; inset: 0; display: block; padding: 0; overflow: visible; transform-style: preserve-3d; }
.works__col { position: absolute; left: 50%; top: 50%; display: flex; flex-direction: column; visibility: hidden; will-change: transform; }
.works__col .works__photo { width: 100%; }
.works__col::after { content: ""; position: absolute; inset: 0; background: #000; opacity: var(--shade, 0); pointer-events: none; }
.works__stage:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }

/* Vignettatura verso il nero: il collage sembra spinto dentro lo schermo */
.works__vignette {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(ellipse 72% 88% at 50% 50%, rgba(11, 11, 11, 0) 52%, rgba(11, 11, 11, .6) 82%, var(--works-bg) 100%),
    linear-gradient(to right, var(--works-bg) 0, rgba(11, 11, 11, 0) 14%, rgba(11, 11, 11, 0) 86%, var(--works-bg) 100%);
}

/* Frecce al centro sotto il collage e, subito a destra, il link alle gallerie clienti */
.works__controls {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 28px;
  margin-top: 14px; padding: 0 var(--gutter);
}
.works__arrows { grid-column: 2; display: flex; gap: 18px; }
.works__btn {
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid rgba(243, 239, 230, .22); border-radius: 50%;
  background: transparent; color: var(--on-dark); cursor: pointer;
  transition: background-color .25s ease, border-color .25s ease;
}
.works__btn:hover { background: rgba(243, 239, 230, .08); border-color: rgba(243, 239, 230, .5); }
.works__more { grid-column: 3; justify-self: start; color: var(--on-dark); font-size: 17px; }
/* Sul telefono frecce e link al centro non ci stanno: frecce a sinistra, link a destra */
@media (max-width: 599px) {
  .works__controls { grid-template-columns: auto 1fr; }
  .works__arrows { grid-column: 1; }
  .works__more { grid-column: 2; justify-self: end; font-size: 16px; }
}

/* Citazione: segue il collage sullo stesso nero */
.quote { background: var(--dark); color: var(--accent); padding: clamp(64px, 8vw, 120px) 0 clamp(80px, 11vw, 150px); }
.quote figure { margin: 0 auto; text-align: center; }
.quote blockquote { margin: 0; }
.quote blockquote p { max-width: 30ch; margin: 0 auto; font-size: clamp(1.45rem, 2.6vw, 2.1rem); font-weight: 500; line-height: 1.3; text-wrap: balance; }
.quote figcaption { margin-top: 26px; font: 400 13px var(--sans); letter-spacing: .16em; text-transform: uppercase; }

/* About */
.about__grid { display: grid; gap: clamp(32px, 6vw, 88px); align-items: center; }
@media (min-width: 860px) { .about__grid { grid-template-columns: 5fr 6fr; } }
/* Tre foto: una alta a sinistra, due quadrate una sopra l'altra a destra */
.about__photos { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; }
.about__photo { position: relative; overflow: hidden; background: var(--ph, #cfc7b6); }
.about__photo--1 { grid-row: span 2; }
.about__photo--2, .about__photo--3 { aspect-ratio: 1 / 1; }
/* La foto riempie il riquadro senza cambiarne l'altezza (decidono le due quadrate a destra) */
.about__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.about__text p { max-width: 54ch; }
.about__text .section-title { margin-bottom: 22px; }

/* Contatti */
.about { --fade-top: var(--dark); }
.contact { --fade-top: var(--bg); --fade-bottom: var(--dark); background: var(--bg-soft); }
.contact__grid { display: grid; gap: clamp(40px, 6vw, 96px); }
@media (min-width: 900px) { .contact__grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.contact__direct { margin-top: 32px; display: grid; gap: 10px; font-size: 17px; }
.contact__direct a { text-decoration: none; border-bottom: 1px solid var(--line); }
.contact__direct a:hover { border-color: currentColor; }

.form { display: grid; gap: 22px; }
.field { display: grid; gap: 6px; }
.field label { font: 500 11.5px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 0;
  border: 0; border-bottom: 1px solid rgba(18, 18, 18, .35); border-radius: 0;
  background: transparent; color: var(--ink);
  font: 400 16px/1.5 var(--sans);   /* 16px: su iPhone evita lo zoom automatico */
}
.field textarea { resize: vertical; min-height: 120px; }
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23121212' stroke-width='1.4'/%3E%3C/svg%3E") right 2px center / 12px 8px no-repeat;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }

/* Tendina della categoria: effetto vetro smerigliato, senza cornice (sostituisce quella bianca del sistema) */
.select { position: relative; }
.select__button {
  width: 100%; padding: 10px 28px 10px 0; text-align: left;
  border: 0; border-bottom: 1px solid rgba(18, 18, 18, .35); border-radius: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23121212' stroke-width='1.4'/%3E%3C/svg%3E") right 2px center / 12px 8px no-repeat;
  color: var(--ink); font: 400 16px/1.5 var(--sans); cursor: pointer;
}
.select__button:focus { outline: none; border-bottom-color: var(--ink); box-shadow: 0 1px 0 var(--ink); }
.select__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30;
  margin: 0; padding: 6px; list-style: none;
  border: 0; border-radius: 12px;
  background: rgba(243, 239, 230, .38);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  opacity: 0; transform: translateY(-4px); visibility: hidden;
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
}
.select.is-open .select__list { opacity: 1; transform: none; visibility: visible; transition: opacity .16s ease, transform .16s ease; }
.select__option { padding: 10px 12px; border-radius: 8px; cursor: pointer; font: 400 16px/1.4 var(--sans); color: var(--ink); }
.select__option.is-active { background: rgba(18, 18, 18, .07); }
.select__option[aria-selected="true"] { font-weight: 500; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .select__list { background: rgba(243, 239, 230, .94); }
}
.field select.is-enhanced { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .select__list { transition: none; } }

.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }

.button {
  justify-self: start;
  padding: 15px 32px;
  border: 0; border-radius: 2px;
  background: var(--ink); color: var(--bg);
  font-size: 13px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color .25s ease;
}
.button:hover { background: #333; }
.form__note { margin: 0; min-height: 1.5em; font-size: 14.5px; color: var(--ink-soft); }

/* Pagine semplici (Privacy, pagina non trovata): testo su beige, testata sempre piena */
.page { padding: calc(var(--header-h) + clamp(48px, 7vw, 96px)) 0 clamp(72px, 10vw, 120px); }
.page .wrap { max-width: 780px; }
.page h1, .page h2 { font-family: var(--serif); font-variation-settings: "SOFT" 100, "WONK" 0; font-weight: 500; }
.page h1 { margin: 0 0 10px; font-size: clamp(2rem, 4.2vw, 2.9rem); line-height: 1.15; }
.page h2 { margin: 44px 0 10px; font-size: 1.4rem; line-height: 1.3; }
.page p, .page li { max-width: 66ch; }
.page ul { padding-left: 1.2em; }
.page li + li { margin-top: 6px; }
.page a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.page__updated { margin: 0 0 36px; color: var(--ink-soft); font-size: 15px; }

/* Piede */
.site-footer { background: var(--dark); color: var(--on-dark); padding: 30px 0; font-size: 14px; }
.site-footer__row { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer__links { display: flex; gap: 22px; }
.site-footer a { text-decoration: none; opacity: .8; }
.site-footer a:hover { opacity: 1; }
