/* Intellineers - Version D: Dark Theme + Minimal Typography */

@import url("https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:wght@300;400;500;600&display=swap");

:root {
    --navy: #1a2744;
    --navy-dark: #0f1829;
    --blue: #00a3e0;
    --blue-light: #4fc3f7;
    --white: #ffffff;
    --gray: #a0aec0;
    --gray-dark: #4a5568;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: "DM Sans", sans-serif;
    background: linear-gradient(
        135deg,
        var(--navy-dark) 0%,
        var(--navy) 50%,
        #1e3a5f 100%
    );
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.7;
}

/* Particles container */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s ease;
}

nav.scrolled {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    padding: 1.25rem 6rem;
}

.logo {
    height: 48px;
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--blue);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--white);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 2rem;
    z-index: 1;
}

.hero-content {
    max-width: 900px;
}

/* Brand Reveal - We are intellineers / intelligent engineers */
.brand-reveal {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.prefix {
    font-family: "Instrument Serif", serif;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 400;
    font-style: italic;
    color: var(--gray);
}

.word-split {
    display: inline;
    font-family: "DM Sans", sans-serif;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 600;
    color: var(--white);
    position: relative;
    white-space: nowrap;
    letter-spacing: 0;
    word-spacing: 0;
}

.part {
    display: inline;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.part-left {
    color: var(--blue);
}

.part-middle {
    display: inline-block;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    color: var(--white);
    white-space: nowrap;
    vertical-align: bottom;
}

.part-right {
    color: var(--blue);
}

.brand-reveal:hover .part-left {
    transform: translateX(-5px);
}

.brand-reveal:hover .part-middle {
    max-width: 10ch;
    opacity: 1;
}

.brand-reveal:hover .part-right {
    transform: translateX(5px);
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeIn 1s ease 0.2s forwards;
}

.hero-tag .dot {
    width: 6px;
    height: 6px;
    background: var(--blue);
    border-radius: 50%;
    animation: pulse-dot 2s ease infinite;
}

.hero h1 {
    font-family: "Instrument Serif", serif;
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.4s forwards;
}

.hero h1 em {
    font-style: italic;
    color: var(--blue);
}

.hero p {
    font-size: 1.15rem;
    color: var(--gray);
    max-width: 550px;
    margin: 0 auto 3rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 1s ease 0.8s forwards;
}

.btn-primary {
    padding: 1rem 2rem;
    background: var(--blue);
    color: var(--navy-dark);
    font-weight: 600;
    text-decoration: none;
    border-radius: 100px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
}

.btn-primary:hover {
    background: var(--blue-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 163, 224, 0.3);
}

.btn-secondary {
    padding: 1rem 2rem;
    background: transparent;
    color: var(--white);
    font-weight: 500;
    text-decoration: none;
    border-radius: 100px;
    border: 1px solid var(--gray-dark);
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
}

.btn-secondary:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    animation: fadeIn 1s ease 1.2s forwards;
}

.scroll-indicator .mouse {
    width: 24px;
    height: 40px;
    border: 2px solid var(--gray-dark);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator .mouse::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--blue);
    border-radius: 2px;
    animation: scrollMouse 2s ease infinite;
}

/* Stats Bar Section */
.stats-bar {
    position: relative;
    z-index: 1;
    padding: 3rem 6rem;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    gap: 2rem;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    font-family: "Instrument Serif", serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 400;
    color: var(--white);
    display: inline;
}

.stat-suffix {
    font-family: "Instrument Serif", serif;
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 400;
    color: var(--blue);
}

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

/* Service Number */
.service-number {
    font-family: "Instrument Serif", serif;
    font-size: 3rem;
    font-weight: 400;
    font-style: italic;
    color: rgba(0, 163, 224, 0.15);
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    transition: color 0.3s ease;
}

.service-card:hover .service-number {
    color: rgba(0, 163, 224, 0.3);
}

/* About Section */
.about {
    position: relative;
    z-index: 1;
    padding: 10rem 6rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8rem;
    align-items: center;
}

.about-content {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.about-content.revealed {
    opacity: 1;
    transform: translateY(0);
}

.section-label {
    display: inline-block;
    color: var(--blue);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.about h2 {
    font-family: "Instrument Serif", serif;
    font-size: 3rem;
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.about p {
    color: var(--gray);
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 0.75rem 1.25rem;
    background: rgba(0, 163, 224, 0.1);
    border: 1px solid rgba(0, 163, 224, 0.2);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--blue-light);
}

.location-badge svg {
    color: var(--blue);
}

.about-visual {
    position: relative;
    height: 400px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease 0.2s;
}

.about-visual.revealed {
    opacity: 1;
    transform: translateY(0);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 2rem;
}

.tech-item {
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tech-item:hover {
    background: rgba(0, 163, 224, 0.08);
    border-color: rgba(0, 163, 224, 0.2);
}

.tech-item.expanded {
    background: rgba(0, 163, 224, 0.1);
    border-color: rgba(0, 163, 224, 0.3);
}

.tech-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tech-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: rgba(0, 163, 224, 0.1);
    border-radius: 10px;
    color: var(--blue);
    flex-shrink: 0;
}

.tech-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--white);
    flex: 1;
}

