/*
 * ═══════════════════════════════════════════════════════════════
 *  FRANCISCO MARHUENDA — PORTFOLIO
 *  css/style.css
 *
 *  Palette from the artist's paintings:
 *    Blue  #293bab  ·  Red  #d2371d  ·  White #ffffff
 *  Typeface: Roboto (100 · 300 · 400 · 500 · 700 · 900)
 *
 *  Table of Contents
 *  ─────────────────
 *  01. Design Tokens
 *  02. Reset & Base
 *  03. Typography
 *  04. Layout Utilities
 *  05. Buttons
 *  06. Navigation
 *  07. Hero
 *  08. Section: El Artista
 *  09. Section: Exposición — Photo Carousel
 *  10. Section: Prensa
 *  11. Section: Catálogo — Filters
 *  12. Section: Catálogo — Cards
 *  13. Section: Contacto
 *  14. Footer
 *  15. Modal
 *  16. Image Placeholders
 *  17. Scroll Animations
 *  18. Responsive
 * ═══════════════════════════════════════════════════════════════
 */


/* ─────────────────────────────────────────────────────────────
   01. Design Tokens
───────────────────────────────────────────────────────────── */
:root {
  /* ── Brand palette (artist's own colors) ── */
  --blue:       #293bab;
  --blue-dark:  #1d2b84;
  --blue-mid:   #3d52c4;
  --blue-pale:  #eef0fb;
  --red:        #d2371d;
  --red-dark:   #a82b16;
  --red-pale:   #fbecea;

  /* ── Neutrals ── */
  --white:      #ffffff;
  --black:      #111111;
  --gray-900:   #1a1a1a;
  --gray-700:   #444444;
  --gray-500:   #888888;
  --gray-300:   #cccccc;
  --gray-200:   #e5e5e5;
  --gray-100:   #f4f4f4;
  --gray-50:    #fafafa;

  /* ── Semantic ── */
  --color-bg:       var(--white);
  --color-bg-alt:   var(--gray-50);
  --color-bg-dark:  var(--blue);
  --color-text:     var(--black);
  --color-text-mid: var(--gray-700);
  --color-text-dim: var(--gray-500);
  --color-border:   var(--gray-200);
  --color-primary:  var(--blue);
  --color-cta:      var(--red);
  --color-avail:    #1a8c4e;

  /* ── Spacing scale (4px base) ── */
  --s1: 4px;  --s2: 8px;   --s3: 12px;  --s4: 16px;
  --s5: 20px; --s6: 24px;  --s8: 32px;  --s10: 40px;
  --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px;

  /* ── Layout ── */
  --nav-h:     68px;
  --max-w:     1440px;
  --gutter:    clamp(20px, 5vw, 72px);

  /* ── Effects ── */
  --ease:      cubic-bezier(.4, 0, .2, 1);
  --t-fast:    150ms;
  --t-base:    240ms;
  --t-slow:    420ms;
}


/* ─────────────────────────────────────────────────────────────
   02. Reset & Base
───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: 'Roboto', system-ui, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  max-width: 100%;
}

body.modal-open { overflow: hidden; }

img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
blockquote { font-style: normal; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}


/* ─────────────────────────────────────────────────────────────
   03. Typography
───────────────────────────────────────────────────────────── */
.t-display {
  font-size: clamp(52px, 9vw, 128px);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.03em;
}

.t-hero-sub {
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 100;
  line-height: .95;
  letter-spacing: -.02em;
}

.t-heading-xl {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
}

.t-heading-lg {
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 500;
  line-height: 1.2;
}

.t-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.t-body {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.85;
  color: var(--color-text-mid);
}

.t-caption {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-dim);
}


