/**
 * NormaCode Login & Landing Interface
 * Module: css/login.css v3.0.0
 * Theme: Deep Space Glass (Professional)
 * Architecture: Centered hero + login modal + immersive product preview
 * Reference: Linear, Vercel, Stripe landing page patterns (2025-2026)
 */

:root {
    --bg-deep: #050505;
    --bg-card: #0E0E10;
    --glass-heavy: rgba(18, 18, 20, 0.85);
    --primary: #4ade80;
    --primary-dim: rgba(74, 222, 128, 0.1);
    --cyan: #22d3ee;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --text-primary: #fff;
    --text-secondary: #a1a1aa;
    /* WCAG 1.4.3 sobre --bg-deep #050505: muted 5.4:1 (antes 4.2 fail) · dim 4.8:1 (antes 2.6 fail) */
    --text-muted: #82828c;
    --text-dim: #7a7a84;
    --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* =============================================================================
   1. BASE
   ============================================================================= */
.technical-data {
    font-family: var(--font-mono);
    letter-spacing: -0.02em;
}

body {
    /* Override style.css: display:flex + height:100vh break the landing layout */
    display: block !important;
    height: auto !important;
    min-height: 100vh;
    flex-direction: unset !important;
    background-color: var(--bg-deep);
    color: #e4e4e7;
    font-family: var(--font-ui);
    overflow-x: hidden;
    overflow-y: auto;
    margin: 0;
}

/* =============================================================================
   2. NAVBAR (Fixed, glassmorphism)
   ============================================================================= */
.lp-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    height: 64px;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.lp-navbar-logo {
    height: 32px;
    width: auto;
}

.lp-navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-btn {
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: var(--font-ui);
    border: none;
}

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

.nav-btn--primary {
    background: var(--text-primary);
    color: #000;
}
.nav-btn--primary:hover {
    background: #f4f4f5;
    transform: translateY(-1px);
}

.nav-btn--outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid rgba(74, 222, 128, 0.3);
}
.nav-btn--outline:hover {
    background: rgba(74, 222, 128, 0.05);
    border-color: var(--primary);
}

/* =============================================================================
   3. HERO SECTION (Centered, full-width)
   ============================================================================= */
.landing-hero {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 96px 48px 60px;
    position: relative;
    background: var(--bg-deep);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    background-position: center;
    box-sizing: border-box;
}

/* Subtle radial glow behind hero.
   width acotado al hero: con 800px fijos centrados (translateX -50%), en un
   viewport de 412px el borde derecho del pseudo llegaba a 606px y EXPANDÍA el
   actual viewport de toda la página (Chrome Android shrink-to-fit → zoom-out,
   hero cortado, overflow-x). Root cause del AUDIT móvil pase 59 (M2). */
