/* ==============================================================
   CODESIGN PROJECTS — index.html
   Igual que index9 (con sus correcciones) + modo claro/oscuro.
   --panel-dark es un tono fijo (no cambia con el tema): lo usa
   el carrusel, que necesita quedar oscuro en ambos modos para que
   el texto sea legible sobre las fotos. El footer, en cambio, SÍ
   sigue el tema en el MISMO sentido que el header (no invertido):
   claro en modo claro, oscuro en modo oscuro — por eso usa
   --surface-alt/--text y no --panel-dark ni --text solo.
================================================================= */

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

:root {
  --panel-dark: #1c1a1f;
  --text: #1c1a1f;
  --text-soft: #57525c;
  --text-faint: #8b8690;
  --surface: #ffffff;
  --surface-alt: #f6f3ec;
  --line: #e6e0d2;
  --orange: #e2531e;
  --orange-dark: #b6410f;
  --khaki: #a4906a;
  --header-bg: rgba(255, 255, 255, 0.9);

  --font-display: "Space Grotesk", "Helvetica Neue", sans-serif;
  --font-body: "Inter", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

:root[data-theme="dark"] {
  --text: #f2efe9;
  --text-soft: #c7c2cb;
  --text-faint: #948e9a;
  --surface: #17151b;
  --surface-alt: #221f27;
  --line: rgba(255, 255, 255, 0.12);
  --khaki: #bda87f;
  --header-bg: rgba(23, 21, 27, 0.85);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background-color: var(--surface);
  background-image: radial-gradient(circle, rgba(226, 83, 30, 0.13) 1px, transparent 1.2px);
  background-size: 22px 22px;
  color: var(--text);
  line-height: 1.6;
  padding-top: 76px;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.container { max-width: 1200px; margin: auto; padding: 0 2rem; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1rem;
}

/* ==============================
   HEADER / NAV — intacto, con
   fondo sólido (no textura) para
   que el blur no la duplique
============================== */
header {
  position: fixed;
  top: 0; width: 100%; z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.navbar { display: flex; justify-content: space-between; align-items: center; padding: 1.15rem 0; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand-mark { height: 26px; width: auto; }
.brand-mark-dark { display: none; }
:root[data-theme="dark"] .brand-mark-dark { display: block; }
:root[data-theme="dark"] .brand-mark-light { display: none; }

.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

.brand-suffix {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--khaki);
  margin-left: 0.15rem;
}

.menu { display: flex; gap: 2.2rem; list-style: none; align-items: center; }

.menu > li > a {
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.85rem;
  font-weight: 500;
  position: relative;
  padding: 0.4rem 0;
}

.menu > li > a::after {
  content: "";
  position: absolute;
  bottom: -2px; left: 0;
  width: 0%; height: 1px;
  background: var(--orange);
  transition: width 0.25s ease;
}

.menu > li > a:hover { color: var(--text); }
.menu > li > a:hover::after { width: 100%; }

.menu > li > a.active { color: var(--orange); }
.menu > li > a.active::after { width: 100%; background: var(--orange); }

.menu .btn-nav {
  padding: 0.6rem 1.1rem;
  background: var(--text);
  color: var(--surface);
  border-radius: 2px;
  font-size: 0.8rem;
}
.menu .btn-nav::after { display: none; }
.menu .btn-nav:hover { background: var(--orange); color: #fff; }

.dropdown { position: relative; }

.dropdown-menu {
  list-style: none;
  position: absolute;
  top: 130%; left: 0;
  min-width: 220px;
  padding: 0.4rem 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 16px 32px rgba(28, 26, 31, 0.08);
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.82rem;
  color: var(--text-soft);
  text-decoration: none;
}
.dropdown-menu li a:hover { background: var(--surface-alt); color: var(--text); }
.dropdown-menu li a.active { color: var(--orange); background: var(--surface-alt); }

.dropdown-menu i {
  width: 16px;
  text-align: center;
  color: var(--text-faint);
  transition: color 0.2s ease;
}
.dropdown-menu a:hover i { color: var(--orange); }

.menu-toggle { display: none; font-size: 1.4rem; cursor: pointer; color: var(--text); }

.theme-icon-light { display: none; }
.theme-icon-dark { display: inline; }
:root[data-theme="dark"] .theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: inline; }

/* ==============================
   BOTONES
============================== */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  padding: 0.85rem 1.5rem;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn.primary { background: var(--text); color: var(--surface); }
.btn.primary:hover { background: var(--orange); color: #fff; }
.btn.ghost { border-color: var(--text); color: var(--text); }
.btn.ghost:hover { border-color: var(--orange); color: var(--orange); }

/* ==============================
   HERO — nombre + categorías (puntos medios), sin caja
============================== */
.hero { padding-top: 6.5rem; padding-bottom: 5rem; }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 5.2vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  max-width: 18ch;
  margin-bottom: 1.2rem;
}

.hero .kicker {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: var(--text-faint);
  margin-bottom: 2.4rem;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ==============================
   LOGOS
============================== */
.logos-band { padding-top: 3.5rem; padding-bottom: 3.5rem; text-align: center; }

.logos-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 2.2rem;
}

.logos-row { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 3rem; }
.logo-box { height: 36px; width: 100px; display: flex; align-items: center; justify-content: center; }
.logo-box img { max-height: 100%; max-width: 100%; object-fit: contain; opacity: 0.55; filter: grayscale(100%); transition: 0.25s ease; }
.logo-box:hover img { opacity: 1; filter: grayscale(0%); }

/* ==============================
   PARALLAX (background-attachment: fixed, probada)
============================== */
.parallax-band {
  position: relative;
  padding-top: 4.5rem;
  padding-bottom: 4.5rem;
  color: #fff;
  background-image: url("../img/dementes/parallax_dementes.png");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.parallax-band::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(20, 18, 24, 0.72); }
.parallax-band .container { position: relative; z-index: 2; width: 100%; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
.stats-grid .num { font-family: var(--font-display); font-weight: 600; font-size: 2.4rem; color: var(--orange); margin-bottom: 0.3rem; }
.stats-grid .label { font-size: 0.78rem; color: rgba(255,255,255,0.75); }

/* ==============================
   SECCIÓN GENÉRICA
============================== */
.section { padding-top: 6rem; padding-bottom: 6rem; }
.section-head { max-width: 640px; margin-bottom: 3rem; }

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}

.section-head p { color: var(--text-soft); font-size: 1rem; max-width: 54ch; }
.section-cta { margin-top: 2.5rem; }

/* ==============================
   PORTAFOLIO — muro de marcas
============================== */
.brand-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.brand-item {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 3rem 2.2rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 300px;
  transition: background 0.2s ease;
}
.brand-item:hover { background: var(--surface-alt); }

.bi-mark { height: 36px; display: flex; align-items: center; margin-bottom: 1.4rem; }
.bi-mark img { height: 100%; width: auto; }
.bi-mark.text { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--khaki); }

.bi-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.8rem;
}

.brand-item p { color: var(--text-soft); font-size: 0.95rem; margin-bottom: auto; padding-bottom: 1.6rem; }

.bi-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.bi-status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.bi-status::before { content: "●"; color: var(--orange); margin-right: 0.4rem; font-size: 0.5rem; }

.bi-arrow { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-faint); transition: transform 0.2s ease, color 0.2s ease; }
.brand-item:hover .bi-arrow { transform: translateX(4px); color: var(--orange); }

