/* ==========================================================================
   SistemaPOS — landing page styles
   Soporta modo claro y oscuro vía prefers-color-scheme.
   ========================================================================== */

:root {
  --bg: #f6f8fb;
  --bg-alt: #ffffff;
  --text: #101828;
  --text-muted: #52607a;
  --border: #e3e8f0;
  --card-bg: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-contrast: #ffffff;
  --accent: #15803d;
  --accent-bg: #ecfdf3;
  --whatsapp: #1fa855;
  --shadow: 0 4px 16px rgba(16, 24, 40, 0.06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12);
  --radius: 14px;
  --header-height: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --bg-alt: #101827;
    --text: #eef1f6;
    --text-muted: #9aa5b8;
    --border: #1f2937;
    --card-bg: #131c2c;
    --primary: #4f8dff;
    --primary-dark: #6ea1ff;
    --primary-contrast: #071021;
    --accent: #34d399;
    --accent-bg: #0d2418;
    --whatsapp: #2fbf6e;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

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

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow { max-width: 760px; }

h1, h2, h3, h4 {
  line-height: 1.2;
  margin: 0 0 .6em;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }

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

.text-accent { color: var(--primary); }

/* -------------------- Buttons -------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .98rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--primary);
  color: var(--primary-contrast);
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn-whatsapp {
  background: var(--whatsapp);
  color: #ffffff;
}
.btn-whatsapp:hover { filter: brightness(1.08); }

.btn-block { width: 100%; margin-top: 8px; }

.pill {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 18px;
}

/* -------------------- Header / Nav -------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg-alt) 92%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand, .footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--primary);
  color: var(--primary-contrast);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .5px;
}

.brand-name strong { color: var(--primary); }

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

.main-nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: .95rem;
  transition: color .15s ease;
}

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

.main-nav a.nav-cta {
  background: var(--primary);
  color: var(--primary-contrast);
  padding: 9px 18px;
  border-radius: 8px;
}
.main-nav a.nav-cta:hover { background: var(--primary-dark); color: var(--primary-contrast); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  transition: transform .2s ease, opacity .2s ease;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------------------- Hero -------------------- */

.hero {
  padding: 64px 0 40px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-sub { font-size: 1.08rem; max-width: 46ch; }

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0 22px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
}

.hero-trust li {
  font-size: .88rem;
  font-weight: 600;
  color: var(--accent);
  position: relative;
  padding-left: 20px;
}
.hero-trust li::before {
  content: "✓";
  position: absolute;
  left: 0;
}

.device-frame {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.device-bar {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.device-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.device-frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--bg);
}

/* -------------------- Trust strip -------------------- */

.trust-strip {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 26px 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trust-icon { font-size: 1.6rem; }

.trust-item p { margin: 0; font-size: .88rem; color: var(--text-muted); }
.trust-item strong { color: var(--text); }

/* -------------------- Sections -------------------- */

.section { padding: 84px 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  max-width: 620px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-head p { font-size: 1.05rem; }

/* -------------------- Feature grid -------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.feature-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.feature-card img.img-logo-sample {
  height: 170px;
  object-fit: contain;
  padding: 24px;
}

.feature-card h3, .feature-card p {
  padding: 0 20px;
}

.feature-card h3 { margin-top: 18px; }
.feature-card p:last-child { margin-bottom: 20px; }

.feature-card kbd {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: .82em;
  font-family: monospace;
}

/* mini cards (no screenshot) */

.mini-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.mini-card {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
}

.mini-icon { font-size: 1.5rem; }
.mini-card h4 { margin: 10px 0 8px; font-size: 1rem; }
.mini-card p { font-size: .9rem; margin: 0; }

/* -------------------- Gallery -------------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.gallery-item {
  position: relative;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card-bg);
  cursor: zoom-in;
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  transition: transform .3s ease;
}

.gallery-item:hover img { transform: scale(1.06); }

.gallery-item span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px;
  font-size: .82rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
  text-align: left;
}

/* -------------------- Lightbox -------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 10, 20, 0.88);
  padding: 40px;
}

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

.lightbox img {
  max-width: min(90vw, 1000px);
  max-height: 78vh;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
}

.lightbox-caption {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-weight: 600;
}

.lightbox-close, .lightbox-nav {
  position: absolute;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255,255,255,.22); }

.lightbox-close { top: 22px; right: 22px; }
.lightbox-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 22px; top: 50%; transform: translateY(-50%); }

/* -------------------- Pricing -------------------- */

.pricing-card {
  max-width: 460px;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 36px 32px;
  text-align: center;
}

.pricing-price {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.pricing-note { font-size: .88rem; }

.pricing-features {
  text-align: left;
  margin: 24px 0;
}

.pricing-features li {
  padding: 8px 0 8px 26px;
  position: relative;
  border-bottom: 1px solid var(--border);
  font-size: .94rem;
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* -------------------- FAQ -------------------- */

.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 20px;
}

.faq-item summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 24px;
}

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

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 12px;
  font-size: 1.2rem;
  color: var(--primary);
}

.faq-item[open] summary::after { content: "−"; }

.faq-item p { padding-bottom: 16px; margin: 0; }

/* -------------------- CTA / Contacto -------------------- */

.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 0;
}

.cta-inner { text-align: center; }

.cta-section h2, .cta-section p { color: #fff; }
.cta-section p { opacity: .92; }

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 26px 0 14px;
}

.cta-section .btn-primary {
  background: #fff;
  color: var(--primary-dark);
}
.cta-section .btn-primary:hover { background: #eef2ff; }

.cta-placeholder-note {
  font-size: .82rem;
  color: rgba(255,255,255,.8) !important;
}

/* -------------------- Footer -------------------- */

.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 48px 0 20px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.footer-brand p { margin-top: 10px; font-size: .88rem; }

.footer-nav { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: var(--text-muted); font-size: .92rem; }
.footer-nav a:hover { color: var(--primary); }

.footer-contact p { margin: 0 0 8px; font-size: .92rem; }

.footer-bottom {
  padding-top: 18px;
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .mini-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px 20px;
    gap: 4px;
    display: none;
    box-shadow: var(--shadow);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a {
    padding: 12px 4px;
    border-bottom: 1px solid var(--border);
  }
  .main-nav a.nav-cta {
    text-align: center;
    margin-top: 8px;
  }
  .nav-toggle { display: flex; }

  .feature-grid { grid-template-columns: 1fr; }
  .mini-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
}
