:root {
    --codermex-blue: #075ecf;
    --codermex-cyan: #16a8f5;
    --codermex-mint: #72d99d;
    --codermex-navy: #0d2148;
    --codermex-ink: #182034;
    --codermex-soft: #f4f7fc;
}

body {
    color: var(--codermex-ink);
}

.heading .heading-title {
    letter-spacing: -0.035em;
}

.heading .heading-desc {
    line-height: 1.75;
}

.hero-minimal {
    background: var(--codermex-soft);
    min-height: 720px;
    padding: 190px 0 110px;
}

.hero-minimal::before,
.hero-minimal::after {
    position: absolute;
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.hero-minimal::before {
    top: -260px;
    right: -150px;
    width: 620px;
    height: 620px;
    background: radial-gradient(circle, rgba(22, 168, 245, 0.14), rgba(20, 87, 245, 0) 68%);
    animation: none;
}

.hero-minimal::after {
    bottom: -260px;
    left: -180px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(114, 217, 157, 0.12), rgba(114, 217, 157, 0) 68%);
    animation: none;
}

.hero-minimal .container {
    position: relative;
    z-index: 1;
}

.hero-copy {
    max-width: 650px;
    padding-right: 42px;
}

.feature-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 520px;
    padding: 36px;
}

.feature-visual img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    max-width: 540px;
}

.feature-visual::before {
    position: absolute;
    inset: 16% 12%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(20, 87, 245, 0.08), rgba(20, 87, 245, 0) 70%);
    content: "";
    transform: scale(0.9);
    transition: transform 800ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.feature-visual.is-visible::before {
    transform: scale(1.08);
}

.feature-visual--hero {
    min-height: auto;
    padding: 0;
}

.feature-visual--hero img {
    max-width: 680px;
    transform: translate3d(var(--move-x, 0), var(--move-y, 0), 0);
    transition: transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.feature-visual--wide img {
    max-width: 650px;
}

.feature-visual--wide::after {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 12%;
    width: 16%;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(22, 168, 245, 0.9), transparent);
    content: "";
    opacity: 0;
}

.feature-visual--wide.is-visible::after {
    animation: none;
}

.services-section > .container > .heading,
.portfolio-section > .container > .heading {
    max-width: 790px;
    margin-right: auto;
    margin-left: auto;
}

.cta-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border: 1px solid var(--codermex-blue);
    border-radius: 10px;
    background: var(--codermex-blue);
    color: #fff;
    font-weight: 600;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.cta-link:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(20, 87, 245, 0.2);
}

.cta-link span {
    transition: transform 180ms ease;
}

.cta-link:hover span {
    transform: translateX(4px);
}

.cta-link--outline {
    background: transparent;
    color: var(--codermex-blue);
}

.cta-link--outline:hover {
    background: var(--codermex-blue);
}

.portfolio-section .block-testimonial.layout-03 .item {
    border: 1px solid #e8edf6;
    border-radius: 14px;
    background: #fff;
    transition: transform 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}

.portfolio-section .block-testimonial.layout-03 .item:hover {
    border-color: rgba(20, 87, 245, 0.22);
    transform: translateY(-5px);
    box-shadow: 0 16px 36px rgba(13, 33, 72, 0.08);
}

.footer {
    border-top: 1px solid #e8edf6;
}

