/* HYLARQ — Huesa y Larumbe Arquitectura
   Diseño de referencia: columna lateral fija, imagen protagonista, tipografía DIN. */

@font-face { font-family: "DIN"; src: url("/fonts/din-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DIN"; src: url("/fonts/din-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "DIN"; src: url("/fonts/din-black.woff2") format("woff2"); font-weight: 900; font-display: swap; }

:root {
  --ink: #000;
  --paper: #fff;
  --mute: #8a8a8a;
  --line: #e6e6e6;
  --side: 250px;          /* ancho de la columna lateral */
  --gap: 14px;            /* margen general */
  --fs: 12px;             /* cuerpo de texto de interfaz */
  --font: "DIN", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--fs)/1.35 var(--font);
  text-transform: uppercase; letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
b, strong { font-weight: 700; }
h1, h2, h3, p { margin: 0; font-size: inherit; font-weight: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: 6px 10px; z-index: 100; }
.skip:focus { left: var(--gap); }

/* ---------- Columna lateral ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 20;
  padding: var(--gap); display: flex; flex-direction: column;
}
.brand { display: block; margin-bottom: 22px; }
.brand:hover { text-decoration: none; }
.logo { display: block; width: 100%; height: auto; overflow: visible; }
.logo text { fill: currentColor; font-family: var(--font); letter-spacing: 0; }
.logo-word { font-weight: 900; font-size: 290px; }
.logo-sub { font-weight: 400; font-size: 100px; }
.nav ul { list-style: none; margin: 0; padding: 0; }
.nav li { line-height: 1.3; }
.nav a { display: inline-block; padding: 0 2px; }
.nav .is-active > a,
.nav a[aria-current="page"] { background: var(--ink); color: var(--paper); text-decoration: none; }
.subnav { padding-left: 14px !important; margin: 1px 0 2px !important; }
.subnav a { padding: 0 2px; }
.menu-toggle { display: none; }
.side-footer { margin-top: auto; font-size: 10px; line-height: 1.4; }

/* ---------- Contenido ---------- */
.content { margin-left: var(--side); padding: var(--gap) var(--gap) 60px; min-height: 100vh; }
.page-title { font-weight: 700; margin: 0 0 var(--gap); padding-top: 2px; }
.caption b { font-weight: 700; }

/* ---------- Inicio: diapositivas a pantalla completa ---------- */
.home .sidebar { color: var(--paper); }
.home .nav .is-active > a, .home .nav a[aria-current="page"] { background: var(--paper); color: var(--ink); }
.home .content { margin: 0; padding: 0; }
.slideshow { position: fixed; inset: 0; background: #111; overflow: hidden; }
.slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.4s ease; }
.slide.is-on { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.28) 0, transparent 26%, transparent 78%, rgba(0,0,0,.35)); pointer-events: none; }
.slide figcaption { position: absolute; right: var(--gap); bottom: var(--gap); z-index: 2; color: var(--paper); font-weight: 700; }
.slide-next { position: absolute; inset: 0; z-index: 1; cursor: e-resize; }
.home .sidebar { pointer-events: none; }
.home .sidebar a, .home .sidebar button { pointer-events: auto; }

/* ---------- Listado de proyectos ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px var(--gap); }
.tile:hover { text-decoration: none; }
.tile-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #f2f2f2; margin-bottom: 6px; }
.tile-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .3s; }
.tile:hover .tile-img img { opacity: .82; }
.tile:hover b { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Visor de proyecto ---------- */
.viewer { display: flex; flex-direction: column; }
.v-stage { position: relative; height: min(70vh, calc((100vw - var(--side) - 2 * var(--gap)) * .5625)); min-height: 260px; }
.v-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .45s ease; display: flex; align-items: center; justify-content: flex-start; }
.v-slide.is-on { opacity: 1; z-index: 1; }
.v-slide img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.v-hit { position: absolute; top: 0; bottom: 0; width: 50%; z-index: 2; }
.v-hit-prev { left: 0; cursor: w-resize; }
.v-hit-next { right: 0; cursor: e-resize; }
.v-bar { display: flex; justify-content: space-between; gap: 20px; margin-top: 12px; }
.v-bar h1 { font-weight: 700; }
.v-ctrl { white-space: nowrap; font-weight: 700; }
.v-count { font-weight: 400; margin-right: 10px; }
.v-ctrl button:hover { text-decoration: underline; text-underline-offset: 2px; }
.v-info { margin-left: 14px; }
.v-info-panel { margin-top: 14px; max-width: 640px; }
.v-info-panel dl { margin: 0; display: grid; grid-template-columns: 110px 1fr; gap: 2px 12px; }
.v-info-panel dl div { display: contents; }
.v-info-panel dt { color: var(--mute); }
.v-info-panel dd { margin: 0; }
.works { list-style: none; padding: 0; margin: 12px 0 0; }
.thumbs { display: flex; gap: 6px; overflow-x: auto; margin-top: 22px; padding-bottom: 8px; scrollbar-width: thin; }
.thumb { flex: 0 0 auto; height: 54px; opacity: .45; transition: opacity .2s; }
.thumb img { height: 54px; width: auto; }
.thumb:hover, .thumb.is-on { opacity: 1; }
.proj-pager { display: flex; justify-content: space-between; gap: 20px; margin-top: 36px; padding-top: 10px; border-top: 1px solid var(--line); }

