/* ============================================
   ARISE TECH SOLUTIONS — Services Styles
   ============================================ */

/* ── Variables ── */
:root {
    --sv-maroon: #8B2635;
    --sv-maroon-dark: #6B1E2B;
    --sv-maroon-deep: #4A1219;
    --sv-maroon-light: #CB2D55;
    --sv-950: #0a0a0a;
    --sv-900: #171717;
}

/* ── Base ── */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

::selection {
    background: var(--sv-maroon);
    color: #fff;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--sv-950); }
::-webkit-scrollbar-thumb { background: var(--sv-maroon-dark); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--sv-maroon); }

/* ── Noise overlay ── */
.sv-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Grid background ── */
.sv-grid-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 70% 70% at 30% 50%, black 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 70% at 30% 50%, black 30%, transparent 100%);
}

/* ── Navigation ── */
.sv-nav-link {
    position: relative;
    color: rgba(255,255,255,.5);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color .3s ease;
}

.sv-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--sv-maroon);
    transition: width .3s ease;
}

.sv-nav-link:hover {
    color: #fff;
}

.sv-nav-link:hover::after {
    width: 100%;
}

#sv-navbar.scrolled {
    background: rgba(10,10,10,.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,.04);
}

/* Nav brand visibility fix */
#sv-navbar a[href="index.html"] {
    gap: 16px;
}

#sv-navbar a[href="index.html"] img {
    height: 56px !important;
    width: auto;
    object-fit: contain;
}

#sv-navbar a[href="index.html"] .leading-tight > div:first-child {
    font-size: 1.7rem;
    line-height: 1;
    color: #fff;
    font-weight: 700;
}

#sv-navbar a[href="index.html"] .leading-tight > div:last-child {
    font-size: 0.72rem;
    letter-spacing: .32em;
    text-transform: uppercase;
    color: rgba(255,255,255,.42);
    margin-top: 6px;
}

/* ── Buttons ── */
.sv-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--sv-maroon), var(--sv-maroon-dark));
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all .3s cubic-bezier(.23,1,.32,1);
    box-shadow: 0 4px 20px rgba(139,38,53,.25);
}

.sv-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
    transition: left .5s ease;
}

.sv-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139,38,53,.35);
}

.sv-btn-primary:hover::before {
    left: 100%;
}

.sv-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: transparent;
    border: 1.5px solid rgba(139,38,53,.5);
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all .3s cubic-bezier(.23,1,.32,1);
}

.sv-btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--sv-maroon);
    transition: width .3s ease;
    z-index: -1;
}

.sv-btn-secondary:hover {
    border-color: var(--sv-maroon);
    transform: translateY(-2px);
}

.sv-btn-secondary:hover::before {
    width: 100%;
}

/* ── Hero layout fix ── */
#sv-hero {
    position: relative;
}

#sv-hero .max-w-7xl {
    position: relative;
    z-index: 2;
}

#sv-hero .max-w-4xl {
    max-width: 760px;
}

/* Desktop hero two-column layout without touching HTML */
@media (min-width: 1024px) {
    #sv-hero .max-w-7xl {
        display: grid;
        grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
        gap: 4rem;
        align-items: center;
    }

    #sv-hero .max-w-4xl {
        max-width: none;
    }

    #hero-visual {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        transform: none !important;
        width: 100% !important;
        max-width: 460px;
        justify-self: end;
        align-self: center;
        z-index: 2;
    }
}

/* ── Terminal (hero visual) ── */
.sv-terminal {
    width: 100%;
    background: rgba(15,15,15,.92);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
        0 28px 70px rgba(0,0,0,.5),
        0 0 0 1px rgba(255,255,255,.03);
}

.sv-terminal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(255,255,255,.02);
    border-bottom: 1px solid rgba(255,255,255,.05);
}

.sv-terminal-body {
    padding: 24px 22px;
    min-height: 320px;
}

.sv-term-line {
    opacity: 0;
    transform: translateY(8px);
    margin-bottom: 10px;
    white-space: normal;
    word-break: break-word;
}

.sv-term-line.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all .4s cubic-bezier(.23,1,.32,1);
}

.sv-cursor-blink span:last-child {
    animation: svBlink 1s step-end infinite;
}

@keyframes svBlink {
    50% { opacity: 0; }
}

/* ── Service cards ── */
.sv-service-card {
    background: rgba(255,255,255,.02);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 18px;
    transition: all .5s cubic-bezier(.23,1,.32,1);
    position: relative;
    overflow: hidden;
}

.sv-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--sv-maroon), transparent);
    opacity: 0;
    transition: opacity .5s ease;
}

