/*--------------------------------------------------------------
# Oferta / Expertise Page
--------------------------------------------------------------*/

/* === 1. Technical Grid Infrastructure === */
html {
    font-size: 62.5% !important;
    /* Base 10px for this page only */
}

body {
    font-size: 1.6rem;
    font-family: var(--font-body) !important;
    /* Text base 16px, force Inter font */
}

/* Fix footer text size - restore to normal rem base */
.footer-section {
    font-size: 16px;
    /* Use px to avoid rem scaling issues */
}

.footer-section .cta-huge-text {
    /* Use px to override rem from footer.css which is scaled down due to 62.5% html base */
    font-size: clamp(56px, 12vw, 176px) !important;
    font-family: var(--font-head) !important;
}

.footer-section .cta-huge-text.cta-asymmetric .word-1 {
    font-size: clamp(72px, 13vw, 176px) !important;
    /* Matches 4.5rem base 16px */
}

.footer-section .cta-huge-text.cta-asymmetric .word-2 {
    font-size: clamp(64px, 12vw, 160px) !important;
    /* Matches 4rem base 16px */
    font-family: var(--font-head) !important;
}

.footer-section .cta-huge-text .outline-text {
    font-family: var(--font-head) !important;
    -webkit-text-stroke: 1px var(--text-main) !important;
    text-stroke: 1px var(--text-main) !important;
}

.footer-section .cta-huge-text .word-2 {
    font-family: var(--font-head) !important;
}

.expert-hero {
    position: relative;
    padding: var(--space-32) 0 0;
    overflow: hidden;
}

.blueprint-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 0;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.tech-label {
    display: inline-block;
    font-family: var(--font-mono) !important;
    font-size: var(--text-xs) !important;
    font-weight: 400 !important;
    color: var(--color-accent-copper);
    border: 1px solid rgba(176, 112, 84, 0.3);
    padding: 4px 12px !important;
    border-radius: 2px;
    margin-bottom: var(--space-8) !important;
    letter-spacing: 0.1em !important;
    background: rgba(176, 112, 84, 0.05);
}

.expert-title {
    display: block !important;
    font-size: clamp(3rem, 10vw, 8rem) !important;
    line-height: 1.0 !important;
    height: auto !important;
    max-height: none !important;
    width: 100% !important;
    color: #fff;
    margin-bottom: var(--space-16);
}

/* === 2. HUD Specs Row === */
.spec-row {
    display: flex;
    gap: var(--space-12);
    /* Gradient Border Top */
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0.0) 0%,
            rgba(255, 255, 255, 0.15) 15%,
            rgba(255, 255, 255, 0.15) 85%,
            rgba(255, 255, 255, 0.0) 100%);
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: top center;
    padding-top: var(--space-8);
}

.spec-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.spec-item .lbl {
    font-family: var(--font-mono) !important;
    font-size: 10px !important;
    font-weight: 400 !important;
    color: var(--color-text-mono);
    letter-spacing: 0.15em !important;
}

.spec-item .val {
    font-family: var(--font-head) !important;
    font-size: var(--text-lg) !important;
    font-weight: 400 !important;
    color: #fff;
}

/* === 3. Methodology Section - Mission Control === */
.method-section {
    position: relative;
    padding: var(--space-24) 0;
    z-index: 10;
    /* Transparent to match Hero */
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    max-width: var(--container-max);
    margin: 0 auto var(--space-16);
    padding: 0 var(--space-6);
    position: relative;
}

/* Decorative HUD Line */
.section-header-row::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--container-max);
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--color-accent-copper) 20%,
            var(--color-accent-copper) 80%,
            transparent 100%);
    opacity: 0.3;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem) !important;
    color: #fff;
}

.section-sub {
    font-family: var(--font-mono) !important;
    font-size: var(--text-sm) !important;
    font-weight: 400 !important;
    color: var(--color-text-secondary);
    max-width: 400px;
    text-align: right;
}

/* === 4. Methodology Timeline === */
.timeline-wrapper {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.timeline-step {
    display: flex;
    gap: 40px;
    position: relative;
}

/* Left side - marker and line */
.step-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 60px;
}