/* ─────────────────────────────────────────────────────────────
   04. Layout Utilities
───────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  box-sizing: border-box;
}

.section { padding-block: clamp(64px, 8vw, 112px); }
.section--white  { background: var(--white); }
.section--gray   { background: var(--gray-50); }
.section--blue   { background: var(--blue); color: var(--white); }
.section--black  { background: var(--black); color: var(--white); }

.section__label {
  display: block;
  color: var(--blue);
  margin-bottom: var(--s4);
}
.section--blue  .section__label,
.section--black .section__label { color: rgba(255,255,255,.5); }

.section__title { margin-bottom: var(--s6); }
.section--blue  .section__title,
.section--black .section__title { color: var(--white); }

/* Geometric accent line below headings */
.section__rule {
  display: flex;
  gap: 4px;
  margin-bottom: var(--s12);
}
.section__rule span {
  height: 3px;
  display: block;
}
.section__rule span:nth-child(1) { width: 32px; background: var(--blue); }
.section__rule span:nth-child(2) { width: 8px;  background: var(--red);  }

.section--blue  .section__rule span:nth-child(1) { background: var(--white); }
.section--blue  .section__rule span:nth-child(2) { background: rgba(255,255,255,.4); }
.section--black .section__rule span:nth-child(1) { background: var(--blue); }
.section--black .section__rule span:nth-child(2) { background: var(--red); }

/* Blockquote style */
.blockquote {
  border-left: 3px solid var(--blue);
  padding: var(--s4) var(--s8);
  margin-block: var(--s10);
  background: var(--blue-pale);
}
.blockquote__text {
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 300;
  line-height: 1.7;
  color: var(--color-text);
}
.blockquote__cite {
  display: block;
  margin-top: var(--s3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
}

/* Status dots */
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot--available { background: var(--color-avail); }
.dot--sold      { background: var(--gray-400, #aaa); }


/* ─────────────────────────────────────────────────────────────
   05. Buttons
───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 13px 28px;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--t-base) var(--ease),
    color      var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease);
}

.btn--blue {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.btn--blue:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

.btn--red {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn--red:hover { background: var(--red-dark); border-color: var(--red-dark); }

.btn--outline-blue {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn--outline-blue:hover { background: var(--blue); color: var(--white); }

.btn--outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.5);
}
.btn--outline-white:hover { border-color: var(--white); }

.btn--ghost {
  background: transparent;
  color: var(--gray-500);
  border-color: var(--gray-200);
}
.btn--ghost:hover { border-color: var(--gray-500); color: var(--black); }

.btn--block { width: 100%; }


/* ─────────────────────────────────────────────────────────────
   06. Navigation
───────────────────────────────────────────────────────────── */
#site-nav {
  position: fixed;
  inset: 0 0 auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--gutter);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--gray-200);
  z-index: 200;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
#site-nav.is-scrolled {
  border-bottom-color: transparent;
  box-shadow: 0 1px 0 var(--gray-200), 0 4px 24px rgba(0,0,0,.06);
}

.nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.nav__logo-img {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

#nav-menu {
  display: flex;
  align-items: center;
  gap: var(--s8);
  list-style: none;
}

.nav__link {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gray-700);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--t-fast);
}
.nav__link::after {
  content: '';
  position: absolute;
  inset: auto 0 -2px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base) var(--ease);
}
.nav__link:hover,
.nav__link.is-active { color: var(--blue); }
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); }

.nav__link--cta {
  padding: 9px 22px;
  background: var(--blue);
  color: var(--white) !important;
  letter-spacing: .1em;
  transition: background var(--t-base);
}
.nav__link--cta::after { display: none; }
.nav__link--cta:hover { background: var(--blue-dark); }

/* Hamburger */
#nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none;
  border: none;
  padding: var(--s2);
}
#nav-hamburger span {
  width: 22px; height: 2px;
  background: var(--black);
  transition: transform var(--t-base), opacity var(--t-base);
}
#nav-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
#nav-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ─────────────────────────────────────────────────────────────
   07. Hero
───────────────────────────────────────────────────────────── */
#inicio {
  min-height: 100svh;
  padding-top: var(--nav-h);
  display: grid;
  grid-template-rows: 1fr auto;
  overflow: hidden;
}

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

