/* ============================
   QuantStack - Futuristic Styles
   ============================ */

/* CSS Variables */
:root {
    --primary: #00f0ff;
    --primary-dark: #00a8b3;
    --secondary: #7b2ff7;
    --accent: #f72585;
    --bg-dark: #000000;
    --bg-darker: #000000;
    --bg-card: rgba(10, 10, 10, 0.8);
    --bg-card-hover: rgba(20, 20, 20, 0.9);
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;
    --border-color: rgba(255, 255, 255, 0.1);
    --gradient-primary: linear-gradient(135deg, #00f0ff 0%, #7b2ff7 50%, #f72585 100%);
    --gradient-glow: linear-gradient(135deg, rgba(0, 240, 255, 0.3) 0%, rgba(123, 47, 247, 0.3) 100%);
    --shadow-glow: 0 0 40px rgba(0, 240, 255, 0.3);
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
    --transition-slow: 0.6s ease;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-dark);
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: var(--primary);
    color: var(--bg-dark);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

/* ============================
   Animated Background
   ============================ */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(50px); }
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 15s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 0.5; }
    90% { opacity: 0.5; }
    50% { transform: translateY(-100vh) translateX(50px); }
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 20s infinite ease-in-out;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -150px;
    left: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
    opacity: 0.2;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* ============================
   Navigation
   ============================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition-medium);
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    height: 5rem;
    width: auto;
    display: block;
    object-fit: contain;
    border-radius: 6px;
    filter: drop-shadow(0 2px 6px rgba(10, 10, 15, 0.4));
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
    position: absolute;
    left: calc(50% - 0.5rem);
    transform: translateX(-50%);
}

.nav-link {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-cta {
    display: block;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

/* ============================
   Buttons
   ============================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 2.4rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.25px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.btn-primary {
    background: linear-gradient(120deg, #00f0ff 0%, #7b2ff7 55%, #f72585 100%);
    color: var(--bg-dark);
    border: 1px solid transparent;
    box-shadow: 0 15px 45px rgba(0, 240, 255, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0) 100%);
    transition: var(--transition-medium);
    opacity: 0.8;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 18px 55px rgba(0, 240, 255, 0.5);
}

.btn-secondary {
    background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        linear-gradient(120deg, rgba(0, 240, 255, 0.6), rgba(123, 47, 247, 0.6)) border-box;
    color: var(--text-primary);
    border: 1px solid transparent;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.btn-secondary:hover {
    background: linear-gradient(var(--bg-card-hover), var(--bg-card-hover)) padding-box,
        linear-gradient(120deg, rgba(0, 240, 255, 0.8), rgba(123, 47, 247, 0.8)) border-box;
    transform: translateY(-3px);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 240, 255, 0.25);
}

.btn-arrow {
    width: 20px;
    height: 20px;
    transition: var(--transition-fast);
}

.btn:hover .btn-arrow {
    transform: translateX(5px);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.cta-btn {
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--gradient-primary);
    color: var(--bg-dark);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 240, 255, 0.3);
}

/* ============================
   Hero Section
   ============================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 2rem 80px;
    max-width: 1400px;
    margin: 0 auto;
    gap: 4rem;
}

.hero-content {
    flex: 1;
    max-width: 800px;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.25rem;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

.pulse {
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
}

.title-line {
    display: block;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.stat {
    text-align: left;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-suffix {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

/* Hero Visual - 3D Cube */
.hero-visual {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 500px;
}

.hero-logo {
    width: min(420px, 60vw);
    height: auto;
    display: block;
    filter: drop-shadow(0 8px 20px rgba(10, 10, 15, 0.5));
}

/* ============================
   Sections Common
   ============================ */
.section-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-tag {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ============================
   Services Section
   ============================ */
.services {
    padding: 100px 0;
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.3;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    transition: var(--transition-medium);
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-medium);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-10px);
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.service-card.featured {
    grid-row: span 1;
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 240, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition-medium);
    pointer-events: none;
}

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

.card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-glow);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.card-icon svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.card-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.card-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.card-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.check-icon {
    width: 20px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    position: relative;
}

.check-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 10px;
    border: solid var(--bg-dark);
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-fast);
}

.card-link svg {
    width: 18px;
    height: 18px;
    transition: var(--transition-fast);
}

.card-link:hover {
    gap: 1rem;
}

.card-link:hover svg {
    transform: translateX(5px);
}

/* ============================
   About Section
   ============================ */
