/* =========================================================================
   Foto Art — fulla d'estils del tema
   Tokens i mides segons design_handoff_fotoart/README.md §4 i §5b.
   ========================================================================= */

:root {
  /* Color — només blanc i negre (§4) */
  --ink: #0a0a0a;
  --paper: #ffffff;
  --gray-body: #444;
  --gray-muted: #555;
  --gray-soft: #666;
  --gray-meta: #999;
  --gray-faint: #bbb;
  --gray-line: #ccc;
  --faint-bg: #f4f3f1;
  --line: rgba(0, 0, 0, .12);
  --rule: var(--ink);

  /* Layout (§4, §5b) */
  --pad: 44px;
  --read-width: 760px;

  /* Placeholder de foto B/N — se substitueix per la imatge real */
  --photo-placeholder:
    radial-gradient(130% 90% at 26% 16%, #5f5f5f, transparent 52%),
    radial-gradient(95% 95% at 84% 96%, #000, transparent 58%),
    linear-gradient(157deg, #333, #050505);
}

@media (max-width: 640px) {
  :root { --pad: 22px; }
}

/* ---------- Reset mínim ---------- */

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

html, body { margin: 0; }

body {
  font-family: 'Archivo', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }

/* Accessibilitat: focus visible sobre qualsevol fons */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.skip-link:focus { left: 0; }

/* ---------- Utilitats de layout ---------- */

.pad { padding-left: var(--pad); padding-right: var(--pad); }

/* El coixí superior es mesura en vh perquè les pantalles baixes no quedin
   escanyades. A 900px d'alçada dona 63px: pràcticament els 64 del disseny. */
.chapter {
  padding: clamp(32px, 7vh, 64px) var(--pad) 0;
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gray-faint);
  font-weight: 400;
}

/* =========================================================================
   Navegació (§4 interaccions: actiu = pes 600 + opacitat 1, sense subratllat)
   ========================================================================= */

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px var(--pad);
}

.site-nav__brand {
  font-size: 22px;
  letter-spacing: .01em;
}

/* Wordmark: "Foto" 700 + "Art" 200 (§4). Al hero el contrast s'inverteix. */
.wordmark__strong { font-weight: 700; }
.wordmark__light { font-weight: 200; }

.wordmark__strong.wordmark--hero { font-weight: 200; }
.wordmark__light.wordmark--hero { font-weight: 800; }

.site-nav__menu {
  list-style: none;
  display: flex;
  gap: 34px;
  margin: 0;
  padding: 0;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 300;
}

.site-nav__item { opacity: .55; }

.site-nav__item.is-active {
  font-weight: 600;
  opacity: 1;
}

/* Hit target de 44px a mòbil (§5b) sense alterar el layout de desktop */
@media (max-width: 640px) {
  .site-nav {
    flex-wrap: wrap;
    gap: 14px 20px;
  }
  .site-nav__menu {
    gap: 16px 18px;
    flex-wrap: wrap;
  }
  .site-nav__item a,
  .site-nav__item > span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
}

/* Variant sobre el hero: text blanc superposat */
.site-nav--overlay {
  position: relative;
  z-index: 3;
  color: var(--paper);
}

/* =========================================================================
   Botons
   ========================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 30px;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 400;
  min-height: 44px;
}

.btn__arrow { font-weight: 200; font-size: 16px; }

/* Primari: fosc sobre blanc */
.btn--primary {
  background: var(--ink);
  color: var(--paper);
}

/* Outline sobre el hero: inverteix a blanc/negre en hover (§4) */
.btn--outline {
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, .9);
  color: var(--paper);
  background: transparent;
  transition: background .3s ease, color .3s ease;
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

/* =========================================================================
   Enllaç amb subratllat animat (§4: scaleX 0→1, .4s)
   ========================================================================= */

.ln {
  position: relative;
  display: inline-block;
}

.ln::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s cubic-bezier(.2, .7, .2, 1);
}

.ln:hover::after,
.ln:focus-visible::after { transform: scaleX(1); }

/* =========================================================================
   Footer (§6) — fons blanc, text negre, 3 columnes
   ========================================================================= */

.site-footer {
  background: var(--paper);
  color: var(--ink);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 44px var(--pad) 34px;
  border-bottom: 1px solid var(--line);
}

.site-footer__brand {
  font-size: 15px;
  letter-spacing: .02em;
  margin-bottom: 14px;
}

