/* ═══════════════════════════════════════════════════════
   NATIVA CONSULTING — public-base.css  (mobile-first)
   Tokens · Reset · Typography · Utilities · Buttons · Forms · Nav
   MAX 300 líneas — SIN backdrop-filter, SIN will-change
═══════════════════════════════════════════════════════ */

/* ── TOKENS LIGHT ───────────────────────────────────── */
:root {
    --primary:      #003B8E;
    --primary-dark: #002a6a;
    --accent:       #0078BF;
    --accent-hover: #006aaa;
    --bg:           #F8FAFF;
    --bg-alt:       #EEF3FB;
    --white:        #FFFFFF;
    --text:         #1a2340;
    --text-muted:   #5a6a8a;
    --border:       #D8E2F3;
    --shadow-sm:    0 2px 8px rgba(0,59,142,.07);
    --shadow-md:    0 6px 24px rgba(0,59,142,.10);
    --shadow-lg:    0 16px 48px rgba(0,59,142,.14);
    --success:      #15803d;
    --error:        #dc2626;
    --nav-h:        68px;
    --radius-sm:    6px;
    --radius-md:    12px;
    --radius-lg:    20px;
    --transition:   .2s ease;
    --font:         'IBM Plex Sans', system-ui, sans-serif;
    --glass-bg:            rgba(255,255,255,.08);
    --glass-border:        rgba(255,255,255,.16);
    --glass-bg-strong:     rgba(255,255,255,.13);
    --glass-border-strong: rgba(255,255,255,.24);
}

/* ── TOKENS DARK ────────────────────────────────────── */
[data-theme="dark"] {
    --bg:        #080f20;
    --bg-alt:    #0d1830;
    --white:     #111e38;
    --text:      #dde9f8;
    --text-muted:#7a95c0;
    --border:    rgba(255,255,255,.10);
    --shadow-sm: 0 2px 8px rgba(0,0,0,.50);
    --shadow-md: 0 6px 24px rgba(0,0,0,.55);
    --shadow-lg: 0 16px 48px rgba(0,0,0,.65);
}
[data-theme="dark"] img:not([src*=".svg"]) { filter: brightness(.85); }

/* ── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); font-size: 16px; }
body  { font-family: var(--font); font-size: 1rem; line-height: 1.65; color: var(--text); background: var(--bg); }
img   { max-width: 100%; height: auto; display: block; }
a     { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
ul    { list-style: none; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }

/* ── TYPOGRAPHY ─────────────────────────────────────── */
h1 { font-size: clamp(1.6rem, 5vw, 2.8rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 4vw, 2.2rem); font-weight: 700; line-height: 1.25; }
h3 { font-size: clamp(1.1rem, 3vw, 1.5rem); font-weight: 600; line-height: 1.3; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { font-size: 1rem; line-height: 1.65; }
em { font-style: normal; color: var(--accent); }
.text-sm   { font-size: .875rem; }
.text-xs   { font-size: .75rem; }
.text-muted { color: var(--text-muted); }

/* ── LAYOUT UTILITIES ───────────────────────────────── */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}
@media (min-width: 768px)  { .container { padding: 0 1.5rem; } }
@media (min-width: 1280px) { .container { padding: 0 2rem; } }

.section     { padding: 3rem 0; }
.section-alt { padding: 3rem 0; background: var(--bg-alt); }
@media (min-width: 768px) {
    .section, .section-alt { padding: 4.5rem 0; }
}

.section-header   { text-align: center; margin-bottom: 3rem; }
.section-title    { margin-bottom: .75rem; }
.section-subtitle { color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* ── BUTTONS ────────────────────────────────────────── */
.btn-primary, .btn-outline, .btn-hero, .btn-submit {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.75rem;
    border-radius: var(--radius-md);
    font-size: .9375rem;
    font-weight: 600;
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition), color var(--transition), border-color var(--transition);
    min-height: 44px;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: #fff;
}
.btn-primary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.btn-primary:active  { transform: translateY(0); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

/* Submit — accent, pill, tamaño PRD */
.btn-submit {
    background: var(--accent);
    color: #fff;
    padding: 13px 32px;
    border-radius: 99px;
    font-size: .95rem;
    width: auto;
    align-self: flex-start;
    justify-content: center;
}
.btn-submit:hover    { background: var(--accent-hover); transform: translateY(-1px); color: #fff; }
.btn-submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-submit:active   { transform: translateY(0); }
.btn-submit:disabled { opacity: .5; cursor: not-allowed; }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-outline:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-hero {
    background: var(--accent);
    color: #fff;
    padding: .875rem 2rem;
    font-size: 1rem;
}
.btn-hero:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: #fff;
}

/* ── FORMS ──────────────────────────────────────────── */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 480px) { .form-row { grid-template-columns: 1fr 1fr; } }