/* ── Text side ── */
.hero__text {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--s20) var(--gutter) var(--s20) var(--gutter);
  overflow: hidden;
}

/* Large circle motif — echoes the Centro paintings */
.hero__circle-bg {
  position: absolute;
  width: 480px; height: 480px;
  border: 1.5px solid var(--blue);
  border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-38%, -50%);
  opacity: .06;
  pointer-events: none;
}

.hero__series {
  display: flex;
  align-items: center;
  gap: var(--s3);
  color: var(--red);
  margin-bottom: var(--s8);
}
.hero__series::before {
  content: '';
  width: 32px; height: 2px;
  background: var(--red);
  flex-shrink: 0;
}

.hero__name {
  margin-bottom: var(--s8);
  position: relative;
  z-index: 1;
}
.hero__name-first {
  display: block;
  font-size: clamp(48px, 7vw, 108px);
  font-weight: 100;
  line-height: .9;
  letter-spacing: -.02em;
  color: var(--blue);
}
.hero__name-last {
  display: block;
  font-size: clamp(48px, 7vw, 108px);
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.03em;
  color: var(--black);
}

.hero__subtitle {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.8;
  color: var(--gray-700);
  max-width: 420px;
  margin-bottom: var(--s10);
  position: relative;
  z-index: 1;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  position: relative;
  z-index: 1;
}

/* ── Visual side ── */
.hero__visual {
  position: relative;
  overflow: hidden;
  background: var(--gray-100);
}
.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Geometric color accents over photo */
.hero__accent {
  position: absolute;
  pointer-events: none;
}
.hero__accent--blue {
  top: 0; right: 0;
  width: 48px;
  height: 100%;
  background: var(--blue);
  opacity: .9;
}
.hero__accent--red {
  bottom: 0; left: 0;
  width: 100%;
  height: 48px;
  background: var(--red);
  opacity: .9;
}

/* ── Stats bar (bottom) ── */
.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--gray-200);
}
.hero__stat {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s5) var(--gutter);
  border-right: 1px solid var(--gray-200);
}
.hero__stat:last-child { border-right: none; }
.hero__stat-num {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: var(--blue);
  line-height: 1;
}
.hero__stat-label {
  font-size: 12px;
  font-weight: 400;
  color: var(--gray-500);
  line-height: 1.3;
}


/* ─────────────────────────────────────────────────────────────
   08. Section: El Artista
───────────────────────────────────────────────────────────── */
.artista__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.artista__text p {
  margin-bottom: var(--s6);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.9;
  color: var(--gray-700);
}
.artista__text p:last-child { margin-bottom: 0; }

/* Sidebar */
.artista__image-wrap {
  position: relative;
  margin-bottom: var(--s6);
}
.artista__image-wrap img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  display: block;
}
/* Red accent strip on the image */
.artista__image-wrap::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 6px;
  background: linear-gradient(to right, var(--blue) 60%, var(--red) 100%);
}
.artista__image-caption {
  position: absolute;
  inset: auto 0 6px;
  padding: var(--s4) var(--s5);
  background: linear-gradient(transparent, rgba(17,17,17,.65));
  color: var(--white);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .04em;
}

/* Facts grid */
.artista__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--gray-200);
}
.artista__fact {
  padding: var(--s4) var(--s5);
  border-right: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
}
.artista__fact:nth-child(2n) { border-right: none; }
.artista__fact:nth-last-child(-n+2) { border-bottom: none; }
.artista__fact dt {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: var(--s1);
}
.artista__fact dd {
  font-size: 14px;
  font-weight: 400;
  color: var(--black);
}
.artista__fact dd a {
  color: var(--blue);
  text-decoration: none;
}
.artista__fact dd a:hover { text-decoration: underline; }


/* ─────────────────────────────────────────────────────────────
   09. Section: Exposición — Photo Carousel
───────────────────────────────────────────────────────────── */

.exposicion__intro {
  color: var(--color-text-mid);
  margin-top: calc(-1 * var(--s6));
}

