/* Studio Diana López — 2026 redesign
   One stylesheet for every page. Old pages that were not converted keep css/style_index.css. */

:root {
  --ground: #c9c9c6;
  --ink: #111;
  --muted: #3a3a3a;
  --paper: #e6e6e3;
  --rule: 1px solid var(--ink);
  --pad: 32px;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --header-h: 81px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 13px/1.5 var(--mono);
  -webkit-font-smoothing: antialiased;
}
img, iframe { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px 32px;
  padding: 20px var(--pad);
  background: var(--ground);
  border-bottom: var(--rule);
}
.site-logo { display: block; line-height: 0; }
.site-logo img { height: 40px; width: auto; max-width: 100%; }
.site-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px;
  text-transform: lowercase;
}
.site-nav a[aria-current="page"] { text-decoration: underline; }
.icon-link {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin: -12px -12px -12px 0;
}
.icon-link svg { width: 20px; height: 20px; }

/* ---------- Footer ---------- */
.site-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 20px var(--pad);
  border-top: var(--rule);
}
.menu-toggle, .menu-only, .index-list .thumb { display: none; }

/* ---------- Section labels ---------- */
.label {
  margin: 0 0 16px;
  font: 500 13px/1.5 var(--mono);
  text-transform: uppercase; letter-spacing: 0.08em;
}

/* ---------- Home: split scroll ---------- */
.split-bar {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  text-align: center; border-bottom: var(--rule);
}
.split-bar a { padding: 6px; }
.split-bar a + a { border-left: var(--rule); }

