:root {
    --gutter: clamp(20px, 4vw, 48px);
    --max-width: 1400px;
    --gap: clamp(12px, 2vw, 28px);
    --panel-radius: 14px;
    --panel-min-height: 160px;
    --panel-max-height: 72vh;
    /* legacy simple bg kept for fallback */
    --bg: radial-gradient(circle at 20% 20%, #12121a 0%, #030409 60%);
    /* background-only variables (horizon / stars / earth) */
    --bg-center: #0d1117;
    --bg-edge: #000000;
    /* Aura tenue animada en bordes (blanco/morado) */
    --aura-white: rgba(255, 255, 255, 0.85);
    --aura-purple: rgba(177, 138, 255, 0.60);
    --aura-stroke: 2px;
    /* grosor del halo */
    --aura-speed: 9s;
    /* velocidad de giro */
    --more-slider-height: 250px;
    --more-item-height: 100%;
    --anchor-offset: clamp(72px, 9vh, 120px);
}

/* Import Roboto font weights */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap');

html,
body {
    min-height: 100%;
    margin: 0;
    background: #000;
    overflow-x: hidden;
    font-family: 'Roboto', sans-serif;
    color: #e8f0f2
}

/* Force all textual elements to use Roboto */
body,
body * {
    font-family: 'Roboto', sans-serif !important;
}

/* Hide native scrollbars while preserving scroll behavior */
html,
body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* WebKit/Blink */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 0;
    height: 0;
    background: transparent;
}

/* global box-sizing for predictable widths */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* --- Preloader (bouncing dots) --- */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 200000;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 520ms ease
}

#preloader.is-fading {
    opacity: 0;
    pointer-events: none
}

#preloader .preloader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center
}

.spinner {
    margin: 0 auto;
    width: 70px;
    text-align: center
}

.spinner>div {
    width: 18px;
    height: 18px;
    background-color: #fff;
    border-radius: 100%;
    display: inline-block;
    animation: sk-bouncedelay 1.4s infinite ease-in-out both
}

.spinner .bounce1 {
    animation-delay: -0.32s
}

.spinner .bounce2 {
    animation-delay: -0.16s
}

@keyframes sk-bouncedelay {

    0%,
    80%,
    100% {
        transform: scale(0)
    }

    40% {
        transform: scale(1.0)
    }
}

.preloader-icon {
    width: 54px;
    height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.25))
}

@media (max-width:520px) {
    .spinner>div {
        width: 14px;
        height: 14px
    }

    .preloader-icon {
        width: 46px;
        height: 46px
    }
}

/* Background layers from background-only.html (stars, horizon, earth) */
body::before {
    content: '';
    /* make the background part of the document flow so it scrolls with the page */
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    /* Use a solid black backdrop so the page appears truly black on all viewports */
    background: #000;
}

/* Outer wrapper keeps margin from edges and centers content */
.page-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--gutter)
}

/* Content constrained and centered */
.content {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* Responsive two panel layout: two columns on wide screens, stacked on small screens */
/* Make the two panels split the available width equally so changes to B won't affect A */
/* Main two-panel area (left A / right B). Add extra bottom spacing so the
    gallery and other content below don't appear cramped. The value is
    responsive using clamp().*/
.panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    align-items: center;
    margin-bottom: clamp(40px, 8vw, 160px)
}

/* Individual panel styling */
.panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(18px, 2.2vw, 28px);
    border-radius: var(--panel-radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(177, 138, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    min-height: var(--panel-min-height);
    /* aspect sensitive: prefer an aspect ratio but allow height clamp so it adapts to portrait/landscape */
    aspect-ratio: var(--panel-ratio, 16/9);
    max-height: var(--panel-max-height);
}

/* make sure panels and inner boxes use border-box so padding doesn't cause overflow */
.panel,
.panel * {
    box-sizing: border-box;
}

.panel-inner {
    z-index: 2;
    position: relative;
    width: 100%
}

.panel h2 {
    margin: 0 0 8px 0;
    font-size: clamp(1.05rem, 1.8vw, 1.4rem)
}

.panel p {
    margin: 0;
    color: #cfcfd8;
    font-size: clamp(0.95rem, 1.3vw, 1.05rem)
}

/* decorative background layer to produce subtle right-side dissolve/texture - does not touch text */
.panel::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(10, 8, 18, 0.00) 0%, rgba(10, 8, 18, 0.10) 60%, rgba(10, 8, 18, 0.40) 100%);
    z-index: 1
}

/* Ensure the main page content sits above the background layers and particles */
.page-wrap {
    position: relative;
    z-index: 3
}

/* panel--plain: remove outer panel's visual chrome while preserving spacing/layout
     so the inner embedded .glass-embedded remains visible and styled */
.panel--plain {
    background: transparent;
    border: none;
    box-shadow: none
}

.panel--plain::after {
    display: none
}

/* Keep small margins at narrow widths and stack panels */
@media (max-width: 880px) {
    .panels {
        grid-template-columns: 1fr
    }

    .panel {
        aspect-ratio: auto;
        max-height: none
    }

    /* On narrow (phone) screens show the right panel above the left panel */
    .panels .panel:first-child {
        order: 2;
    }

    .panels .panel:last-child {
        order: 1;
    }
}

/* Better fit on very short viewports (landscape phones) */
@media (max-height:480px) {
    .panel {
        min-height: 120px;
        padding: 12px
    }
}

/* subtle responsive tweak for very narrow viewports */
@media (max-width:420px) {
    .content {
        padding-inline: 8px
    }

    :root {
        --gutter: 12px
    }

    /* Ensure outer page padding doesn't push content visually off-center on very small devices */
    .page-wrap {
        padding: var(--gutter);
    }
}

