/* Rocarou — site styles.
   Gallery-page language after White Cube, with the Artidocs palette and
   type: images carry the page, type is light and quiet, monochrome only,
   hairline rules instead of boxes, text links with an arrow instead of
   buttons. One family (Host Grotesk): light for names, italic for titles. */

:root {
  --ink: #111111;
  --ink-soft: #3a3936;
  --muted: #6f6c69;
  --hair: #e6e5e2;
  --paper: #ffffff;
  --panel: #f4f4f2;
  --panel-deep: #e2e2df;

  --sans: 'Host Grotesk', 'Helvetica Neue', Arial, sans-serif;

  --max: 1420px;
  --gutter: clamp(20px, 5.5vw, 96px);
  --section-y: clamp(80px, 10vw, 168px);
  --row-gap: clamp(72px, 8vw, 150px);
  --col-gap: clamp(28px, 4.6vw, 90px);

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 14px/1.6 var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

p,
h1,
h2,
h3,
figure,
blockquote {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 4px;
}

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

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

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

.section + .section {
  padding-top: 0;
}

.rule {
  border: 0;
  border-top: 1px solid var(--hair);
  margin: 0;
}

/* ── Type ─────────────────────────────────────────────────────────────── */

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.name {
  font-size: 22px;
  font-weight: 300;
  line-height: 1.18;
  letter-spacing: -0.005em;
}

.name--md {
  font-size: clamp(24px, 2.2vw, 30px);
}

.name--lg {
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.12;
}

.name--xl {
  font-size: clamp(42px, 5.6vw, 84px);
  line-height: 1.04;
  letter-spacing: -0.012em;
}

.title {
  font-size: 16px;
  font-style: italic;
  font-weight: 300;
  line-height: 1.3;
}

.title--lg {
  font-size: clamp(19px, 1.8vw, 24px);
}

.meta {
  font-size: 13px;
  line-height: 1.55;
}

.meta strong {
  font-weight: 500;
}

.muted {
  color: var(--muted);
}

.body {
  font-size: 14px;
  line-height: 1.7;
  max-width: 34em;
}

.body p + p {
  margin-top: 1em;
}

.small {
  font-size: 12px;
  line-height: 1.55;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.link-arrow::before {
  content: "";
  flex: none;
  width: 14px;
  height: 10px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M0 5h12.5M8.5 1l4 4-4 4' fill='none' stroke='black' stroke-width='1.1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 10'%3E%3Cpath d='M0 5h12.5M8.5 1l4 4-4 4' fill='none' stroke='black' stroke-width='1.1'/%3E%3C/svg%3E") center / contain no-repeat;
  /* Flex centring lines the arrow up with the capitals; labels are mostly
     lowercase, so drop it to the middle of the x-height instead. */
  position: relative;
  top: 0.1em;
  transition: transform 0.25s ease;
}

.link-arrow:hover::before {
  transform: translateX(4px);
}

.link-underline {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* ── Header ───────────────────────────────────────────────────────────── */

.site-header {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 30px var(--gutter);
  border-bottom: 1px solid var(--hair);
  background: var(--paper);
}

.site-header--overlay {
  position: absolute;
  inset: 0 0 auto;
  background: transparent;
  border-bottom: 0;
  color: #fff;
}

.site-nav {
  display: flex;
  gap: clamp(24px, 3.2vw, 52px);
  font-size: 13px;
}

.site-nav--right {
  justify-content: flex-end;
}

.site-nav a {
  padding-block: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-bottom-color: currentColor;
}

.wordmark {
  font-size: 18px;
  font-weight: 300;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  white-space: nowrap;
  /* tracking adds space after the last letter; pull it back to stay centred */
  margin-right: -0.5em;
}

.menu-toggle {
  display: none;
  font-size: 13px;
  justify-self: start;
}

.menu {
  display: none;
}

@media (max-width: 860px) {
  .site-header {
    padding-block: 22px;
  }

  .site-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
  }

  .wordmark {
    font-size: 15px;
    letter-spacing: 0.42em;
    margin-right: -0.42em;
  }

  .menu {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    padding: 22px var(--gutter) 40px;
    background: var(--paper);
    color: var(--ink);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
  }

  .menu-open .menu {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.25s ease;
  }

  .menu__close {
    align-self: flex-start;
    font-size: 13px;
  }

  .menu__links {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 56px;
  }

  .menu__links a {
    font-size: 34px;
    font-weight: 300;
    line-height: 1.15;
  }

  .menu__foot {
    margin-top: auto;
  }
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: #2b3a3c;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgb(0 0 0 / 0.32), rgb(0 0 0 / 0) 26%),
    radial-gradient(ellipse 60% 45% at 50% 52%, rgb(0 0 0 / 0.26), rgb(0 0 0 / 0) 72%);
  pointer-events: none;
}

/* Bright, busy photos (the La Roca facade) need a deeper scrim. */
.hero--archive::after {
  background:
    linear-gradient(to bottom, rgb(0 0 0 / 0.45), rgb(0 0 0 / 0) 30%),
    radial-gradient(ellipse 60% 46% at 50% 52%, rgb(0 0 0 / 0.5), rgb(0 0 0 / 0) 76%),
    rgb(0 0 0 / 0.14);
}

.hero--archive .hero__content {
  text-shadow: 0 1px 28px rgb(0 0 0 / 0.3);
}

.hero__content {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 120px var(--gutter) 80px;
  max-width: 980px;
}

.hero__content .title {
  font-size: clamp(22px, 2.5vw, 36px);
  line-height: 1.2;
}

.hero__content .meta {
  margin-top: 14px;
  font-size: 15px;
}

.hero__content .link-arrow {
  margin-top: 22px;
}

/* Full-bleed band further down a page, e.g. upcoming events. */
.hero--band {
  height: 88vh;
  height: 88svh;
  min-height: 520px;
}

.hero__content .eyebrow {
  margin-bottom: 8px;
}

.hero__credit {
  position: absolute;
  z-index: 1;
  left: var(--gutter);
  bottom: 26px;
  font-size: 11px;
  opacity: 0.85;
}

/* ── Section heads ────────────────────────────────────────────────────── */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(36px, 4vw, 60px);
}

/* ── Exhibition cards ─────────────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--col-gap);
  row-gap: var(--row-gap);
}

.cards + .feature,
.feature + .cards,
.feature + .feature {
  margin-top: var(--row-gap);
}

.card__media,
.feature__media {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--panel);
}

.card__media img,
.feature__media img,
.studio__media img,
.work__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

a.card__media:hover img,
a.feature__media:hover img,
button.card__media:hover img,
button.feature__media:hover img {
  transform: scale(1.025);
}

button.card__media,
button.feature__media {
  width: 100%;
  padding: 0;
}

.card .eyebrow {
  margin-top: 30px;
}

.card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-top: 16px;
}

.card__head .meta {
  flex: none;
  max-width: 48%;
  text-align: right;
}

.card .title {
  margin-top: 2px;
}

.card .small {
  margin-top: 10px;
  max-width: 36em;
}

.card .link-arrow {
  margin-top: 26px;
}

/* Events whose photos are not available: text only, under a hairline. */
.card--text {
  padding-top: 26px;
  border-top: 1px solid var(--hair);
}

.card--text .eyebrow {
  margin-top: 0;
}

/* ── Feature row: big image + text column ─────────────────────────────── */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  column-gap: var(--col-gap);
  align-items: start;
}