.step-number {
    font-family: var(--font-mono) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    color: var(--color-accent-copper);
    background: rgba(176, 112, 84, 0.1);
    border: 1px solid var(--color-accent-copper);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.step-line {
    width: 2px;
    flex: 1;
    background: linear-gradient(to bottom, var(--color-accent-copper), rgba(255, 255, 255, 0.1));
    margin-top: 16px;
}

.timeline-step.last .step-line {
    display: none;
}

/* Right side - content */
.step-content {
    padding-bottom: 48px !important;
    flex: 1;
}

.timeline-step.last .step-content {
    padding-bottom: 0;
}

.step-title {
    font-family: var(--font-head) !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #fff;
    margin: 0 0 16px 0 !important;
    line-height: 1.2 !important;
}

.step-desc {
    font-family: var(--font-body) !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7 !important;
    margin: 0 0 20px 0 !important;
    max-width: 600px;
}

.step-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.step-tags .tag {
    font-family: var(--font-mono) !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px !important;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.05em !important;
}

.step-tags .tag:hover {
    border-color: var(--color-accent-copper);
    color: var(--color-accent-sand);
}

/* Responsive */
@media (max-width: 768px) {
    .timeline-step {
        gap: 24px;
    }

    .step-marker {
        width: 40px;
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .step-title {
        font-size: 18px;
    }

    .step-content {
        padding-bottom: 32px;
    }
}

/* === 5. Capabilities - DEEP DIVE ===*/
.service-deep-dive {
    padding: var(--space-4) 0;
    /* Transparent to match Hero */
}

.service-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
    align-items: center;
    position: relative;
    border-bottom: none;
}

.service-row::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--container-max);
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--color-accent-copper) 20%,
            var(--color-accent-copper) 80%,
            transparent 100%);
    opacity: 0.4;
}

.service-row:last-child::after {
    display: none;
}

.service-row.reverse {
    direction: rtl;
    /* Simple way to swap cols, text alignment needs fix below */
}

.service-row.reverse .srv-content {
    direction: ltr;
    /* Reset text direction */
    text-align: right;
}

.service-row.reverse .srv-specs {
    direction: ltr;
    /* Reset specs */
    justify-content: flex-end;
    /* Align specs right */
    text-align: right;
}

/* Visual Side */
.srv-visual {
    position: relative;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    overflow: hidden;
}

.srv-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: rgba(18, 18, 24, 0.2);
    pointer-events: none;
    z-index: 1;
}

.srv-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.srv-img-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.03);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    border: 1px dashed rgba(176, 112, 84, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Content Side */
.srv-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.srv-tag {
    font-family: var(--font-mono) !important;
    font-size: var(--text-md) !important;
    font-weight: 400 !important;
    color: var(--color-accent-copper);
    letter-spacing: 0.1em;
    margin-bottom: var(--space-4);
}

.srv-headline {
    font-size: var(--text-lg) !important;
    margin-bottom: var(--space-6);
    color: #fff;
    line-height: 1.1;
}

.srv-desc {
    font-family: var(--font-body) !important;
    font-size: var(--text-base) !important;
    font-weight: 400 !important;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8) !important;
    max-width: 500px;
    line-height: 1.5 !important;
}

.service-row.reverse .srv-desc {
    margin-left: auto;
}

/* Specs */
.srv-specs {
    display: flex;
    gap: var(--space-12);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-6);
}

.spec-head {
    display: block;
    font-family: var(--font-mono) !important;
    font-size: 10px;
    font-weight: 400 !important;
    color: var(--color-text-mono);
    margin-bottom: var(--space-2);
}

.spec-col ul {
    list-style: none;
    padding: 0;
}

.spec-col ul li {
    font-family: var(--font-mono) !important;
    font-size: 11px;
    font-weight: 400 !important;
    color: #fff;
    margin-bottom: 4px;
}

.spec-col ul li::before {
    content: '+ ';
    color: var(--color-accent-copper);
}