/* small helper: keep inner content readable and not touching edges */
.inner-box {
    background: rgba(0, 0, 0, 0.02);
    padding: 8px;
    border-radius: 8px
}

/* particle container: render as a full-viewport layer so particles sit above the planet
    but underneath the main page panels. Leave the DOM location unchanged so scripts
    that reference the element keep working. */
/* Make the particles panel a square and larger (use outline to locate limits) */
.panel--particles {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
    /* force a square panel so width == height */
    aspect-ratio: 1 / 1;
    /* minimum size increased so it's visibly larger (double default min-height)
       but cap height to viewport so it doesn't overflow */
    min-height: calc(var(--panel-min-height) * 2);
    max-height: 90vh;
    /* visual outline removed for production */
    outline: none;
    outline-offset: 0;
}

.panel--particles::after {
    display: none
}

.panel--particles .panel-inner {
    height: 100%;
    min-height: 0;
    padding: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    position: relative;
    flex: 1
}

/* Position the particle container absolutely in the document and size it
    around the panels area (with a small overflow margin). Absolute positioning
    lets the container scroll with the page while allowing particles to be
    visible outside the B panel bounds. Keep z-index above the black fill so
    particles render on top of the black background but below the page content. */
#particle-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    z-index: 2;
    /* above black fill (1) and earth/stars (0), below page-wrap (3) */
    /* Particles are decorative; let pointer events pass through so UI elements
    like the carousel and cards receive hover/clicks. If interactive
    particle controls are added later, adjust accordingly. */
    pointer-events: none;
}

/* Prevent the particle container from expanding the document horizontally */
@media (min-width:0) {
    #particle-container {
        max-width: 100%;
        box-sizing: border-box;
        left: 0;
        right: 0
    }

    #particle-container canvas {
        max-width: 100%;
        height: auto
    }
}

#particle-container canvas {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none
}

/* Clip wrapper to prevent oversized background elements (earth/horizon)
    from increasing page width on small screens while allowing them to
    visually overflow inside the clipped viewport. This keeps the
    visual effect but stops horizontal scroll caused by the ellipse. */
/* Use 100% (not 100vw) to avoid including the scrollbar width which can cause
    a horizontal overflow and visual left-shift on some platforms. */
#bg-clip {
    position: absolute;
    inset: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    box-sizing: border-box
}

/* Background-only star/horizon/earth styles (adapted) */
#stars,
#stars2,
#stars3 {
    /* make stars part of the page so they move with scrolling */
    position: absolute;
    top: 0;
    left: 0;
    /* render the base dot as a tiny circle; visual size comes from box-shadow blur/spread */
    width: 1px;
    height: 1px;
    background: transparent;
    border-radius: 50%;
    /* make each star element a circle */
    pointer-events: none;
    z-index: 0;
    animation: animStar 50s linear infinite;
}

/* Slightly vary animation timing per layer for parallax feel */
#stars {
    animation-duration: 50s;
}

#stars2 {
    animation-duration: 100s;
}

#stars3 {
    animation-duration: 150s;
}

#stars {
    opacity: 0.7;
}

#stars2 {
    opacity: 0.9;
    animation-duration: 100s;
}

#stars3 {
    opacity: 0.85;
    animation-duration: 150s;
}

@keyframes animStar {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-2000px);
    }
}

/* Horizon glow */
#horizon {
    position: absolute;
    left: 50%;
    bottom: -28%;
    width: 160%;
    height: 70%;
    transform: translateX(-50%);
    border-radius: 100% / 100%;
    background: #5b2cff;
    filter: blur(30px);
    opacity: 0.9;
    z-index: 0;
    pointer-events: none;
}

#horizon::before {
    content: "";
    position: absolute;
    left: 9.375%;
    width: 81.25%;
    height: 70%;
    border-radius: inherit;
    background: #9a6bff;
    filter: blur(30px);
    opacity: 0.6;
}

#horizon::after {
    content: "";
    position: absolute;
    left: 34%;
    width: 32%;
    height: 20%;
    border-radius: 650px/350px;
    background: #e0c6ff;
    filter: blur(30px);
    opacity: 0.5;
}

#horizon .glow {
    position: absolute;
    top: -10%;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 100%/100%;
    background: #3a1a6d;
    filter: blur(200px);
    opacity: 0.7
}

/* Earth ellipse occluding horizon */
#earth {
    position: absolute;
    left: 50%;
    bottom: -70%;
    width: 220%;
    height: 110%;
    transform: translateX(-50%);
    background: #000;
    border-radius: 100% / 100%;
    z-index: 0;
    pointer-events: none;
}

#earth::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 62px 20px rgba(120, 100, 160, 0.7);
}

#earth::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 1) 100%);
}

/* controls overlay removed: no buttons for particles (particles-only view) */
/* --- Typing embed styles (mirrors typing-only.html look) --- */
.glass-embedded {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    /* fill available inner width of the panel */
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(177, 138, 255, 0.22);
    border-radius: 16px;
    padding: 28px 26px;
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.glass-embedded h1 {
    margin: 0 0 12px 0;
    font-size: clamp(1.8rem, 2.6vw, 2.8rem);
    line-height: 1.06
}

.title-static {
    display: inline-block;
    white-space: nowrap
}

.typewriter-wrapper {
    display: inline-flex;
    align-items: baseline;
    gap: 6px
}

.typewriter-wrapper[aria-locked="true"] {
    overflow: visible
}

#typewriter {
    color: #b18aff;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
    line-height: 1.02;
    font: inherit
}

.caret {
    display: inline-block;
    width: 3px;
    height: 0.6em;
    background: #b18aff;
    animation: blink 1s steps(1, end) infinite;
    margin-left: 0;
    vertical-align: baseline
}

