@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=Space+Grotesk:wght@400;700&display=swap');

:root {
    --bg-main: #030305;
    --bg-secondary: #0a0a0f;
    --bg-card: rgba(20, 20, 25, 0.7);
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --accent-primary: #00e5ff; /* Cyan */
    --accent-secondary: #7000ff; /* Purple */
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    --border-color: rgba(255, 255, 255, 0.1);
    --font-sans: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-main);
}

body {
    font-family: var(--font-sans);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, .font-display {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    background: rgba(3, 3, 5, 0.6);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 15px;
}

.logo-container img {
    height: 40px;
    filter: invert(1) drop-shadow(0 0 10px rgba(0, 229, 255, 0.3));
}

.logo-container h1 {
    font-size: 1.3rem;
    color: #fff;
    letter-spacing: 1px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
}

nav a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

nav a svg {
    opacity: 0.6;
    transition: var(--transition);
    flex-shrink: 0;
}

nav a:hover svg {
    opacity: 1;
    color: var(--accent-primary);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: var(--transition);
}

nav a:hover {
    color: var(--accent-primary);
}

nav a:hover::after {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 30px;
    background: var(--accent-gradient);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(0, 229, 255, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    z-index: -1;
    transition: var(--transition);
    opacity: 0;
}

.btn:hover::before {
    opacity: 1;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(0, 229, 255, 0.4);
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('images/tech-background-3.png') center/cover no-repeat;
    opacity: 0.15;
    z-index: -2;
}

.hero-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw; height: 60vw;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.1) 0%, rgba(112, 0, 255, 0.05) 40%, rgba(3, 3, 5, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

#hero .container {
    max-width: 800px;
    margin: 0;
    padding-left: 5%;
}

#hero h2 {
    font-size: 4.5rem;
    background: #fff;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

#hero h2 span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#hero p {
    font-size: 1.4rem;
    margin-bottom: 40px;
    max-width: 600px;
}

/* Sections Common */
.section {
    padding: 120px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-header h2 {
    font-size: 3.5rem;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.2rem;
}

/* About Section */
#about {
    background: var(--bg-secondary);
}

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

.about-content h3 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #fff;
}

.about-image {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    display: none;
}

.about-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid var(--accent-primary);
    border-radius: 20px;
    opacity: 0.3;
    transform: scale(0.95);
    transition: var(--transition);
}

.about-image:hover::after {
    transform: scale(1);
    opacity: 1;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    transition: var(--transition);
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Spin Animation */
.about-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    position: relative;
}

.spin-animation {
    position: relative;
    width: 320px;
    height: 320px;
}

.spin-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: corePulse 3s ease-in-out infinite;
    z-index: 5;
}

@keyframes corePulse {
    0%, 100% { filter: drop-shadow(0 0 12px rgba(0,229,255,0.6)); transform: translate(-50%,-50%) scale(1); }
    50%      { filter: drop-shadow(0 0 28px rgba(0,229,255,0.9)); transform: translate(-50%,-50%) scale(1.12); }
}

/* Orbits */
.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid rgba(0,229,255,0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.orbit-1 {
    width: 160px;
    height: 160px;
    animation: orbitRotate1 6s linear infinite;
    transform-origin: center;
    transform: translate(-50%, -50%) rotateX(70deg);
}

.orbit-2 {
    width: 220px;
    height: 220px;
    animation: orbitRotate2 8s linear infinite;
    transform-origin: center;
    transform: translate(-50%, -50%) rotateX(70deg) rotateZ(60deg);
    border-color: rgba(112,0,255,0.15);
}

.orbit-3 {
    width: 280px;
    height: 280px;
    animation: orbitRotate3 10s linear infinite;
    transform-origin: center;
    transform: translate(-50%, -50%) rotateX(70deg) rotateZ(120deg);
    border-color: rgba(0,229,255,0.1);
}

.electron {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 12px var(--accent-primary), 0 0 24px rgba(0,229,255,0.4);
}

.orbit-2 .electron {
    background: var(--accent-secondary);
    box-shadow: 0 0 12px var(--accent-secondary), 0 0 24px rgba(112,0,255,0.4);
}

.orbit-3 .electron {
    width: 7px;
    height: 7px;
    top: -3.5px;
}

@keyframes orbitRotate1 {
    from { transform: translate(-50%, -50%) rotateX(70deg) rotateZ(0deg); }
    to   { transform: translate(-50%, -50%) rotateX(70deg) rotateZ(360deg); }
}

@keyframes orbitRotate2 {
    from { transform: translate(-50%, -50%) rotateX(70deg) rotateZ(60deg); }
    to   { transform: translate(-50%, -50%) rotateX(70deg) rotateZ(420deg); }
}

@keyframes orbitRotate3 {
    from { transform: translate(-50%, -50%) rotateX(70deg) rotateZ(120deg); }
    to   { transform: translate(-50%, -50%) rotateX(70deg) rotateZ(480deg); }
}

/* FMR Wave */
.fmr-wave {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 40px;
    opacity: 0.7;
}

.fmr-wave path {
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
    animation: waveTrace 4s ease-in-out infinite;
}

@keyframes waveTrace {
    0%   { stroke-dashoffset: 600; }
    50%  { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -600; }
}

/* Magnetic field arrow */
.field-arrow {
    position: absolute;
    top: 0;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fieldPulse 3s ease-in-out infinite;
    opacity: 0.6;
}

.field-label {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--accent-primary);
    margin-top: 2px;
    font-weight: 700;
}