/* Photo carousel — wider items than press carousel */
.carousel--photos .carousel-item {
  flex: 0 0 calc((100% - 2 * var(--s5)) / 2.6);
}

.photo-card {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--gray-200);
}
.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t-slow) var(--ease);
}
.photo-card:hover img { transform: scale(1.04); }

/* Light-background carousel controls */
.carousel--light .carousel__btn {
  background: rgba(0, 0, 0, .06);
  border: 1px solid rgba(0, 0, 0, .10);
  color: var(--black);
  box-shadow: none;
}
@supports (backdrop-filter: blur(8px)) {
  .carousel--light .carousel__btn { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
.carousel--light .carousel__btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, .12);
}
.carousel--light .carousel__dot {
  background: rgba(0, 0, 0, .18);
}
.carousel--light .carousel__dot.is-active {
  background: var(--blue);
  width: 24px;
}


/* ─────────────────────────────────────────────────────────────
   10. Section: Prensa — Carousel + Liquid Glass
───────────────────────────────────────────────────────────── */

/* No blobs needed — light background section */

/* Carousel container */
.carousel {
  position: relative;
  margin-top: var(--s12);
  max-width: 100%;
  overflow: hidden;
}

.carousel__track {
  display: flex;
  gap: var(--s5);
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: var(--s2);
  /* Negative side padding so first card aligns with container
     but lets the last partial card "peek" on the right */
  -webkit-overflow-scrolling: touch;
}
.carousel__track::-webkit-scrollbar { display: none; }

/* Each card = carousel item */
.carousel-item {
  flex: 0 0 calc((100% - 2 * var(--s5)) / 3.15);
  scroll-snap-align: start;
}

/* ── Press Card — clean light style ── */
.press-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: var(--s8);
  background: var(--white);
  border: 1px solid var(--gray-200);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
  transition:
    transform var(--t-base) var(--ease),
    box-shadow var(--t-base) var(--ease);
}
.press-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .10);
}

.press-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s5);
}

.press-card__outlet {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red);
}

.press-card__date {
  font-size: 11px;
  font-weight: 400;
  color: var(--gray-500);
}

.press-card__headline {
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--black);
  margin-bottom: var(--s4);
}

.press-card__quote {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--gray-700);
  flex: 1;
  margin-bottom: var(--s6);
}

.press-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue);
  text-decoration: none;
  margin-top: auto;
  transition: color var(--t-fast), gap var(--t-fast);
}
.press-card__link:hover {
  color: var(--blue-dark);
  gap: var(--s3);
}
.press-card__link svg {
  width: 13px; height: 13px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Carousel navigation */
.carousel__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s6);
  margin-top: var(--s8);
}

.carousel__btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--t-fast), transform var(--t-fast);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}
@supports (backdrop-filter: blur(8px)) {
  .carousel__btn { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
}
.carousel__btn:hover:not(:disabled) {
  background: rgba(255,255,255,.22);
  transform: scale(1.08);
}
.carousel__btn:disabled { opacity: .3; cursor: not-allowed; }
.carousel__btn svg {
  width: 16px; height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.carousel__dots { display: flex; align-items: center; gap: var(--s2); }
.carousel__dot {
  height: 8px;
  width: 8px;
  border-radius: 4px;
  background: rgba(255,255,255,.3);
  border: none;
  padding: 0;
  transition: background var(--t-base), width var(--t-base);
}
.carousel__dot.is-active {
  background: var(--white);
  width: 24px;
}


/* ─────────────────────────────────────────────────────────────
   10. Section: Catálogo — Filters
───────────────────────────────────────────────────────────── */
.catalog__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s8);
  margin-bottom: var(--s10);
}

#catalog-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2);
}

.filter-btn {
  padding: 8px 18px;
  font-family: 'Roboto', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: transparent;
  border: 1.5px solid var(--gray-200);
  color: var(--gray-500);
  border-radius: 100px;
  transition: background var(--t-base), color var(--t-base), border-color var(--t-base);
}
.filter-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.filter-btn.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.filter-spacer {
  width: 1px; height: 20px;
  background: var(--gray-200);
  margin-inline: var(--s1);
}

