/* ==========================================================================
   Icónica — Landing page
   Basada en la estética de AstroDeck (ThemeWagon)
   Mobile-first · breakpoints: 640 (tablet) · 1024 (laptop) · 1280 (desktop)
   ========================================================================== */

/* ---------- Design tokens ------------------------------------------------ */
:root {
  /* Color */
  --ink:        #0a0a0a;   /* texto principal / negro */
  --ink-soft:   #404040;   /* texto secundario fuerte */
  --muted:      #6b7280;   /* texto secundario */
  --bg:         #ffffff;
  --bg-alt:     #fafafa;   /* secciones claras alternas */
  --bg-dark:    #0a0a0a;   /* sección CTA oscura */
  --border:     #dedede;
  --border-dark:#262626;

  /* Acento — verde menta "resaltador" de AstroDeck */
  --accent:        #4ade80;   /* verde sólido para detalles */
  --accent-strong: #16a34a;   /* verde para texto/links sobre claro */
  --accent-soft:   #bbf7d0;   /* highlight tipo marcador */

  /* Tipografía */
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --gutter: 20px;
  --header-h: 64px;

  /* Radios y sombras */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 10px 30px -12px rgba(0,0,0,.18);
}

/* ---------- Reset -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }

/* ---------- Helpers ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: 64px; }
.section--alt { background: var(--bg-alt); }
.eyebrow {
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
}
.hl {
  background: var(--accent-soft);
  padding: .04em .12em;
  border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.center { text-align: center; }

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-weight: 600;
  font-size: .95rem;
  padding: .8rem 1.4rem;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #262626; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--ink); }
/* Variantes sobre fondo oscuro */
.on-dark .btn--primary { background: #fff; color: var(--ink); }
.on-dark .btn--primary:hover { background: #e9e9e9; }
.on-dark .btn--ghost { color: #fff; border-color: var(--border-dark); }
.on-dark .btn--ghost:hover { border-color: #fff; }

/* ==========================================================================
   HEADER / sticky menu
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.header.is-scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }
.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.02em;
}
.brand__mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--ink);
  display: grid; place-items: center;
  color: var(--accent);
  font-weight: 800;
  font-size: .9rem;
}

/* Nav desktop */
.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: 1.6rem; }
.nav__link {
  position: relative;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-block: 4px;
  transition: color .18s ease;
}
.nav__link:hover { color: var(--ink); }
.nav__link.is-active { color: var(--accent-strong); }

/* Hamburguesa */
.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px; height: 42px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.hamburger span {
  display: block;
  width: 18px; height: 2px;
  margin-inline: auto;
  background: var(--ink);
  transition: transform .25s ease, opacity .2s ease;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Panel móvil */
.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: transform .25s ease, opacity .25s ease, visibility .25s;
  z-index: 49;
}
.mobile-nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
.mobile-nav__list { padding: 12px var(--gutter) 24px; }
.mobile-nav__list li { border-bottom: 1px solid var(--border); }
.mobile-nav__list li:last-child { border-bottom: 0; }
.mobile-nav__link {
  display: block;
  padding: 14px 4px;
  font-size: 1.05rem;
  font-weight: 600;
}
.mobile-nav__link.is-active { color: var(--accent-strong); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { padding-block: 56px 40px; text-align: center; }
.hero__title {
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: .98;
  font-size: clamp(2.6rem, 11vw, 6.5rem);
  text-wrap: balance;
}
.hero__subtitle {
  margin: 1.4rem auto 0;
  max-width: 40ch;
  font-size: clamp(1.05rem, 4.2vw, 1.5rem);
  font-style: italic;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ==========================================================================
   SLIDER / Galería antes-después
   ========================================================================== */
.slider { position: relative; background: var(--bg-dark); overflow: hidden; }
.slider__viewport { overflow: hidden; }
.slider__track {
  display: flex;
  transition: transform .55s cubic-bezier(.65,.05,.36,1);
}
.slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 1fr;          /* móvil: una columna */
}
.ba {                                   /* before/after cell */
  position: relative;
  aspect-ratio: 4 / 5;
  background: #111;
}
.ba image-slot { width: 100%; height: 100%; }
.ba img { width: 100%; height: 100%; object-fit: cover; }

.ba__tag {
  position: absolute;
  left: 50%; bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 18px;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  /*border-radius: var(--r-md);*/
  text-align: center;
  width: max-content;
  max-width: 90%;
}
.ba__label {
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}

/*@media (min-width: 640px) {
  .ba__tag {
    width: max-content;
  }
}*/


.ba__caption { color: #fff; font-size: .92rem; font-style: italic; line-height: normal;}

/* Controles */
.slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  color: #fff;
  z-index: 5;
  transition: background .2s ease;
}
.slider__btn:hover { background: rgba(255,255,255,.28); }
.slider__btn--prev { left: 14px; }
.slider__btn--next { right: 14px; }
.slider__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 54px; height: 54px;
  display: grid; place-items: center;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 50%;
  color: #fff;
  z-index: 6;
  opacity: 0;
  transition: opacity .2s ease, background .2s ease;
}
.slider:hover .slider__play { opacity: 1; }
.slider__play:hover { background: rgba(0,0,0,.7); }
.slider__dots {
  position: absolute;
  left: 50%; bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
.slider__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: rgba(255,255,255,.4);
  transition: background .2s ease, width .2s ease;
}
.slider__dot.is-active { background: var(--accent); width: 22px; border-radius: 4px; }

/* ==========================================================================
   CARD GRID / Cómo funciona
   ========================================================================== */
.steps__head { max-width: 46rem; margin-inline: auto; text-align: center; }
.steps__title {
  font-size: clamp(1.8rem, 6vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.05;
  text-wrap: balance;
}
.steps__lead {
  margin-top: 1rem;
  color: var(--muted);
  font-size: clamp(1rem, 3vw, 1.12rem);
  text-wrap: pretty;
}
.cards {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 14px 30px -16px rgba(0,0,0,.18);
}
.card {
  padding: 32px 28px;
  border-top: 1px solid var(--border);
  transition: background .2s ease;
}
.card:first-child { border-top: 0; }
.card:hover { background: var(--bg-alt); }
.card__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: var(--ink);
  color: var(--accent);
  margin-bottom: 18px;
}
.card__num {
  font-size: .72rem;
  letter-spacing: .14em;
  font-weight: 700;
  color: var(--accent-strong);
}
.card__title { margin-top: 4px; font-size: 1.18rem; font-weight: 700; letter-spacing: -.01em; }
.card__text { margin-top: 8px; color: var(--muted); font-size: .96rem; }
.card__price { color: var(--ink); font-weight: 700; }

/* ==========================================================================
   CTA oscura
   ========================================================================== */
.cta { background: var(--bg-dark); color: #fff; text-align: center; }
.cta__title {
  max-width: 22ch;
  margin-inline: auto;
  font-size: clamp(1.8rem, 6.4vw, 3.1rem);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.08;
  text-wrap: balance;
}
.cta__text {
  margin: 1.1rem auto 0;
  max-width: 52ch;
  color: #a3a3a3;
  font-size: clamp(1rem, 3vw, 1.12rem);
  text-wrap: pretty;
}
.cta__text strong { color: #fff; font-weight: 600; }
.cta__actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.cta__note { margin-top: 1.4rem; font-size: .8rem; color: #737373; }
.upload-input { display: none; }

/* ==========================================================================
   TABLA COMPARATIVA
   ========================================================================== */
.compare__head { text-align: center; max-width: 44rem; margin-inline: auto; }
.compare__title { font-size: clamp(1.7rem, 5.5vw, 2.6rem); font-weight: 800; letter-spacing: -.025em; }
.compare__lead { margin-top: .7rem; color: var(--muted); }
.table-wrap {
  margin-top: 40px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,.05), 0 14px 30px -16px rgba(0,0,0,.18);
}
.compare-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}
.compare-table th, .compare-table td {
  padding: 18px 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  font-size: .95rem;
}
.compare-table thead th { font-size: .9rem; }
.compare-table tbody th, .compare-table tbody td:first-child { text-align: left; font-weight: 500; color: var(--ink-soft); }
.compare-table tbody tr:last-child td, .compare-table tbody tr:last-child th { border-bottom: 0; }
.col-feature { width: 34%; }
.col-highlight { background: #f0fdf4; position: relative; }
.compare-table thead .col-highlight { background: #f0fdf4; }
.col-highlight .pill {
  display: inline-block;
  margin-top: 4px;
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-strong);
}
.brand-col { font-weight: 800; letter-spacing: -.01em; font-size: 1.05rem; }
.check { color: var(--accent-strong); font-weight: 700; }
.dash { color: #c4c4c4; }

/* ==========================================================================
   CONTACTO
   ========================================================================== */
.contact__grid { display: grid; grid-template-columns: 1fr; gap: 40px; }
.contact__title { font-size: clamp(1.8rem, 6vw, 2.8rem); font-weight: 800; letter-spacing: -.025em; line-height: 3rem;}
.contact__lead { margin-top: .8rem; color: var(--muted); max-width: 40ch; text-wrap: pretty; }
.contact__list { margin-top: 28px; display: grid; gap: 20px; }
.contact__item { display: flex; gap: 14px; align-items: flex-start; }
.contact__ico {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--ink);
}
.contact__k { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.contact__v { font-size: .98rem; color: var(--ink); }

.form { display: grid; gap: 18px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; }
.field { display: grid; gap: 7px; }
.field label { font-size: .85rem; font-weight: 600; }
.field .req { color: var(--accent-strong); }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(10,10,10,.08);
}
.field textarea { resize: vertical; min-height: 120px; }
.form__foot { font-size: .78rem; color: var(--muted); }

/* Dropzone de subida de foto */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 26px 18px;
  border: 1.5px dashed var(--border);
  border-radius: var(--r-md);
  background: var(--bg-alt);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.dropzone:hover { border-color: var(--ink); background: #f4f4f4; }
.dropzone.is-dragover { border-color: var(--accent-strong); background: #f0fdf4; }
.dropzone__icon { color: var(--ink); }
.dropzone__text { font-size: .95rem; color: var(--ink-soft); }
.dropzone__text strong { color: var(--ink); font-weight: 600; }
.dropzone__hint { font-size: .78rem; color: var(--muted); }

.dropzone__preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
}
.dropzone__preview img {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: var(--r-sm);
  flex: 0 0 auto;
}
.dropzone__thumb {
  position: relative;
  flex: 0 0 auto;
  width: 56px; height: 56px;
  border-radius: var(--r-sm);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
}
.dropzone__thumb img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .2s ease;
}
.dropzone__thumb.is-loaded img { opacity: 1; }
.dropzone__file { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dropzone__name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dropzone__remove {
  align-self: flex-start;
  padding: 0;
  background: none;
  border: 0;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent-strong);
  text-decoration: underline;
}
.form .btn--primary { width: 100%; padding-block: .95rem; }
.form__success {
  display: none;
  padding: 14px 16px;
  background: #f0fdf4;
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
  color: var(--accent-strong);
  font-weight: 600;
  font-size: .92rem;
}
.form.is-sent .form__success { display: block; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { border-top: 1px solid var(--border); padding-block: 56px 32px; }
.footer__grid { display: grid; grid-template-columns: 1fr; gap: 36px; }
.footer__brand .brand { margin-bottom: 14px; }
.footer__about { color: var(--muted); font-size: .92rem; max-width: 34ch; }
.footer__col h4 { font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.footer__col li { margin-bottom: 10px; }
.footer__col a { font-size: .95rem; color: var(--ink-soft); transition: color .15s ease; }
.footer__col a:hover { color: var(--ink); }
.footer__bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
}

/* ==========================================================================
   BREAKPOINTS
   ========================================================================== */

/* —— Tablet ≥ 640px —— */
@media (min-width: 640px) {
  .section { padding-block: 80px; }
  .slide { grid-template-columns: 1fr 1fr; }   /* antes/después en 2 columnas */
  .cards { grid-template-columns: repeat(3, 1fr); }
  .card { border-top: 0; border-left: 1px solid var(--border); }
  .card:first-child { border-left: 0; }
  .contact__grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

/* —— Laptop ≥ 1024px —— */
@media (min-width: 1024px) {
  :root { --header-h: 72px; --gutter: 32px; }
  .nav { display: block; }
  .hamburger { display: none; }
  .hero { padding-block: 90px 60px; }
  .section { padding-block: 100px; }
  .ba { aspect-ratio: 1 / 1; }
}

/* —— Desktop ≥ 1280px —— */
@media (min-width: 1280px) {
  .hero { padding-block: 110px 72px; }
}

/* Respeta usuarios con reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
