/* =========================================================
   TOKENS
   Cambia estos valores para ajustar la paleta y tipografía
   de toda la web desde un único sitio.
   ========================================================= */
:root{
  --bg: #0B0B0C;
  --bg-soft: #131315;
  --fg: #EDEBE6;
  --fg-muted: #8C8C90;
  --line: #232325;

  --font-display: "Big Shoulders Display", sans-serif;
  --font-body: "Inter", sans-serif;

  --gap: 14px;
  --radius: 2px;
}

*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }

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

::selection{ background: var(--fg); color: var(--bg); }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* =========================================================
   CABECERA
   ========================================================= */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  background: rgba(11,11,12,0.86);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.logo{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.site-nav{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill{
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.filter-pill:hover{
  color: var(--fg);
  border-color: var(--fg-muted);
}

.filter-pill.is-active{
  color: var(--bg);
  background: var(--pill);
  border-color: var(--pill);
  font-weight: 600;
}

.nav-contact{
  margin-left: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border: 1px solid var(--fg);
  border-radius: 999px;
}
.nav-contact:hover{ background: var(--fg); color: var(--bg); }

.nav-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span{
  width: 22px; height: 2px; background: var(--fg);
}

/* =========================================================
   HERO
   ========================================================= */
.hero{
  position: relative;
  padding: 14vh 28px 10vh;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

/* Imagen de fondo del hero, en baja opacidad para que el texto
   siga siendo el protagonista. Cambia el valor de "opacity" (0 a 1)
   para hacerla más o menos visible. */
.hero-bg{
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: var(--hero-bg-position, center);
  opacity: 0.22;
  z-index: 0;
}

/* Degradado para que el texto se lea bien incluso sobre zonas
   claras de la foto */
.hero-bg::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,11,12,0.2) 0%, var(--bg) 92%);
}

.hero-title, .hero-sub, .hero-scroll{
  position: relative;
  z-index: 1;
}

.hero-title{
  margin: 0;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(48px, 10vw, 128px);
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.hero-title span{ display: block; }

.hero-sub{
  max-width: 46ch;
  margin: 28px 0 0;
  color: var(--fg-muted);
  font-size: 16px;
  line-height: 1.6;
}

.hero-scroll{
  display: inline-block;
  margin-top: 36px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
  border-bottom: 1px solid var(--fg);
  padding-bottom: 3px;
}

/* =========================================================
   GALERÍA — grid tipo "mosaico" con CSS columns
   ========================================================= */
.gallery{ padding: 40px 28px 100px; scroll-margin-top: 76px; }

.gallery-meta{
  color: var(--fg-muted);
  font-size: 13px;
  margin-bottom: 18px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.grid{
  column-count: 4;
  column-gap: var(--gap);
}

@media (max-width: 1200px){ .grid{ column-count: 3; } }
@media (max-width: 800px){ .grid{ column-count: 2; } }
@media (max-width: 480px){ .grid{ column-count: 1; } }

.item{
  break-inside: avoid;
  margin-bottom: var(--gap);
  position: relative;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.item.hidden{ display: none; }

/* Marcador de posición: sustitúyelo por <img> real (ver comentario en index.html).
   El degradado usa el color --tint de cada pieza a modo de "chip Pantone". */
.placeholder{
  width: 100%;
  aspect-ratio: 4 / 5;
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--tint) 22%, var(--bg-soft)) 0%, var(--bg-soft) 65%);
}

.item.tall .placeholder{ aspect-ratio: 4 / 6.2; }
.item.short .placeholder{ aspect-ratio: 4 / 3.4; }

.item-info{
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: linear-gradient(0deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 100%);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .2s ease, transform .2s ease;
}

.item:hover .item-info,
.item:focus-within .item-info{
  opacity: 1;
  transform: translateY(0);
}

.item:hover .placeholder{
  filter: brightness(0.8);
}

.item-title{ font-size: 14px; font-weight: 600; }
.item-cat{ font-size: 12px; color: var(--tint); font-weight: 600; }

/* =========================================================
   FOOTER / CONTACTO
   ========================================================= */
.site-footer{
  border-top: 1px solid var(--line);
  padding: 90px 28px 30px;
}

.footer-main h2{
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 6vw, 49px);
  line-height: 1;
  margin: 0 0 28px;
  text-transform: uppercase;
}

.footer-email{
  display: inline-block;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 4px;
}

/* Formulario de contacto */
.contact-form{
  max-width: 480px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row{
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-row label{
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
}

.form-row input,
.form-row textarea{
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus{
  outline: none;
  border-color: var(--fg);
}

.form-submit{
  align-self: flex-start;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--bg);
  background: var(--fg);
  border: none;
  border-radius: 999px;
  padding: 12px 26px;
  cursor: pointer;
  transition: opacity .15s ease;
}
.form-submit:hover{ opacity: 0.85; }
.form-submit:disabled{ opacity: 0.5; cursor: not-allowed; }

.form-status{
  font-size: 13px;
  min-height: 1em;
  margin: 0;
}
.form-status.is-success{ color: #EDEBE6; }
.form-status.is-error{ color: #FF5B4E; }

/* Campo anti-spam oculto para personas, visible solo para bots */
.hp-field{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.footer-bottom{
  margin-top: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--fg-muted);
  font-size: 13px;
}

.socials{ display: flex; gap: 18px; }
.socials a:hover{ color: var(--fg); }

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(11,11,12,0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh 6vw;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 100;
}
.lightbox.is-open{ opacity: 1; pointer-events: auto; }

.lightbox-content{
  max-width: 900px;
  max-height: 88vh;
  width: 100%;
}
.lightbox-content .placeholder{ aspect-ratio: 4/5; }

.lightbox-close{
  position: absolute;
  top: 24px; right: 28px;
  background: none;
  border: none;
  color: var(--fg);
  font-size: 22px;
  cursor: pointer;
}

/* =========================================================
   RESPONSIVE — menú móvil
   ========================================================= */
/* En pantallas estrechas la foto se recorta mucho más (la pantalla
   es alta y estrecha). Por defecto centramos algo más arriba, que
   suele conservar mejor la parte principal de la imagen. Puedes
   afinarlo tú mismo cambiando el porcentaje. */
@media (max-width: 600px){
  .hero-bg{
    /* "background-size: auto 150%" hace la imagen un poco más
       grande de lo estrictamente necesario, para que sobre margen
       vertical y así "background-position" pueda moverla arriba/
       abajo (con una foto muy panorámica, sin este zoom no sobra
       nada de alto para desplazar). Sube el 150% si quieres más
       margen de movimiento, o bájalo si se ve demasiado ampliada. */
    background-size: auto 140%;
    background-position: var(--hero-bg-position-mobile, 58% 40%);
  }
}

@media (max-width: 860px){
  .nav-toggle{ display: flex; }

  .site-nav{
    position: fixed;
    top: 62px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 18px 28px 24px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
  }
  .site-nav.is-open{
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-contact{ margin-left: 0; margin-top: 8px; }
}
