/* ── Reset ──────────────────────────────────────────────── */

* {
  margin: 0;
  padding: 0;
}

/* ── Custom properties ──────────────────────────────────── */

:root {
  /* Colors */
  --color-primary: #000;
  --color-secondary: #fff;
  --color-muted: #777;
  --color-surface: #efefef;
  --color-accent: #B5A899;
  --color-text: var(--color-primary);
  --color-text-muted: var(--color-muted);
  --color-background: var(--color-secondary);
  --color-code-bg: var(--color-primary);
  --color-code-text: var(--color-secondary);
  --color-code-light-grey: #cacbd1;
  --color-code-comment: #a9aaad;
  --color-code-white: #c5c9c6;
  --color-code-red: #d16464;
  --color-code-orange: #de935f;
  --color-code-yellow: #E5E8A1;
  --color-code-green: #a7bd68;
  --color-code-aqua: #8abeb7;
  --color-code-blue: #7e9abf;
  --color-code-purple: #b294bb;

  /* Typography */
  --font-family-primary: "swiss-721-bt", Helvetica Neue, "Swiss 721", serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-family-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  --font-size-base: 1rem;
  --font-size-sm: 0.75rem;
  --font-size-md: 0.875rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 2rem;
  --font-size-xxl: 4.54rem;
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 600;
  --font-weight-bold: 800;
  --font-weight-black: 900;
  --line-height-base: 1.5;
  --line-height-tight: 1.25;
  --line-height-loose: 1.6;

  /* Spacing */
  --space-xxs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 3rem;
  --space-2xl: 4.5rem;
  --space-xxl: 6rem;

  /* Border radius */
  --border-radius-sm: 2px;
  --border-radius-md: 4px;
  --border-radius-lg: 8px;

  /* Layout */
  --padding-base: var(--space-md);
  --gutter-base: var(--space-xl);
  --min-width-base: 10rem;
}

/* ── Base elements ──────────────────────────────────────── */

html {
  font-family: var(--font-family-primary);
  -webkit-font-smoothing: subpixel-antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--color-text);
  cursor: crosshair;
  background: var(--color-background);
}

main {
  min-height: 80vh;
  padding: 0 var(--padding-base) var(--padding-base);
  margin: 0 auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

li {
  list-style: none;
}

img {
  max-width: 100%;
}

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

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

button.active {
  text-decoration: underline;
  opacity: 0.8;
}

strong,
b {
  font-weight: var(--font-weight-normal);
  color: var(--color-accent);
}

h2 strong,
h2 b {
  font-weight: normal;
  color: var(--color-accent);
}

small {
  font-size: inherit;
  color: var(--color-text-muted);
}

hr {
  border: 0;
  background: currentColor;
  height: 2px;
  width: var(--space-lg);
  margin: var(--space-xl) auto;
}

table {
  text-align: left;
}

td {
  padding: 2vh;
  font-family: var(--font-family-primary);
  vertical-align: middle;
}

tr {
  padding-left: 2vh;
}

/* ── Typography utilities ───────────────────────────────── */

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

.h1,
.intro {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-xl);
  line-height: var(--line-height-tight);
}

.h2 {
  font-size: var(--font-size-xxl);
  font-weight: var(--font-weight-light);
  margin-bottom: var(--space-lg);
  line-height: 1;
}

.h3 {
  font-size: var(--font-size-xl);
  line-height: 1.2;
}

.intro {
  max-width: 40rem;
}

.intro *:not(:last-child) {
  margin-bottom: var(--space-md);
}

.margin-xl {
  margin-bottom: var(--space-2xl);
}

/* ── Rich text (.text) ──────────────────────────────────── */

.text {
  line-height: var(--line-height-base);
}

.text a {
  text-decoration: underline;
}

.text :first-child {
  margin-top: 0;
}

.text :last-child {
  margin-bottom: 0;
}

.text p,
.text ul,
.text ol {
  margin-bottom: var(--space-lg);
}

