/* ==============================================================
   CODESIGN PROJECTS — servicios.html adaptado al sistema visual
   del nuevo index. Mismo contenido real, nuevo sistema:
   paleta naranja/caqui/carbón, Space Grotesk + Inter + mono,
   hairlines en vez de cards con sombra, sin gradientes.
================================================================= */

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

:root {
  --text: #1c1a1f;
  --text-soft: #57525c;
  --text-faint: #8b8690;
  --surface: #ffffff;
  --surface-alt: #f6f3ec;
  --line: #e6e0d2;
  --orange: #e2531e;
  --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;
  transition: background-color 0.25s ease, color 0.25s ease;
  -webkit-font-smoothing: antialiased;
}

.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 — igual que index
============================== */
header {
  position: fixed;
  top: 0; width: 100%; z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.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); }
.dropdown-menu a:hover i { color: var(--orange); }

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

/* ==============================
   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); }
.btn.ghost { border-color: var(--text); color: var(--text); }
.btn.ghost:hover { border-color: var(--orange); color: var(--orange); }

/* ==============================
   HERO
============================== */
.services-hero { padding: 6.5rem 0 3rem; }

.services-hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.3rem, 4.6vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  max-width: 18ch;
  margin-bottom: 1.2rem;
}

.services-hero .lead {
  font-size: 1.08rem;
  color: var(--text-soft);
  max-width: 56ch;
  margin-bottom: 2rem;
}

.services-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.services-tags span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-soft);
  border: 1px solid var(--line);
  padding: 0.5rem 0.9rem;
  border-radius: 2px;
}

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

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  letter-spacing: -0.01em;
  margin-bottom: 0.8rem;
}

.section-head .lead { color: var(--text-soft); font-size: 1.02rem; max-width: 58ch; }

/* ==============================
   SERVICIOS — grilla de 6, hairlines
============================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.service-card {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2.6rem 2.2rem;
}

.service-card .sc-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--orange);
  display: block;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 0.7rem;
}

.service-card > p {
  color: var(--text-soft);
  font-size: 0.94rem;
  margin-bottom: 1.2rem;
}

.service-card ul { list-style: none; }

.service-card li {
  font-size: 0.86rem;
  color: var(--text-soft);
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
}
.service-card li:first-child { border-top: none; }

/* ==============================
   INTRO CARRUSEL
============================== */
.carousel-intro { text-align: center; padding: 4rem 0 2.5rem; }

.carousel-intro h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 20ch;
  margin: 0 auto;
}

/* ==============================
   CARRUSEL — banner "digitaliza tu negocio", a todo el ancho.
   Fila de 2 columnas (imagen contenida + texto) sobre fondo
   degradado, NO imagen a todo el ancho — así la ilustración
   no se recorta ni pierde el detalle.
============================== */
.carousel { position: relative; width: 100%; height: 560px; overflow: hidden; background: #1c1a1f; }
.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%;
  display: flex;
  align-items: center;
  color: #fff;
  background: linear-gradient(135deg, #201d24 0%, #322c37 100%);
}

.carousel-slide .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

.carousel-slide.reverse .carousel-media { order: 2; }
.carousel-slide.reverse .carousel-copy { order: 1; }

.carousel-media {
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 3px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-media img { width: 100%; height: 100%; object-fit: cover; }

.carousel-ph-icon {
  font-size: 4.5rem;
  color: var(--khaki);
  opacity: 0.6;
}

.carousel-copy { max-width: 480px; }

.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-copy h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  margin-bottom: 0.8rem;
}

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

.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); }

/* ==============================
   CASO DE USO
============================== */
.case-intro { max-width: 680px; margin-bottom: 3rem; }
.case-intro h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  margin-bottom: 0.8rem;
}
.case-intro .lead { color: var(--text-soft); font-size: 1.02rem; }

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 3rem;
}

.case-block { padding: 2.4rem 2rem; border-left: 1px solid var(--line); }
.case-block:first-child { border-left: none; }

.case-block.highlight { background: #1c1a1f; color: #fff; }
.case-block.highlight h3,
.case-block.highlight p { color: #fff; }
.case-block.highlight li { color: rgba(255, 255, 255, 0.75); border-top-color: rgba(255, 255, 255, 0.15); }

.case-block h3 {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1rem;
}

.case-block > p { font-size: 0.94rem; color: var(--text-soft); margin-bottom: 1.2rem; }

.case-block ul { list-style: none; }
.case-block li {
  font-size: 0.86rem;
  color: var(--text-soft);
  padding: 0.5rem 0;
  border-top: 1px solid var(--line);
}
.case-block li:first-child { border-top: none; }

.case-quote {
  text-align: center;
  padding: 2rem 0 0;
}
.case-quote p {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  max-width: 44ch;
  margin: auto;
  color: var(--text);
}

/* ==============================
   CTA
============================== */
.services-cta { text-align: center; padding: 6rem 0 7rem; }

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

/* ==============================
   FOOTER
============================== */
.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); }

/* ==============================
   BOTONES FLOTANTES — volver arriba y tema
============================== */
.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, background-color 0.25s ease;
}
.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;
}

.theme-icon-dark, .theme-icon-light { display: none; }
:root:not([data-theme="dark"]) .theme-icon-dark { display: block; }
:root[data-theme="dark"] .theme-icon-light { display: block; }

@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; }
}


/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .case-grid { grid-template-columns: 1fr; }
  .case-block { border-left: none; border-top: 1px solid var(--line); }
  .case-block:first-child { border-top: none; }
  .carousel { height: 480px; }
  .carousel-slide .container { gap: 2rem; }
}

@media (max-width: 768px) {
  body { padding-top: 68px; }
  .section { padding: 3.5rem 0; }
  .services-hero { padding: 4.5rem 0 2.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; }

  .services-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }

  .carousel { height: 600px; }
  .carousel-slide .container { grid-template-columns: 1fr; gap: 1.2rem; }
  .carousel-slide.reverse .carousel-media,
  .carousel-slide.reverse .carousel-copy { order: initial; }
  .carousel-media { max-width: 220px; margin: 0 auto; }
  .carousel-copy { max-width: 100%; }
  .carousel-arrow { width: 38px; height: 38px; }
  .carousel-arrow.prev { left: 1rem; }
  .carousel-arrow.next { right: 1rem; }
}