.feature--reverse {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
}

.feature--reverse .feature__media {
  order: 2;
}

.feature__text .name {
  margin-top: 16px;
}

.feature__text .title {
  margin-top: 4px;
}

.feature__text .small {
  margin-top: 14px;
  max-width: 30em;
}

.feature__text .meta {
  margin-top: 26px;
}

.feature__text .body {
  margin-top: 26px;
}

.feature__text .link-arrow {
  margin-top: 30px;
}

/* ── In the studio: text column + large image ─────────────────────────── */

.studio {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr);
  column-gap: var(--col-gap);
}

.studio__text {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
}

.studio__text .name {
  margin-top: 16px;
}

.studio__text .body + .body {
  margin-top: 22px;
}

.studio__text .link-arrow {
  margin-top: 30px;
}

.studio__media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--panel);
}

/* ── Book panel ───────────────────────────────────────────────────────── */

.book {
  display: grid;
  grid-template-columns: minmax(0, 61fr) minmax(0, 39fr);
  min-height: min(40vw, 820px);
}

/* media/obra/panel-libro.jpg has the studio backdrop extended sideways, so it
   can cover the panel at any width without cropping the books. */
.book__media {
  position: relative;
  background: #d3d3cf;
  overflow: hidden;
}

.book__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book__text {
  background: var(--panel);
  padding: clamp(40px, 5.2vw, 96px) clamp(28px, 5vw, 92px);
}

.book__text .name {
  margin-top: 16px;
  max-width: 13em;
}

.book__text .meta {
  margin-top: 26px;
}

.book__text .body {
  margin-top: 26px;
}

.book__text .link-arrow {
  margin-top: 30px;
}