.text ul,
.text ol {
  margin-left: var(--space-md);
}

.text ul p,
.text ol p {
  margin-bottom: 0;
}

.text ul>li {
  list-style: disc;
}

.text ol>li {
  list-style: decimal;
}

.text ul ol,
.text ul ul,
.text ol ul,
.text ol ol {
  margin-bottom: 0;
}

.text h1 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-xl);
  line-height: var(--line-height-tight);
}

.text h2 {
  font-size: var(--font-size-xxl);
  font-weight: var(--font-weight-light);
  margin-bottom: var(--space-lg);
  line-height: 1;
}

.text h3 {
  font-size: var(--font-size-xl);
  line-height: 1.2;
}

.text .codeblock {
  display: grid;
}

.text code {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-sm);
  background: var(--color-surface);
  padding: 0 var(--space-sm);
  display: inline-block;
  color: var(--color-primary);
}

.text pre {
  margin: var(--space-xl) 0;
  background: var(--color-primary);
  color: var(--color-secondary);
  padding: var(--space-lg);
  overflow-x: scroll;
  overflow-y: hidden;
  line-height: var(--line-height-base);
}

.text pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.text hr {
  margin: var(--space-xxl) 0;
}

.text dt {
  font-weight: var(--font-weight-medium);
}

.text blockquote {
  font-size: var(--font-size-md);
  line-height: 1.325em;
  border-left: 2px solid var(--color-primary);
  padding-left: var(--space-md);
  margin: var(--space-xl) 0;
  max-width: 25rem;
}

.text blockquote footer {
  font-size: var(--font-size-xl);
  font-style: italic;
}

.text figure {
  margin: var(--space-xl) 0;
}

.text figcaption {
  padding-top: var(--space-sm);
  color: var(--color-text-muted);
}

.text figure ul {
  line-height: 0;
  display: grid;
  gap: var(--space-lg);
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(var(--min-width-base), 1fr));
}

.text figure ul li {
  list-style: none;
}

/* ── Media blocks (img / video) ─────────────────────────── */

.video,
.img {
  position: relative;
  display: block;
  --w: 1;
  --h: 1;
  padding-bottom: calc(100% / var(--w) * var(--h));
}

.img img,
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.img[data-contain] img {
  object-fit: contain;
}

.img-caption,
.video-caption {
  padding-top: var(--space-sm);
  line-height: var(--line-height-base);
}

/* ── Layout helpers ─────────────────────────────────────── */

.grid {
  --columns: 12;
  --gutter: var(--gutter-base);
  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: 1fr;
}

.grid>.column {
  margin-bottom: var(--gutter);
}

.autogrid {
  --gutter: var(--gutter-base);
  --min: var(--min-width-base);
  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: repeat(auto-fit, minmax(var(--min), 1fr));
  grid-auto-flow: dense;
}

.column {
  float: left;
  padding: 0 var(--space-lg);
}

/* ── Cursor & crosshair ─────────────────────────────────── */

body:before {
  content: '';
  width: 1px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  background-color: var(--color-muted);
  opacity: 0.4;
  transform: translateX(var(--mouse-x));
  pointer-events: none;
}

body:after {
  content: '';
  width: 100vw;
  height: 1px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  background-color: var(--color-muted);
  opacity: 0.4;
  transform: translateY(var(--mouse-y));
  pointer-events: none;
}

.cursor {
  position: fixed;
  z-index: 9999;
  top: -2px;
  left: -2px;
  width: 4px;
  height: 4px;
  background-color: var(--color-code-yellow);
  pointer-events: none;
  transform: translate(var(--mouse-x), var(--mouse-y));
  will-change: transform;
  transition: width 0.12s ease, height 0.12s ease, top 0.12s ease, left 0.12s ease,
    border-radius 0.12s ease, background-color 0.12s ease;
}

.cursor--link {
  width: 22px;
  height: 22px;
  top: -11px;
  left: -11px;
  background-color: var(--color-code-yellow);
  border: 1.5px solid var(--color-code-yellow);
  border-radius: 50%;
  mix-blend-mode: multiply;
}

