/* ==========================================================================
   GemingaLabs — hoja de estilos
   Identidad: doc/images/gemingalabs-logos/LEEME.md (paleta ultravioleta, Poppins)
   ========================================================================== */

/* --- Tipografía (Poppins, autoalojada) ----------------------------------- */
@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/poppins-400.cd6b896a19b4.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/poppins-500.614a91afc751.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/poppins-600.0fc985df77c6.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/poppins-700.124cd57d8f41.ttf") format("truetype"); }

/* --- Tokens --------------------------------------------------------------- */
:root {
    /* Paleta de marca */
    --space: #0B0618;
    --space-2: #1A0B33;
    --uv-deep: #4C1D95;
    --uv: #7C3AED;
    --uv-bright: #A855F7;
    --fluor: #E879F9;
    --lavender: #C4B5FD;
    --ink-light: #F5F3FF;
    --ink-dark: #1E1033;

    /* Tema claro (por defecto) */
    --bg: #FFFFFF;
    --bg-alt: #F5F3FF;
    --surface: #FFFFFF;
    --text: var(--ink-dark);
    --muted: #5B4B80;
    --border: rgba(76, 29, 149, 0.16);
    --accent-text: var(--uv);
    --link: var(--uv);
    --shadow: 0 1px 2px rgba(30, 16, 51, 0.06), 0 8px 24px rgba(76, 29, 149, 0.08);

    --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --radius: 16px;
    --radius-sm: 10px;
    --container: 72rem;
    --header-h: 4.5rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: var(--space);
        --bg-alt: #120826;
        --surface: rgba(255, 255, 255, 0.04);
        --text: var(--ink-light);
        --muted: #B9ABE0;
        --border: rgba(196, 181, 253, 0.18);
        --accent-text: var(--uv-bright);
        --link: var(--lavender);
        --shadow: none;
    }
}

/* --- Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--fluor); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.2; font-weight: 600; margin: 0 0 0.75rem; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.25rem, 5.5vw + 0.5rem, 4rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }

.container { width: min(100% - 2rem, var(--container)); margin-inline: auto; }
.container--narrow { width: min(100% - 2rem, 46rem); }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; left: 1rem; top: -4rem; z-index: 100;
    background: var(--uv); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

/* --- Piezas comunes ------------------------------------------------------- */
.eyebrow {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--accent-text);
}
.eyebrow--hero { color: var(--lavender); }

.lead { font-size: 1.125rem; color: var(--muted); max-width: 42rem; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.8rem 1.6rem; border-radius: 999px; border: 1px solid transparent;
    font: inherit; font-weight: 600; font-size: 0.975rem; line-height: 1.2; text-decoration: none; cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--uv), var(--uv-deep));
    box-shadow: 0 6px 24px rgba(168, 85, 247, 0.35), inset 0 0 0 1px rgba(232, 121, 249, 0.35);
}
.btn--primary:hover { box-shadow: 0 8px 30px rgba(232, 121, 249, 0.45), inset 0 0 0 1px rgba(232, 121, 249, 0.6); }
.btn--ghost { color: var(--ink-light); border-color: rgba(196, 181, 253, 0.45); background: rgba(255, 255, 255, 0.04); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }
/* El botón fantasma fuera de zonas oscuras */
.section .btn--ghost, .contact .btn--ghost { color: var(--accent-text); border-color: var(--border); background: transparent; }

.prose > :last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: 0.35rem; }
.prose { color: var(--muted); font-size: 1.0625rem; }
.prose strong { color: var(--text); }

/* --- Cabecera ------------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(11, 6, 24, 0.78);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(196, 181, 253, 0.12);
    color: var(--ink-light);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--header-h); flex-wrap: wrap; }
.site-header__brand { display: inline-flex; }
.site-header__brand img { display: block; height: 2.75rem; width: auto; }

.site-nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; flex-wrap: wrap; }
.site-nav a {
    display: block; padding: 0.5rem 0.9rem; border-radius: 999px;
    color: var(--lavender); font-weight: 500; font-size: 0.95rem; text-decoration: none;
}
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.site-nav a[aria-current="page"] { color: #fff; background: rgba(168, 85, 247, 0.22); }

.nav-toggle { display: none; background: none; border: 1px solid rgba(196, 181, 253, 0.35); border-radius: var(--radius-sm); width: 2.75rem; height: 2.75rem; cursor: pointer; color: var(--ink-light); }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 1.25rem; height: 2px; background: currentColor; border-radius: 2px; margin-inline: auto; transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; right: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 47.99rem) {
    /* Con JS el menú se colapsa; sin JS queda visible bajo el logo. */
    .site-header[data-js] .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .site-header[data-js] .site-nav { display: none; flex-basis: 100%; padding-bottom: 1rem; }
    .site-header[data-js] .site-nav.is-open { display: block; }
    .site-nav__list { flex-direction: column; }
}

