/* ======================================================
   HYPHOS - Styles (Extracted from original inline <style>)
   ====================================================== */

body {
    font-family: 'Outfit', sans-serif;
    background-color: #0f172a;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(124, 58, 237, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.08) 0%, transparent 25%);
    color: #f1f5f9;
    overflow-x: hidden;
}

.gradient-text {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(135deg, #a78bfa 0%, #3b82f6 50%, #ec4899 100%);
}

/* Card Styling */
.glass-card {
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.3);
    position: relative;
}

.glass-card-hover {
    transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
}

.glass-card-hover:hover {
    border-color: rgba(var(--mesh-color-1), 0.4);
}

/* Prevent Clipping */
.prevent-clip {
    break-inside: avoid;
    overflow: visible !important;
}

/* Button Styling */
.shiny-btn {
    position: relative;
    box-shadow: 0 4px 15px rgba(var(--mesh-color-1, 79, 70, 229), 0.3);
    transition: all 0.15s ease-out;
}

.shiny-btn:hover {
    box-shadow: 0 8px 25px rgba(var(--mesh-color-1, 79, 70, 229), 0.5);
    border-color: rgba(var(--mesh-color-1, 79, 70, 229), 0.8);
}

/* --- High Fidelity CSS 3D Laptop --- */
.scene {
    width: 440px;
    height: 320px;
    perspective: 1500px;
    margin: 0 auto;
}

.laptop {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: rotateLaptop 14s linear infinite;
}

@keyframes rotateLaptop {
    0% {
        transform: rotateY(0deg) rotateX(5deg);
    }

    100% {
        transform: rotateY(360deg) rotateX(5deg);
    }
}

/* Lid/Screen */
.screen-lid {
    position: absolute;
    width: 380px;
    height: 250px;
    background: #1e293b;
    border-radius: 16px;
    transform: translateY(-30px) translateZ(-15px) rotateX(-5deg);
    transform-style: preserve-3d;
}

/* Outer Shell (Back of screen) */
.screen-lid::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #334155, #1e293b);
    border-radius: 16px;
    transform: translateZ(-2px);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Inner Bezel */
.screen-inner {
    position: absolute;
    inset: 4px;
    background: #000;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #334155;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05);
}

/* Display Panel */
.display {
    width: 95%;
    height: 90%;
    background: #0f172a;
    position: relative;
    overflow: hidden;
}

.glare {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.03) 50%, transparent 60%);
    pointer-events: none;
}

/* Base */
.base-unit {
    position: absolute;
    width: 440px;
    height: 20px;
    background: #cbd5e1;
    /* Metallic edge */
    bottom: 30px;
    left: -30px;
    transform: rotateX(90deg) translateZ(125px);
    border-radius: 10px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
    transform-style: preserve-3d;
}