/* prefer JS resizing but allow up to 3 lines on small viewports to avoid truncation */
#desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.glow-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 160ms ease;
    background: radial-gradient(260px 260px at var(--mx, 50%) var(--my, 50%), rgba(174, 134, 255, 0.385), rgba(158, 109, 255, 0.307) 36%, rgba(134, 74, 255, 0.06) 64%, transparent 74%);
    mix-blend-mode: screen;
    z-index: 0
}

.glass-embedded.is-pointer .glow-overlay {
    opacity: 1
}

@keyframes blink {

    0%,
    49% {
        opacity: 1
    }

    50%,
    100% {
        opacity: 0
    }
}

/* Header & typewriter layout: keep the static title on its own line and
     the dynamic typewriter below it. Reserve vertical space so the page
     doesn't jump when the typewriter erases/rewrites text. */
/* Keep the title and typewriter visually attached: inline layout
    so the typewriter follows the title with no vertical gap. Reserve
    a small min-height on the typewriter to avoid snapping during erase. */
.glass-embedded h1 {
    display: block;
    margin: 0
}

.title-static {
    display: inline-block;
    white-space: nowrap;
    margin: 0;
    font-weight: 600;
    vertical-align: baseline
}

.typewriter-wrapper {
    display: inline-block;
    min-height: 1em;
    /* reserve single-line height */
    min-width: 0;
    vertical-align: baseline;
    margin-left: 0px
}

#typewriter {
    display: inline-block;
    white-space: nowrap;
    vertical-align: baseline
}

@media (max-width:480px) {
    .glass-embedded {
        padding: 16px 14px
    }

    .title-static {
        font-size: clamp(1rem, 3.5vw, 1.25rem)
    }

    .typewriter-wrapper {
        margin-top: 4px
    }

    /* allow description to use up to 3 lines on narrow screens and reduce font slightly */
    #desc {
        -webkit-line-clamp: 3;
        line-clamp: 3;
        font-size: calc(0.95em);
        line-height: 1.18
    }
}

/* When the panels stack on narrow viewports, center the glass content
     so the heading and description read centered on mobile. */
@media (max-width:880px) {

    .glass-embedded,
    .gallery-text {
        text-align: center;
    }

    .title-static {
        display: block;
        margin-left: 0;
        margin-right: 0
    }

    .typewriter-wrapper {
        display: inline-block;
        margin-left: 6px
    }

    #desc {
        margin-left: auto;
        margin-right: auto
    }
}

/* fixed top-left code image (decorative) */
#top-left-code {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 9999;
    width: clamp(48px, 6vw, 96px);
    height: auto;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
    /* allow hover/click interactions */
    pointer-events: auto;
    opacity: 0.95;
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
    will-change: transform;
}

@media (max-width:420px) {
    #top-left-code {
        top: 8px;
        left: 8px;
        width: clamp(40px, 10vw, 64px);
    }
}

/* Hover interaction only for hover-capable devices (avoid interfering with touch) */
@media (hover: hover) and (pointer: fine) {
    #top-left-code:hover {
        transform: scale(0.92);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
        opacity: 0.98;
    }

    /* also allow keyboard focus for accessibility */
    #top-left-code:focus {
        outline: 2px solid rgba(255, 255, 255, 0.12);
        transform: scale(0.96);
    }
}

/* fixed top-right contact button (follows scroll like the logo) - shorter and glass-styled
       converted to an anchor that redirects to the blog contact page and receives a glow */
#top-right-contact {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 14px;
    /* slightly smaller on large screens */
    min-width: 64px;
    height: auto;
    background: linear-gradient(180deg, rgba(139, 99, 255, 0.16), rgba(94, 33, 214, 0.12));
    color: #ffffff !important;
    border-radius: 14px;
    border: 1px solid rgba(123, 75, 255, 0.28);
    backdrop-filter: blur(10px) saturate(130%);
    -webkit-backdrop-filter: blur(10px) saturate(130%);
    box-shadow: 0 10px 36px rgba(60, 18, 120, 0.28);
    text-decoration: none;
    font-weight: 700;
    font-size: clamp(0.9rem, 1.1vw, 1rem);
    pointer-events: auto;
    opacity: 0.98;
    transition: transform 180ms ease, box-shadow 260ms ease, opacity 180ms ease, background 160ms ease;
    will-change: transform;
}

@media (max-width:420px) {
    #top-right-contact {
        top: 8px;
        right: 8px;
        padding: 6px 10px;
        font-size: 0.9rem
    }
}

@media (hover: hover) and (pointer: fine) {

    /* On hover/focus, keep the background but emphasize the border and glow */
    #top-right-contact:hover {
        transform: translateY(-3px) scale(1.06);
        box-shadow: 0 30px 88px rgba(140, 90, 255, 0.42);
        opacity: 1;
        border-color: rgba(160, 110, 255, 0.98);
    }

    #top-right-contact:focus {
        outline: 2px solid rgba(200, 160, 255, 0.36);
        transform: translateY(-3px) scale(1.06);
        border-color: rgba(160, 110, 255, 0.98);
    }

    #top-right-contact:active {
        transform: translateY(-1px) scale(1.02);
    }
}

/* Glow pseudo-element for the small top-right CTA (similar to big-contact-cta but compact) */
#top-right-contact::after {
    content: "";
    position: absolute;
    /* Elliptical, wider horizontally and positioned higher */
    left: 54%;
    top: 44%;
    transform: translate(-50%, -65%);
    width: calc(100% + 160px);
    /* narrower sides */
    height: calc(100% + 110px);
    /* less tall */
    /* Ellipse illusion via border-radius and gradient center */
    background:
        radial-gradient(100% 82% at 62% 32%,
            rgba(168, 120, 255, 0.85) 0%,
            rgba(120, 80, 235, 0.46) 42%,
            rgba(90, 50, 190, 0.18) 62%,
            transparent 78%);
    filter: blur(40px);
    border-radius: 200px / 120px;
    /* strong ellipse */
    z-index: -1;
    transition: transform .22s ease, opacity .18s ease;
    opacity: 1;
    pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {

    #top-right-contact:hover::after,
    #top-right-contact:focus::after {
        transform: translate(-50%, -50%) scale(1.22);
        opacity: 1;
    }
}