/* ── Site header ────────────────────────────────────────── */

.site-header {
  position: sticky;
  z-index: 3;
  top: 0;
  background: var(--color-background);
  padding: 0.15vw 0;
  margin-bottom: var(--space-lg);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

@media (min-width: 768px) {
  .site-header--hidden {
    opacity: 0;
    transform: translateY(-0.5rem);
    pointer-events: none;
  }
}

.header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 0;
  margin: var(--space-sm) var(--space-lg);
  position: relative;
}

.header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  transition: opacity 0.2s;
}

.header__logo-img {
  height: 2.5rem;
  width: auto;
  max-width: none;
  display: block;
}

.header__logo-text {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-black);
}

.header__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  /* el contenedor no bloquea clics al logo/vídeo */
}

.header__nav-link {
  pointer-events: auto;
  /* los links sí son clicables */
}

.header__nav-link {
  padding: var(--space-sm) var(--space-md);
  display: block;
  /* font-size: var(--font-size-lg);*/
  font-size: 1rem;
  font-weight: var(--font-weight-normal);
  color: var(--color-primary);
}

.header__nav-link[aria-current] {
  color: var(--color-accent);
}

.header__animation {
  margin-left: auto;
  /* empuja la animación al extremo derecho */
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 2.5rem;
  max-width: 20rem;
  overflow: hidden;
}

.header__anim-media {
  height: 100%;
  width: auto;
  max-width: none;
  display: block;
  object-fit: contain;
  filter: invert(1);
  mix-blend-mode: hard-light;
}

.header__burger {
  display: none;
  flex-shrink: 0;
  font-size: var(--font-size-xl);
  line-height: 1;
  padding: var(--space-xxs) var(--space-sm);
  cursor: pointer;
}

.header__mobile-menu {
  display: none;
  flex-direction: column;
  padding: var(--space-md);
  gap: var(--space-xxs);
  border-top: 1px solid var(--color-surface);
  background: var(--color-background);
}

.header__mobile-menu:not([hidden]) {
  display: flex;
}

.header__mobile-link {
  display: block;
  padding: var(--space-sm) var(--space-xs);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-light);
  border-bottom: 1px solid var(--color-surface);
}

.header__mobile-link:last-child {
  border-bottom: 0;
}

.header__mobile-link--social {
  color: var(--color-muted);
}

.header__mobile-link[aria-current] {
  color: var(--color-accent);
}

.header__overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2;
  background: rgba(0, 0, 0, 0.5);
}

body.menu-open .header__overlay {
  display: block;
}

body.menu-open {
  overflow: hidden;
}

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

.footer {
  padding: 0;
  margin: 0;
  line-height: var(--line-height-base);
}

.footer--dark {
  padding: var(--space-md);
  background-color: #222;
  color: var(--color-secondary);
}

.footer:before {
  content: "";
  display: block;
  width: var(--space-lg);
  height: 2px;
  margin-bottom: var(--space-lg);
}

.footer--dark .footer__brand,
.footer--dark .footer__info,
.footer--dark .footer__logos,
.footer--dark .footer__legal {
  padding-bottom: var(--space-md);
  /*border-bottom: 1px solid rgba(255, 255, 255, 0.12);*/
  margin-bottom: var(--space-md);
}

