/* ====================
   SECONDARY PAGES UTILITIES
   CSS additions for secondary pages
   ==================== */

/* ====================
   PROSE STYLES (for legal pages)
   ==================== */
.prose {
    max-width: none;
}

.prose h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.prose h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.prose p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.prose ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose strong {
    color: var(--text-primary);
    font-weight: 600;
}

.prose a {
    color: var(--accent-pink);
    text-decoration: none;
    transition: all 0.2s;
}

.prose a:hover {
    text-decoration: underline;
}

/* ====================
   TIMELINE STYLES
   ==================== */
.timeline-container {
    position: relative;
    padding: 4rem 0;
}

.timeline-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg,
            var(--accent-pink),
            var(--accent-purple),
            var(--accent-cyan));
    opacity: 0.2;
}

.timeline-progress-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 0%;
    background: linear-gradient(180deg, var(--accent-pink), var(--accent-purple));
    transition: height 0.3s ease;
    z-index: 1;
}

.timeline-node {
    position: relative;
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 4rem;
}

.timeline-node:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 3px solid var(--border-default);
    transition: all 0.3s;
    z-index: 2;
}

.timeline-node.active .timeline-dot {
    width: 30px;
    height: 30px;
    border-color: var(--accent-pink);
    box-shadow: 0 0 20px var(--accent-pink);
}

/* ====================
   ACCORDION STYLES
   ==================== */
.accordion-header {
    cursor: pointer;
    transition: all 0.3s;
}

.accordion-header:hover {
    color: var(--accent-pink);
}

.accordion-header.active svg {
    transform: rotate(180deg);
}

.accordion-content {
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ====================
   CHECKLIST STYLES
   ==================== */
.checklist-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    padding: 1rem;
    border-left: 2px solid var(--border-default);
    transition: all 0.3s;
    opacity: 0.5;
}

.checklist-item.checked {
    border-left-color: var(--accent-pink);
    opacity: 1;
}

.checkmark {
    width: 24px;
    height: 24px;
    stroke: var(--accent-pink);
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    transition: stroke-dashoffset 0.3s ease;
}

.checklist-item.checked .checkmark {
    stroke-dashoffset: 0;
}

/* ====================
   STATS BADGE
   ==================== */
.stat-badge {
    padding: 2rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 1rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.stat-badge:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: var(--accent-pink);
    box-shadow: 0 10px 40px rgba(255, 63, 142, 0.3);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Space Grotesk', 'DM Mono', monospace;
    background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ====================
   TECH STACK GRID
   ==================== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
}

.tech-logo {
    position: relative;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: grayscale(100%) opacity(0.5);
    transition: all 0.3s ease;
}

.tech-logo:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1) translateY(-5px);
}

.tech-logo .tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
}

.tech-logo:hover .tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* ====================
   CAROUSEL STYLES
   ==================== */
.carousel-container {
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-slide {
    min-width: 100%;
    padding: 0 1rem;
    opacity: 0;
    transition: opacity 0.5s;
}

.testimonial-slide.active {
    opacity: 1;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-default);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-dot.active {
    width: 30px;
    border-radius: 5px;
    background: var(--accent-pink);
}

/* ====================
   FORM STYLES
   ==================== */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-pink);
    box-shadow: 0 0 0 3px rgba(255, 63, 142, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* ====================
   PHASE CARDS
   ==================== */
.phase-card {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.phase-card.in-view {
    opacity: 1;
    transform: translateX(0);
}

.phase-card:nth-child(even) {
    transform: translateX(50px);
}

.phase-card:nth-child(even).in-view {
    transform: translateX(0);
}

/* ====================
   CASE STUDY CARDS
   ==================== */
.case-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.case-card:hover {
    transform: translateY(-10px) rotateX(2deg) rotateY(2deg);
    box-shadow:
        0 20px 60px rgba(255, 63, 142, 0.2),
        0 0 1px 1px rgba(255, 63, 142, 0.1);
}

/* Shine effect on hover */
.case-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            transparent 40%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.case-card:hover::before {
    transform: translateX(100%);
}

/* ====================
   INDUSTRY TABS
   ==================== */
.industry-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-default);
    margin-bottom: 2rem;
}

