﻿/* === LAYOUT CSS - EMBEDDED === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #1e40af;
    --primary-red: #7f1d1d;
    --accent-gold: #facc15;
    --muted-gold: #a68b00;
    --dark-bg: #060a14;
    --light-text: #e5e7eb;
    --dark-text: #1f2937;
    --white: #ffffff;
    --safe-top: env(safe-area-inset-top, 0px);
}

html {
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark-bg);
    color: var(--light-text);
    overflow-x: hidden;
    overflow-y: visible;
    line-height: 1.6;
    margin: 0;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
}

/* === PAGE WRAPPER === */
.page-wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.main-content {
    flex: 1;
}

/* === BACKGROUND === */
body.page-shell .main-content {
    background:
        radial-gradient(circle at 18% 0%, rgba(57, 208, 255, 0.06), transparent 34rem),
        radial-gradient(circle at 86% 14%, rgba(217, 70, 239, 0.05), transparent 32rem),
        linear-gradient(180deg, #060a14 0%, #07111f 42%, #050814 100%);
}

body.page-products .main-content {
    background:
        radial-gradient(circle at 50% 0%, rgba(var(--theme-primary-rgb, 250, 204, 21), 0.10), transparent 36rem),
        radial-gradient(circle at 84% 22%, rgba(var(--theme-secondary-rgb, 59, 130, 246), 0.08), transparent 30rem),
        linear-gradient(180deg, #050816 0%, #07111f 38%, #050814 100%);
}

body.page-contact .main-content {
    background:
        radial-gradient(circle at 14% 4%, rgba(255, 191, 27, 0.08), transparent 30rem),
        radial-gradient(circle at 86% 12%, rgba(59, 130, 246, 0.08), transparent 32rem),
        linear-gradient(180deg, #060a14 0%, #071025 44%, #050814 100%);
}

[data-dynamic-bg="hero"] {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.hero-dynamic-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.28s ease;
    background:
        radial-gradient(circle at 18% 24%, rgba(57, 208, 255, 0.08), transparent 34%),
        radial-gradient(circle at 82% 18%, rgba(217, 70, 239, 0.08), transparent 32%),
        linear-gradient(180deg, rgba(4, 9, 24, 0.92), rgba(5, 8, 20, 0.96));
}

.hero-dynamic-bg.shader-ready {
    opacity: 1;
}

.shader-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
    pointer-events: none;
}

.coverflow-section > .container {
    position: relative;
    z-index: 2;
}

@media (max-width: 900px), (hover: none), (pointer: coarse) {
    .desktop-shader-layer {
        display: none !important;
    }
}

/* === FOOTER === */
.footer {
    flex-shrink: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(30px) saturate(1.4);
    -webkit-backdrop-filter: blur(30px) saturate(1.4);
    border-top: 1px solid rgba(250, 204, 21, 0.15);
    box-shadow: 0 -4px 40px rgba(0,0,0,0.3), inset 0 1px 0 rgba(250,204,21,0.08);
    padding: 4rem 0 0;
    width: 100%;
    position: relative;
    z-index: 10;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 1rem 2rem;
}

.footer-main {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.footer-brand:hover .footer-logo {
    transform: scale(1.1);
}

.footer-brand p {
    color: var(--light-text);
    opacity: 0.8;
    font-size: 0.95rem;
}

.footer-links {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.footer-column {
    min-width: 150px;
}

    .footer-column h4 {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--accent-gold);
        margin-bottom: 1.5rem;
    }

    .footer-column a {
        display: block;
        color: var(--light-text);
        text-decoration: none;
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        transition: all 0.3s ease;
    }

        .footer-column a:hover {
            color: var(--accent-gold);
            transform: translateX(5px);
        }

.social-links {
    display: flex;
    gap: 1rem;
}

    .social-links a {
        font-size: 1.5rem;
        color: var(--light-text);
        transition: all 0.3s ease;
    }

        .social-links a:hover {
            color: var(--accent-gold);
            transform: scale(1.2);
        }

.footer-bottom {
    border-top: 1px solid rgba(250, 204, 21, 0.2);
    padding-top: 2rem;
    padding-bottom: 1rem;
    text-align: center;
}

.footer-info p {
    font-size: 0.9rem;
    color: var(--light-text);
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.footer-info a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

    .footer-info a:hover {
        color: var(--accent-gold);
    }

.footer-info i {
    margin-right: 0.5rem;
    color: var(--accent-gold);
}

/* === CARD SHINE OVERLAY === */
.card-shine {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
}

/* === GLOW BORDER === */
.glow-border {
    position: relative;
}
.glow-border::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px;
    right: -1px; bottom: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(250,204,21,0.3), rgba(30,64,175,0.3), rgba(127,29,29,0.3), rgba(250,204,21,0.3));
    background-size: 300% 300%;
    animation: borderGlow 6s ease infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.glow-border:hover::before {
    opacity: 1;
}
@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* === SHARED CTA HOVER BEHAVIOR === */
.btn-primary,
.btn-secondary,
.btn-cta-primary,
.btn-cta-secondary,
.btn-ghost {
    transition:
        box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        color 0.28s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* === BUTTON RIPPLE === */
.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    transform: scale(0);
    animation: rippleOut 0.6s ease-out;
    pointer-events: none;
    width: 200px; height: 200px;
    margin-left: -100px; margin-top: -100px;
}
@keyframes rippleOut {
    to { transform: scale(3); opacity: 0; }
}

/* === SHIMMER TEXT === */
.shimmer-text {
    background-size: 200% auto !important;
    animation: shimmer 3s linear infinite !important;
}
@keyframes shimmer {
    to { background-position: 200% center; }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--muted-gold), var(--primary-blue));
    border-radius: 6px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, var(--accent-gold), var(--primary-blue));
    }