@keyframes fieldPulse {
    0%, 100% { opacity: 0.4; }
    50%      { opacity: 0.8; }
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat-item {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-item h4 {
    font-size: 2rem;
    color: var(--accent-primary);
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 0.9rem;
    margin: 0;
}

/* Products Section */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.product-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
    z-index: 2;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(0, 229, 255, 0.3);
}

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

.product-img-wrap {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.1);
}

.product-info {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 15px;
}

.product-info p {
    font-size: 1rem;
    margin-bottom: 25px;
    flex-grow: 1;
}

.product-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-top: auto;
}

.product-link span {
    transition: var(--transition);
}

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

/* Services */
#services {
    background: var(--bg-secondary);
}

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

.service-item {
    padding: 40px;
    background: var(--bg-main);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.service-item:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.1);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 229, 255, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    color: var(--accent-primary);
}

.service-icon img {
    width: 30px;
    filter: invert(1) sepia(1) saturate(5) hue-rotate(175deg); /* Make images cyan-ish */
}

.service-item h3 {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 15px;
}

/* Team Section */
#team {
    background: var(--bg-main);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.team-member-card {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 40px 30px;
    text-align: center;
    transition: var(--transition);
}

.team-member-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 229, 255, 0.1);
}

.team-img-wrapper {
    width: 150px;
    height: 150px;
    margin: 0 auto 25px;
    border-radius: 50%;
    padding: 4px;
    background: var(--accent-gradient);
}

.team-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
}

.team-info h3 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 5px;
}

.team-role {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.team-bio {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Partners */
#partners {
    background: var(--bg-main);
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
    opacity: 0.7;
}

.partners-grid img {
    max-height: 60px;
    filter: invert(1) grayscale(100%) brightness(1.5);
    transition: var(--transition);
}

.partners-grid img:hover {
    filter: invert(1) grayscale(0%) brightness(1);
    opacity: 1;
    transform: scale(1.05);
}

/* Contact */
#contact {
    background: var(--bg-secondary);
}

.contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: var(--bg-card);
    border-radius: 30px;
    padding: 60px;
    border: 1px solid var(--border-color);
}

.contact-info h3 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 20px;
}

.contact-details {
    margin: 40px 0;
}

.contact-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-detail-item i {
    color: var(--accent-primary);
    font-size: 1.5rem;
}

#map {
    height: 250px;
    border-radius: 15px;
    filter: invert(90%) hue-rotate(180deg) brightness(80%) contrast(120%); /* Dark map effect */
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 25px;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Clickable cards */
.product-card[data-detail],
.service-item[data-detail] {
    cursor: pointer;
}

.service-expand-hint {
    color: var(--accent-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-top: auto;
    transition: var(--transition);
}

.service-expand-hint span {
    transition: var(--transition);
}

.service-item:hover .service-expand-hint span {
    transform: translateX(5px);
}

/* Detail Modal */
.detail-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.detail-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.detail-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(30px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 80px rgba(0, 229, 255, 0.08);
}

.detail-modal-overlay.active .detail-modal {
    transform: translateY(0) scale(1);
}

.detail-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.detail-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.detail-modal-body {
    padding: 48px 40px 20px;
}

.detail-modal-body .modal-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 28px;
}

.detail-modal-body h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 12px;
}

.detail-modal-body .modal-subtitle {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.detail-modal-body .modal-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.detail-modal-body .modal-features {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}

.detail-modal-body .modal-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.detail-modal-body .modal-features li::before {
    content: '▸';
    color: var(--accent-primary);
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 1px;
}

.detail-modal-footer {
    padding: 16px 40px 36px;
    text-align: center;
}

.detail-modal-footer .btn {
    padding: 12px 32px;
    font-size: 0.9rem;
}

/* Scrollbar inside modal */
.detail-modal::-webkit-scrollbar {
    width: 6px;
}

.detail-modal::-webkit-scrollbar-track {
    background: transparent;
}

.detail-modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

@media (max-width: 600px) {
    .detail-modal-body {
        padding: 40px 24px 16px;
    }
    .detail-modal-footer {
        padding: 12px 24px 28px;
    }
    .detail-modal-body .modal-features {
        grid-template-columns: 1fr;
    }
    .detail-modal-body h3 {
        font-size: 1.4rem;
    }
}

/* Responsive */
@media (max-width: 992px) {
    .about-grid, .contact-wrap {
        grid-template-columns: 1fr;
    }
    
    #hero h2 {
        font-size: 3.5rem;
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none; /* simple mobile nav hide */
    }
    
    #hero h2 {
        font-size: 2.5rem;
    }
    
    .section-header h2 {
        font-size: 2.5rem;
    }
    
    .contact-wrap {
        padding: 30px;
    }
}