.form-group { display: flex; flex-direction: column; gap: .35rem; }
label { font-size: .875rem; font-weight: 500; color: var(--text); }
label span { color: var(--error); }

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: .6875rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 1rem;
    color: var(--text);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    min-height: 44px;
}
input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,120,191,.15);
}
input.error, textarea.error { border-color: var(--error); background: #fef2f2; }
textarea { resize: vertical; min-height: 120px; }
.form-group + .form-group { margin-top: 1rem; }
.form-row .form-group + .form-group,
.contact-form .form-group + .form-group,
.comment-form .form-group + .form-group { margin-top: 0; }

.form-alert {
    padding: .875rem 1.25rem;
    border-radius: var(--radius-sm);
    border-left: 4px solid transparent;
    font-size: .9375rem;
    margin-bottom: 1rem;
}
.form-alert-ok    { background: #f0fdf4; border-left-color: var(--success); color: var(--success); }
.form-alert-error { background: #fef2f2; border-left-color: var(--error);   color: var(--error); }

.pub-toast {
    position: fixed;
    top: calc(var(--nav-h) + 1rem);
    right: 1rem;
    z-index: 9999;
    padding: .875rem 1.25rem;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    font-size: .9375rem;
    max-width: min(360px, calc(100vw - 2rem));
    animation: toastIn .3s ease;
}
.pub-toast-ok  { background: #f0fdf4; color: var(--success); border-left: 4px solid var(--success); }
.pub-toast-err { background: #fef2f2; color: var(--error);   border-left: 4px solid var(--error); }
@keyframes toastIn { from { opacity: 0; transform: translateX(1rem); } to { opacity: 1; transform: none; } }

/* ── SCROLL REVEAL ──────────────────────────────────── */
[data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .4s ease, transform .4s ease;
}
[data-reveal].visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ── NAV ────────────────────────────────────────────── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .nav {
    background: rgba(8, 15, 32, 0.5);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.nav-brand { display: flex; align-items: center; }
.nav-logo  { height: 36px; width: auto; max-width: 247px; object-fit: contain; }
.nav-logo-text { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.nav-logo-text em { color: var(--accent); }

.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: .5rem;
    border-radius: var(--radius-sm);
    order: 3;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
    border-radius: 2px;
}

.btn-theme {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: background var(--transition);
    order: 2;
}
.btn-theme:hover { background: var(--bg-alt); }
.btn-theme:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark  { display: flex; }

/* Drawer mobile — entra desde la derecha */
.nav-links {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(320px, 100vw);
    background: var(--primary);
    z-index: 990;
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding-bottom: 2rem;
}
.nav-links.open { transform: translateX(0); }
body.nav-open { overflow: hidden; }

.nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.15);
    min-height: var(--nav-h);
    flex-shrink: 0;
}
.nav-drawer-brand { color: #fff; font-size: 1.1rem; font-weight: 700; }
.nav-drawer-logo  { height: 36px; filter: brightness(0) invert(1); }
.nav-drawer-close {
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}
.nav-drawer-close:hover { background: rgba(255,255,255,.1); }

.nav-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .875rem 1.25rem;
    color: rgba(255,255,255,.85);
    font-size: 1rem;
    font-weight: 500;
    transition: color var(--transition), background var(--transition);
    min-height: 44px;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-link-icon  { width: 18px; height: 18px; flex-shrink: 0; }
.nav-talent-li  { margin-top: auto; padding: .5rem 0; }
.nav-link-talent { font-weight: 700; color: #7ecbff; }
.nav-link-talent:hover { color: #fff; }

/* ── LANG SWITCHER ──────────────────────────────────── */
.lang-switcher {
    position: relative;
    order: 1;
}
.lang-trigger {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    font-size: .78rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: color var(--transition), background var(--transition);
    min-height: 36px;
}
.lang-trigger:hover { color: var(--primary); background: var(--bg-alt); }
.lang-globe  { width: 15px; height: 15px; flex-shrink: 0; }
.lang-chevron { width: 13px; height: 13px; flex-shrink: 0; transition: transform .2s ease; }
.lang-switcher.open .lang-chevron { transform: rotate(-180deg); }
[data-theme="dark"] .lang-trigger:hover { color: var(--accent); background: rgba(255,255,255,.06); }
.lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 152px;
    z-index: 1100;
    overflow: hidden;
    list-style: none;
    padding: 4px 0;
}
.lang-switcher.open .lang-dropdown { display: block; }
.lang-option {
    display: block;
    padding: 9px 14px;
    font-size: .875rem;
    font-weight: 500;
    color: var(--text);
    transition: background var(--transition), color var(--transition);
    text-decoration: none;
}
.lang-option:hover  { background: var(--bg-alt); color: var(--primary); }
.lang-option.active { font-weight: 700; color: var(--primary); background: var(--bg-alt); }
[data-theme="dark"] .lang-option        { color: var(--text); }
[data-theme="dark"] .lang-option:hover  { color: var(--accent); background: rgba(255,255,255,.06); }
[data-theme="dark"] .lang-option.active { color: var(--accent); background: rgba(255,255,255,.06); }

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 989;
}
.nav-overlay.open { display: block; }

/* Desktop */
@media (min-width: 1024px) {
    .nav { background: rgba(255, 255, 255, 0.3); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
    [data-theme="dark"] .nav { background: rgba(8, 15, 32, 0.3); }
    .nav-toggle { display: none; }
    .nav-links {
        position: static;
        background: transparent;
        transform: none;
        flex-direction: row;
        align-items: center;
        gap: .25rem;
        overflow: visible;
        padding: 0;
        flex: 1;
        justify-content: flex-end;
        gap: .125rem;
        order: 1;
    }
    .nav-drawer-header { display: none; }
    .nav-link-icon  { display: none; }
    .nav-link {
        color: var(--text);
        padding: .375rem .6rem;
        border-radius: var(--radius-sm);
        font-size: .875rem;
        min-height: auto;
    }
    .nav-link:hover { color: var(--primary); background: var(--bg-alt); }
    .nav-talent-li  { margin-top: 0; padding: 0; margin-left: .25rem; }
    .nav-link-talent {
        background: var(--accent);
        color: #fff;
        padding: 6px 14px;
        border-radius: 99px;
        font-size: .82rem;
        font-weight: 600;
    }
    .nav-link-talent:hover { background: var(--accent-hover); color: #fff; }
    .btn-theme { order: 2; }
}