.site-footer__brand-suffix {
  font-weight: 300;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gray-soft);
}

.site-footer__address {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  font-weight: 300;
  color: var(--gray-muted);
  max-width: 280px;
}

.site-footer__heading {
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gray-meta);
  font-weight: 400;
  margin-bottom: 14px;
}

.site-footer__list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 2.2;
  font-weight: 300;
}

.site-footer__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px var(--pad) 30px;
  flex-wrap: wrap;
}

.site-footer__copyright {
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gray-meta);
  font-weight: 300;
}

/* Segell Kit Digital (§6): el pack oficial no es pot redibuixar ni recolorir, així
   que es mostra tal qual, sense filtres i amb la proporció intacta. La mida ha de
   deixar-lo llegible — el lockup és molt apaïsat i, si s'encongeix, el text
   institucional deixa de distingir-se. Comprovar el mínim oficial abans de
   publicar. Sense imatge, es mostra el placeholder amb vora discontínua. */
.kit-seal {
  flex: 0 1 auto;
  min-width: 0;
}

/* Amplada explícita, no `width:100%`: un SVG amb `viewBox` i sense `width`/
   `height` té una mida intrínseca de només 300px al navegador, i un percentatge
   s'hi resoldria a sobre en comptes d'ampliar-lo. `max-width` el manté dins de
   l'espai disponible a pantalles estretes. */
.kit-seal img {
  width: 400px;
  max-width: 100%;
  height: auto;
}

.kit-seal--placeholder {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px dashed var(--gray-faint);
  padding: 10px 16px;
  color: var(--gray-meta);
}

.kit-seal--placeholder .kit-seal__mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--gray-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  text-align: center;
  line-height: 1.1;
  font-weight: 400;
  flex-shrink: 0;
}

.kit-seal--placeholder .kit-seal__note {
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: .04em;
  max-width: 230px;
  font-weight: 300;
}

@media (max-width: 760px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

/* =========================================================================
   Primera pantalla (§5)
   Nav + contingut principal ocupen com a mínim una pantalla; el footer queda
   sempre a sota. `dvh` té en compte la barra del navegador al mòbil, i el
   `vh` previ és el fallback per als navegadors que no el suporten.
   ========================================================================= */

.first-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Variant per a les pàgines de text (legals i reserves): aquí el footer sí que
   va dins, així queda enganxat a baix quan el contingut és curt. */
.page-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* =========================================================================
   Portada — hero a pantalla completa (§5)
   ========================================================================= */

.hero { background: var(--ink); }

/* L'escenari conté la foto i tot el que hi va a sobre; a diferència de la resta
   de pàgines té alçada fixa, no mínima. El footer en queda fora, així el vel no
   el tapa i el peu de l'obra i els indicadors del pase es veuen sobre la foto. */
.hero__stage {
  height: 100vh;
  height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero__media {
  position: absolute;
  inset: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  background: var(--photo-placeholder);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.3s cubic-bezier(.4, 0, .2, 1);
}

.hero__slide.is-current { opacity: 1; }

/* Vel per garantir la llegibilitat del text blanc sobre qualsevol foto */
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, .55) 0%,
    rgba(0, 0, 0, .15) 34%,
    rgba(0, 0, 0, .35) 100%
  );
}

.hero__caption {
  position: absolute;
  right: 22px;
  bottom: 20px;
  z-index: 3;
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .45);
  font-weight: 300;
}

.hero__dots {
  position: absolute;
  left: var(--pad);
  bottom: 26px;
  z-index: 3;
  display: flex;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero__dot {
  width: 26px;
  height: 2px;
  background: var(--paper);
  opacity: .3;
  transition: opacity .4s;
}

.hero__dot.is-current { opacity: 1; }

.hero__content {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--pad) 40px;
  color: var(--paper);
}

.hero__eyebrow {
  font-size: clamp(11px, 1.1vw, 13px);
  letter-spacing: .42em;
  text-transform: uppercase;
  font-weight: 300;
  color: rgba(255, 255, 255, .7);
  margin-bottom: clamp(20px, 3vh, 40px);
}

.hero__title {
  margin: 0;
  font-size: clamp(58px, 13vw, 200px);
  line-height: .86;
  letter-spacing: -.02em;
}

.hero__author {
  font-size: clamp(12px, 1.5vw, 20px);
  letter-spacing: .5em;
  text-transform: uppercase;
  font-weight: 200;
  margin-top: clamp(18px, 2.6vh, 34px);
  color: rgba(255, 255, 255, .92);
}

