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

:root {
    --blue: #0047FF;
    --blue-glow: rgba(0, 71, 255, 0.18);
    --blue-mid: rgba(0, 71, 255, 0.08);
    --bg: #07070d;
    --bg2: #0d0d18;
    --surface: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.07);
    --text: #f0f0f5;
    --text-soft: #f5f5f5;
    --muted: rgba(240, 240, 245, 0.45);
    --font-display: 'Jost', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 40px;
}

/* NAV */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 12px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 7, 13, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: border-color 0.3s;
}

.nav-links {
    display: flex;
    gap: 36px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-cta {
    background: var(--blue) !important;
    color: #fff !important;
    padding: 7px 18px;
    border-radius: 8px;
    font-weight: 600 !important;
    transition: opacity 0.2s;
}

.nav-cta:hover {
    opacity: 0.85;
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    /* Icono chico (14px de alto visible) pero area de toque de 40x28 */
    padding: 7px 11px;
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
}

.nav-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

/* HERO */
.hero-wrapper {
    position: relative;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse 50% 60% at 78% 50%, transparent 65%);
    pointer-events: none;
}

#hero {
    /* Con align-content: start el sobrante va abajo; se acota para que no
       quede tanto vacio al pie (el padding-bottom no alcanza: el min-height
       manda porque el contenido es mas bajo) */
    min-height: min(80vh, 720px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* align-items: start alinea el titulo con el top de la foto.
       align-content: start evita que la fila se centre en el 100vh, que era
       lo que empujaba todo el bloque hacia abajo (143px de hueco bajo el nav) */
    align-items: start;
    align-content: start;
    padding: 159px 40px 80px;
    max-width: 1100px;
    margin: 0 auto;
    gap: 60px;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: 'Jost', sans-serif;
    font-size: clamp(2.2rem, 3.2vw, 3.4rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.accent {
    color: var(--blue);
}

.hero-subtitle {
    color: var(--text-soft);
    font-size: 1.05rem;
    max-width: 460px;
    margin-bottom: 40px;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--blue);
    color: #fff;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 30px rgba(0, 71, 255, 0.3);
}

.btn-primary svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 50px rgba(0, 71, 255, 0.5);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.btn-ghost:hover {
    color: var(--text);
}

.btn-ghost::after {
    content: ' ↓';
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    /* Sube la foto 20px para equilibrarla visualmente con el bloque de texto */
    margin-top: -20px;
    /* El glow va en el contenedor y no en la img: si va en la img, el
       mask-image lo recorta al borde (mask-clip: border-box) y aparece un
       rectangulo duro. Aca el glow sigue la silueta ya difuminada. */
    filter: drop-shadow(0 0 80px rgba(0, 71, 255, 0.6));
}

.hero-image img {
    width: 100%;
    /* height:auto mantiene la proporcion original (887x1305) intacta;
       290px deja la foto a la altura del bloque de texto de al lado */
    max-width: 290px;
    height: auto;
    border-radius: 24px 24px 0 0;
    /* Disuelve el corte recto de abajo hacia el fondo (26% inferior) */
    -webkit-mask-image: linear-gradient(to bottom, #000 74%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 74%, transparent 100%);
}

/* STATS */
.stats-bar {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg2);
    padding: 40px;
}

.stats-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
}

.stat-item {
    padding: 0 20px;
}

.stat-item+.stat-item {
    border-left: 1px solid var(--border);
}

.stat-num {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--blue);
    display: block;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--muted);
    font-size: 0.85rem;
}

/* SECTIONS */
section {
    position: relative;
    z-index: 1;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 16px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

/* EL PROBLEMA */
#el-problema {
    padding: 72px 0;
    /* Mismo fondo alterno que usa "Sobre mi", para separar visualmente
       esta seccion del hero y de los servicios */
    background: var(--bg2);
}

#el-problema .container {
    max-width: 820px;
    text-align: center;
}

#el-problema .section-title {
    margin-bottom: 24px;
}

.problem-body {
    color: var(--text-soft);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* EL METODO (timeline) */
#metodo {
    padding: 72px 0;
    /* --bg para alternar con el --bg2 de #el-problema */
    background: var(--bg);
}

.metodo-header {
    max-width: 760px;
    margin: 0 auto 56px;
    text-align: center;
}

.metodo-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.metodo-step {
    position: relative;
    text-align: center;
}

/* Linea conectora: va del centro de un paso al centro del siguiente
   (100% de la columna + el gap). El ultimo paso no la lleva. */
.metodo-step::before {
    content: '';
    position: absolute;
    top: 27px;
    left: 50%;
    width: calc(100% + 32px);
    height: 1px;
    background: linear-gradient(to right, rgba(0, 71, 255, 0.55), rgba(0, 71, 255, 0.12));
}