.landing-hero::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: min(800px, 100%);
    height: 500px;
    background: radial-gradient(ellipse, rgba(74, 222, 128, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.landing-hero > * {
    position: relative;
    z-index: 1;
}

.hero-brand {
    margin-bottom: 2rem;
}

.landing-logo {
    height: 48px;
    width: auto;
}

.landing-hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 700;
    font-style: normal;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
}

.text-gradient {
    background: linear-gradient(90deg, #fff 10%, var(--primary) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    font-style: normal;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.6;
    margin: 0 auto 2rem;
}

/* Hero CTA Buttons */
.hero-ctas {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 2rem;
}

.hero-btn {
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: var(--font-ui);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.hero-btn--primary {
    background: var(--text-primary);
    color: #000;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.1);
}
.hero-btn--primary:hover {
    background: #f4f4f5;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.15);
}

.hero-btn--secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid rgba(74, 222, 128, 0.3);
}
.hero-btn--secondary:hover {
    background: rgba(74, 222, 128, 0.05);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Badges row */
.hero-badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.badge-pill {
    padding: 0.35rem 0.9rem;
    background: rgba(255,255,255,0.03);
    color: #e4e4e7;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    font-weight: 500;
    transition: all 0.2s;
}
.badge-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(74, 222, 128, 0.05);
}

/* Social proof */
.hero-social-proof {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-family: var(--font-mono);
    margin-bottom: 2.5rem;
}

.hero-social-proof .pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

/* =============================================================================
   4. SHOWCASE (Immersive product preview, inside hero)
   ============================================================================= */
.hero-showcase {
    width: 100%;
    max-width: 700px;
}

.showcase-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
    width: 100%;
    flex-wrap: wrap;
}

.showcase-tab {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    font-size: 0.875rem;
    font-family: var(--font-ui);
}
.showcase-tab.active {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border-color: var(--text-dim);
}
.showcase-tab:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.showcase-stage {
    width: 100%;
}

.showcase-content {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: center;
    animation: fadeScale 0.4s ease-out;
}
.showcase-content.active {
    display: flex;
}

@keyframes fadeScale {
    from { opacity: 0; transform: scale(0.97) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Tech Cards */
.landing-card-fixed {
    width: 100%;
    max-width: 620px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.showcase-desc {
    text-align: center;
    color: var(--text-secondary);
    max-width: 500px;
    font-size: 0.95rem;
    margin: 0 auto;
    line-height: 1.5;
}

/* Universal Tech Card */
.technical-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tech-header {
    background: #18181b;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}
.tech-tag { color: var(--text-primary); display: flex; align-items: center; gap: 8px; font-weight: 600; }
.tech-zone, .tech-badge {
    font-family: var(--font-mono);
    color: var(--text-muted);
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
}

.tech-footer {
    padding: 12px;
    border-top: 1px solid var(--border);
    background: rgba(74, 222, 128, 0.02);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.text-success { color: var(--primary); }

/* TAB 1: Layer Stack */
.layer-stack-container {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.layer-item {
    display: flex;
    align-items: center;
    gap: 12px;
}
.l-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: right;
}
.l-name { font-size: 0.8rem; color: #e4e4e7; }
.l-thick { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }
.l-visual {
    width: 60%;
    border-radius: 4px;
    height: 30px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
}
.layer-item.structure .l-visual { height: 60px; }

.l-visual-siding {
    background-color: #c4b5fd;
    background-image: radial-gradient(#a78bfa 1px, transparent 1px);
    background-size: 4px 4px;
}
.l-visual-tyvek {
    background-color: #ef4444;
    background-image: repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(255, 255, 255, 0.3) 2px, rgba(255, 255, 255, 0.3) 4px);
}
.l-visual-structure {
    background-color: #9ca3af;
    background-image: repeating-linear-gradient(-45deg, transparent, transparent 5px, rgba(0, 0, 0, 0.1) 5px, rgba(0, 0, 0, 0.1) 10px);
}
.l-visual-gypsum {
    background-color: #fdba74;
    background-image: radial-gradient(#fb923c 1px, transparent 1px);
    background-size: 3px 3px;
}
.l-insulation-core {
    width: 80%;
    height: 100%;
    margin: 0 auto;
    background-color: #fcd34d;
    opacity: 0.9;
    background-image:
        linear-gradient(45deg, #fbbf24 25%, transparent 25%, transparent 75%, #fbbf24 75%, #fbbf24),
        linear-gradient(45deg, #fbbf24 25%, transparent 25%, transparent 75%, #fbbf24 75%, #fbbf24);
    background-size: 10px 10px;
    background-position: 0 0, 5px 5px;
}

/* TAB 2: Physics */
.physics-metrics-row {
    padding: 16px 16px 8px 16px;
    display: flex;
    gap: 16px;
}
.p-metric {
    flex: 1;
    background: #18181b;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
}
.pm-label { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 4px; }
.pm-value { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); font-family: var(--font-mono); margin-bottom: 6px; }
.pm-value.text-safe { color: var(--primary); }
.pm-bar { height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; width: 100%; overflow: hidden; }
.pm-fill { height: 100%; background: #3b82f6; }
.pm-fill.safe { background: var(--primary); }
.pm-fill--85 { width: 85%; }
.pm-fill--94 { width: 94%; }

.svg-container-glaser {
    position: relative;
    padding: 0 16px 16px 16px;
    margin-top: 8px;
}
.chart-label-overlay {
    position: absolute;
    top: 5px;
    left: 25px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.tech-svg {
    width: 100%;
    height: auto;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: block;
}

/* TAB 3: Terminal Audit */
.terminal-theme {
    background: #09090b;
    border-color: #27272a;
}
.terminal-header {
    background: #18181b;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #27272a;
}
.term-dots { display: flex; gap: 6px; margin-right: 12px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #22c55e; }
.term-title { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); }
.terminal-body {
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left; /* Audit visual pase 59: terminal alinea izq (heredaba center del hero) */
}
.term-line { display: block; margin-bottom: 4px; }
.cmd { color: var(--text-primary); }
.sys { color: #3b82f6; }
.val { color: #22c55e; }
.term-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.03);
    padding: 6px 10px;
    border-radius: 4px;
}
.term-row.success { color: #e4e4e7; border-left: 2px solid var(--primary); }
.term-row i { color: var(--primary); margin-right: 8px; font-size: 0.7rem; }
.badge-pass { background: rgba(74, 222, 128, 0.1); color: var(--primary); padding: 1px 4px; font-size: 0.65rem; }
.term-divider { height: 1px; background: #27272a; margin: 8px 0; border-top: 1px dashed #3f3f46; }
.term-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
}
.text-gold { color: #f59e0b; }
.hash { margin-left: auto; opacity: 0.5; }

/* =============================================================================
   5. LOGIN MODAL OVERLAY
   ============================================================================= */
.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Audit login pase 59: permitir scroll del overlay para que el teclado
       virtual en móvil no oculte el botón "Ingresar" / bloque BETA. */
    overflow-y: auto;
    padding: 24px 0;
    background: rgba(5, 5, 5, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.login-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.login-overlay-card {
    width: 100%;
    max-width: 440px;
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(18, 18, 20, 0.97) 0%, rgba(10, 10, 12, 0.99) 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 36px;
    position: relative;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
    transform: translateY(16px) scale(0.97);
    transition: transform 0.3s ease;
}
.login-overlay.is-open .login-overlay-card {
    transform: translateY(0) scale(1);
}

.login-overlay-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
}
.login-overlay-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* =============================================================================
   6. LOGIN FORM + BETA CTA (Shared styles, used inside modal)
   ============================================================================= */
.login-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    font-weight: 600;
}
.login-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.login-field { margin-bottom: 1.25rem; position: relative; }

.login-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    font-family: var(--font-mono);
}

.login-field input {
    width: 100%;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary);
    padding: 0.85rem 1rem;
    border-radius: 8px;
    font-family: var(--font-ui);
    font-size: 1rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}
/* Audit pase 59 M16: el autofill de Chrome pintaba los inputs blancos sobre
   el dark theme. El UA fuerza background/color con !important (MDN :autofill);
   solo box-shadow inset + -webkit-text-fill-color pueden contrarrestarlo. */
.login-field input:-webkit-autofill,
.login-field input:-webkit-autofill:hover,
.login-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: #e5e7eb;
    -webkit-box-shadow: inset 0 0 0 1000px #101216;
    box-shadow: inset 0 0 0 1000px #101216;
    caret-color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-field input:hover {
    border-color: var(--border-hover);
}
.login-field input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(74, 222, 128, 0.02);
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.05);
}
.login-field input::placeholder { color: #6e6e78; } /* AA: ~4.5:1 sobre el input oscuro (era #3f3f46 ~1.5:1) */

/* Password visibility toggle (a11y pase 60) — botón absolute dentro del .login-field.
   El .login-field es position:relative; el botón se alinea al input (no al label). */
.login-field input[type="password"],
.login-field input#loginPassword {
    /* deja espacio para que la contraseña larga no quede bajo el botón (44px tap + margen) */
    padding-right: 3rem;
}
.login-pw-toggle {
    position: absolute;
    right: 4px;
    /* el input arranca tras el label; alinear al input, no al contenedor:
       label (~0.7rem + 0.5rem margin) ≈ 1.7rem, y el input mide ~3.1rem de alto.
       Posicionamos desde el bottom del .login-field para clavar al input. */
    bottom: 1px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.95rem;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
}
.login-pw-toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}
.login-pw-toggle:focus-visible {
    outline: none;
    color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.4);
}

/* Primary Button */
.btn-login {
    width: 100%;
    background: var(--text-primary);
    color: #000;
    font-weight: 600;
    padding: 0.9rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
    font-family: var(--font-ui);
}
.btn-login:hover {
    background: #f4f4f5;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

.btn-login.btn-primary {
    background: var(--text-primary);
    color: #000;
    border: none;
}
.btn-login.btn-primary:hover {
    background: #f4f4f5;
}
.btn-login.btn-primary.btn-register {
    background: var(--primary);
    color: #064e3b;
}

.btn-register {
    background: var(--primary);
    color: #064e3b;
    box-shadow: 0 4px 12px rgba(74, 222, 128, 0.2);
}
.btn-register:hover {
    background: #22c55e;
    box-shadow: 0 8px 24px rgba(74, 222, 128, 0.3);
}

.login-divider {
    display: flex; align-items: center; justify-content: center;
    margin: 1.75rem 0; color: var(--text-dim); font-size: 0.72rem;
    font-family: var(--font-mono); text-transform: uppercase;
}
.login-divider::before, .login-divider::after {
    content: ''; flex: 1; height: 1px; background: #27272a; margin: 0 1rem;
}

/* Social buttons (currently disabled in beta) */
.btn-linkedin-compact {
    width: 100%;
    background: rgba(255,255,255,0.02);
    border: 1px solid #27272a;
    color: #e4e4e7;
    padding: 0.85rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: all 0.2s;
}
.btn-linkedin-compact:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
}
.btn-linkedin-compact i { color: #3b82f6; font-size: 1.1rem; }
.btn-linkedin-compact.btn-primary {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid #27272a;
    color: #e4e4e7;
    box-shadow: none;
}
.btn-linkedin-compact.btn-primary:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    color: var(--text-primary);
}

/* Beta CTA */
.login-footer-demo {
    text-align: center;
}
.beta-cta {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.beta-cta .badge-pill {
    align-self: flex-start;
}
.beta-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}
.input-with-status {
    position: relative;
}
.input-with-status input {
    padding-right: 2.25rem;
}
.beta-email-status {
    color: #22c55e;
    font-size: 0.95rem;
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    display: inline-flex;
    align-items: center;
}
.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}
.input-valid {
    border-color: #22c55e !important;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}
.beta-cta-link.is-disabled {
    opacity: 0.6;
    pointer-events: none;
}
.beta-cta-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}
.beta-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-align: center;
}
.login-pricing-link {
    margin-top: 1rem;
}
.link-muted {
    color: var(--text-muted); text-decoration: none; font-size: 0.85rem; transition: color 0.2s;
}
.link-muted:hover { color: var(--text-primary); text-decoration: none; border-bottom: 1px solid var(--text-muted); }

/* Password reset */
.login-helper {
    margin-top: 8px;
    text-align: right;
}
.forgot-password-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
}
.forgot-password-link:hover {
    color: var(--cyan);
}

/* Auth messages */
.auth-message {
    margin: 10px 0;
    font-size: 0.9rem;
}
.auth-error { color: #ef4444; }
.auth-success { color: var(--primary); }

/* =============================================================================
   7. SCROLL INDICATOR
   ============================================================================= */
.scroll-indicator {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.3s;
}
.scroll-indicator:hover { opacity: 1; }
.scroll-indicator span {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.scroll-indicator i {
    color: var(--text-muted);
    font-size: 1.2rem;
    animation: bounceDown 2s infinite;
}
@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* =============================================================================
   8. PASSWORD RESET MODAL
   ============================================================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(6px);
}
.modal-content {
    width: 100%;
    max-width: 460px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.modal-content--auth {
    background: linear-gradient(180deg, rgba(18, 18, 20, 0.95) 0%, rgba(10, 10, 12, 0.98) 100%);
}
.modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.modal-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(74, 222, 128, 0.25);
    background: rgba(74, 222, 128, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.95rem;
}
.modal-title {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    letter-spacing: -0.01em;
}
.modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}
.modal-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.modal-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.modal-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    font-family: var(--font-mono);
}
.modal-input {
    width: 100%;
    font-size: 1rem; /* >=16px: evita zoom-on-focus de iOS Safari */
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.8rem 0.95rem;
    border-radius: 8px;
    font-family: var(--font-ui);
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(74, 222, 128, 0.03);
    box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.08);
}
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 6px;
}
.modal-btn {
    padding: 0.7rem 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}
.modal-btn--submit { min-width: 120px; }
.modal-btn--ghost {
    background: rgba(255, 255, 255, 0.04);
    color: #e4e4e7;
    border: 1px solid var(--border);
    box-shadow: none;
}
.modal-btn--ghost:hover { background: rgba(255, 255, 255, 0.08); }
.modal-btn--block { width: 100%; }
.modal-close {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: #e4e4e7;
    box-shadow: none;
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
}
.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}
.modal-hint {
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =============================================================================
   9. BELOW THE FOLD SECTIONS
   ============================================================================= */
.landing-sections {
    background: var(--bg-deep);
    width: 100%;
}

.lp-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 48px;
}