/* === 6. TECH STACK SECTION === */
.tech-stack-section {
    padding: var(--space-12) 0;
    max-width: 100%;
    /* Full width background */
    margin: 0;
    /* Transparent to match Hero */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.tech-stack-section .stack-header,
.tech-stack-section .stack-grid {
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--space-6);
}

.stack-header {
    margin-bottom: var(--space-6);
    text-align: left;
}

.stack-title {
    font-family: var(--font-head) !important;
    font-size: var(--text-3xl) !important;
    font-weight: 700 !important;
    color: #fff;
}

.tech-marquee-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* Elegant gradient fades on edges */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
    padding: var(--space-4) 0 0 0;
    /* Hardware acceleration to prevent adjacent element flickering */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.tech-marquee-content {
    display: flex;
    width: max-content;
    margin-bottom: var(--space-5);
    /* Enforce compositing layer for smooth animation and instant load */
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.tech-marquee-content:last-child {
    margin-bottom: 0;
}

.tech-marquee-content.row-1 {
    animation: scroll-marquee 40s linear infinite;
}

.tech-marquee-content.row-2 {
    animation: scroll-marquee-reverse 35s linear infinite;
}

.tech-marquee-wrapper:hover .tech-marquee-content {
    animation-play-state: paused;
}

.tech-marquee-group {
    display: flex;
    flex-shrink: 0;
    gap: var(--space-2);
    padding-right: var(--space-2);
}

@keyframes scroll-marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes scroll-marquee-reverse {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

.stack-item {
    font-family: var(--font-mono) !important;
    font-size: var(--text-sm) !important;
    font-weight: 400 !important;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    transition: all 0.3s;
    user-select: none;
    cursor: default;
}

.stack-item:hover {
    border-color: var(--color-accent-copper);
    color: var(--color-accent-sand);
    background: rgba(176, 112, 84, 0.1);
}

/* === 7. FAQ === */
.faq-section {
    max-width: 800px;
    /* Narrower for reading */
    margin: 0 auto;
    padding: 0 var(--space-6) var(--space-32);
    /* Hardware acceleration to prevent it from disappearing due to earlier mask-image */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    position: relative;
    z-index: 10;
}

.faq-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.faq-grid {
    display: grid;
    gap: var(--space-8);
}

.faq-item {
    /* Gradient Border Bottom */
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0.0) 0%,
            rgba(255, 255, 255, 0.15) 15%,
            rgba(255, 255, 255, 0.15) 85%,
            rgba(255, 255, 255, 0.0) 100%);
    background-size: 100% 1px;
    background-repeat: no-repeat;
    background-position: bottom center;
    padding-bottom: var(--space-8);
}

.faq-q {
    font-family: var(--font-head) !important;
    font-size: var(--text-lg) !important;
    font-weight: 700 !important;
    color: #fff;
    margin-bottom: var(--space-4) !important;
}

.faq-a {
    font-family: var(--font-body) !important;
    font-size: var(--text-base) !important;
    font-weight: 400 !important;
    color: var(--color-text-secondary);
    line-height: 1.6 !important;
    margin: 0 !important;
}

/* Responsive */
@media(max-width: 1024px) {
    .body-inner {
        grid-template-columns: 1fr;
        padding-left: var(--space-6);
    }

    .service-row,
    .service-row.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
        /* Reset desktop reverse hack */
        gap: var(--space-8);
    }

    .service-row.reverse .srv-content,
    .service-row.reverse .srv-specs {
        text-align: left;
        justify-content: flex-start;
    }

    .srv-visual {
        height: 260px;
    }

    .section-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-4);
    }

    .section-sub {
        text-align: left;
    }
}

/* Mobile Fixes */
@media (max-width: 600px) {
    .spec-row {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    .spec-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 15px;
    }

    .spec-item:last-child {
        border-bottom: none;
    }

    /* Disable mask on mobile to prevent extreme rendering bugs and disappearing sections */
    .tech-marquee-wrapper {
        -webkit-mask-image: none;
        mask-image: none;
    }
}


.text-accent-italic {
    color: var(--color-accent-copper) !important;
    font-style: italic !important;
}