.filter-btn--available {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
}
.filter-btn--available.is-active {
  background: var(--color-avail);
  border-color: var(--color-avail);
  color: var(--white);
}
.filter-btn--available.is-active .dot--available { background: var(--white); }

.catalog__empty {
  grid-column: 1 / -1;
  padding: var(--s16);
  text-align: center;
  color: var(--gray-500);
}


/* ─────────────────────────────────────────────────────────────
   11. Section: Catálogo — Cards
───────────────────────────────────────────────────────────── */
#catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;              /* tight geometric grid */
  background: var(--gray-200);
  border: 1px solid var(--gray-200);
}

.card {
  background: var(--white);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--t-slow) var(--ease);
  position: relative;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  pointer-events: none;
  transition: border-color var(--t-base) var(--ease);
  z-index: 1;
}
.card:hover { box-shadow: 0 8px 40px rgba(41,59,171,.12); z-index: 2; }
.card:hover::before { border-color: var(--blue); }
.card[hidden] { display: none; }

/* Image */
.card__image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--gray-100);
}
.card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t-slow) var(--ease);
}
.card:hover .card__image { transform: scale(1.03); }

/* Series color tag */
.card__series-tag {
  position: absolute;
  top: 0; left: 0;
  padding: 4px 12px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--tag-color, var(--blue));
  z-index: 2;
}

/* Sold overlay */
.card__sold-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.card__sold-tag {
  padding: 6px 18px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  background: var(--white);
  color: var(--gray-500);
  border: 1px solid var(--gray-300);
}

/* Info */
.card__info {
  padding: var(--s5);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}

.card__artist {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: var(--s1);
}

.card__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.2;
  margin-bottom: 2px;
}

.card__year {
  font-size: 13px;
  font-weight: 300;
  color: var(--gray-500);
  margin-bottom: var(--s3);
}

.card__meta {
  list-style: none;
  font-size: 12px;
  font-weight: 400;
  color: var(--gray-700);
  line-height: 1.6;
  margin-bottom: var(--s3);
}
.card__dim-inches { color: var(--gray-500); font-size: 11px; }
.card__id { color: var(--gray-400, #bbb); font-size: 10px; margin-top: 2px; }

.card__availability {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--gray-700);
  margin-top: var(--s2);
  margin-bottom: var(--s4);
}
.card__availability--sold { color: var(--gray-500); }

.card__cta {
  margin-top: auto;
  /* Integrated text-row — artwork stays the hero */
  padding: 11px var(--s5);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .04em;
  text-transform: none;
  border: none;
  border-top: 1px solid var(--gray-100);
  background: transparent;
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  transition: color var(--t-fast), background var(--t-fast);
}
.card__cta::after {
  content: '→';
  flex-shrink: 0;
  font-size: 12px;
  opacity: .5;
  transition: transform var(--t-fast), opacity var(--t-fast);
}
.card__cta:hover::after {
  transform: translateX(3px);
  opacity: 1;
}

/* Available — subtle hover tints blue */
.card__cta.btn--red {
  background: transparent;
  color: var(--gray-500);
  border-color: transparent;
  border-top: 1px solid var(--gray-100);
}
.card__cta.btn--red:hover {
  background: var(--blue-pale);
  color: var(--blue);
  border-top-color: var(--gray-100);
}

/* Sold — even quieter */
.card__cta.btn--ghost {
  color: var(--gray-300);
  border-color: transparent;
  border-top: 1px solid var(--gray-100);
}
.card__cta.btn--ghost:hover {
  background: var(--gray-50);
  color: var(--gray-400, #bbb);
  border-color: transparent;
  border-top-color: var(--gray-100);
}


/* ─────────────────────────────────────────────────────────────
   12. Section: Contacto
───────────────────────────────────────────────────────────── */
.contacto__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.contacto__intro p {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.9;
  color: var(--gray-700);
  margin-bottom: var(--s6);
}

.contacto__details { display: flex; flex-direction: column; gap: var(--s5); }

.contacto__item { display: flex; align-items: flex-start; gap: var(--s4); }

.contacto__icon {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-pale);
  color: var(--blue);
}
.contacto__icon svg {
  width: 18px; height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

.contacto__item-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 2px;
}
.contacto__item-value { font-size: 15px; font-weight: 400; color: var(--black); }
.contacto__item-value a { text-decoration: none; transition: color var(--t-fast); }
.contacto__item-value a:hover { color: var(--blue); }
.contacto__item-note { font-size: 12px; color: var(--gray-500); }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: var(--s5); }

