
/* =========================================
   WORKLINK | SISTEMA DE DISEÑO
   ========================================= */

:root {
    --primary: #f47721;
    --primary-dark: #d95d0b;
    --primary-light: #fff0e5;

    --dark: #20242c;
    --text: #555d68;
    --muted: #89919c;

    --white: #ffffff;
    --background: #faf9f7;
    --surface: #ffffff;
    --border: #e9e7e3;

    --success: #21865b;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --shadow-sm: 0 4px 16px rgba(32, 36, 44, 0.05);
    --shadow-md: 0 12px 32px rgba(32, 36, 44, 0.09);

    --container: 1180px;
}

/* 1. REINICIO Y BASE */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--dark);
    background: var(--white);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

button,
input,
select {
    font: inherit;
}

button,
a,
input,
select {
    -webkit-tap-highlight-color: transparent;
}

button,
a {
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

button {
    cursor: pointer;
}

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

section {
    scroll-margin-top: 100px;
}

::selection {
    background: var(--primary-light);
    color: var(--primary-dark);
}

:focus-visible {
    outline: 3px solid rgba(244, 119, 33, 0.4);
    outline-offset: 3px;
}

/* 2. ENCABEZADO */

header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    min-height: 82px;
    padding: 16px max(5%, calc((100% - var(--container)) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
}

header > a:first-child {
    flex-shrink: 0;
    font-size: 29px;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1;
}

header > a:first-child span:first-child {
    color: var(--dark);
}

header > a:first-child span:last-child {
    color: var(--primary);
}

nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

nav a {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

nav a:hover {
    color: var(--primary);
}

header > div {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

header > div a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 17px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
}

header > div a:first-child {
    color: var(--dark);
}

header > div a:first-child:hover {
    background: var(--background);
}

header > div a:last-child {
    color: var(--white);
    background: var(--primary);
}

header > div a:last-child:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* 3. BOTONES Y CAMPOS */

button {
    min-height: 48px;
    padding: 12px 22px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
}

button:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

form label {
    display: block;
    margin-bottom: 7px;
    color: var(--dark);
    font-size: 13px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 12px 14px;
    color: var(--dark);
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
}

input::placeholder {
    color: #a0a5ad;
}

input:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(244, 119, 33, 0.12);
}

/* 4. PORTADA PRINCIPAL */

#inicio {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 65px;
    min-height: 580px;
    padding: 90px max(5%, calc((100% - var(--container)) / 2));
    background:
        radial-gradient(
            circle at 90% 15%,
            rgba(244, 119, 33, 0.12),
            transparent 35%
        ),
        linear-gradient(135deg, #fffaf5, #ffffff 65%);
}

#inicio > div:first-child {
    max-width: 650px;
}

#inicio > div:first-child > p:first-child,
#servicios > p:first-child,
#como-funciona > p:first-child {
    margin-bottom: 17px;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
}

#titulo-principal {
    max-width: 680px;
    margin-bottom: 22px;
    font-size: clamp(36px, 4.1vw, 58px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -2px;
}

#inicio > div:first-child > p:nth-of-type(2) {
    max-width: 560px;
    margin-bottom: 30px;
    color: var(--text);
    font-size: 17px;
    line-height: 1.8;
}

#inicio form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    max-width: 650px;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

#inicio form label {
    margin-bottom: -5px;
}

#inicio form button {
    grid-column: 1 / -1;
    margin-top: 5px;
}

#inicio > div:first-child > p:last-child {
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
}

#inicio > div:last-child {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 330px;
    padding: 30px;
    border: 1px dashed rgba(244, 119, 33, 0.45);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(
            circle at center,
            rgba(244, 119, 33, 0.13),
            rgba(244, 119, 33, 0.025) 70%
        );
    color: var(--primary-dark);
    text-align: center;
    font-size: 14px;
    font-weight: 700;
}

/* 5. CATEGORÍAS DE SERVICIOS */

#servicios {
    padding: 100px max(5%, calc((100% - var(--container)) / 2));
    background: var(--white);
}

#titulo-servicios,
#titulo-funcionamiento {
    margin-bottom: 15px;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.2;
    letter-spacing: -1.2px;
}

#servicios > p:nth-of-type(2) {
    max-width: 620px;
    margin-bottom: 38px;
    color: var(--text);
}

#servicios > div {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

#servicios article {
    min-height: 220px;
    padding: 26px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

#servicios article:hover {
    transform: translateY(-5px);
    border-color: rgba(244, 119, 33, 0.45);
    box-shadow: var(--shadow-md);
}

#servicios article h3 {
    margin-bottom: 12px;
    font-size: 19px;
    line-height: 1.4;
}

#servicios article p {
    min-height: 75px;
    margin-bottom: 18px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.7;
}

#servicios article a {
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
}

#servicios article a:hover {
    text-decoration: underline;
}

/* 6. CÓMO FUNCIONA */

