/* ─── LANDING — pantalla única sin scroll ────────────────────────────────── */

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

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-main);
  background: #fff;
  color: var(--color-dark);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
button { border: none; background: none; padding: 0; cursor: pointer; font: inherit; }

/* ── Intro scatter ────────────────────────────────────────────────────────── */

.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #fff;
  pointer-events: none;
  overflow: hidden;
}

.intro.intro--done { display: none; }

.s-item {
  position: absolute;
  overflow: hidden;
  border-radius: 2px;
  will-change: transform, opacity, left, top;
}

.s-item img,
.s-item__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(20%);
}

/* ── Landing layout ──────────────────────────────────────────────────────── */

.landing {
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "nav"
    "featured"
    "thumbs";
  opacity: 0;
  transition: opacity 0.6s ease;
}

.landing--visible { opacity: 1; }

/* ── Navegación ──────────────────────────────────────────────────────────── */

.l-nav {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem var(--gutter);
}

/* Logo + tagline agrupados a la izquierda */
.l-nav__brand {
  display: flex;
  align-items: center;
  gap: 1.8rem;
}

.l-nav__logo svg {
  height: 47px;
  width: auto;
  fill: var(--color-dark);
  display: block;
}

/* Tagline: "landa es" + frase rotatoria */
.l-nav__tagline {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.22rem;
  padding-left: 1.8rem;
  border-left: 1px solid rgba(26,28,26,0.13);
}

.l-nav__tl-name {
  font-size: 0.68rem;
  font-weight: var(--w-medium);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-dark);
  line-height: 1;
}

.l-nav__tl-name em {
  font-style: normal;
  font-weight: var(--w-thin);
}

.l-nav__tl-phrases {
  position: relative;
  height: 1em;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  overflow: hidden;
  width: clamp(130px, 17vw, 230px);
}

/* Las frases heredan los estilos de .l-phrase (posición absoluta, animación) */

.l-nav__links {
  display: flex;
  gap: clamp(1.5rem, 3vw, 3.5rem);
}

.l-nav__link {
  font-size: 0.72rem;
  font-weight: var(--w-medium);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-dark);
  opacity: 0.55;
  transition: opacity 0.2s;
}

.l-nav__link:hover { opacity: 1; }

/* .l-text eliminado — "landa es" + frases ahora viven en .l-nav__tagline */

.l-phrase {
  position: absolute;
  top: 0; left: 0;
  white-space: nowrap;
  font-size: 1em;
  font-weight: var(--w-light);
  font-style: italic;
  letter-spacing: 0;
  line-height: 1;
  color: var(--color-dark);
  opacity: 0;
  visibility: hidden;
  will-change: transform, opacity;
}

/* ── Imagen destacada ────────────────────────────────────────────────────── */

.l-featured {
  grid-area: featured;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0 var(--gutter);
  overflow: hidden;
}

.l-featured__frame {
  width: 60%;
  height: 100%;
  max-height: 100%;
  /* Scroll horizontal de imágenes */
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 3px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* Aparición editorial: fade + subida suave */
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity   0.55s ease,
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.l-featured__frame::-webkit-scrollbar { display: none; }

.l-featured__frame.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Cada imagen mantiene su proporción natural */
.l-featured__frame img {
  flex-shrink: 0;
  height: 100%;
  width: auto;
  display: block;
  scroll-snap-align: start;
}

/* Placeholder degradado: ocupa todo el ancho */
.l-featured__frame .l-featured__bg {
  flex-shrink: 0;
  width: 100%;
  height: 100%;
  display: block;
  scroll-snap-align: start;
}

/* ── Indicador de imágenes (líneas) ─────────────────────────────────────── */

.l-featured__indicator {
  width: 60%;
  display: flex;
  gap: 4px;
  align-items: stretch;
}

.l-indicator__seg {
  flex: 1;
  height: 1px;
  background: rgba(26,28,26,0.15);
  transition: background 0.3s ease;
}

.l-indicator__seg--active {
  background: var(--color-dark);
}

@media (max-width: 768px) { .l-featured__indicator { width: 88%; } }
@media (max-width: 480px) { .l-featured__indicator { width: 96%; } }

.l-featured__label {
  font-size: 0.72rem;
  font-weight: var(--w-regular);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-dark);
  opacity: 0.35;
  text-align: center;
  height: 1em;
  transition: opacity 0.3s;
}

/* ── Tira de miniaturas ──────────────────────────────────────────────────── */

.l-thumbs {
  grid-area: thumbs;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0.8rem var(--gutter) 1.2rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.l-thumbs::-webkit-scrollbar { display: none; }

.l-thumb {
  flex-shrink: 0;
  width: clamp(44px, 4.5vw, 68px);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  transition: transform 0.2s var(--ease);
  outline: none;
}

.l-thumb:hover { transform: scale(1.08); }
.l-thumb:focus,
.l-thumb:focus-visible { outline: none !important; box-shadow: none !important; }

.l-thumb img,
.l-thumb__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%);
  transition: filter 0.5s ease;
}

/* Miniatura activa: permanece en color */
.l-thumb--active img,
.l-thumb--active .l-thumb__bg {
  filter: grayscale(0%);
}

/* ── Ícono semilla sobre la miniatura ───────────────────────────────────── */

.l-thumb__icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
  z-index: 2;
}

.l-thumb:hover .l-thumb__icon   { opacity: 1; }
.l-thumb--active .l-thumb__icon { opacity: 1; }

/* SVG: contorno blanco por defecto (hover) */
.l-thumb__icon svg {
  width: 52%;
  height: 52%;
}

.l-thumb__icon svg path {
  fill: none;
  stroke: #fff;
  stroke-width: 18;
  stroke-linejoin: round;
  transition: fill 0.22s ease, stroke 0.22s ease;
}

/* Activo: semilla rellena */
.l-thumb--active .l-thumb__icon svg path {
  fill: #fff;
  stroke: none;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  /* En tablets: esconder las frases, mantener "landa es" */
  .l-nav__tl-phrases { display: none; }
}

@media (max-width: 768px) {
  .l-featured__frame { width: 88%; }
  .l-nav__links { gap: 1.2rem; }
}

@media (max-width: 600px) {
  /* En móvil: ocultar todo el tagline */
  .l-nav__tagline { display: none; }
}

@media (max-width: 480px) {
  .l-nav__link       { font-size: 0.62rem; letter-spacing: 0.1em; }
  .l-featured__frame { width: 96%; }
}