.metodo-step:last-child::before {
    display: none;
}

.metodo-num {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--blue);
    background: rgba(0, 71, 255, 0.1);
    border: 1px solid rgba(0, 71, 255, 0.3);
    border-radius: 14px;
    /* por encima de la linea, asi la tapa y se ve conectada al badge */
    position: relative;
    z-index: 1;
}

.metodo-step-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.metodo-step-desc {
    color: var(--text-soft);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* OFERTA */
#ofrezco {
    padding: 72px 0;
}

.offer-header {
    max-width: 760px;
    margin: 0 auto 40px;
    text-align: center;
}

.offer-sub {
    color: var(--text-soft);
    font-size: 1rem;
    line-height: 1.75;
}

.offer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.offer-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s;
}

.offer-card:hover {
    border-color: rgba(0, 71, 255, 0.3);
    transform: translateY(-4px);
}

.offer-visual {
    background: linear-gradient(135deg, rgba(0, 71, 255, 0.1), rgba(0, 71, 255, 0.03));
    border-bottom: 1px solid var(--border);
    padding: 24px;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offer-visual img {
    display: block;
    width: 100%;
    max-width: 360px;
    height: auto;
    filter: drop-shadow(0 0 40px rgba(0, 71, 255, 0.35));
}

.offer-visual img.offer-img-md {
    max-width: 405px;
}

.offer-visual img.offer-img-lg {
    max-width: 391px;
}

.offer-visual.offer-visual-pwa {
    padding-top: 8px;
    padding-bottom: 9px;
}

.offer-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 28px 30px 30px;
}

.offer-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.offer-hook {
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 14px;
}

.offer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 26px;
}

.offer-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.6;
}

.offer-list li::before {
    content: '→';
    color: var(--blue);
    flex-shrink: 0;
}

.offer-cta {
    margin-top: auto;
}

.offer-cta .btn-primary {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 13px 22px;
    font-size: 0.9rem;
}

/* ABOUT */
#sobre-mi {
    padding: 72px 0;
    background: var(--bg2);
}

/* Contenedor mas ancho solo en esta seccion: el texto pasa de 580 a 720px
   y se reduce el vacio de la derecha (no afecta mobile, donde el viewport
   ya es menor que el max-width) */
#sobre-mi .container {
    max-width: 1240px;
}

.about-grid {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 80px;
    align-items: center;
}

.about-image-wrap {
    position: relative;
    /* Igual que en el hero: el glow va aca para que el mask no lo recorte */
    filter: drop-shadow(0 0 60px rgba(0, 71, 255, 0.5));
}

.about-image-wrap img {
    width: 100%;
    border-radius: 20px;
    /* Disuelve el corte recto de abajo hacia el fondo (25% inferior) */
    -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
}

.about-image-wrap::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 21px;
    border: none;
    pointer-events: none;
}

.about-glow {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 50px;
    background: var(--blue);
    filter: blur(55px);
    opacity: 0.2;
    border-radius: 50%;
    animation: pulse-glow 4s ease-in-out infinite;
}

.about-body {
    color: var(--text-soft);
    font-size: 0.98rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

.about-highlight {
    color: var(--text);
    font-weight: 500;
}

.about-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.chip {
    background: rgba(0, 71, 255, 0.07);
    border: 1px solid rgba(0, 71, 255, 0.2);
    border-radius: 8px;
    padding: 5px 13px;
    font-size: 0.8rem;
    color: var(--blue);
    font-weight: 500;
}

/* FAQ */
#faq {
    padding: 72px 0;
}

.faq-inner {
    max-width: 720px;
    margin: 0 auto;
}

.faq-header {
    margin-bottom: 48px;
    text-align: center;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item.open {
    border-color: rgba(0, 71, 255, 0.3);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.98rem;
    font-weight: 500;
    padding: 20px 24px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.faq-icon {
    width: 20px;
    height: 20px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
    color: var(--blue);
    transition: transform 0.3s;
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

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

.faq-answer-inner {
    padding: 0 24px 20px;
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.75;
}

/* FOOTER */
footer {
    padding: 72px 40px 40px;
    text-align: center;
    /* Sin border-top: el glow integra el footer con el fondo en vez de
       que se lea como una franja aparte */
    position: relative;
    /* Imprescindible: el resplandor es mas ancho que el viewport en mobile
       y sin esto expandiria la pagina a lo ancho */
    overflow: hidden;
}

/* Resplandor azul que sube desde el borde inferior de la pantalla
   (hereda el efecto que antes vivia en .glow-bg de la seccion CTA) */
footer::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -150px;
    transform: translateX(-50%);
    width: 1000px;
    height: 400px;
    background: radial-gradient(ellipse at center, rgba(0, 71, 255, 0.32), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* El contenido queda por encima del resplandor */
footer>* {
    position: relative;
    z-index: 1;
}

.footer-social {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    margin-bottom: 28px;
}

.footer-social img {
    display: block;
    width: 22px;
    height: 22px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 71, 255, 0.55));
    transition: filter 0.2s, transform 0.2s;
}

.footer-social a:hover img {
    filter: drop-shadow(0 0 16px rgba(0, 71, 255, 0.85));
    transform: translateY(-2px);
}

footer p {
    color: var(--text-soft);
    font-size: 0.82rem;
    margin-bottom: 14px;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
}

.footer-links a {
    color: var(--text-soft);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--blue);
}

.footer-dot {
    color: var(--text-soft);
}

/* LEGAL PAGES */
#legal {
    padding: 160px 0 90px;
}

