/* CSS Custom Properties for Iridescent Border Animation */
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #080810;
    color: #d8dce8;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Page Container */
.page-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
    background: radial-gradient(ellipse at center, rgba(0, 229, 255, 0.05) 0%, transparent 70%), #080810;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255, 0, 229, 0.02) 0%, transparent 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.product-name {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.3), 0 0 40px rgba(255, 0, 229, 0.15);
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

/* 3D Cube */
.cube-container {
    perspective: 800px;
    width: 250px;
    height: 250px;
    position: relative;
    margin: 2rem 0;
}

.cube {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: spin3d 20s linear infinite;
}

.cube-face {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 1px solid;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 1.2rem;
    left: 25px;
    top: 25px;
}

.face-front {
    border-color: #00e5ff;
    box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.2), 0 0 30px rgba(0, 229, 255, 0.15);
    transform: rotateY(0deg) translateZ(100px);
    color: #00e5ff;
}

.face-back {
    border-color: #ff00e5;
    box-shadow: inset 0 0 20px rgba(255, 0, 229, 0.2), 0 0 30px rgba(255, 0, 229, 0.15);
    transform: rotateY(180deg) translateZ(100px);
    color: #ff00e5;
}

.face-right {
    border-color: #00ff88;
    box-shadow: inset 0 0 20px rgba(0, 255, 136, 0.2), 0 0 30px rgba(0, 255, 136, 0.15);
    transform: rotateY(90deg) translateZ(100px);
    color: #00ff88;
}

.face-left {
    border-color: #00e5ff;
    box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.2), 0 0 30px rgba(0, 229, 255, 0.15);
    transform: rotateY(-90deg) translateZ(100px);
    color: #00e5ff;
}

.face-top {
    border-color: #ff00e5;
    box-shadow: inset 0 0 20px rgba(255, 0, 229, 0.2), 0 0 30px rgba(255, 0, 229, 0.15);
    transform: rotateX(90deg) translateZ(100px);
    color: #ff00e5;
}

.face-bottom {
    border-color: #00ff88;
    box-shadow: inset 0 0 20px rgba(0, 255, 136, 0.2), 0 0 30px rgba(0, 255, 136, 0.15);
    transform: rotateX(-90deg) translateZ(100px);
    color: #00ff88;
}

@keyframes spin3d {
    from {
        transform: rotateX(0deg) rotateY(0deg);
    }
    to {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    color: #a8b0c0;
    font-weight: 400;
    max-width: 500px;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
}

/* Features Section */
.features-section {
    position: relative;
    padding: 6rem 2rem;
    background: #080810;
    overflow: hidden;
}

.features-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.2), transparent);
    pointer-events: none;
}

.features-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
}

.feature-panel {
    background: rgba(16, 16, 28, 0.8);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.08), 0 0 80px rgba(255, 0, 229, 0.04);
    transform-style: preserve-3d;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
    position: relative;
    overflow: hidden;
}

.feature-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    border-image: conic-gradient(from var(--angle), #00e5ff, #ff00e5, #00ff88, #00e5ff) 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-panel:hover {
    box-shadow: 0 0 60px rgba(0, 229, 255, 0.15), 0 0 120px rgba(255, 0, 229, 0.08);
    transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(20px);
}

.feature-panel:hover::before {
    opacity: 1;
    animation: rotate-gradient 3s linear infinite;
}

@keyframes rotate-gradient {
    to {
        --angle: 360deg;
    }
}

.panel-header {
    margin-bottom: 1.5rem;
}

.panel-header h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.feature-panel p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #b8c0d0;
}

/* Architecture Section */
.architecture-section {
    position: relative;
    padding: 6rem 2rem;
    background: linear-gradient(180deg, #080810 0%, rgba(0, 229, 255, 0.02) 50%, #080810 100%);
    overflow: hidden;
}

.arch-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.arch-header h2 {
    font-family: 'Syne', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}

.arch-header p {
    font-size: 1rem;
    color: #a8b0c0;
}

.arch-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.perspective-container {
    perspective: 600px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.arch-stack {
    position: relative;
    width: 90%;
    max-width: 500px;
    height: 300px;
    transform-style: preserve-3d;
    transform: rotateX(25deg) rotateZ(-5deg);
}

.arch-layer {
    position: absolute;
    width: 100%;
    height: 60px;
    border: 1px solid;
    border-radius: 8px;
    background: rgba(16, 16, 28, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    left: 0;
    right: 0;
    left: 50%;
    transform: translateX(-50%);
}

.layer-1 {
    top: 0;
    border-color: #00e5ff;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.15);
    transform: translateX(-50%) translateZ(0px);
    opacity: 1;
}

.layer-2 {
    top: 70px;
    border-color: #ff00e5;
    box-shadow: 0 0 30px rgba(255, 0, 229, 0.12);
    transform: translateX(-50%) translateZ(20px);
    opacity: 0.85;
}

.layer-3 {
    top: 140px;
    border-color: #00ff88;
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.1);
    transform: translateX(-50%) translateZ(40px);
    opacity: 0.7;
}

.layer-4 {
    top: 210px;
    border-color: #00e5ff;
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.08);
    transform: translateX(-50%) translateZ(60px);
    opacity: 0.55;
}

.layer-label {
    font-family: 'Syne', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: #ffffff;
}

.layer-content {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #a8b0c0;
}

/* Terminal Section */
.terminal-section {
    position: relative;
    padding: 6rem 2rem;
    background: #080810;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 600px;
    overflow: hidden;
}

.terminal-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 229, 0.2), transparent);
    pointer-events: none;
}

