/* ==========================================================
   pilarparma.com — hoja de estilos
   Tipografías: Array (nombre y números) · Khand (todo lo demás)
   ========================================================== */

@font-face { font-family: "Array"; src: url("../fonts/Array-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Khand"; src: url("../fonts/Khand-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Khand"; src: url("../fonts/Khand-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --ink: #111111;
  --muted: #6E6E69;        /* gris de datos: contraste 5:1 sobre blanco */
  --line: #E4E4E1;
  --bg: #FFFFFF;
  --side: 320px;
  --pad: 32px;
  --gap: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Khand", system-ui, sans-serif; font-size: 19px; line-height: 1.35; }
img, video, iframe { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--muted); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--bg); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.label { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.num { font-family: "Array", monospace; font-weight: 400; line-height: .8; }

/* ---------- columna lateral ---------- */
.side { position: fixed; inset: 0 auto 0 0; width: var(--side); overflow-y: auto; padding: 28px 26px 32px; border-right: 1px solid var(--line); background: var(--bg); z-index: 10; }
.side-top { display: flex; justify-content: space-between; align-items: flex-start; }
.logo { font-family: "Array", monospace; font-size: 44px; line-height: .95; letter-spacing: .02em; }
.menu-btn { display: none; }
.side-nav { display: flex; flex-direction: column; gap: 32px; margin-top: 32px; }
.statement { font-size: 19px; line-height: 1.3; }
.plist { margin-bottom: 22px; }
.plist a { display: flex; gap: 12px; padding: 2px 0; font-size: 18px; }
.plist .n { width: 22px; color: var(--muted); flex: none; }
.plist .t { flex: 1; }
.plist .y { color: var(--muted); }
.plist a[aria-current="page"] .t, .contact a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.contact { display: flex; flex-direction: column; gap: 3px; font-size: 18px; }
.contact .muted { margin-top: 8px; }

/* ---------- contenido ---------- */
.main { margin-left: var(--side); padding: var(--pad) var(--pad) 96px; min-width: 0; }

/* inicio: grilla de proyectos */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px var(--gap); }
.tile { display: flex; flex-direction: column; gap: 12px; }
.tile img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: opacity .2s; }
.tile:hover img { opacity: .88; }
.tile:hover { color: inherit; }
.cap { display: flex; align-items: flex-end; gap: 16px; }
.cap .num { font-size: 52px; }
.ct { display: flex; flex-direction: column; }
.tt { font-size: 22px; font-weight: 500; line-height: 1.1; }
.tm { font-size: 15px; color: var(--muted); }

/* página de proyecto */
.p-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.p-head .num { font-size: 120px; }
.p-head h1 { margin: 0; font-size: 64px; font-weight: 500; line-height: .9; }
.ficha { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px var(--gap); margin: 0 0 32px; padding-top: 14px; border-top: 1px solid var(--line); }
.ficha dt { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ficha dd { margin: 2px 0 0; font-size: 18px; line-height: 1.25; }
.hero { margin: 0 0 40px; }
.hero img { width: 100%; max-height: 92vh; object-fit: cover; }
.intro { display: grid; grid-template-columns: 7fr 1fr 4fr; margin-bottom: 24px; }
.concept { grid-column: 1; display: flex; flex-direction: column; gap: 12px; font-size: 22px; line-height: 1.3; }
.role { grid-column: 3; display: flex; flex-direction: column; gap: 10px; font-size: 18px; }
section { margin-top: 56px; }
section h2 { margin: 0 0 20px; padding-top: 10px; border-top: 1px solid var(--ink); font-size: 26px; font-weight: 500; }
.sec-intro { color: var(--muted); margin: -8px 0 20px; max-width: 760px; }
.sec-cap { color: var(--muted); font-size: 16px; margin-top: 12px; }
.grid { display: grid; gap: var(--gap); }
.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.masonry { display: block; columns: 3; column-gap: var(--gap); }
.masonry figure { break-inside: avoid; margin-bottom: var(--gap); }
figure { margin: 0; }
figure img, figure video { width: 100%; }
.grid-3 figure img:not(.contain), .grid-4 figure img:not(.contain) { aspect-ratio: 4 / 5; object-fit: cover; }
img.contain { aspect-ratio: 1 / 1; object-fit: contain; background: #F4F4F2; }
img.contain.white { background: #FFFFFF; }
figcaption { font-size: 16px; color: var(--muted); margin-top: 8px; line-height: 1.3; }
.yt { position: relative; aspect-ratio: 16 / 9; background: #000; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.credits { border-top: 0; padding-top: 0; }
.next { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-top: 72px; padding-top: 16px; border-top: 1px solid var(--ink); }
.next-t { display: flex; align-items: flex-end; gap: 14px; font-size: 30px; font-weight: 500; line-height: 1; }
.num.s { font-size: 52px; }

/* información */
.info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 40px; }
.bio { display: flex; flex-direction: column; gap: 16px; font-size: 22px; line-height: 1.3; }
.cvlist { display: flex; flex-direction: column; gap: 10px; }
.cv { display: flex; justify-content: space-between; font-size: 20px; border-bottom: 1px solid var(--ink); padding-bottom: 6px; }
.rows li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.rows .yr { color: var(--muted); }
.rows strong { display: block; font-weight: 500; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.bigcontact { display: flex; flex-wrap: wrap; gap: 16px 40px; margin-top: 64px; padding-top: 16px; border-top: 1px solid var(--ink); font-size: 28px; font-weight: 500; }

/* ---------- pantallas medianas ---------- */
@media (max-width: 1100px) {
  :root { --side: 280px; --pad: 24px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.masonry { columns: 2; }
  .intro { grid-template-columns: 1fr; gap: 28px; }
  .role { grid-column: 1; }
  .info { grid-template-columns: 1fr; }
}

/* ---------- celular ---------- */
@media (max-width: 800px) {
  :root { --pad: 18px; --gap: 14px; }
  .side { position: sticky; top: 0; inset: auto; width: auto; height: auto; overflow: visible; padding: 16px var(--pad); border-right: 0; border-bottom: 1px solid var(--line); }
  .logo { font-size: 32px; }
  .menu-btn { display: block; font: inherit; font-size: 18px; background: none; color: var(--ink); border: 1px solid var(--ink); padding: 8px 14px; min-height: 44px; cursor: pointer; }
  .side-nav { display: none; margin-top: 20px; max-height: calc(100vh - 100px); overflow-y: auto; padding-bottom: 8px; }
  .menu-open .side-nav { display: flex; }
  .main { margin-left: 0; padding: 20px var(--pad) 72px; }
  .tiles { grid-template-columns: 1fr; gap: 36px; }
  .cap .num { font-size: 40px; }
  .p-head { gap: 14px; }
  .p-head .num { font-size: 72px; }
  .p-head h1 { font-size: 40px; }
  .concept, .bio { font-size: 20px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.masonry { columns: 1; }
  .hero img { max-height: none; }
  .two { grid-template-columns: 1fr; }
  .bigcontact { font-size: 22px; }
  .next-t { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .tile img { transition: none; }
}
