/* ==========================================================================
   MICARWASH - hoja de estilos
   Un solo archivo, sin build. Orden: tokens, base, componentes, secciones,
   responsive.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --brand-600: #0284c7;
  --brand-700: #0369a1;
  --brand-400: #38bdf8;
  --brand-050: #f0f9ff;

  --navy-900: #0c2233;
  --navy-600: #4a6376;
  --ink-500: #64748b;

  --line: #e2e8f0;
  --surface: #ffffff;
  --wa-500: #25d366;
  --wa-600: #1da851;

  --radius: 12px;
  --radius-pill: 999px;
  --container: 1140px;
  --pad-x: 20px;
  --pad-section: 64px;

  --shadow-sm: 0 1px 2px rgba(12, 34, 51, .06);
  --shadow-md: 0 6px 20px rgba(12, 34, 51, .08);
  --shadow-lg: 0 18px 45px rgba(12, 34, 51, .14);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--navy-900);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg,
iframe { display: block; max-width: 100%; }

img { height: auto; }

h1, h2, h3 {
  margin: 0;
  line-height: 1.2;
  color: var(--navy-900);
  text-wrap: balance;
}

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: var(--brand-700); }

:focus-visible {
  outline: 3px solid var(--brand-600);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--navy-900);
  color: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus { top: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* --------------------------------------------------------------------------
   3. Botones
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, color .16s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary,
.btn--wa {
  background: var(--wa-500);
  color: #062b16;
}

.btn--wa:hover { background: var(--wa-600); color: #fff; }

.btn--ghost {
  background: transparent;
  color: var(--brand-700);
  border-color: var(--brand-400);
}

.btn--ghost:hover {
  background: var(--brand-050);
  color: var(--brand-700);
}

.btn--lg { min-height: 56px; padding: 14px 30px; font-size: 1.0625rem; }
.btn--sm { min-height: 42px; padding: 9px 18px; font-size: .9375rem; }

/* --------------------------------------------------------------------------
   4. Encabezado y navegación
   -------------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1875rem;
  letter-spacing: .02em;
  color: var(--navy-900);
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--brand-400), var(--brand-600));
  color: #fff;
}

.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav__link {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: .9375rem;
  color: var(--navy-600);
  text-decoration: none;
  transition: color .16s ease, background-color .16s ease;
}

.nav__link:hover { color: var(--brand-700); background: var(--brand-050); }

.nav__cta { display: none; }

.nav-toggle {
  display: grid;
  place-content: center;
  gap: 5px;
  width: 46px; height: 46px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 20px; height: 2px;
  background: var(--navy-900);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   5. Secciones
   -------------------------------------------------------------------------- */
.section { padding-block: var(--pad-section); }

.section--tint {
  background: var(--brand-050);
  border-block: 1px solid #e0f0fb;
}

.section__head {
  max-width: 640px;
  margin: 0 auto 44px;
  text-align: center;
}

.section__head--left { margin-inline: 0; text-align: left; }

.section__title { font-size: 1.875rem; font-weight: 700; }

.section__sub {
  margin-top: 12px;
  color: var(--navy-600);
  font-size: 1.0625rem;
}

.section__note {
  margin-top: 32px;
  text-align: center;
  color: var(--navy-600);
  font-size: .9375rem;
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
  padding-block: 72px 84px;
  background: linear-gradient(180deg, #e8f6ff 0%, #ffffff 100%);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 460px;
  z-index: -1;
  background:
    radial-gradient(560px 260px at 18% 40%, rgba(56, 189, 248, .35), transparent 70%),
    radial-gradient(460px 240px at 82% 20%, rgba(2, 132, 199, .28), transparent 70%);
  filter: blur(4px);
}

.hero__inner { max-width: 780px; text-align: center; }

.hero__eyebrow {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: #fff;
  border: 1px solid #cfe8fa;
  color: var(--brand-700);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.hero__title {
  margin-top: 22px;
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  letter-spacing: -.02em;
}

.hero__lead {
  margin: 18px auto 0;
  max-width: 620px;
  color: var(--navy-600);
  font-size: 1.0625rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

.hero__points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 28px;
  margin-top: 40px;
  color: var(--navy-600);
  font-size: .9375rem;
  font-weight: 600;
}

.hero__points li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero__points li::before {
  content: "";
  width: 18px; height: 18px;
  flex: none;
  border-radius: 50%;
  background: var(--brand-050) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230284c7' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* --------------------------------------------------------------------------
   7. Grids y tarjetas
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: 22px; }

.card {
  display: flex;
  flex-direction: column;
  padding: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: #c9e4f7;
  box-shadow: var(--shadow-md);
}

.card--featured { border-color: var(--brand-400); box-shadow: var(--shadow-md); }

.card__badge {
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--brand-050);
  color: var(--brand-700);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.card__icon {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--brand-050);
  color: var(--brand-600);
}

.card__title { font-size: 1.125rem; font-weight: 700; }

.card__text {
  margin-top: 8px;
  color: var(--navy-600);
  font-size: .9375rem;
  flex: 1 1 auto;
}

.card__price {
  margin: 18px 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy-900);
}

/* --------------------------------------------------------------------------
   8. Ubicación y horarios
   -------------------------------------------------------------------------- */
.location {
  display: grid;
  gap: 36px;
  align-items: start;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 6px;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--navy-600);
  font-size: .875rem;
  font-weight: 700;
}