.form-field { display: flex; flex-direction: column; gap: var(--s2); }
.form-field label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue);
}
.form-field input,
.form-field textarea {
  padding: 13px 16px;
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  font-weight: 300;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  color: var(--black);
  outline: none;
  transition: border-color var(--t-fast);
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--blue); background: var(--white); }
.form-field textarea { resize: vertical; min-height: 130px; }


/* ─────────────────────────────────────────────────────────────
   13. Footer
───────────────────────────────────────────────────────────── */
#site-footer {
  background: var(--white);
  border-top: 1px solid var(--gray-100);
  color: var(--gray-400, #bbb);
}

.footer__top {
  padding-block: var(--s12);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s8);
  border-bottom: 1px solid var(--gray-100);
}

.footer__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.footer__logo-img {
  height: 32px;
  width: auto;
  display: block;
  object-fit: contain;
  opacity: .75;
  transition: opacity var(--t-fast);
}
.footer__logo:hover .footer__logo-img { opacity: 1; }

/* Geometric separator */
.footer__rule {
  display: flex;
  height: 1px;
  gap: 4px;
}
.footer__rule span:nth-child(1) { flex: 1; background: var(--gray-200); }
.footer__rule span:nth-child(2) { width: 24px; background: var(--blue); opacity: .3; }

.footer__links {
  display: flex;
  gap: var(--s6);
  list-style: none;
  justify-content: flex-end;
}
.footer__links a {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gray-400, #bbb);
  transition: color var(--t-fast);
}
.footer__links a:hover { color: var(--gray-700); }

.footer__bottom {
  padding-block: var(--s5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
}
.footer__copy { font-size: 12px; color: var(--gray-300); }
.footer__email a {
  font-size: 12px;
  color: var(--blue);
  text-decoration: none;
  opacity: .7;
  transition: opacity var(--t-fast);
}
.footer__email a:hover { opacity: 1; }


/* ─────────────────────────────────────────────────────────────
   14. Modal
───────────────────────────────────────────────────────────── */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,17,17,.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease);
}
#modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--white);
  width: 100%;
  max-width: 860px;
  max-height: 90svh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 300px 1fr;
  box-shadow: 0 32px 80px rgba(0,0,0,.3);
  transform: translateY(20px) scale(.98);
  transition: transform var(--t-slow) var(--ease);
}
#modal-overlay.is-open .modal { transform: none; }

/* Blue accent bar at the top */
.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(to right, var(--blue) 70%, var(--red) 100%);
}

.modal__image-col {
  position: relative;
  overflow: hidden;
  background: var(--gray-100);
}
.modal__image-col img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.modal__close {
  position: absolute;
  top: var(--s4); right: var(--s4);
  width: 32px; height: 32px;
  background: rgba(17,17,17,.5);
  border: none;
  color: var(--white);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast);
  z-index: 1;
}
.modal__close:hover { background: rgba(17,17,17,.85); }

.modal__content {
  padding: var(--s10) var(--s10) var(--s8);
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--s10) + 4px); /* account for accent bar */
}

.modal__artist {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: var(--s2);
}
.modal__title {
  font-size: 28px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.1;
  margin-bottom: 2px;
}
.modal__year {
  font-size: 15px;
  font-weight: 300;
  color: var(--gray-500);
  margin-bottom: var(--s5);
}