/* ---------- Equipo ---------- */
.about { max-width: 900px; }
.about-photo { margin: 0 0 18px; width: 260px; }
.about-photo img { filter: grayscale(1); }
.about-lead { max-width: 560px; margin-bottom: 28px; }
.bios { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 30px; }
.bio h2 { font-weight: 700; margin-bottom: 8px; }
.bio p { margin-bottom: 12px; }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(280px, 460px); gap: 40px; max-width: 900px; align-items: start; }
.contact-info p { margin-bottom: 16px; }
.contact-form { display: grid; gap: 12px; }
.contact-form label { display: grid; gap: 4px; }
.contact-form input, .contact-form textarea {
  font: 400 14px/1.4 var(--font); letter-spacing: 0; text-transform: none; color: var(--ink);
  border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; padding: 6px 0; background: transparent;
}
.contact-form textarea { border: 1px solid var(--ink); padding: 8px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 1px 0 0 var(--ink); }
.contact-form .check { grid-template-columns: auto 1fr; align-items: start; gap: 8px; font-size: 10px; text-transform: none; letter-spacing: 0; }
.contact-form .check input { margin: 1px 0 0; }
.btn { justify-self: start; background: var(--ink); color: var(--paper); padding: 6px 14px; font-weight: 700; }
.btn:hover { opacity: .8; }
.form-note { min-height: 1.4em; text-transform: none; letter-spacing: 0; }
.form-note.is-error { color: #b00020; }

/* ---------- Móvil y tablet ---------- */
@media (max-width: 860px) {
  :root { --side: 0px; }
  .sidebar { position: sticky; top: 0; inset: auto; width: auto; height: auto; background: var(--paper); flex-direction: row; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; padding-bottom: 10px; }
  .brand { width: 64%; max-width: 250px; margin: 0; }
  .menu-toggle { display: block; font-weight: 700; padding: 2px 4px; }
  .menu-toggle[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
  .nav { width: 100%; display: none; padding-top: 14px; font-size: 14px; }
  .nav.is-open { display: block; }
  .nav li { line-height: 1.5; }
  .side-footer { display: none; }
  .content { margin: 0; min-height: 0; }
  .home .sidebar { position: fixed; inset: 0 0 auto 0; background: transparent; }
  .home .nav.is-open { background: rgba(0,0,0,.55); margin: 8px calc(-1 * var(--gap)) 0; padding: 14px var(--gap); }
  .v-stage { height: 62vw; min-height: 220px; }
  .v-bar { flex-direction: column; gap: 8px; }
  .contact { grid-template-columns: 1fr; }
  .proj-pager { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .slide, .v-slide { transition: none; } }
