/* ==========================================================================
   Cronos Technology SPA - Landing
   ========================================================================== */

:root {
    --c-primary: #1d71b8;
    --c-primary-dark: #105893;
    --c-navy: #1b1b58;
    --c-bg: #020226;
    --c-light: #f0f5fa;
    --c-white: #ffffff;
    --c-whatsapp: #25d366;

    --font: "Work Sans", sans-serif;
    --container: 1140px;
    --section-pad-x: 0px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-light);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

img {
    height: auto;
}

a {
    color: var(--c-primary);
    text-decoration: none;
    transition: color .3s;
}

h1, h2, h3 {
    margin: 0;
}

p {
    margin: 0 0 20px;
}

p:last-child {
    margin-bottom: 0;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 10px;
    z-index: 1000;
    padding: 10px 16px;
    background: var(--c-white);
    color: var(--c-bg);
    font-weight: 600;
}

.skip-link:focus {
    top: 10px;
}

:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 3px;
}

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

.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
}

.row {
    display: flex;
    gap: var(--gap, 0px);
}

.col {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px;
}

.section {
    position: relative;
    padding: 100px var(--section-pad-x);
    overflow: hidden;
    background-color: var(--c-bg);
    isolation: isolate;
}

/* Capa decorativa de fondo (equivale al "overlay" de Elementor) */
.section::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.shadow-img {
    width: 100%;
    box-shadow: 0 20px 20px rgba(0, 0, 0, .1);
}