.industry-tab {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.industry-tab:hover {
    color: var(--text-primary);
}

.industry-tab.active {
    color: var(--accent-pink);
    border-bottom-color: var(--accent-pink);
}

.case-panel {
    display: none;
}

.case-panel.active {
    display: grid;
    animation: fadeIn 0.3s ease;
}

/* ====================
   ARCHITECTURE DIAGRAM
   ==================== */
.arch-node {
    cursor: pointer;
    transition: all 0.3s;
}

.arch-node:hover,
.arch-node.active {
    transform: scale(1.05);
}

.arch-node.active {
    filter: drop-shadow(0 0 20px var(--accent-pink));
}

.detail-panel {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s;
}

.detail-panel.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Data flow animation */
@keyframes data-flow {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

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

.data-particle {
    animation: data-flow 3s ease-in-out infinite;
}

.data-particle:nth-child(1) {
    animation-delay: 0s;
}

.data-particle:nth-child(2) {
    animation-delay: 0.5s;
}

.data-particle:nth-child(3) {
    animation-delay: 1s;
}

/* ====================
   VALUE CARDS
   ==================== */
.value-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.value-card:hover .icon {
    animation: float 2s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ====================
   FADE UP ANIMATION
   ==================== */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ====================
   GENERAL ANIMATIONS
   ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====================
   MOBILE RESPONSIVE
   ==================== */
@media (max-width: 768px) {

    .timeline-line,
    .timeline-progress-line {
        left: 1.5rem;
    }

    .timeline-node {
        flex-direction: column !important;
        padding-left: 4rem;
    }

    .timeline-dot {
        left: 1.5rem;
    }

    .tech-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 1rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .industry-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .industry-tab {
        padding: 0.75rem 1rem;
        white-space: nowrap;
    }
}

/* ====================
   CURSOR EFFECTS (Inverting Glass)
   ==================== */
.cursor-dot {
    position: fixed;
    width: 30px;
    height: 30px;
    background: #ffffff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.08s ease-out, width 0.25s ease, height 0.25s ease;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.cursor-ring {
    display: none;
}

.cursor-hover .cursor-dot {
    width: 50px;
    height: 50px;
}

@media (max-width: 768px) {

    .cursor-dot,
    .cursor-ring {
        display: none;
    }
}

/* ====================
   MAGNETIC EFFECT
   ==================== */
.magnetic-element {
    transition: transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

/* ====================
   RIPPLE EFFECT
   ==================== */
.ripple-container {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out forwards;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 63, 142, 0.4) 0%, rgba(139, 95, 255, 0.2) 50%, transparent 70%);
}

@keyframes ripple-animation {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* ====================
   BORDER MORPH EFFECT
   ==================== */
.border-morph {
    position: relative;
}

.border-morph::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-purple));
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.border-morph.in-view::after {
    width: 100%;
}

/* ====================
   SERVICE CARD 3D HOVER
   ==================== */
.service-card {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-default);
    transition: all 0.5s ease-in-out;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.service-card .card-glass {
    transform-style: preserve-3d;
    position: absolute;
    inset: 6px;
    border-radius: inherit;
    border-top-right-radius: 100%;
    background: linear-gradient(135deg, rgba(255, 63, 142, 0.05) 0%, rgba(139, 95, 255, 0.1) 100%);
    transform: translate3d(0px, 0px, 20px);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.5s ease-in-out;
    pointer-events: none;
    opacity: 0;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--accent-pink), var(--accent-purple));
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}

.service-card:hover {
    transform: rotate3d(1, 1, 0, 8deg);
    box-shadow: rgba(255, 63, 142, 0.2) 20px 30px 20px -30px, rgba(139, 95, 255, 0.15) 0px 20px 25px 0px;
    border-color: rgba(255, 63, 142, 0.3);
}

.service-card:hover .card-glass {
    opacity: 1;
}

.service-card:hover::before {
    height: 100%;
}

.service-card .card-content {
    position: relative;
    z-index: 10;
}

.service-card .card-icon {
    transition: transform 0.5s ease-in-out;
}

.service-card:hover .card-icon {
    transform: translateY(-5px);
}

/* ====================
   STACK LAYER HOVER
   ==================== */
.stack-layer {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s;
}

.stack-layer:hover {
    transform: translateX(20px);
    box-shadow: -20px 0 60px rgba(255, 63, 142, 0.15);
}

/* ====================
   CORNER ACCENT
   ==================== */
.corner-accent::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 40px 40px 0;
    border-color: transparent rgba(255, 63, 142, 0.15) transparent transparent;
    transition: border-width 0.3s ease;
}

.corner-accent:hover::before {
    border-width: 0 50px 50px 0;
}

/* ====================
   CTA PREMIUM EFFECTS
   ==================== */
.final-cta-wrapper {
    position: relative;
    display: inline-block;
}

.cta-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(ellipse at center, rgba(255, 63, 142, 0.3) 0%, rgba(139, 95, 255, 0.2) 40%, transparent 70%);
    filter: blur(30px);
    opacity: 0.6;
    animation: cta-glow-pulse 3s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes cta-glow-pulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.cta-final {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #FF3F8E, #8B5FFF);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.cta-final:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(255, 63, 142, 0.35), 0 6px 20px rgba(139, 95, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.35);
}

.cta-final::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 40%,
            rgba(255, 255, 255, 0.15) 50%,
            transparent 60%);
    animation: cta-shine 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes cta-shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* ====================
   SCROLL PROGRESS BAR
   ==================== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-pink), var(--accent-purple));
    z-index: 10001;
    width: 0%;
}

/* ====================
   GLASS PREMIUM CARD
   ==================== */
.glass-premium {
    background: rgba(20, 20, 25, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 63, 142, 0.1);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: all 0.4s ease;
}

.glass-premium:hover {
    border-color: rgba(255, 63, 142, 0.25);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 30px rgba(255, 63, 142, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ====================
   GRADIENT TEXT
   ==================== */
.gradient-text {
    background: linear-gradient(135deg, #FF3F8E 0%, #8B5FFF 50%, #00F0FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ====================
   CTA BUTTONS
   ==================== */
.cta-geometric {
    position: relative;
    padding: 16px 32px;
    background: linear-gradient(135deg, #FF3F8E, #FF6BA8);
    color: white;
    font-weight: 600;
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-geometric:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(255, 63, 142, 0.4);
}

.cta-outline {
    padding: 16px 32px;
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    font-weight: 500;
    transition: border-color 0.3s, background 0.3s;
}

.cta-outline:hover {
    border-color: var(--accent-pink);
    background: rgba(255, 63, 142, 0.05);
}

/* ====================
   ARROW LINK
   ==================== */
.arrow-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-pink);
    font-weight: 500;
    transition: gap 0.3s ease;
}

.arrow-link:hover {
    gap: 12px;
}

.arrow-link svg {
    transition: transform 0.3s ease;
}

.arrow-link:hover svg {
    transform: translateX(4px);
}