/* =========================================================
   OCTOSYNC — STYLES (mobile-first)
   Tokens, layout, components. Todo en un solo archivo.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg:        #0B0B0F;
  --bg-2:      #101018;
  --bg-3:      #14141E;
  --surface:   #16161F;
  --surface-2: #1B1B27;
  --line:      rgba(255,255,255,.08);
  --line-2:    rgba(255,255,255,.14);

  --text:      #E8E9EE;
  --text-dim:  #A4A6B3;
  --muted:     #6E7184;

  --primary:   #3B82F6;
  --primary-2: #7C3AED;
  --accent:    #22D3EE;
  --neon:      #34D399;

  --grad: linear-gradient(135deg, #3B82F6 0%, #7C3AED 100%);
  --grad-soft: linear-gradient(135deg, rgba(59,130,246,.18), rgba(124,58,237,.18));

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 22px;

  --shadow-1: 0 4px 24px rgba(0,0,0,.4);
  --shadow-2: 0 20px 60px rgba(59,130,246,.18);

  --header-h: 64px;
  --container: 1200px;

  --ease: cubic-bezier(.2,.7,.2,1);

  --ff-display: 'Space Grotesk', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --ff-body:    'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

h1,h2,h3,h4 { font-family: var(--ff-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.5rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; color: var(--text-dim); }

.lead { color: var(--text-dim); font-size: 1.05rem; }
.muted { color: var(--muted); }
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 820px; }

.section { padding: 64px 0; position: relative; }
.section-alt { background: var(--bg-2); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.eyebrow {
  display: inline-block;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.02);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: #fff; padding: 8px 12px; z-index: 1000;
}
.skip-link:focus { left: 12px; top: 12px; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,11,15,.7);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-name { font-family: var(--ff-display); letter-spacing: -.01em; }
.brand-logo { display: inline-flex; }

.nav-primary { display: none; }
.nav-primary ul { display: flex; gap: 28px; }
.nav-primary a { color: var(--text-dim); font-size: .95rem; transition: color .2s var(--ease); }
.nav-primary a:hover { color: var(--text); }

.header-cta { display: flex; align-items: center; gap: 10px; }
.header-cta .btn-primary { display: none; }

.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  width: 40px; height: 40px; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02);
}
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 16px 20px 24px;
}
.mobile-nav ul { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav a { display: block; padding: 12px 8px; color: var(--text); border-radius: 10px; }
.mobile-nav a:hover { background: var(--surface); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600; font-size: .95rem;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-sm { padding: 9px 14px; font-size: .9rem; }
.btn-lg { padding: 15px 22px; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 20px rgba(59,130,246,.35); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(124,58,237,.45); }

.btn-ghost { background: rgba(255,255,255,.04); color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; padding: 64px 0 48px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.orb {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55;
}
.orb-1 { width: 320px; height: 320px; top: -80px; left: -60px; background: #3B82F6; }
.orb-2 { width: 360px; height: 360px; bottom: -120px; right: -80px; background: #7C3AED; opacity: .45; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 70%);
}

.hero-inner { position: relative; display: grid; gap: 40px; }
.hero-content { text-align: left; }
.badge {
  display: inline-block;
  font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 999px;
  background: var(--grad-soft); border: 1px solid rgba(124,58,237,.3);
  color: #C4B5FD; margin-bottom: 18px;
}
.hero-title { font-size: clamp(2.1rem, 7vw, 3.6rem); }
.hero-sub  { font-size: 1.05rem; color: var(--text-dim); max-width: 560px; margin-bottom: 28px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero-points {
  display: flex; flex-wrap: wrap; gap: 16px 24px;
  font-size: .9rem; color: var(--text-dim);
}
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 12px rgba(59,130,246,.7);
}

/* Hero mockup */
.hero-visual { position: relative; }
.mockup {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.01));
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.mockup-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--line);
}
.mockup-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.18); }
.mockup-bar p { margin: 0 0 0 12px; font-size: .8rem; color: var(--muted); }