/* Floating scroll arrow that follows the viewport until the contact form appears */
#scroll-arrow {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 24px;
    z-index: 10000;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: default;
    /* clicks do nothing */
    transition: opacity 260ms ease, transform 260ms ease;
    opacity: 0.92;
    /* animate the container vertically so the arrow moves straight up/down */
    animation: arrow-bounce 1.6s infinite cubic-bezier(.2, .9, .2, 1);
}

#scroll-arrow.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
    pointer-events: none
}

#scroll-arrow .arrow-down {
    width: 18px;
    height: 18px;
    display: block;
    border-left: 3px solid #fff;
    border-bottom: 3px solid #fff;
    transform: rotate(-45deg);
    opacity: 0.95;
}

@keyframes arrow-bounce {
    0% {
        transform: translateX(-50%) translateY(0)
    }

    50% {
        transform: translateX(-50%) translateY(8px)
    }

    100% {
        transform: translateX(-50%) translateY(0)
    }
}

/* Ensure the gallery sits above the world/horizon background (which uses z-index 0/1)
     Use a transparent background so the full-width black fill (#gallery-black-fill)
     can provide the black background starting at la sección Servicios mientras
     remaining below the particle canvas. */
/* Gallery — robust responsive rules */
/* Gallery: simplified responsive layout (left area + servicios aside) */
.gallery-section {
    position: relative;
    z-index: 3;
    padding: 48px 0;
    background: transparent;
    padding-top: clamp(72px, 9vh, 120px);
    padding-bottom: clamp(56px, 8vh, 100px);
    margin-top: clamp(40px, 6vh, 96px);
}

.gallery-wrap {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: minmax(346px, 1fr) min(640px, 60%);
    gap: 28px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 22px
}

/* Servicios (glass) */
/* (Duplicate .gallery-text block removed; consolidated later in the stylesheet) */

/* left particle area: force a square (width == height) using aspect-ratio.
     Use min/max sizes so it remains large on desktop but shrinks gracefully on mobile. */
#gallery-left-particles {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* force square */
    min-width: 292px;
    /* ~33% larger than before (220px * 1.333) */
    min-height: 292px;
    /* fallback for browsers that don't support aspect-ratio */
    max-width: 693px;
    /* ~33% larger than before (520px * 1.333) */
    background: transparent;
    position: relative;
    display: block;
    margin: 0 auto;
}

/* Servicios box (right column) */
.gallery-text {
    --mx: 50%;
    --my: 50%;
    color: #e8f0f2;
    background: rgba(255, 255, 255, 0.06);
    padding: 18px;
    border-radius: 22px;
    margin: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
    width: 100%;
    max-width: 720px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(177, 138, 255, 0.12);
    transition: box-shadow 220ms ease;
    backdrop-filter: blur(8px) saturate(110%);
    -webkit-backdrop-filter: blur(8px) saturate(110%);
    align-self: center
}

.gallery-text::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 260ms ease;
    border-radius: inherit;
    background: radial-gradient(260px 260px at var(--mx) var(--my), rgba(174, 134, 255, 0.35), rgba(158, 109, 255, 0.26) 36%, rgba(134, 74, 255, 0.05) 64%, transparent 74%);
    mix-blend-mode: screen;
    z-index: 0
}

.gallery-text>*,
.gallery-text * {
    position: relative;
    z-index: 1
}

.gallery-text:hover::before {
    opacity: 1
}

/* allow scripts to enable the overlay on pointer/touch devices by toggling a class */
.gallery-text.is-pointer::before {
    opacity: 1
}

/* Stack on small screens and center the content */
@media (max-width:880px) {
    .gallery-wrap {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 0 14px
    }

    /* On narrow/mobile screens stack and make the particle block take full width while staying square */
    #gallery-left-particles {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        aspect-ratio: 1/1;
        min-height: 0
    }

    .gallery-text {
        max-width: 100%;
        padding: 14px
    }

    .gallery-title {
        margin-bottom: 12px
    }
}

.gallery-title {
    color: #e8f0f2;
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
    margin: 0 0 18px
}

.slider {
    position: relative;
    overflow: hidden;
    border-radius: 12px
}

.slider-track {
    display: flex;
    transition: transform 480ms ease;
    will-change: transform
}

.slide {
    min-width: 100%;
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b0b10;
    color: #fff;
    padding: 28px
}

.slide img {
    max-width: 100%;
    max-height: 56vh;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6)
}

.slider-controls {
    position: absolute;
    left: 12px;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none
}

.btn {
    pointer-events: auto;
    background: rgba(20, 16, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    backdrop-filter: blur(4px)
}

.dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 14px
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer
}

.dot.active {
    background: #b18aff
}

@media (max-width:720px) {
    .slide img {
        max-height: 46vh
    }
}

.cards-section {
    position: relative;
    z-index: 3;
    padding: var(--cards-top, clamp(144px, 20vw, 360px)) 0 var(--cards-bottom, clamp(96px, 12vw, 240px)) 0;
    background: transparent
}

.cards-header {
    max-width: 1100px;
    margin: 0 auto 24px;
    padding: 0 clamp(12px, 3vw, 20px);
    text-align: center
}

