/* ==========================================================================
   JA Design — joseangeldesign.com
   Archetype 07 Brutalist Grid, monochrome variant. Montserrat only.
   ========================================================================== */

@font-face { font-family: "Montserrat"; font-weight: 300; font-style: normal; font-display: swap; src: url("assets/fonts/montserrat-300.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 400; font-style: normal; font-display: swap; src: url("assets/fonts/montserrat-400.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 500; font-style: normal; font-display: swap; src: url("assets/fonts/montserrat-500.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-weight: 600; font-style: normal; font-display: swap; src: url("assets/fonts/montserrat-600.woff2") format("woff2"); }

:root {
  --bg: #0D0D0D;
  --surface: #161616;
  --line: rgba(255, 255, 255, .14);
  --text: #F2F2F0;
  --muted: #9A9A9A;
  --header-h: 64px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --section-y: clamp(72px, 11vw, 160px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--text); color: var(--bg); }

:focus-visible { outline: 1px solid var(--text); outline-offset: 4px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  padding: .75rem 1rem; background: var(--text); color: var(--bg);
  font-size: .75rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Grid + guide lines ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.grid-12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); }

/* Visible 12-column structure: hairlines at the edges and every 3 columns */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  width: min(100%, var(--max)); margin-inline: auto;
  border-inline: 1px solid var(--line);
  background:
    linear-gradient(var(--line), var(--line)) 25% 0 / 1px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(var(--line), var(--line)) 75% 0 / 1px 100% no-repeat;
  opacity: .5;
}
@media (max-width: 767px) {
  body::before { background: linear-gradient(var(--line), var(--line)) 50% 0 / 1px 100% no-repeat; }
}

/* ---------- Type ---------- */
.label, .kicker {
  font-size: .6875rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
  line-height: 1.6;
}
.kicker { display: flex; gap: 1.25em; align-items: baseline; }
.kicker__num { color: var(--text); font-weight: 600; letter-spacing: .1em; }
.h1 {
  font-size: clamp(2.25rem, 6.2vw, 5.5rem); font-weight: 600; line-height: 1.02;
  letter-spacing: .04em; text-transform: uppercase; text-wrap: balance;
}
.lead { font-size: clamp(1.35rem, 2.6vw, 2.25rem); font-weight: 300; line-height: 1.4; max-width: 30ch; text-wrap: pretty; }
.prose p + p { margin-top: 1.25em; }
.prose { font-weight: 300; font-size: clamp(1rem, 1.2vw, 1.125rem); max-width: 62ch; }
.link { text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .25em; transition: text-decoration-color .2s; }
.link:hover { text-decoration-color: currentColor; }

/* ---------- Buttons: thin border, invert on hover ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: .85rem 1.6rem; border: 1px solid var(--text); border-radius: 0;
  background: transparent; color: var(--text); cursor: pointer;
  font-size: .75rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; text-decoration: none;
  transition: background-color .2s, color .2s;
}
.btn:hover, .btn:focus-visible { background: var(--text); color: var(--bg); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  background: var(--bg); border-bottom: 1px solid var(--line);
}
.site-header__inner {
  height: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: block; padding: 6px 0; }
.brand img { height: 30px; width: auto; }
.nav__list { display: flex; gap: 2px; }
.nav__item { position: relative; }
.nav__item > a, .nav__sub a {
  display: block; padding: .6rem .9rem; text-decoration: none;
  font-size: .6875rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase;
  transition: background-color .15s, color .15s;
}
.nav__item > a:hover, .nav__item > a:focus-visible,
.nav__sub a:hover, .nav__sub a:focus-visible { background: var(--text); color: var(--bg); }
.nav a[aria-current="page"], .nav__item.is-section > a { box-shadow: inset 0 -1px 0 var(--text); }
.nav__sub {
  position: absolute; top: 100%; left: 0; min-width: 15rem; padding: 6px;
  background: var(--bg); border: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity .15s, transform .15s, visibility 0s .15s;
}
.nav__item--sub:hover .nav__sub, .nav__item--sub:focus-within .nav__sub {
  opacity: 1; visibility: visible; transform: none; transition: opacity .15s, transform .15s;
}
.menu-toggle { display: none; }

@media (max-width: 899px) {
  .menu-toggle {
    display: inline-flex; align-items: center; gap: .75rem; min-height: 44px; padding: 0 .25rem;
    background: none; border: 0; cursor: pointer;
    font-size: .6875rem; font-weight: 600; letter-spacing: .25em; text-transform: uppercase;
  }
  .menu-toggle__bars { position: relative; width: 22px; height: 1px; background: currentColor; transition: background-color .2s; }
  .menu-toggle__bars::before, .menu-toggle__bars::after {
    content: ""; position: absolute; left: 0; width: 100%; height: 1px; background: currentColor; transition: transform .25s var(--ease);
  }
  .menu-toggle__bars::before { transform: translateY(-6px); }
  .menu-toggle__bars::after { transform: translateY(6px); }
  .menu-open .menu-toggle__bars { background: transparent; }
  .menu-open .menu-toggle__bars::before { transform: rotate(45deg); }
  .menu-open .menu-toggle__bars::after { transform: rotate(-45deg); }

  .nav {
    position: fixed; inset: var(--header-h) 0 0; z-index: 49; overflow-y: auto;
    background: var(--bg); padding: 1.5rem var(--gutter) 3rem;
    display: none;
  }
  .menu-open .nav { display: block; }
  .menu-open { overflow: hidden; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__item { border-bottom: 1px solid var(--line); }
  .nav__item > a { padding: 1.1rem 0; font-size: 1.25rem; font-weight: 600; letter-spacing: .12em; }
  .nav__item > a:hover, .nav__item > a:focus-visible { padding-left: .5rem; }
  .nav__sub {
    position: static; opacity: 1; visibility: visible; transform: none; border: 0; padding: 0 0 1rem 1rem; min-width: 0;
  }
  .nav__sub a { padding: .55rem .5rem; font-size: .75rem; }
  .nav a[aria-current="page"], .nav__item.is-section > a { box-shadow: none; }
  .nav a[aria-current="page"]::before { content: "— "; }
}
/* No JS: keep the mobile nav reachable */
html:not(.js) .menu-toggle { display: none; }
@media (max-width: 899px) {
  html:not(.js) .nav { display: block; position: static; padding: 0; }
  html:not(.js) .site-header { position: static; height: auto; }
  html:not(.js) .site-header__inner { flex-wrap: wrap; padding-block: .75rem; }
  html:not(.js) main { padding-top: 0; }
}

main { padding-top: var(--header-h); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex; align-items: center;
  border-bottom: 1px solid var(--line);
  background: #000;
}
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; }
.hero__bg::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .18); }
.hero__grid { padding-block: 4rem; }
.hero__content { grid-column: 8 / span 5; }
.hero__title img { width: min(100%, 26rem); height: auto; }
.hero__tags { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--text); max-width: 34rem; }