.about {
    padding: 100px 0;
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.3;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-features {
    margin-top: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.about-feature {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    text-align: center;
    max-width: 250px;
}

.feature-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 12px;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.feature-content h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.feature-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Tech Stack Visual */
.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-stack {
    position: relative;
    width: 400px;
    height: 400px;
}

.tech-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: techRotate 30s linear infinite;
}

@keyframes techRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.tech-node {
    position: absolute;
    width: 70px;
    height: 70px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    left: 50%;
    top: 50%;
    transform-origin: center center;
    animation: nodeCounterRotate 30s linear infinite;
}

.tech-node:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg) translateX(165px); }
.tech-node:nth-child(2) { transform: translate(-50%, -50%) rotate(60deg) translateX(165px); }
.tech-node:nth-child(3) { transform: translate(-50%, -50%) rotate(120deg) translateX(165px); }
.tech-node:nth-child(4) { transform: translate(-50%, -50%) rotate(180deg) translateX(165px); }
.tech-node:nth-child(5) { transform: translate(-50%, -50%) rotate(240deg) translateX(165px); }
.tech-node:nth-child(6) { transform: translate(-50%, -50%) rotate(300deg) translateX(165px); }

@keyframes nodeCounterRotate {
    from { }
    to { }
}

.tech-node span {
    animation: nodeTextRotate 30s linear infinite;
}

@keyframes nodeTextRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

.tech-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: var(--gradient-primary);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}

.center-logo {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
    color: var(--bg-dark);
}

/* ============================
   Contact Section
   ============================ */
.contact {
    padding: 100px 0;
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--gradient-primary);
    opacity: 0.3;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    max-width: 500px;
}

.contact-text {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-method {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.method-icon {
    width: 55px;
    height: 55px;
    min-width: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 12px;
    transition: var(--transition-fast);
}

.contact-method:hover .method-icon {
    background: var(--gradient-glow);
    box-shadow: 0 5px 20px rgba(0, 240, 255, 0.2);
}

.method-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.method-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.method-value {
    font-size: 1.1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a.method-value:hover {
    color: var(--primary);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.contact-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
}

.form-header {
    margin-bottom: 2rem;
}

.form-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    outline: none;
    transition: var(--transition-fast);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.form-group label {
    position: absolute;
    left: 1.25rem;
    top: 1rem;
    font-size: 1rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: rgba(0, 240, 255, 0.03);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group select:focus + label,
.form-group select:valid + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -0.75rem;
    left: 1rem;
    font-size: 0.8rem;
    color: var(--primary);
    background: var(--bg-card);
    padding: 0 0.5rem;
}

.focus-border {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-fast);
}

.form-group input:focus ~ .focus-border,
.form-group select:focus ~ .focus-border,
.form-group textarea:focus ~ .focus-border {
    left: 0;
    width: 100%;
}

/* ============================
   Footer
   ============================ */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border-color);
}

.footer-brand {
    max-width: 350px;
}

.footer-brand .logo {
    margin-bottom: 1.25rem;
}

.footer-tagline {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.social-link:hover {
    background: var(--gradient-glow);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-3px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-column h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.footer-column a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-tagline-small {
    color: var(--text-muted);
}

/* ============================
   Responsive Design
   ============================ */
@media (max-width: 1200px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 140px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-description {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-visual {
        min-height: 350px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-visual {
        order: -1;
    }

    .tech-stack {
        width: 300px;
        height: 300px;
    }

    .tech-node {
        width: 55px;
        height: 55px;
        font-size: 0.75rem;
    }

    .tech-node:nth-child(1) { transform: translate(-50%, -50%) rotate(0deg) translateX(125px); }
    .tech-node:nth-child(2) { transform: translate(-50%, -50%) rotate(60deg) translateX(125px); }
    .tech-node:nth-child(3) { transform: translate(-50%, -50%) rotate(120deg) translateX(125px); }
    .tech-node:nth-child(4) { transform: translate(-50%, -50%) rotate(180deg) translateX(125px); }
    .tech-node:nth-child(5) { transform: translate(-50%, -50%) rotate(240deg) translateX(125px); }
    .tech-node:nth-child(6) { transform: translate(-50%, -50%) rotate(300deg) translateX(125px); }

    .tech-center {
        width: 90px;
        height: 90px;
        border-radius: 18px;
    }

    .center-logo {
        font-size: 2.5rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links,
    .nav-cta {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .hero {
        padding: 120px 1rem 60px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }

    .stat {
        text-align: center;
    }

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

    .cube-face {
        width: 120px;
        height: 120px;
    }

    .cube-face.front { transform: translateZ(60px); }
    .cube-face.back { transform: rotateY(180deg) translateZ(60px); }
    .cube-face.right { transform: rotateY(90deg) translateZ(60px); }
    .cube-face.left { transform: rotateY(-90deg) translateZ(60px); }
    .cube-face.top { transform: rotateX(90deg) translateZ(60px); }
    .cube-face.bottom { transform: rotateX(-90deg) translateZ(60px); }

    .ring-1 { width: 220px; height: 220px; }
    .ring-2 { width: 280px; height: 280px; }
    .ring-3 { width: 340px; height: 340px; }

    .section-container {
        padding: 0 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .footer-main {
        flex-direction: column;
        gap: 2.5rem;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* ============================
   Animations on Scroll
   ============================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
