/* Sitio SMART365 — estilos del sitio sobre los tokens del sistema de diseño.
   Requiere styles.css (tokens/) cargado antes. */

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

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

body {
  margin: 0;
  background: var(--surface-page);
  font-family: var(--font-core);
  color: var(--text-body);
}

img { max-width: 100%; }

a { color: var(--text-link); text-decoration: none; }
a:hover { color: var(--text-link-hover); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.wrap {
  max-width: var(--max-content);
  margin: 0 auto;
  padding-left: var(--gutter-page);
  padding-right: var(--gutter-page);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface-page);
  border-bottom: 1px solid var(--border-subtle);
}
.site-header .bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 42px; width: auto; }

.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a {
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps-tight);
  color: var(--text-heading);
  padding: 6px 0 4px;
  border-bottom: 2px solid transparent;
  transition: var(--transition-control);
  white-space: nowrap;
}
.nav a:hover { color: var(--brand-primary); }
.nav a[aria-current="page"] { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }
.nav a.btn { color: #fff; border-bottom: none; padding: 0 20px; }
.nav a.btn:hover { color: #fff; }

.nav-toggle, .nav-toggle-label { display: none; }

/* ---------- Botones ---------- */
.btn {
  height: var(--control-height-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  background: var(--brand-primary);
  color: #fff;
  font-family: var(--font-core);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-control);
}
.btn:hover { background: var(--brand-primary-hover); color: #fff; }
.btn:active { background: var(--brand-primary-active); transform: translateY(1px); }
.btn:disabled { opacity: 0.4; }

.btn-lg { height: var(--control-height-lg); padding: 0 28px; font-size: var(--fs-body-sm); }
.btn-block { width: 100%; }

.btn-green { background: var(--s365-green); }
.btn-green:hover { background: #007a37; }
.btn-green:active { background: #00612c; }

.btn-navy { background: var(--s365-navy); }
.btn-navy:hover { background: #1a3462; }
.btn-navy:active { background: #142950; }

.btn-ghost { background: transparent; border: 1px solid #fff; color: #fff; border-radius: 0; }
.btn-ghost:hover { background: #fff; color: var(--brand-primary); }
.btn-ghost:active { background: #fff; color: var(--brand-primary-active); transform: translateY(1px); }

.btn-outline { background: transparent; border: 1px solid var(--brand-primary); color: var(--brand-primary); border-radius: 0; }
.btn-outline:hover { background: var(--brand-primary); color: #fff; }
.btn-outline:active { background: var(--brand-primary-active); color: #fff; transform: translateY(1px); }

.btn-white { background: #fff; color: var(--brand-primary); border-radius: 0; }
.btn-white:hover { background: var(--smart-cyan); color: var(--neutral-900); }
.btn-white:active { background: var(--smart-cyan-75); color: var(--neutral-900); transform: translateY(1px); }

/* ---------- Encabezados de sección ---------- */
.eyebrow {
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--brand-primary);
}
.eyebrow-muted { color: var(--text-muted); }
.eyebrow-cyan { color: var(--smart-cyan); }
.eyebrow-green { color: var(--smart-green-75); }

h1, h2, h3 { margin: 0; color: var(--text-heading); }
.inverse h1, .inverse h2, .inverse h3, .inverse { color: #fff; }

.display-1 { font-size: clamp(38px, 4.8vw, 60px); font-weight: var(--fw-extrabold); line-height: var(--lh-display); letter-spacing: var(--ls-display); }
.display-2 { font-size: clamp(30px, 3.6vw, 46px); font-weight: var(--fw-extrabold); line-height: var(--lh-display); letter-spacing: var(--ls-display); }
.display-3 { font-size: clamp(26px, 2.8vw, 34px); font-weight: var(--fw-bold); line-height: var(--lh-heading); letter-spacing: var(--ls-display); }

.rule { width: 72px; height: var(--border-rule); background: var(--brand-primary); margin-top: 20px; }
.rule-lg { width: 88px; height: 6px; }
.rule-green { background: var(--smart-green); }
.rule-s365green { background: var(--s365-green); }
.rule-cyan { background: var(--smart-cyan); }
.rule-navy { background: var(--s365-navy); }

.lead { font-size: var(--fs-body-lg); line-height: var(--lh-body); }
.body-copy { font-size: var(--fs-body); line-height: var(--lh-body); }
.muted-on-brand { color: var(--text-on-brand-muted); }

/* ---------- Bandas ---------- */
.band { padding-top: 88px; padding-bottom: 88px; }
.band-tight { padding-top: 64px; padding-bottom: 64px; }
.band-subtle { background: var(--surface-subtle); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.band-brand { background: var(--surface-brand); color: #fff; }
.band-deep { background: var(--surface-brand-deep); color: #fff; }

.photo-band { position: relative; background: #2c2f36; overflow: hidden; display: flex; align-items: center; }
.photo-band > .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-band > .scrim { position: absolute; inset: 0; background: var(--scrim-purple); }
.photo-band > .scrim-flat { background: var(--scrim-flat); }
.photo-band > .content { position: relative; width: 100%; }

.hero { min-height: min(78vh, 640px); }
@media (prefers-reduced-motion: no-preference) {
  .hero .content > * { animation: hero-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) both; }
  @keyframes hero-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
}

/* Cinta en diagonal (firma de los flyers) */
.ribbon {
  position: absolute;
  left: 0;
  bottom: 48px;
  background: var(--s365-navy);
  transform: rotate(-3deg) translateX(-14px);
  padding: 12px 40px 12px 30px;
  box-shadow: var(--shadow-ribbon);
  color: #fff;
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps-tight);
  text-transform: uppercase;
}

/* ---------- Check list ---------- */
.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: var(--fs-body-sm);
  line-height: var(--lh-body);
}
.check strong { font-weight: var(--fw-bold); }
.check .dot {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--brand-primary);
  position: relative;
}
.check .dot::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}
.check-green .dot { background: var(--s365-green); }
.check-list { display: grid; gap: 12px; }

/* ---------- Badges ---------- */
.spec {
  display: inline-block;
  border: 1px solid var(--brand-primary);
  color: var(--brand-primary);
  padding: 6px 12px;
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
}
.spec-navy { border-color: var(--s365-navy); color: var(--s365-navy); }
.spec-cyan { border-color: var(--smart-cyan); color: #0a7e93; }
.spec-green { border-color: var(--s365-green); color: var(--s365-green); }

.plataformas {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps-tight);
  text-transform: uppercase;
  color: var(--text-muted);
}
.plataformas b { color: var(--text-heading); font-weight: var(--fw-bold); }
.plataformas .sep { opacity: 0.45; }

/* ---------- Tarjetas ---------- */
.card {
  background: var(--surface-card);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-control);
}
a.card-hover:hover, .card-hover:hover { box-shadow: var(--shadow-card-hover); }
.card-bordered { background: var(--surface-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); box-shadow: none; }

.card-media { position: relative; height: 240px; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .tag {
  position: absolute;
  left: 0;
  bottom: 18px;
  background: var(--brand-primary);
  color: #fff;
  padding: 8px 24px;
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
}
.card-media .tag-navy { background: var(--s365-navy); }
.card-body { padding: 28px; }
.card-body h3 { font-size: var(--fs-heading-1); font-weight: var(--fw-bold); line-height: var(--lh-tight); }

.card-link {
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps-tight);
  color: var(--brand-primary);
}

/* ---------- Kits de sala (empresas) ---------- */
.grid-salas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.sala {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sala header {
  background: var(--s365-navy);
  color: #fff;
  padding: 18px 22px;
}
.sala.destacada header { background: var(--brand-primary); }
.sala header .tipo { font-size: var(--fs-micro); font-weight: var(--fw-semibold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: rgba(255,255,255,0.75); }
.sala header .nombre { margin-top: 4px; font-size: var(--fs-heading-2); font-weight: var(--fw-bold); }
.sala header .capacidad { margin-top: 2px; font-size: var(--fs-body-sm); color: rgba(255,255,255,0.85); }
.sala .cuerpo { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.sala .cuerpo .check { font-size: var(--fs-body-sm); }
.sala .pie { padding: 0 22px 22px; }

/* ---------- Programa por pasos ---------- */
.pasos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: paso; }
.paso { position: relative; }
.paso .num {
  font-size: 44px;
  font-weight: var(--fw-black);
  line-height: 1;
  color: var(--smart-purple-25);
  font-variant-numeric: tabular-nums;
}
.inverse .paso .num, .band-brand .paso .num { color: rgba(255, 255, 255, 0.35); }
.paso h3 { margin-top: 10px; font-size: var(--fs-heading-3); font-weight: var(--fw-bold); line-height: var(--lh-tight); }
.paso p { margin: 8px 0 0; font-size: var(--fs-body-sm); line-height: var(--lh-body); }
.paso .filo { width: 36px; height: var(--border-rule); background: var(--smart-cyan); margin-top: 14px; }

/* ---------- Marcas / tecnología ---------- */
.grid-marcas { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.marca {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.marca .logo { height: 34px; display: flex; align-items: center; }
.marca .logo img { max-height: 30px; width: auto; max-width: 190px; }
.marca .wordmark {
  font-size: 24px;
  font-weight: var(--fw-black);
  letter-spacing: 0.02em;
  color: var(--text-heading);
  line-height: 1;
}
.marca h3 { font-size: var(--fs-heading-3); font-weight: var(--fw-bold); line-height: var(--lh-tight); }
.marca p { margin: 0; font-size: var(--fs-body-sm); line-height: var(--lh-body); }

.partners-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
}
.partners-row img { object-fit: contain; }
.partners-row .wordmark { font-size: 25px; font-weight: var(--fw-black); letter-spacing: 0.02em; color: var(--text-heading); }

/* ---------- Franja de estadísticas ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  padding-top: 38px;
  padding-bottom: 38px;
}
.stat .num { font-size: var(--fs-display-3); font-weight: var(--fw-black); color: var(--brand-primary); line-height: 1; font-variant-numeric: tabular-nums; }
.stat .num-green { color: var(--s365-green); }
.stat .num-navy { color: var(--s365-navy); }
.stat .label { margin-top: 8px; font-size: var(--fs-body-sm); line-height: var(--lh-body); }

/* ---------- Selector de solución ---------- */
.wizard { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); background: var(--surface-card); padding: 30px; }
.wizard .pregunta { font-size: var(--fs-micro); font-weight: var(--fw-semibold); letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.wizard .opciones { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.wizard .opciones button {
  font-family: var(--font-core);
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps-tight);
  padding: 10px 18px;
  border: 1px solid var(--border-default);
  background: var(--surface-page);
  color: var(--text-heading);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-control);
}
.wizard .opciones button:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.wizard .opciones button[aria-pressed="true"] {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}
.wizard .resultado {
  border-top: 1px solid var(--border-subtle);
  padding-top: 22px;
  display: none;
}
.wizard .resultado.visible { display: block; }
.wizard .resultado .reco-titulo { font-size: var(--fs-heading-2); font-weight: var(--fw-bold); color: var(--text-heading); line-height: var(--lh-tight); }
.wizard .resultado p { margin: 10px 0 0; font-size: var(--fs-body); line-height: var(--lh-body); }
.wizard .resultado .acciones { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Formulario ---------- */
.field { display: grid; gap: 8px; }
.field > span {
  font-size: var(--fs-micro);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--text-muted);
}
.input {
  height: var(--control-height-md);
  padding: 0 16px;
  font-family: var(--font-core);
  font-size: var(--fs-body-sm);
  color: var(--text-heading);
  background: var(--surface-page);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
}
textarea.input { height: auto; min-height: 120px; padding: 12px 16px; resize: vertical; line-height: var(--lh-body); }
select.input { appearance: none; }
.input:focus { outline: none; border-color: var(--smart-cyan); box-shadow: var(--focus-ring); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface-footer); color: var(--text-on-brand); padding: 30px var(--gutter-page) 26px; }
.site-footer .inner {
  max-width: var(--max-content);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.site-footer img { height: 34px; width: auto; filter: brightness(0) invert(1); }
.site-footer .line {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-caps-tight);
  text-transform: uppercase;
}
.site-footer .line a { color: #fff; }
.site-footer .line a:hover { color: var(--smart-cyan-50); }
.site-footer .sep { opacity: 0.5; }
.site-footer .legal {
  max-width: var(--max-content);
  margin: 16px auto 0;
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-caps-tight);
  color: rgba(255, 255, 255, 0.6);
}
.site-footer .legal strong { color: rgba(255, 255, 255, 0.85); font-weight: var(--fw-bold); }

/* ---------- Grillas ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.split-wide { grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.split-form { align-items: start; gap: 56px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }

/* ---------- WhatsApp flotante ---------- */
.wa-flotante {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 40;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(18, 19, 23, 0.3);
  transition: var(--transition-control);
}
.wa-flotante:hover { background: #1ebe5d; transform: translateY(-2px); }
.wa-flotante:active { transform: translateY(0); }
.wa-flotante svg { width: 30px; height: 30px; fill: #fff; }
@media (max-width: 640px) {
  .wa-flotante { right: 16px; bottom: 16px; width: 52px; height: 52px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-salas { grid-template-columns: 1fr; max-width: 560px; }
  .pasos { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .split, .split-wide, .split-form, .grid-3, .grid-marcas { grid-template-columns: 1fr; }
  .grid-3 { gap: 28px; }
  .band { padding-top: 60px; padding-bottom: 60px; }
  .hero { min-height: 480px; }
}
@media (max-width: 560px) {
  .pasos { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-left: 0;
    background: var(--surface-page);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px var(--gutter-page) 18px;
    display: none;
  }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--border-subtle); }
  .nav a[aria-current="page"] { border-bottom-color: var(--border-subtle); }
  .nav a.btn { margin-top: 14px; border-bottom: none; padding: 0 20px; }
  .nav-toggle:checked ~ .nav { display: flex; }
  .nav-toggle-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    margin-left: auto;
    cursor: pointer;
  }
  .nav-toggle-label span { display: block; height: 2px; background: var(--text-heading); }
}

@media (max-width: 640px) {
  .brand img { height: 34px; }
  .ribbon { bottom: 28px; }
  .card-media { height: 200px; }
}