.footer--dark .footer__legal {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.footer__logo-wrap {
  width: 30%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.footer__logo {
  max-height: 8rem;
  width: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.footer__logo-text {
  font-size: var(--font-size-xxl);
  font-weight: var(--font-weight-black);
  line-height: 1;
}

.footer__panorama {
  width: 40%;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: var(--border-radius-sm);
}

.footer__panorama-media {
  width: 100%;
  object-fit: contain;
  display: block;
  mix-blend-mode: luminosity;
}

.footer__info {
  display: flex;
  align-items: baseline;
  gap: var(--space-xl);
}

.footer__tagline {
  flex: 1;
  color: #fff;
  max-width: 24rem;
  line-height: var(--line-height-base);
}

.footer__nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__nav-link {
  font-size: var(--font-size-md);
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.15s;
}

.footer__social-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__social-link {
  font-size: var(--font-size-md);
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.15s;
}

.footer__logos {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  flex-direction: row-reverse;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer__logos-item {
  display: flex;
  align-items: center;
}

.footer__logos-img {
  height: 2rem;
  width: auto;
  max-width: 8rem;
  object-fit: contain;
}

.footer__legal {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.45);
}

.footer__legal-link {
  color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.footer__coords {
  font-size: var(--font-size-md);
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.8;
  min-width: 7rem;
  margin-left: auto;
}

.footer__coords-label {
  display: inline-block;
  width: 1rem;
  color: rgba(255, 255, 255, 0.2);
}

/* ── Proyecto / Album ───────────────────────────────────── */

.proyecto-cover {
  margin-bottom: var(--space-md);
  line-height: 0;
}

.proyecto-cover img {
  width: 100%;
  display: block;
  max-height: 35vh;
  object-fit: cover;
  opacity: 0.8;
}

.proyecto-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-xl);
  align-items: start;
}

.proyecto-info {
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - var(--space-xxl));
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.proyecto-info::-webkit-scrollbar {
  display: none;
}

.proyecto-meta-grid {
  display: flex;
  gap: var(--space-xl);
  margin: var(--space-md) 0;
}

.proyecto-meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-xxs) var(--space-sm);
  align-content: start;
  flex: 1;
}

.proyecto-meta dt {
  color: var(--color-muted);
  white-space: nowrap;
}

.proyecto-info__text {
  margin-top: var(--space-lg);
  font-size: var(--font-size-md);
  line-height: var(--line-height-loose);
}

.proyecto-media {
  min-width: 0;
}

.proyecto-row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
}

.proyecto-col {
  min-width: 0;
}

.proyecto-col img,
.proyecto-col video,
.proyecto-col figure {
  width: 100%;
  height: auto;
  display: block;
}

.proyecto-col figure {
  margin: 0;
}

.proyecto-row.plano {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  gap: var(--space-xs);
}

.proyecto-row.plano::-webkit-scrollbar {
  display: none;
}

.proyecto-row.plano .proyecto-col {
  flex-shrink: 0;
}

.proyecto-row.plano img {
  height: 60vh;
  width: auto;
  max-width: none;
  display: block;
  pointer-events: none;
}

.plano-caption {
  font-size: var(--font-size-sm);
  color: var(--color-muted);
  padding: var(--space-xs) 0;
  min-height: 1.4em;
}

/* ── Prevnext ────────────────────────────────────────────── */

.proyecto-prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: var(--space-xxl);
}

.proyecto-prevnext__item {
  position: relative;
  overflow: hidden;
  padding: var(--space-xl) var(--space-lg);
  flex-direction: column;
  gap: 0.35rem;
  text-decoration: none;
  color: inherit;
  background-color: var(--color-code-yellow);
  margin: .5rem 0;
}

.proyecto-prevnext__item::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--cover-url, none);
  background-size: cover;
  background-position: center;
  opacity: 0.4;
  mix-blend-mode: luminosity;
  filter: brightness(1.7);
  transition: opacity 0.4s, mix-blend-mode 0.4s;
  z-index: 0;
}

.proyecto-prevnext__item>* {
  position: relative;
  z-index: 1;
}

.proyecto-prevnext__item--next {
  text-align: right;
  border-left: 1px solid var(--color-surface);
}

.proyecto-prevnext__label {
  font-size: var(--font-size-sm);
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.proyecto-prevnext__title {
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-tight);
}

.proyecto-prevnext__meta,
.proyecto-prevnext__num {
  font-weight: var(--font-weight-light);
}

/* ── About / Estudio ─────────────────────────────────────── */

.estudio-clientes {
  margin: var(--space-2xl) 0;
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-surface);
  border-bottom: 1px solid var(--color-surface);
}

