/* ==========================================================================
   99PDR · Desabollado sin pintar
   --------------------------------------------------------------------------
   1. Variables
   2. Base
   3. Utilidades
   4. Botones
   5. Cabecera y navegación
   6. Selector de idioma
   7. Hero y ventajas
   8. Secciones y rejillas
   9. Método
   10. Trabajos (antes / después)
   11. Opiniones y mapa
   12. Preguntas frecuentes
   13. Contacto
   14. Pie de página
   15. Animaciones
   16. Responsive
   ========================================================================== */


/* 1. Variables
   ========================================================================== */

:root {
  /* Colores */
  --bg:       #0d0e10;
  --bg-alt:   #131518;
  --card:     #1a1c20;
  --line:     #272a2f;
  --text:     #f3f4f6;
  --muted:    #9ba0a8;
  --red:      #ff2b2b;
  --red-soft: #ff5a4d;
  --wa:       #1ea952;
  --wa-hover: #25d366;

  /* Medidas */
  --radius:   10px;
  --header-h: 68px;

  /* Tipografía */
  --font:      Inter, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}


/* 2. Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px + env(safe-area-inset-top, 0px));
}

body {
  margin: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

h1 { font-size: clamp(44px, 7.4vw, 92px); }
h2 { font-size: clamp(34px, 4.6vw, 58px); }

h3 {
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

p {
  margin: 0;
  color: var(--muted);
}

:focus-visible {
  outline: 2px solid var(--red-soft);
  outline-offset: 3px;
}


/* 3. Utilidades
   ========================================================================== */

.wrap {
  width: min(1180px, 100% - 40px);
  margin-inline: auto;
}

.mono {
  font: 400 11px/1.4 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--muted);
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--red-soft);
}

.intro      { margin-top: 28px; }
.mw-340     { max-width: 340px; }
.mw-440     { max-width: 440px; }
.mw-520     { max-width: 520px; }

.small-note { font-size: 13px; }

.link       { color: var(--red-soft); }
.link:hover { text-decoration: underline; }


/* 4. Botones
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: none;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
}

.btn:hover {
  border-color: #555;
}

/* Botón de WhatsApp */
.btn--wa {
  background: var(--wa);
  border-color: var(--wa);
  color: #fff;
  font-weight: 600;
}

.btn--wa:hover {
  background: var(--wa-hover);
  border-color: var(--wa-hover);
  color: #04210f;
}

.btn--wa svg {
  flex: none;
  width: 20px;
  height: 20px;
  fill: currentColor;
}


/* 5. Cabecera y navegación
   ========================================================================== */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(13, 14, 16, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: var(--header-h);
}

.site-header__logo {
  display: block;
  height: 44px;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--muted);
}

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

.burger {
  display: none;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 26px;
  cursor: pointer;
}


/* 6. Selector de idioma
   ========================================================================== */

.lang {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.lang button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 11px;
  border: 0;
  background: none;
  color: var(--muted);
  font: 500 12px/1 var(--font-mono);
  cursor: pointer;
}

.lang button:hover {
  color: var(--text);
}

.lang button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}

.lang__flag {
  flex: none;
  width: 20px;
  height: 14px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}


/* 7. Hero y ventajas
   ========================================================================== */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100svh;
  padding: 140px 0 70px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 78% 40%, #2c2f35 0, transparent 70%),
    linear-gradient(180deg, #08090a, var(--bg));
}

/* Foto de fondo */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/hero.webp") center / cover no-repeat;
  filter: brightness(1.35);
}

/* Degradado para legibilidad del texto */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 14, 16, 0.7), rgba(13, 14, 16, 0.1) 75%),
    linear-gradient(180deg, rgba(13, 14, 16, 0.35), transparent 28%, transparent 70%, var(--bg));
}

.hero .wrap {
  position: relative;
  z-index: 2;
}

