/* ============================================================
   Muu Blanco — stylesheet (gallery / editorial, light)
   Aesthetic reference: tremainecollection.org
   ============================================================ */
:root {
  --paper: #f4f2ec;      /* warm bone */
  --paper-2: #ffffff;
  --ink: #16150f;        /* near black */
  --muted: #6c6a5f;
  --line: rgba(20,19,15,.14);
  --line-soft: rgba(20,19,15,.08);
  --accent: #a8331d;     /* terracotta, used sparingly */
  --wrap: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

h1, h2, h3 { font-weight: 500; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
.display { font-family: var(--display); font-weight: 400; }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 1.1rem var(--gutter);
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
}
.brand { font-family: var(--display); font-size: 1.35rem; letter-spacing: -.02em; }
.brand em { font-style: italic; }
.site-nav { display: flex; gap: 1.8rem; }
.lang-switch { display: flex; gap: .6rem; font-size: .72rem; letter-spacing: .06em; }
.lang-switch button { background: none; border: 0; cursor: pointer; color: var(--muted); font: inherit; padding: .15rem .2rem; }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-current="true"] { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.lang-switch--intro { justify-content: center; gap: 1rem; margin-top: 1.6rem; font-size: .8rem; }
.site-nav a { color: var(--muted); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; transition: color .18s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
.nav-toggle { display: none; background: none; border: 0; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; color: var(--ink); }

/* ===== Intro overlay ===== */
.intro {
  position: fixed; inset: 0; z-index: 100;
  background: var(--paper);
  display: grid; place-items: center; text-align: center;
  padding: var(--gutter);
  cursor: pointer;
  transition: opacity .6s ease, visibility .6s ease;
}
.intro.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.intro__inner { max-width: 900px; }
.intro__brand { font-family: var(--display); font-size: 1.1rem; color: var(--muted); margin-bottom: 2.5rem; }
.intro__lead { font-family: var(--display); font-size: clamp(1.8rem, 5vw, 3.4rem); line-height: 1.08; }
.intro__hint { margin-top: 1.6rem; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); transition: opacity .3s; }
.intro__subtitle {
  font-family: var(--display); font-style: italic;
  font-size: clamp(1.4rem, 4vw, 2.4rem); color: var(--accent);
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .6s ease, opacity .6s ease, margin .6s ease;
  margin: 0;
}
.intro.is-revealed .intro__subtitle { max-height: 240px; opacity: 1; margin: 1.8rem 0 0; }
.intro.is-revealed .intro__hint { opacity: 0; }
.intro__actions { display: flex; gap: 1rem; justify-content: center; margin-top: 2.4rem; opacity: 0; max-height: 0; overflow: hidden; transition: opacity .5s ease .1s, max-height .5s ease; }
.intro.is-revealed .intro__actions { opacity: 1; max-height: 120px; }
.intro__cta { font-size: .95rem; }

/* ===== Buttons / links ===== */
.btn {
  display: inline-block; cursor: pointer; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  font: 500 .9rem/1 var(--font); letter-spacing: .04em;
  padding: .85rem 1.6rem; border-radius: 2px;
  transition: background .18s, color .18s;
}
.btn:hover { background: transparent; color: var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.link-underline { border-bottom: 1px solid currentColor; padding-bottom: 1px; }

/* ===== Home hero (GIF) ===== */
.hero {
  max-width: var(--wrap); margin: 0 auto; padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) 2rem;
}
.hero__figure {
  aspect-ratio: 16 / 9; background: #e7e4db; border: 1px solid var(--line-soft);
  overflow: hidden; position: relative; display: grid; place-items: center;
}
.hero__figure img { width: 100%; height: 100%; object-fit: cover; }
.hero__placeholder { color: var(--muted); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }
.hero__needs {
  max-width: var(--wrap); margin: 0 auto; padding: 1.5rem var(--gutter) 0;
  font-family: var(--display); font-size: clamp(1.5rem, 4vw, 2.6rem); line-height: 1.12;
}
.hero__needs .accent { color: var(--accent); font-style: italic; }
.hero__sub { max-width: var(--wrap); margin: 1rem auto 0; padding: 0 var(--gutter); color: var(--muted); }

/* ===== Section index (home tiles) ===== */
.index-grid {
  max-width: var(--wrap); margin: clamp(3rem, 8vw, 6rem) auto 0; padding: 0 var(--gutter);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line);
  border: 1px solid var(--line);
}
.tile {
  background: var(--paper); padding: clamp(1.8rem, 4vw, 3rem);
  min-height: 220px; display: flex; flex-direction: column; justify-content: space-between;
  transition: background .2s;
}
.tile:hover { background: var(--paper-2); }
.tile__num { display: block; font-size: .78rem; letter-spacing: .14em; color: var(--muted); }
.tile__title { display: block; font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.8rem); margin-top: 1.2rem; }
.tile__desc { display: block; color: var(--muted); margin-top: .6rem; font-size: .95rem; max-width: 34ch; }
.tile__go { display: block; margin-top: 1.6rem; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }

