/* Devalo Studio — estilos
   Colores y medidas principales arriba, para poder cambiarlos fácilmente */
:root {
  --amarillo: #DFB822;  /* color del logo: subrayado de los botones y del enlace */
  --fondo: #ffffff;
  --texto: #1f1f1f;     /* color de TODOS los textos */
  --placeholder: #f1f1f1;
  --margen: 24px;       /* margen lateral de cabecera y pie */
  --gap: 6px;           /* espacio entre fotos (lo ajusta el JS en móvil) */
  --alto-logo: 64px;    /* altura del logo en la cabecera (ordenador) */
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 400 14px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---------- Cabecera fija: claim | logo centrado | botones ---------- */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 24px;
  padding: 8px var(--margen);
  background: var(--fondo);
  border-bottom: 1px solid transparent;
  transition: border-color .25s;
}

/* Línea fina que aparece al bajar, para separar la cabecera de las fotos */
.cabecera.con-borde { border-bottom-color: #ececec; }

/* Claim y botones comparten tipografía */
.claim,
.nav a {
  font-weight: 800;
  text-transform: uppercase;
  color: var(--texto);
}

.claim {
  grid-column: 1;
  justify-self: start;
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: .12em;
}

.marca { grid-column: 2; justify-self: center; display: block; line-height: 0; }
.logo { display: block; height: var(--alto-logo); width: auto; }

.nav { grid-column: 3; justify-self: end; display: flex; gap: 32px; }

.nav a {
  font-size: 15px;
  letter-spacing: .12em;
  text-decoration: none;
  padding: 8px 0;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: border-color .2s;
}

.nav a:hover,
.nav a[aria-current="page"] { border-bottom-color: var(--amarillo); }

.nav a:focus-visible { outline: 2px solid var(--texto); outline-offset: 4px; }

/* ---------- Muro de fotos (filas justificadas) ---------- */
.muro { margin: 0 var(--gap) var(--gap); }

.fila { display: flex; width: 100%; }
.fila + .fila { margin-top: var(--gap); }

.foto {
  display: block;
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--placeholder);
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

.foto img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .5s ease;
}

.foto img.ok { opacity: 1; }

@media (hover: hover) {
  .foto img.ok:hover { opacity: .9; }
}

.foto:focus-visible { outline: 2px solid var(--texto); outline-offset: -2px; }

/* ---------- Pie (página principal) ---------- */
.pie {
  padding: 36px var(--margen) 40px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* ---------- Página About / Contact ---------- */
/* La imagen se ajusta a la altura de la pantalla para que se vea entera junto con los datos */
.about-img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100% - 2 * var(--margen), 1200px);
  max-height: calc(100vh - 215px);
  margin: 24px auto 0;
}

.datos {
  max-width: 900px;
  margin: 28px auto 0;
  padding: 0 var(--margen) 64px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  line-height: 2;
  letter-spacing: .06em;
  word-spacing: .12em;
  user-select: text;
  -webkit-user-select: text;
}

/* Cada dato se mantiene entero; si falta sitio, la línea se parte en los "·" */
.datos .dato { white-space: nowrap; }

.datos a {
  text-decoration: underline;
  text-decoration-color: var(--amarillo);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.datos a:hover { text-decoration-color: var(--texto); }

/* ---------- Visor a pantalla completa ---------- */
#visor {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #fff;
  overscroll-behavior: contain;
}
#visor[hidden] { display: none; }

#v-escena {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 60px 72px;
  cursor: default;
}

#v-img {
  display: block;
  flex: none;
  max-width: none;
  max-height: none;
  user-select: none;
  -webkit-user-drag: none;
}

.v-barra {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 10px 24px;
  pointer-events: none;
}
.v-barra > * { pointer-events: auto; }

#v-cont { font-size: 11px; letter-spacing: .2em; }

.v-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--texto);
  cursor: pointer;
  transition: background .2s;
}
.v-btn:hover { background: #f1f1f1; }
.v-btn:focus-visible { outline: 2px solid var(--texto); }
.v-btn svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

.v-flecha { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; }
#v-prev { left: 12px; }
#v-next { right: 12px; }

/* ---------- Tablet y pantallas medianas: logo arriba, claim y botones debajo ---------- */
@media (max-width: 999px) {
  :root { --alto-logo: 48px; }

  .cabecera {
    grid-template-columns: 1fr auto;
    grid-template-areas: "logo logo" "claim nav";
    row-gap: 4px;
    padding: 8px var(--margen) 6px;
  }
  .marca { grid-area: logo; }
  .claim { grid-area: claim; font-size: 12px; letter-spacing: .1em; }
  .nav { grid-area: nav; gap: 24px; }
  .nav a { font-size: 13px; letter-spacing: .1em; padding: 5px 0; border-bottom-width: 2px; }

  #v-escena { padding: 56px 16px; }
}

/* ---------- Móvil ---------- */
@media (max-width: 520px) {
  :root { --margen: 14px; --alto-logo: 40px; }

  .cabecera { column-gap: 10px; }
  .claim { font-size: 10px; letter-spacing: .05em; line-height: 1.25; }
  .nav { gap: 12px; }
  .nav a { font-size: 12px; letter-spacing: .05em; }

  .about-img { margin-top: 16px; }
  .datos { font-size: 12.5px; letter-spacing: .04em; padding-bottom: 48px; }

  #v-escena { padding: 52px 0; }
}

/* Móviles muy estrechos */
@media (max-width: 370px) {
  .claim { font-size: 9px; letter-spacing: .03em; }
  .nav { gap: 9px; }
  .nav a { font-size: 11px; letter-spacing: .03em; }
}

/* En pantallas táctiles se navega deslizando; ocultamos las flechas */
@media (hover: none) and (pointer: coarse) {
  .v-flecha { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .foto img { transition: none; }
}