.pill::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--ink-500);
}

.pill[data-open="true"] {
  background: #e9f9f0;
  border-color: #b6e8ca;
  color: #12703a;
}

.pill[data-open="true"]::before { background: var(--wa-500); }

.info-list {
  display: grid;
  gap: 20px;
  margin: 26px 0 30px;
}

.info-list__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.info-list__icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  flex: none;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--brand-600);
}

.info-list__title { font-size: 1rem; font-weight: 700; }

.info-list__text {
  margin-top: 2px;
  color: var(--navy-600);
  font-size: .9375rem;
}

.hours {
  margin-top: 4px;
  border-collapse: collapse;
  font-size: .9375rem;
}

.hours th,
.hours td {
  padding: 2px 0;
  text-align: left;
  font-weight: 500;
  color: var(--navy-600);
}

.hours th { font-weight: 600; color: var(--navy-900); }
.hours td { text-align: right; }

.location__map {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.location__map iframe {
  width: 100%;
  height: 320px;
  border: 0;
}

.map__link {
  position: absolute;
  right: 12px; bottom: 12px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--navy-900);
  color: #fff;
  font-size: .8125rem;
  font-weight: 700;
  text-decoration: none;
}

.map__link:hover { background: var(--brand-700); }

/* --------------------------------------------------------------------------
   9. Galería y lightbox
   -------------------------------------------------------------------------- */
.gallery__item { margin: 0; }

.gallery__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  line-height: 0;
  transition: transform .18s ease, box-shadow .18s ease;
}

.gallery__btn:hover,
.gallery__btn:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.gallery__btn img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .3s ease;
}

.gallery__btn:hover img { transform: scale(1.04); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(6, 20, 32, .88);
}

.lightbox[hidden] { display: none; }

.lightbox__figure {
  margin: 0;
  max-width: min(1000px, 100%);
  text-align: center;
}

.lightbox__figure img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--navy-900);
}

.lightbox__caption {
  margin-top: 14px;
  color: #e2e8f0;
  font-size: .9375rem;
}

.lightbox__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox__close:hover { background: rgba(255, 255, 255, .3); }

body.is-locked { overflow: hidden; }

/* --------------------------------------------------------------------------
   10. Contacto
   -------------------------------------------------------------------------- */
.contact { text-align: center; }

.contact__title { font-size: clamp(1.5rem, 4.5vw, 2.25rem); font-weight: 800; }

.contact__lead {
  margin: 14px auto 0;
  max-width: 520px;
  color: var(--navy-600);
  font-size: 1.0625rem;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 32px;
}

/* --------------------------------------------------------------------------
   11. Pie
   -------------------------------------------------------------------------- */
.footer {
  padding-block: 32px;
  background: var(--navy-900);
  color: #b8c9d6;
  text-align: center;
}

.footer__brand { font-weight: 700; color: #fff; }

.footer__legal { margin-top: 6px; font-size: .875rem; }

/* --------------------------------------------------------------------------
   12. Botón flotante de WhatsApp
   -------------------------------------------------------------------------- */
.float-wa {
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 60px;
  padding: 0 17px;
  border-radius: var(--radius-pill);
  background: var(--wa-500);
  color: #062b16;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(.9);
  transition: opacity .22s ease, transform .22s ease, visibility .22s, background-color .16s ease;
}

.float-wa.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.float-wa:hover { background: var(--wa-600); color: #fff; }

.float-wa__label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width .24s ease, opacity .2s ease, margin .24s ease;
}

.float-wa:hover .float-wa__label,
.float-wa:focus-visible .float-wa__label {
  max-width: 190px;
  margin-right: 10px;
  opacity: 1;
}

/* --------------------------------------------------------------------------
   13. Responsive
   -------------------------------------------------------------------------- */
@media (min-width: 700px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .hours td { text-align: left; padding-left: 20px; }
}

@media (min-width: 1000px) {
  :root {
    --pad-x: 24px;
    --pad-section: 96px;
  }

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

  .hero { padding-block: 104px 112px; }

  .location { grid-template-columns: 1fr 1fr; gap: 48px; }
  .location__map iframe { height: 440px; }

  .nav__cta { display: inline-flex; }
}

@media (max-width: 860px) {
  .nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px var(--pad-x) 24px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-130%);
    visibility: hidden;
    transition: transform .24s ease, visibility .24s;
  }

  .nav.is-open {
    transform: translateY(0);
    visibility: visible;
  }

  .nav__list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav__link { padding: 13px 12px; border-radius: var(--radius); }
  .nav__cta { margin-top: 12px; }
}

@media (max-width: 640px) {
  .hero__actions .btn,
  .contact__actions .btn { width: 100%; }

  .float-wa { right: 12px; bottom: 12px; }

  .float-wa .float-wa__label {
    max-width: 190px;
    margin-right: 10px;
    opacity: 1;
  }

  .section__head { margin-bottom: 32px; }
}

/* --------------------------------------------------------------------------
   14. Preferencias del sistema
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .float-wa { transform: none; }
  .float-wa.is-visible { transform: none; }
}

@media print {
  .header,
  .float-wa,
  .hero__bg,
  .nav-toggle,
  .lightbox { display: none !important; }

  body { color: #000; }
  .section { padding-block: 24px; }
  .card, .location__map { box-shadow: none; }
}
