:root {
  color-scheme: dark;
  --ink: #171716;
  --raised: #20201e;
  --line: #41413b;
  --paper: #f4f2eb;
  --muted: #bcbab0;
  --accent: #e8df9f;
  --content: 82rem;
  --gutter: clamp(1.2rem, 5vw, 5rem);
  --heading: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--ink);
  color: var(--paper);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.wrap { width: min(100%, var(--content)); padding-inline: var(--gutter); margin-inline: auto; }
.section { padding-block: clamp(4rem, 8vw, 7.4rem); }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 5;
  top: .5rem;
  left: .5rem;
  padding: .7rem 1rem;
  color: var(--ink);
  background: var(--accent);
}

.site-header { border-bottom: 1px solid #ffffff1c; }
.header-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  width: min(100%, 100rem);
  min-height: 5rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand { display: inline-flex; min-width: 5.25rem; }
.brand img { width: clamp(6rem, 11vw, 9.4rem); height: auto; mix-blend-mode: screen; }
nav { display: flex; align-items: center; gap: clamp(.9rem, 3.1vw, 3rem); font-size: .94rem; }
nav a { color: var(--muted); }
nav a:hover, .site-footer a:hover { color: var(--paper); }
nav .nav-contact { color: var(--paper); }

.hero {
  position: relative;
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(33rem, 68svh, 50rem);
  background: #251e18;
}
.hero-image, .hero::after { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; }
.hero-image { object-fit: cover; object-position: 60% 45%; }
.hero::after {
  content: '';
  background:
    linear-gradient(90deg, #10100eed 0%, #10100ecd 21%, #10100e78 48%, #10100e1f 82%),
    linear-gradient(0deg, #151411bb 0%, transparent 30%);
}
.hero-wrap { padding-block: 4.5rem 5.5rem; }
.hero-copy { max-width: 43rem; }
.eyebrow { font-weight: 620; font-size: .81rem; letter-spacing: .11em; line-height: 1.5; text-transform: uppercase; }
.hero .eyebrow { color: var(--accent); margin-bottom: 1.5rem; }
.hero h1, .detail-heading h1, .missing h1 {
  font: 700 clamp(4rem, 10vw, 8.65rem)/.86 var(--heading);
  letter-spacing: -.084em;
}
.hero h1 { font-size: clamp(3.05rem, 8.6vw, 7.3rem); }
.hero h1 span, .detail-heading h1 span { color: var(--accent); }
.hero-lede { max-width: 30rem; font-size: clamp(1.04rem, 2vw, 1.4rem); line-height: 1.5; margin: 1.6rem 0 1.8rem; }
.hero-credit {
  position: absolute;
  right: var(--gutter);
  bottom: 1.35rem;
  font-size: .84rem;
  color: #f5eee5;
  text-underline-offset: .27em;
}
.hero-credit:hover { text-decoration: underline; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .85rem 1.18rem;
  min-height: 2.95rem;
  text-align: center;
  font-size: .93rem;
  font-weight: 680;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s;
}
.button-primary { color: var(--ink); background: var(--accent); }
.button-primary:hover { background: var(--paper); }
.button-outlined { border-color: var(--line); }
.button-outlined:hover { border-color: var(--accent); color: var(--accent); }
.button-dark { background: var(--ink); color: var(--paper); }
.button-dark:hover { background: #35352c; }

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 1.45rem;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}
.section h2 {
  font: 690 clamp(2.55rem, 6vw, 5.5rem)/.95 var(--heading);
  letter-spacing: -.068em;
}
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filters button {
  background: transparent;
  border: 1px solid var(--line);
  padding: .5rem .73rem;
  min-height: 2.6rem;
  font-size: .86rem;
  cursor: pointer;
  transition: color .18s, background-color .18s, border-color .18s;
}
.filters button:hover { border-color: var(--paper); }
.filters button[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.4rem 1.5rem; }
.project-link { display: block; }
.project-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--raised);
}
.project-image img, .sector-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}
.project-image--los-reyes-de-la-calle img { object-position: 50% 42%; }
.project-image--medina-aljarafe img { object-position: 50% 66%; }
.project-image--cadeba img { object-position: 50% 34%; }
.project-image--vaskia-championships img { object-position: 50% 29%; }
.project-image--im-french img { object-position: 50% 37%; }
.project-image--experiencias-de-marca img { object-position: 50% 52%; }
.project-link:hover img { transform: scale(1.045); }
.project-open {
  position: absolute;
  bottom: .75rem;
  right: .75rem;
  display: grid;
  place-items: center;
  width: 2.45rem;
  height: 2.45rem;
  font-weight: 340;
  font-size: 1.56rem;
  line-height: 1;
  background: var(--ink);
  color: var(--paper);
}
.project-link:hover .project-open { color: var(--ink); background: var(--accent); }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding-block: .95rem .75rem; border-bottom: 1px solid var(--line); }
.card-meta h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); line-height: 1.12; letter-spacing: -.042em; }
.card-meta p { margin-top: .35rem; color: var(--muted); font-size: .91rem; }
.card-meta > span { font-size: .82rem; color: var(--accent); }

