@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url(/assets/jost.woff2) format('woff2');
}

:root {
  --ink: #141414;
  --muted: #727069;
  --line: #e2dfd8;
  --paper: #f7f6f3;
  --soft: #ecebe6;
  --dark: #121212;
  --row: 280px;
  --gap: 8px;
  --pad: clamp(16px, 4vw, 56px);
  --head: 96px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head) + 70px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 300 17px/1.6 'Jost', 'Futura', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2 { font-weight: 400; line-height: 1.15; margin: 0 0 .6em; }
h1 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -.015em; }
h2 { font-size: 20px; }
.wrap { padding-inline: var(--pad); max-width: 1680px; margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 12px; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.display { font-size: clamp(48px, 11vw, 168px); font-weight: 400; letter-spacing: -.045em; line-height: .9; margin: 0; }
.section-title { font-size: 13px; font-weight: 400; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  border: 1px solid currentColor; border-radius: 999px; padding: 12px 26px;
  font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
  transition: background .25s, color .25s;
}
.btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-light:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* ---------- header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  height: var(--head);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-inline: var(--pad);
  background: rgba(247, 246, 243, .9);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: background .35s, border-color .35s, color .35s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.brand img { height: 42px; width: auto; transition: filter .35s; }
.nav-main { list-style: none; margin: 0; padding: 0; display: flex; gap: 30px; align-items: center; }
.nav-main a { text-decoration: none; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; padding: 6px 0; position: relative; }
.nav-main > li > a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav-main > li > a:hover::after, .nav-main > li > a[aria-current]::after { transform: scaleX(1); }
.lang a { border: 1px solid currentColor; border-radius: 999px; padding: 4px 11px; font-size: 12px; }
.lang a::after { display: none; }
.has-sub { position: relative; }
.sub {
  list-style: none; margin: 0; padding: 14px 0;
  position: absolute; top: calc(100% + 8px); left: -22px; min-width: 220px;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .08);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s, transform .2s var(--ease), visibility .2s;
}
.sub::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.sub a { display: block; padding: 7px 22px; text-transform: none; letter-spacing: 0; font-size: 16px; }
.sub a:hover, .sub a[aria-current] { background: var(--soft); }
.has-sub:hover .sub, .has-sub:focus-within .sub { opacity: 1; visibility: visible; transform: none; }
.menu-btn { display: none; }

/* cabecera transparente sobre la portada */
.home .site-header { position: fixed; left: 0; right: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; color: #fff; }
.home .site-header .brand img { filter: invert(1); }
.home .site-header.scrolled { background: rgba(247, 246, 243, .9); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); color: var(--ink); }
.home .site-header.scrolled .brand img { filter: none; }

@media (max-width: 900px) {
  :root { --head: 72px; --row: 150px; --gap: 5px; }
  .brand img { height: 28px; }
  .menu-btn {
    display: block; position: relative; z-index: 2; background: none; border: 1px solid currentColor; border-radius: 999px; color: inherit;
    font: 400 12px 'Jost', sans-serif; letter-spacing: .14em; text-transform: uppercase; padding: 7px 16px;
  }
  .nav {
    position: fixed; inset: 0; background: var(--paper); color: var(--ink);
    overflow-y: auto; padding: calc(var(--head) + 24px) var(--pad) 40px;
    opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
  }
  .nav.open { opacity: 1; visibility: visible; }
  .menu-open .site-header { color: var(--ink) !important; }
  .menu-open .site-header .brand img { filter: none !important; position: relative; z-index: 2; }
  .menu-open .brand { position: relative; z-index: 2; }
  .nav-main { flex-direction: column; align-items: flex-start; gap: 2px; }
  .nav-main > li > a { font-size: 30px; letter-spacing: -.01em; text-transform: none; }
  .nav-main > li > a::after { display: none; }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; border: 0; box-shadow: none; padding: 0 0 12px; background: none; display: flex; flex-wrap: wrap; gap: 0 16px; }
  .sub::before { display: none; }
  .sub a { padding: 3px 0; color: var(--muted); font-size: 17px; }
  .sub a:hover { background: none; }
  .lang { margin-top: 20px; }
  .lang a { font-size: 14px !important; padding: 6px 16px; }
  body.menu-open { overflow: hidden; }
}

