/* ==========================================================================
   BOTLAB SHARED DESIGN SYSTEM & LAYOUT
   Estilo Premium Minimalista (Inspiración maxmilkin.com)
   ========================================================================== */

/* 1. FUENTES DE TEXTO (RF Dewi) */
@font-face {
  font-family: 'RF Dewi';
  src: url('https://www.maxmilkin.com/static/media/RFDewi-Regular.dd4ef5dabd9e5e6ad66f.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'RF Dewi';
  src: url('https://www.maxmilkin.com/static/media/RFDewi-Light.c455493e6ef3be9a0376.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'RF Dewi';
  src: url('https://www.maxmilkin.com/static/media/RFDewi-Semibold.b29a125509d131853082.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* 2. VARIABLES GLOBALES (Design Tokens) */
:root {
  --botlab-bg: #ffffff;
  --botlab-ink: #10141d;
  --botlab-soft: #f5f5f3;
  --botlab-paper: #fafafa;
  --botlab-muted: #8b8d8d;
  --botlab-line: rgba(16, 20, 29, 0.14);
  --botlab-line-strong: rgba(16, 20, 29, 0.34);
  --botlab-shadow: 0 36px 110px rgba(16, 20, 29, 0.12);
}

/* 3. RESET GENERAL */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background: var(--botlab-bg) !important;
  color: var(--botlab-ink) !important;
  font-family: 'RF Dewi', sans-serif !important;
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
}

/* 4. ENCABEZADO PREMIUM FLOTANTE (Header) */
.site-primary-header-wrap {
  position: fixed !important;
  inset: 0 0 auto 0;
  z-index: 1200;
  padding: 16px 0 !important;
  background: rgba(255, 255, 255, 0.86) !important;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(16, 20, 29, 0.06) !important;
  transition: background 0.3s ease;
}

.main-header-container {
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom-logo-link img {
  height: 32px;
  width: auto;
  display: block;
  filter: brightness(0) saturate(0) contrast(1.2) !important;
}

.main-navigation {
  display: flex;
  gap: 32px;
  align-items: center;
}

.main-navigation a,
.main-header-menu .menu-link {
  color: var(--botlab-ink) !important;
  font-size: 12px !important;
  line-height: 1 !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  font-weight: 400 !important;
  text-decoration: none !important;
  transition: opacity 0.25s ease;
}

.main-navigation a:hover {
  opacity: 0.6;
}

/* 5. LOADER ANIMADO (Preloader) */
.botlab-loader {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--botlab-ink);
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.botlab-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.botlab-loader__wrap {
  position: relative;
  width: min(68vw, 520px);
  height: min(68vw, 520px);
}

.botlab-loader__ring {
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(16, 20, 29, 0.08);
  border-radius: 50%;
  animation: botlab-ring-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.botlab-loader__orbit {
  position: absolute;
  inset: 0;
  animation: botlab-spin 5.5s linear infinite;
}

.botlab-loader svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.botlab-loader text {
  fill: var(--botlab-ink);
  font-size: clamp(15px, 1.65vw, 24px);
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.botlab-loader__percent {
  position: absolute;
  left: 50%;
  top: 52%;
  transform: translate(-50%, -50%);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

@keyframes botlab-spin {
  to { transform: rotate(360deg); }
}

@keyframes botlab-ring-in {
  from { opacity: 0; transform: scale(0.78); }
  to { opacity: 1; transform: scale(1); }
}

/* 6. COMPONENTES REUTILIZABLES */
.botlab-container {
  width: min(100%, 1680px);
  margin: 0 auto;
}

.botlab-kicker {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: rgba(16, 20, 29, 0.48);
  font-size: 14px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.botlab-kicker::before {
  content: "";
  width: 58px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.botlab-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  margin-top: 34px;
  border: 1px solid rgba(16, 20, 29, 0.22);
  border-radius: 999px;
  color: var(--botlab-ink) !important;
  text-decoration: none !important;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
  cursor: pointer;
}

.botlab-cta:hover {
  background: var(--botlab-ink);
  color: #fff !important;
  transform: translateY(-2px);
}

/* 7. ANIMACIONES DE SCROLL (Aparecer) */
.botlab-scene {
  opacity: 0;
  transform: translate3d(0, 56px, 0);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.botlab-scene.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* 8. FOOTER SHOWCASE Y PIE DE PÁGINA */
.botlab-footer-showcase {
  min-height: auto;
  padding: clamp(72px, 8vw, 130px) 28px 42px;
  background: #fff;
  border-top: 1px solid var(--botlab-line);
}

.botlab-footer-hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  margin-bottom: 58px;
}

.botlab-footer-hero__image {
  min-height: 520px;
  border: 1px solid var(--botlab-line);
  border-radius: 42px;
  overflow: hidden;
  box-shadow: var(--botlab-shadow);
}

.botlab-footer-hero__image img {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  display: block;
}

.botlab-project-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.botlab-project-tile {
  position: relative;
  display: block;
  min-height: 260px;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid var(--botlab-line);
  background: #f5f5f3;
  color: inherit !important;
  text-decoration: none !important;
}

.botlab-project-tile img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.botlab-project-tile:hover img {
  transform: scale(1.04);
}

.botlab-project-tile span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  display: inline-flex;
  z-index: 2;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0,0,0,0.38);
}

.botlab-project-tile::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.55));
  pointer-events: none;
}

.botlab-footer-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--botlab-line);
  color: rgba(16, 20, 29, 0.48);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.botlab-footer-nav a {
  color: inherit !important;
  text-decoration: none !important;
  margin-left: 18px;
  transition: opacity 0.25s ease;
}

.botlab-footer-nav a:hover {
  opacity: 0.6;
}

/* 9. RESPONSIVE DESIGN (Media Queries) */
@media (max-width: 980px) {
  .main-header-container {
    flex-direction: column;
    gap: 16px;
  }

  .main-navigation {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }

  .botlab-footer-hero,
  .botlab-project-strip {
    grid-template-columns: 1fr;
  }

  .botlab-footer-hero__image,
  .botlab-footer-hero__image img {
    min-height: 360px;
  }

  .botlab-footer-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .botlab-footer-nav a {
    display: inline-block;
    margin: 10px 16px 0 0;
    margin-left: 0;
  }
}