.motion-ready [data-reveal] {
    opacity: 0;
    filter: blur(5px);
    transition: opacity 850ms ease, filter 850ms ease, transform 1050ms cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

.motion-ready [data-reveal="up"] {
    transform: translate3d(0, 28px, 0);
}

.motion-ready [data-reveal="left"] {
    transform: translate3d(-34px, 0, 0);
}

.motion-ready [data-reveal="right"] {
    transform: translate3d(34px, 0, 0);
}

.motion-ready [data-reveal="scale"] {
    transform: scale(0.96);
}

.motion-ready [data-reveal].is-visible {
    opacity: 1;
    filter: none;
    transform: none;
}

/* A short opening sequence: label, title, illustration, then the invitation. */
.title-cut { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.title-cut > span { display: block; }
.hero-minimal .heading-title span::after { display: none; }
.hero-minimal .heading-title .title-cut { display: block; }
.hero-minimal .heading-title .title-cut > span { display: block; }
.title-accent > span {
    color: var(--codermex-blue);
    background: linear-gradient(110deg, #075ecf 15%, #16a8f5 70%, #219969);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-minimal .heading .heading-title.size-xl {
    font-size: clamp(38px, 4.1vw, 58px);
    line-height: 1.13;
}
.hero-copy { padding-right: 12px; }
.hero-minimal .row {
    transform: translate3d(0, var(--scene-y, 0px), 0);
    opacity: var(--scene-opacity, 1);
}
.cinema-ready .hero-copy .heading-sub { animation: cinema-focus 800ms 80ms both; }
.cinema-ready .title-cut > span { animation: title-rise 1100ms 190ms cubic-bezier(.16,1,.3,1) both; }
.cinema-ready .title-cut:nth-child(2) > span { animation-delay: 340ms; }
.cinema-ready .title-cut:nth-child(3) > span { animation-delay: 490ms; }
.cinema-ready .hero-copy .heading-desc { animation: cinema-focus 1000ms 670ms both; }
.cinema-ready .hero-copy .cta-link { animation: cinema-focus 900ms 870ms both; }
.cinema-ready .feature-visual--hero { animation: visual-arrive 1500ms 350ms cubic-bezier(.16,1,.3,1) both; }
.cinema-ready .hero-minimal::before { animation: ambient-orbit 4500ms ease-out both; }
.cinema-ready .hero-minimal::after { animation: ambient-orbit 4500ms ease-out reverse both; }
.signal-orbit {
    position: absolute;
    width: 88%;
    aspect-ratio: 1;
    border: 1px solid rgba(7,94,207,.13);
    border-radius: 50%;
    transform: rotate(-35deg) scaleY(.74);
    pointer-events: none;
}
.signal-orbit::before {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px dashed rgba(22,168,245,.14);
    border-radius: inherit;
}
.signal-orbit span {
    position: absolute; left: 50%; top: -4px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--codermex-mint);
    box-shadow: 0 0 0 5px rgba(114,217,157,.12), 0 0 22px rgba(114,217,157,.4);
}
.cinema-ready .signal-orbit { animation: signal-connect 4400ms ease-out both; }
.feature-visual--wide { flex-direction: column; gap: 30px; }
.feature-visual--wide::after { display: none; }
.workflow-sequence {
    list-style: none; display: flex; width: 100%; gap: 0;
    padding: 0; margin: 0; position: relative; z-index: 2;
    border: 1px solid rgba(7,94,207,.12); border-radius: 14px;
    background: rgba(255,255,255,.75); overflow: hidden;
}
.workflow-sequence li {
    flex: 1; position: relative; padding: 14px 8px;
    color: #40516a; font-size: 12px; text-align: center;
}
.workflow-sequence li + li { border-left: 1px solid rgba(7,94,207,.1); }
.workflow-sequence li span { display: block; font-size: 10px; letter-spacing: .12em; color: #075ecf; margin-bottom: 4px; }
.workflow-sequence li::after {
    content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--codermex-blue), var(--codermex-cyan), var(--codermex-mint));
    transform: scaleX(1); transform-origin: left;
}
.motion-ready .is-visible .workflow-sequence li { animation: process-focus 1200ms 400ms both; }
.motion-ready .is-visible .workflow-sequence li:nth-child(2) { animation-delay: 1000ms; }
.motion-ready .is-visible .workflow-sequence li:nth-child(3) { animation-delay: 1600ms; }
.motion-ready .is-visible .workflow-sequence li::after { animation: process-line 900ms 650ms both; }
.motion-ready .is-visible .workflow-sequence li:nth-child(2)::after { animation-delay: 1250ms; }
.motion-ready .is-visible .workflow-sequence li:nth-child(3)::after { animation-delay: 1850ms; }
.feature-visual--pos.is-visible img { animation: pos-settle 1300ms cubic-bezier(.16,1,.3,1) both; }
.portfolio-section .block-testimonial.layout-03 .item.is-visible:hover {
    transform: translateY(-5px);
    border-color: rgba(22,168,245,.4);
    background: linear-gradient(130deg, #fff 65%, rgba(114,217,157,.07));
}
.cta-link:focus-visible { outline: 3px solid var(--codermex-cyan); outline-offset: 5px; }
.motion-ready [data-reveal]:focus-within { opacity: 1; filter: none; transform: none; }
/* Full-screen opening: type, hold, then dock into the existing headline. */
.intro-active .hero-copy .heading-title { opacity: 0; }
.intro-played .hero-copy .title-cut > span { animation: none; }
.intro-active:not(.cinema-ready) .site-header,
.intro-active:not(.cinema-ready) .hero-copy .heading-sub,
.intro-active:not(.cinema-ready) .hero-copy .heading-desc,
.intro-active:not(.cinema-ready) .hero-copy .cta-link,
.intro-active:not(.cinema-ready) .feature-visual--hero { opacity: 0; }
.intro-played.cinema-ready .site-header { animation: cinema-focus 900ms 100ms both; }
.title-intro { position: fixed; inset: 0; z-index: 100000; }
.title-intro::before {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 85% 18%, rgba(22,168,245,.12), transparent 45%),
        radial-gradient(ellipse at 12% 90%, rgba(114,217,157,.10), transparent 42%), var(--codermex-soft);
    transition: opacity 900ms cubic-bezier(.4,0,.2,1);
}
.title-intro.is-docking::before { opacity: 0; }
.title-intro-line {
    position: absolute; top: 0; left: 0; display: block; width: max-content;
    white-space: pre; transform-origin: top left; color: #111;
    will-change: transform;
}
.title-intro-accent {
    color: var(--codermex-blue);
    background: linear-gradient(110deg, #075ecf 15%, #16a8f5 70%, #219969);
    background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.title-intro-line.is-typing::after {
    content: ""; display: inline-block; width: 3px; height: .8em; margin-left: .07em;
    background: var(--codermex-cyan); vertical-align: -.02em;
}
.title-intro-skip {
    pointer-events: auto; position: absolute; bottom: max(28px, env(safe-area-inset-bottom)); right: 28px;
    padding: 8px 12px; border: 1px solid rgba(7,94,207,.16); border-radius: 30px;
    background: transparent; color: #40516a; font: 12px "Poppins", sans-serif;
    cursor: pointer; transition: opacity 200ms;
}
.title-intro-skip:hover { background: #fff; }
.title-intro-skip:focus-visible { outline: 2px solid var(--codermex-blue); outline-offset: 4px; }
.title-intro.is-docking .title-intro-skip { opacity: 0; pointer-events: none; }
@keyframes title-rise {
    from { transform: translateY(110%) rotate(2deg); filter: blur(7px); opacity: 0; }
    to { transform: none; filter: none; opacity: 1; }
}
@keyframes cinema-focus {
    from { transform: translateY(15px); filter: blur(5px); opacity: 0; }
    to { transform: none; filter: none; opacity: 1; }
}
@keyframes visual-arrive {
    from { transform: perspective(1000px) rotateY(-9deg) translateY(24px) scale(.94); filter: blur(9px); opacity: 0; }
    to { transform: none; filter: none; opacity: 1; }
}
@keyframes signal-connect {
    from { opacity: 0; transform: rotate(-75deg) scaleY(.74) scale(.9); }
    to { opacity: 1; transform: rotate(-35deg) scaleY(.74) scale(1); }
}
@keyframes process-focus {
    from { color: #68798c; background: transparent; }
    45% { color: #075ecf; background: rgba(22,168,245,.09); }
    to { color: #40516a; background: transparent; }
}
@keyframes process-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pos-settle { from { transform: perspective(900px) rotateY(7deg) scale(.96); } to { transform: none; } }
@media (max-width: 991px) {
    .hero-minimal .heading .heading-title.size-xl { font-size: clamp(32px, 6.7vw, 54px); }
    .hero-copy { padding-right: 0; }
    .signal-orbit { width: min(75%, 480px); }
    .hero-minimal .row { transform: none; opacity: 1; }
    .motion-ready [data-reveal="left"], .motion-ready [data-reveal="right"] { transform: translateY(20px); }
    .motion-ready [data-reveal].is-visible { transform: none; }
}

@keyframes ambient-orbit {
    from {
        transform: translate3d(-12px, -8px, 0) scale(0.96);
    }
    to {
        transform: translate3d(34px, 24px, 0) scale(1.08);
    }
}

@keyframes workflow-trace {
    0%, 15% {
        left: 12%;
        opacity: 0;
    }
    32% {
        opacity: 0.8;
    }
    75% {
        left: 74%;
        opacity: 0.8;
    }
    90%, 100% {
        left: 78%;
        opacity: 0;
    }
}

@media (max-width: 991px) {
    .hero-minimal {
        min-height: auto;
        padding: 150px 0 72px;
    }

    .hero-copy {
        padding-right: 0;
    }

    .feature-visual {
        min-height: auto;
        padding: 48px 20px;
    }

    .pdl50,
    .pdr80 {
        padding-right: 0;
        padding-left: 0;
    }
}

@media (max-width: 575px) {
    .hero-minimal {
        padding-top: 128px;
    }

    .hero-minimal .heading .heading-title.size-xl {
        font-size: clamp(28px, 7.4vw, 42px);
        line-height: 1.08;
    }

    .feature-visual {
        padding: 32px 0;
    }
}

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

    .motion-ready [data-reveal] {
        opacity: 1;
        transform: none;
        filter: none;
    }
    .hero-minimal .row, .feature-visual--hero img { transform: none; opacity: 1; }
}
