/* =========================================================
   V61.32.1 — Portada raíz limpia + scroll nativo restaurado
   ÚNICA fuente visual de la portada pública CodeLab.
   - Header premium real, sin franja azul global.
   - Hero gris fino, más bajo para mostrar sección 2.
   - Sin textos decorativos de fondo.
   - Sección 2 y flujo visibles en scroll normal.
   ========================================================= */

:root{
  --cl31-blue:#0b6fdc;
  --cl31-blue-2:#0a4fb8;
  --cl31-ink:#1d2a3d;
  --cl31-muted:#5f6d7f;
  --cl31-header:#f7f9fc;
  --cl31-header-line:#d8e0ea;
  --cl31-hero-1:#7b8792;
  --cl31-hero-2:#68747f;
  --cl31-section:#f1f5f9;
  --cl31-section-2:#e8eef5;
  --cl31-line:#cbd6e3;
  --cl31-white:#ffffff;
}

html{scroll-behavior:smooth;}

/* V61.32.1 — scroll raíz nativo restaurado.
   La portada debe usar el scroll del navegador, no un contenedor interno. */
html:has(.codelab-home-v631),
html.codelab-home-scroll-v61321,
body:has(.codelab-home-v631),
body.layout-auth:has(.codelab-home-v631),
body.layout-app:has(.codelab-home-v631),
body.layout-plain:has(.codelab-home-v631),
body.codelab-home-scroll-v61321{
  height:auto !important;
  min-height:100% !important;
  max-height:none !important;
  margin:0 !important;
  background:var(--cl31-section) !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  scrollbar-gutter:stable !important;
}

body.nxl-modal-open-v615:has(.nxl-login-modal-v615.is-open){
  overflow:hidden !important;
}

body:has(.codelab-home-v631)::before,
body:has(.codelab-home-v631)::after,
#app:has(.codelab-home-v631)::before,
#app:has(.codelab-home-v631)::after,
body.layout-auth:has(.codelab-home-v631) .global-topbar,
#app.layout-auth:has(.codelab-home-v631) .global-topbar,
body.layout-plain:has(.codelab-home-v631) .global-topbar,
#app.layout-plain:has(.codelab-home-v631) .global-topbar{
  content:none !important;
  display:none !important;
}

body:has(.codelab-home-v631) #app,
body.layout-auth:has(.codelab-home-v631) #app,
body.layout-app:has(.codelab-home-v631) #app,
body.layout-plain:has(.codelab-home-v631) #app,
body.codelab-home-scroll-v61321 #app{
  display:block !important;
  grid-template-columns:none !important;
  grid-template-areas:none !important;
  height:auto !important;
  min-height:100svh !important;
  max-height:none !important;
  width:100% !important;
  background:transparent !important;
  overflow:visible !important;
  contain:none !important;
}

.codelab-home-v631,
.codelab-home-v631 *{box-sizing:border-box;}
.codelab-home-v631{
  display:block !important;
  height:auto !important;
  min-height:100svh;
  max-height:none !important;
  width:100%;
  background:var(--cl31-section);
  color:var(--cl31-ink);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  overflow:visible !important;
}
.codelab-home-v631 button,
.codelab-home-v631 a{font:inherit;}
.codelab-home-v631 img{max-width:100%;}
.cl31-inner{width:min(1420px,calc(100% - 64px));margin:0 auto;}

