@font-face { font-family: 'Ysabeau'; src: url('./assets/fonts/ysabeau-latin.woff2') format('woff2'); font-style: normal; font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url('./assets/fonts/public-sans-latin.woff2') format('woff2'); font-style: normal; font-weight: 100 900; font-display: swap; }
/* Base común de las tres rutas. Cada vista suma su hoja: portada.css, sala.css o caso.css. */
:root {
  color-scheme: dark;
  --void: #000;
  --ink: #fbfbfb;
  --muted: #a8a8a4;
  --soft: #bcbcb7;
  --line: #292929;
  --blue: #009cfb;
  --shell: min(90rem, calc(100% - 6rem));
  --ease: cubic-bezier(0.2, 0.75, 0.15, 1);
  --display: 'Ysabeau', 'Segoe UI', Arial, sans-serif;
  --display-weight: 500;
  --body: 'Public Sans', 'Segoe UI', Arial, sans-serif;
  --section-space: clamp(3rem, 6vw, 5rem);
  --panel-space: clamp(1.5rem, 3vw, 3rem);
  /* El campo de estrellas sigue detrás de los marcos; sólo los controles llevan fondo. */
  --surface-reading: rgb(0 0 0 / .18);
  --surface-control: rgb(0 0 0 / .45);
  --surface-edge: rgb(255 255 255 / .13);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; scrollbar-color: #696969 #000; }
body { margin: 0; background: var(--void) url('./assets/stars.svg?v=2') repeat; color: var(--ink); font-family: var(--body); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
::selection { background: #fbfbfb; color: #000; }
a { color: inherit; text-underline-offset: .3em; }
button { font: inherit; }
a, button { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; height: auto; }
.shell { width: var(--shell); max-width: 72rem; margin-inline: auto; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: -.025em; text-wrap: balance; }
h1, h2, h3 { font-optical-sizing: auto; font-synthesis: none; }
h1 em, h2 em { font-weight: inherit; font-style: normal; }
h3 { font-weight: 500; letter-spacing: -.025em; line-height: 1.25; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; }
.skip-link { position: fixed; z-index: 100; top: 1rem; left: 1rem; padding: .75rem 1rem; background: var(--ink); color: var(--void); transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.eyebrow { color: var(--muted); font: 400 .7rem/1.5 var(--body); letter-spacing: .07em; text-transform: uppercase; }
figcaption:not(.visually-hidden) { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 2rem; padding-top: 1rem; color: var(--muted); font-size: .75rem; }

/* Acciones. */
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 3.25rem; padding: .8rem 1.4rem; border: 1px solid transparent; border-radius: 2px; font-size: .875rem; font-weight: 600; text-decoration: none; transition: background-color 160ms, color 160ms; }
.button-primary { background: var(--ink); color: var(--void); }
.button-primary:hover { background: #d5d5d0; }
.button-light { background: #171917; color: #fbfbfb; }
.button-light:hover { background: #3c423b; }
.button-outline { display: inline-flex; justify-content: center; align-items: center; gap: .7rem; min-height: 44px; padding: .65rem 1rem; background: var(--surface-control); border: 1px solid #686868; border-radius: 2px; color: var(--ink); font-size: .875rem; line-height: 1.4; text-decoration: none; transition: background-color 160ms, color 160ms, border-color 160ms; }
.button-outline:hover { background: var(--ink); color: var(--void); border-color: var(--ink); }
.text-link { display: inline-flex; align-items: center; min-height: 44px; gap: .7rem; font-size: .875rem; }
.text-link:hover { color: #fff; text-decoration-thickness: 2px; }
.link-icon { flex: none; width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: square; stroke-linejoin: miter; }
.back-link { margin-bottom: 1.5rem; }

/* Cabecera. Los bordes de la navegación siguen siendo tenues al pasar el puntero. */
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 6rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: flex; align-items: center; flex: 0 0 96px; width: 96px; min-height: 44px; }
.brand img { width: 100%; }
.site-nav { display: flex; align-items: center; gap: .75rem; }
.site-nav a { padding-block: .75rem; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.site-nav .button-outline { border-color: var(--surface-edge); }
.site-nav .button-outline[aria-current="page"] { border-color: var(--ink); text-decoration: none; }
.site-nav .nav-contact { border-color: #686868; }

/* «Nuestro trabajo.» en el inicio: título, pieza y cédula comparten bordes. */
.project-feature { margin-block: var(--section-space); }
.feature-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 1.5rem var(--panel-space); border: 1px solid var(--surface-edge); border-bottom: 0; }
.feature-heading h2 { font-size: clamp(1.9rem, 3.2vw, 3.25rem); line-height: 1.2; }
.project-image { display: block; position: relative; border: 1px solid var(--surface-edge); border-bottom: 0; }
.project-caption { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 3rem; padding: var(--panel-space); border: 1px solid var(--surface-edge); background: var(--surface-reading); }
.project-caption h3 { font: var(--display-weight) clamp(1.8rem, 3vw, 2.5rem)/1.25 var(--display); letter-spacing: -.025em; }
.project-caption h3 a { display: inline-block; padding-block: 5px; margin-block: -5px; text-decoration: none; }
.project-caption a:hover { text-decoration: underline; }
.project-caption > p { max-width: 47ch; color: var(--muted); }
.project-discipline { margin-top: .6rem; color: var(--muted); font-size: .9rem; }

/* Encabezado del portafolio. */
.page-heading { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 2rem; margin-top: var(--section-space); padding: var(--panel-space); border: 1px solid var(--surface-edge); border-bottom: 0; }
.page-heading h1 { font-size: clamp(3rem, 6vw, 5.5rem); line-height: 1.12; }
.page-heading > p { max-width: 45ch; font-size: 1.2rem; color: var(--muted); }
.page-heading > .back-link { grid-column: 1 / -1; justify-self: start; margin-bottom: 0; }

/* Preguntas: un solo marco de lectura antes del contacto. Las respuestas quedan a la vista. */
.faq { margin-block: var(--section-space); border: 1px solid var(--surface-edge); background: var(--surface-reading); }
.faq-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); align-items: end; gap: var(--panel-space); padding: var(--panel-space); border-bottom: 1px solid var(--surface-edge); }
.faq-heading h2 { font-size: clamp(2rem, 3.5vw, 3.5rem); line-height: 1.08; }
.faq-heading .eyebrow { margin-bottom: 1rem; }
.faq-intro { max-width: 28ch; color: var(--muted); }
.faq-list { display: grid; }
.faq-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: .75rem var(--panel-space); align-items: start; padding: 1.25rem var(--panel-space); border-top: 1px solid var(--surface-edge); }
.faq-item:first-child { border-top: 0; }
.faq-item h3 { font: 600 1.05rem/1.35 var(--body); letter-spacing: -.02em; }
.faq-item p { max-width: 52ch; color: var(--muted); }
.faq-item a { text-decoration: underline; text-underline-offset: .3em; }
.faq-item a:hover { color: #fff; }

/* Contacto: la única franja clara del sitio. */
.contact-section { position: relative; isolation: isolate; padding-block: clamp(3rem, 6vw, 5rem); background: #efefe9; color: #171917; }
.contact-section::before { content: ''; position: absolute; inset: 0; z-index: -1; background: url('./assets/stars.svg?v=2') repeat; filter: invert(1); opacity: .2; pointer-events: none; }
.contact-section :focus-visible { outline-color: #171917; }
.contact-section h2 { font-size: clamp(2rem, 3.5vw, 3.5rem); line-height: 1.12; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: end; }
.contact-copy p { max-width: 39ch; color: #50534e; margin-bottom: 1.5rem; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }

/* Pie. */
.footer-main { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: start; gap: clamp(2rem, 5vw, 5rem); padding-block: clamp(3.5rem, 7vw, 6rem); }
.footer-signature { display: block; width: min(100%, 27rem); }
.footer-signature img { width: 100%; }
.footer-links, .footer-contact { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; min-width: 0; }
.footer-label { margin-bottom: .75rem; color: var(--muted); font: .7rem/1.5 var(--body); letter-spacing: .07em; text-transform: uppercase; }
.footer-links a, .footer-contact a { display: inline-flex; align-items: center; min-height: 44px; font-size: .95rem; text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover, .footer-contact a:hover { text-decoration: underline; }
.footer-links .button-outline, .footer-contact .button-outline { justify-content: flex-start; max-width: 100%; border-color: var(--surface-edge); }
.footer-bottom { display: flex; justify-content: flex-end; padding-block: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font: .75rem/1.5 var(--body); }

@media (min-width: 56rem) {
  .project-feature { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
  .feature-heading { grid-column: 1 / -1; }
  .project-feature .project-image { align-self: stretch; border-bottom: 1px solid var(--surface-edge); }
  .project-feature .project-caption { display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; border-left: 0; }
  .page-heading { align-items: center; }
  .page-heading h1 { font-size: clamp(3rem, 5vw, 4.5rem); }
}
@media (max-width: 68rem) {
  :root { --shell: calc(100% - 4rem); }
  .contact-grid { gap: 3rem; }
}
@media (max-width: 48rem) {
  :root { --shell: calc(100% - 3rem); }
  .header-inner { min-height: 5rem; gap: 1rem; }
  .brand { flex-basis: 88px; width: 88px; }
  .site-nav { gap: .5rem; }
  .site-nav a[href="/#capacidades"] { display: none; }
  .site-nav .button-outline { font-size: .8rem; padding-inline: .75rem; }
  .back-link { min-height: 48px; }
  figcaption:not(.visually-hidden) { font-size: .7rem; gap: .25rem; }
  .feature-heading { flex-wrap: wrap; align-items: center; }
  .project-caption { grid-template-columns: 1fr; gap: 1rem; }
  .page-heading { grid-template-columns: 1fr; gap: 1.5rem; }
  .page-heading h1 { font-size: clamp(2.4rem, 9vw, 4rem); letter-spacing: -.03em; }
  .faq-heading, .faq-item { grid-template-columns: 1fr; gap: .75rem; }
  .faq-heading { align-items: start; }
  .faq-heading h2 { font-size: clamp(2rem, 8vw, 3rem); }
  .faq-item { padding-block: 1.15rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 2.5rem 1rem; }
  .footer-signature { grid-column: 1 / -1; }
}
@media (max-width: 30rem) {
  .footer-main { grid-template-columns: 1fr; }
}
@media (max-width: 23rem) {
  :root { --shell: calc(100% - 2rem); }
  .header-inner { gap: .5rem; }
  .brand { width: 72px; flex-basis: 72px; }
  .site-nav .button-outline { padding-inline: .5rem; font-size: .75rem; }
  .feature-heading { gap: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