/* Título con degradado */
.grad-heading {
    margin: -3px 0 23px;
    color: var(--c-white);
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    background-image: linear-gradient(190deg, var(--c-white) 20%, var(--c-primary) 91%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Botones */
.btn {
    display: inline-block;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--c-white);
    cursor: pointer;
}

.btn-gradient {
    padding: 17px 40px;
    background-image: linear-gradient(191deg, var(--c-primary) 19%, var(--c-navy) 83%);
    box-shadow: 0 10px 20px rgba(0, 0, 0, .2);
    transition: background .3s;
}

.btn-gradient:hover,
.btn-gradient:focus-visible {
    color: var(--c-white);
    background-image: linear-gradient(150deg, var(--c-navy) 0%, var(--c-primary) 100%);
}

/* Header ------------------------------------------------------------------ */

.site-header {
    position: relative;
    z-index: 99;
    background: var(--c-bg);
    box-shadow: 0 5px 5px rgba(0, 0, 0, .04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1240px;
    min-height: 89px;
    margin-inline: auto;
    padding: 0 20px;
}

.site-logo img {
    width: 200px;
}

.menu-toggle {
    display: none;
    padding: 6px;
    background: none;
    border: 0;
    color: var(--c-light);
    cursor: pointer;
}

.menu-toggle svg {
    fill: currentColor;
}

.menu-toggle .icon-close {
    display: none;
}

.menu-toggle[aria-expanded="true"] .icon-menu {
    display: none;
}

.menu-toggle[aria-expanded="true"] .icon-close {
    display: block;
}

.main-nav .menu {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav a {
    position: relative;
    display: block;
    padding: 0 14px;
    color: var(--c-light);
    font-size: 14px;
    font-weight: 500;
    line-height: 80px;
    text-transform: uppercase;
}

.main-nav a::before {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transition: transform .3s ease-in-out;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.is-active {
    color: var(--c-primary);
}

.main-nav a:hover::before,
.main-nav a:focus-visible::before {
    transform: scaleX(1);
}

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

.hero {
    position: relative;
    display: flex;
    min-height: 92vh;
    padding: 150px 0;
    background: var(--c-bg);
    overflow: hidden;
}

.particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-row {
    position: relative;
    flex-wrap: wrap;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.hero-bar {
    display: block;
    width: 150px;
    height: 5px;
    border-radius: 30px;
    background-image: linear-gradient(178deg, var(--c-primary) 0%, var(--c-navy) 100%);
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-weight: inherit;
}

.hero-logo {
    width: 350px;
    margin-bottom: 20px;
}

.hero-subtitle {
    display: block;
    margin-top: -15px;
    color: var(--c-white);
    font-size: 23px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 11px;
    text-transform: uppercase;
}

.hero-text {
    color: var(--c-white);
    font-size: 18px;
}

.hero-cta {
    padding-top: 20px;
}

/* ¿Quiénes somos? --------------------------------------------------------- */

.about::before {
    background: url("../images/blur-4.png");
    opacity: .38;
}

.about-row {
    --gap: 50px;
}

.about-text {
    color: var(--c-white);
}

.about-img2 {
    height: 450px;
    margin-top: 70px;
    object-fit: cover;
}

/* Nosotros y la Minería --------------------------------------------------- */

.mining {
    background: var(--c-light) url("../images/DSC08667.jpg") center / cover no-repeat;
}

.mining::before {
    background: var(--c-bg);
    opacity: .9;
}

.mining-row {
    --gap: 40px;
    align-items: center;
}

.mining-text {
    color: var(--c-white);
}

.bleed-right {
    width: calc(100% + 21vw);
    max-width: none;
}

.software .bleed-right {
    width: calc(100% + 20vw);
}

/* Proyectos --------------------------------------------------------------- */

.projects::before {
    background: url("../images/blur-3.webp") left top / contain no-repeat;
    opacity: .3;
}

.projects-title {
    display: flex;
    align-items: flex-end;
}

.projects-title .grad-heading {
    width: 100%;
    margin-bottom: 3px;
}

.projects-head,
.projects-grid {
    --gap: 20px;
    padding: 10px;
}

.projects-intro {
    color: var(--c-light);
}

.projects-grid {
    margin-top: 60px;
    align-items: flex-start;
}

.projects-grid > .col {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.card {
    padding: 40px;
    border: 1px solid rgba(240, 245, 250, .38);
    border-radius: 10px;
    color: var(--c-light);
}

.card-icon {
    width: 20%;
    margin-bottom: 23px;
}

.card-title {
    margin-bottom: 20px;
    color: var(--c-white);
    font-size: 20px;
    font-weight: 700;
    line-height: 26px;
}

.card-text p {
    margin-bottom: 0;
}

.card-text ul {
    margin: 16px 0;
    padding-left: 20px;
    color: var(--c-white);
}

/* Soluciones en software -------------------------------------------------- */

.software {
    background: var(--c-bg) url("../images/bg_5.jpg") center / cover no-repeat;
}

.software-row {
    --gap: 70px;
    align-items: center;
}

.software-text {
    color: var(--c-light);
}

/* Contacto ---------------------------------------------------------------- */

.contact::before {
    background: url("../images/blur-3.webp") right center / contain no-repeat;
    opacity: .3;
}

.contact-info {
    padding: 50px;
    color: var(--c-light);
}

.divider {
    margin: 35px 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, .28);
}

.icon-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.icon-list li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-list li + li {
    margin-top: 6px;
}

.icon-list .icon {
    flex: none;
    width: 18px;
    height: 18px;
    fill: var(--c-white);
}

.icon-list a {
    color: var(--c-light);
    font-size: 16px;
}

.icon-list a:hover,
.icon-list a:focus-visible {
    color: rgba(255, 255, 255, .62);
}

.contact-card {
    position: relative;
    padding: 50px;
    border-radius: 8px;
    background-image: linear-gradient(225deg, var(--c-primary) 0%, var(--c-bg) 100%);
    isolation: isolate;
    overflow: hidden;
}

.contact-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url("../images/footer-ov.png") center / cover no-repeat;
    opacity: .18;
}

.contact-card-title {
    margin: -3px 0 37px;
    color: var(--c-white);
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
}

/* Formulario */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 20px;
}

.field-full {
    grid-column: 1 / -1;
}

.contact-form {
    margin-bottom: 24px;
}

.contact-form input,
.contact-form textarea {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0 14px;
    background: transparent;
    border: 1px solid var(--c-white);
    border-radius: 3px;
    color: var(--c-white);
    font-family: var(--font);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    transition: border-color .2s, box-shadow .2s;
}

.contact-form input {
    height: 45px;
}

.contact-form textarea {
    height: 120px;
    padding-block: 10px;
    resize: vertical;
}

.contact-form ::placeholder {
    color: var(--c-white);
    opacity: .5;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--c-white);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
}

.contact-form .is-invalid {
    border-color: #ff8a80;
    box-shadow: 0 0 0 1px #ff8a80;
}

.field-error {
    display: block;
    margin-top: 6px;
    color: #ffcdd2;
    font-size: 14px;
    line-height: 1.3;
}

.field-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.btn-submit {
    width: 150px;
    height: 41px;
    margin-top: 25px;
    padding: 0 15px;
    border: 0;
    border-radius: 3px;
    background: #066aab;
    color: var(--c-white);
    font-family: var(--font);
    font-size: 17px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color .3s, color .3s;
}

.btn-submit:hover,
.btn-submit:focus-visible {
    background: var(--c-bg);
    color: var(--c-white);
}

.btn-submit:disabled {
    opacity: .7;
    cursor: wait;
}

.form-status {
    margin: 20px 0 0;
    font-size: 16px;
}

.form-status:empty {
    display: none;
}

.form-status.is-success {
    padding: 15px;
    border: 1px solid #b4d39b;
    border-radius: 3px;
    background: #e0ffc7;
    color: #2f4b1e;
}

.form-status.is-error {
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 3px;
    background: #f8d7da;
    color: #721c24;
}

/* Galería ----------------------------------------------------------------- */

.gallery {
    overflow: hidden;
}

.gallery-track {
    display: flex;
    width: max-content;
}

.js .gallery-track {
    animation: gallery-scroll 45s linear infinite;
}

.gallery:hover .gallery-track {
    animation-play-state: paused;
}

.gallery img {
    flex: none;
    width: 25vw;
    height: 300px;
    object-fit: cover;
}

@keyframes gallery-scroll {
    to {
        transform: translateX(-50%);
    }
}

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

.site-footer {
    position: relative;
    padding: 70px 0 50px;
    background: var(--c-bg);
    isolation: isolate;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url("../images/footer-ov.png") center / cover no-repeat;
    opacity: .2;
}

.footer-row {
    --gap: 20px;
    padding: 10px;
}

.footer-logo {
    width: 200px;
}

.footer-title {
    margin-bottom: 20px;
    color: var(--c-white);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.footer-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-menu a {
    display: block;
    padding: 8px 0;
    color: var(--c-light);
    font-size: 14px;
    line-height: 1;
    text-transform: uppercase;
}

.footer-menu a:hover,
.footer-menu a:focus-visible,
.footer-menu a.is-active {
    color: var(--c-primary);
}

.icon-list-sm .icon {
    width: 15px;
    height: 15px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-top: 20px;
    border-radius: 50%;
    background: var(--c-primary);
    transition: transform .3s;
}

.social-icon svg {
    width: 15px;
    height: 15px;
    fill: var(--c-white);
}

.social-icon:hover,
.social-icon:focus-visible {
    transform: translateY(-8px);
}

.footer-divider {
    margin: 45px 10px 35px;
    border: 0;
    border-top: 1px solid rgba(29, 113, 184, .5);
}

.copyright {
    padding: 0 10px;
    color: var(--c-light);
    font-size: 15px;
    text-align: center;
    text-transform: uppercase;
}

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

.whatsapp-float {
    position: fixed;
    left: 15px;
    bottom: 15px;
    z-index: 999;
    width: 50px;
    height: 50px;
    transition: transform .2s;
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible {
    transform: scale(1.06);
}

.scroll-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 99;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 3px;
    background: var(--c-primary);
    color: var(--c-white);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s, background-color .3s;
}

.scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--c-primary-dark);
}

.scroll-top svg {
    fill: currentColor;
    transform: rotate(180deg);
}

/* Animaciones ------------------------------------------------------------- */

.js [data-animate] {
    opacity: 0;
}

.js [data-animate].is-visible {
    animation: 1.25s var(--delay, 0ms) both;
}

.js [data-animate="fade-down"].is-visible {
    animation-name: fade-in-down;
}

.js [data-animate="fade-up"].is-visible {
    animation-name: fade-in-up;
}

@keyframes fade-in-down {
    from {
        opacity: 0;
        transform: translate3d(0, -100%, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translate3d(0, 100%, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.float-logo {
    animation: float-logo 1s ease-in-out infinite alternate;
}

.float-btn {
    animation: float-btn 1s ease-in-out infinite alternate;
}

@keyframes float-logo {
    from {
        transform: translate(-14px, -4px);
    }
    to {
        transform: translate(11px, 13px);
    }
}

@keyframes float-btn {
    from {
        transform: perspective(600px) translateY(-8px) rotateX(0deg) rotateY(0deg);
    }
    to {
        transform: perspective(600px) translateY(10px) rotateX(15deg) rotateY(13deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .float-logo,
    .float-btn,
    .gallery-track {
        animation: none;
    }

    .js [data-animate],
    .js [data-animate].is-visible {
        opacity: 1;
        animation: none;
    }

    .gallery {
        overflow-x: auto;
    }
}

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

@media (min-width: 1025px) {
    .mining {
        background-attachment: fixed;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --section-pad-x: 20px;
    }

    .hero {
        min-height: 80vh;
        padding: 100px 20px;
    }

    .hero-row > .col:first-child {
        flex: 0 0 70%;
    }

    .hero-logo {
        width: 300px;
    }

    .hero-subtitle {
        font-size: 18px;
        letter-spacing: 9.8px;
    }

    .hero-text {
        font-size: 16px;
    }

    .section {
        padding-block: 70px;
    }

    .mining {
        padding-block: 80px;
    }

    .grad-heading,
    .contact-card-title {
        font-size: 30px;
    }

    .about-row {
        --gap: 20px;
    }

    .about-img2 {
        height: 300px;
        margin-top: 30px;
    }

    .bleed-right,
    .software .bleed-right {
        width: calc(100% + 10vw);
    }

    .projects-head > .projects-title {
        flex: 0 0 40%;
    }

    .projects-grid {
        flex-direction: column;
        margin-top: 20px;
    }

    .projects-grid > .col:last-child {
        margin-bottom: 30px;
    }

    .card-icon {
        width: 15%;
    }

    .software-row {
        --gap: 40px;
        align-items: center;
    }

    .contact-info,
    .contact-card {
        padding: 30px;
    }

    .site-footer {
        padding: 60px 20px 40px;
    }

    .footer-row > .col:nth-child(1),
    .footer-row > .col:nth-child(2) {
        flex: 0 0 31%;
    }

    .footer-logo {
        width: 180px;
    }
}

/* Bajo 922px Astra reduce la fuente base y cambia a menú lateral */
@media (max-width: 921px) {
    html {
        font-size: 91.2%;
    }

    .header-inner {
        min-height: 86px;
    }

    .menu-toggle {
        position: relative;
        z-index: 1002;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        border: 1px solid transparent;
        border-radius: 2px;
    }

    .menu-toggle[aria-expanded="true"] {
        border-color: rgba(240, 245, 250, .25);
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 1001;
        width: 90%;
        padding: 64px 0 20px;
        background: var(--c-bg);
        overflow-y: auto;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .3s ease, visibility .3s;
    }

    .main-nav.is-open {
        transform: none;
        visibility: visible;
    }

    .main-nav .menu {
        flex-direction: column;
    }

    .main-nav a {
        padding: 0 20px;
        font-size: 1rem;
        line-height: 3em;
    }

    .main-nav a::before {
        display: none;
    }

    .main-nav a.is-active {
        background: var(--c-primary);
        color: var(--c-white);
    }

    .nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: rgba(0, 0, 0, .4);
    }

    .nav-open {
        overflow: hidden;
    }
}

.nav-backdrop[hidden] {
    display: none;
}

/* Móvil */
@media (max-width: 767px) {
    :root {
        --section-pad-x: 10px;
    }

    .header-inner {
        min-height: 80px;
    }

    .site-logo img {
        width: 150px;
    }

    .row {
        flex-direction: column;
        align-items: stretch;
    }

    .row > .col,
    .projects-head > .projects-title,
    .footer-row > .col:nth-child(1),
    .footer-row > .col:nth-child(2) {
        flex: 0 0 auto;
    }

    /* Igual que Elementor: las columnas del hero se apilan con wrap */
    .hero-row {
        flex-direction: row;
        align-items: center;
    }

    .hero-row > .col,
    .hero-row > .col:first-child {
        flex: 0 0 100%;
    }

    .hero {
        padding: 70px 10px;
    }

    .hero-logo {
        width: 240px;
    }

    .hero-subtitle {
        font-size: 15px;
        letter-spacing: 8.2px;
    }

    .section,
    .mining {
        padding-block: 50px;
    }

    .grad-heading,
    .contact-card-title {
        font-size: 26px;
    }

    .about-row {
        flex-direction: column-reverse;
        --gap: 10px;
    }

    .about-img2 {
        display: none;
    }

    .about-text p:last-of-type {
        margin-bottom: 0;
    }

    .bleed-right,
    .software .bleed-right {
        width: calc(100% + 5vw);
    }

    .mining-row,
    .software-row {
        --gap: 20px;
    }

    .projects-head > .col,
    .projects-grid > .col {
        padding: 0;
    }

    .projects-title .grad-heading {
        margin-bottom: 20px;
    }

    .projects-intro {
        margin-top: -30px;
    }

    .projects-grid > .col {
        gap: 20px;
    }

    .projects-grid > .col:last-child {
        margin-bottom: 0;
    }

    .contact {
        padding-inline: 15px;
    }

    .card {
        padding: 20px;
    }

    .card-title {
        margin-bottom: 5px;
    }

    .contact-info {
        padding: 10px 10px 30px;
    }

    .contact-card {
        padding: 30px 20px;
    }

    .contact-card-title {
        margin-bottom: 43px;
    }

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

    .gallery img {
        width: 50vw;
    }

    .site-footer {
        padding: 50px 10px 40px;
    }

    .footer-row {
        gap: 20px;
    }

    .whatsapp-float {
        left: 10px;
        bottom: 10px;
    }

    .scroll-top {
        right: 15px;
        bottom: 15px;
    }
}

@media (max-width: 600px) {
    .gallery img {
        height: 200px;
    }
}