/* Nina: tarjeta con foto propia y la identidad real de marca de Nina
   (navy/dorado) en vez del acento naranja del holding — mismo
   criterio que el wordmark dorado de Dementes: cada producto
   conserva su propia marca dentro de la tarjeta neutra. */
.brand-item-photo {
  background-image: linear-gradient(180deg, rgba(10, 14, 22, 0.25) 0%, rgba(10, 14, 22, 0.55) 55%, rgba(10, 14, 22, 0.92) 100%), url("../img/nina/nina-banner.jpg");
  background-size: cover;
  background-position: center top;
  color: #fff;
}
.brand-item-photo:hover {
  background-image: linear-gradient(180deg, rgba(10, 14, 22, 0.25) 0%, rgba(10, 14, 22, 0.55) 55%, rgba(10, 14, 22, 0.92) 100%), url("../img/nina/nina-banner.jpg");
  background-size: cover;
  background-position: center top;
}
.brand-item-photo .bi-tag { color: #C8A96B; }
.brand-item-photo p { color: rgba(255, 255, 255, 0.85); }
.brand-item-photo .bi-foot { border-top-color: rgba(255, 255, 255, 0.2); }
.brand-item-photo .bi-status { color: rgba(255, 255, 255, 0.75); }
.brand-item-photo .bi-status::before { color: #C8A96B; }
.brand-item-photo .bi-arrow { color: rgba(255, 255, 255, 0.75); }
.brand-item-photo:hover .bi-arrow { color: #C8A96B; }

/* ==============================
   CARRUSEL — banner de productos a todo el ancho
============================== */
.carousel { position: relative; width: 100%; height: 560px; overflow: hidden; background: var(--panel-dark); }
.carousel-track { display: flex; height: 100%; transition: transform 0.7s cubic-bezier(0.65, 0, 0.35, 1); }
.carousel-slide { position: relative; flex: 0 0 100%; height: 100%; }

.carousel-slide img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
}

.carousel-slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(28,26,31,0.88) 0%, rgba(28,26,31,0.55) 40%, rgba(28,26,31,0.2) 70%);
}

.carousel-slide-content { position: relative; z-index: 2; height: 100%; display: flex; align-items: center; }
.carousel-slide-content .container { width: 100%; }
.carousel-copy { max-width: 560px; color: #fff; }

.carousel-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1rem;
}

.carousel-slide-content h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  margin-bottom: 0.8rem;
}

