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

:root {
    --color-primary: #667eea;
    --color-secondary: #764ba2;
    --gradient: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    --color-text: #333333;
    --color-text-light: #666666;
    --color-bg: #ffffff;
    --color-bg-light: #f8f9fa;
    --color-border: #e9ecef;
    --font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --nav-height: 70px;
    --container-width: 1200px;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* === Navbar === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: background 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-logo-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.navbar.scrolled .nav-logo {
    color: var(--color-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: color 0.3s, background 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.navbar.scrolled .nav-link {
    color: var(--color-text-light);
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
    color: var(--color-primary);
    background: rgba(102, 126, 234, 0.1);
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: #fff;
    transition: background 0.3s, transform 0.3s;
}

.navbar.scrolled .nav-toggle span {
    background: var(--color-text);
}

/* Mobile */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: #fff;
        padding: 16px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu .nav-link {
        color: var(--color-text);
        padding: 12px 16px;
    }

    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active {
        color: var(--color-primary);
        background: rgba(102, 126, 234, 0.1);
    }
}

/* === Back to Top === */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
}

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

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

/* === Hero === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 0 20px;
}

/* Particle canvas */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Subtle grid overlay */
.hero-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
}

/* Decorations container */
.hero-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Pulsing tech circles */
.tech-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
}

.tech-circle-1 {
    width: 300px;
    height: 300px;
    top: -80px;
    right: -60px;
    animation: techPulse 4s ease-in-out infinite;
}

.tech-circle-2 {
    width: 200px;
    height: 200px;
    bottom: 10%;
    left: -40px;
    animation: techPulse 5s ease-in-out infinite 1s;
}

.tech-circle-3 {
    width: 120px;
    height: 120px;
    top: 30%;
    right: 15%;
    border-style: dashed;
    animation: techSpin 20s linear infinite;
}

@keyframes techPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.6; }
}

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

/* Scanning lines */
.tech-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.tech-line-1 {
    width: 200px;
    top: 25%;
    left: 5%;
    animation: lineScan 4s ease-in-out infinite;
}

.tech-line-2 {
    width: 150px;
    bottom: 30%;
    right: 8%;
    animation: lineScan 5s ease-in-out infinite 1.5s;
}

.tech-line-3 {
    width: 100px;
    top: 60%;
    left: 15%;
    animation: lineScan 3.5s ease-in-out infinite 0.8s;
}

@keyframes lineScan {
    0%, 100% { opacity: 0; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(40px); }
}

/* Code brackets */
.tech-bracket {
    position: absolute;
    font-family: 'Courier New', monospace;
    color: rgba(255,255,255,0.08);
    font-size: 4rem;
    font-weight: 700;
    user-select: none;
}

.tech-bracket-left {
    top: 20%;
    left: 8%;
    animation: bracketFloat 6s ease-in-out infinite;
}

.tech-bracket-right {
    bottom: 20%;
    right: 8%;
    animation: bracketFloat 7s ease-in-out infinite 2s;
}

@keyframes bracketFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.08; }
    50% { transform: translateY(-15px) rotate(5deg); opacity: 0.15; }
}

/* Hexagons */
.tech-hex {
    position: absolute;
    width: 50px;
    height: 28px;
    background: rgba(255,255,255,0.06);
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.tech-hex-1 {
    top: 15%;
    left: 25%;
    animation: hexFloat 8s ease-in-out infinite;
}

.tech-hex-2 {
    bottom: 25%;
    right: 20%;
    width: 35px;
    height: 20px;
    animation: hexFloat 6s ease-in-out infinite 3s;
}

@keyframes hexFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.06; }
    33% { transform: translateY(-10px) rotate(30deg); opacity: 0.12; }
    66% { transform: translateY(5px) rotate(-15deg); opacity: 0.08; }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-logo {
    margin: 0 auto 30px;
    color: #fff;
    font-size: 4rem;
    animation: heroLogoIn 1s ease-out 0.3s both;
}

@keyframes heroLogoIn {
    from { opacity: 0; transform: scale(0.5) rotate(-10deg); }
    to { opacity: 1; transform: scale(1) rotate(0deg); }
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #fff;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 40px;
}

.hero-btn {
    display: inline-block;
    padding: 14px 40px;
    background: #fff;
    color: var(--color-primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* === Sections Common === */
.section {
    padding: 100px 0;
}

.section:nth-child(even) {
    background: var(--color-bg-light);
}

.section-title {
    text-align: center;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient);
    border-radius: 2px;
}

/* === About === */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 80px;
}

.about-text p {
    color: var(--color-text-light);
    margin-bottom: 16px;
    line-height: 1.8;
}