.services { background: var(--raised); }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.3rem, 3.4vw, 2.8rem); }
.service .sector-image { height: auto; aspect-ratio: 16 / 9; margin-bottom: 1.15rem; }
.sector-image--hospitality { object-position: 50% 68%; }
.sector-image--deporte { object-position: 50% 35%; }
.service h3 { font: 660 clamp(1.5rem, 2.5vw, 2rem)/1.1 var(--heading); letter-spacing: -.042em; }
.service p, .studio > p, .detail-info p { color: var(--muted); font-size: 1.02rem; line-height: 1.7; }
.service p { margin: .75rem 0 1rem; }
.text-link { display: inline-block; width: fit-content; padding-block: .25rem; font-size: .92rem; color: var(--accent); text-decoration: underline; text-underline-offset: .27em; }
.text-link:hover { color: var(--paper); }

.studio, .contact-wrap { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: clamp(1.65rem, 7vw, 6rem); }
.studio { min-height: 18.5rem; }
.studio .eyebrow { color: var(--muted); margin-bottom: .85rem; }
.studio > p { max-width: 37rem; font-size: clamp(1.13rem, 2vw, 1.4rem); }
.contact { color: var(--ink); background: var(--accent); }
.contact-wrap { align-items: start; }
.contact-copy > p { margin-top: 1rem; max-width: 28rem; line-height: 1.5; }
.contact-links { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.2rem; margin-top: 1.5rem; }
.button-contact-secondary { border-color: var(--ink); }
.button-contact-secondary:hover { background: var(--ink); color: var(--paper); }
.contact-email { font-size: .95rem; text-decoration: underline; text-underline-offset: .23em; }
.contact-form {
  display: grid;
  align-content: start;
  gap: 1rem;
  min-width: 0;
  padding: clamp(1.2rem, 3vw, 2rem);
  background: var(--paper);
  border: 1px solid #4d4c3f38;
  color-scheme: light;
}
.contact-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form label { display: grid; gap: .4rem; min-width: 0; font-size: .92rem; font-weight: 640; }
.contact-form input, .contact-form textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: .6rem .75rem;
  border: 1px solid #777467;
  border-radius: 0;
  background: #fffefa;
  color: var(--ink);
  font: 400 1rem/1.45 system-ui, sans-serif;
}
.contact-form textarea { resize: vertical; }
.contact-form button { justify-self: start; cursor: pointer; }
.contact-form > p { font-size: .87rem; line-height: 1.45; color: #484639; }
.contact :focus-visible { outline-color: var(--ink); outline-offset: 3px; }
.site-footer { border-top: 1px solid var(--line); }
.footer-wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding-block: 2rem; font-size: .89rem; color: var(--muted); }
.footer-wrap .brand img { width: 7.05rem; }

