/* Landing camaraymagia · estil "filmmaker" (fosc, tipografia Days One + Jost, accent vermell) */

:root {
  --accent: #91212e;
  --accent-dark: #740b18;
  --white: #ffffff;
  --text: #ededed;
  --muted: #9a9898;
  --line: #414141;
  --black: #000000;
  --gray: #1d1d1d;

  --font-heading: 'Days One', 'Arial Black', system-ui, sans-serif;
  --font-body: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --container: 1250px;
  --gutter: clamp(20px, 5vw, 40px);
  --section: clamp(64px, 9vw, 100px);
}

[hidden] {
  display: none !important;
}

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

html {
  scroll-behavior: smooth;
  /* Evita que la capçalera fixa tapi el títol en saltar a una secció */
  scroll-padding-top: 110px;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

p {
  margin: 0 0 1em;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--white);
}

h1 {
  font-size: clamp(38px, 6.2vw, 72px);
  line-height: 1.12;
}

h2 {
  font-size: clamp(26px, 3.2vw, 38px);
}

h3 {
  font-size: clamp(20px, 2vw, 24px);
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section);
}

.bg-black {
  background: var(--black);
}

.bg-gray {
  background: var(--gray);
}

.kicker {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-body);
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.text-link {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-link:hover {
  color: #c43243;
}

.center {
  text-align: center;
}

.narrow {
  max-width: 800px;
  margin-inline: auto;
}

/* ---------- Botons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  padding: 16px 40px;
  border: 1px solid transparent;
  font-family: var(--font-heading);
  font-size: 15px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-white {
  background: var(--white);
  color: var(--black);
}

.btn-white:hover {
  background: var(--accent);
  color: var(--white);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
}

.btn-accent:hover {
  background: var(--accent-dark);
}

.btn-outline {
  min-height: 56px;
  padding: 12px 38px;
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--black);
}

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

/* ---------- Icones ---------- */
.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
}

.social {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social a {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: var(--white);
  font-size: 15px;
  transition: background-color 0.2s, border-color 0.2s;
}

.social a:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.play {
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  font-size: 30px;
  cursor: pointer;
  transition: transform 0.25s, background-color 0.25s;
}

.play:hover {
  transform: scale(1.08);
  background: rgba(145, 33, 46, 0.85);
  border-color: var(--accent);
}

.play .icon {
  margin-left: 4px;
}

/* ---------- Capçalera ---------- */
/* Capçalera fixa i semitransparent */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color 0.3s ease;
}

/* Una mica més opaca quan ja s'ha fet scroll, perquè el menú es llegeixi bé sobre qualsevol fons */
.site-header.is-scrolled {
  background: rgba(0, 0, 0, 0.7);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 22px 24px;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

.header-right {
  justify-content: flex-end;
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  font-family: var(--font-heading);
  font-size: 15px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  transition: color 0.2s;
}

.nav a:hover {
  color: #d4515f;
}

.logo {
  position: relative;
  display: inline-block;
  padding: 14px 26px;
  font-family: var(--font-heading);
  font-size: 17px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  white-space: nowrap;
}

.logo::before,
.logo::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.logo::before {
  left: 0;
  border-right: 0;
}

.logo::after {
  right: 0;
  border-left: 0;
}

.logo-dot {
  position: absolute;
  top: 10px;
  right: 16px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d02c3e;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: var(--white);
  font-size: 22px;
  cursor: pointer;
}

.mobile-menu {
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.96);
  border-top: 1px solid var(--line);
  padding: 8px 24px 24px;
}

.mobile-menu .nav {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.mobile-menu .nav a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.mobile-menu .social {
  margin-top: 20px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 770px;
  padding-block: 170px 90px;
  overflow: hidden;
  background: #111;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
  filter: grayscale(1) brightness(1.2);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.15) 70%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 40px;
}

.hero-copy {
  max-width: 680px;
}

.hero-copy>p {
  max-width: 610px;
  margin-top: 36px;
  color: var(--white);
}

.hero-play {
  margin-right: clamp(0px, 20vw, 290px);
  margin-bottom: 120px;
}

.laurels {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 42px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}

.laurel {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--white);
}

.laurel svg {
  width: 20px;
  height: 52px;
  fill: currentColor;
}

.laurel svg:last-child {
  transform: scaleX(-1);
}

.laurel span {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 9px;
  letter-spacing: 1px;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
}

.laurel strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
}

/* ---------- Franja de projecte ---------- */
.announce {
  background: var(--accent);
}

.announce-inner {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 470px);
  align-items: center;
}

.announce .announce-title {
  margin: 0;
  padding: 28px 50px;
  font-family: var(--font-heading);
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--white);
  font-size: clamp(20px, 2.2vw, 28px);
  text-align: center;
}

.announce .btn {
  min-height: 92px;
  margin-block: 18px;
}

/* ---------- Intro ---------- */
.split {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 6vw, 80px);
}

.split h2 {
  font-size: clamp(22px, 2.3vw, 28px);
}