.terminal-container {
    width: 100%;
    max-width: 900px;
    background: rgba(8, 8, 16, 0.95);
    border: 2px solid transparent;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 229, 255, 0.12), 0 0 100px rgba(255, 0, 229, 0.06);
    animation: terminal-float 3s ease-in-out infinite;
}

@keyframes terminal-float {
    0%, 100% {
        transform: translateY(0px);
        box-shadow: 0 0 50px rgba(0, 229, 255, 0.12), 0 0 100px rgba(255, 0, 229, 0.06);
    }
    50% {
        transform: translateY(-10px);
        box-shadow: 0 0 70px rgba(0, 229, 255, 0.15), 0 0 140px rgba(255, 0, 229, 0.08);
    }
}

.terminal-header {
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.05), transparent);
    border-bottom: 1px solid rgba(0, 229, 255, 0.1);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #88ffbb;
    font-weight: 500;
}

.terminal-controls {
    display: flex;
    gap: 0.5rem;
}

.control-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(0, 229, 255, 0.3);
    display: inline-block;
}

.control-dot:nth-child(1) {
    background: rgba(255, 0, 229, 0.3);
}

.control-dot:nth-child(2) {
    background: rgba(0, 255, 136, 0.3);
}

.terminal-body {
    padding: 2rem 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.8;
    color: #88ffbb;
    background: rgba(8, 8, 16, 0.8);
}

.terminal-line {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    animation: line-appear 0.3s ease-out backwards;
}

.terminal-line:nth-child(1) { animation-delay: 0.1s; }
.terminal-line:nth-child(2) { animation-delay: 0.15s; }
.terminal-line:nth-child(3) { animation-delay: 0.2s; }
.terminal-line:nth-child(4) { animation-delay: 0.25s; }
.terminal-line:nth-child(5) { animation-delay: 0.3s; }
.terminal-line:nth-child(6) { animation-delay: 0.35s; }
.terminal-line:nth-child(7) { animation-delay: 0.4s; }
.terminal-line:nth-child(8) { animation-delay: 0.45s; }
.terminal-line:nth-child(9) { animation-delay: 0.5s; }
.terminal-line:nth-child(10) { animation-delay: 0.55s; }
.terminal-line:nth-child(11) { animation-delay: 0.6s; }
.terminal-line:nth-child(12) { animation-delay: 0.65s; }

@keyframes line-appear {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.prompt {
    color: #00ff88;
    font-weight: 600;
}

.command {
    color: #ffffff;
    flex: 1;
}

.output {
    color: #88ffbb;
    opacity: 0.9;
    flex: 1;
}

.status {
    color: #00e5ff;
    flex: 1;
}

.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Scan Lines Overlay */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.03) 2px,
        rgba(255, 255, 255, 0.03) 4px
    );
    pointer-events: none;
    z-index: 999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-name {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
        margin-bottom: 0.5rem;
    }

    .hero {
        height: auto;
        min-height: 70vh;
        padding: 2rem 0;
    }

    .hero-content {
        gap: 1.5rem;
    }

    .cube-container {
        width: 200px;
        height: 200px;
    }

    .cube-face {
        width: 160px;
        height: 160px;
        left: 20px;
        top: 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-panel {
        padding: 2rem 1.5rem;
    }

    .arch-header h2 {
        font-size: 1.8rem;
    }

    .arch-stack {
        width: 95%;
    }

    .arch-layer {
        height: 50px;
        font-size: 0.85rem;
        padding: 0 1.5rem;
    }

    .terminal-body {
        padding: 1.5rem 1rem;
        font-size: 0.8rem;
    }

    .terminal-line {
        margin-bottom: 0.3rem;
    }

    .features-section,
    .architecture-section,
    .terminal-section {
        padding: 4rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .product-name {
        font-size: clamp(1.2rem, 3vw, 2rem);
    }

    .cube-container {
        display: none;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .feature-panel {
        padding: 1.5rem 1rem;
    }

    .panel-header h2 {
        font-size: 1.2rem;
    }

    .arch-header h2 {
        font-size: 1.5rem;
    }

    .arch-stack {
        transform: rotateX(20deg) rotateZ(-2deg);
    }

    .arch-layer {
        height: 45px;
        padding: 0 1rem;
    }

    .layer-label {
        font-size: 0.8rem;
    }

    .layer-content {
        font-size: 0.75rem;
    }
}