.split {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  border-bottom: var(--rule);
}
.split-col {
  min-width: 0;
  height: calc(100vh - var(--header-h) - 31px);
  min-height: 480px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.split-press { border-right: var(--rule); }
.split-works { display: flex; flex-direction: column; gap: 1px; background: var(--ink); }

.press-tile { display: block; border-bottom: var(--rule); }
.press-tile img { width: 100%; height: auto; background: var(--paper); }
.press-tile .cap {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
}
.press-tile .cap span:last-child { color: var(--muted); white-space: nowrap; }
.press-card {
  aspect-ratio: 4 / 3; background: var(--paper);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 24px;
}
.press-card .t { font: 500 26px/1.2 var(--sans); }
.press-card .k { font-size: 11px; color: var(--muted); }

.work-tile { position: relative; display: block; background: var(--ground); }
.work-tile img { width: 100%; height: auto; background: #8f8f8c; }
.work-tile span {
  position: absolute; left: 16px; bottom: 16px;
  background: var(--ground); padding: 4px 8px;
}

/* ---------- Home: lists ---------- */
.home-lists {
  max-width: 1376px; margin: 0 auto;
  padding: 56px var(--pad);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 48px;
}
.ruled { list-style: none; margin: 0; padding: 0; border-top: var(--rule); }
.ruled li { padding: 10px 0; border-bottom: var(--rule); }
.ruled strong { font-weight: 500; }
.now { border-top: var(--rule); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.now .t { font: 500 20px/1.3 var(--sans); }
.now + .label { margin-top: 40px; }

/* ---------- Index pages (proyectos, publicaciones) ---------- */
.index-wrap { display: flex; flex-wrap: wrap; }
.index-preview {
  flex: 1 1 520px; min-width: 0;
  padding: var(--pad);
  position: sticky; top: var(--header-h); align-self: flex-start;
  display: flex; flex-direction: column; gap: 12px;
}
.index-preview .frame {
  aspect-ratio: 4 / 3; background: var(--ink);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.index-preview .frame img { width: 100%; height: 100%; object-fit: contain; }
.index-preview .meta { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.index-preview .meta .t { font: 500 18px/1.3 var(--sans); }

.index-list { flex: 1 1 480px; min-width: 0; padding: var(--pad) var(--pad) 64px 0; }
.index-list ul { list-style: none; margin: 0; padding: 0; }
.index-list li { display: flex; align-items: center; }
.index-list li::before {
  content: ""; flex: 0 0 96px; height: 1px; margin-right: 12px;
  background: transparent;
}
.index-list li.is-active::before { background: var(--ink); }
.index-list li a { display: block; padding: 3px 0; }
.index-list li.is-active a { font-weight: 500; text-decoration: underline; }
.index-list .sub { display: block; color: var(--muted); }

/* ---------- Project page ---------- */
.project-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: 12px 32px; padding: 28px var(--pad) 20px;
}
.project-head h1 { margin: 0; font: 500 44px/1.1 var(--sans); }
.project-hero { margin: 0; padding: 0 var(--pad); }
.project-hero img { width: 100%; height: auto; max-height: 86vh; object-fit: contain; background: var(--ink); }
.project-hero figcaption, .media-grid figcaption { padding-top: 8px; }
.video { position: relative; padding-top: 56.25%; background: #2a2a29; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.project-body {
  padding: 48px var(--pad);
  display: flex; flex-wrap: wrap; gap: 48px;
}
.project-meta {
  flex: 1 1 280px; min-width: 0; align-self: flex-start;
  border-top: var(--rule); padding-top: 12px;
}
.project-meta p { margin: 0; }
.project-text {
  flex: 2 1 520px; min-width: 0; max-width: 720px;
  font: 400 18px/1.6 var(--sans);
}
.project-text p { margin: 0 0 20px; }
.project-text p[style] { font-size: inherit !important; }
.project-text .english { color: var(--muted); }
.project-text .spanish + .english { border-top: var(--rule); padding-top: 20px; }

.media-grid {
  padding: 0 var(--pad) var(--pad);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 16px; align-items: start;
}
.media-grid figure { margin: 0; }
.media-grid img { width: 100%; height: auto; }

.project-nav {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 20px var(--pad); border-top: var(--rule);
}

/* ---------- Press / essays pages ---------- */
.page-pad { padding: 28px var(--pad) 64px; }
.press-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 0; border-top: var(--rule); border-left: var(--rule);
}
.press-grid > a { border-right: var(--rule); border-bottom: var(--rule); }
.press-grid .press-tile { border-bottom: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 720px) {
  :root { --pad: 16px; --header-h: 0px; }
  .site-header { position: static; flex-wrap: nowrap; padding: 14px var(--pad); }
  .site-logo img { height: 24px; }

  /* menu button + full-screen menu */
  .menu-toggle {
    display: block; min-width: 44px; height: 44px; margin: -8px -8px -8px 0; padding: 0 8px;
    border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer;
  }
  .site-nav {
    display: none;
    position: fixed; inset: 57px 0 0 0; z-index: 20;
    flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 4px;
    padding: 24px var(--pad);
    background: var(--ground);
    text-transform: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { font: 400 36px/1.3 var(--sans); }
  .site-nav .icon-link {
    width: auto; height: auto; min-height: 44px; margin: 24px 0 0;
    gap: 10px; font: 13px/1.5 var(--mono);
  }
  .menu-only { display: inline; }
  .menu-cities { margin-top: auto; color: var(--muted); }
  body.menu-open { overflow: hidden; }

  /* home: prensa / obra become tabs */
  .split-bar a { min-height: 44px; display: flex; align-items: center; justify-content: center; }
  .split-bar a.is-on { background: var(--ink); color: var(--ground); text-decoration: none; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split-col { height: auto; min-height: 0; overflow: visible; }
  .split-press { border-right: 0; }
  .split[data-show="works"] .split-press,
  .split[data-show="press"] .split-works { display: none; }
  .work-tile span { position: static; display: flex; justify-content: space-between; padding: 8px var(--pad); }

  /* project index: thumbnails instead of hover preview */
  .index-preview { display: none; }
  .index-list { padding: 0; }
  .index-list .label { padding: 20px var(--pad) 12px; margin: 0; }
  .index-list ul { border-top: var(--rule); }
  .index-list li { border-bottom: var(--rule); }
  .index-list li::before { display: none; }
  .index-list li a { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px var(--pad); }
  .index-list li.is-active a { font-weight: 400; text-decoration: none; }
  .index-list .thumb { display: block; flex: 0 0 64px; width: 64px; height: 48px; object-fit: cover; background: #8f8f8c; }
  .index-list .t { flex: 1; min-width: 0; }

  .project-head { flex-direction: column-reverse; align-items: flex-start; gap: 4px; }
  .project-head h1 { font-size: 30px; }
  .project-hero { padding: 0; }
  .project-text { font-size: 16px; }
  .media-grid { padding-inline: 0; }
  .site-footer { flex-direction: column; gap: 4px; }
}

.project-text a { text-decoration: underline; }
.col-more { display: flex; align-items: center; justify-content: center; min-height: 64px; background: var(--ground); }
/* Spanish text heavier than English, as on the original site */
.project-text .spanish { font-weight: 500; }
