/* ==========================================================================
   CSS Variables & Tokens 
   ========================================================================== */
:root {
    /* Brand Colors */
    --coral: #EC5C73;
    /* Updated YouTube Blue to be closer to YouTube's brand color for contrast or keeping the original Option A */
    --blue-a: #08599D;

    --blue-card: var(--blue-a);

    --yellow: #F9DC5C;
    --white: #F5F8FB;
    --dark: #2E2828;

    --text-body: #6B6666;
    --text-dark: #2E2828;

    /* Layout */
    --nav-height: 72px;
    --container-width: 1100px;
    --container-base: 24px;
}

/* ==========================================================================
   Base Reset
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    font-family: 'DM Sans', sans-serif;
}

body {
    background-color: var(--white);
    color: var(--text-body);
    line-height: 1.7;
    font-size: 1rem;
    font-weight: 400;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1,
h2,
h3 {
    font-weight: 700;
    color: var(--text-dark);
}

h1 {
    font-size: clamp(2.4rem, 5vw, 4rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.35rem;
    line-height: 1.3;
}

.eyebrow,
.platform-label,
.video-label {
    font-weight: 700;
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--coral);
    display: block;
    margin-bottom: 16px;
}

.center.video-label {
    text-align: center;
    color: var(--white);
    /* For dark sections like LoboTracker */
    display: inline-block;
    width: auto;
}

.section-label {
    display: block;
    font-weight: 900;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--dark);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 6px solid var(--coral);
    width: 100%;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-body);
    max-width: 600px;
    margin-bottom: 2rem;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-base);
}

.container-sm {
    max-width: 720px;
}

/* ==========================================================================
   Buttons & Links
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    padding: 14px 28px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.btn-primary {
    background-color: var(--coral);
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-pill {
    border-radius: 40px;
    background-color: rgba(255, 255, 255, 0.10);
    color: var(--white);
    padding: 12px 24px;
}

.btn-large {
    border-radius: 10px;
    padding: 16px 32px;
    font-size: 1.1rem;
}

.link-secondary {
    color: var(--white);
    opacity: 0.4;
    font-size: 0.85rem;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.link-secondary:hover {
    opacity: 0.8;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--dark);
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-base);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-text {
    color: var(--white);
    font-weight: 700;
    font-size: 1.1rem;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.75;
}

.nav-link:hover {
    opacity: 1;
    color: var(--yellow);
}

/* Mobile Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--white);
    transition: all 0.3s ease;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    background-color: var(--dark);
    position: relative;
    overflow: hidden;
    padding: 120px 0 100px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(236, 92, 115, 0.15) 0%, rgba(46, 40, 40, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-content h1 {
    margin-bottom: 24px;
}

.h1-line1 {
    color: var(--white);
}

.h1-line2 {
    color: var(--coral);
}

.hero-body {
    color: var(--white);
    opacity: 0.65;
    max-width: 480px;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ==========================================================================
   Contenido Section
   ========================================================================== */
.section-contenido {
    padding: 60px 0;
    background-color: var(--white);
}

.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 48px;
}

.card {
    border-radius: 16px;
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    color: var(--white);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-8px);
}

.card-tiktok {
    background-color: var(--dark);
}

.card-youtube {
    background-color: var(--blue-card);
}

.card h3 {
    color: var(--white);
    margin: 0;
    font-size: 1.5rem;
}

.stat-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: auto;
    margin-bottom: 12px;
}

.stat-number {
    color: var(--yellow);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
}

.stat-sublabel {
    color: var(--white);
    opacity: 0.4;
    font-size: 0.9rem;
}

.card .btn-pill {
    align-self: flex-start;
    margin-top: 10px;
}

/* ==========================================================================
   Laboratorio Section
   ========================================================================== */
.section-laboratorio {
    padding: 60px 0;
    background-color: var(--white);
}

.tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 48px;
}

.card-tool {
    background-color: var(--white);
    padding: 0;
    color: var(--text-body);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-tool h3 {
    color: var(--text-dark);
}

.tool-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}

.tool-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tool-content p {
    margin-bottom: 24px;
}

.tool-btn {
    align-self: flex-start;
    margin-top: auto;
}

/* ==========================================================================
   LoboTracker Section
   ========================================================================== */