/* Dos fotogrames en paral·lel (dins d'una columna de text) */
.gallery-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 32px 0 40px;
}

.gallery-2 img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

@media (max-width: 480px) {
  .gallery-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Galeria de 3 fotogrames */
.gallery-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 84px;
}

.gallery-3 img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

@media (max-width: 900px) {
  .gallery-3 {
    gap: 16px;
    margin-top: 56px;
  }
}

@media (max-width: 600px) {
  .gallery-3 {
    grid-template-columns: 1fr;
  }
}

/* Entrada suau en fer scroll (la classe .reveal-ready l'afegeix el JS,
   així sense JS les imatges es veuen igualment) */
.reveal-ready img {
  opacity: 0;
  transform: translateY(48px) scale(0.97);
  transition:
    opacity 0.9s ease-out,
    transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-ready img.is-visible {
  opacity: 1;
  transform: none;
}

/* En 3 columnes, les imatges entren una darrere l'altra */
@media (min-width: 601px) {
  .gallery-3.reveal-ready img:nth-child(2) {
    transition-delay: 0.18s;
  }

  .gallery-3.reveal-ready img:nth-child(3) {
    transition-delay: 0.36s;
  }
}

/* En 2 columnes, la de la dreta entra una mica després */
@media (min-width: 481px) {
  .gallery-2.reveal-ready img:nth-child(even) {
    transition-delay: 0.18s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-ready img {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Variant invertida: text a l'esquerra, títol a la dreta.
   Manté les mateixes columnes (5fr 7fr) que .split perquè quedin alineades. */
.split-reverse {
  margin-top: 84px;
}
.split-reverse h2 {
  order: 2;
}

/* Foto sota el text de "Sobre mi" */
.about-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  margin-top: 32px;
}

/* Foto vertical (sota el títol "DUES CARES") */
.about-photo--portrait {
  aspect-ratio: 3 / 4;
}

.collage {
  display: grid;
  grid-template-columns: 447px 1fr;
  gap: 82px;
  margin-top: 84px;
}

.collage-main {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.collage-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  margin-bottom: 70px;
}

.collage-thumbs img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* ---------- Estudi / vídeo ---------- */
.video-block {
  position: relative;
  margin-top: 44px;
}

.video-block iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #000;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 74px;
  padding: 64px 40px;
  background: var(--gray);
  text-align: center;
}

.stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(38px, 4.4vw, 56px);
  line-height: 1.1;
  color: var(--white);
}

.stat-label {
  display: block;
  margin-top: 16px;
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Treballs ---------- */
.works-head {
  padding-block: var(--section) 44px;
}

.works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.work {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  aspect-ratio: 480 / 318;
  padding: 32px 20px;
  overflow: hidden;
  color: var(--white);
  text-align: center;
  text-decoration: none;
  isolation: isolate;
}

.work img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}

.work::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(0, 0, 0, 0.45);
  transition: background-color 0.3s;
}

.work:hover img {
  transform: scale(1.06);
}

.work:hover::before {
  background: rgba(145, 33, 46, 0.55);
}

.work h3 {
  font-size: 20px;
}

.work-meta {
  margin-top: 6px;
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.cta-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.cta-bar .btn {
  min-height: 86px;
  font-size: 15px;
}

.btn-black {
  background: var(--black);
  color: var(--white);
}

.btn-black:hover {
  background: var(--gray);
}

/* ---------- La investigació ---------- */
.research-head h2 {
  margin-bottom: 24px;
}

.research-question {
  font-size: clamp(19px, 1.8vw, 22px);
  font-style: italic;
  color: var(--white);
}

.hypothesis {
  max-width: 900px;
  margin: 56px auto 0;
  padding: 36px 44px;
  background: var(--gray);
  border-left: 4px solid var(--accent);
}

.hypothesis p {
  font-family: var(--font-heading);
  font-size: clamp(18px, 1.9vw, 23px);
  line-height: 1.45;
  text-transform: uppercase;
  color: var(--white);
}

.abstract {
  margin-top: 80px;
}

.abstract h3 {
  margin-bottom: 20px;
  font-size: clamp(22px, 2.3vw, 28px);
}

/* Dues columnes que es reparteixen el text a parts iguals */
.abstract-body {
  column-count: 2;
  column-gap: clamp(40px, 7vw, 100px);
  column-fill: balance;
  /* Mínim 2 línies d'un paràgraf a cada costat del salt de columna */
  orphans: 2;
  widows: 2;
}

.abstract-body p {
  margin-bottom: 1em;
}

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

.abstract strong {
  color: var(--white);
  font-weight: 700;
}

@media (max-width: 900px) {
  .abstract {
    margin-top: 56px;
  }

  .abstract-body {
    column-count: 1;
  }

  .hypothesis {
    padding: 28px 24px;
  }
}

/* ---------- Producció ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 46px;
  padding: 50px 40px 56px;
  background: var(--gray);
  text-align: center;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  background: var(--accent);
  color: var(--white);
  font-size: 28px;
}

.feature h3 {
  margin-bottom: 12px;
  font-size: 20px;
}

.feature p {
  font-size: 17px;
}

.banner-wrap {
  position: relative;
  padding-top: 50px;
}

.banner-wrap::after {
  content: '';
  position: absolute;
  inset: 250px 0 0;
  background: var(--gray);
}

.banner-wrap img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 1250 / 400;
  object-fit: cover;
  object-position: center 40%;
  filter: grayscale(1) contrast(1.1);
}

/* ---------- Filmografia ---------- */
.filmography {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 10vw, 150px);
  align-items: start;
}