.sv-service-card:hover {
    border-color: rgba(139,38,53,.25);
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,.3);
}

.sv-service-card:hover::before {
    opacity: 1;
}

/* Tech tags */
.sv-tech-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    color: rgba(255,255,255,.4);
    transition: all .3s ease;
}

.sv-service-card:hover .sv-tech-tag {
    border-color: rgba(139,38,53,.3);
    color: rgba(255,255,255,.6);
}

/* ── Platform cards ── */
.sv-platform-card {
    background: rgba(255,255,255,.02);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 18px;
    padding: 28px;
    transition: all .5s cubic-bezier(.23,1,.32,1);
    position: relative;
}

.sv-platform-card:hover {
    border-color: rgba(255,255,255,.1);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,.3);
}

.sv-platform-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform .3s ease;
}

.sv-platform-card:hover .sv-platform-icon {
    transform: scale(1.1) rotate(3deg);
}

/* ── Client logos ── */
.sv-client-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    border: 1px solid rgba(255,255,255,.03);
    border-radius: 14px;
    transition: all .4s ease;
    cursor: default;
}

.sv-client-logo:hover {
    border-color: rgba(255,255,255,.08);
    background: rgba(255,255,255,.015);
}

.sv-client-logo:hover div:first-child {
    color: rgba(255,255,255,.4) !important;
}

/* ── Case study cards ── */
.sv-case-card {
    background: rgba(255,255,255,.02);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 18px;
    padding: 28px;
    transition: all .5s cubic-bezier(.23,1,.32,1);
    position: relative;
}

.sv-case-card::before {
    content: '"';
    position: absolute;
    top: -8px;
    left: 20px;
    font-size: 80px;
    font-family: Georgia, serif;
    color: var(--sv-maroon);
    opacity: .1;
    line-height: 1;
    pointer-events: none;
}

.sv-case-card:hover {
    border-color: rgba(139,38,53,.2);
    transform: translateY(-5px);
}

/* ── CTA card ── */
.sv-cta-card {
    background: linear-gradient(135deg, rgba(139,38,53,.12), rgba(139,38,53,.05));
    border: 1px solid rgba(139,38,53,.2);
    border-radius: 24px;
    padding: 56px 40px;
    position: relative;
    overflow: hidden;
}

.sv-cta-card::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139,38,53,.15) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Scroll progress ── */
.sv-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--sv-maroon), var(--sv-maroon-light));
    z-index: 9999;
    transition: width .1s ease;
    width: 0;
}

/* ── Animation states ── */
[data-sv-anim] {
    opacity: 0;
    transform: translateY(40px);
    transition: all .8s cubic-bezier(.23,1,.32,1);
}

[data-sv-anim].sv-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 1023px) {
    #hero-visual {
        display: none !important;
    }
}

@media (max-width: 768px) {
    #sv-navbar a[href="index.html"] {
        gap: 12px;
    }

    #sv-navbar a[href="index.html"] img {
        height: 46px !important;
    }

    #sv-navbar a[href="index.html"] .leading-tight > div:first-child {
        font-size: 1.2rem;
    }

    #sv-navbar a[href="index.html"] .leading-tight > div:last-child {
        font-size: 0.62rem;
        letter-spacing: .24em;
    }

    .sv-cta-card {
        padding: 40px 24px;
    }

    .sv-platform-card {
        padding: 22px;
    }

    .sv-terminal-body {
        min-height: 260px;
        padding: 20px 18px;
    }

    .sv-service-card:hover,
    .sv-platform-card:hover,
    .sv-case-card:hover {
        transform: translateY(-3px);
    }
}

/* ── Module cards (product detail pages) ── */
.sv-module-card {
    background: rgba(255,255,255,.02);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 18px;
    transition: all .5s cubic-bezier(.23,1,.32,1);
    position: relative;
    overflow: hidden;
}

.sv-module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(96,165,250,.4), transparent);
    opacity: 0;
    transition: opacity .5s ease;
}

.sv-module-card:hover {
    border-color: rgba(96,165,250,.15);
    transform: translateY(-5px);
    box-shadow: 0 18px 45px rgba(0,0,0,.3);
}

.sv-module-card:hover::before {
    opacity: 1;
}

/* ── Platform card clickable state ── */
a.sv-platform-card {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.sv-platform-card:hover {
    border-color: rgba(255,255,255,.15);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,.3);
}

/* ── Product page hero grid fix ── */
#product-hero .grid.lg\:grid-cols-2 {
    align-items: center;
}

@media (max-width: 768px) {
    .sv-module-card:hover {
        transform: translateY(-3px);
    }
}