.cards-title {
    margin: 0 0 6px 0;
    font-size: clamp(1.4rem, 3.2vw, 2rem);
    color: #ffffff
}

.cards-subtitle {
    margin: 0;
    color: #cfcfd8;
    opacity: 0.88;
    font-size: clamp(0.95rem, 2vw, 1.05rem)
}

.cards-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 clamp(12px, 3vw, 20px);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch
}

/* Make cards visually match .glass-embedded (glass + glow) */
.card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(177, 138, 255, 0.22);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    position: relative;
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    transition: box-shadow 220ms ease, transform 180ms ease;
    min-height: 360px
}

.card-media {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    background: #0b0b10
}

.card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column
}

.card-title {
    margin: 0 0 8px 0;
    font-size: 1.05rem;
    color: #e8f0f2
}

.card-desc {
    margin: 0;
    color: #cfcfd8;
    flex: 1;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 260ms ease, transform 260ms ease;
    pointer-events: none
}

.card-cta {
    margin-top: 12px;
    text-align: right;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 260ms ease, transform 260ms ease;
    pointer-events: none
}

.card-cta {
    margin-top: 12px;
    text-align: right
}

/* glow overlay using a child element (matches .glass-embedded) */
.card .glow-overlay {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 160ms ease;
    background: radial-gradient(260px 260px at var(--mx, 50%) var(--my, 50%), rgba(174, 134, 255, 0.385), rgba(158, 109, 255, 0.307) 36%, rgba(134, 74, 255, 0.06) 64%, transparent 74%);
    mix-blend-mode: screen;
    z-index: 3
}

.card>*,
.card .card-media,
.card .card-body {
    position: relative;
    z-index: 1
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6)
}

/* CSS-only fallback for hover-capable devices */
.card:hover .glow-overlay {
    opacity: 1
}

/* subtle purple overlay on images to give a dark/purple hue; removed on hover */
.card-media-wrapper {
    position: relative;
    display: block;
    overflow: hidden
}

.card-media {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover
}

/* darker purple tint for card images (stronger effect) */
.card-media-wrapper::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(77, 32, 147, 0.40), rgba(45, 18, 95, 0.55));
    background-color: rgba(77, 32, 147, 0.45);
    mix-blend-mode: multiply;
    pointer-events: none;
    transition: opacity 220ms ease;
    opacity: 1;
    z-index: 2
}

/* reduce overlay on hover (and when keyboard-focused) */
.card:hover .card-media-wrapper::after,
.card:focus-within .card-media-wrapper::after {
    opacity: 0
}

/* Reveal card text on hover/focus but keep title always visible */
.card:hover .card-desc,
.card:focus-within .card-desc,
.card:hover .card-cta,
.card:focus-within .card-cta {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto
}

/* If a card has been interacted with (revealed), keep text visible permanently */
.card.revealed .card-desc,
.card.revealed .card-cta {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto
}

/* ensure overlay doesn't cover the glow overlay element which is separate */

.card .card-media-wrapper {
    z-index: 1
}

.card .card-media {
    position: relative;
    z-index: 1
}

@media (max-width:920px) {
    .cards-wrap {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media (max-width:640px) {
    .cards-wrap {
        grid-template-columns: 1fr;
        padding-inline: 16px
    }

    .card-media {
        height: 160px
    }

    .card-media-wrapper::after {
        transition: opacity 180ms ease
    }

    .card {
        min-height: 0
    }
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease
}

.btn-ghost:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    background: rgba(255, 255, 255, 0.02)
}

.btn-ghost:active {
    transform: translateY(-1px) scale(0.995)
}

/* responsive adjustments already declared above; duplicates removed */

/* Expanded services list shown when 'Ver más' is clicked */
.more-services {
    max-width: 1100px;
    margin: 18px auto 0;
    padding: 0 clamp(12px, 3vw, 20px);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 420ms cubic-bezier(.2, .9, .2, 1), opacity 320ms ease
}

.more-services.open {
    max-height: 2000px;
    opacity: 1
}

.more-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch
}

.more-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(177, 138, 255, 0.06);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    min-height: 120px;
    transition: transform 180ms ease, box-shadow 180ms ease
}

.more-item h4 {
    margin: 0 0 8px 0;
    color: #fff;
    font-size: 1rem
}

.more-item p {
    margin: 0;
    color: #cfcfd8
}

/* Remove default blue underlines and ensure the whole tile is clickable */
.more-item,
.more-item:link,
.more-item:visited {
    color: inherit;
    text-decoration: none;
    display: block;
}