.lp-section-alt {
    background: rgba(255, 255, 255, 0.015);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.lp-label {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.lp-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.lp-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 640px;
    line-height: 1.6;
    margin-bottom: 48px;
}

/* Problems Section */
.problems-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.problem-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px 24px;
    transition: border-color 0.3s;
}
.problem-card:hover { border-color: rgba(74, 222, 128, 0.3); }
.problem-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 20px;
}
.problem-icon.icon-thermal {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
}
.problem-icon.icon-condensation {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}
.problem-icon.icon-document {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    color: var(--primary);
}
.problem-card h3 {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 600;
}
.problem-card .pain {
    font-size: 0.9rem;
    color: #ef4444;
    margin-bottom: 12px;
    font-family: var(--font-mono);
    font-weight: 500;
}
.problem-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}
.problem-card .solution-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--primary);
    font-family: var(--font-mono);
    font-weight: 500;
}

/* How It Works */
.steps-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    position: relative;
}
.step-card { text-align: center; position: relative; }
.step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(74, 222, 128, 0.08);
    border: 2px solid rgba(74, 222, 128, 0.2);
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.step-card h3 { font-size: 1.15rem; color: var(--text-primary); margin-bottom: 8px; font-weight: 600; }
.step-card p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.5; }
.step-time {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Standards Grid */
.standards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}
.standard-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 24px 20px;
    text-align: center;
    transition: border-color 0.3s, transform 0.2s;
}
.standard-card:hover {
    border-color: rgba(34, 211, 238, 0.3);
    transform: translateY(-2px);
}
.standard-card .std-code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--cyan);
    font-weight: 600;
    margin-bottom: 8px;
}
.standard-card .std-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 48px;
}
.stat-item { text-align: center; }
.stat-value {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}
.stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* CTA Section */
.lp-cta-section {
    text-align: center;
    padding: 80px 48px;
    max-width: 720px;
    margin: 0 auto;
}
.lp-cta-section .lp-title { margin-bottom: 16px; }
.lp-cta-section .lp-subtitle { margin: 0 auto 32px; text-align: center; }
.lp-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--text-primary);
    color: #000;
    font-weight: 600;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.12);
}
.lp-cta-btn:hover {
    background: #f4f4f5;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.18);
}
.lp-cta-note {
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* Footer */
.lp-footer {
    border-top: 1px solid var(--border);
    padding: 32px 48px;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.lp-footer-brand { display: flex; align-items: center; gap: 12px; }
.lp-footer-brand img { height: 28px; }
.lp-footer-text { font-size: 0.8rem; color: var(--text-dim); font-family: var(--font-mono); }
.lp-footer-links { display: flex; gap: 24px; }
.lp-footer-links a {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    font-family: var(--font-mono);
    transition: color 0.2s;
}
.lp-footer-links a:hover { color: var(--text-primary); }

/* =============================================================================
   10. RESPONSIVE
   ============================================================================= */
@media (max-width: 1024px) {
    .lp-navbar {
        padding: 0 24px;
    }
    .landing-hero {
        padding: 100px 24px 60px;
    }
    .landing-hero-title {
        font-size: clamp(2.2rem, 5vw, 3.5rem);
    }
    .hero-subtitle {
        font-size: 1.05rem;
    }
    .hero-showcase {
        max-width: 100%;
    }
    .problems-grid,
    .steps-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .standards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .lp-section {
        padding: 64px 24px;
    }
    .lp-title {
        font-size: 1.8rem;
    }
    .lp-footer {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    .login-overlay-card {
        margin: 16px;
        padding: 32px 24px;
    }
}

@media (max-width: 640px) {
    .hero-ctas {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
    }
    .hero-btn {
        width: 100%;
        justify-content: center;
    }
    .showcase-tab {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
    /* Navbar móvil (audit pase 59 M2): min-content desktop = 135 logo + 307
       acciones + 96 padding ≈ 538px > viewport teléfono → era el siguiente
       ensanchador del actual viewport tras el glow del hero. Con esto queda
       ~390px. min-width:0 anula el min-width:44px global de mobile.css en
       estos botones (texto ≥24px de ancho cumple WCAG 2.2 SC 2.5.8 AA; el
       min-height:44px táctil se conserva). */
    .lp-navbar {
        padding: 0 16px;
    }
    .lp-navbar-actions {
        gap: 8px;
    }
    .lp-navbar-actions .nav-btn {
        padding: 8px 12px;
        font-size: 0.8125rem;
        min-width: 0;
    }
}

/* =============================================================================
   11. UPDATES 2026-05-07
   - Standards grid: 8 → 9 cards (Ley 21.719 added) → 3 columnas perfecta
   - Stats row: 4 → 5 stats (374 Soluciones + 549 Valores OGUC added)
   - Sección Equipo (Matías + Carolina)
   - Sección Pricing mini (3 cards Pro / Oficina / Enterprise)
   ============================================================================= */

/* Override: 9 cards normativa en 3x3 grid (era 4x2 con 8) */
.standards-grid {
    grid-template-columns: repeat(3, 1fr);
}

/* Override: 5 stats en línea (era 4) */
.stats-row {
    grid-template-columns: repeat(5, 1fr);
}

/* Sección Equipo */
.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 48px auto 32px;
}
.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
    transition: border-color 0.3s, transform 0.2s;
}
.team-card:hover {
    border-color: rgba(34, 211, 238, 0.3);
    transform: translateY(-2px);
}
.team-avatar {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: #0b1220;
    /* TODO 2026-05-07: reemplazar por foto real cuando esté disponible
       <img src="assets/team/matias.webp" alt="Matías Navarro" /> */
}
.team-avatar--matias {
    background: linear-gradient(135deg, #22d3ee 0%, #10b981 100%);
}
.team-avatar--carolina {
    background: linear-gradient(135deg, #10b981 0%, #4ade80 100%);
}
.team-info {
    flex: 1;
    min-width: 0;
}
.team-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--text-primary);
}
.team-role {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--cyan);
    margin: 0 0 16px;
}
.team-credentials {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}
.team-credentials li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.team-credentials li i {
    color: var(--primary);
    width: 16px;
    flex-shrink: 0;
}
.team-credentials strong {
    color: var(--primary);
    font-family: var(--font-mono);
}
.team-bio {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}
.team-mentor {
    text-align: center;
    margin-top: 32px;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.team-mentor i {
    color: var(--primary);
    margin-right: 6px;
}
.team-mentor strong {
    color: var(--text-secondary);
}

/* Sección Pricing mini */
.pricing-grid-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 48px auto 24px;
}
.pricing-card-mini {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 32px 28px;
    position: relative;
    transition: border-color 0.3s, transform 0.2s;
    display: flex;
    flex-direction: column;
}
.pricing-card-mini:hover {
    border-color: rgba(34, 211, 238, 0.3);
    transform: translateY(-2px);
}
.pricing-card-mini--popular {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.04) 0%, var(--bg-card) 100%);
}
.pricing-badge {
    position: absolute;
    top: -10px;
    right: 24px;
    background: var(--primary);
    color: #0b1220;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pricing-tier {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 12px;
}
.pricing-price {
    margin-bottom: 8px;
}
.pricing-amount {
    font-family: var(--font-mono);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--cyan), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.pricing-period {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 2px;
}
.pricing-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 12px 0 20px;
}
.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    flex: 1;
}
.pricing-features li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.pricing-features li i {
    color: var(--primary);
    font-size: 0.8rem;
    flex-shrink: 0;
}
.pricing-cta {
    display: block;
    text-align: center;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--primary);
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}
.pricing-cta:hover {
    background: var(--primary);
    color: #0b1220;
    transform: translateY(-1px);
}
.pricing-card-mini--popular .pricing-cta {
    background: var(--primary);
    color: #0b1220;
    border-color: var(--primary);
}
.pricing-card-mini--popular .pricing-cta:hover {
    background: #34d399;
    border-color: #34d399;
}
.pricing-footnote {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive: 9 normativa + 5 stats + team + pricing */
@media (max-width: 1024px) {
    .standards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .stats-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    .team-grid {
        grid-template-columns: 1fr;
    }
    .team-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .team-credentials li {
        justify-content: center;
    }
    .pricing-grid-mini {
        grid-template-columns: 1fr;
        max-width: 480px;
    }
}

@media (max-width: 640px) {
    .standards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .team-card {
        padding: 24px;
    }
}


/* Audit login pase 59 (WCAG 2.3.3): respetar prefers-reduced-motion —
   las animaciones del showcase/pulse/scroll-indicator pueden molestar a
   usuarios con sensibilidad vestibular. */
@media (prefers-reduced-motion: reduce) {
  .hero-social-proof .pulse-dot,
  .scroll-indicator i,
  .scroll-indicator,
  .showcase-content {
    animation: none !important;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
