/* Base compartida de Inventarte: fuente, tokens, reinicio, cabecera y pie.
   La cargan la portada (inicio.css) y «Nuestra historia» (historia.css). */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("fonts/hanken-grotesk-latin.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b0c10;
  --bg-raise: #13141a;
  --ink: #f2f1ed;
  --body: #c2c3ca;
  --muted: #8e909b;
  --line: rgb(255 255 255 / .09);
  --line-strong: rgb(255 255 255 / .16);
  --yolk: #fbbf0e;
  --red: #e0262f;
  --focus: #fbbf0e;

  --wrap: 75rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --radius: 1.75rem;
  --ease: cubic-bezier(.16, 1, .3, 1);

  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-synthesis: none;
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
  scroll-padding-block-start: 1.5rem;
  scrollbar-color: #3a3c46 var(--bg);
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-inline-size: 20rem; background: var(--bg); overflow-x: clip; }
h1, h2, h3, p, figure, ol, ul { margin: 0; padding: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: inherit; }
p { text-wrap: pretty; }
img, svg { display: block; max-inline-size: 100%; }
img { block-size: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .3em; }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--yolk); color: #14120a; }
.visually-hidden { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; inset-block-start: -10rem; inset-inline-start: 1rem; z-index: 10; padding: .75rem 1rem; border-radius: .5rem; background: var(--ink); color: var(--bg); }
.skip-link:focus { inset-block-start: 1rem; }

/* ───── Cabecera: tres columnas iguales para que el menú quede en el eje real ───── */
.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  inline-size: min(100%, calc(var(--wrap) + 2 * var(--gutter)));
  margin-inline: auto;
  padding: 1.75rem var(--gutter);
}
.masthead__brand { justify-self: start; display: block; border-radius: 6px; }
.masthead__brand img { block-size: 3rem; inline-size: auto; }
.masthead__nav {
  display: flex;
  gap: .25rem;
  padding: .3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 255 255 / .03);
}
.masthead__nav a {
  padding: .6rem 1.15rem;
  border-radius: 999px;
  color: var(--body);
  font-size: .95rem;
  text-decoration: none;
  transition: color .2s, background-color .2s;
}
.masthead__nav a:hover { color: var(--ink); background: rgb(255 255 255 / .06); }
.masthead__nav a[aria-current="page"] { color: var(--ink); background: rgb(255 255 255 / .08); }
.masthead__cta {
  justify-self: end;
  padding: .7rem 1.3rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .2s;
}
.masthead__cta:hover { background: #fff; }

/* Pie */
.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  inline-size: min(100% - 2 * var(--gutter), var(--wrap));
  margin-inline: auto;
  padding: 2rem 0 2.5rem;
  border-block-start: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
.footer__logo { block-size: 2rem; inline-size: auto; }
.footer__nav { display: flex; gap: 1.75rem; }
.footer__nav a { text-decoration: none; }
.footer__nav a:hover { color: var(--ink); }
.footer__legal { justify-self: end; }

@media (prefers-reduced-motion: reduce) { :root { scroll-behavior: auto; } }

@media (max-width: 64rem) {
  .footer { grid-template-columns: auto 1fr; }
  .footer__nav { justify-self: end; }
  .footer__legal { grid-column: 1 / -1; justify-self: start; }
}

/* ───── Cabecera en dos filas ───── */
@media (max-width: 52rem) {
  .masthead { grid-template-columns: 1fr auto; row-gap: 1.25rem; padding-block: 1.25rem; }
  .masthead__brand img { block-size: 2.25rem; }
  .masthead__nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: space-around; }
  .masthead__nav a { padding: .55rem .6rem; font-size: .9rem; white-space: nowrap; }
  .masthead__cta { padding: .6rem 1.1rem; font-size: .9rem; }
}

@media (max-width: 46rem) {
  .footer { grid-template-columns: 1fr; justify-items: start; }
  .footer__nav { flex-wrap: wrap; gap: 1rem 1.5rem; justify-self: start; }
  .footer__legal { justify-self: start; }
}

/* Quien pide menos movimiento no recibe desplazamientos ni giros al pasar el puntero */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .project:hover, .project:hover .project__art--combi, .project:hover .project__art--thoven,
  .project:hover .project__arrow, .work:hover .work__media img { transform: none; }
}
