/* ===================================
   SCRATLOOP DIGITAL
   BASE STYLES
   NUEVA IDENTIDAD SCRATTY
   SISTEMA RESPONSIVE FLUIDO
=================================== */


/* =====================================================
   RESET
===================================================== */

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


html {
    scroll-behavior: smooth;
}


body {
    width: 100%;
    min-width: 0;

    font-family: var(--font-main);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;

    overflow-x: hidden;
}


/* =====================================================
   ELEMENTOS GLOBALES
===================================================== */

img,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}


button,
input,
textarea,
select {
    font: inherit;
}


button {
    cursor: pointer;
}


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


ul,
ol {
    list-style: none;
}


p,
h1,
h2,
h3,
h4,
h5,
h6 {
    max-width: 100%;
    overflow-wrap: break-word;
}


p {
    color: var(--text-muted);
}


/* =====================================================
   TIPOGRAFÍA
===================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text);
    font-weight: 700;
    line-height: 1.2;
}


h1 {
    font-size: clamp(
        2.8rem,
        5vw,
        5rem
    );
}


h2 {
    font-size: clamp(
        2rem,
        3.5vw,
        3rem
    );
}


h3 {
    font-size: 1.4rem;
}


/* =====================================================
   CONTENEDOR GLOBAL
===================================================== */

.container {
    width: min(
        calc(100% - (var(--container-padding) * 2)),
        var(--container)
    );

    margin-inline: auto;

    min-width: 0;
}


/* =====================================================
   SECCIONES
===================================================== */

section {
    width: 100%;
    min-width: 0;

    padding-block: var(--section-padding);
}


/* =====================================================
   BOTÓN PRINCIPAL
===================================================== */

.button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    max-width: 100%;

    padding: 15px 32px;

    border: 1px solid transparent;
    border-radius: var(--radius-md);

    background: var(--gradient);
    color: #ffffff;

    font-weight: 700;
    text-align: center;

    box-shadow: var(--shadow-md);

    transition:
        transform .3s ease,
        box-shadow .3s ease,
        opacity .3s ease;
}


.button:hover {
    transform: translateY(-4px);

    box-shadow:
        0 15px 35px rgba(0, 200, 255, .20),
        0 0 30px rgba(139, 61, 255, .12);
}


.button:active {
    transform: translateY(-1px);
}


/* =====================================================
   BOTÓN SECUNDARIO
===================================================== */

.secondary {
    background: rgba(255, 255, 255, .06);

    color: var(--text);

    border-color:
        rgba(255, 255, 255, .12);

    box-shadow: none;
}


.secondary:hover {
    background:
        rgba(255, 255, 255, .10);

    border-color:
        rgba(0, 200, 255, .35);

    box-shadow:
        0 0 25px rgba(0, 200, 255, .10);
}


/* =====================================================
   CARDS
===================================================== */

.card {
    position: relative;

    min-width: 0;

    padding: clamp(
        24px,
        2.2vw,
        35px
    );

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, .055),
            rgba(255, 255, 255, .018)
        );

    border:
        1px solid rgba(255, 255, 255, .08);

    border-radius:
        var(--radius-lg);

    transition:
        transform .3s ease,
        border-color .3s ease,
        box-shadow .3s ease;
}


.card::before {
    content: "";

    position: absolute;

    top: -100px;
    right: -100px;

    width: 220px;
    height: 220px;

    background:
        radial-gradient(
            circle,
            rgba(0, 200, 255, .12),
            transparent 70%
        );

    pointer-events: none;
}


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

    border-color:
        rgba(0, 200, 255, .35);

    box-shadow:
        var(--shadow-lg),
        0 0 30px rgba(0, 200, 255, .08);
}


/* =====================================================
   TEXTO GRADIENTE
===================================================== */

.text-gradient {
    background: var(--gradient);

    -webkit-background-clip: text;
    background-clip: text;

    -webkit-text-fill-color: transparent;
    color: transparent;
}


/* =====================================================
   GLOW
===================================================== */

.glow {
    position: relative;
}


.glow::before {
    content: "";

    position: absolute;

    width: 280px;
    height: 280px;

    background:
        radial-gradient(
            circle,
            rgba(0, 200, 255, .20),
            transparent 70%
        );

    filter: blur(30px);

    z-index: -1;

    pointer-events: none;
}


/* =====================================================
   DIVISOR
===================================================== */

.gradient-line {
    width: 80px;
    height: 4px;

    margin: 25px auto;

    border-radius: 20px;

    background: var(--gradient);
}


/* =====================================================
   ACCESIBILIDAD / FOCUS
===================================================== */

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}


/* =====================================================
   SELECCIÓN DE TEXTO
===================================================== */

::selection {
    background:
        rgba(0, 200, 255, .30);

    color: #ffffff;
}


/* =====================================================
   SCROLLBAR
===================================================== */

::-webkit-scrollbar {
    width: 8px;
}


::-webkit-scrollbar-track {
    background: var(--bg);
}


::-webkit-scrollbar-thumb {
    background:
        linear-gradient(
            180deg,
            var(--primary),
            var(--accent)
        );

    border-radius: 20px;
}


::-webkit-scrollbar-thumb:hover {
    background:
        linear-gradient(
            180deg,
            #22d3ee,
            #a855f7
        );
}


/* =====================================================
   UTILIDADES
===================================================== */

.hidden {
    display: none !important;
}


.text-center {
    text-align: center;
}


/* =====================================================
   RESPONSIVE FLUIDO
===================================================== */

/*
    No se crean breakpoints para resoluciones específicas.

    El tamaño se adapta mediante clamp() y el resto
    de los archivos controla el layout de cada componente.
*/

@media (max-width: 768px) {

    section {
        padding-block:
            var(--section-padding-mobile);
    }


    h1 {
        font-size:
            clamp(
                2.4rem,
                10vw,
                3.5rem
            );
    }


    h2 {
        font-size:
            clamp(
                1.8rem,
                7vw,
                2rem
            );
    }


    .button {
        padding:
            14px 26px;
    }

}


/* =====================================================
   REDUCIR MOVIMIENTO
===================================================== */

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

    html {
        scroll-behavior: auto;
    }


    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

}