/* ---------- home: portada */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; background: var(--dark); color: #fff; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.4s ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 7s linear; }
.slide.is-active img { transform: scale(1); }
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 50%, rgba(0,0,0,.55) 100%); }
.slide figcaption { position: absolute; right: var(--pad); bottom: 34px; z-index: 2; }
.slide figcaption a { color: rgba(255,255,255,.85); text-decoration: none; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.slide figcaption a:hover { color: #fff; }
.hero-text { position: absolute; z-index: 2; left: var(--pad); bottom: clamp(70px, 9vh, 110px); max-width: min(900px, 80vw); }
.hero-kicker { margin: 0 0 10px; font-size: 13px; letter-spacing: .2em; text-transform: uppercase; opacity: .85; }
.hero-title { margin: 0; font-size: clamp(32px, 5.4vw, 78px); line-height: 1.02; letter-spacing: -.03em; font-weight: 400; text-wrap: balance; }
.dots { position: absolute; z-index: 2; left: var(--pad); bottom: 36px; display: flex; gap: 6px; }
.dot { width: 22px; height: 2px; background: rgba(255,255,255,.4); transition: background .4s, width .4s; }
.dot.is-active { background: #fff; width: 44px; }
.scroll-cue { position: absolute; z-index: 2; left: 50%; bottom: 24px; transform: translateX(-50%); color: #fff; text-decoration: none; font-size: 20px; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }
@media (max-width: 700px) {
  .slide figcaption { display: none; }
  .scroll-cue { display: none; }
}

/* ---------- home: portfolio */
.portfolio { padding-top: clamp(64px, 10vw, 140px); padding-bottom: clamp(64px, 10vw, 140px); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; margin-bottom: 28px; }
.section-head p { margin: 0; color: var(--muted); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 1.6vw, 24px); }
.card { display: block; text-decoration: none; }
.card-img { display: block; overflow: hidden; background: var(--soft); border-radius: 4px; }
.card img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.card:hover img { transform: scale(1.05); }
.card-meta { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.card-num { font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.card-title { font-size: clamp(18px, 1.6vw, 22px); font-weight: 400; flex: 1; }
.card-count { color: var(--muted); font-size: 13px; }
.card:hover .card-title { text-decoration: underline; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }

/* ---------- home: sobre mí, clientes, contacto */
.about { padding-block: clamp(56px, 8vw, 120px); border-top: 1px solid var(--line); }
.statement { font-size: clamp(26px, 3.6vw, 52px); line-height: 1.15; letter-spacing: -.02em; max-width: 1200px; margin: 0 0 clamp(36px, 5vw, 64px); text-wrap: pretty; }
.stats { list-style: none; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stats li { border-top: 1px solid var(--ink); padding-top: 14px; }
.stats strong { display: block; font-size: clamp(28px, 3vw, 44px); font-weight: 400; letter-spacing: -.02em; line-height: 1.1; }
.stats span { color: var(--muted); font-size: 15px; }
@media (max-width: 700px) { .stats { grid-template-columns: 1fr; } }
.clients { background: var(--dark); color: #fff; padding-block: 48px; overflow: hidden; }
.clients .section-title { color: rgba(255,255,255,.55); margin-bottom: 26px; }
.ticker { display: flex; width: max-content; animation: ticker 70s linear infinite; }
.ticker:hover { animation-play-state: paused; }
.ticker ul { list-style: none; margin: 0; padding: 0; display: flex; }
.ticker li { font-size: clamp(22px, 2.6vw, 36px); letter-spacing: -.01em; white-space: nowrap; padding-right: 1.2em; }
.ticker li::after { content: '·'; padding-left: 1.2em; color: rgba(255,255,255,.35); }
@keyframes ticker { to { transform: translateX(-50%); } }
.cta { background: var(--dark); color: #fff; max-width: none; padding-block: clamp(56px, 8vw, 120px); border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta p { margin: 0; font-size: clamp(28px, 4.4vw, 64px); letter-spacing: -.03em; line-height: 1.05; max-width: 900px; }

/* ---------- category */
.page-head { padding-top: clamp(40px, 7vw, 110px); padding-bottom: clamp(20px, 3vw, 36px); }
.eyebrow { margin: 0 0 14px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.lead { font-size: 19px; color: var(--muted); max-width: 680px; }
.series-nav {
  position: sticky; top: var(--head); z-index: 10;
  background: rgba(247, 246, 243, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-block: 1px solid var(--line);
}
.series-nav ul {
  list-style: none; margin: 0 auto; padding: 12px var(--pad); max-width: 1680px;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.series-nav ul::-webkit-scrollbar { display: none; }
.series-nav a {
  display: inline-block; white-space: nowrap; text-decoration: none; font-size: 14px; padding: 5px 14px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--muted); transition: all .2s;
}
.series-nav a:hover, .series-nav a.is-current { border-color: var(--ink); color: var(--paper); background: var(--ink); }
.gallery { padding-bottom: clamp(64px, 8vw, 120px); }
.series { margin-top: clamp(40px, 5vw, 72px); }
.series-title { display: flex; align-items: baseline; gap: 12px; font-size: clamp(20px, 2vw, 28px); letter-spacing: -.01em; margin-bottom: 18px; }
.series-title span { font-size: 13px; color: var(--muted); letter-spacing: .08em; }
/* galería justificada: cada foto crece según su proporción */
.grid { display: flex; flex-wrap: wrap; gap: var(--gap); }
.grid::after { content: ''; flex-grow: 999; }
.ph { flex: var(--r) 1 calc(var(--r) * var(--row)); display: block; background: var(--soft); cursor: zoom-in; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .3s; }
.ph:hover img { transform: scale(1.03); }
.next-cat { position: relative; display: block; height: clamp(260px, 42vw, 560px); overflow: hidden; color: #fff; text-decoration: none; background: var(--dark); }
.next-cat img { width: 100%; height: 100%; object-fit: cover; opacity: .55; transition: transform 1.2s var(--ease), opacity .4s; }
.next-cat:hover img { transform: scale(1.04); opacity: .7; }
.next-cat .wrap { position: absolute; left: 0; right: 0; bottom: clamp(24px, 4vw, 56px); font-size: clamp(40px, 8vw, 120px); letter-spacing: -.04em; line-height: 1; }
.next-cat small { display: block; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 12px; opacity: .8; }

/* ---------- lightbox */
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(10, 10, 10, .97); display: flex; align-items: center; justify-content: center; animation: fade .25s ease; }
.lb[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; max-width: 100%; }
.lb-img { max-width: 90vw; max-height: calc(100vh - 120px); max-height: calc(100svh - 120px); width: auto; height: auto; object-fit: contain; user-select: none; }
.lb-cap { color: #cfcfcf; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin-top: 16px; text-align: center; padding-inline: 16px; }
.lb-btn, .lb-close {
  position: absolute; background: none; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: #fff; cursor: pointer;
  width: 52px; height: 52px; font: 300 26px/1 'Jost', sans-serif; display: grid; place-items: center; transition: background .2s, border-color .2s;
}
.lb-btn:hover, .lb-close:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-close { top: 18px; right: 20px; }
.lb-count { position: absolute; top: 34px; left: 24px; color: #9a9a9a; font-size: 13px; letter-spacing: .1em; }
@media (max-width: 700px) {
  .lb-btn { top: auto; bottom: 18px; transform: none; width: 46px; height: 46px; }
  .lb-img { max-width: 100vw; max-height: calc(100svh - 170px); }
}

/* ---------- videos */
.videos { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 40px 20px; }
.video { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: 4px; background: #000; cursor: pointer; aspect-ratio: 16 / 9; overflow: hidden; }
.video img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .3s; }
.video:hover img { transform: scale(1.04); opacity: .85; }
.play { position: absolute; left: 50%; top: 50%; width: 68px; height: 68px; margin: -34px 0 0 -34px; border-radius: 50%; background: rgba(255,255,255,.18); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.6); transition: transform .3s var(--ease); }
.video:hover .play { transform: scale(1.1); }
.play::after { content: ''; position: absolute; left: 27px; top: 22px; border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-title { margin: 12px 0 0; font-size: 17px; }
.note { color: var(--muted); font-size: 14px; margin: 48px 0 96px; }

/* ---------- bio / contact / legal */
.bio { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 6vw, 110px); padding-block: clamp(40px, 6vw, 96px) 96px; }
.bio-photo { margin: 0; position: sticky; top: calc(var(--head) + 24px); align-self: start; }
.bio-photo img { border-radius: 4px; }
.bio-photo figcaption { color: var(--muted); font-size: 13px; margin-top: 8px; }
.bio-text { max-width: 720px; }
.bio-text h1 { font-size: clamp(40px, 6vw, 84px); letter-spacing: -.04em; line-height: .95; margin-bottom: .5em; }
.bio-text > p:first-of-type { font-size: 22px; line-height: 1.45; }
.bio-text h2 { margin-top: 2.4em; padding-top: 14px; border-top: 1px solid var(--ink); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.bio-text .list { padding-left: 0; list-style: none; }
.bio-text .list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
@media (max-width: 800px) { .bio { grid-template-columns: 1fr; } .bio-photo { position: static; } }
.contact, .prose { padding-block: clamp(40px, 7vw, 110px) 96px; max-width: 1100px; margin-inline: 0; }
.contact h1 { font-size: clamp(48px, 9vw, 140px); letter-spacing: -.045em; line-height: .9; }
.contact-list { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.contact-list li { display: flex; flex-wrap: wrap; gap: 4px 24px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-list span { width: 140px; color: var(--muted); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.contact-list a { font-size: clamp(20px, 2.8vw, 34px); letter-spacing: -.01em; text-decoration: none; overflow-wrap: anywhere; transition: padding .3s var(--ease); }
.contact-list a:hover { padding-left: 10px; }
.prose { max-width: 780px; }
.prose h2 { margin-top: 1.8em; }
.notfound { min-height: 50vh; }

/* ---------- footer */
.site-footer {
  background: var(--dark); color: #fff;
  padding: 40px var(--pad);
  display: flex; flex-wrap: wrap; gap: 14px 48px; justify-content: space-between; font-size: 15px;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.foot-contact, .foot-social { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.foot-legal { color: rgba(255,255,255,.5); width: 100%; font-size: 13px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); }
.cta + .site-footer, .home .site-footer { border-top: 1px solid rgba(255,255,255,.12); }

/* aparición suave al hacer scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slide, .slide img, .reveal { transition: none; transform: none; }
  .reveal { opacity: 1; }
  .ticker, .scroll-cue { animation: none; }
}
.slide picture { display: contents; }