.more-item:hover,
.more-item:active {
    text-decoration: none;
    transform: translateY(-6px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}

/* Keep a clear focus outline for keyboard users */
.more-item:focus {
    outline: 3px solid rgba(174, 134, 255, 0.18);
    outline-offset: 3px;
    border-radius: 10px;
    transform: translateY(-6px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}

@media (max-width:920px) {
    .more-wrap {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media (max-width:640px) {
    .more-wrap {
        grid-template-columns: 1fr
    }
}

/* Carousel title styling */
.carousel-title {
    color: #e8f0f2;
    font-weight: 600;
    margin: 0 0 12px 0;
    text-align: center;
    font-size: clamp(1rem, 2.2vw, 1.25rem);
}

/* Ensure the title sits visually on top of the carousel overlays/tint */
.carousel-title {
    position: relative;
    z-index: 100001;
    /* higher than overlays which use 99999/99998 */
    display: inline-block;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.36);
    /* subtle backing so it remains readable on top of tint */
    border-radius: calc(var(--carousel-radius, 12px) + 6px);
    margin-left: auto;
    margin-right: auto;
}

.carousel {
    text-align: center;
}

.carousel__slider {
    position: relative;
    overflow: visible;
    width: 100%;
    padding: 12px 0;
    min-height: 104px;
    --carousel-radius: clamp(8px, 1.2vw, 12px);
}

/* position lists absolutely so clones sit on the same row and never wrap */
.carousel__list {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    gap: 90px;
    align-items: center;
    flex-wrap: nowrap;
    padding: 0;
    margin: 0;
}

.carousel__list--clone {
    position: absolute;
    top: 0;
    left: 0;
}

/* normalize item size so every media box has the same area */
.carousel__item {
    flex: 0 0 auto;
    width: 140px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
}

/* media wrapper fills the item; image scales uniformly inside */
.carousel__media {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
    padding: 8px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.98);
    border-radius: var(--carousel-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

/* allow smooth scaling on hover and ensure it scales from center */
.carousel__media {
    transform-origin: center center;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

/* subtle blurred rim behind the white box (removed - replaced by rectangular edge overlay further below) */
.carousel__img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0.02) contrast(1.02);
    position: relative;
    z-index: 1;
}

.carousel__item:hover .carousel__media,
.carousel__item:focus-within .carousel__media {
    transform: translateY(-6px) scale(1.06);
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.52);
}

/* restore full color on hover/focus and transition smoothly */
.carousel__item:hover .carousel__img,
.carousel__item:focus-within .carousel__img {
    filter: none;
    transition: filter 220ms ease, transform 220ms ease;
    transform: translateY(-2px) scale(1.02);
}

.carousel__img {
    transition: filter 220ms ease, transform 220ms ease;
}

/* increase vertical space to accommodate larger gaps */
.carousel__slider {
    padding: 20px 0;
    min-height: 180px
}

@media (max-width:920px) {
    .carousel__item {
        width: 112px;
        height: 72px
    }

    .carousel__slider {
        min-height: 140px
    }
}

@media (max-width:640px) {
    .carousel__item {
        width: 92px;
        height: 60px
    }

    .carousel__slider {
        min-height: 120px
    }
}

/* Dark overlay extends slightly outside the media box to cover corners fully */
.carousel__media {
    position: relative;
    overflow: visible;
}

.carousel__media::after {
    content: '';
    position: absolute;
    inset: -10px;
    /* extend beyond edges */
    background: rgba(0, 0, 0, 0.800);
    transition: opacity 200ms ease;
    pointer-events: none;
    z-index: 2;
    opacity: 1;
}

.carousel__item:hover .carousel__media::after,
.carousel__item:focus-within .carousel__media::after {
    opacity: 0
}

/* Responsive margins for contact CTA */
#contacto {
    margin-top: 32px;
    margin-bottom: 32px
}

@media (min-width:576px) {
    #contacto {
        margin-top: 56px;
        margin-bottom: 56px
    }
}

@media (min-width:768px) {
    #contacto {
        margin-top: 100px;
        margin-bottom: 100px
    }
}

@media (min-width:992px) {
    #contacto {
        margin-top: 180px;
        margin-bottom: 180px
    }
}

@media (min-width:1200px) {
    #contacto {
        margin-top: 280px;
        margin-bottom: 280px
    }
}

/* CTA particle layer: centered, square, and behind CTA content */
#gallery-left-particles-cta {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    aspect-ratio: 1/1;
    /* height equals width */
    max-width: 100%;
    height: auto;
    z-index: 0;
    /* used only for anchor calculations; visual particles controlled by canvas z-index */
    pointer-events: none;
}

/* make the CTA inner container sit above the particle canvas (canvas z-index = 2) */
#contacto>div {
    position: relative;
    z-index: 4;
}

/* Make contact CTA larger and add more separation from surrounding sections */
.big-contact-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Larger than 2x for clearer impact */
    padding: 72px 160px;
    border-radius: 36px;
    /* keep text smaller than original but not tiny */
    font-size: 1.05rem;
    font-family: inherit;
    font-weight: 700;
    letter-spacing: 0.3px;
    border: 1px solid rgba(92, 45, 205, 0.98);
    background: linear-gradient(180deg, #6e33ff 0%, #3a0f98 100%);
    color: #ffffff;
    box-shadow: 0 50px 140px rgba(60, 18, 120, 0.48);
    position: relative;
    z-index: 1;
    transition: transform .18s ease, box-shadow .22s ease, background .18s ease, color 120ms ease;
}

/* Purple glow on hover & focus for all contact buttons (applies to top-right contact button too) */
.contact-btn,
.big-contact-cta {
    transition: box-shadow 220ms ease, transform 180ms ease, background 180ms ease, color 120ms ease;
    color: #ffffff !important;
    /* force white text */
    /* make contact buttons purple by default so they stand out */
    background: linear-gradient(180deg, #8b63ff 0%, #5e21d6 100%);
    border-color: rgba(140, 90, 255, 0.98);
    -webkit-tap-highlight-color: transparent;
    /* prevent tap highlight color change */
}

.contact-btn:hover,
.contact-btn:focus,
.big-contact-cta:hover,
.big-contact-cta:focus {
    transform: translateY(-4px) scale(1.02);
    /* stronger purple background so the button clearly turns purple */
    background: linear-gradient(180deg, #9a7bff 0%, #6e33ff 100%);
    border-color: rgba(160, 110, 255, 0.98);
    color: #ffffff;
    box-shadow: 0 30px 92px rgba(130, 92, 255, 0.36), 0 10px 40px rgba(77, 32, 147, 0.22);
    outline: none;
}

/* soft glowing outline behind the CTA using a blurred pseudo-element */
.big-contact-cta::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 120px);
    height: calc(100% + 120px);
    background: radial-gradient(circle at center, rgba(120, 70, 255, 0.72), rgba(70, 28, 170, 0.30) 45%, transparent 66%);
    filter: blur(48px);
    border-radius: 30px;
    z-index: 0;
    transition: transform .22s ease, opacity .18s ease;
    opacity: 1;
    pointer-events: none;
}