.cl31-header{
  position:sticky !important;
  top:0 !important;
  z-index:50 !important;
  min-height:78px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:24px !important;
  padding:12px clamp(28px,4vw,60px) !important;
  background:rgba(247,249,252,.96) !important;
  border-bottom:1px solid var(--cl31-header-line) !important;
  box-shadow:0 8px 26px rgba(15,23,42,.05) !important;
  backdrop-filter:blur(10px) !important;
}
.cl31-brand{display:flex;align-items:center;text-decoration:none;min-width:120px;}
.cl31-brand img{
  height:48px !important;
  width:auto !important;
  max-height:48px !important;
  object-fit:contain !important;
  filter:none !important;
}
.cl31-nav{display:flex;align-items:center;justify-content:center;gap:34px;min-width:0;}
.cl31-nav a{
  color:#35445a !important;
  text-decoration:none !important;
  font-size:15px !important;
  line-height:1 !important;
  font-weight:900 !important;
  letter-spacing:-.01em;
  white-space:nowrap;
}
.cl31-nav a:hover{color:var(--cl31-blue-2) !important;}
.cl31-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px;}
.cl31-btn,
.cl31-btn:visited{
  min-height:48px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:10px !important;
  padding:0 24px !important;
  border-radius:16px !important;
  border:1px solid transparent !important;
  text-decoration:none !important;
  cursor:pointer !important;
  font-weight:950 !important;
  line-height:1 !important;
  white-space:nowrap !important;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease,background .18s ease;
}
.cl31-btn:hover{transform:translateY(-1px);}
.cl31-btn.primary{
  background:linear-gradient(135deg,#0a73e8,#075fc7) !important;
  color:#fff !important;
  box-shadow:0 10px 22px rgba(7,95,199,.20) !important;
}
.cl31-btn.ghost{
  background:rgba(255,255,255,.86) !important;
  color:#223047 !important;
  border-color:#cbd6e3 !important;
  box-shadow:0 8px 18px rgba(15,23,42,.04) !important;
}
.cl31-header .cl31-btn.ghost{background:#fff !important;color:#26344d !important;}

.cl31-hero,
.cl31-code-section,
.cl31-flow{position:relative;isolation:isolate;scroll-margin-top:88px;}
.cl31-hero::after,
.cl31-code-section::after{content:none !important;display:none !important;}
.cl31-hero::before,
.cl31-code-section::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
}

.cl31-hero{
  overflow:hidden;
  background:
    radial-gradient(circle at 18% 42%,rgba(32,111,255,.17),transparent 29%),
    radial-gradient(circle at 83% 12%,rgba(255,255,255,.11),transparent 23%),
    linear-gradient(180deg,var(--cl31-hero-1) 0%,var(--cl31-hero-2) 100%) !important;
  border-bottom:1px solid rgba(255,255,255,.20);
}
.cl31-hero::before{
  background-image:
    linear-gradient(90deg,rgba(255,255,255,.045) 1px,transparent 1px),
    linear-gradient(180deg,rgba(255,255,255,.04) 1px,transparent 1px);
  background-size:64px 64px;
  opacity:.32;
}
.cl31-hero-grid{
  display:grid;
  grid-template-columns:minmax(360px,46%) minmax(440px,54%);
  align-items:center;
  gap:58px;
  min-height:clamp(430px,62svh,540px);
  padding:18px 0 22px;
}
.cl31-hero-art{display:flex;align-items:flex-end;justify-content:flex-start;min-width:0;}
.cl31-hero-art img{
  width:min(100%,500px);
  max-height:clamp(380px,53svh,500px);
  object-fit:contain;
  display:block;
  filter:drop-shadow(0 18px 30px rgba(0,0,0,.18));
}
.cl31-copy{justify-self:end;max-width:650px;min-width:0;}
.cl31-kicker{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:0 15px;
  border-radius:999px;
  border:1px solid rgba(231,238,249,.58);
  background:rgba(255,255,255,.08);
  color:#eef5ff;
  font-size:11.5px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.035em;
}
.cl31-kicker i{width:18px;height:18px;border-radius:6px;background:linear-gradient(135deg,#2d79ff,#8fb8ff);display:inline-block;}
.cl31-copy h1{
  margin:18px 0 14px;
  color:#fff;
  font-size:clamp(40px,4.25vw,68px);
  line-height:1.035;
  letter-spacing:-.062em;
  font-weight:950;
  text-wrap:balance;
}
.cl31-copy p{
  margin:0;
  max-width:640px;
  color:#edf3fb;
  font-size:clamp(15.5px,1.2vw,18.5px);
  line-height:1.58;
  font-weight:720;
}
.cl31-cta{display:flex;flex-wrap:wrap;gap:16px;margin-top:26px;}
.cl31-cta .cl31-btn{min-height:54px;padding:0 26px;font-size:16px;}

.cl31-code-section{
  overflow:hidden;
  background:linear-gradient(180deg,var(--cl31-section) 0%,var(--cl31-section-2) 100%) !important;
}
.cl31-code-section::before{
  background-image:
    linear-gradient(90deg,rgba(10,111,220,.055) 1px,transparent 1px),
    linear-gradient(180deg,rgba(10,111,220,.045) 1px,transparent 1px);
  background-size:72px 72px;
  opacity:.25;
}
.cl31-code-grid{
  display:grid;
  grid-template-columns:minmax(400px,45%) minmax(440px,55%);
  align-items:center;
  gap:42px;
  min-height:440px;
  padding:48px 0 54px;
}
.cl31-section-copy{max-width:620px;min-width:0;}
.cl31-section-copy .cl31-kicker{background:rgba(255,255,255,.72);border-color:#c9d6e5;color:var(--cl31-blue-2);}
.cl31-section-copy h2{
  margin:18px 0 14px;
  color:var(--cl31-ink);
  font-size:clamp(34px,3.35vw,58px);
  line-height:1.075;
  letter-spacing:-.055em;
  font-weight:950;
  text-wrap:balance;
}
.cl31-section-copy h2 span{color:var(--cl31-blue-2);}
.cl31-section-copy p{
  margin:0;
  color:var(--cl31-muted);
  font-size:clamp(16px,1.18vw,19px);
  line-height:1.62;
  font-weight:690;
}
.cl31-tech{display:flex;flex-wrap:wrap;gap:12px;margin-top:24px;}
.cl31-chip{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:0 15px;
  border-radius:14px;
  border:1px solid #c8d5e4;
  background:rgba(255,255,255,.64);
  color:var(--cl31-ink);
  font-size:14.5px;
  font-weight:860;
}
.cl31-dot{width:12px;height:12px;border-radius:4px;display:block;}
.cl31-dot.html{background:#ff6d2f}.cl31-dot.css{background:#2876ff}.cl31-dot.js{background:#ffc72b}.cl31-dot.py{background:#4e80ff}.cl31-dot.ard{background:#26b7a7}.cl31-dot.proj{background:#7869ff}
.cl31-code-art{display:flex;align-items:flex-end;justify-content:flex-end;min-width:0;}
.cl31-code-art img{width:min(100%,560px);max-height:390px;object-fit:contain;display:block;filter:drop-shadow(0 18px 24px rgba(31,46,72,.10));}

.cl31-flow{background:linear-gradient(180deg,var(--cl31-section-2),#eef2f7);padding:0 0 54px;}
.cl31-flow-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--cl31-line);border-bottom:1px solid var(--cl31-line);}
.cl31-flow-item{padding:24px 22px;border-right:1px solid var(--cl31-line);}
.cl31-flow-item:last-child{border-right:none;}
.cl31-flow-item b{display:block;color:var(--cl31-ink);font-size:23px;font-weight:950;letter-spacing:-.04em;}
.cl31-flow-item span{display:block;margin-top:8px;color:var(--cl31-muted);font-size:14.5px;line-height:1.48;font-weight:700;}

.nxl-login-modal-v615{position:fixed!important;inset:0!important;z-index:999!important;display:none!important;align-items:center!important;justify-content:center!important;padding:20px!important;}
.nxl-login-modal-v615.is-open{display:flex!important;}
.nxl-login-backdrop-v615{position:absolute!important;inset:0!important;background:rgba(2,6,23,.58)!important;backdrop-filter:blur(8px)!important;}
.nxl-login-card-v615{position:relative!important;z-index:2!important;width:min(430px,100%)!important;background:#fff!important;border:1px solid #dce6f2!important;border-radius:26px!important;padding:28px!important;box-shadow:0 24px 80px rgba(15,23,42,.18)!important;}
.nxl-login-close-v615{position:absolute!important;right:14px!important;top:14px!important;width:34px!important;height:34px!important;border-radius:999px!important;background:#eef3fa!important;color:#102a5e!important;font-size:22px!important;font-weight:900!important;border:0!important;cursor:pointer!important;}
.nxl-login-eyebrow-v615{display:inline-flex!important;color:#235cff!important;font-size:12px!important;font-weight:950!important;text-transform:uppercase!important;letter-spacing:.08em!important;margin-bottom:10px!important;}
.nxl-login-card-v615 h2{margin:0 0 8px!important;color:#102a5e!important;font-size:30px!important;line-height:1.05!important;font-weight:950!important;letter-spacing:-.04em!important;}
.nxl-login-card-v615 p{margin:0 0 20px!important;color:#60708d!important;font-weight:650!important;line-height:1.55!important;}
.nxl-login-form-v615{display:grid!important;gap:13px!important;}
.nxl-login-form-v615 label span{display:block!important;margin:0 0 7px!important;color:#25385f!important;font-size:13px!important;font-weight:900!important;}
.nxl-login-form-v615 input{width:100%!important;min-height:50px!important;border:1px solid #d8e3f2!important;border-radius:15px!important;padding:0 14px!important;background:#f8fbff!important;color:#111827!important;font-weight:750!important;outline:none!important;}
.nxl-login-form-v615 input:focus{border-color:#7ba8ff!important;box-shadow:0 0 0 4px rgba(37,99,255,.12)!important;}
.nxl-login-form-v615 button[type="submit"]{width:100%!important;min-height:52px!important;border-radius:999px!important;background:#235cff!important;color:#fff!important;font-weight:950!important;border:0!important;cursor:pointer!important;}
.nxl-login-status-v615{border-radius:14px!important;padding:12px!important;font-weight:800!important;background:#eff6ff!important;color:#1d4ed8!important;}
.nxl-login-status-v615.error{background:#fff1f2!important;color:#be123c!important;}
.nxl-login-status-v615.success{background:#ecfdf5!important;color:#15803d!important;}
body.nxl-modal-open-v615{overflow:hidden!important;}

/* Scrollbar de portada: visible y del navegador. */
html:has(.codelab-home-v631)::-webkit-scrollbar,
html.codelab-home-scroll-v61321::-webkit-scrollbar{width:10px;height:10px;}
html:has(.codelab-home-v631)::-webkit-scrollbar-track,
html.codelab-home-scroll-v61321::-webkit-scrollbar-track{background:#eef3f8;}
html:has(.codelab-home-v631)::-webkit-scrollbar-thumb,
html.codelab-home-scroll-v61321::-webkit-scrollbar-thumb{background:#b9c5d3;border-radius:999px;border:2px solid #eef3f8;}

@media(max-width:1080px){
  .cl31-header{flex-wrap:wrap;gap:14px;position:relative!important;}
  .cl31-nav{order:3;flex-basis:100%;justify-content:flex-start;overflow-x:auto;padding-bottom:4px;gap:22px;}
  .cl31-hero-grid,.cl31-code-grid{grid-template-columns:1fr;gap:24px;min-height:auto;}
  .cl31-hero-grid{padding:30px 0 42px;}
  .cl31-copy{justify-self:start;max-width:760px;}
  .cl31-hero-art,.cl31-code-art{justify-content:center;}
  .cl31-hero-art img{max-height:430px;}
  .cl31-code-grid{padding:48px 0;}
}
@media(max-width:720px){
  .cl31-inner{width:calc(100% - 28px);}
  .cl31-header{padding:14px!important;min-height:0!important;}
  .cl31-brand img{height:44px!important;max-height:44px!important;}
  .cl31-nav{display:none;}
  .cl31-actions{width:100%;}
  .cl31-actions .cl31-btn{flex:1 1 0;min-height:44px!important;padding:0 14px!important;font-size:14px;}
  .cl31-copy h1{font-size:clamp(36px,10vw,52px);}
  .cl31-copy p,.cl31-section-copy p{font-size:16px;}
  .cl31-cta{flex-direction:column;align-items:stretch;}
  .cl31-hero-art img{max-height:390px;}
  .cl31-code-art img{max-height:310px;}
  .cl31-flow-grid{grid-template-columns:1fr;}
  .cl31-flow-item{border-right:none;border-bottom:1px solid var(--cl31-line);}
  .cl31-flow-item:last-child{border-bottom:none;}
}