.hero__lead {
  max-width: 520px;
  margin: 28px 0 32px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* Ventajas */
.pills {
  border-block: 1px solid var(--line);
  background: var(--bg-alt);
}

.pills .wrap {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.pill {
  display: flex;
  gap: 14px;
  padding: 26px 24px 26px 0;
}

.pill i {
  color: var(--red);
  font-size: 20px;
  font-style: normal;
  line-height: 1.2;
}

.pill b {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.pill small {
  color: var(--muted);
  font-size: 13px;
}


/* 8. Secciones y rejillas
   ========================================================================== */

.section {
  padding: 110px 0;
}

.section--alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 56px;
}

.section-head > p {
  max-width: 340px;
  font-size: 14px;
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}

.two-col--top {
  align-items: start;
}


/* 9. Método
   ========================================================================== */

.note {
  margin-top: 30px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
}

.note b {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-weight: 500;
}

/* Animación explicativa (GIF) */
.diagram {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  margin: 0;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.diagram__gif {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.diagram figcaption {
  color: var(--text);
  font-size: 15px;
  text-align: center;
}

/* Pasos */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin: 80px 0 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.steps .mono {
  display: block;
  margin-bottom: 34px;
}

.steps h3 {
  margin-bottom: 12px;
}

.steps p {
  font-size: 14.5px;
}


/* 10. Trabajos (antes / después)
   ========================================================================== */

.cases {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 26px;
}

.case {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.case__body {
  padding: 24px;
}

.case__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.case p {
  font-size: 14.5px;
}

.case__foot {
  margin-top: 16px;
  color: var(--red-soft);
  font-size: 12px;
}

/* Comparador: --pos lo actualiza el JS al mover el deslizador */
.ba {
  --pos: 50%;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  user-select: none;
  background: #15171a;
}

.ba__layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba__layer--before {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.ba__tag {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.6);
}

.ba__tag--before { left: 12px; }

.ba__tag--after {
  right: 12px;
  background: var(--red);
  color: #fff;
}

.ba__bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 2;
  width: 2px;
  background: #fff;
  pointer-events: none;
}

/* El input range invisible cubre toda la imagen */
.ba input {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}


/* 11. Opiniones y mapa
   ========================================================================== */

.map-card {
  display: grid;
  gap: 14px;
  padding: 26px;
  background: #ecebe4;
  border-radius: 14px;
  color: #1b1c1e;
}

.map-card p {
  color: #4a4c50;
}

.map-card h3 {
  font-size: 19px;
}

.map-card__source {
  color: #6b6d72;
}

.map-card__map {
  width: 100%;
  height: 300px;
  border: 0;
  border-radius: var(--radius);
  background: #d9d8d0;
}

.map-card .btn {
  justify-self: start;
  border-color: #b9b8b0;
  color: #1b1c1e;
}

/* Reseñas */
.reviews {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 56px;
}

.review {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.review blockquote {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.65;
}

.review__who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.review__avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 600;
}

.review__who b {
  display: block;
  font-size: 15px;
  font-weight: 500;
}

.review__who small {
  color: var(--muted);
  font-size: 12px;
}


/* 12. Preguntas frecuentes
   ========================================================================== */

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 18px;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--red);
  font-size: 24px;
  line-height: 1;
  transition: transform 0.25s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq p {
  max-width: 760px;
  margin-top: 14px;
  font-size: 15px;
}


/* 13. Contacto
   ========================================================================== */

.contact {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}

.contact .btn {
  margin-top: 30px;
}

.checklist {
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.checklist h3 {
  margin-bottom: 18px;
  color: var(--text);
}

.checklist ul {
  margin: 0 0 16px;
  padding: 0;
}

.checklist li {
  display: flex;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
  list-style: none;
}

.checklist li span {
  color: var(--red);
}

.checklist li b {
  display: block;
  color: var(--text);
  font-weight: 500;
}


/* 14. Pie de página
   ========================================================================== */

.site-footer {
  padding: 46px 0 30px;
  border-top: 1px solid var(--line);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
}

.site-footer__logo {
  height: 54px;
}

.site-footer .mono {
  display: block;
  margin-bottom: 10px;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}


/* 15. Animaciones
   ========================================================================== */

.reveal {
  animation: reveal 0.9s 0.1s both;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}


/* 16. Responsive
   ========================================================================== */

@media (max-width: 860px) {
  /* Menú desplegable */
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 16px 20px;
    border-top: 1px solid var(--line);
  }

  .burger {
    display: block;
  }

  .site-header .btn {
    display: none;
  }

  /* Rejillas a una columna */
  .two-col,
  .cases,
  .contact,
  .reviews,
  .steps,
  .pills .wrap {
    grid-template-columns: 1fr;
  }

  .pill {
    padding: 18px 0;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .section {
    padding: 76px 0;
  }
}

@media (max-width: 520px) {
  .lang button {
    padding: 10px;
  }

  .lang__code {
    display: none;
  }
}
