/* =========================================================
   1M Ads — León Group
   Base design system (todo lo que no es .mads-* vive acá)
   ========================================================= */

:root {
    --primary-gold: #F5C542;
    --gold-strong: #E7B32C;
    --accent-red: #EA1F30;

    --bg-base: #0B0B0B;
    --bg-surface: #121212;
    --bg-elevated: #161616;

    --text-main: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.66);
    --text-muted: rgba(255, 255, 255, 0.45);

    --border-soft: rgba(255, 255, 255, 0.08);
    --border-gold: rgba(245, 197, 66, 0.35);

    --font-display: 'Outfit', 'Segoe UI', Arial, sans-serif;
    --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;

    --container: 1200px;
    --nav-height: 96px;
    --radius: 8px;
}

/* ---------- Reset ---------- */

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

* {
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.4rem, 6vw, 4.6rem);
}

h2 {
    font-size: clamp(1.9rem, 4vw, 3.2rem);
}

h3 {
    font-size: 1.35rem;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img,
video {
    max-width: 100%;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

::selection {
    background: rgba(245, 197, 66, 0.28);
    color: #fff;
}

/* ---------- Layout ---------- */

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

section {
    position: relative;
    z-index: 1;
}

/* Canvas de fondo animado (iconos dorados) */
#bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Superficie translúcida reutilizable */
.glass {
    background: rgba(18, 18, 18, 0.62);
    border: 1px solid var(--border-soft);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ---------- Navbar ---------- */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    height: var(--nav-height);
    background: rgba(11, 11, 11, 0.55);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: background 0.3s ease, border-color 0.3s ease, height 0.3s ease;
}

.navbar.scrolled {
    background: rgba(11, 11, 11, 0.92);
    border-bottom-color: var(--border-soft);
}

.nav-content {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
}

/* El logo también se usa fuera de la landing (privacidad.html), así que su
   tamaño vive acá y no sólo en el <style> de la home. */
.mads-logo {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    text-decoration: none;
}

.mads-logo img {
    display: block;
    height: 44px;
    width: auto;
    max-width: 100%;
}

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

/* El CTA del nav parte el texto en dos nodos ("Ingresar" + " a la plataforma").
   Al ser items flex, el espacio del markup se colapsa: el gap acá hace de
   espacio, no de separación entre texto y flecha. */
.nav-cta .btn {
    gap: 0.28em;
}

/* ---------- Botones ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 15px 34px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease,
        color 0.2s ease, box-shadow 0.2s ease;
}

/* Sin `display`: los hijos de .btn ya se blockifican por ser items flex, y
   declararlo acá le ganaría en especificidad al `display:none` que oculta
   .nav-cta-long en mobile. */
.btn span {
    transition: transform 0.2s ease;
}

.btn:hover span {
    transform: translateX(4px);
}

.btn-primary {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
    color: #111;
    box-shadow: 0 10px 30px rgba(245, 197, 66, 0.22);
}

.btn-primary:hover {
    background: var(--gold-strong);
    border-color: var(--gold-strong);
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(245, 197, 66, 0.32);
}

.btn-outline {
    background: rgba(245, 197, 66, 0.06);
    border-color: var(--border-gold);
    color: var(--primary-gold);
}

.btn-outline:hover {
    background: rgba(245, 197, 66, 0.14);
    border-color: var(--primary-gold);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 11px 22px;
    font-size: 0.92rem;
}

/* ---------- Badges / etiquetas ---------- */

.badge {
    display: inline-block;
    padding: 8px 18px;
    border: 1px solid var(--border-gold);
    border-radius: 999px;
    background: rgba(245, 197, 66, 0.08);
    color: var(--primary-gold);
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.mads-eyebrow {
    display: block;
    color: var(--primary-gold);
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: calc(var(--nav-height) + 40px) 20px 80px;
    overflow: hidden;
}

.hero-video-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 50% 30%, rgba(245, 197, 66, 0.16), transparent 58%),
        linear-gradient(180deg, #151515 0%, var(--bg-base) 100%);
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Si el mp4 no está disponible, el degradado del contenedor queda a la vista */
.hero-video.is-missing {
    display: none;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(11, 11, 11, 0.85) 85%, var(--bg-base) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-content.centered {
    text-align: center;
}

.hero-text .badge {
    margin-bottom: 26px;
}

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

.hero-text h1 span {
    color: var(--primary-gold);
}

.hero-text p {
    margin: 0 auto 28px;
    color: var(--text-secondary);
    font-size: 1.15rem;
}

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

/* ---------- Animaciones de entrada ---------- */

.fade-in {
    opacity: 0;
    animation: fade-in-up 0.7s ease-out forwards;
}

.fade-in.delay-1 {
    animation-delay: 0.15s;
}

.fade-in.delay-2 {
    animation-delay: 0.3s;
}

.fade-in.delay-3 {
    animation-delay: 0.45s;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* .reveal se muestra al entrar en viewport (IntersectionObserver).
   La regla `.mads-page .reveal` del HTML agrega el translateY, así que
   el estado visible necesita esta especificidad para ganarle. */
.reveal {
    opacity: 0;
}

.mads-page .reveal.visible,
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {

    .fade-in,
    .reveal,
    .mads-page .reveal {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- FAQ ---------- */

.faq-grid {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    background: rgba(18, 18, 18, 0.65);
    overflow: hidden;
    transition: border-color 0.25s ease, background 0.25s ease;
}

.faq-item:hover {
    border-color: rgba(245, 197, 66, 0.24);
}

.faq-item.active {
    border-color: rgba(245, 197, 66, 0.38);
    background: rgba(18, 18, 18, 0.85);
}

.faq-question {
    position: relative;
    padding: 24px 62px 24px 26px;
    color: var(--text-main);
    font-family: var(--font-display);
    font-size: 1.08rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    user-select: none;
}

.faq-question::after {
    content: "+";
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: rgba(245, 197, 66, 0.12);
    color: var(--primary-gold);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1;
    transition: transform 0.25s ease, background 0.25s ease;
}

.faq-item.active .faq-question::after {
    content: "−";
    background: rgba(245, 197, 66, 0.22);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.faq-answer p {
    padding: 0 26px 8px;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

.faq-answer p:first-child {
    padding-top: 2px;
}

.faq-answer p:last-child {
    padding-bottom: 26px;
}

.faq-answer strong {
    color: var(--text-main);
}

/* ---------- Footer ---------- */

footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-soft);
    background: #0A0A0A;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 48px;
    padding-top: 64px;
    padding-bottom: 48px;
}

.footer-brand p {
    max-width: 320px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 32px;
}

.link-group h4 {
    margin-bottom: 16px;
    color: var(--primary-gold);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.link-group li {
    margin-bottom: 10px;
}

.link-group a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.link-group a:hover {
    color: var(--primary-gold);
}

.footer-bottom {
    border-top: 1px solid var(--border-soft);
    padding: 22px 0;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
}

/* ---------- WhatsApp flotante ---------- */

.whatsapp-float {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 95;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: #25D366;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 16px 38px rgba(37, 211, 102, 0.35);
}

.whatsapp-float img {
    width: 34px;
    height: 34px;
    display: block;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

@media (max-width: 640px) {
    .mads-logo img {
        height: 32px;
    }

    .hero {
        padding: calc(var(--nav-height) + 24px) 18px 64px;
    }

    .hero-text p {
        font-size: 1.02rem;
    }

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

    .faq-question {
        padding: 20px 54px 20px 20px;
        font-size: 1rem;
    }

    .faq-answer p {
        padding-left: 20px;
        padding-right: 20px;
    }

    .whatsapp-float {
        right: 16px;
        bottom: 16px;
        width: 50px;
        height: 50px;
    }

    .whatsapp-float img {
        width: 30px;
        height: 30px;
    }
}