.hero__actions {
  margin-top: clamp(40px, 7vh, 80px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
}

.hero__tagline {
  max-width: 340px;
  font-size: 13px;
  line-height: 1.6;
  font-weight: 200;
  color: rgba(255, 255, 255, .72);
}

/* Entrada fade/rise (§4) */
@keyframes fotoart-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.hero__intro { animation: fotoart-rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero__actions { animation: fotoart-rise 1s cubic-bezier(.2, .7, .2, 1) .18s both; }

@media (prefers-reduced-motion: reduce) {
  .hero__intro,
  .hero__actions { animation: none; }
  .hero__slide { transition: none; }
}

/* =========================================================================
   Qui soc & Serveis (§5)
   ========================================================================= */

/* Ocupa la resta de la primera pantalla, amb retrat i text centrats entre si. */
.bio {
  flex: 1;
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 64px;
  align-items: center;
  padding: 34px var(--pad) 80px;
}

.bio__figure { margin: 0; }

.bio__portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--photo-placeholder);
  background-size: cover;
  background-position: center;
}

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

.bio__portrait-note {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .55);
  font-weight: 300;
}

.bio__caption {
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gray-meta);
  font-weight: 300;
}

.bio__body { padding-top: 6px; }

.bio__title {
  margin: 0 0 34px;
  font-size: clamp(38px, 5.2vw, 72px);
  line-height: .98;
  letter-spacing: -.02em;
  font-weight: 200;
}

.bio__title strong { font-weight: 700; }

.bio__lead {
  margin: 0 0 22px;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.5;
  font-weight: 300;
  max-width: 620px;
}

.bio__text p {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.85;
  font-weight: 300;
  color: var(--gray-body);
  max-width: 560px;
}

.bio__text p:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
  .bio {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .bio__figure { max-width: 380px; }
}

/* ---------- Serveis ---------- */

.services__head {
  border-top: 1px solid var(--rule);
}

.services__intro-wrap { padding: 30px var(--pad) 20px; }

.services__title {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1;
  letter-spacing: -.02em;
  font-weight: 200;
  max-width: 820px;
}

.services__title strong { font-weight: 700; }

.services__intro {
  margin: 0 0 44px;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 300;
  color: var(--gray-muted);
  max-width: 520px;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

/* Fitxa: hover omple de negre i inverteix el text (§4) */
.service {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 38px 34px;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  background: transparent;
  transition: background .3s ease, color .3s ease;
}

.service__code {
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--gray-meta);
  font-weight: 400;
  transition: color .3s ease;
}

.service__title {
  margin: 16px 0 12px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.service__description {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 300;
  color: var(--gray-muted);
  max-width: 340px;
  transition: color .3s ease;
}

.service__cta {
  margin-top: auto;
  padding-top: 20px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 400;
  color: var(--ink);
  transition: color .3s ease;
}

.service:hover,
.service:focus-within {
  background: var(--ink);
  color: var(--paper);
}

.service:hover .service__code,
.service:hover .service__description,
.service:hover .service__cta,
.service:focus-within .service__code,
.service:focus-within .service__description,
.service:focus-within .service__cta {
  color: var(--paper);
}

@media (max-width: 640px) {
  .services__grid { grid-template-columns: 1fr; }
}

/* ---------- Crida final ---------- */

.about-cta {
  padding: 20px var(--pad) 90px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
}

.about-cta__text {
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 200;
  max-width: 520px;
  line-height: 1.35;
}

.about-cta__text strong { font-weight: 600; }

/* =========================================================================
   Contacte (§5) — sense formulari
   ========================================================================= */

/* Les dues columnes s'igualen en alçada: així el mapa no dicta la mida de la
   pàgina i tot el bloc de contacte cap en una pantalla. El ritme vertical és
   més compacte que a la resta de pàgines pel mateix motiu. */
.contact {
  flex: 1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 60px;
  padding: clamp(12px, 2.7vh, 24px) var(--pad) clamp(24px, 5.3vh, 48px);
  align-items: stretch;
}

.contact__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact__aside {
  display: flex;
  flex-direction: column;
}

.contact__title {
  margin: 0 0 clamp(16px, 3.6vh, 32px);
  font-size: clamp(40px, 5.6vw, 80px);
  line-height: .96;
  letter-spacing: -.02em;
  font-weight: 200;
}

.contact__title strong { font-weight: 700; }

.contact__intro {
  margin: 0 0 clamp(18px, 4vh, 36px);
  font-size: 15px;
  line-height: 1.8;
  font-weight: 300;
  color: var(--gray-muted);
  max-width: 440px;
}

.contact__list {
  display: grid;
  gap: clamp(14px, 2.9vh, 26px);
  max-width: 520px;
}

.contact__label {
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gray-meta);
  font-weight: 400;
  margin-bottom: 8px;
}