.big-contact-cta:hover::after,
.big-contact-cta:focus::after {
    transform: translate(-50%, -50%) scale(1.16);
    opacity: 1;
}

/* pressed/active state */
.contact-btn:active,
.big-contact-cta:active {
    transform: translateY(-1px) scale(0.998);
    box-shadow: 0 10px 28px rgba(123, 75, 255, 0.22);
    /* keep exact same colors when pressed */
    background: inherit;
    color: inherit;
    border-color: inherit;
}

/* add extra spacing above and below the contact section when needed */
@media (min-width: 880px) {
    #contacto {
        padding-top: 100px;
        padding-bottom: 100px
    }
}

@media (max-width: 640px) {

    /* On mobile keep it visibly large while fitting small viewports */
    .big-contact-cta {
        padding: 48px 96px;
        font-size: 0.95rem
    }

    #contacto {
        padding-top: 44px;
        padding-bottom: 44px
    }
}

/* show pointer cursor for service cards so users know they are clickable */
.cards-wrap .card {
    cursor: pointer;
}

/* keep focus outline for accessibility when keyboard navigating */
.cards-wrap .card:focus {
    outline: 3px solid rgba(177, 138, 255, 0.24);
    outline-offset: 4px;
}

/* Footer styles */
#site-footer {
    position: relative;
    z-index: 3;
    background: linear-gradient(180deg, #06060a, #08060d);
    color: #dfe7f2;
    padding: 48px 16px 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.03)
}

.footer-wrap {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    align-items: start
}

.footer-col {
    min-width: 0
}

.footer-title {
    color: #fff;
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 600
}

/* accent purple for selected footer text */
.footer-about .footer-title {
    color: #b18aff;
}

.footer p,
.footer a,
.footer li {
    color: #c9d2e6;
    line-height: 1.5;
    font-size: 0.95rem;
    margin: 0
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px
}

.footer-links a {
    color: #c9d2e6;
    text-decoration: none;
    opacity: 0.96
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.footer-contact a {
    color: #c9d2e6
}

/* inline contact button in footer (visually like the top-right button but static) */
/* use glass style for footer contact button so it matches the top-right button */
.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(177, 138, 255, 0.18);
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.38);
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease
}

.contact-btn:focus {
    outline: 2px solid rgba(177, 138, 255, 0.18)
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
    background: rgba(255, 255, 255, 0.08)
}

.footer-bottom {
    max-width: 1100px;
    margin: 20px auto 0;
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    color: #aeb9d0;
    font-size: 0.88rem;
    text-align: center
}

/* small screens: stack columns */
@media (max-width:880px) {
    .footer-wrap {
        grid-template-columns: 1fr;
        gap: 14px
    }

    .footer-bottom {
        text-align: left;
        padding-left: 16px
    }
}

/* More services as glass slider */
.more-services .more-slider {
    position: relative;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(177, 138, 255, 0.22);
    border-radius: 16px;
    padding: 16px clamp(44px, 5vw, 64px);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    min-height: var(--more-slider-height);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.more-services .more-slider .more-wrap {
    display: flex;
    /* horizontal track */
    gap: 16px;
    will-change: transform;
    transition: transform 360ms cubic-bezier(.2, .9, .2, 1);
    align-items: stretch;
}

.more-services .more-slider .more-item {
    flex: 0 0 auto;
    /* width fijada por JS */
    height: var(--more-item-height);
    min-height: var(--more-slider-height);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.more-services .more-slider .more-item.more-item--placeholder {
    visibility: hidden;
    pointer-events: none;
}

/* centrar contenido dentro de las tarjetas del slider */
.more-services .more-slider .more-item h4,
.more-services .more-slider .more-item p {
    text-align: center;
    margin-top: 0;
    margin-bottom: 8px;
}

/* Slider nav buttons (glass, paleta violeta) */
.more-services .more-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(180deg, rgba(139, 99, 255, 0.16), rgba(94, 33, 214, 0.12));
    border: 1px solid rgba(123, 75, 255, 0.28);
    box-shadow: 0 12px 34px rgba(60, 18, 120, 0.28);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 200ms ease, opacity 160ms ease;
    z-index: 3;
}

.more-services .more-btn--prev {
    left: 12px;
}

.more-services .more-btn--next {
    right: 12px;
}

.more-services .more-btn:hover {
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 24px 64px rgba(140, 90, 255, 0.42);
}

.more-services .more-btn:disabled {
    opacity: .38;
    pointer-events: none;
}

/* Slider dots */
.more-services .more-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.more-services .more-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(177, 138, 255, 0.18);
    cursor: pointer;
    transition: transform 140ms ease, background 160ms ease, box-shadow 160ms ease;
}

.more-services .more-dot.active {
    background: #b18aff;
    box-shadow: 0 0 0 6px rgba(177, 138, 255, 0.10);
    transform: scale(1.12);
}

/* Ajustes responsive del slider */
@media (max-width:880px) {
    .more-services .more-slider {
        padding: 12px clamp(36px, 4vw, 48px);
    }

    .more-services .more-slider .more-wrap {
        gap: 12px;
    }
}

@media (max-width:640px) {
    .more-services .more-slider {
        padding: 10px 32px;
    }

    .more-services .more-slider .more-wrap {
        gap: 10px;
    }

    .more-services .more-slider {
        min-height: 220px;
    }

    .more-services .more-slider .more-item {
        min-height: 220px;
    }
}

/* Establecer stacking context para que la aureola quede tras el contenido */
:is(.glass-embedded, .gallery-text, .card, .more-services .more-slider, .panel:not(.panel--particles)) {
    position: relative;
    z-index: 0;
}

