/* =============================================================
   ALVARO SOTO · V16 · Estilo blanco, editorial, una sola hoja.
   Colores y tamaños principales en :root (cambialos acá).
   ============================================================= */

:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #6b6b6b;
  --faint: #9a9a9a;
  --line: #e6e6e6;
  --pad: clamp(16px, 4vw, 56px);         /* margen lateral */
  --max: 1440px;                          /* ancho máximo del contenido */
  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 22px var(--pad);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.logo {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .14em;
  white-space: nowrap;
}
.logo .scramble { display: inline-block; min-width: 11.6ch; }
.logo .scramble i { font-style: normal; color: var(--faint); }
.site-nav { display: flex; gap: 26px; font-size: 15px; }
.site-nav a { color: var(--muted); transition: color .2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--fg); }

/* ---------- Página ---------- */
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) var(--pad) clamp(60px, 10vw, 120px);
}

/* Frase de entrada (home) */
.intro {
  font-size: clamp(21px, 2.2vw, 34px);
  line-height: 1.28;
  letter-spacing: -.01em;
  font-weight: 400;
  max-width: 44em;
  margin-bottom: clamp(56px, 8vw, 110px);
}
.intro-line { display: block; min-height: 1.28em; }
.intro-line + .intro-line { margin-top: .25em; }
.intro-line i, .logo .scramble i { font-style: normal; color: var(--faint); }

/* ---------- Grilla de trabajos ---------- */
.work-group { margin-bottom: clamp(64px, 9vw, 120px); }
.work-group:last-child { margin-bottom: 0; }
.group-label, .block-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.group-note {
  font-size: 14px;
  color: var(--faint);
  max-width: 44em;
  margin-bottom: 26px;
}
.group-label + .cards { margin-top: 16px; }
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);      /* 2 columnas grandes */
  gap: clamp(44px, 5vw, 80px) clamp(20px, 2.6vw, 40px);
}
.card { display: block; }
.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f3f3f3;
}
.card-media img, .card-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1), opacity .3s;
}
.card:hover .card-media img, .card:hover .card-media video { transform: scale(1.03); }
.card-title {
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 500;
  margin-top: 14px;
  line-height: 1.3;
}
.card-sub { font-size: clamp(15px, 1.2vw, 17px); color: var(--muted); line-height: 1.35; margin-top: 2px; }
.card:hover .card-title { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Página de proyecto ---------- */
.project-head { max-width: 60em; margin-bottom: clamp(32px, 5vw, 56px); }
.project-title {
  font-size: clamp(34px, 5.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -.02em;
  font-weight: 500;
}
.project-tagline {
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.25;
  margin-top: 10px;
}
.project-meta { font-size: 14px; color: var(--muted); margin-top: 18px; }
.note { font-size: 13px; color: var(--faint); margin-top: 6px; }

.project-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px clamp(24px, 3vw, 48px);
  max-width: 1200px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.project-info:empty { display: none; }
.info p { font-size: 16px; line-height: 1.55; max-width: 34em; }
.live { margin: -32px 0 48px; }
.live a { border-bottom: 1px solid var(--fg); }

.gallery {
  display: grid;
  gap: clamp(20px, 3vw, 40px);
  margin-bottom: clamp(40px, 6vw, 72px);
}
.slot { margin: 0 auto; width: 100%; }
.slot img, .slot video { width: 100%; height: auto; background: #f3f3f3; }
.slot--wide     { max-width: 1440px; }
.slot--standard { max-width: 980px; }
.slot--small    { max-width: 600px; }
.slot--full     { max-width: none; }
.slot figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; }
.slot-empty {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--faint);
  border: 1px dashed var(--line);
}
/* Galería en grilla (gallery_layout: "masonry") */
.gallery--grid { grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 1.6vw, 22px); }
.gallery--grid .slot { max-width: none; }
.gallery--grid .slot--full { grid-column: 1 / -1; }   /* "media": "full" ocupa todo el ancho */

.project-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  font-size: 15px;
  color: var(--muted);
}
.project-nav a:hover { color: var(--fg); }

/* ---------- About ---------- */
.about-intro p {
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.3;
  letter-spacing: -.01em;
  max-width: 26em;
  margin-bottom: .9em;
}
.about-intro p:first-child { font-size: clamp(26px, 3.4vw, 46px); line-height: 1.18; }
.about-block {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: clamp(56px, 8vw, 96px);
}
.about-block .block-label { margin-bottom: 24px; }
.caps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px 24px;
}
.cap h3 { font-size: 16px; font-weight: 500; margin-bottom: 6px; }
.cap p { font-size: 15px; color: var(--muted); line-height: 1.5; }
.rows { display: grid; }
.row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 3fr;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.row:first-child { padding-top: 0; }
.row-when { font-size: 15px; color: var(--muted); }
.row-what h3 { font-size: 18px; font-weight: 500; line-height: 1.3; }
.row-what p { font-size: 15px; line-height: 1.55; max-width: 44em; }
.row-role { color: var(--muted); margin-bottom: 4px; }
.contact-lead { font-size: 16px; color: var(--muted); margin-bottom: 10px; }
.big-link {
  font-size: clamp(24px, 3vw, 40px);
  border-bottom: 1px solid var(--fg);
}
.contact-links { display: flex; gap: 22px; margin-top: 18px; font-size: 15px; }
.contact-links a { border-bottom: 1px solid var(--line); }
.contact-links a:hover { border-color: var(--fg); }

/* ---------- Footer ---------- */
.site-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 34px var(--pad) 40px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}
.site-footer a:hover { color: var(--fg); }
.site-footer .sep { color: var(--line); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 64px;
}
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lightbox button {
  position: absolute;
  background: none;
  border: 0;
  font: inherit;
  font-size: 34px;
  line-height: 1;
  color: var(--fg);
  cursor: pointer;
  padding: 10px 14px;
}
.lb-close { top: 10px; right: 14px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .caps { grid-template-columns: repeat(3, 1fr); }
  .gallery--grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .site-header { padding-top: 16px; padding-bottom: 16px; }
  .logo { font-size: 13px; }
  .site-nav { gap: 18px; }
  .cards { grid-template-columns: 1fr; }
  .intro-line + .intro-line { margin-top: .5em; }
  .caps { grid-template-columns: 1fr 1fr; }
  .row { grid-template-columns: 1fr; gap: 4px; }
  .gallery--grid { grid-template-columns: 1fr; }
  .project-nav { font-size: 14px; }
  .project-nav a:nth-child(2) { display: none; }
  .site-footer { font-size: 11px; letter-spacing: .1em; }
  .lightbox { padding: 48px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .card-media img, .card-media video { transition: none; }
  .card:hover .card-media img, .card:hover .card-media video { transform: none; }
}
