@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&display=swap');

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

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #888888;
  --border: #e0e0e0;
  --font: 'Inter', system-ui, sans-serif;
  --nav-height: 52px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── BOTTOM NAV (homepage) ── */
.nav-bottom {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 32px;
  z-index: 100;
}

.nav-bottom .site-name {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: auto;
  color: var(--text);
}

.nav-bottom nav {
  display: flex;
  gap: 40px;
}

.nav-bottom nav a {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-bottom nav a:hover { color: var(--text); }

.nav-bottom .lang-toggle {
  margin-left: 48px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

.nav-bottom .lang-toggle:hover { color: var(--text); }
.nav-bottom .lang-toggle span.active { color: var(--text); font-weight: 400; }

/* ── TOP NAV (inner pages) ── */
.nav-top {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 32px;
  background: var(--bg);
  z-index: 100;
}

.nav-top .site-name {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: auto;
}

.nav-top nav {
  display: flex;
  gap: 36px;
}

.nav-top nav a {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-top nav a:hover,
.nav-top nav a.active { color: var(--text); }

/* ── PROYECTOS DROPDOWN ── */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.nav-dropdown-trigger {
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  cursor: pointer;
  letter-spacing: 0;
  transition: color 0.2s;
}

.nav-dropdown-trigger:hover,
.nav-dropdown-trigger.active { color: var(--text); }

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 200px;
  padding: 20px 0 12px;
  z-index: 500;
  flex-direction: column;
  gap: 0;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-menu.open { display: flex; }

.nav-dropdown-menu a {
  font-size: 12px;
  font-weight: 300;
  color: var(--muted);
  padding: 6px 16px 6px 0;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover { color: var(--text); }

.nav-top .lang-toggle {
  margin-left: 40px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.nav-top .lang-toggle span.active { color: var(--text); font-weight: 400; }

/* ── HOMEPAGE CAROUSEL ── */
.hero {
  height: 100vh;
  width: 100%;
  overflow: hidden;
  position: relative;
  background: #fff;
  cursor: grab;
}

.hero:active { cursor: grabbing; }

.carousel-track {
  display: flex;
  height: 100%;
  gap: 3px;
  will-change: transform;
  transition: transform 0.05s linear;
  align-items: center;
  padding: 0 60px;
}

.carousel-track img {
  height: 75vh;
  width: auto;
  object-fit: cover;
  flex-shrink: 0;
  pointer-events: none;
  filter: brightness(0.95);
  transition: filter 0.4s;
}

.carousel-track img:hover { filter: brightness(1); }

/* ── PROJECT LAYOUT ── */
.page-wrap {
  padding-top: var(--nav-height);
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  flex-shrink: 0;
  padding: 48px 32px;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
}

.sidebar h2 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.sidebar ul { list-style: none; }

.sidebar ul li {
  margin-bottom: 2px;
}

.sidebar ul li a {
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  display: block;
  padding: 5px 0;
  transition: color 0.2s;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
  color: var(--text);
}

.sidebar ul li a.active {
  font-weight: 400;
}

.content {
  flex: 1;
  padding: 48px 64px;
  max-width: 960px;
}

.no-sidebar {
  min-height: unset;
}

.no-sidebar .content {
  padding-left: calc(260px + 64px);
}

.project-header {
  margin-bottom: 40px;
}

.project-header h1 {
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.project-header .subtitle {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
  max-width: 580px;
}

.project-text {
  font-size: 13.5px;
  line-height: 1.8;
  color: #333;
  max-width: 620px;
  margin-bottom: 8px;
  text-align: justify;
}

.project-text p { margin-bottom: 4px; }

.project-link {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 48px;
  transition: color 0.2s;
}

.project-link:hover { color: var(--text); }

.image-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 380px;
}

.image-grid img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── ABOUT PAGE ── */
.about-wrap {
  padding-top: var(--nav-height);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.about-image {
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.about-text {
  padding: 64px 56px;
  overflow-y: auto;
}

.about-text h1 {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 32px;
}

.about-text h2 {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 40px 0 14px;
}

.about-text p {
  font-size: 13.5px;
  line-height: 1.85;
  color: #333;
  margin-bottom: 14px;
  max-width: 520px;
  text-align: justify;
}

.about-text ul {
  list-style: none;
  padding: 0;
}

.about-text ul li {
  font-size: 13px;
  line-height: 1.7;
  color: #444;
  padding: 6px 0;
  max-width: 520px;
}

/* ── PROCESOS PAGE ── */
.procesos-wrap {
  padding-top: var(--nav-height);
}

.procesos-hero {
  padding: 56px 64px 32px;
  max-width: 680px;
}

.procesos-hero h1 {
  font-size: 22px;
  font-weight: 400;
  margin-bottom: 24px;
}

.procesos-hero p {
  font-size: 13.5px;
  line-height: 1.85;
  color: #333;
  margin-bottom: 14px;
  text-align: justify;
}

.procesos-grid {
  padding: 0 64px 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.procesos-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* ── CONTACT PAGE ── */
.contact-wrap {
  padding-top: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.contact-box {
  text-align: center;
  max-width: 420px;
}

.contact-box h1 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.contact-box p {
  font-size: 13.5px;
  color: #555;
  line-height: 1.8;
  margin-bottom: 32px;
  text-align: justify;
}

.contact-box a.email {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

.contact-box .social {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.contact-box .social a {
  color: var(--muted);
  transition: color 0.2s;
}

.contact-box .social a:hover { color: var(--text); }

/* ── LIGHTBOX ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 24px; right: 32px;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  font-weight: 200;
  line-height: 1;
}

/* ── SEMPITERNA FOTOS ── */
.sempiterna-fotos {
  display: flex;
  flex-direction: row;
  gap: 12px;
  margin-top: 32px;
  padding-bottom: 80px;
}

.sempiterna-fotos img {
  height: 52vh;
  width: auto;
  display: block;
  flex-shrink: 0;
}

/* ── ZIGZAG LAYOUT ── */
.zigzag {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 640px;
  padding-bottom: 80px;
}

.zigzag-item {
  width: 55%;
  margin-bottom: 24px;
}

.zigzag-item.left  { align-self: flex-start; }
.zigzag-item.right { align-self: flex-end; }

.zigzag-item.large { width: 90%; }

.zigzag-item img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── SLIDER EXHIBICIÓN ── */
.slider-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 56px 0 16px;
}

.slider {
  position: relative;
  max-width: 380px;
  margin-bottom: 80px;
}

.slider-track {
  position: relative;
}

.slider-track img {
  width: 100%;
  height: auto;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.slider-track img.active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text);
  cursor: pointer;
  padding: 8px 12px;
  z-index: 10;
  opacity: 0.4;
  transition: opacity 0.2s;
  line-height: 1;
}

.slider-btn:hover { opacity: 1; }
.slider-prev { left: -40px; }
.slider-next { right: -40px; }

.slider-counter {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 12px;
  letter-spacing: 0.05em;
}

/* ── HORIZONTAL ZIGZAG SCROLL ── */
.hscroll-zigzag {
  display: flex;
  gap: 40px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  padding: 0 80px 0 calc(260px + 64px);
  width: 100%;
  height: 75vh;
  align-items: flex-start;
  scrollbar-width: none;
  margin-top: 0;
}

.hscroll-zigzag::-webkit-scrollbar { display: none; }
.hscroll-zigzag:active { cursor: grabbing; }

.hscroll-zigzag img {
  height: 38vh;
  width: auto;
  flex-shrink: 0;
  display: block;
}

.hscroll-zigzag img { align-self: flex-start; }
.hscroll-zigzag img:nth-child(1) { margin-top: 25vh; }
.hscroll-zigzag img:nth-child(2) { margin-top: 8vh; }
.hscroll-zigzag img:nth-child(3) { margin-top: 20vh; }
.hscroll-zigzag img:nth-child(4) { margin-top: 36vh; }
.hscroll-zigzag img:nth-child(5) { margin-top: 14vh; }

@media (max-width: 768px) {
  .hscroll-zigzag {
    padding: 0 0 0 20px;
    height: 65vh;
    gap: 24px;
  }
  .hscroll-zigzag img { height: 30vh; }
}

/* ── HORIZONTAL SCROLL FULL WIDTH ── */
.hscroll-full {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
  padding: 0 0 0 calc(260px + 64px);
  width: 100%;
  scrollbar-width: none;
}

.hscroll-full::-webkit-scrollbar { display: none; }

.hscroll-full:active { cursor: grabbing; }

.hscroll-full img {
  height: 52vh;
  width: auto;
  flex-shrink: 0;
  display: block;
}

/* ── PIEZAS GRID ── */
.piezas-grid {
  display: flex;
  flex-direction: row;
  gap: 12px;
  padding: 48px 0 80px calc(260px + 64px);
}

.piezas-grid img {
  height: 52vh;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

/* ── HIDDEN LANG ── */
[data-en], [data-es] { }

/* ── HAMBURGER & MOBILE MENU ── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 4px;
  z-index: 200;
  -webkit-appearance: none;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #1a1a1a;
}

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.mobile-menu.open { display: flex; }

.mobile-menu-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  font-size: 28px;
  font-weight: 200;
  cursor: pointer;
  color: var(--text);
  line-height: 1;
}

.mobile-menu-home {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text) !important;
}

.mobile-menu a {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.mobile-menu a:hover { color: var(--text); }

.mobile-menu .lang-toggle {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  cursor: pointer;
  margin-top: 12px;
}

/* ── EXHIBICIÓN MOBILE GRID ── */
.exhibicion-mobile-grid {
  display: none;
}
.slider-desktop-only {
  display: block;
}

@media (max-width: 768px) {
  .slider-desktop-only { display: none !important; }
  .exhibicion-mobile-grid {
    display: flex;
    padding: 0 0 0 20px;
  }
  .exhibicion-mobile-grid img {
    height: 40vh;
    width: auto;
    flex-shrink: 0;
    max-width: none;
  }
  .project-link {
    margin-top: 48px;
  }
}

/* ── RESPONSIVE MOBILE ── */
@media (max-width: 768px) {

  /* Mostrar hamburger, ocultar nav links */
  .hamburger { display: flex; }
  .nav-top nav, .nav-top .lang-toggle,
  .nav-bottom nav, .nav-bottom .lang-toggle { display: none; }

  /* Nav bottom (homepage) */
  .nav-bottom {
    padding: 0 24px 36px;
    justify-content: flex-end;
    align-items: flex-end;
  }
  .nav-bottom .site-name {
    display: block;
    position: absolute;
    bottom: 36px;
    left: 24px;
    color: #fff !important;
    font-size: 13px;
  }
  .nav-bottom .hamburger span { background: #fff; }

  /* Nav top (inner pages) */
  .nav-top {
    padding: 0 16px;
    height: var(--nav-height);
    justify-content: flex-end;
  }
  .nav-top .site-name { display: none; }

  /* Project layout: sidebar arriba, content abajo */
  .page-wrap {
    flex-direction: column;
    padding-top: 80px;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
    padding: 24px 20px 12px;
    border-bottom: none;
  }

  .content {
    padding: 32px 20px;
    max-width: 100%;
  }

  .no-sidebar .content {
    padding: 32px 20px;
  }

  /* Image grid */
  .image-grid { max-width: 100%; }

  /* Zigzag */
  .zigzag { max-width: 100%; }
  .zigzag-item { width: 70%; }
  .zigzag-item.large { width: 95%; }

  /* Horizontal scroll Ignición */
  .hscroll-full {
    padding: 0 0 0 20px;
  }
  .hscroll-full img { height: 40vh; }

  /* Piezas */
  .piezas-grid {
    padding: 32px 20px 60px;
    flex-direction: column;
    align-items: flex-start;
  }
  .piezas-grid img {
    height: auto;
    width: 100%;
  }

  /* Sempiterna */
  .sempiterna-fotos {
    flex-direction: column;
  }
  .sempiterna-fotos img {
    height: auto;
    width: 100%;
  }

  /* Slider */
  .slider { max-width: 100%; }
  .slider-prev { left: -28px; }
  .slider-next { right: -28px; }

  /* About */
  .about-wrap {
    grid-template-columns: 1fr;
  }
  .about-image {
    position: static;
    height: 50vh;
  }
  .about-text {
    padding: 40px 20px 60px;
  }
  .about-text p, .about-text ul li { max-width: 100%; }

  /* Procesos */
  .procesos-hero { padding: 40px 20px 24px; }
  .procesos-grid {
    padding: 0 20px 60px;
    grid-template-columns: 1fr;
  }
  .procesos-grid img { aspect-ratio: auto; }

  /* Contact */
  .contact-box { padding: 0 20px; }
}
