/* ArtesaNFC galería — hoja única, sin dependencias.
   Paleta: piedra clara, tinta barro negro y un solo acento ocre.
   Escala: display, título, enunciado, cuerpo y nota. */

:root {
  --ground: #e9e9e7;
  --ink: #1c1a17;
  --ink-soft: #4d4944;
  --accent: #a4491f;
  --accent-ink: #fafafa;
  --tone: #dadad6;

  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-text: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --size-display: clamp(2.6rem, 8.6vw, 8.5rem);
  --size-title: clamp(2rem, 4.4vw, 3.6rem);
  --size-statement: clamp(1.4rem, 2.4vw, 2.2rem);
  --size-lead: 1.125rem;
  --size-body: 1rem;
  --size-note: 0.875rem;

  --gutter: clamp(16px, 4vw, 40px);
  --section-gap: clamp(96px, 14vw, 200px);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #171613;
    --ink: #f1ede5;
    --ink-soft: #c4bcab;
    --accent: #e0854f;
    --accent-ink: #171613;
    --tone: #26241f;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--size-body);
  line-height: 1.55;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

figure {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--ground);
}

.skip-link:focus {
  top: 8px;
}

/* ---------- Cabecera ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px var(--gutter);
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: var(--size-note);
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Botones ---------- */

.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 22px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  transition: transform 160ms ease, filter 160ms ease;
}

.button:hover {
  filter: brightness(1.08);
}

.button:active {
  transform: translateY(1px);
}

.button--small {
  min-height: 40px;
  padding: 8px 16px;
  font-size: var(--size-note);
}

/* ---------- Hero: la frase es el diseño ---------- */

.hero {
  padding: clamp(40px, 8vw, 120px) var(--gutter) var(--section-gap);
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--size-display);
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.hero__media {
  display: inline-block;
  vertical-align: baseline;
  width: 2.6em;
  height: 0.9em;
  margin: 0 0.06em;
  overflow: hidden;
  border-radius: 999px;
  transform: translateY(0.08em);
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

.hero__body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
  align-items: end;
  margin-top: clamp(40px, 6vw, 88px);
}

.hero__copy {
  grid-column: span 4;
}

.hero__lead {
  max-width: 40ch;
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: var(--size-lead);
}

.hero__still {
  grid-column: 6 / span 7;
}

.hero__still img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* ---------- Galería ---------- */

.gallery {
  padding: 0 var(--gutter) var(--section-gap);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 32px;
  margin-bottom: 40px;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--size-title);
  line-height: 1;
}

.section-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: var(--size-note);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.work {
  grid-column: span 5;
}

.work--wide {
  grid-column: span 7;
}

.work:nth-child(even):not(.work--wide) {
  margin-top: clamp(40px, 8vw, 120px);
}

.work img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: filter 500ms ease, transform 700ms var(--ease-out);
}

.work--wide img {
  aspect-ratio: 4 / 3;
}

.work figure:hover img,
.work figure:focus-within img {
  filter: grayscale(1);
  transform: scale(1.015);
}

.work figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 14px;
}

.work__title {
  font-weight: 600;
  font-size: var(--size-lead);
  line-height: 1.3;
}

.work__place {
  color: var(--ink-soft);
  font-size: var(--size-note);
}

/* ---------- Nosotros ---------- */

.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
  padding: clamp(48px, 6vw, 72px) var(--gutter) var(--section-gap);
}

.about__copy {
  grid-column: span 5;
}

.about .section-title {
  margin-bottom: 24px;
}

.about__text {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--size-statement);
  line-height: 1.25;
  max-width: 30ch;
}

.about__still {
  grid-column: 7 / span 6;
}

.about__still img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ---------- Hazte miembro ---------- */

.membership {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
  align-items: center;
  padding: clamp(64px, 9vw, 120px) var(--gutter);
  background: var(--ink);
  color: var(--ground);
}

.membership__copy {
  grid-column: span 6;
}

.membership__title {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--size-title);
  line-height: 1;
}

.membership__text {
  max-width: 48ch;
  margin: 0 0 32px;
  font-size: var(--size-lead);
}

.membership__still {
  grid-column: 8 / span 5;
}

.membership__still img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* ---------- Pie de página ---------- */

.site-footer {
  padding: 40px var(--gutter) 48px;
  background: var(--tone);
}

.site-footer__main {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px 32px;
}

.site-footer__main .wordmark {
  font-size: 2.4rem;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: var(--size-note);
}

.credits {
  max-width: 70ch;
  margin: 32px 0 0;
  font-size: var(--size-body);
  line-height: 1.5;
}

/* ---------- Movimiento: entradas al hacer scroll, con respaldo ---------- */

/* Las piezas solo se desplazan al entrar; nunca se ocultan, así el contenido
   siempre está en la página aunque el movimiento no corra. */
@keyframes rise {
  from {
    transform: translateY(24px);
  }
  to {
    transform: none;
  }
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero__title {
  animation: fade-rise 900ms var(--ease-out) both;
}

.hero__body {
  animation: fade-rise 900ms 160ms var(--ease-out) both;
}

@supports (animation-timeline: view()) {
  .work,
  .section-head,
  .about > *,
  .membership > *,
  .hero__still,
  .site-footer__main,
  .credits,
  .work figcaption,
  .about__still img,
  .membership__still img {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}

/* ---------- Teléfono ---------- */

@media (max-width: 760px) {
  .site-nav {
    display: none;
  }

  .hero__copy,
  .hero__still,
  .about__copy,
  .about__still,
  .membership__copy,
  .membership__still {
    grid-column: 1 / -1;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .work,
  .work--wide {
    grid-column: 1 / -1;
  }

  .work:nth-child(even):not(.work--wide) {
    margin-top: 0;
  }
}

/* ---------- Movimiento reducido: contenido visible, sin desplazamiento ---------- */

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

  .hero__title,
  .hero__body,
  .work,
  .section-head,
  .about > *,
  .membership > *,
  .hero__still,
  .site-footer__main,
  .credits,
  .work figcaption,
  .about__still img,
  .membership__still img {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