/* Pseudo-capa: solo el contorno (conic-gradient + máscara) */
:is(.glass-embedded, .gallery-text, .card, .more-services .more-slider, .panel:not(.panel--particles))::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: var(--aura-stroke);
    /* luz que recorre el borde: segmento blanco→morado→transparente */
    background: conic-gradient(from 0deg,
            var(--aura-white) 0deg,
            var(--aura-purple) 22deg,
            rgba(255, 255, 255, 0) 80deg,
            rgba(255, 255, 255, 0) 360deg);
    /* máscara para dejar solo el anillo (contorno) */
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;

    filter: blur(6px);
    opacity: 0.45;
    /* tenue por defecto */
    pointer-events: none;
    will-change: transform, opacity, filter;
    animation: auraSpin var(--aura-speed) linear infinite;
    z-index: 0;
    /* queda bajo el contenido del contenedor */
}

/* Realce al pasar el puntero o con foco dentro (ligero) */
:is(.glass-embedded, .gallery-text, .card, .more-services .more-slider, .panel:not(.panel--particles)):hover::after,
:is(.glass-embedded, .gallery-text, .card, .more-services .more-slider, .panel:not(.panel--particles)):focus-within::after {
    opacity: 0.65;
    filter: blur(7px);
}

/* Respetar usuarios con reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
    :is(.glass-embedded, .gallery-text, .card, .more-services .more-slider, .panel:not(.panel--particles))::after {
        animation: none;
        opacity: 0.35;
    }
}

/* Animación de aparición (fade-up) para "Tecnología creada" */
@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
        filter: blur(6px);
    }

    to {
        opacity: 1;
        transform: none;
        filter: blur(0);
    }
}

.reveal-on-view {
    opacity: 0;
    will-change: opacity, transform, filter;
}

.reveal-on-view.is-visible {
    animation: revealUp 640ms cubic-bezier(.2, .9, .2, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
    .reveal-on-view {
        opacity: 1;
        transform: none;
        filter: none;
        animation: none !important;
    }
}

/* Animación letra a letra (más lenta, desde la izquierda) */
@keyframes letterSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-28px);
        filter: blur(6px);
    }

    60% {
        opacity: 1;
    }

    100% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

.reveal-letters .rl-char {
    display: inline-block;
    opacity: 0;
    transform: translateX(-28px);
    filter: blur(6px);
    will-change: opacity, transform, filter;
}

.reveal-letters.is-visible .rl-char {
    animation: letterSlideIn 900ms cubic-bezier(.25, .9, .2, 1) forwards;
    animation-delay: var(--char-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
    .reveal-letters .rl-char {
        opacity: 1;
        transform: none;
        filter: none;
        animation: none !important;
    }
}

/* Ajustar animación contenedor previa (más lenta) */
.reveal-on-view.is-visible {
    animation: revealUp 900ms cubic-bezier(.25, .9, .2, 1) forwards;
}

.reveal-letters .rl-space {
    display: inline-block;
    width: .5ch;
    opacity: 0;
    /* si se animara, podría hacerse similar a letras */
}

.reveal-letters.is-visible .rl-space {
    opacity: 1;
}

/* Leave space when jumping to anchors so the section is not flush with the top */
html {
    scroll-padding-top: clamp(72px, 9vh, 120px);
}

/* Give each section a comfortable offset margin for anchors */
#inicio,
#nosotros,
#servicios,
#respaldo,
#contacto {
    scroll-margin-top: clamp(72px, 9vh, 120px);
}

/* Add a bit more separation between the hero and the next section */
.panels {
    margin-bottom: clamp(60px, 10vw, 200px);
}

/* Consistent anchor spacing variable */
:root {
  /* ...existing code... */
  --anchor-offset: clamp(72px, 9vh, 120px);
}

/* Leave space when jumping to anchors */
html {
  /* ...existing code... */
  scroll-padding-top: var(--anchor-offset);
}

/* Sections scroll offset */
#inicio,
#nosotros,
#servicios,
#respaldo,
#contacto {
  /* ...existing code... */
  scroll-margin-top: var(--anchor-offset);
}

/* Hero (#inicio) should not vertically center; allow natural top anchoring */
#inicio.page-wrap {
  align-items: flex-start;
  justify-content: flex-start;
  padding-top: clamp(88px, 12vh, 148px);
  padding-bottom: clamp(72px, 10vh, 140px);
}

/* Increase separation below panels further */
.panels {
  /* ...existing code... */
  margin-bottom: clamp(90px, 12vw, 240px);
}

/* Add explicit top margin to gallery section so anchors don't feel adjacent */
.gallery-section {
  /* ...existing code... */
  margin-top: clamp(40px, 6vh, 96px);
}

/* Optional helper (if you want to drop into markup later) */
.anchor-spacer {
  height: clamp(60px, 8vh, 120px);
}

/* Cards section anchor offset + reduced top padding for better in-page navigation */
.cards-section#servicios {
  scroll-margin-top: var(--anchor-offset);
  padding-top: clamp(72px, 10vh, 140px);
  padding-bottom: clamp(72px, 12vh, 160px);
}

/* Stabilize card media height (prevents jump between rows) */
.card-media-wrapper,
.card-media {
  /* ...existing code... */
  min-height: 180px;
}

/* Touch / non-hover devices: always show descriptions (no hidden content) */
@media (hover: none), (pointer: coarse) {
  .card-desc,
  .card-cta {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }
  .card:hover {
    transform: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  }
}

/* Optional wrapper if cards are later converted to links */
.card-link {
  display: contents;
}

/* Ensure grid doesn’t collapse when descriptions are visible */
.cards-wrap {
  align-items: start;
}

/* --- Fin de los estilos --- */