.carousel-slide-content p { font-size: 1.02rem; color: rgba(255,255,255,0.82); margin-bottom: 1.6rem; max-width: 42ch; }

.carousel-meta { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }

.carousel-status {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}
.carousel-status::before { content: "●"; color: var(--orange); margin-right: 0.4rem; font-size: 0.55rem; }

.carousel-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.5);
  padding-bottom: 2px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.carousel-link:hover { color: var(--orange); border-color: var(--orange); }

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 46px; height: 46px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(28,26,31,0.35);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.carousel-arrow:hover { border-color: var(--orange); color: var(--orange); }
.carousel-arrow.prev { left: 2rem; }
.carousel-arrow.next { right: 2rem; }

.carousel-dots {
  position: absolute;
  bottom: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 0.6rem;
}

.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.6);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}
.carousel-dot.active { background: var(--orange); border-color: var(--orange); }

/* ==============================
   SERVICIOS — dos columnas, como indexv1
============================== */
.services-wrapper {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 4rem;
  align-items: center;
}

.services-intro h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.4vw, 2.5rem);
  line-height: 1.2;
  margin-bottom: 1.1rem;
}

.services-intro p {
  color: var(--text-soft);
  font-size: 1rem;
  max-width: 42ch;
  margin-bottom: 1.8rem;
}

.service-grid { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }

.service-item { padding: 1.8rem 0; border-bottom: 1px solid var(--line); display: flex; gap: 1.4rem; align-items: flex-start; }

.service-item .si-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--orange);
  padding-top: 0.2rem;
}

.service-item h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}
.service-item p { color: var(--text-soft); font-size: 0.92rem; }

/* ==============================
   CTA FINAL
============================== */
.cta-final { text-align: center; padding-top: 6rem; padding-bottom: 7rem; }

.cta-final h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin-bottom: 0.8rem;
}
.cta-final p { color: var(--text-soft); margin-bottom: 2rem; max-width: 52ch; margin-left: auto; margin-right: auto; }

/* ==============================
   BOTONES FLOTANTES — volver arriba
   y tema claro/oscuro. Mismo lenguaje
   visual neutro: solo se pintan de
   acento al pasar el mouse, porque
   ninguno de los dos es una acción
   principal de la página.
============================== */
.fab-top,
.fab-theme {
  position: fixed;
  z-index: 500;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
  color: var(--text-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(28, 26, 31, 0.14);
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.2s ease, color 0.2s ease, visibility 0.25s;
}

.fab-top:hover,
.fab-theme:hover { border-color: var(--orange); color: var(--orange); }

.fab-top {
  right: 2rem;
  bottom: 2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}
.fab-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

.fab-theme {
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .fab-top { right: 1.2rem; bottom: 1.2rem; width: 40px; height: 40px; }
  .fab-theme { left: 1.2rem; width: 40px; height: 40px; }
}

/* ==============================
   FOOTER — intacto
============================== */
.footer { background: var(--surface-alt); color: var(--text-soft); padding: 4.5rem 0 2rem; transition: background-color 0.25s ease, color 0.25s ease; }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr 1fr; gap: 2rem; }

.footer-brand h3 {
  font-family: var(--font-display);
  color: var(--text);
  font-size: 1rem;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}
.footer-brand p { font-size: 0.85rem; max-width: 30ch; line-height: 1.6; }

.footer-column h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

.footer-column ul { list-style: none; }
.footer-column li { margin-bottom: 0.7rem; }

.footer-column a {
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.85rem;
  transition: color 0.2s ease;
}
.footer-column a:hover { color: var(--orange); }

.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding: 0 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.footer-bottom p { font-size: 0.75rem; color: var(--text-faint); }

/* ==============================
   ANIMACIONES (usadas por main.js)
============================== */
.hidden { opacity: 0; transform: translateY(24px); transition: all 0.6s ease; }
.show { opacity: 1; transform: translateY(0); }

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 900px) {
  .brand-wall { grid-template-columns: 1fr; }
  .services-wrapper { grid-template-columns: 1fr; gap: 2.5rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2.2rem; }
  .carousel { height: 480px; }
}

@media (max-width: 768px) {
  body { padding-top: 68px; }
  .section { padding-top: 4rem; padding-bottom: 4rem; }
  .hero { padding-top: 4rem; padding-bottom: 3.5rem; }

  .menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    position: absolute;
    top: 68px; left: 0; width: 100%;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 2rem 1.5rem;
  }
  .menu.active { display: flex; }
  .menu > li { width: 100%; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .menu .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; border: none; box-shadow: none; padding-left: 1rem; display: none; }
  .menu .dropdown:hover .dropdown-menu { display: block; }
  .menu-toggle { display: block; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
  .parallax-band { background-attachment: scroll; }

  .carousel { height: 560px; }
  .carousel-copy { max-width: 90%; }
  .carousel-arrow { width: 38px; height: 38px; }
  .carousel-arrow.prev { left: 1rem; }
  .carousel-arrow.next { right: 1rem; }
}