.modal__divider {
  height: 1px;
  background: var(--gray-200);
  margin-bottom: var(--s5);
}

.modal__details {
  font-size: 13px;
  font-weight: 400;
  color: var(--gray-700);
  line-height: 1.9;
  margin-bottom: var(--s5);
}
.modal__details span { display: block; }
.modal__dim-inches { color: var(--gray-500); font-size: 12px; }
.modal__id { color: var(--gray-400, #bbb); font-size: 11px; margin-top: 2px; }

.modal__price-row {
  display: flex;
  align-items: baseline;
  gap: var(--s3);
  margin-bottom: var(--s2);
}
.modal__price {
  font-size: 28px;
  font-weight: 700;
  color: var(--black);
}
.modal__iva { font-size: 12px; color: var(--gray-500); }

.modal__availability {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--gray-700);
  margin-bottom: var(--s8);
}
.modal__availability--sold { color: var(--gray-500); }

.modal__form-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--blue);
  padding-top: var(--s6);
  border-top: 1px solid var(--gray-200);
  margin-bottom: var(--s5);
  margin-top: auto;
}
.modal__form { display: flex; flex-direction: column; gap: var(--s3); }
.modal__form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.modal__form input,
.modal__form textarea {
  padding: 11px 14px;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 300;
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  color: var(--black);
  outline: none;
  width: 100%;
  transition: border-color var(--t-fast);
}
.modal__form input:focus,
.modal__form textarea:focus { border-color: var(--blue); background: var(--white); }
.modal__form textarea { min-height: 80px; resize: vertical; }
.modal__form-actions { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s2); }
.modal__form-direct {
  font-size: 12px;
  color: var(--gray-500);
  text-align: center;
}
.modal__form-direct a { color: var(--blue); text-decoration: none; }
.modal__form-direct a:hover { text-decoration: underline; }


/* ─────────────────────────────────────────────────────────────
   15. Image Placeholders
   Shown automatically when an image file is missing
───────────────────────────────────────────────────────────── */
.card__image-wrap--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--placeholder-bg, var(--blue-pale));
}
.card__image-wrap--placeholder::after {
  content: '';
  width: 80px; height: 80px;
  border: 2px solid var(--placeholder-color, var(--blue));
  border-radius: 50%;
  opacity: .25;
}

.modal__image-col--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--placeholder-bg, var(--blue-pale));
}
.modal__image-col--placeholder::after {
  content: '';
  width: 120px; height: 120px;
  border: 2px solid var(--placeholder-color, var(--blue));
  border-radius: 50%;
  opacity: .2;
}


/* ─────────────────────────────────────────────────────────────
   16. Scroll Animations
───────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Staggered children */
.reveal-group > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal-group.is-visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0ms; }
.reveal-group.is-visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 80ms; }
.reveal-group.is-visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 160ms; }
.reveal-group.is-visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 240ms; }
.reveal-group.is-visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 320ms; }
.reveal-group.is-visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 400ms; }


/* ─────────────────────────────────────────────────────────────
   18. Responsive
───────────────────────────────────────────────────────────── */

/* ── Large tablets ─────────────────────────────── 1200px ── */
@media (max-width: 1200px) {
  #catalog-grid { grid-template-columns: repeat(3, 1fr); }
  .footer__top  { grid-template-columns: auto auto; }
  .footer__rule { display: none; }
  .carousel-item { flex: 0 0 calc((100% - var(--s5)) / 2.15); }
  .carousel--photos .carousel-item { flex: 0 0 calc((100% - var(--s5)) / 2.0); }
}