.legal-inner {
    max-width: 760px;
}

.legal-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.legal-meta {
    color: var(--muted);
    font-size: 0.85rem;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.legal-body h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin: 40px 0 14px;
}

.legal-body h2:first-child {
    margin-top: 0;
}

.legal-body h3 {
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--blue);
    margin: 22px 0 10px;
}

.legal-body p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 14px;
}

.legal-body ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 0 16px;
}

.legal-body li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.legal-body li::before {
    content: '→';
    color: var(--blue);
    flex-shrink: 0;
    margin-top: 1px;
}

.legal-body strong {
    color: var(--text);
    font-weight: 600;
}

.legal-body a {
    color: var(--blue);
    text-decoration: none;
    /* Las URLs largas no se cortan solas y ensanchan el viewport en mobile */
    overflow-wrap: anywhere;
}

.legal-body a:hover {
    text-decoration: underline;
}

/* FADE UP */
.fade-up {
    opacity: 1;
    transform: translateY(0);
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

/* RESPONSIVE */
@media (max-width: 900px) {
    nav {
        padding: 14px 18px;
        justify-content: center;
        background: rgba(7, 7, 13, 0.97);
        /* backdrop-filter crea un containing block para hijos position:fixed,
           lo que rompería el overlay de pantalla completa del menú */
        backdrop-filter: none;
    }

    /* Menú mobile: capa fija a pantalla completa, oculta por defecto */
    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 4px;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: var(--bg);
        padding: 96px 24px 48px;
        z-index: 1;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-24px);
        transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
    }

    .nav-links.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-links li {
        width: 100%;
        max-width: 320px;
    }

    .nav-links a {
        display: block;
        text-align: center;
        padding: 18px 16px;
        font-size: 1.05rem;
        color: var(--text-soft);
    }

    .nav-links .nav-cta {
        margin-top: 14px;
        padding: 16px 22px;
    }

    .nav-hamburger {
        display: flex;
        z-index: 2;
    }

    /* El ícono de hamburguesa se convierte en una X mientras el menú está abierto */
    .nav-hamburger span {
        transition: transform 0.28s ease, opacity 0.2s ease;
    }

    .nav-hamburger.open span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

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

    .nav-hamburger.open span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    body.menu-open {
        overflow: hidden;
    }

    #hero {
        grid-template-columns: 1fr;
        padding: 50px 20px 50px;
        text-align: center;
    }

    .hero-subtitle {
        margin: 0 auto 32px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-image {
        justify-content: center;
        margin-top: 0;
    }

    /* En mobile la foto sigue ocupando el ancho disponible, como antes */
    .hero-image img {
        max-width: 360px;
    }

    .stats-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 0 20px;
    }

    .stat-item+.stat-item {
        border-left: none;
        border-top: 1px solid var(--border);
        padding-top: 28px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .offer-grid {
        grid-template-columns: 1fr;
    }

    #el-problema,
    #metodo,
    #ofrezco,
    #sobre-mi,
    #faq {
        padding: 60px 0;
    }

    .metodo-header {
        margin-bottom: 40px;
    }

    .metodo-timeline {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    /* badge a la izquierda, texto a la derecha */
    .metodo-step {
        display: grid;
        grid-template-columns: 56px 1fr;
        column-gap: 18px;
        align-items: start;
        text-align: left;
    }

    .metodo-num {
        margin: 0;
    }

    /* la conectora pasa a ser vertical, del badge al badge siguiente */
    .metodo-step::before {
        top: 56px;
        left: 27px;
        width: 1px;
        height: calc(100% - 28px);
        background: linear-gradient(to bottom, rgba(0, 71, 255, 0.55), rgba(0, 71, 255, 0.12));
    }

    .container {
        padding: 0 20px;
    }

    #legal {
        padding: 120px 0 60px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}