/* =========================================================
   OPENSTOCK — Landing comercial
   Capa sobre tokens.css (Adapter DS, tema indigo).
   Regla: todo color/radio/sombra/fuente sale de var(--…).
   Única excepción: el degradado de marca del logo
   (#5B52F0 → #4F46E5 → #4338CA), que es identidad, no UI.
   ========================================================= */

:root {
  --brand-gradient: linear-gradient(180deg, #5B52F0 0%, #4F46E5 50%, #4338CA 100%);
  --nav-h: 64px;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body { background: var(--bg); font-size: 15px; }

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

/* ------ Marca ------ */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  background: var(--brand-gradient); /* degradado de identidad del logo */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-word {
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand-word b { font-weight: 600; }

/* ------ Nav ------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links > a:not(.btn) {
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-links > a:not(.btn):hover { background: var(--bg-subtle); color: var(--text); }
.nav-cta { margin-left: 8px; }
.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--text);
}
.nav-burger:hover { background: var(--bg-subtle); }
.nav-burger svg { width: 22px; height: 22px; }

/* ------ Hero ------ */
.hero {
  padding: 72px 0 40px;
  background: var(--bg);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 48px;
  align-items: center;
}
.hero-badge { align-self: flex-start; }
.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 560px;
}
.hero-title { font-size: 48px; line-height: 1.1; }
.hero-sub {
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 48ch;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}
.hero-note { margin-top: -4px; }

/* Botones de tienda (hechos a mano, estilo badge oficial) */
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--primary-contrast);
  transition: background var(--dur) var(--ease);
}
.store-btn:hover { background: var(--primary-hover); }
.store-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.store-btn > svg { width: 24px; height: 24px; flex-shrink: 0; }
.store-btn span {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.store-btn small {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

/* ------ Mockup teléfono ------ */
.hero-phone { display: flex; justify-content: center; }
.phone {
  width: 300px;
  border-radius: 44px;
  background: var(--text);
  padding: 10px;
  box-shadow: var(--shadow-lg);
}
.phone-screen {
  position: relative;
  background: var(--bg-muted);
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 600px;
}
.ph-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.ph-status-icons { display: flex; gap: 5px; }
.ph-status-icons svg { width: 14px; height: 14px; }
.ph-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px 12px;
}
.ph-title { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; }
.ph-count { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.ph-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--primary-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}
.ph-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 14px 10px;
  height: 40px;
  padding: 0 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-subtle);
  font-size: 13px;
}
.ph-search svg { width: 16px; height: 16px; flex-shrink: 0; }
.ph-search svg:last-child { margin-left: auto; color: var(--primary-ink); }
.ph-search span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-list {
  flex: 1;
  margin: 0 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.ph-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
}
.ph-list li:last-child { border-bottom: 0; }
.ph-tint {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.ph-item { display: flex; flex-direction: column; min-width: 0; }
.ph-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ph-ean {
  font-size: 11px;
  color: var(--text-subtle);
  font-variant-numeric: tabular-nums;
}
.ph-stock {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.ph-fab {
  position: absolute;
  right: 20px;
  bottom: 84px;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--primary-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}
.ph-fab svg { width: 22px; height: 22px; }
.ph-tabbar {
  display: flex;
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 8px 6px 18px;
}
.ph-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-subtle);
}
.ph-tab svg { width: 20px; height: 20px; }
.ph-tab.active { color: var(--primary-ink); }

/* ------ Secciones ------ */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-muted); }
.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head .t-h1 { font-size: 32px; }
.section-sub { font-size: 16px; }
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-ink);
}

/* ------ Funciones ------ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--primary-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature p { font-size: 14px; }

/* ------ Pasos ------ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: paso;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
}
.step-num {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--primary-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}
.step p { font-size: 14px; }

/* ------ Para quién ------ */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.audience-grid li {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.audience-grid li:hover { border-color: var(--border-strong); background: var(--bg-muted); }

/* ------ Gratis ------ */
.free-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 40px;
}
.free-copy { display: flex; flex-direction: column; gap: 12px; }
.free-copy .t-h1 { font-size: 32px; }
.free-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.free-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 500;
}
.free-list svg {
  width: 22px;
  height: 22px;
  padding: 3px;
  border-radius: var(--radius-full);
  background: var(--success-soft);
  color: var(--success);
  flex-shrink: 0;
}

/* ------ FAQ ------ */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: background var(--dur) var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: var(--bg-muted); }
.faq-chevron {
  width: 8px;
  height: 8px;
  border-right: 1.75px solid var(--text-muted);
  border-bottom: 1.75px solid var(--text-muted);
  transform: rotate(45deg);
  transition: transform var(--dur) var(--ease);
  flex-shrink: 0;
}
.faq-item[open] .faq-chevron { transform: rotate(-135deg); }
.faq-item p {
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: 14px;
  max-width: 62ch;
}

/* ------ CTA final ------ */
.cta-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 48px 32px;
}
.cta-mark {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--brand-gradient); /* degradado de identidad del logo */
  display: flex;
  align-items: center;
  justify-content: center;
}
.cta-mark svg { width: 54px; height: 54px; }
.cta-ctas { justify-content: center; }

/* ------ Footer ------ */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links { display: flex; gap: 4px; }
.footer-links a {
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--text-muted);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.footer-links a:hover { background: var(--bg-subtle); color: var(--text); }
.footer-copy { color: var(--text-muted); }

/* ------ Reveal on scroll ------ */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ------ Responsive ------ */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-copy { max-width: 100%; }
  .hero-title { font-size: 38px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .audience-grid { grid-template-columns: repeat(2, 1fr); }
  .free-card { grid-template-columns: 1fr; gap: 24px; padding: 28px; }
}

@media (max-width: 720px) {
  .nav-burger { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 16px 16px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links > a:not(.btn) { padding: 12px 14px; font-size: 15px; }
  .nav-cta { margin: 8px 0 0; height: 44px; }

  .section { padding: 64px 0; }
  .hero { padding: 48px 0 24px; }
  .hero-title { font-size: 32px; }
  .hero-sub { font-size: 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .section-head .t-h1, .free-copy .t-h1 { font-size: 26px; }
  .store-btn { flex: 1 1 100%; justify-content: center; }
  .phone { width: 280px; }
}
