:root {

    --bg-dark: #050a0f;
    --bg-card: #0a141d;


    --cyber-cyan: #1cd2ba;
    --cyber-magenta: #ff006c;
    --cyber-purple: #8a2be2;


    --text-main: #f8fafc;
    --text-dim: #e2e8f0;
}

html {
    background-color: var(--bg-dark);
}

body {
    position: relative;
    z-index: 0;
    min-height: 100vh;
    background-color: transparent;
    color: var(--text-main);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(5, 10, 15, 0.3), rgba(5, 10, 15, 0.48)),
        url("../images/fondoweb.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Keep the page background continuous across all structural sections. */
.border-white\/5 {
    border-color: transparent !important;
}

footer {
    background-color: #000;
}

footer p {
    font-size: clamp(0.95rem, 1.2vw, 1.125rem) !important;
    line-height: 1.6;
}

/* Editorial footer with a lightweight, code-native glitch wordmark. */
.site-footer {
    position: relative;
    overflow: hidden;
    padding: clamp(1rem, 2.5vw, 2rem) 1.5rem 1.5rem;
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 80rem;
    margin: 0 auto;
    box-sizing: border-box;
    text-align: center;
}

.footer-mark {
    position: relative;
    display: inline-block;
    width: clamp(13.5rem, 28.5vw, 22.5rem);
    overflow: hidden;
    text-decoration: none;
}

.footer-mark__animation {
    display: block;
    width: 100%;
    height: auto;
    margin-top: -14%;
    transform: translateX(-0.625rem);
    border-radius: 2px;
}

.footer-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-self: center;
    width: min(100%, 32rem);
    margin-top: clamp(2rem, 3.5vw, 3rem);
}

.footer-nav a {
    color: #f8fafc;
    font-size: clamp(1rem, 1.35vw, 1.125rem);
    font-weight: 400;
    padding: 0 0.5rem;
    text-align: center;
    text-decoration: none;
    transition: color 180ms ease;
}

.header-nav-links {
    font-size: clamp(1rem, 1.35vw, 1.125rem);
}

.header-nav-links .btn-cyber {
    font-size: inherit;
}

.footer-nav a:hover { color: #1cd2ba; }

.contact-intro__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.contact-channel {
    display: inline-flex;
    align-items: center;
    min-height: 3rem;
    padding: 0.75rem 1.25rem;
    color: #050a0f;
    background: #1cd2ba;
    border: 1px solid #1cd2ba;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.contact-channel[href]:hover,
.contact-channel[href]:focus-visible {
    background: transparent;
    color: #1cd2ba;
    box-shadow: 0 0 18px rgba(28, 210, 186, 0.25);
    outline: none;
}

.contact-channel--pending {
    color: #94a3b8;
    background: transparent;
    border-color: rgba(148, 163, 184, 0.45);
    cursor: not-allowed;
}

.footer-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    width: max-content;
    gap: 0.85rem;
    margin: 1.75rem auto 0;
}

@media (max-width: 520px) {
    .footer-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem 0;
    }
}

.footer-social {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    place-items: center;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #000;
    line-height: 0;
    transition: color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.footer-social:hover,
.footer-social:focus-visible {
    color: #1cd2ba;
    border-color: #1cd2ba;
    box-shadow: 0 0 16px rgba(28, 210, 186, 0.3);
    outline: none;
}

.footer-social svg {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
    stroke: none;
}

.footer-social--pending { cursor: default; }

.site-footer__bottom {
    align-self: stretch;
    width: 100%;
    margin-top: clamp(2.5rem, 4vw, 3.5rem);
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    text-align: center;
}

.site-footer__bottom p {
    margin: 0;
    color: #e2e8f0;
    font-size: clamp(0.95rem, 1.3vw, 1.1rem) !important;
    font-weight: 700;
    letter-spacing: 0.04em;
}

/* Improve text contrast over the full-page circuit background. */
[class~="text-[#94a3b8]"],
[class~="text-[#64748b]"] {
    color: #e2e8f0;
}

header .hero-kicker,
header .hero-title,
header p,
section h2,
section h3,
section p {
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 1),
        0 2px 10px rgba(0, 0, 0, 0.95);
}

/* Fluid type scale: hero lines stay intact while all supporting text remains proportional. */
header .hero-title {
    font-size: min(9vw, 7.5rem);
    line-height: 0.9;
    white-space: nowrap;
}

header .hero-title.hero-title--medium {
    font-size: min(6.4vw, 5.25rem);
}

header .hero-title.hero-title--wide {
    font-size: min(6.5vw, 5.5rem);
}

/* Use one consistent title scale across every service detail page. */
header .hero-title.service-hero-title {
    font-size: clamp(2.25rem, 6.4vw, 5.25rem);
    line-height: 0.9;
    white-space: normal;
}

header .hero-kicker {
    font-size: clamp(0.7rem, 1.2vw, 1rem);
}

header .hero-copy {
    font-size: clamp(1.05rem, 2vw, 1.75rem);
}

