@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@400;600;700&display=swap");

/* Index-specific styles */

.nav__logo {
  height: 200px; /* ajusta según lo grande que lo quieras */
  width: auto;
  display: block;
}
.hero {
  position: relative;
}

.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 0;
}

.carousel-viewport {
  position: relative;
  height: 76vh;
  min-height: 520px;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition:
    opacity 700ms ease,
    transform 900ms ease;
}

.slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.62) saturate(0.95);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 40px 0;
}

.hero-card {
  width: min(980px, calc(100% - 40px));
  text-align: center;
  color: #fff;
}

.hero-title {
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  margin: 0;
}

.hero-sub {
  margin: 14px auto 0;
  max-width: 56ch;
  font-size: 1.05rem;
  opacity: 0.95;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid rgba(255, 255, 255, 0.8);
  background: transparent;
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
  transition:
    transform 0.18s ease,
    background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
}

.btn.btn-gold {
  border-color: transparent;
  background: rgba(198, 170, 127, 0.95);
  color: #111;
}

.btn.btn-gold:hover {
  background: rgba(217, 188, 144, 0.95);
}

.carousel-controls {
  position: absolute;
  inset: auto 0 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px;
  pointer-events: none;
}

.carousel-btn {
  pointer-events: all;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: 0.18s ease;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.38);
  transform: translateY(-1px);
}

.dots {
  pointer-events: all;
  display: flex;
  gap: 8px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  border: 0;
  cursor: pointer;
}

.dot.is-active {
  background: rgba(198, 170, 127, 0.95);
}

/* Sections */
.section {
  padding: 70px 0;
}

.section-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.2rem;
  margin: 0 0 10px;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
}

@media (max-width: 920px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card img {
  height: 420px;
  width: 100%;
  object-fit: cover;
}

.lead {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #222;
}

/* Featured works carousel */
.works .carousel-viewport {
  height: 440px;
  min-height: auto;
}

.works .slide img {
  filter: none;
}

#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  overflow: hidden;
}

/* Las cortinas */
#loader .revealers,
#loader.revealers {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

/* OJO: en tu HTML actual .revealers ES el loader,
   así que #loader también actúa como contenedor.
*/
#loader .revealer,
#loader .revealer {
  flex: 1;
  width: 100%;
  background-color: #fff;
  clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
}

/* Contenedor de imágenes centrado */
#loader .images {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  will-change: transform;
}

/* Cada imagen centrada y escalada */
#loader .img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%) scale(1.5);
  will-change: transform;
  opacity: 0; /* IMPORTANTE */
}

/* Solo la primera visible inicialmente */
#loader .img:first-child {
  opacity: 1;
}

#loader .img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* (Opcional) Si usas el stack al final con Flip */
#loader .images.stacked-container {
  position: fixed;
  left: 2em;
  bottom: 2em;
  width: auto;
  height: auto;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 1em;
  transform: none;
  will-change: transform;
}

#loader .img.stacked {
  position: relative;
  width: 150px;
  height: 100px;
  transform: none;
  top: auto;
  left: auto;
  opacity: 1;
}