.tech-toggle {
    width: 20px;
    height: 20px;
    position: relative;
    flex-shrink: 0;
}

.tech-toggle::before,
.tech-toggle::after {
    content: "";
    position: absolute;
    background: var(--blue);
    transition: all 0.3s ease;
}

.tech-toggle::before {
    width: 12px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tech-toggle::after {
    width: 2px;
    height: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tech-item.expanded .tech-toggle::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.tech-description {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.6;
}

.tech-item.expanded .tech-description {
    max-height: 150px;
    opacity: 1;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Services Section */
.services {
    position: relative;
    z-index: 1;
    padding: 10rem 6rem;
}

.services-header {
    text-align: center;
    margin-bottom: 5rem;
}

.services-header h2 {
    font-family: "Instrument Serif", serif;
    font-size: 3rem;
    font-weight: 400;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    position: relative;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
    cursor: pointer;
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(0, 163, 224, 0.3);
}

.service-card.expanded {
    background: rgba(0, 163, 224, 0.08);
    border-color: rgba(0, 163, 224, 0.4);
}

.service-card:nth-child(2) {
    transition-delay: 0.1s;
}

.service-card:nth-child(3) {
    transition-delay: 0.2s;
}

.service-details {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s ease;
}

.service-card.expanded .service-details {
    max-height: 200px;
    opacity: 1;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.service-details li {
    color: var(--gray);
    font-size: 0.9rem;
    padding: 0.4rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.service-details li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--blue);
    border-radius: 50%;
}

.service-expand {
    display: inline-block;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--blue);
    transition: all 0.3s ease;
}

.service-card:hover .service-expand {
    color: var(--blue-light);
}

.service-card.expanded .service-expand {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
}

.service-icon {
    width: 56px;
    height: 56px;
    background: rgba(0, 163, 224, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--blue);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--blue);
    color: var(--navy-dark);
}

.service-card h3 {
    font-family: "Instrument Serif", serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Contact Section */
.contact {
    position: relative;
    z-index: 1;
    padding: 10rem 6rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 32px 32px 0 0;
    text-align: center;
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-content h2 {
    font-family: "Instrument Serif", serif;
    font-size: 3rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.contact-content p {
    color: var(--gray);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.contact-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: var(--blue);
    font-size: 1.25rem;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 1rem 2.5rem;
    background: rgba(0, 163, 224, 0.1);
    border: 1px solid rgba(0, 163, 224, 0.2);
    border-radius: 100px;
}

.contact-email:hover {
    color: var(--blue-light);
    gap: 1rem;
    background: rgba(0, 163, 224, 0.15);
    border-color: rgba(0, 163, 224, 0.4);
}

.contact-address {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--gray);
    font-size: 0.95rem;
}

.contact-address svg {
    color: var(--blue);
    flex-shrink: 0;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    color: var(--gray);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue);
    background: rgba(0, 163, 224, 0.05);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

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

.btn-submit {
    align-self: flex-start;
    padding: 1rem 2rem;
    background: var(--blue);
    color: var(--navy-dark);
    font-weight: 600;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: var(--blue-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 163, 224, 0.3);
}

/* Legal Pages */
.legal-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 10rem 6rem 6rem;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h1 {
    font-family: "Instrument Serif", serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 400;
    margin-bottom: 3rem;
    color: var(--white);
}

.legal-content h2 {
    font-family: "Instrument Serif", serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.legal-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.legal-content p {
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-content a {
    color: var(--blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.legal-content a:hover {
    color: var(--blue-light);
}

.legal-content strong {
    color: var(--white);
    font-weight: 600;
}

.legal-content em {
    color: var(--gray);
    font-style: italic;
}

/* Footer */
footer {
    position: relative;
    z-index: 1;
    padding: 2rem 6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    font-size: 0.85rem;
}

.footer-location svg {
    color: var(--blue);
}

footer p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--white);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scrollMouse {
    0%,
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    50% {
        opacity: 0.3;
        transform: translateX(-50%) translateY(10px);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    nav {
        padding: 1.5rem 3rem;
    }

    nav.scrolled {
        padding: 1rem 3rem;
    }

    .stats-bar {
        padding: 2.5rem 3rem;
    }

    .stats-container {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .stat-item {
        flex: 1 1 45%;
    }

    .about,
    .contact {
        grid-template-columns: 1fr;
        padding: 6rem 3rem;
        gap: 4rem;
    }

    .services {
        padding: 6rem 3rem;
    }

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

    footer {
        padding: 2rem 3rem;
    }
}

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

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .stats-bar {
        padding: 2rem 1.5rem;
    }

    .stats-container {
        gap: 1rem;
    }

    .stat-item {
        flex: 1 1 45%;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-suffix {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .services {
        padding: 4rem 1.5rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .service-card.expanded .service-details {
        max-height: 300px;
    }

    .about h2,
    .services-header h2,
    .contact-content h2 {
        font-size: 2rem;
    }

    .about {
        padding: 4rem 1.5rem;
    }

    .tech-grid {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .contact {
        padding: 4rem 1.5rem;
    }

    .legal-page {
        padding: 8rem 1.5rem 4rem;
    }
}