section h2[class] {
    font-size: clamp(2rem, 4.5vw, 3.75rem);
    line-height: 1;
    overflow-wrap: break-word;
}

section h3[class] {
    font-size: clamp(1.6rem, 3.5vw, 3rem);
    line-height: 1.05;
    overflow-wrap: break-word;
}

section p[class*="text-xl"],
section p[class*="text-2xl"] {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
}

.service-item {
    font-size: clamp(1rem, 2vw, 1.35rem);
}

@media (max-width: 768px) and (orientation: portrait) {
    body::before {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        inset: 0 auto auto 0;
        /* The source is very wide: use its circuit-rich side in portrait mode. */
        background-size: auto 100%;
        background-position: left center;
    }
}

@media (max-width: 480px) {
    header .hero-title {
        line-height: 0.95;
    }

    header > div:last-child {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    header .hero-kicker {
        letter-spacing: 0.22em;
    }

    html[lang="es"] #contact h2 {
        font-size: clamp(1.65rem, 8.5vw, 2.5rem);
        overflow-wrap: anywhere;
    }
}

.page-container {
    width: 100%;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    box-sizing: border-box;
}

.btn-cyber {
    background: linear-gradient(90deg, var(--cyber-magenta), var(--cyber-purple));
    box-shadow: 0 0 15px rgba(255, 0, 108, 0.4);
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-cyber:hover {
    box-shadow: 0 0 25px rgba(255, 0, 108, 0.7);
    filter: brightness(1.2);
}

.service-card {
    background: rgba(10, 20, 29, 0.8);
    border: 1px solid rgba(28, 210, 186, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.service-card:hover {
    border-color: var(--cyber-cyan);
    box-shadow: 0 0 20px rgba(28, 210, 186, 0.1);
}

.cyber-input {
    background: var(--bg-card);
    border: 1px solid rgba(28, 210, 186, 0.2);
    color: var(--text-main);
    padding: 1rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    width: 100%;
}

.cyber-input:focus {
    outline: none;
    border-color: var(--cyber-cyan);
    box-shadow: 0 0 15px rgba(28, 210, 186, 0.2);
}

.cyber-label {
    color: var(--cyber-cyan);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: bold;
}

.glitch-wrapper {
    display: inline-block;
    position: relative;
    color: var(--text-main);
    z-index: 10;
}

.glitch-title {
    color: var(--text-main);
    display: block;
    position: relative;

    text-shadow: 2px 0 var(--cyber-cyan), -2px 0 var(--cyber-magenta);
}

.glitch-title::before,
.glitch-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    overflow: hidden;
}

.glitch-title::before {
    left: 2px;
    text-shadow: -2px 0 var(--cyber-cyan);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;

    clip-path: polygon(0 40%, 100% 40%, 100% 50%, 0 50%);
    z-index: -1;
}

.glitch-title::after {
    left: -2px;
    text-shadow: 2px 0 var(--cyber-magenta);
    animation: glitch-anim-2 3s infinite linear alternate-reverse;
    clip-path: polygon(0 60%, 100% 60%, 100% 70%, 0 70%);
    z-index: -2;
}

@keyframes glitch-anim-1 {
    0% { clip-path: polygon(0 40%, 100% 40%, 100% 50%, 0 50%); }
    10% { clip-path: polygon(0 20%, 100% 20%, 100% 30%, 0 30%); }
    20% { clip-path: polygon(0 80%, 100% 80%, 100% 90%, 0 90%); }
    30% { clip-path: polygon(0 15%, 100% 15%, 100% 18%, 0 18%); }
    40% { clip-path: polygon(0 50%, 100% 50%, 100% 60%, 0 60%); }
    50% { clip-path: polygon(0 33%, 100% 33%, 100% 44%, 0 44%); }
    60% { clip-path: polygon(0 72%, 100% 72%, 100% 78%, 0 78%); }
    70% { clip-path: polygon(0 10%, 100% 10%, 100% 15%, 0 15%); }
    80% { clip-path: polygon(0 60%, 100% 60%, 100% 65%, 0 65%); }
    90% { clip-path: polygon(0 85%, 100% 85%, 100% 88%, 0 88%); }
    100% { clip-path: polygon(0 40%, 100% 40%, 100% 50%, 0 50%); }
}

@keyframes glitch-anim-2 {

    0% { clip-path: polygon(0 60%, 100% 60%, 100% 70%, 0 70%); }
    15% { clip-path: polygon(0 10%, 100% 10%, 100% 20%, 0 20%); }
    30% { clip-path: polygon(0 75%, 100% 75%, 100% 80%, 0 80%); }
    45% { clip-path: polygon(0 22%, 100% 22%, 100% 30%, 0 30%); }
    60% { clip-path: polygon(0 50%, 100% 50%, 100% 60%, 0 60%); }
    75% { clip-path: polygon(0 90%, 100% 90%, 100% 95%, 0 95%); }
    90% { clip-path: polygon(0 35%, 100% 35%, 100% 42%, 0 42%); }
    100% { clip-path: polygon(0 60%, 100% 60%, 100% 70%, 0 70%); }
}
