/* ============================================================
     TOKENS
     ============================================================ */
  :root{
    --paper:#F5F7FB;
    --paper-2:#FFFFFF;
    --ink:#0B1220;
    --ink-2:#121B2E;
    --text:#0E1420;
    --text-muted:#4B5468;
    --text-on-ink:#F2F5FA;
    --text-on-ink-muted:#9AA7BD;
    --line:rgba(11,18,32,0.12);
    --line-on-ink:rgba(255,255,255,0.14);
    --accent:#0B63F6;
    --accent-2:#35B4FF;
    --gold:#B9791A;
    --gold-on-ink:#F2A93B;
    --teal:#0E8E7D;
    --teal-on-ink:#2FD4BE;
    --focus:#0B63F6;

    --font-display:'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-body:'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono:'Roboto Mono', 'SFMono-Regular', Consolas, monospace;
  }

  *{box-sizing:border-box;}
  html{scroll-behavior:smooth;}
  @media (prefers-reduced-motion: reduce){ html{scroll-behavior:auto;} *{animation-duration:0.01ms !important; animation-iteration-count:1 !important; transition-duration:0.01ms !important;} }

  body{
    margin:0;
    background:var(--paper);
    color:var(--text);
    font-family:var(--font-body);
    font-size:16px;
    line-height:1.6;
    -webkit-font-smoothing:antialiased;
    overflow-x:hidden;
  }

  h1,h2,h3{ font-family:var(--font-display); text-wrap:balance; margin:0; }
  p{ margin:0; }
  a{ color:inherit; }
  img,svg{ max-width:100%; display:block; }

  ::selection{ background:var(--accent); color:#fff; }

  a:focus-visible, button:focus-visible{
    outline:2px solid var(--focus);
    outline-offset:3px;
    border-radius:4px;
  }

  .wrap{ max-width:1120px; margin:0 auto; padding-left:28px; padding-right:28px; }
  @media (max-width:640px){ .wrap{ padding-left:20px; padding-right:20px; } }

  .eyebrow{
    font-family:var(--font-mono);
    font-size:0.72rem;
    letter-spacing:0.14em;
    text-transform:uppercase;
    font-weight:600;
    color:var(--accent);
  }
  section.on-ink .eyebrow{ color:var(--accent-2); }

  /* ============================================================
     PREVIEW BANNER
     ============================================================ */
  .preview-banner{
    background:var(--ink);
    color:var(--text-on-ink-muted);
    font-family:var(--font-mono);
    font-size:0.76rem;
    text-align:center;
    padding:9px 16px;
    border-bottom:1px solid var(--line-on-ink);
    letter-spacing:0.01em;
  }
  .preview-banner strong{ color:var(--gold-on-ink); font-weight:600; }

  /* ============================================================
     NAV
     ============================================================ */
  .nav{
    position:sticky; top:0; z-index:40;
    background:rgba(245,247,251,0.86);
    backdrop-filter:blur(10px);
    border-bottom:1px solid var(--line);
  }
  .nav .wrap{ display:flex; align-items:center; justify-content:space-between; height:68px; }
  .brand{ display:flex; align-items:center; gap:9px; font-family:var(--font-display); font-weight:700; font-size:1.18rem; text-decoration:none; }
  .brand .dot{ width:9px; height:9px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px rgba(11,99,246,0.15); }
  .brand-icon{ width:30px; height:30px; border-radius:50%; display:block; }
  .brand-full{ height:42px; width:auto; aspect-ratio:555/129; display:block; }
  .brand-compact{ display:none; align-items:center; gap:9px; }
  .nav-right{ display:flex; align-items:center; gap:18px; }
  .lang-switch{ display:flex; gap:2px; background:var(--paper-2); border:1px solid var(--line); border-radius:999px; padding:3px; }
  .lang-btn{
    font-family:var(--font-mono); font-size:0.72rem; font-weight:600; letter-spacing:.04em;
    border:none; background:none; color:var(--text-muted); padding:6px 11px; border-radius:999px; cursor:pointer;
    transition:background .15s, color .15s;
  }
  .lang-btn.active{ background:var(--ink); color:#fff; }
  .nav-cta{
    font-size:0.86rem; font-weight:600; padding:9px 16px; border-radius:8px;
    background:var(--ink); color:#fff !important; text-decoration:none; white-space:nowrap;
  }
  @media (max-width:720px){ .nav-cta{ display:none; } }

  /* ============================================================
     BUTTONS
     ============================================================ */
  .btn{
    display:inline-flex; align-items:center; gap:9px; justify-content:center;
    font-family:var(--font-body); font-weight:600; font-size:0.94rem;
    padding:14px 24px; border-radius:9px; text-decoration:none; cursor:pointer; border:1px solid transparent;
    transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease;
  }
  .btn:hover{ transform:translateY(-1px); }
  .btn-primary{ background:var(--accent); color:#fff; box-shadow:0 10px 24px -8px rgba(11,99,246,0.55); }
  .btn-primary:hover{ box-shadow:0 14px 30px -8px rgba(11,99,246,0.65); }
  .btn-solid-light{ background:#fff; color:var(--ink); box-shadow:0 10px 24px -8px rgba(0,0,0,0.35); }
  .btn-solid-light:hover{ box-shadow:0 14px 30px -8px rgba(0,0,0,0.4); }
  .btn-ghost-ink{ background:transparent; color:var(--text-on-ink); border-color:var(--line-on-ink); }
  .btn-ghost-ink:hover{ background:rgba(255,255,255,0.06); }
  .btn-ghost-light{ background:transparent; color:var(--text); border-color:var(--line); }
  .btn-ghost-light:hover{ background:rgba(11,18,32,0.04); }
  .btn-gold{ background:var(--gold-on-ink); color:#26160a; box-shadow:0 10px 24px -8px rgba(242,169,59,0.45); }

  /* ============================================================
     SECTIONS — shared rhythm
     ============================================================ */
  section{ padding:100px 0; position:relative; }
  section.on-ink{ background:var(--ink); color:var(--text-on-ink); }
  section.on-ink .text-muted{ color:var(--text-on-ink-muted); }
  .text-muted{ color:var(--text-muted); }
  @media (max-width:720px){ section{ padding:68px 0; } }

  .section-head{ max-width:640px; margin-bottom:48px; }
  .section-head h2{ font-size:clamp(1.7rem, 3.4vw, 2.4rem); font-weight:700; margin-top:10px; line-height:1.15; }
  .section-head p{ margin-top:16px; font-size:1.02rem; color:var(--text-muted); }
  section.on-ink .section-head p{ color:var(--text-on-ink-muted); }

  /* ============================================================
     HERO
     ============================================================ */
  .hero{ background:var(--ink); color:var(--text-on-ink); padding:88px 0 0; overflow:hidden; }
  .hero-grid{ display:grid; grid-template-columns:1fr 460px; gap:48px; align-items:center; padding-bottom:56px; }
  @media (max-width:980px){
    .hero-grid{ grid-template-columns:1fr; }
    .hero-visual{ order:-1; }
    .hero-orbit{ margin:0 auto 8px; max-width:340px; }
  }

  .hero-badge{
    display:inline-flex; align-items:center; gap:9px; padding:7px 14px 7px 10px; border-radius:999px;
    background:rgba(11,99,246,0.12); border:1px solid rgba(53,180,255,0.35);
    font-family:var(--font-mono); font-size:0.7rem; font-weight:600; letter-spacing:.09em; text-transform:uppercase;
    color:var(--accent-2);
  }
  .hero-badge .dot-pulse{ width:7px; height:7px; border-radius:50%; background:var(--accent-2); box-shadow:0 0 0 0 rgba(53,180,255,0.6); animation:dotPulse 2s infinite; }
  @keyframes dotPulse{ 0%{ box-shadow:0 0 0 0 rgba(53,180,255,0.55);} 70%{ box-shadow:0 0 0 8px rgba(53,180,255,0);} 100%{ box-shadow:0 0 0 0 rgba(53,180,255,0);} }

  .hero h1{
    margin-top:22px;
    font-size:clamp(2.2rem, 4.6vw, 3.4rem);
    font-weight:700;
    line-height:1.1;
    letter-spacing:-0.01em;
    max-width:640px;
  }
  .hero h1 .grad{
    background:linear-gradient(90deg, var(--accent-2), var(--accent));
    -webkit-background-clip:text; background-clip:text; color:transparent;
    font-weight:800;
  }
  .hero .sub{ margin-top:22px; font-size:1.08rem; line-height:1.65; color:var(--text-on-ink-muted); max-width:540px; }
  .hero-ctas{ margin-top:32px; display:flex; gap:14px; flex-wrap:wrap; }
  .hero-checks{ margin-top:22px; display:flex; gap:22px; flex-wrap:wrap; font-size:0.86rem; color:var(--text-on-ink-muted); }
  .hero-checks span{ color:var(--teal-on-ink); font-weight:600; }
  .hero-checks span span{ color:var(--text-on-ink-muted); font-weight:400; }

  /* ---- orbit graphic ---- */
  .hero-orbit{ position:relative; width:100%; max-width:460px; aspect-ratio:1/1; margin:0 auto; }
  .orbit-svg{ position:absolute; inset:0; width:100%; height:100%; }
  .orbit-center{
    position:absolute; left:50%; top:50%; width:27%; height:27%; margin:-13.5% 0 0 -13.5%;
    border-radius:50%; background-color:#0B1220;
    background-image:url("../img/brainlabs-orbit-center.png");
    background-size:68%; background-repeat:no-repeat; background-position:center;
    border:1px solid rgba(53,180,255,0.35);
    animation:pulseGlow 2.8s ease-in-out infinite;
    z-index:3;
  }
  @keyframes pulseGlow{
    0%,100%{ box-shadow:0 0 0 8px rgba(11,99,246,0.14), 0 0 32px rgba(53,180,255,0.3); }
    50%{ box-shadow:0 0 0 14px rgba(11,99,246,0.07), 0 0 52px rgba(53,180,255,0.5); }
  }
  .orbit-item{
    position:absolute; display:flex; flex-direction:column; align-items:center; gap:6px;
    transform:translate(-50%,-50%); cursor:default; z-index:2;
    transition:transform .2s ease;
  }
  .orbit-item:hover{ transform:translate(-50%,-50%) scale(1.12); z-index:4; }
  .orbit-tile{
    width:44px; height:44px; border-radius:13px;
    background:#fff; display:flex; align-items:center; justify-content:center;
    font-size:1.15rem; box-shadow:0 8px 20px -6px rgba(0,0,0,0.4);
    transition:box-shadow .2s ease; overflow:hidden;
  }
  .orbit-item:hover .orbit-tile{ box-shadow:0 10px 26px -4px rgba(53,180,255,0.55); }
  .orbit-tile .tt{ font-family:var(--font-body); font-weight:800; font-size:0.85rem; }
  .orbit-tile svg{ width:70%; height:70%; }
  .orbit-label{
    font-family:var(--font-mono); font-size:0.66rem; color:var(--text-on-ink-muted);
    background:rgba(5,8,15,0.55); padding:2px 7px; border-radius:5px; white-space:nowrap;
    opacity:0.85; transition:opacity .2s ease, color .2s ease;
  }
  .orbit-center-label{
    position:absolute; left:50%; top:calc(50% + 15%); transform:translateX(-50%);
    font-family:var(--font-display); font-weight:700; font-size:1rem; color:var(--text-on-ink);
    letter-spacing:0.01em; white-space:nowrap; z-index:3;
  }
  .orbit-item:hover .orbit-label{ opacity:1; color:var(--accent-2); }
  .orbit-line{ transition:opacity .2s ease, stroke-width .2s ease; }
  .orbit-line.active{ opacity:0.95 !important; stroke-width:2.4; }
  .orbit-caption{
    margin-top:22px; text-align:center;
  }
  .orbit-caption span{
    display:inline-flex; align-items:center; gap:8px;
    font-family:var(--font-mono); font-size:0.72rem; font-weight:600; letter-spacing:.12em;
    color:var(--accent-2); background:rgba(53,180,255,0.08); border:1px solid rgba(53,180,255,0.3);
    padding:7px 16px; border-radius:999px;
  }

  .stat-row{
    display:grid; grid-template-columns:repeat(2,1fr); gap:0; max-width:460px;
    border-top:1px solid var(--line-on-ink);
  }
  .stat{ padding:22px 20px; border-right:1px solid var(--line-on-ink); }
  .stat:last-child{ border-right:none; }
  .stat-num{ font-family:var(--font-mono); font-variant-numeric:tabular-nums; font-size:clamp(1.4rem,2.4vw,1.9rem); font-weight:600; color:var(--gold-on-ink); }
  .stat-label{ margin-top:6px; font-size:0.8rem; color:var(--text-on-ink-muted); }

  /* ============================================================
     PRODUCT SCREENSHOT
     ============================================================ */
  .shot-frame{
    border-radius:14px; overflow:hidden; border:1px solid var(--line);
    box-shadow:0 30px 70px -30px rgba(11,18,32,0.35);
    background:#0d1117;
  }
  .shot-bar{ display:flex; gap:7px; padding:11px 14px; background:#0d1117; }
  .shot-bar span{ width:11px; height:11px; border-radius:50%; background:rgba(255,255,255,0.18); }
  .shot-frame img{ display:block; width:100%; height:auto; }

  /* ============================================================
     PILLARS
     ============================================================ */
  .pillars{ display:grid; grid-template-columns:repeat(5,1fr); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:14px; overflow:hidden; }
  .pillar{ background:var(--paper-2); padding:28px 22px; min-height:210px; display:flex; flex-direction:column; gap:12px; }
  .pillar-index{ font-family:var(--font-mono); font-size:0.72rem; color:var(--accent); font-weight:600; }
  .pillar h3{ font-size:1.02rem; font-weight:700; line-height:1.3; }
  .pillar p{ font-size:0.86rem; color:var(--text-muted); }
  @media (max-width:900px){ .pillars{ grid-template-columns:repeat(2,1fr); } }
  @media (max-width:560px){ .pillars{ grid-template-columns:1fr; } }

  /* ============================================================
     DIAGNOSTIC CALLOUT
     ============================================================ */
  .diag{ background:var(--ink); color:var(--text-on-ink); }
  .diag-grid{ display:grid; grid-template-columns:1.1fr 0.9fr; gap:56px; align-items:center; }
  @media (max-width:880px){ .diag-grid{ grid-template-columns:1fr; } }
  .diag h2{ font-size:clamp(1.7rem,3.4vw,2.4rem); font-weight:700; line-height:1.15; }
  .diag p.lead{ margin-top:18px; font-size:1.02rem; color:var(--text-on-ink-muted); max-width:520px; }
  .diag-ctas{ margin-top:30px; display:flex; gap:14px; flex-wrap:wrap; }
  .score-card{ background:var(--ink-2); border:1px solid var(--line-on-ink); border-radius:16px; padding:28px; }
  .score-row{ display:flex; align-items:center; justify-content:space-between; padding:14px 0; border-bottom:1px solid var(--line-on-ink); }
  .score-row:last-child{ border-bottom:none; }
  .score-name{ font-size:0.92rem; color:var(--text-on-ink-muted); }
  .score-bar-wrap{ flex:1; margin:0 16px; height:6px; background:rgba(255,255,255,0.08); border-radius:3px; overflow:hidden; }
  .score-bar{ height:100%; border-radius:3px; background:linear-gradient(90deg,var(--accent-2),var(--teal-on-ink)); }
  .score-val{ font-family:var(--font-mono); font-weight:600; font-size:0.92rem; color:#fff; min-width:34px; text-align:right; }

  /* ---- mercado section (fondo claro, para separarse visualmente del diag oscuro de arriba) ---- */
  .mercado{ background:var(--paper-2); }
  .mercado h2{ font-size:clamp(1.7rem,3.4vw,2.4rem); font-weight:700; line-height:1.15; }
  .mercado p.lead{ margin-top:18px; font-size:1.02rem; color:var(--text-muted); max-width:520px; }
  .mercado .score-card{ background:var(--paper); border:1px solid var(--line); }
  .mkt-note{ margin-top:18px; font-size:0.8rem; color:var(--text-muted); }
  .mkt-segment-label{ font-family:var(--font-mono); font-size:0.7rem; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); }
  .mkt-segment-value{ margin-top:6px; font-size:1.15rem; font-weight:700; color:var(--text); }
  .mkt-badges{ display:flex; gap:8px; margin:12px 0 18px; flex-wrap:wrap; }
  .mkt-badge{ font-size:0.72rem; font-weight:700; padding:3px 10px; border-radius:999px; background:rgba(11,99,246,0.1); color:var(--accent); }
  .mkt-badge.warn{ background:rgba(242,169,59,0.16); color:#b3760a; }
  .mkt-channels{ display:flex; flex-direction:column; gap:10px; padding:14px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
  .mkt-channel{ display:flex; align-items:center; gap:10px; font-size:0.86rem; color:var(--text-muted); }
  .mkt-channel .mkt-fav{ width:22px; height:22px; border-radius:6px; overflow:hidden; flex:none; display:block; }
  .mkt-channel .mkt-fav svg{ width:100%; height:100%; display:block; }
  .mkt-chname{ flex:1; color:var(--text); font-weight:500; }
  .mkt-prio{ font-size:0.68rem; font-weight:700; padding:2px 9px; border-radius:999px; white-space:nowrap; }
  .mkt-prio.high{ background:rgba(53,199,89,0.16); color:#1f9d4a; }
  .mkt-prio.mid{ background:rgba(242,169,59,0.16); color:#b3760a; }
  .mkt-prio.low{ background:rgba(11,18,32,0.06); color:var(--text-muted); }
  .mkt-opp{ padding-top:14px; }
  .mkt-opp-tag{ font-size:0.7rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--accent); }
  .mkt-opp p{ margin-top:5px; font-size:0.85rem; color:var(--text-muted); line-height:1.5; }

  /* ============================================================
     SERVICES / MÓDULOS
     ============================================================ */
  .services-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
  @media (max-width:900px){ .services-grid{ grid-template-columns:repeat(2,1fr); } }
  @media (max-width:560px){ .services-grid{ grid-template-columns:1fr; } }
  .service-card{
    background:var(--paper-2); border:1px solid var(--line); border-radius:14px; padding:22px 18px;
    display:flex; flex-direction:column; gap:10px; transition:border-color .15s, transform .15s;
  }
  .service-card:hover{ border-color:var(--accent); transform:translateY(-2px); }
  .service-icon{ width:38px; height:38px; border-radius:10px; display:flex; align-items:center; justify-content:center; background:rgba(11,99,246,0.1); color:var(--accent); }
  .service-icon svg{ width:21px; height:21px; }
  .service-card h3{ font-size:0.94rem; font-weight:700; }
  .service-card p{ font-size:0.82rem; color:var(--text-muted); line-height:1.5; }
  .service-link{ margin-top:auto; padding-top:4px; font-size:0.8rem; font-weight:700; color:var(--accent); text-decoration:none; display:inline-flex; align-items:center; gap:4px; }
  .service-link:hover{ text-decoration:underline; }

  /* ============================================================
     FAQ
     ============================================================ */
  .faq-list{ border-top:1px solid var(--line); }
  .faq-item{ border-bottom:1px solid var(--line); }
  .faq-q{
    width:100%; text-align:left; background:none; border:none; cursor:pointer;
    padding:22px 4px; display:flex; align-items:center; justify-content:space-between; gap:20px;
    font-family:var(--font-body); font-size:1rem; font-weight:600; color:var(--text);
  }
  .faq-q .plus{ font-family:var(--font-mono); font-size:1.1rem; color:var(--accent); transition:transform .2s; flex-shrink:0; }
  .faq-item.open .faq-q .plus{ transform:rotate(45deg); }
  .faq-a{ max-height:0; overflow:hidden; transition:max-height .25s ease; }
  .faq-item.open .faq-a{ max-height:240px; }
  .faq-a p{ padding:0 4px 22px; font-size:0.92rem; color:var(--text-muted); max-width:640px; line-height:1.6; }

  /* ============================================================
     FINAL CTA
     ============================================================ */
  .final-cta{ background:var(--ink); color:var(--text-on-ink); text-align:center; }
  .final-cta h2{ font-size:clamp(1.9rem,4vw,2.7rem); font-weight:700; max-width:640px; margin:0 auto; }
  .final-cta p{ margin-top:16px; color:var(--text-on-ink-muted); font-size:1.02rem; }
  .final-ctas{ margin-top:32px; display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
  .contact-line{ margin-top:34px; font-size:0.86rem; color:var(--text-on-ink-muted); display:flex; gap:22px; justify-content:center; flex-wrap:wrap; }
  .contact-line a{ text-decoration:underline; text-underline-offset:3px; }

  /* ============================================================
     FOOTER
     ============================================================ */
  footer{ background:var(--paper); border-top:1px solid var(--line); padding:48px 0 28px; }
  .footer-top{ display:flex; justify-content:space-between; gap:40px; flex-wrap:wrap; }
  .footer-cols{ display:flex; gap:56px; flex-wrap:wrap; }
  .footer-col h4{ font-family:var(--font-mono); font-size:0.7rem; letter-spacing:.08em; text-transform:uppercase; color:var(--text-muted); margin-bottom:14px; }
  .footer-col a{ display:block; font-size:0.88rem; color:var(--text); text-decoration:none; margin-bottom:10px; }
  .footer-col a:hover{ text-decoration:underline; }
  .footer-bottom{ margin-top:40px; padding-top:22px; border-top:1px solid var(--line); display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; font-size:0.78rem; color:var(--text-muted); }

  /* ============================================================
     DARK THEME (system preference)
     ============================================================ */
  @media (prefers-color-scheme: dark){
    :root:not([data-theme="light"]){
      --paper:#0D1220;
      --paper-2:#151C2C;
      --ink:#05070C;
      --ink-2:#0B1120;
      --text:#EAEEF6;
      --text-muted:#9AA7BD;
      --text-on-ink:#F2F5FA;
      --text-on-ink-muted:#8B97AC;
      --line:rgba(255,255,255,0.10);
      --line-on-ink:rgba(255,255,255,0.12);
    }
    :root:not([data-theme="light"]) .nav{ background:rgba(13,18,32,0.86); }
    :root:not([data-theme="light"]) .brand-full{ display:none; }
    :root:not([data-theme="light"]) .brand-compact{ display:flex; }
  }
  :root[data-theme="dark"]{
    --paper:#0D1220;
    --paper-2:#151C2C;
    --ink:#05070C;
    --ink-2:#0B1120;
    --text:#EAEEF6;
    --text-muted:#9AA7BD;
    --text-on-ink:#F2F5FA;
    --text-on-ink-muted:#8B97AC;
    --line:rgba(255,255,255,0.10);
    --line-on-ink:rgba(255,255,255,0.12);
  }
  :root[data-theme="dark"] .nav{ background:rgba(13,18,32,0.86); }
  :root[data-theme="dark"] .brand-full{ display:none; }
  :root[data-theme="dark"] .brand-compact{ display:flex; }