/* === GLOBAL REVEAL TRANSITION === */
.feature-card, .about-tile, .services-tile, .contact-tile,
.cta-content, .section-header, .footer-brand, .footer-column {
    transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1) !important;
}

/* === SELECTION COLOR === */
::selection {
    background: rgba(250,204,21,0.3);
    color: #fff;
}

/* === PAGE TRANSITION === */
.page-transition {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--dark-bg);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.page-transition.active {
    opacity: 1;
    pointer-events: all;
}
.transition-bar {
    position: absolute;
    top: 0; left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-gold), var(--primary-blue), var(--accent-gold));
    background-size: 200% auto;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.16,1,0.3,1);
    box-shadow: 0 0 15px rgba(250,204,21,0.5);
    animation: shimmer 1s linear infinite;
}
.page-transition.active .transition-bar {
    width: 70%;
}
.page-transition.loaded .transition-bar {
    width: 100%;
}
.transition-logo {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease 0.1s;
}
.page-transition.active .transition-logo {
    opacity: 1;
    transform: scale(1);
}
.transition-logo-img {
    width: 60px; height: 60px;
    border-radius: 12px;
    animation: transitionSpin 1s cubic-bezier(0.4,0,0.2,1) infinite;
    box-shadow: 0 0 20px rgba(250,204,21,0.3);
}
@keyframes transitionSpin {
    0%   { transform: rotate(0deg); box-shadow: 0 0 0 0 rgba(250,204,21,0.4); }
    50%  { box-shadow: 0 0 0 12px rgba(250,204,21,0); }
    100% { transform: rotate(360deg); box-shadow: 0 0 0 0 rgba(250,204,21,0.4); }
}


/* === PERFORMANCE METRICS === */
.perf-metrics {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(250,204,21,0.08);
    flex-wrap: wrap;
}
.perf-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--light-text);
    opacity: 0.5;
    transition: opacity 0.3s;
}
.perf-item:hover { opacity: 0.9; }
.perf-item i {
    color: var(--accent-gold);
    font-size: 0.7rem;
}
.perf-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.perf-value {
    font-family: 'Courier New', monospace;
    color: var(--accent-gold);
    font-weight: 700;
}

/* === GPU PARTICLE LOGO === */
.particle-logo-section {
    padding: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.particle-logo-wrap {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 400px;
    margin: 0 auto;
}
#particleLogoCanvas {
    display: block;
    width: 100%;
    height: 100%;
}
.particle-logo-hidden {
    position: absolute;
    top: 0; left: 0;
    width: 200px; height: 200px;
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .particle-logo-wrap { height: 300px; }
}


@media (max-width: 768px) {
    .perf-metrics { gap: 1rem; }
    .perf-item { font-size: 0.65rem; }
}

/* === FILM GRAIN NOISE === */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.88' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    opacity: 0.032;
    pointer-events: none;
    z-index: 9997;
}

/* === TYPEWRITER CURSOR === */
.typewriter-line {
    display: block;
    min-height: 1.15em; /* prevent layout shift while empty */
}
.tw-cursor {
    display: inline-block;
    width: 3px;
    height: 0.9em;
    background: #facc15;
    margin-left: 2px;
    vertical-align: middle;
    border-radius: 2px;
    animation: twBlink 0.75s step-end infinite;
    box-shadow: 0 0 8px rgba(250,204,21,0.8);
}
.tw-cursor--hide {
    display: none;
}
@keyframes twBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* === WORD SPLIT ANIMATION === */
.word-split .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px) rotate(2.5deg);
    animation: wordIn 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes wordIn {
    to { opacity: 1; transform: translateY(0) rotate(0deg); }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .footer-main {
        gap: 2rem;
    }

    .footer-links {
        gap: 2rem;
    }
}

@media (max-width: 900px) {
    html {
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: none;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    body {
        overflow-x: hidden;
        overflow-y: visible;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    body::-webkit-scrollbar,
    html::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
        background: transparent;
    }

    .footer-main {
        align-items: center;
        flex-direction: column;
        text-align: center;
    }

    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .footer-logo {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-brand p {
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-links {
        justify-content: center;
    }

    .footer-column {
        min-width: 100%;
    }

    .social-links {
        justify-content: center;
    }
}