.keyboard-deck {
    position: absolute;
    inset: 2px;
    background: linear-gradient(to bottom, #334155, #1e293b);
    transform: translateZ(1px);
    /* Slight lift */
    border-radius: 8px;
}

.keys {
    position: absolute;
    top: 20px;
    left: 30px;
    right: 30px;
    bottom: 50px;
    display: grid;
    grid-template-columns: repeat(14, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 4px;
    padding: 4px;
    background: #1e293b;
    border-radius: 4px;
}

.key {
    background: #0f172a;
    border-radius: 2px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.3);
    position: relative;
}

.key::after {
    content: '';
    position: absolute;
    inset: 0;
    background: #6366f1;
    opacity: 0.1;
    filter: blur(2px);
    border-radius: 2px;
    animation: keyGlow 4s infinite alternate;
}

@keyframes keyGlow {
    from {
        opacity: 0.05;
    }

    to {
        opacity: 0.2;
    }
}

.trackpad {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal.active,
.reveal-left.active,
.reveal-right.active {
    opacity: 1;
    transform: translate(0, 0);
}

/* --- Modal Laptop Adaptation --- */
.modal-scene {
    width: 100%;
    height: 100%;
    perspective: 2000px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.9);
}

.modal-laptop {
    width: 440px;
    height: 320px;
    transform-style: preserve-3d;
    transform: rotateX(10deg) rotateY(-15deg);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-laptop:hover {
    transform: rotateX(12deg) rotateY(-10deg);
}

.modal-laptop .screen-lid {
    width: 420px;
    height: 280px;
    transform-origin: bottom;
    transform: translateY(-280px) translateZ(-10px) rotateX(15deg);
    /* Slightly open */
}

.modal-laptop .base-unit {
    width: 440px;
    bottom: 0;
    left: 0;
    transform: rotateX(90deg) translateZ(0);
}

.modal-laptop .display {
    background: #000;
}

/* Power Indicator Animation */
@keyframes powerPulse {
    0% {
        opacity: 0.3;
        box-shadow: 0 0 5px rgba(168, 85, 247, 0.5);
    }

    100% {
        opacity: 1;
        box-shadow: 0 0 15px rgba(168, 85, 247, 1);
    }
}

.power-led {
    position: absolute;
    right: 20px;
    bottom: 5px;
    width: 4px;
    height: 4px;
    background: #a855f7;
    border-radius: 50%;
    animation: powerPulse 2s infinite alternate;
}

/* Terminal inside modal */
.terminal-window {
    background: rgba(15, 23, 42, 0.95);
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    padding: 12px;
    color: #10b981;
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    font-size: 11px;
    line-height: 1.4;
}

.terminal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: #333;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

#typewriter-text {
    margin-top: 30px;
    white-space: pre-wrap;
    line-height: 1.5;
    font-size: 13px;
}

.cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: #0f0;
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Modal Animations - Improved */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalSlideUp {
    from {
        transform: translateY(30px) scale(0.95);
        opacity: 0;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Code Typing Animation */
@keyframes codeFadeIn {
    from {
        opacity: 0;
        transform: translateX(-4px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.code-line {
    opacity: 0;
    animation: codeFadeIn 0.3s ease forwards;
}

/* Terminal Pulse */
@keyframes terminalPulse {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
    }

    50% {
        box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
    }
}

.terminal-window {
    animation: terminalPulse 3s ease-in-out infinite;
}

/* Legal Modal Custom Scroll */
.legal-content::-webkit-scrollbar {
    width: 8px;
}

.legal-content::-webkit-scrollbar-track {
    background: #0f172a;
}

.legal-content::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

.legal-content::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* --- Service Specific Visuals --- */
.wave-bar {
    width: 4px;
    background: #60a5fa;
    border-radius: 4px;
    animation: wave 1.2s ease-in-out infinite;
}

@keyframes wave {

    0%,
    100% {
        height: 10px;
        opacity: 0.5;
    }

    50% {
        height: 40px;
        opacity: 1;
    }
}

.phone-mockup {
    width: 220px;
    height: 440px;
    background: #1e293b;
    border: 8px solid #334155;
    border-radius: 36px;
    position: relative;
    overflow: hidden;
}

.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 20px;
    background: #334155;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.email-item {
    animation: slideInRight 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- News Carousel Styles --- */
.news-carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.news-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.news-card {
    min-width: 320px;
    max-width: 320px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .news-card {
        min-width: 400px;
        max-width: 400px;
    }
}

.news-card:hover {
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(168, 85, 247, 0.1);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 20;
    transition: all 0.2s ease;
}

.carousel-btn:hover:not(:disabled) {
    background: rgba(79, 70, 229, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.btn-prev {
    left: 10px;
}

.btn-next {
    right: 10px;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse-slow {

    0%,
    100% {
        transform: scale(1) translate(0, 0);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.1) translate(2%, 2%);
        opacity: 0.6;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 8s ease-in-out infinite;
}

.news-card-enter {
    animation: fadeInScale 0.5s ease forwards;
}

.modal-content-fade-in {
    animation: modalFadeIn 0.2s ease-out forwards;
}

/* --- Premium Service Card Enhancements --- */
:root {
    --mesh-color-1: 79, 70, 229;
    --mesh-color-2: 124, 58, 237;
}

/* Removed glow and mesh for simplicity */



.floating-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(var(--mesh-color-1), 0.1);
    border: 1px solid rgba(var(--mesh-color-1), 0.2);
    border-radius: 1.25rem;
    transition: all 0.2s ease-out;
    position: relative;
    z-index: 2;
}

.glass-card-hover:hover .floating-icon {
    border-color: rgba(var(--mesh-color-1), 0.5);
}

.premium-border {
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    border: 1px solid rgba(var(--mesh-color-1), 0.1);
    pointer-events: none;
    transition: all 0.15s ease-out;
    z-index: 3;
}

.glass-card-hover:hover .premium-border {
    border-color: rgba(var(--mesh-color-1), 0.4);
}

.service-title {
    background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.15s ease-out;
}

.glass-card-hover:hover .service-title {
    color: #fff;
}

.prevent-clip {
    contain: layout;
}

@keyframes ticker {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}