.section-lobotracker {
    padding: 60px 0;
    background-color: var(--white);
}

.lobotracker-container {
    background-color: var(--dark);
    border-radius: 24px;
    padding: 64px;
    color: var(--white);
}

.lobotracker-container h2 {
    color: var(--white);
}

.badge {
    display: inline-block;
    background-color: var(--yellow);
    color: var(--dark);
    border-radius: 40px;
    padding: 6px 16px;
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.lobo-header .subtitle {
    color: rgba(255, 255, 255, 0.6);
    max-width: 500px;
}

.features-list {
    margin-top: 64px;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 48px;
}

.feature-row.reverse {
    flex-direction: row-reverse;
}

.feature-text {
    flex: 1;
}

.feature-text h2 {
    margin-bottom: 16px;
}

.feature-text p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

.feature-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.feature-image img {
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 480px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.explainer-video {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.explainer-video .video-label.center {
    text-align: center;
    margin-bottom: 24px;
}

.video-wrapper {
    border-radius: 16px;
    overflow: hidden;
    max-width: 360px;
    width: 100%;
    aspect-ratio: 9/16;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.cta-block-lobo {
    margin-top: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

/* ==========================================================================
   Contacto Section
   ========================================================================== */
.section-contacto {
    background-color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.section-contacto p {
    margin-bottom: 32px;
    font-size: 1.1rem;
}

.email-link {
    display: inline-block;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--blue-a);
    text-decoration: underline;
    text-underline-offset: 8px;
}

.email-link:hover {
    color: var(--coral);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: var(--dark);
    padding: 60px 0 24px;
    color: var(--white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    margin-bottom: 48px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand {
    font-weight: 700;
    font-size: 1.1rem;
}

.footer-center {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.35;
}

.footer-right {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    align-items: center;
    font-size: 0.9rem;
}

.footer-right a {
    opacity: 0.7;
}

.footer-right a:hover {
    opacity: 1;
    color: var(--coral);
}

.footer-right .dot {
    opacity: 0.3;
}

.footer-bottom {
    text-align: center;
    font-size: 0.78rem;
    opacity: 0.25;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 24px;
    max-width: var(--container-width);
    margin: 0 auto;
}

/* ==========================================================================
   Privacidad
   ========================================================================== */
.privacy-block {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    padding-top: 8px;
    text-align: center;
    max-width: 600px;
    transition: color 0.2s;
}

.privacy-block:hover {
    color: rgba(255, 255, 255, 0.7);
}

.privacy-block summary {
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    user-select: none;
}

.privacy-block summary::-webkit-details-marker {
    display: none;
}

.privacy-block summary::before {
    content: '▸';
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.privacy-block[open] summary::before {
    transform: rotate(90deg);
}

.privacy-block[open] summary {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.privacy-block[open] {
    color: rgba(255, 255, 255, 0.7);
    text-align: left;
}

.last-updated {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 32px;
}

.privacy-block h3 {
    margin-top: 24px;
    margin-bottom: 8px;
    color: var(--white);
    font-size: 0.85rem;
}

.privacy-block p {
    margin-bottom: 10px;
}

.privacy-block ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 16px;
}

.privacy-block ul li {
    margin-bottom: 4px;
}

.privacy-block a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.privacy-block a:hover {
    color: var(--white);
}

/* ==========================================================================
   Media Queries
   ========================================================================== */
@media (max-width: 1100px) {
    .section-contacto {
        padding: 80px 0;
    }
}

@media (max-width: 768px) {

    /* Navigation */
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background-color: var(--dark);
        flex-direction: column;
        padding: 24px;
        gap: 24px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Hero */
    .hero-section {
        padding: 80px 0;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }

    .hero-ctas .btn {
        width: 100%;
    }

    /* Contenido & Laboratorio */
    .cards-grid,
    .tools-grid {
        grid-template-columns: 1fr;
    }

    /* LoboTracker */
    .lobotracker-container {
        padding: 32px 24px;
    }

    .features-list {
        gap: 56px;
    }

    .feature-row,
    .feature-row.reverse {
        flex-direction: column;
        text-align: center;
        gap: 32px;
    }

    .feature-image img {
        max-height: 400px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .footer-left {
        justify-content: center;
    }

    .footer-right {
        justify-content: center;
        flex-wrap: wrap;
    }
}