.detail { padding-block: clamp(2rem, 5vw, 4.6rem) clamp(3.5rem, 7vw, 6rem); }
.back-link { margin-bottom: 2.2rem; }
.detail-heading .eyebrow { color: var(--muted); margin-bottom: .8rem; }
.detail-heading h1 { font-size: clamp(2.8rem, 9.6vw, 7.4rem); line-height: .94; }
.detail-grid { display: grid; grid-template-columns: 1.83fr 1fr; align-items: start; gap: clamp(1.6rem, 5vw, 4.5rem); margin-top: clamp(2rem, 5vw, 3.4rem); }
.detail-visual { position: relative; display: grid; background: var(--raised); overflow: hidden; }
.detail-visual img, .detail-visual iframe { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; border: 0; }
.aspect--16-9 { aspect-ratio: 16 / 9; }
.aspect--9-16 { aspect-ratio: 9 / 16; width: min(100%, 24rem); }
.aspect--4-3 { aspect-ratio: 4 / 3; }
.aspect--4-5 { aspect-ratio: 4 / 5; width: min(100%, 32rem); }
.detail-info { display: grid; justify-items: start; gap: .85rem; }
.detail-info h2 { font: 680 clamp(1.5rem, 3vw, 2.15rem)/1.15 var(--heading); letter-spacing: -.045em; }
.detail-info p { margin-bottom: .55rem; }
.video-trigger {
  grid-area: 1 / 1;
  align-self: center;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  border: 0;
  background: var(--accent);
  color: var(--ink);
  padding: .75rem 1rem;
  min-height: 2.8rem;
  font-weight: 680;
  cursor: pointer;
}
.play-icon { border-block: .43rem solid transparent; border-left: .64rem solid currentColor; }
.detail-visual noscript { position: absolute; bottom: .6rem; left: .6rem; background: var(--ink); padding: .45rem .65rem; }
.next-project { display: grid; gap: .6rem; border-top: 1px solid var(--line); padding-top: 1.75rem; margin-top: 3.25rem; }
.next-project > span { color: var(--muted); }
.next-project > a:not(.text-link) { font: 680 clamp(1.85rem, 4vw, 3rem)/1.1 var(--heading); letter-spacing: -.055em; width: fit-content; }
.next-project > a:hover { color: var(--accent); }
.missing h1 { font-size: clamp(2rem, 7vw, 5.5rem); margin-bottom: 1.8rem; }

@media (max-width: 66rem) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 47rem) {
  .hero { min-height: 34rem; }
  .hero-image { object-position: 62% 43%; }
  .hero::after { background: linear-gradient(90deg, #10100edf 0%, #10100e84 50%, #10100e52 100%), linear-gradient(0deg, #151411bb, transparent 42%); }
  .service-grid { gap: 2.45rem 1.5rem; }
  .service .sector-image { aspect-ratio: 2 / 1; }
  .studio, .contact-wrap, .detail-grid { grid-template-columns: 1fr; }
  .detail-visual.aspect--9-16 { width: min(100%, 23rem); }
}

@media (max-width: 34rem) {
  .header-wrap { min-height: 4.15rem; gap: .6rem; }
  nav { font-size: .82rem; gap: .8rem; }
  .studio-nav { display: none; }
  .hero-wrap { padding-bottom: 4rem; }
  .hero { min-height: 31rem; }
  .hero h1 { font-size: clamp(2.85rem, 11.4vw, 4.25rem); }
  .hero .eyebrow { letter-spacing: .09em; font-size: .75rem; }
  .project-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .service-grid, .contact-fields { grid-template-columns: 1fr; }
  .footer-wrap { flex-wrap: wrap; font-size: .82rem; gap: .85rem; }
  .footer-wrap .brand img { width: 5.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