.about-image-placeholder {
    border-radius: 12px;
    overflow: hidden;
}

.about-image-placeholder svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Timeline */
.timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding-top: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-border);
}

.timeline-item {
    text-align: center;
    position: relative;
    flex: 1;
}

.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--gradient);
    margin: 0 auto 20px;
    position: relative;
    z-index: 1;
}

.timeline-year {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.timeline-content p {
    color: var(--color-text-light);
    font-size: 0.9rem;
    padding: 0 10px;
}

@media (max-width: 768px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .timeline {
        flex-direction: column;
        gap: 30px;
        padding-left: 30px;
    }

    .timeline::before {
        top: 0;
        bottom: 0;
        left: 7px;
        right: auto;
        width: 2px;
        height: auto;
    }

    .timeline-item {
        text-align: left;
    }

    .timeline-dot {
        position: absolute;
        left: -30px;
        top: 4px;
        margin: 0;
    }
}

/* === Services === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--color-border);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
}

.service-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    background: var(--gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.service-icon svg {
    width: 36px;
    height: 36px;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

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

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === Cases === */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.case-card {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--color-border);
    transition: transform 0.3s, box-shadow 0.3s;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.case-cover {
    height: 180px;
    position: relative;
    overflow: hidden;
}

/* Cover animated shapes */
.cover-shape {
    position: absolute;
    opacity: 0.2;
}

.shape-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #fff;
    top: 20px;
    right: 30px;
    animation: shapeFloat 6s ease-in-out infinite;
}

.shape-square {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 6px;
    bottom: 25px;
    left: 25px;
    animation: shapeSpin 8s linear infinite;
}

.shape-triangle {
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 44px solid #fff;
    top: 30px;
    left: 40%;
    animation: shapeFloat 7s ease-in-out infinite reverse;
}

.shape-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    bottom: 30px;
    right: 20%;
    animation: shapePulse 3s ease-in-out infinite;
}

.shape-ring {
    width: 50px;
    height: 50px;
    border: 3px solid #fff;
    border-radius: 50%;
    top: 15px;
    left: 20px;
    animation: shapeSpin 10s linear infinite;
}

.shape-cross {
    width: 30px;
    height: 30px;
    top: 50%;
    right: 15%;
    transform: translateY(-50%);
    animation: shapeSpin 6s linear infinite reverse;
}

.shape-cross::before,
.shape-cross::after {
    content: '';
    position: absolute;
    background: #fff;
    border-radius: 2px;
}

.shape-cross::before {
    width: 100%;
    height: 4px;
    top: 50%;
    transform: translateY(-50%);
}

.shape-cross::after {
    width: 4px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

@keyframes shapeFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

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

@keyframes shapePulse {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.5); opacity: 0.35; }
}

.case-card:hover .cover-shape {
    opacity: 0.35;
    transition: opacity 0.3s;
}

.case-body {
    padding: 24px;
}

.case-body h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.case-body p {
    color: var(--color-text-light);
    font-size: 0.9rem;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .cases-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === News === */
.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    gap: 30px;
    padding: 30px 0;
    border-bottom: 1px solid var(--color-border);
    transition: transform 0.3s;
}

.news-item:hover {
    transform: translateX(5px);
}

.news-item:last-child {
    border-bottom: none;
}

.news-date {
    flex-shrink: 0;
    width: 80px;
    text-align: center;
}

.news-day {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.news-month {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-top: 4px;
}

.news-content h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.news-item:hover .news-content h3 {
    color: var(--color-primary);
}

.news-content p {
    color: var(--color-text-light);
    font-size: 0.9rem;
    line-height: 1.7;
}

@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        gap: 10px;
    }

    .news-date {
        text-align: left;
        display: flex;
        align-items: baseline;
        gap: 8px;
    }

    .news-day {
        font-size: 1.5rem;
    }
}

/* === Contact === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 30px;
}

.contact-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--color-primary);
    margin-top: 2px;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.contact-item p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-form input,
.contact-form textarea {
    padding: 14px 18px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: var(--font-family);
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.contact-form textarea {
    resize: vertical;
}

.contact-form button {
    padding: 14px;
    background: var(--gradient);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-family);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.contact-form button:disabled {
    opacity: 0.7;
    cursor: default;
    transform: none;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* === Footer === */
.footer {
    background: var(--color-text);
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 0;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.85);
}

.footer-logo i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.footer-logo span {
    font-size: 1.1rem;
    font-weight: 500;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 20px;
}

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

.footer-links a:hover {
    color: #fff;
}

.footer-copy {
    font-size: 0.85rem;
}

.footer-copy a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-copy a:hover {
    color: #fff;
}