.clientes-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-xxl) var(--space-xs);
  align-items: center;
  justify-items: center;
  list-style: none;
  margin: 0;
  padding: 0 7vw;
}

.clientes-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.clientes-logo {
  height: 4rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  mix-blend-mode: luminosity;
  opacity: 0.55;
  transition: opacity 0.2s, mix-blend-mode 0.2s;
}

.estudio-equipo {
  margin: var(--space-2xl) 0;
}

.equipo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.equipo-card {
  display: flex;
  flex-direction: column;
}

.equipo-card__cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  margin-bottom: var(--space-md);
  /*background: var(--color-surface);*/
}

.equipo-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.equipo-card__nombre {
  margin-bottom: 0.2rem;
}

.equipo-card__puesto {
  color: var(--color-muted);
  margin-bottom: var(--space-sm);
}

.equipo-card__bio {
  font-size: var(--font-size-sm);
  line-height: var(--line-height-loose);
  color: var(--color-muted);
}

/* ── Contacto ────────────────────────────────────────────── */

.contacto .text a {
  text-decoration: none;
}

.contacto-form__honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
  tab-size: 0;
}

.contacto-form {
  display: grid;
  justify-content: center;
  padding: var(--space-xl) 0 var(--space-xxl);
  border-bottom: 1px solid var(--color-surface);
  margin-bottom: var(--space-xs);
}

.contacto-form__ok {
  font-size: var(--font-size-base);
}

.contacto-form__error {
  font-size: var(--font-size-sm);
  color: #b00;
  margin-bottom: var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid #b00;
}

.contacto-form__form {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  width: 100%;
  max-width: 48rem;
}

.contacto-form__row--half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.contacto-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contacto-form__label {
  font-size: var(--font-size-sm);
  color: var(--color-muted);
  letter-spacing: 0.04em;
}

.contacto-form__input {
  font: inherit;
  font-size: var(--font-size-base);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-primary);
  padding: var(--space-xs) 0;
  outline: none;
  color: var(--color-text);
  width: 100%;
  transition: border-color 0.15s;
  border-radius: 0;
  -webkit-appearance: none;
}

.contacto-form__input:focus {
  border-bottom-color: var(--color-accent);
}

.contacto-form__textarea {
  resize: vertical;
  min-height: 8rem;
}

.contacto-form__footer {
  display: flex;
  align-items: baseline;
  gap: var(--space-lg);
  margin-top: var(--space-sm);
}

.contacto-form__btn {
  font: inherit;
  font-size: var(--font-size-base);
  background: var(--color-primary);
  color: var(--color-secondary);
  border: none;
  padding: var(--space-sm) var(--space-xl);
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: opacity 0.15s;
}

.contacto-form__legal {
  font-size: var(--font-size-sm);
  color: var(--color-muted);
}

.contacto-mapa {
  margin-top: var(--space-xxl);
  width: 100%;
  line-height: 0;
}

.contacto-mapa iframe {
  width: 100%;
  height: 420px;
  border: none;
  display: block;
}

/* ── Error page ──────────────────────────────────────────── */