/* ── Tablets ────────────────────────────────────── 900px ── */
@media (max-width: 900px) {
  /* Hero */
  .hero__main      { grid-template-columns: 1fr; }
  .hero__text      { padding: var(--s12) var(--gutter) var(--s16); order: 2; text-align: center; }
  .hero__circle-bg { display: none; }
  .hero__subtitle  { margin-inline: auto; }
  .hero__actions   { justify-content: center; }
  .hero__visual    { height: 68vw; order: 1; }
  .hero__stats     { grid-template-columns: repeat(2, 1fr); }
  .hero__stat:nth-child(2) { border-right: none; }

  /* Carousels */
  .carousel-item { flex: 0 0 calc((100% - var(--s5)) / 2.1); }
  .carousel--photos .carousel-item { flex: 0 0 calc((100% - var(--s5)) / 1.5); }

  /* Layout */
  .artista__grid, .contacto__grid { grid-template-columns: 1fr; }
  #catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .catalog__header { flex-direction: column; align-items: flex-start; }

  /* Modal */
  .modal { grid-template-columns: 1fr; }
  .modal__image-col { height: 260px; }
  .modal__content { padding: var(--s8) var(--s6); }
  .modal__form-row { grid-template-columns: 1fr; }

  /* Footer */
  .footer__top { grid-template-columns: 1fr; text-align: center; }
  .footer__links { justify-content: center; }
  .footer__bottom { flex-direction: column; text-align: center; }
}

/* ── Mobile ─────────────────────────────────────── 640px ── */
@media (max-width: 640px) {
  :root { --nav-h: 60px; }

  /* Logo signature smaller on mobile */
  .nav__logo-img    { height: 28px; }
  .footer__logo-img { height: 26px; }

  /* Nav */
  #nav-menu {
    display: none;
    position: fixed;
    inset: var(--nav-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--s6) var(--gutter);
    gap: var(--s5);
    box-shadow: 0 8px 32px rgba(0,0,0,.1);
    z-index: 199;
  }
  #nav-menu.is-open { display: flex; }
  #nav-hamburger { display: flex; }
  .nav__link--cta { text-align: center; }

  /* Hero — portrait aspect so face never crops */
  .hero__visual {
    height: auto;
    aspect-ratio: 4 / 5;
    max-height: 82svh;
  }
  .hero__photo     { object-position: center 8%; }
  .hero__accent--blue { width: 28px; }
  .hero__accent--red  { height: 28px; }
  .hero__text      { padding: var(--s8) var(--gutter) var(--s10); }
  .hero__stat-num  { font-size: clamp(20px, 5vw, 28px); }
  .hero__stats     { grid-template-columns: repeat(2, 1fr); }
  .hero__stat      { padding: var(--s4) var(--s4); border-right: none; border-bottom: 1px solid var(--gray-200); }
  .hero__stat:nth-last-child(-n+2) { border-bottom: none; }

  /* Filters — full-width horizontal scroll strip */
  .catalog__header { align-items: stretch; overflow: hidden; }
  #catalog-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: visible;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    scrollbar-width: none;
    padding-bottom: var(--s2);
    -webkit-overflow-scrolling: touch;
  }
  #catalog-filters::-webkit-scrollbar { display: none; }
  .filter-btn { flex-shrink: 0; padding: 7px 14px; font-size: 10px; }
  .filter-spacer { flex-shrink: 0; }

  /* Catalog */
  #catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 1px; }

  /* Card info — tighter on mobile so nothing overflows */
  .card__info { padding: var(--s4); }
  .card__cta  { padding: 10px var(--s4); }

  /* Carousels */
  .carousel-item { flex: 0 0 88%; }
  .carousel--photos .carousel-item { flex: 0 0 92%; }

  /* El Artista — keep 2-col facts grid on mobile */
  .artista__facts { grid-template-columns: 1fr 1fr; }

  /* Modal */
  .modal__image-col { height: 180px; }
  .modal__content   { padding: var(--s6) var(--s5); }

  /* Forms — 16px prevents iOS auto-zoom on focus */
  .form-field input,
  .form-field textarea { font-size: 16px; }
}

/* ── Small phones ───────────────────────────────── 390px ── */
@media (max-width: 390px) {
  .hero__name-first,
  .hero__name-last { font-size: 44px; }
  #catalog-grid { grid-template-columns: 1fr; }
  .carousel--photos .carousel-item { flex: 0 0 95%; }
}