.mockup-body {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 14px;
}
.m-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.m-stat small { color: var(--muted); font-size: .75rem; display:block; margin-bottom: 4px; }
.m-stat strong { font-family: var(--ff-display); font-size: 1.3rem; display:block; }
.m-stat .up { color: var(--neon); font-size: .8rem; }
.m-chart, .m-list { grid-column: span 2; }
.m-chart svg { width: 100%; height: 80px; }
.m-list ul { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.m-list li { font-size: .85rem; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.tag {
  font-size: .7rem; padding: 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,.06); color: var(--text);
}
.tag-blue   { background: rgba(59,130,246,.18);  color: #93C5FD; }
.tag-purple { background: rgba(124,58,237,.18);  color: #C4B5FD; }
.tag-green  { background: rgba(52,211,153,.16);  color: #6EE7B7; }

/* =========================================================
   PROBLEMA / SOLUCION
   ========================================================= */
.two-col { display: grid; gap: 32px; }

/* =========================================================
   FUNCIONALIDADES
   ========================================================= */
.features-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.feature:hover {
  transform: translateY(-3px);
  border-color: rgba(124,58,237,.35);
  box-shadow: 0 12px 36px rgba(59,130,246,.12);
}
.ft-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--grad-soft);
  border: 1px solid rgba(124,58,237,.25);
  display: grid; place-items: center;
  font-size: 1.3rem; margin-bottom: 14px;
}

/* =========================================================
   MODULOS
   ========================================================= */
.modules-grid { display: grid; gap: 16px; }
.module {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.module::before {
  content: ''; position: absolute; inset: 0;
  background: var(--grad-soft); opacity: 0; transition: opacity .3s var(--ease);
  pointer-events: none;
}
.module:hover::before { opacity: 1; }
.module-featured { border-color: rgba(124,58,237,.4); box-shadow: 0 10px 40px rgba(124,58,237,.15); }
.mod-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.mod-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--grad);
  display: grid; place-items: center;
  font-size: 1.3rem;
}
.module ul { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.module li {
  position: relative; padding-left: 18px; color: var(--text-dim); font-size: .92rem;
}
.module li::before {
  content: ''; position: absolute; left: 0; top: 8px;
  width: 8px; height: 8px; border-radius: 2px; background: var(--grad);
}

/* =========================================================
   BENEFICIOS
   ========================================================= */
.benefits-grid {
  display: grid; gap: 14px; grid-template-columns: 1fr;
}
.benefit {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px; text-align: center;
}
.benefit strong {
  display: block;
  font-family: var(--ff-display); font-size: 2.2rem;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 8px;
}
.benefit p { margin: 0; }

/* =========================================================
   STEPS
   ========================================================= */
.steps {
  display: grid; gap: 16px; grid-template-columns: 1fr;
  counter-reset: step;
}
.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
}
.step-num {
  display: inline-block;
  font-family: var(--ff-display); font-size: 1.4rem; font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 10px;
}

/* =========================================================
   DASHBOARD
   ========================================================= */
.dashboard-section { background: var(--bg-2); }
.dashboard-frame {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
}
.dash-side {
  padding: 18px;
  background: rgba(0,0,0,.25);
  border-bottom: 1px solid var(--line);
}
.dash-logo { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 16px; }
.dash-menu { display: flex; flex-wrap: wrap; gap: 6px; }
.dash-menu li {
  font-size: .85rem; color: var(--text-dim);
  padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line);
}
.dash-menu li.active { background: var(--grad-soft); color: var(--text); border-color: rgba(124,58,237,.4); }