.filmography h2 {
  margin-bottom: 26px;
  font-size: clamp(28px, 3vw, 38px);
}

.filmography .btn {
  margin-top: 36px;
}

.years {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.years li {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 16px;
  padding: 24px 0 40px;
  border-bottom: 1px solid var(--line);
}

.year {
  font-family: var(--font-heading);
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.3;
  color: var(--white);
}

.years .work-meta {
  margin: 0 0 4px;
  font-size: 18px;
  color: var(--muted);
}

.years h3 {
  font-size: 22px;
}

/* ---------- Contacte ---------- */
.contact {
  display: grid;
  grid-template-columns: 489px 1fr;
  gap: clamp(40px, 10vw, 132px);
  align-items: start;
}

.contact-card {
  padding: 60px;
  background: var(--gray);
}

.contact-card h2 {
  margin-bottom: 32px;
  font-size: 28px;
}

.contact-list {
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 30px;
}

.contact-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  background: var(--accent);
  color: var(--white);
  font-size: 26px;
}

.contact-list h3 {
  font-size: 20px;
}

.contact-list a,
.contact-list span {
  text-decoration: none;
  color: var(--white);
  overflow-wrap: anywhere;
}

.contact-list a:hover {
  color: #d4515f;
}

.contact-copy {
  padding-top: 0;
}

.contact-copy h2 {
  margin-bottom: 30px;
}

.contact-copy .btn {
  min-height: 66px;
  margin-top: 36px;
}

/* ---------- Peu ---------- */
.site-footer {
  padding-block: 60px 36px;
  background: var(--black);
  text-align: center;
}

.site-footer .social {
  justify-content: center;
  gap: 22px;
}

.site-footer .social a {
  width: 44px;
  height: 44px;
  font-size: 20px;
}

.site-footer .nav {
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 34px;
  margin-top: 44px;
}

.footer-bottom {
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  font-size: 18px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .header-left .nav,
  .header-right .nav,
  .header-left .social {
    display: none;
  }

  .header-left {
    order: 1;
  }

  .logo-wrap {
    order: 0;
  }

  .header-right {
    order: 2;
    gap: 14px;
  }

  .menu-toggle {
    display: grid;
  }

  .collage {
    grid-template-columns: 5fr 7fr;
    gap: 48px;
  }

  .collage-thumbs {
    gap: 32px;
  }

  .contact {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  body {
    font-size: 17px;
  }

  .hero {
    min-height: 0;
    padding-block: 140px 70px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-play {
    display: none;
  }

  .announce-inner {
    grid-template-columns: 1fr;
  }

  .announce .announce-title {
    padding: 28px 0 0;
  }

  .announce .btn {
    min-height: 72px;
    margin-block: 20px 28px;
  }

  .split,
  .collage,
  .filmography,
  .contact {
    grid-template-columns: 1fr;
  }

  .collage-main {
    min-height: 0;
    aspect-ratio: 4 / 5;
  }

  .collage-thumbs {
    margin-bottom: 40px;
  }

  .stats,
  .features {
    grid-template-columns: repeat(2, 1fr);
  }

  .works {
    grid-template-columns: repeat(2, 1fr);
  }

  .banner-wrap {
    padding-top: 30px;
  }

  .banner-wrap::after {
    top: 55%;
  }
}

@media (max-width: 600px) {
  .header-inner {
    padding: 16px 20px;
  }

  .header-right .btn-outline {
    display: none;
  }

  .logo {
    padding: 12px 22px;
    font-size: 14px;
  }

  .laurels {
    gap: 16px 24px;
  }

  .collage-thumbs {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .works,
  .cta-bar {
    grid-template-columns: 1fr;
  }

  .stats,
  .features {
    grid-template-columns: 1fr;
    padding-inline: 24px;
  }

  .years li {
    grid-template-columns: 1fr;
    gap: 6px;
    padding-bottom: 28px;
  }

  .contact-card {
    padding: 36px 24px;
  }

  .contact-list li {
    gap: 18px;
  }

  .footer-bottom {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Estadístiques: el valor es mostra damunt de l'etiqueta */
.stats>div {
  display: flex;
  flex-direction: column;
}

.stats dd {
  order: -1;
  margin: 0;
}
/* En una sola columna, el títol torna a anar primer */
@media (max-width: 900px) {
  .split-reverse {
    margin-top: 56px;
  }
  .split-reverse h2 {
    order: 0;
  }
}