/* ===== Page template ===== */
main { min-height: 60vh; }
.page-head { max-width: var(--wrap); margin: 0 auto; padding: clamp(3rem, 8vw, 6rem) var(--gutter) 2rem; }
.page-head .eyebrow { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.page-head h1 { font-family: var(--display); font-size: clamp(2.4rem, 7vw, 5rem); margin-top: .6rem; }
.page-head p { color: var(--muted); max-width: 60ch; margin-top: 1.2rem; font-size: 1.05rem; }
.page-body { max-width: var(--wrap); margin: 0 auto; padding: 1rem var(--gutter) 5rem; }

/* ===== Gallery grid (Art Fair / Archive) ===== */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 2rem); }
.work { }
.work__img { aspect-ratio: 4 / 5; background: #e7e4db; border: 1px solid var(--line-soft); overflow: hidden; }
.work__img img { width: 100%; height: 100%; object-fit: cover; }
.work__meta { padding-top: .7rem; }
.work__title { font-size: 1rem; }
.work__sub { color: var(--muted); font-size: .88rem; }

/* ===== Section notes / placeholders ===== */
.section-note { color: var(--muted); margin: 0 0 1.6rem; max-width: 60ch; }
.placeholder-tag { font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 .4rem; }

/* ===== Media embeds (Multimedia / Dr Música) ===== */
.video-embed { aspect-ratio: 16/9; background: #000; border: 1px solid var(--line-soft); position: relative; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.audio-embed { border: 1px solid var(--line-soft); background: #fff; }
.audio-embed iframe { width: 100%; height: 120px; border: 0; display: block; }

/* ===== Prensa ===== */
.press-list { max-width: 78ch; }
.press-entry { display: grid; grid-template-columns: 100px 1fr; gap: 1.4rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.press-entry:first-of-type { padding-top: 0; }
.press-entry__year { font-family: var(--display); font-size: 1.2rem; color: var(--muted); }
.press-entry__img { display: block; max-width: 260px; margin: 0 0 .8rem; border: 1px solid var(--line-soft); background: #e7e4db; overflow: hidden; }
.press-entry__img img { width: 100%; display: block; transition: opacity .18s; }
.press-entry__img:hover img { opacity: .85; }
.press-entry__outlet { font-family: var(--display); font-size: 1.2rem; }
.press-entry__place { color: var(--muted); font-size: .9rem; margin-top: .25rem; }
.press-entry__note { color: var(--ink); font-size: .92rem; margin-top: .3rem; }
@media (max-width: 640px) { .press-entry { grid-template-columns: 1fr; gap: .25rem; } }

/* ===== CV ===== */
.cv-section { margin-top: 3.2rem; }
.cv-section__title { font-family: var(--display); font-size: clamp(1.4rem,3.5vw,2rem); margin-bottom: 1.4rem; }
.cv-year-group { margin-bottom: 1.5rem; }
.cv-year { font-family: var(--display); font-style: italic; font-size: 1.05rem; color: var(--accent); margin: 0 0 .5rem; }
.cv-items { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.cv-items li { color: var(--ink); font-size: .95rem; line-height: 1.55; padding-left: 1.1rem; position: relative; }
.cv-items li::before { content: "–"; position: absolute; left: 0; color: var(--muted); }
.cv-note { color: var(--muted); font-size: .9rem; margin: 0 0 1rem; }

/* ===== Bibliography (Conceptual) ===== */
.biblio-entry { display: grid; grid-template-columns: 320px 1fr; gap: clamp(1.4rem, 3vw, 2.4rem); padding: clamp(1.8rem, 4vw, 2.6rem) 0; border-bottom: 1px solid var(--line); }
.biblio-entry:first-of-type { padding-top: 0; }
.biblio-entry__img { aspect-ratio: 4 / 3; background: #e7e4db; border: 1px solid var(--line-soft); overflow: hidden; }
.biblio-entry__img img { width: 100%; height: 100%; object-fit: cover; }
.biblio-entry__date { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .4rem; }
.biblio-entry__medium { color: var(--muted); font-size: .92rem; margin: .3rem 0 .8rem; }
.biblio-entry__body p { margin: 0 0 1rem; line-height: 1.65; }
@media (max-width: 700px) { .biblio-entry { grid-template-columns: 1fr; } }

/* ===== Social cards (Prácticas Públicas) ===== */
.social-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.social-card { background: var(--paper); padding: clamp(1.6rem, 3vw, 2.2rem); display: flex; flex-direction: column; gap: .4rem; transition: background .2s; }
.social-card:hover { background: var(--paper-2); }
.social-card__label { font-family: var(--display); font-size: 1.3rem; }
.social-card__handle { color: var(--muted); font-size: .85rem; }
@media (max-width: 860px) { .social-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .social-grid { grid-template-columns: 1fr; } }

/* ===== Galería (Store) — open call panel reused for empty state ===== */
.open-call { border: 1px dashed var(--line); background: rgba(20,19,15,.02); padding: clamp(1.5rem, 4vw, 2.6rem); }
.open-call__status { font-family: var(--display); font-size: clamp(1.2rem, 3vw, 1.7rem); color: var(--accent); margin: 0 0 .6rem; }
.open-call__text { color: var(--muted); max-width: 58ch; margin: 0 0 1.5rem; line-height: 1.6; }
.open-call__text code { background: rgba(0,0,0,.06); padding: .1rem .35rem; border-radius: 3px; }

/* ===== Art Fair (from Google Sheet) ===== */
.artfair-note { color: var(--muted); font-size: .9rem; border: 1px dashed var(--line); background: rgba(20,19,15,.02); padding: .8rem 1rem; margin: 0 0 2.2rem; }
.artfair-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.4rem, 3vw, 2.4rem); }
.art-card__img { position: relative; aspect-ratio: 4 / 5; background: #e7e4db; border: 1px solid var(--line-soft); overflow: hidden; display: grid; place-items: center; }
.art-card__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art-card__ph { display: none; color: var(--muted); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; text-align: center; padding: 1rem; }
.art-card__img.is-empty .art-card__ph { display: block; }
.art-card__body { padding-top: .85rem; }
.art-card__name { font-family: var(--display); font-size: 1.25rem; }
.art-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; color: var(--muted); font-size: .88rem; margin-top: .25rem; }
.art-card__meta a { color: var(--ink); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.badge { font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line); padding: .12rem .5rem; border-radius: 999px; color: var(--muted); }
@media (max-width: 860px) { .artfair-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .artfair-grid { grid-template-columns: 1fr; } }

/* Art card as a clickable button */
.art-card { display: block; width: 100%; margin: 0; padding: 0; text-align: left; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
.art-card .art-card__img { transition: border-color .18s; }
.art-card:hover .art-card__img { border-color: var(--ink); }
.art-card__body { display: block; padding-top: .85rem; }
.art-card__name { display: block; font-family: var(--display); font-size: 1.25rem; }
.art-card__meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; color: var(--muted); font-size: .86rem; margin-top: .25rem; }
.art-card__count { position: absolute; bottom: .55rem; right: .55rem; background: rgba(20,19,15,.78); color: #fff; font-size: .68rem; letter-spacing: .04em; padding: .18rem .55rem; border-radius: 999px; }

/* ===== Artwork detail screen ===== */
.detail { position: fixed; inset: 0; z-index: 130; display: none; background: rgba(20,19,15,.9); overflow: auto; }
.detail.is-open { display: block; }
.detail__box { position: relative; min-height: 100%; max-width: 1120px; margin: 0 auto; background: var(--paper); display: grid; grid-template-columns: 1.35fr 1fr; }
.detail__close { position: fixed; top: 1rem; right: 1.1rem; z-index: 3; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink); }
.detail__close:hover { background: var(--ink); color: var(--paper); }
.detail__media { background: #efece4; display: grid; place-items: center; padding: clamp(1.2rem, 3vw, 2.5rem); min-height: 60vh; }
.carousel { position: relative; width: 100%; display: grid; place-items: center; }
.carousel__img { max-width: 100%; max-height: 80vh; object-fit: contain; display: block; }
.carousel__ph { display: none; place-items: center; color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; text-align: center; aspect-ratio: 4/5; width: 70%; background: #e3dfd6; border: 1px solid var(--line-soft); }
.carousel__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 2.7rem; height: 2.7rem; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.85); font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--ink); }
.carousel__nav:hover { background: #fff; }
.carousel__prev { left: .2rem; } .carousel__next { right: .2rem; }
.carousel__dots { position: absolute; bottom: -1.4rem; left: 0; right: 0; display: flex; gap: .45rem; justify-content: center; }
.carousel__dots button { width: 8px; height: 8px; padding: 0; border-radius: 50%; border: 0; background: rgba(20,19,15,.25); cursor: pointer; }
.carousel__dots button[aria-current="true"] { background: var(--ink); }
.detail__info { padding: clamp(2rem, 4vw, 3.5rem); }
.detail__name { font-family: var(--display); font-size: clamp(1.9rem, 4vw, 2.8rem); }
.detail__meta { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; color: var(--muted); margin: .7rem 0 1.6rem; }
.detail__meta a { color: var(--ink); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.detail__bio { color: var(--ink); font-size: 1rem; line-height: 1.7; margin: 0 0 1.4rem; max-width: 52ch; }
.detail__bio a { color: var(--accent); border-bottom: 1px solid currentColor; white-space: nowrap; }
/* ===== About / prose ===== */
.page-head .lead-strong { font-family: var(--display); font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.25; color: var(--ink); max-width: 32ch; margin-top: 1.2rem; }
.prose { max-width: 68ch; }
.prose h2 { font-family: var(--display); font-size: clamp(1.4rem, 3.5vw, 2rem); margin: 2.6rem 0 .7rem; }
.prose p { margin: 0 0 1rem; line-height: 1.7; }
.prose a { color: var(--ink); border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.about-facts { list-style: none; padding: 0; margin: 1.3rem 0; display: grid; gap: .4rem; }
.about-facts li { display: flex; flex-wrap: wrap; gap: .2rem 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line-soft); }
.about-facts span { color: var(--muted); min-width: 92px; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; padding-top: .15rem; }
.about-facts strong { font-weight: 500; }
.prose-close { font-family: var(--display); font-style: italic; font-size: clamp(1.2rem, 2.6vw, 1.55rem); line-height: 1.35; color: var(--accent); margin-top: 2.6rem; }

.detail__bio { color: var(--ink); line-height: 1.65; }
.detail__bio p { margin: 0 0 .85rem; }
.detail__bio p:last-child { margin-bottom: 0; }
.detail__link { margin: .8rem 0 0; color: var(--muted); font-size: .95rem; }
.detail__link a { color: var(--ink); border-bottom: 1px solid currentColor; }
@media (max-width: 800px) {
  .detail__box { grid-template-columns: 1fr; }
  .detail__media { min-height: 46vh; }
  .carousel__img { max-height: 62vh; }
}

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

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; }
.site-footer__inner { max-width: var(--wrap); margin: 0 auto; padding: 2.5rem var(--gutter); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; color: var(--muted); font-size: .9rem; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .index-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 1rem var(--gutter); border-top: 1px solid var(--line-soft); }
  .gallery { grid-template-columns: 1fr 1fr; gap: 1rem; }
}