/* ── Works grid ───────────────────────────────────────────────────────── */

.works {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 2.8vw, 40px);
}

.work__media {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--panel);
}

.work figcaption {
  margin-top: 22px;
}

.work .title {
  font-size: 15px;
}

.work .meta + .meta {
  margin-top: 8px;
}

/* ── Index list (texts, events) ───────────────────────────────────────── */

.list {
  border-top: 1px solid var(--hair);
}

.list__item {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 30px 0 32px;
  border-bottom: 1px solid var(--hair);
}

.list__item .title {
  margin-top: 2px;
}

.list__item .link-arrow {
  justify-self: end;
}

/* ── Long-form text ───────────────────────────────────────────────────── */

.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr);
  column-gap: var(--col-gap);
  align-items: start;
}

.story__aside {
  position: sticky;
  top: 40px;
}

.story__aside .name {
  margin-top: 16px;
}

.story__aside figure {
  margin-top: 40px;
}

.story__aside figcaption {
  margin-top: 12px;
}

.prose {
  font-size: 16px;
  line-height: 1.75;
  max-width: 38em;
}

.prose p + p {
  margin-top: 1.15em;
}

.prose .signature {
  margin-top: 2em;
  font-style: italic;
  font-weight: 300;
  font-size: 19px;
}

.text-head .name {
  margin-top: 16px;
}

.text-head .title {
  margin-top: 6px;
}

/* One essay per block on /textos, separated by hairlines. */
.article {
  padding-bottom: var(--section-y);
}

.article .wrap {
  padding-top: clamp(48px, 6vw, 96px);
  border-top: 1px solid var(--hair);
}

/* ── Contact ──────────────────────────────────────────────────────────── */

.contact {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px var(--col-gap);
  padding-top: 40px;
  border-top: 1px solid var(--hair);
}

.contact .name {
  margin-top: 14px;
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--hair);
  padding-block: clamp(56px, 6vw, 96px) 36px;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 40px var(--col-gap);
}

.footer__logo {
  display: inline-block;
  vertical-align: top;
}

.footer__logo img {
  height: auto;
}

.footer__tag {
  margin-top: 14px;
}

.footer__grid ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.footer__grid a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer__base {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(56px, 6vw, 96px);
  font-size: 12px;
  color: var(--muted);
}

/* ── Page intro (pages without a hero) ───────────────────────────────── */

.intro {
  padding-block: clamp(72px, 9vw, 150px) clamp(48px, 6vw, 96px);
  text-align: center;
}

.intro .name {
  margin-top: 22px;
}

.intro .body {
  margin: 28px auto 0;
  color: var(--ink-soft);
}

.lede {
  max-width: 44em;
  margin-inline: auto;
  text-align: center;
  font-size: clamp(17px, 1.6vw, 21px);
  font-weight: 300;
  line-height: 1.55;
}

.figure-wide {
  margin-top: clamp(56px, 7vw, 112px);
}

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

.figure-wide figcaption {
  margin-top: 12px;
}

.lede + .link-arrow,
.lede-link {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

/* ── Gallery viewer ───────────────────────────────────────────────────── */

.viewer {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
}

.viewer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.viewer::backdrop {
  background: var(--paper);
}

.viewer__bar,
.viewer__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px var(--gutter);
}

.viewer__bar .eyebrow {
  flex: 1;
}

.viewer__stage {
  position: relative;
  min-height: 0;
  margin: 0 var(--gutter);
}

.viewer__stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  cursor: pointer;
}

.viewer__nav button,
.viewer__bar button {
  font-size: 13px;
  font-weight: 500;
}

.viewer__nav button:disabled {
  opacity: 0.3;
  cursor: default;
}

html.viewer-open {
  overflow: hidden;
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .feature,
  .feature--reverse,
  .studio {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 30px;
  }

  .feature--reverse .feature__media {
    order: 0;
  }

  .studio__media {
    order: -1;
  }

  .book {
    grid-template-columns: minmax(0, 1fr);
  }

  .book__media {
    aspect-ratio: 4 / 3;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .cards,
  .works,
  .contact,
  .footer__grid,
  .story {
    grid-template-columns: minmax(0, 1fr);
  }

  .story__aside {
    position: static;
  }

  .story .prose {
    margin-top: 48px;
  }

  .card__head {
    flex-direction: column;
    gap: 14px;
  }

  .card__head .meta {
    max-width: none;
    text-align: left;
  }

  .list__item {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .list__item .link-arrow {
    justify-self: start;
    margin-top: 8px;
  }

  .section-head {
    flex-direction: column;
    gap: 14px;
  }

  .footer__base {
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