.error-page {
  padding: var(--space-xxl) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.error-page__code {
  font-size: var(--font-size-xxl);
  font-weight: var(--font-weight-light);
  line-height: 1;
  color: var(--color-muted);
}

.error-page__back {
  font-size: var(--font-size-sm);
  text-decoration: underline;
}

/* ── Legal pages ─────────────────────────────────────────── */

.legal-page {
  max-width: 50rem;
  margin: 0 auto;
  padding-bottom: var(--space-2xl);
}

/* ── Notes / Pagination (Kirby boilerplate) ─────────────── */

.pagination {
  display: flex;
  padding-top: var(--space-xxl);
}

.pagination>span {
  color: var(--color-text-muted);
}

.pagination>* {
  padding: var(--space-sm);
  width: 3rem;
  text-align: center;
  border: 2px solid currentColor;
  margin-right: var(--space-lg);
}

.note-excerpt {
  line-height: var(--line-height-base);
}

.note-excerpt header {
  margin-bottom: var(--space-lg);
}

.note-excerpt figure {
  margin-bottom: var(--space-sm);
}

.note-excerpt-title {
  font-weight: var(--font-weight-medium);
}

.note-excerpt-date {
  color: var(--color-text-muted);
}


/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */

@media screen and (min-width: 60rem) {
  body {
    --padding-base: var(--space-lg);
  }

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

  .grid>.column {
    grid-column: span var(--columns);
  }
}

@media (max-width: 900px) {
  .clientes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {
  .equipo-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__coords {
    display: none;
  }

  .proyecto-cover img {
    max-height: 13vh;
  }
}

@media (max-width: 48rem) {

  /* Cursor / crosshair */
  .cursor,
  body:before,
  body:after {
    display: none;
  }

  /* Header */
  .header__nav {
    display: none;
  }

  .header__burger {
    display: block;
  }

  .header__animation {
    flex: 1;
    max-width: none;
    justify-content: center;
  }

  /* Mobile menu: fixed para no desplazar el contenido */
  .header__mobile-menu:not([hidden]) {
    position: fixed;
    top: var(--site-header-h, 3.5rem);
    left: 0;
    right: 0;
    z-index: 4;
  }

  /* Filters: sticky debajo del header */
  .filters {
    position: sticky;
    top: var(--site-header-h, 3.5rem);
    z-index: 1;
    background: var(--color-background);
    padding: var(--space-xs) 0;
    margin-bottom: var(--space-xs);
  }

  /* Proyecto */
  .proyecto-grid {
    grid-template-columns: 1fr;
  }

  .proyecto-info {
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .proyecto-row.plano {
    flex-direction: column;
    overflow-x: visible;
    overflow-y: visible;
  }

  .proyecto-row.plano .proyecto-col {
    flex-shrink: 1;
    width: 100%;
  }

  .proyecto-row.plano img {
    height: auto;
    width: 100%;
    max-width: 100%;
  }

  /* Footer */
  .footer__brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__logo-wrap,
  .footer__panorama {
    width: 100%;
  }

  .footer__info {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .footer__nav-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-lg);
  }

  .footer__legal {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
}

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

  .proyecto-prevnext__item--next {
    text-align: left;
    border-left: none;
    border-top: 1px solid var(--color-surface);
  }
}

@media (max-width: 540px) {
  .contacto-form__row--half {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .clientes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .text h2,
  .h2 {
    font-size: var(--font-size-xl);
  }

  .text h3,
  .h3 {
    font-size: var(--font-size-lg);
    line-height: 1.2;
  }
}

@media (max-width: 25rem) {
  main {
    padding: var(--space-md);
  }

  .proyecto-grid {
    gap: var(--space-md);
  }

  .proyecto-meta-grid {
    flex-direction: column;
    gap: var(--space-sm);
  }
}


/* ════════════════════════════════════════════════════════════
   HOVER
   ════════════════════════════════════════════════════════════ */

@media (hover: hover) {
  button:hover {
    text-decoration: underline;
    opacity: 1;
  }

  .header__logo:hover {
    opacity: 0.6;
  }

  .header__nav-link:hover {
    text-decoration: underline;
    text-underline-offset: 0.3rem;
    text-decoration-thickness: 2px;
  }

  .pagination>a:hover {
    background: var(--color-primary);
    color: var(--color-secondary);
    border-color: var(--color-primary);
  }

  .proyecto-prevnext__item:hover::before {
    /*mix-blend-mode: normal;*/
    filter: brightness(1.1);
  }

  .clientes-logo:hover {
    opacity: 1;
    mix-blend-mode: normal;
  }

  .footer__social-link:hover,
  .footer__nav-link:hover,
  .footer__legal-link:hover {
    color: #E5E8A1;
  }

  .contacto .text a:hover {
    color: var(--color-muted);
  }

  .contacto-form__btn:hover {
    opacity: 0.75;
  }
}