/* --- Hero y cabeceras de página (siempre sobre "espacio") ----------------- */
.hero, .page-header {
    position: relative; overflow: hidden; isolation: isolate; color: var(--ink-light);
    background:
        radial-gradient(60rem 30rem at 85% 10%, rgba(124, 58, 237, 0.45), transparent 60%),
        radial-gradient(40rem 24rem at 5% 95%, rgba(232, 121, 249, 0.18), transparent 60%),
        linear-gradient(180deg, var(--space-2), var(--space));
}
.hero { padding: clamp(4.5rem, 12vw, 9rem) 0 clamp(4.5rem, 11vw, 8rem); }
.page-header { padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem); }
.page-header--tall { padding-block: clamp(5rem, 14vw, 9rem); }
.page-header h1 { font-size: clamp(2rem, 4vw + 0.5rem, 3.25rem); }
.page-header .lead { color: var(--lavender); }
.page-header .prose { color: var(--lavender); font-size: 1.125rem; }

.hero__stars {
    position: absolute; inset: 0; z-index: -1; opacity: 0.9;
    background-image:
        radial-gradient(1.2px 1.2px at 8% 22%, #fff, transparent),
        radial-gradient(1px 1px at 17% 71%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 26% 38%, var(--lavender), transparent),
        radial-gradient(1px 1px at 34% 86%, #fff, transparent),
        radial-gradient(1.2px 1.2px at 43% 14%, #fff, transparent),
        radial-gradient(1px 1px at 52% 58%, var(--lavender), transparent),
        radial-gradient(1.6px 1.6px at 61% 31%, #fff, transparent),
        radial-gradient(1px 1px at 70% 80%, #fff, transparent),
        radial-gradient(1.3px 1.3px at 78% 18%, var(--fluor), transparent),
        radial-gradient(1px 1px at 86% 62%, #fff, transparent),
        radial-gradient(1.4px 1.4px at 93% 40%, #fff, transparent),
        radial-gradient(1px 1px at 12% 52%, #fff, transparent),
        radial-gradient(1px 1px at 57% 92%, #fff, transparent),
        radial-gradient(1.2px 1.2px at 97% 90%, var(--lavender), transparent);
    animation: twinkle 7s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.55; } to { opacity: 1; } }

/* Estela: dos colas curvas que recuerdan al púlsar del logo */
.hero__trail { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__trail::before, .hero__trail::after {
    content: ""; position: absolute; right: -10%; width: 70%; height: 38%;
    border-radius: 50%; border-top: 2px solid transparent;
    background: linear-gradient(90deg, transparent, rgba(232, 121, 249, 0.5), rgba(124, 58, 237, 0.0)) top / 100% 2px no-repeat;
    filter: blur(0.5px);
}
.hero__trail::before { top: 14%; transform: rotate(-9deg); opacity: 0.55; }
.hero__trail::after { bottom: 12%; width: 55%; transform: rotate(7deg); opacity: 0.35; }

.hero__inner { position: relative; }
.hero__inner > * { max-width: 52rem; }
/* Símbolo grande como contrapeso visual en pantallas amplias */
.hero__symbol { display: none; }
@media (min-width: 64rem) {
    .hero__symbol {
        display: block; position: absolute; right: 0; top: 50%; width: min(26rem, 34vw); max-width: none;
        transform: translateY(-50%); opacity: 0.95; filter: drop-shadow(0 0 60px rgba(168, 85, 247, 0.45));
        pointer-events: none;
    }
}
.hero__title { margin-bottom: 1.25rem; }
.hero__inner > .hero__symbol { max-width: none; }
.accent {
    background: linear-gradient(100deg, var(--fluor), var(--uv-bright) 55%, var(--uv));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero__subtitle { font-size: clamp(1.05rem, 1vw + 0.9rem, 1.3rem); color: var(--lavender); max-width: 40rem; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* --- Secciones ------------------------------------------------------------ */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--alt { background: var(--bg-alt); }
.section__head { max-width: 44rem; margin-bottom: 2.5rem; }

.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.75rem; box-shadow: var(--shadow);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--uv-bright); }
.card__icon {
    display: inline-grid; place-items: center; width: 3.25rem; height: 3.25rem; margin-bottom: 1.1rem;
    border-radius: 14px; color: var(--accent-text);
    background: linear-gradient(135deg, rgba(232, 121, 249, 0.16), rgba(124, 58, 237, 0.16));
    border: 1px solid var(--border);
}
.card p { color: var(--muted); margin: 0; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); counter-reset: none; }
.step { position: relative; padding-top: 1rem; border-top: 1px solid var(--border); }
.step__num {
    display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: 0.9rem;
    border-radius: 50%; font-weight: 600; color: #fff;
    background: linear-gradient(135deg, var(--fluor), var(--uv));
}
.step p { color: var(--muted); margin: 0; }

.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 52rem) {
    .split { grid-template-columns: 1.05fr 0.95fr; gap: 4rem; }
    .split--reverse .split__text { order: 2; }
}
.split__media { margin: 0; }
.split__caption { margin-top: 0.75rem; font-size: 0.8125rem; line-height: 1.5; color: var(--muted); }
.split__img { display: block; width: 100%; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(76, 29, 149, 0.35); border: 1px solid var(--border); }

.cta {
    position: relative; overflow: hidden; isolation: isolate; text-align: center; color: var(--ink-light);
    padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem; border-radius: calc(var(--radius) + 8px);
    background:
        radial-gradient(30rem 16rem at 80% 0%, rgba(232, 121, 249, 0.3), transparent 60%),
        linear-gradient(135deg, var(--space-2), var(--uv-deep));
}
.cta h2 { margin-inline: auto; max-width: 36rem; }
.cta p { color: var(--lavender); max-width: 34rem; margin-inline: auto; margin-bottom: 1.75rem; font-size: 1.1rem; }

/* --- Formulario de contacto ----------------------------------------------- */
.contact { display: grid; gap: 3rem; }
@media (min-width: 52rem) { .contact { grid-template-columns: 1.4fr 1fr; align-items: start; } }

.form { display: grid; gap: 1.25rem; }
.field label { display: block; font-weight: 500; margin-bottom: 0.4rem; }
.field input:not([type="checkbox"]):not([type="radio"]), .field textarea, .field select, .search input {
    width: 100%; padding: 0.8rem 1rem; font: inherit; color: var(--text);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.field input:focus, .field textarea:focus, .field select:focus, .search input:focus { outline: 2px solid var(--uv-bright); outline-offset: 1px; border-color: transparent; }
.field textarea { min-height: 9rem; resize: vertical; }
.field--check { display: flex; gap: 0.6rem; align-items: baseline; }
.field--check label { margin: 0; font-weight: 400; }
.field__help { font-size: 0.875rem; color: var(--muted); margin: 0.35rem 0 0; }
.field__error, .form__errors { color: #C2185B; font-size: 0.9rem; margin: 0.35rem 0 0; }
@media (prefers-color-scheme: dark) { .field__error, .form__errors { color: #FF8AB3; } }
.field--error input, .field--error textarea, .field--error select { border-color: #C2185B; }
/* Campo trampa antispam: fuera de pantalla (no display:none, que algunos bots detectan y omiten) */
.field--trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__errors ul { margin: 0; padding-left: 1.1rem; }
.form .btn { justify-self: start; }

.contact__info { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.75rem; }
.contact__info h2 { font-size: 1.25rem; }
.contact__info ul { list-style: none; margin: 0; padding: 0; }
.contact__info li { margin-bottom: 0.5rem; color: var(--muted); }

/* --- Búsqueda ------------------------------------------------------------- */
.search { display: flex; gap: 0.75rem; max-width: 34rem; margin-top: 1.25rem; }
.search input { color: var(--ink-light); background: rgba(255, 255, 255, 0.06); border-color: rgba(196, 181, 253, 0.35); }
.results { list-style: none; margin: 0; padding: 0; }
.results li { padding: 1.25rem 0; border-bottom: 1px solid var(--border); }
.results h2 { font-size: 1.25rem; margin-bottom: 0.25rem; }
.results p { color: var(--muted); margin: 0; }
.pager { display: flex; justify-content: space-between; margin-top: 2rem; }

/* --- Pie ------------------------------------------------------------------ */
.site-footer { background: var(--space); color: var(--lavender); border-top: 1px solid rgba(196, 181, 253, 0.12); padding-top: 3.5rem; }
.site-footer a { color: var(--lavender); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__grid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); padding-bottom: 2.5rem; }
.site-footer__about img { height: 2.25rem; width: auto; margin-bottom: 1rem; }
.site-footer__about p { max-width: 20rem; margin: 0; }
.site-footer__title { font-size: 0.8125rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-light); font-weight: 600; margin-bottom: 1rem; }
.site-footer ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer .social { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
.site-footer__legal { border-top: 1px solid rgba(196, 181, 253, 0.12); padding-block: 1.25rem; font-size: 0.875rem; }
.site-footer__legal p { margin: 0; color: #9C8CC8; }
