/* RESET BÁSICO */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* COLORES Y TIPOGRAFÍA BASE */
:root {
    --bg-main: #0b0d0f;
    --bg-elevated: #11151a;
    --bg-muted: #f5f5f5;
    --text-main: #101218;
    --text-soft: #4b4f5c;
    --accent: #00ffb0;
    --accent-soft: rgba(0, 255, 176, 0.18);
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--bg-main);
    color: #f5f5f5;
    line-height: 1.6;
}

/* BARRA SUPERIOR */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(5, 7, 10, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.95rem;
}

.brand-mark {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 2px rgba(0, 255, 176, 0.25);
}

.nav {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.nav a {
    color: #d4d9e3;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
    font-size: 0.78rem;
}

.nav a:hover {
    color: var(--accent);
}

/* HERO */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    background-image: url("img/groundhub-desert-hero.jpg");
    /* tu imagen hero */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    /*background: radial-gradient(circle at 15% 30%, rgba(0, 255, 176, 0.16), transparent 60%), linear-gradient(to right, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.35));*/
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 600px;
    margin-left: min(10vw, 120px);
    margin-right: 1.5rem;
    color: #000000;
    padding-top: 4rem;
    /* deja espacio para la barra fija */
}

.hero-kicker {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #000000;
    /* por ejemplo blanco */
    margin-bottom: 0.75rem;
}

.hero h1 {
    font-size: clamp(2.8rem, 6vw, 3.8rem);
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.hero h2 {
    font-size: clamp(1.3rem, 2.4vw, 1.8rem);
    font-weight: 500;
    margin-bottom: 1rem;
}

.hero-text {
    font-size: 1rem;
    color: #000000;
    margin-bottom: 1.75rem;
    max-width: 32rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn {
    display: inline-block;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--accent);
    color: #02110c;
}

.btn-primary:hover {
    background-color: #00e19c;
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #000000;
}

.btn-ghost:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* SECCIONES GENERALES */
.section {
    padding: 5rem 1.5rem;
    background-color: #ffffff;
    color: var(--text-main);
}

.section-muted {
    background-color: #f5f5f5;
    color: var(--text-main);
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

/* TITULARES */
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    color: #9ca3b4;
    margin-bottom: 0.6rem;
}

.section h2 {
    font-size: 1.9rem;
    margin-bottom: 1.2rem;
}

.section p {
    color: var(--text-soft);
}

/* LAYOUT SPLIT TEXTO/IMAGEN */
.split {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.split .texto,
.split .imagen {
    flex: 1;
}

.split .imagen img {
    width: 100%;
    border-radius: 16px;
    display: block;
}

/* APLICACIONES – CARDS (CON IMAGEN) */
.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    margin-top: 1.5rem;
}

.card {
    background-color: #ffffff;
    border-radius: 14px;
    padding: 1.6rem;
    border: 1px solid #e2e5ec;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}

.card h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.card-img {
    width: 100%;
    height: auto;          /* respeta la altura natural */
    border-radius: 10px;
    margin-bottom: 0.75rem;
    display: block;
    object-fit: contain;   /* evita recortes */
    /* eliminar/NO usar aspect-ratio aquí */
}


/* ESPECIFICACIONES – GRID */
.spec-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.6rem;
    margin-top: 1.5rem;
}

.spec-item {
    background-color: #ffffff;
    border-radius: 14px;
    padding: 1.4rem 1.5rem;
    border: 1px solid #e3e6ef;
}

.spec-item h4 {
    margin-bottom: 0.4rem;
}

/* GALERÍA */
.galeria {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.galeria figure {
    background-color: #ffffff;
    border-radius: 14px;
    padding: 1rem;
    border: 1px solid #e2e5ec;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
}

.galeria img {
    width: 100%;
    border-radius: 10px;
    display: block;
    margin-bottom: 0.6rem;
}

.galeria figcaption {
    font-size: 0.9rem;
    color: var(--text-soft);
}

/* LIGHTBOX PARA EL DIAGRAMA */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 10, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 60;
}

.lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

.lightbox:target {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.8rem;
    font-size: 2rem;
    color: #ffffff;
    text-decoration: none;
}

/* RECURSOS TÉCNICOS – CARDS */
.recursos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.recurso {
    background-color: #ffffff;
    border-radius: 14px;
    padding: 1.6rem;
    border: 1px solid #e2e5ec;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
}

.recurso h4 {
    margin-bottom: 0.3rem;
    font-size: 1.1rem;
}

.recurso p {
    margin-bottom: 0.3rem;
}

/* Miniatura del diagrama */
.diagram-thumb img {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    border: 1px solid #e2e5ec;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
    display: block;
    margin-top: 0.75rem;
}

/* BOTÓN-IMAGEN PARA EL CÓDIGO */
.code-thumb {
    display: inline-block;
    position: relative;
    margin-top: 0.75rem;
}

.code-thumb img {
    width: 100%;
    max-width: 340px;
    border-radius: 10px;
    border: 1px solid #e2e5ec;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    display: block;
}

.code-label {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border-radius: 0 0 10px 10px;
}

.code-thumb:hover img {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
    transition: all 0.18s ease-out;
}

/* LISTA DE COMPONENTES */
.componentes-lista {
    list-style: none;
    margin-top: 0.75rem;
    padding-left: 0;
}

.componentes-lista li {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.componentes-lista li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
}

/* NOTA PEQUEÑA EN RECURSOS */
.nota {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #9ca3b4;
}

/* CONTACTO */
.contacto {
    text-align: center;
}

.contacto p {
    max-width: 680px;
    margin: 0.75rem auto;
}

.contacto-datos a {
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px solid var(--text-main);
}

/* FOOTER */
.footer {
    background-color: #050709;
    color: #9ca3b4;
    padding: 1.5rem 1.5rem 1.8rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    font-size: 0.85rem;
}

/* RESPONSIVE */
@media (min-width: 768px) {
    .cards {
        grid-template-columns: repeat(3, 1fr);
    }

    .spec-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .galeria {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 900px) {
    .split {
        flex-direction: row;
        align-items: center;
    }

    .recursos-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .topbar-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }

    .nav {
        flex-wrap: wrap;
        gap: 0.8rem;
    }

    .hero {
        background-position: center;
    }

    .hero-content {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
        padding-top: 5rem;
    }
}