#como-funciona {
    padding: 95px max(5%, calc((100% - var(--container)) / 2));
    background: var(--background);
}

#como-funciona > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 38px;
}

#como-funciona article {
    padding: 30px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

#como-funciona article h3 {
    margin-bottom: 12px;
    font-size: 21px;
}

#como-funciona article p {
    color: var(--text);
    font-size: 15px;
}

/* 7. INVITACIÓN PARA PROFESIONALES */

main > section[aria-labelledby="titulo-profesionales"] {
    margin: 80px auto;
    width: min(90%, var(--container));
    padding: 55px;
    border-radius: var(--radius-lg);
    background: var(--dark);
    color: var(--white);
}

#titulo-profesionales {
    max-width: 650px;
    margin-bottom: 15px;
    font-size: clamp(27px, 3vw, 38px);
    line-height: 1.25;
}

main > section[aria-labelledby="titulo-profesionales"] p {
    max-width: 650px;
    margin-bottom: 25px;
    color: #d5d8dd;
}

main > section[aria-labelledby="titulo-profesionales"] a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
}

main > section[aria-labelledby="titulo-profesionales"] a:hover {
    background: var(--primary-dark);
}

/* 8. FORMULARIOS DE ACCESO Y REGISTRO */

#iniciar-sesion,
#registro {
    width: min(92%, 520px);
    margin: 75px auto;
    padding: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

#titulo-login,
#titulo-registro {
    margin-bottom: 25px;
    font-size: 29px;
    line-height: 1.3;
    letter-spacing: -0.7px;
}

#form-login,
#form-registro {
    display: grid;
    gap: 10px;
}

#form-login input,
#form-registro input,
#form-registro select {
    margin-bottom: 10px;
}

#form-login button,
#form-registro button {
    width: 100%;
    margin-top: 8px;
}

/* 9. PIE DE PÁGINA */

footer {
    padding: 36px 5%;
    background: #f5f4f1;
    border-top: 1px solid var(--border);
    text-align: center;
}

footer > a {
    color: var(--primary-dark);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
}

footer p {
    margin-top: 7px;
    color: var(--text);
    font-size: 13px;
}

/* 10. TABLET */

@media (max-width: 1000px) {
    header {
        gap: 18px;
    }

    nav {
        gap: 17px;
    }

    header > div {
        gap: 5px;
    }

    header > div a {
        padding: 9px 12px;
    }

    #inicio {
        grid-template-columns: 1fr 0.7fr;
        gap: 30px;
        padding-top: 70px;
        padding-bottom: 70px;
    }

    #inicio > div:last-child {
        min-height: 260px;
    }

    #servicios > div {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 11. MÓVILES */

@media (max-width: 700px) {
    html {
        scroll-padding-top: 140px;
    }

    header {
        position: relative;
        min-height: auto;
        padding: 20px 5%;
        flex-wrap: wrap;
        gap: 18px;
    }

    header > a:first-child {
        font-size: 27px;
    }

    nav {
        order: 3;
        width: 100%;
        justify-content: space-between;
        gap: 10px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }

    nav a {
        font-size: 12px;
    }

    header > div {
        margin-left: auto;
    }

    header > div a {
        min-height: 40px;
        padding: 8px 11px;
        font-size: 12px;
    }

    #inicio {
        grid-template-columns: 1fr;
        gap: 35px;
        min-height: auto;
        padding: 65px 5%;
    }

    #titulo-principal {
        font-size: clamp(35px, 9vw, 48px);
        letter-spacing: -1.5px;
    }

    #inicio > div:first-child > p:nth-of-type(2) {
        font-size: 15px;
    }

    #inicio form {
        grid-template-columns: 1fr;
        padding: 17px;
    }

    #inicio form button {
        grid-column: auto;
    }

    #inicio > div:last-child {
        min-height: 180px;
    }

    #servicios,
    #como-funciona {
        padding: 65px 5%;
    }

    #servicios > div {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    #servicios article {
        min-height: auto;
        padding: 24px;
    }

    #servicios article p {
        min-height: auto;
    }

    #como-funciona > div {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    #como-funciona article {
        padding: 25px;
    }

    main > section[aria-labelledby="titulo-profesionales"] {
        margin: 55px auto;
        padding: 32px 24px;
    }

    #iniciar-sesion,
    #registro {
        margin: 50px auto;
        padding: 27px 22px;
    }

    #titulo-login,
    #titulo-registro {
        font-size: 25px;
    }

    footer {
        padding: 30px 5%;
    }
}

/* 12. PANTALLAS MUY PEQUEÑAS */

@media (max-width: 380px) {
    header > div a {
        padding: 8px;
        font-size: 11px;
    }

    nav a {
        font-size: 11px;
    }

    #titulo-principal {
        font-size: 33px;
    }

    #iniciar-sesion,
    #registro {
        padding: 24px 17px;
    }
}

/* 13. RESPETO POR MOVIMIENTO REDUCIDO */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