@media (max-width: 899px) {
  .hero { flex-direction: column; align-items: stretch; justify-content: flex-end; }
  .hero__bg { position: relative; inset: auto; flex: 1 1 auto; min-height: 38svh; }
  .hero__bg img { position: absolute; inset: 0; object-position: 28% 50%; }
  .hero__bg::after { display: none; }
  .hero__grid { padding-block: 2rem 2.25rem; background: var(--bg); }
  .hero__content { grid-column: 1 / -1; }
  .hero__title img { width: min(52%, 12.5rem); }
  .hero__tags { margin-top: 1.75rem; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section-y); border-bottom: 1px solid var(--line); }
.section__label { grid-column: 1 / span 3; }
.section__body { grid-column: 4 / -1; min-width: 0; }
.section--wide .section__body { grid-column: 1 / -1; margin-top: 3rem; }
.section__actions { margin-top: 3rem; display: flex; flex-wrap: wrap; gap: 1rem; }
@media (max-width: 1023px) {
  .section__label { grid-column: 1 / -1; margin-bottom: 2.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
  .section__body { grid-column: 1 / -1; }
  .section--wide .section__body { margin-top: 0; }
}

.page-head { padding-block: clamp(64px, 10vw, 150px) clamp(48px, 7vw, 100px); border-bottom: 1px solid var(--line); }
.page-head__title { grid-column: 1 / span 7; }
.page-head__title .kicker { margin-bottom: 1.5rem; }
.page-head__intro {
  grid-column: 8 / -1; align-self: end;
  font-weight: 300; font-size: clamp(1rem, 1.3vw, 1.2rem); color: var(--text); max-width: 46ch;
}
.page-head__sub { margin-top: 1.5rem; font-size: clamp(1.1rem, 1.6vw, 1.4rem); font-weight: 300; color: var(--muted); }
@media (max-width: 1023px) {
  .page-head__title, .page-head__intro { grid-column: 1 / -1; }
  .page-head__intro { margin-top: 2rem; }
}

/* ---------- Cards (Inicio: 3 services) ---------- */
.cards { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--bg); }
.card__link { display: flex; flex-direction: column; height: 100%; padding: 1rem 1rem 1.5rem; text-decoration: none; }
.card__media { overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.card__link:hover .card__media img { transform: scale(1.04); }
.card__num { margin-top: 1.25rem; font-size: .75rem; font-weight: 600; letter-spacing: .15em; color: var(--muted); }
.card__title { margin-top: .25rem; font-size: 1.25rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.card__more { margin-top: 1.25rem; align-self: flex-start; font-size: .6875rem; font-weight: 500; letter-spacing: .25em; text-transform: uppercase; padding: .35rem .5rem; margin-left: -.5rem; transition: background-color .15s, color .15s; }
.card__link:hover .card__more, .card__link:focus-visible .card__more { background: var(--text); color: var(--bg); }
@media (max-width: 1023px) { .cards--3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 639px) { .cards--3 { grid-template-columns: 1fr; } }

/* ---------- Client logos ---------- */
.clients { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.clients--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.clients--15 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.clients__cell {
  background: var(--bg); aspect-ratio: 16 / 9;
  display: flex; align-items: center; justify-content: center; padding: 1.25rem;
}
.clients__cell a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.clients__cell img {
  max-width: 72%; max-height: 52px; width: auto; height: auto; object-fit: contain;
  filter: brightness(0) invert(1); opacity: .85; transition: filter .3s, opacity .3s;
}
.clients__cell:hover img { filter: none; opacity: 1; }
@media (max-width: 1023px) { .clients--15 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 539px) {
  .clients--6, .clients--15 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clients__cell img { max-height: 40px; }
}

/* ---------- Quotes ---------- */
.quotes { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.quotes--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.quotes--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quote { background: var(--bg); padding: 1rem 1rem 2rem; }
.quote figure { display: flex; flex-direction: column; height: 100%; }
.quote__media { aspect-ratio: 1; overflow: hidden; background: var(--surface); margin-bottom: 1.75rem; }
.quote__media img { width: 100%; height: 100%; object-fit: cover; }
.quote blockquote { font-weight: 300; font-size: 1.0625rem; line-height: 1.65; flex: 1; }
.quote figcaption { margin-top: 1.5rem; color: var(--text); }
.quote--text { padding: clamp(1.5rem, 3vw, 2.5rem); }
.stars { width: 88px; height: auto; margin-bottom: 1.5rem; }
@media (max-width: 1023px) { .quotes--3 { grid-template-columns: 1fr; } .quote__media { aspect-ratio: 16 / 10; } }
@media (max-width: 767px) { .quotes--2 { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.cta { padding-block: var(--section-y); border-bottom: 1px solid var(--line); background: var(--surface); }
.cta__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem; }
.cta__text { font-size: clamp(2rem, 5.5vw, 4.75rem); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; line-height: 1.05; }

/* ---------- Split (Sobre mí / Metodología) ---------- */
.split { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); align-items: start; }
.split__media { grid-column: 1 / span 4; background: var(--surface); }
.split__text { grid-column: 6 / -1; }
.split--reverse .split__media { grid-column: 6 / -1; grid-row: 1; }
.split--reverse .split__text { grid-column: 1 / span 4; grid-row: 1; }
.split__media img { width: 100%; }
@media (max-width: 767px) {
  .split { grid-template-columns: 1fr; row-gap: 2rem; }
  .split__media, .split__text, .split--reverse .split__media, .split--reverse .split__text { grid-column: 1; grid-row: auto; }
}

/* ---------- Services (5 columns) ---------- */
.services { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.service { background: var(--bg); padding: clamp(1.25rem, 2vw, 2rem) clamp(1rem, 1.5vw, 1.5rem) 2.5rem; }
.service__num { font-size: .75rem; font-weight: 600; letter-spacing: .15em; color: var(--muted); }
.service__title { margin-top: 2.5rem; min-height: 2.6em; font-size: 1rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; line-height: 1.3; }
.service__list { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.service__list li { padding: .7rem 0; border-bottom: 1px solid var(--line); font-weight: 300; font-size: .9375rem; }
@media (max-width: 1023px) { .services { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 539px) { .services { grid-template-columns: 1fr; } .service__title { min-height: 0; margin-top: 1.25rem; } }

/* ---------- Portfolio blocks ---------- */
.pblock { padding-block: clamp(48px, 7vw, 96px); border-bottom: 1px solid var(--line); }
.pblock__num { grid-column: 1 / span 1; font-size: .75rem; font-weight: 600; letter-spacing: .15em; color: var(--muted); }
.pblock__media { grid-column: 2 / span 7; display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface); }
.pblock__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.pblock:hover .pblock__media img { transform: scale(1.03); }
.pblock__text { grid-column: 10 / -1; align-self: end; }
.pblock__title { font-size: clamp(1.75rem, 3.4vw, 3rem); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; line-height: 1.05; }
.pblock__title a { text-decoration: none; }
.pblock__text p { margin-block: 1.25rem 2rem; font-weight: 300; color: var(--text); max-width: 34ch; }
@media (max-width: 1023px) {
  .pblock__num { grid-column: 1 / -1; margin-bottom: 1rem; }
  .pblock__media { grid-column: 1 / -1; }
  .pblock__text { grid-column: 1 / -1; margin-top: 1.75rem; }
}

/* ---------- Project galleries ---------- */
.project { padding-block: clamp(56px, 8vw, 120px); border-bottom: 1px solid var(--line); }
.project__head { grid-column: 1 / span 4; align-self: start; position: sticky; top: calc(var(--header-h) + 32px); padding-right: 1rem; }
.project__num { font-size: .75rem; font-weight: 600; letter-spacing: .15em; color: var(--muted); }
.project__title { margin-top: 1.25rem; font-size: clamp(1.35rem, 2.2vw, 2rem); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; line-height: 1.15; text-wrap: balance; }
.project__place { margin-top: 1rem; font-size: .6875rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.gallery { grid-column: 5 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(8px, 1vw, 14px); }
.gallery__item { display: block; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface); cursor: zoom-in; }
.gallery__item:first-child { grid-column: 1 / -1; }
.gallery__item:last-child:nth-child(even) { grid-column: 1 / -1; }   /* no orphan cell */
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.gallery__item:hover img, .gallery__item:focus-visible img { transform: scale(1.04); }
.gallery__item:focus-visible { outline-offset: 2px; }
@media (max-width: 1023px) {
  .project__head { grid-column: 1 / -1; position: static; margin-bottom: 2rem; padding-right: 0; }
  .gallery { grid-column: 1 / -1; }
}
@media (max-width: 479px) { .gallery { grid-template-columns: 1fr; } }

.download { display: flex; }

/* ---------- Videos ---------- */
.project--video .video { grid-column: 5 / -1; background: var(--surface); }
.video video { width: 100%; height: auto; background: #000; }
.video--portrait { max-width: 420px; }
.video--square { max-width: 720px; }
@media (max-width: 1023px) { .project--video .video { grid-column: 1 / -1; } }

/* ---------- Contact ---------- */
.contact__form { grid-column: 1 / span 7; }
.contact-aside { grid-column: 9 / -1; }
.contact-aside .label { margin-top: 2rem; margin-bottom: .35rem; }
.contact-aside .label:first-child { margin-top: 0; }
.contact-aside__note { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-weight: 300; }
@media (max-width: 1023px) {
  .contact__form, .contact-aside { grid-column: 1 / -1; }
  .contact-aside { margin-top: 4rem; }
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2rem; }
@media (max-width: 599px) { .form__row { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.75rem; }
.field label { display: block; margin-bottom: .5rem; font-size: .6875rem; font-weight: 500; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.field__opt { letter-spacing: .1em; text-transform: none; }
.field input, .field textarea {
  display: block; width: 100%; padding: .75rem 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; font-weight: 300; font-size: 1.0625rem; transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--text); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; }
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: var(--text); border-bottom-style: dashed; }
.form__error { margin-bottom: 1.25rem; font-size: .875rem; }
.form__note { margin-top: 1.5rem; font-size: .875rem; font-weight: 300; color: var(--muted); max-width: 52ch; }

/* ---------- Social ---------- */
.social { display: flex; gap: .5rem; margin-top: .25rem; }
.social a { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); transition: background-color .15s, border-color .15s; }
.social img { width: auto; height: 18px; transition: filter .15s; }
.social a:hover, .social a:focus-visible { background: var(--text); border-color: var(--text); }
.social a:hover img, .social a:focus-visible img { filter: invert(1); }

/* ---------- Footer ---------- */
.site-footer { padding-top: clamp(56px, 8vw, 104px); font-size: .9375rem; font-weight: 300; }
.site-footer__grid { row-gap: 2.5rem; }
.site-footer__brand { grid-column: 1 / span 3; }
.site-footer__brand img { width: 128px; height: auto; }
.site-footer__contact { grid-column: 5 / span 3; }
.site-footer__social { grid-column: 8 / span 2; }
.site-footer__legal { grid-column: 10 / span 3; }
.site-footer .label { margin-bottom: .75rem; }
.site-footer__bottom { margin-top: clamp(48px, 6vw, 88px); padding-block: 1.5rem; border-top: 1px solid var(--line); font-size: .75rem; color: var(--muted); }
@media (max-width: 1023px) {
  .site-footer__brand { grid-column: 1 / -1; }
  .site-footer__contact { grid-column: 1 / span 6; }
  .site-footer__social { grid-column: 7 / span 6; }
  .site-footer__legal { grid-column: 1 / -1; }
}
@media (max-width: 539px) { .site-footer__contact, .site-footer__social { grid-column: 1 / -1; } }

/* ---------- Legal ---------- */
.legal { grid-column: 4 / span 7; }
.legal h2 { margin-top: 3rem; margin-bottom: 1rem; font-size: .875rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }
.legal h2:first-child { margin-top: 0; }
.legal ul { margin-block: 1rem; }
.legal li { padding: .4rem 0 .4rem 1.25rem; position: relative; }
.legal li::before { content: ""; position: absolute; left: 0; top: 1.15em; width: .5rem; height: 1px; background: var(--muted); }
.legal strong { font-weight: 500; }
@media (max-width: 1023px) { .legal { grid-column: 1 / -1; } }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(13, 13, 13, .97); color: var(--text);
}
.lightbox::backdrop { background: rgba(0, 0, 0, .6); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); padding-inline: var(--gutter); border-bottom: 1px solid var(--line); }
.lightbox__count { font-size: .75rem; font-weight: 600; letter-spacing: .2em; }
.lightbox__stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; padding: clamp(12px, 3vw, 40px) clamp(56px, 7vw, 96px); }
.lightbox__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox__caption { min-height: 3rem; padding: .9rem var(--gutter); border-top: 1px solid var(--line); font-size: .8125rem; font-weight: 300; color: var(--muted); }
.lightbox__btn {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  background: transparent; border: 1px solid var(--line); cursor: pointer; font-size: 1.1rem; line-height: 1;
  transition: background-color .15s, color .15s, border-color .15s;
}
.lightbox__btn:hover, .lightbox__btn:focus-visible { background: var(--text); color: var(--bg); border-color: var(--text); }
.lightbox__prev, .lightbox__next { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: clamp(4px, 2vw, 24px); }
.lightbox__next { right: clamp(4px, 2vw, 24px); }
@media (max-width: 599px) {
  .lightbox__stage { padding: 12px 8px 72px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 12px; transform: none; }
  .lightbox__prev { left: calc(50% - 56px); }
  .lightbox__next { right: calc(50% - 56px); }
}

/* ---------- Reveal on scroll (JS adds .is-visible; content shows without JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
/* Safety net: if main.js never runs, show everything after 4s anyway */
.js .reveal:not(.is-visible) { animation: revealSafety .01s 4s forwards; }
@keyframes revealSafety { to { opacity: 1; transform: none; } }
.reveal[data-split] { opacity: 1; transform: none; }

/* ---------- Reduced motion: no movement, content shown at once ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .gallery__item img, .card__media img, .pblock__media img { transition: none; }
  .gallery__item:hover img, .gallery__item:focus-visible img, .card__link:hover .card__media img, .pblock:hover .pblock__media img { transform: none; }
}