.dash-main { padding: 18px; display: grid; gap: 12px; }
.dash-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.dash-row-2 { grid-template-columns: 1fr; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
}
.kpi small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; }
.kpi strong { display: block; font-family: var(--ff-display); font-size: 1.3rem; margin-top: 6px; }
.kpi .up { color: var(--neon); font-size: .8rem; }
.kpi .down { color: #FCA5A5; font-size: .8rem; }

.dash-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.dc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.dc-head span { color: var(--muted); font-size: .8rem; }
.dc-chart { width: 100%; height: 140px; }
.dash-list { display: flex; flex-direction: column; gap: 8px; }
.dash-list li { font-size: .9rem; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }

/* =========================================================
   FAQ
   ========================================================= */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: border-color .25s var(--ease);
}
.faq details[open] { border-color: rgba(124,58,237,.35); }
.faq summary {
  cursor: pointer; list-style: none;
  font-family: var(--ff-display); font-weight: 600; font-size: 1rem;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::after {
  content: '+'; font-size: 1.4rem; color: var(--text-dim); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { content: '−'; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { margin: 12px 0 0; }

/* =========================================================
   CTA / FORM
   ========================================================= */
.cta-section {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(59,130,246,.18), transparent 60%),
    radial-gradient(ellipse at 80% 100%, rgba(124,58,237,.18), transparent 60%),
    var(--bg);
}
.cta-grid { display: grid; gap: 32px; }
.cta-bullets { margin: 18px 0 0; display: flex; flex-direction: column; gap: 8px; color: var(--text-dim); }

.form {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-1);
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: .85rem; color: var(--text-dim); }
.field input, .field select, .field textarea {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: rgba(124,58,237,.6);
  box-shadow: 0 0 0 4px rgba(124,58,237,.15);
}
.field textarea { resize: vertical; min-height: 90px; }
.field-row { display: grid; gap: 14px; }

.form-fine { font-size: .78rem; color: var(--muted); margin: 12px 0 0; text-align: center; }
.hp { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

.form-alert {
  border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; font-size: .9rem;
  border: 1px solid;
}
.form-alert.ok    { background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.4); color: #6EE7B7; }
.form-alert.error { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.4); color: #FCA5A5; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: #08080C;
  border-top: 1px solid var(--line);
  padding: 48px 0 24px;
  margin-top: 32px;
}
.footer-grid {
  display: grid; gap: 28px;
  grid-template-columns: 1fr;
  margin-bottom: 24px;
}
.footer-brand p { margin: 12px 0 0; max-width: 320px; }
.site-footer h4 { font-size: .9rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text); margin-bottom: 14px; }
.footer-list { display: flex; flex-direction: column; gap: 8px; }
.footer-list a { color: var(--text-dim); transition: color .2s var(--ease); }
.footer-list a:hover { color: var(--text); }

.footer-bottom {
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: .85rem; color: var(--muted);
}

/* =========================================================
   FLOATING WHATSAPP
   ========================================================= */
.float-cta {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  width: 52px; height: 52px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(37,211,102,.4);
  transition: transform .2s var(--ease);
}
.float-cta:hover { transform: scale(1.06); }

/* =========================================================
   RESPONSIVE BREAKPOINTS (mobile-first overrides)
   ========================================================= */

/* >= 600px */
@media (min-width: 600px) {
  .features-grid    { grid-template-columns: repeat(2, 1fr); }
  .benefits-grid    { grid-template-columns: repeat(2, 1fr); }
  .field-row        { grid-template-columns: 1fr 1fr; }
  .footer-grid      { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
  .footer-bottom    { flex-direction: row; justify-content: space-between; }
  .section          { padding: 80px 0; }
}

/* >= 860px */
@media (min-width: 860px) {
  .hero             { padding: 96px 0 80px; }
  .hero-inner       { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 56px; }
  .two-col          { grid-template-columns: 1fr 1fr; gap: 56px; }
  .features-grid    { grid-template-columns: repeat(3, 1fr); }
  .modules-grid     { grid-template-columns: repeat(3, 1fr); }
  .benefits-grid    { grid-template-columns: repeat(4, 1fr); }
  .steps            { grid-template-columns: repeat(2, 1fr); }
  .cta-grid         { grid-template-columns: 1fr 1fr; align-items: start; gap: 56px; }
  .dashboard-frame  { grid-template-columns: 220px 1fr; }
  .dash-side        { border-bottom: 0; border-right: 1px solid var(--line); }
  .dash-menu        { flex-direction: column; }
  .dash-menu li     { width: 100%; }
  .dash-row         { grid-template-columns: repeat(4, 1fr); }
  .dash-row-2       { grid-template-columns: 2fr 1fr; }

  .nav-primary      { display: block; }
  .header-cta .btn-primary { display: inline-flex; }
  .nav-toggle       { display: none; }
  .mobile-nav       { display: none !important; }
}

/* >= 1024px */
@media (min-width: 1024px) {
  .steps            { grid-template-columns: repeat(4, 1fr); }
  .mockup-body      { grid-template-columns: repeat(3, 1fr); }
  .m-chart          { grid-column: span 3; }
  .m-list           { grid-column: span 3; }
  h1                { font-size: 3.6rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0s !important; transition-duration: 0s !important; }
  html { scroll-behavior: auto; }
}