.contact__value {
  font-size: clamp(20px, 2.6vw, 32px);
  font-weight: 300;
  letter-spacing: -.01em;
}

.contact__value--address {
  font-size: clamp(18px, 2.1vw, 26px);
  line-height: 1.35;
}

.contact__note {
  margin: clamp(14px, 3.1vh, 28px) 0 0;
  font-size: 11px;
  letter-spacing: .04em;
  color: #aaa;
  font-weight: 300;
}

/* Mapa discret B/N — SVG propi, cap incrustació de tercers.
   A dues columnes creix fins a igualar la columna de dades en comptes de tenir
   proporció fixa; el `slice` del SVG el retalla sense deformar-lo. */
.contact__map {
  position: relative;
  flex: 1;
  min-height: 380px;
  background: var(--faint-bg);
  border: 1px solid var(--rule);
  overflow: hidden;
}

/* Absoluts a propòsit: un SVG amb `viewBox` i `height="100%"` dins d'un pare
   d'alçada automàtica cau a la seva mida intrínseca i li imposa la proporció
   des de dins. Tret del flux, l'alçada la decideix el contenidor. */
.contact__map > svg,
.contact__map > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact__map-place {
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 9px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 400;
}

.contact__map-coords {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-size: 9px;
  letter-spacing: .14em;
  color: var(--gray-soft);
  font-weight: 300;
}

.contact__map-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 400;
}

/* Pantalles amples però baixes (portàtils de 768–800px). Amb els cossos del
   §4 el bloc no hi cap, així que aquí — i només aquí — s'escalen. Per sobre de
   860px d'alçada la pàgina queda exactament com marca el disseny. */
@media (min-width: 901px) and (max-height: 860px) {
  .contact__title { font-size: clamp(34px, 4.3vw, 56px); }
  .contact__intro { font-size: 14px; margin-bottom: clamp(16px, 3vh, 28px); }
  .contact__value { font-size: clamp(18px, 2vw, 26px); }
  .contact__value--address { font-size: clamp(16px, 1.6vw, 21px); }
  .contact__label { margin-bottom: 5px; }
  .contact { padding-bottom: clamp(16px, 4.4vh, 40px); }
  .contact__list { gap: clamp(12px, 2.5vh, 22px); }
}

/* Apilat ja no hi ha res amb què igualar-se: el mapa recupera proporció pròpia,
   ara apaïsada, que ocupa menys pantalla que la vertical original. */
@media (max-width: 900px) {
  .contact {
    grid-template-columns: 1fr;
    gap: 44px;
    align-items: start;
    padding-bottom: 64px;
  }
  .contact__map {
    flex: none;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }
}

/* =========================================================================
   Pàgines legals (§5) — amplada de lectura 760px, menys pes visual
   ========================================================================= */

.legal-page {
  flex: 1;
  max-width: var(--read-width);
  margin: 0 auto;
  padding: 64px var(--pad) 90px;
  width: 100%;
}

.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gray-meta);
  font-weight: 300;
  margin-bottom: 24px;
}

.legal-tabs__item.is-active {
  color: var(--ink);
  font-weight: 600;
}

.legal-page__title {
  margin: 0 0 10px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1;
  letter-spacing: -.02em;
  font-weight: 200;
}

.legal-page__title strong { font-weight: 700; }

.legal-page__notice {
  background: var(--faint-bg);
  border-left: 2px solid var(--ink);
  padding: 14px 18px;
  margin: 22px 0 8px;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--gray-body);
}

.legal-body h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .01em;
  margin: 44px 0 12px;
}

.legal-body p,
.legal-body li {
  font-size: 13.5px;
  line-height: 1.85;
  font-weight: 300;
  color: #333;
}

.legal-body ul {
  padding-left: 18px;
  margin: 8px 0;
}

/* Als legals els enllaços de cos sí que van subratllats */
.legal-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
