/* ============================================================
   BUNKER DE JOYAS — styles.css
   Estética: oscura, cinematográfica, minimalista, brutalista/premium
   ============================================================ */

:root{
  --bg: #000000;
  --fg: #ffffff;
  --accent: #1A1AFF;
  --accent-dim: #1A1AFF66;
  --grey: #8a8a8a;
  --line: #2a2a2a;
  --panel: #0a0a0a;
  --display: 'Special Gothic Expanded One', sans-serif;
  --mono: 'Space Mono', 'Courier New', monospace;
}

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

html{ scroll-behavior: smooth; }

body{
  background: var(--bg);
  color: var(--fg);
  font-family: var(--mono);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection{ background: var(--accent); color: #fff; }

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

::-webkit-scrollbar{ width: 8px; }
::-webkit-scrollbar-track{ background: #000; }
::-webkit-scrollbar-thumb{ background: var(--accent); }

.eyebrow{
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 600;
}

.section-title{
  font-family: var(--display);
  font-weight: 400;
  font-size: 50px !important;
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.rule{
  width: 64px;
  height: 3px;
  background: var(--accent);
  margin-top: 18px;
}

.container{
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

section{
  padding: 140px 0;
  position: relative;
  border-bottom: 1px solid var(--line);
}

/* ---------- HEADER ---------- */
header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 40px;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: padding 0.3s ease;
}

.logo{
  font-family: 'Space Mono', 'Courier New', monospace;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.logo span{ color: var(--accent); }

nav{
  display: flex;
  gap: 32px;
}
nav a{
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg);
  position: relative;
  padding-bottom: 4px;
  font-weight: 500;
}
nav a::after{
  content:'';
  position:absolute;
  left:0; bottom:0;
  width:0%; height:1px;
  background: var(--accent);
  transition: width 0.25s ease;
}
nav a:hover::after{ width:100%; }
nav a:hover{ color: var(--accent); }

.nav-toggle{
  display:none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background:none;
  border:none;
  z-index: 1100;
}
.nav-toggle span{
  width: 26px; height: 2px; background: #fff; display:block;
}

/* ---------- HERO ---------- */
#home{
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  padding: 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.hero-media{
  position: absolute;
  inset: 0;
  z-index: 1;
  background: transparent;
  overflow: hidden;
}
.hero-video-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw !important;
  height: 100vh !important;
  object-fit: cover !important;
  transform: translate(-50%, -50%);
  border: none;
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.8s ease;
}
.hero-video-frame.loaded{ opacity: 1; }
.hero-fallback{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.15) brightness(0.4);
  opacity: 0.55;
}
.hero-overlay{
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(90deg, #000 12%, rgba(0,0,0,0.35) 55%, #000 100%),
              linear-gradient(0deg, #000 0%, transparent 32%);
}

.hero-content{
  position: relative;
  z-index: 3;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 0 40px;
}

.hero-eyebrow{
  color: var(--accent);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.3em;
  margin-bottom: 24px;
  font-weight: 600;
  min-height: 1em;
}
.hero-eyebrow .cursor{
  display: inline-block;
  width: 8px;
  height: 0.95em;
  margin-left: 3px;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink-cursor 1s steps(1, end) infinite;
}
@keyframes blink-cursor{
  0%, 49%{ opacity: 1; }
  50%, 100%{ opacity: 0; }
}

.hero-title{
  font-family: 'Special Gothic Expanded One', sans-serif;
  font-size: clamp(34px, 5.4vw, 74px);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  max-width: 100%;
}
.hero-title .de{
  color: var(--accent);
  display: inline-block;
  margin-right: clamp(16px, 2.6vw, 36px);
}

@media (max-width: 700px){
  .hero-title{
    font-size: clamp(38px, 10vw, 58px);
    line-height: 0.9;
    white-space: normal;
  }
  .hero-title br{
    display: none;
  }
  .hero-title .de{
    margin-right: 10px;
  }
  .hero-content{
    padding: 0 24px;
  }
  .hero-sub{
    white-space: normal;
    max-width: 100%;
  }
}

.hero-sub{
  margin-top: 28px;
  font-family: var(--mono);
  font-size: clamp(9px, 1.15vw, 13px);
  letter-spacing: 0.1em;
  color: var(--grey);
  max-width: 480px;
  white-space: nowrap;
}

.scroll-indicator{
  position: absolute;
  right: 40px;
  bottom: 60px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.scroll-indicator span{
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--grey);
  text-transform: uppercase;
}
.scroll-line{
  width: 1px; height: 70px;
  background: linear-gradient(var(--accent), transparent);
  animation: scrollpulse 2s ease-in-out infinite;
}
@keyframes scrollpulse{
  0%,100%{ opacity: 0.3; }
  50%{ opacity: 1; }
}

/* ---------- PIEZAS ---------- */
.piezas-grid{
  margin-top: 70px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: transparent; /* sin fondo expuesto: las celdas vacías no muestran recuadro */
}
.pieza{
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #050505;
  border: 1px solid var(--line);
  cursor: pointer;
}
.pieza img{
  width: 100%; height: 100%;
  object-fit: cover;
  filter: none; /* colores originales, sin oscurecer */
  transition: transform 0.7s cubic-bezier(.19,1,.22,1), opacity 0.35s ease;
}
.pieza:hover img{
  transform: scale(1.08);
  opacity: 0.85; /* único efecto de hover: opacidad leve, sin filtros de color */
}
.pieza-label{
  position: absolute;
  left: 0; bottom: 0; right: 0;
  padding: 18px 20px;
  background: linear-gradient(0deg, rgba(0,0,0,0.9), transparent);
  transform: translateY(12px);
  opacity: 0;
  transition: all 0.35s ease;
}
.pieza:hover .pieza-label{ opacity: 1; transform: translateY(0); }
.pieza-label .num{ color: var(--accent); font-size: 10px; letter-spacing: 0.2em; }
.pieza-label .name{ font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.pieza-label .material{ font-family: var(--mono); font-size: 10px; color: var(--grey); letter-spacing: 0.03em; margin-top: 6px; text-transform: none; }

/* Si algún casillero de la grilla no tiene imagen, se oculta limpio (sin recuadro gris) */
.pieza:empty,
.pieza:not(:has(img)){
  display: none;
}
/* Fallback adicional: si el <img> no tiene src, ocultar la pieza entera */
.pieza:has(img[src=""]){
  display: none;
}

/* ---------- CARRUSEL ---------- */
.carousel-section{
  padding: 0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.carousel-track{
  display: flex;
  width: max-content;
  animation: carousel-scroll 32s linear infinite;
}
.carousel-track:hover{
  animation-play-state: paused;
}
@keyframes carousel-scroll{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}
.carousel-item{
  flex: 0 0 auto;
  width: 200px;
  height: 140px;
  margin-right: 1px;
  position: relative;
  overflow: hidden;
  background: #0a0a0a;
  border-right: 1px solid var(--line);
}
.carousel-item img {
  filter: grayscale(100%);
  width: 100%;
height: 100%;
object-fit: cover;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.carousel-item:hover img {
  filter: grayscale(0%) !important;
  transform: scale(1.05);
}
.carousel-item img:hover{
  filter: grayscale(0%);
}
.carousel-placeholder{
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  filter: grayscale(100%);
  transition: filter 0.4s ease;
}
.carousel-placeholder:hover{
  filter: grayscale(0%);
}
.carousel-placeholder span{
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--grey);
  text-transform: uppercase;
}

/* ---------- WORKSHOPS ---------- */
.workshop-banner{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  margin-bottom: 90px;
  background: var(--line);
  border: 1px solid var(--line);
}
.workshop-banner img{
  width: 100%; height: 220px; object-fit: cover;
  filter: grayscale(100%) contrast(1.2) brightness(0.65);
  transition: filter 0.4s ease;
}
.workshop-banner img:hover{ filter: grayscale(0%) contrast(1.05) brightness(0.9); }

.cards{
  margin-top: 70px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.card{
  background: var(--panel);
  padding: 50px 44px;
  display: flex;
  flex-direction: column;
}
.card-tag{
  display: inline-block;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--accent-dim);
  padding: 6px 12px;
  width: fit-content;
  margin-bottom: 24px;
  font-weight: 600;
}
.card h3{
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 40px);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 22px;
}
.card p.desc{
  font-size: 13.5px;
  line-height: 1.85;
  color: #c7c7c7;
  margin-bottom: 26px;
}
.card ul{
  list-style: none;
  margin-bottom: 26px;
}
.card ul li{
  font-size: 12.5px;
  color: var(--grey);
  padding: 9px 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card ul li::before{
  content: '—';
  color: var(--accent);
}
.tech-specs{
  font-size: 11.5px;
  color: var(--accent);
  letter-spacing: 0.08em;
  line-height: 2;
  margin-bottom: 30px;
  text-transform: uppercase;
}
.price-block{
  margin-top: auto;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}
.price{
  font-family: var(--display);
  font-size: 34px;
}
.price small{
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--grey);
  font-weight: 400;
  margin-top: 6px;
  text-transform: none;
  letter-spacing: 0.02em;
}
.btn-link{
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--fg);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
  transition: color 0.25s ease, letter-spacing 0.25s ease;
  white-space: nowrap;
}
.btn-link:hover{ color: var(--accent); letter-spacing: 0.22em; }

/* ---------- CLASES ---------- */
.clases-grid{
  margin-top: 60px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 70px;
  align-items: start;
}
.clases-lead{
  font-size: 22px;
  line-height: 1.5;
  color: var(--fg);
  margin-bottom: 40px;
  font-family: var(--mono);
  font-weight: 500;
}
.clases-text p{
  font-size: 13.5px;
  line-height: 1.9;
  color: #c7c7c7;
  margin-bottom: 40px;
  max-width: 520px;
}
.price-table{
  border-top: 1px solid var(--line);
  margin-bottom: 40px;
}
.price-row{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.price-row .label{
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--grey);
  text-transform: uppercase;
}
.price-row .value{
  font-family: var(--display);
  font-size: 20px;
  text-align: right;
}
.price-row .value small{
  display:block;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--grey);
  font-weight: 400;
  margin-top: 4px;
}
.clases-img{
  position: relative;
  height: 100%;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.clases-img img{
  width: 100%; height: 100%;
  object-fit: cover;
  filter: none; /* colores originales, sin oscurecer */
}

/* ---------- TALLER ---------- */
.taller-grid{
  margin-top: 60px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 70px;
}
.taller-heading{
  font-family: var(--display);
  font-size: clamp(26px, 2.6vw, 36px);
  text-transform: uppercase;
  line-height: 1.15;
  margin-bottom: 30px;
  max-width: 420px;
}
.taller-text p{
  font-size: 13.5px;
  line-height: 1.95;
  color: #c7c7c7;
  margin-bottom: 24px;
  max-width: 460px;
}
.taller-collage{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0px;
  background: transparent;
  border: none;
}
.taller-collage img{
  width: 100%; height: 260px; object-fit: cover;
  filter: none;
  transition: filter 0.4s ease;
}
.taller-collage img:hover{ filter: grayscale(0%) brightness(0.95); }

/* ---------- CONTACTO / PROYECTO ---------- */
#contacto{
  padding-bottom: 0;
  border-bottom: none;
}
.contacto-inner{
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.contacto-inner .eyebrow{
  display: block;
  margin-bottom: 28px;
}
.contacto-inner .section-title{
  font-size: clamp(44px, 8vw, 96px);
  margin-bottom: 36px;
}
.contacto-inner p{
  font-size: 14px;
  line-height: 1.9;
  color: #c7c7c7;
  margin: 0 auto;
  max-width: 560px;
}

form.contact-form{
  margin-top: 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  text-align: left;
}
form.contact-form .full{ grid-column: 1 / -1; }
.field label{
  display:block;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 10px;
}
.field input, .field textarea{
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 14px;
  padding: 10px 2px;
  outline: none;
  transition: border-color 0.25s ease;
}
.field input:focus, .field textarea:focus{
  border-color: var(--accent);
}
.field textarea{ resize: vertical; min-height: 90px; }

.submit-btn{
  grid-column: 1 / -1;
  margin-top: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.25s ease;
  justify-self: stretch;
}
.submit-btn:hover{ background: #3333ff; }

footer{
  margin-top: 100px;
  padding: 34px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--grey);
  text-transform: uppercase;
  flex-wrap: wrap;
  gap: 12px;
}
footer a{ color: var(--grey); transition: color 0.2s ease; }
footer a:hover{ color: var(--accent); }
.footer-social{ display:flex; gap: 20px; }

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}
.reveal.in{
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1 !important; transform:none !important; transition:none !important; }
  .scroll-line{ animation: none; }
  .carousel-track{ animation: none; }
  .hero-eyebrow .cursor{ animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px){
  .piezas-grid{ grid-template-columns: repeat(2, 1fr); }
  .workshop-banner{ grid-template-columns: repeat(3, 1fr); }
  .workshop-banner img:nth-child(4), .workshop-banner img:nth-child(5){ display:none; }
  .cards{ grid-template-columns: 1fr; }
  .clases-grid, .taller-grid{ grid-template-columns: 1fr; }
  .taller-grid{ gap: 40px; }
  .taller-text{ order: 2; }
  .taller-collage{ order:1; }
  .clases-img{ min-height: 320px; order: 2;}
  .clases-text{ order: 1; }
}

@media (max-width: 720px){
  .container{ padding: 0 22px; }
  section{ padding: 90px 0; }
  header{ padding: 20px 22px; }
  nav{
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: 78%;
    max-width: 320px;
    background: #000;
    border-left: 1px solid var(--line);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 28px;
    padding: 40px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(.77,0,.18,1);
    z-index: 1050;
  }
  nav.open{ transform: translateX(0); }
  .nav-toggle{ display: flex; }
  .hero-content{ padding: 0 22px; }
  .hero-sub{ white-space: normal; font-size: 11px; max-width: 100%; }
  .hero-title .de{ margin-right: 14px; }
  .scroll-indicator{ display: none; }
  .piezas-grid{ grid-template-columns: repeat(2, 1fr); }
  .workshop-banner{ grid-template-columns: repeat(2, 1fr); }
  .workshop-banner img:nth-child(3){ display: none; }
  .carousel-item{ width: 140px; height: 100px; }
  form.contact-form{ grid-template-columns: 1fr; }
  footer{ flex-direction: column; align-items: flex-start; }
}