/* =============================================
   AINK 网站 - invzi.com 风格
   ============================================= */

:root {
    --primary: #1a1a1a;
    --primary-hover: rgba(26, 26, 26, 0.85);
    --accent: #0472EB;
    --accent-hover: #035EC4;
    --text-primary: #1a1a1a;
    --text-secondary: #6b6b6b;
    --bg-primary: #FFFFFF;
    --bg-secondary: #f2f2f2;
    --border-color: rgba(26, 26, 26, 0.12);
    --success: #00a341;
    --shadow-sm: 0 2px 8px rgba(26, 26, 26, 0.1);
    --shadow-md: 0 5px 15px rgba(26, 26, 26, 0.1);
    --shadow-lg: 0 18px 50px rgba(26, 26, 26, 0.1);
    --radius-sm: 0.625rem;
    --radius-md: 0.625rem;
    --radius-lg: 1.25rem;
    --rounded-button: 3.75rem;
    --transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    line-height: 1.4;
    font-weight: 400;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

a:hover {
    opacity: 0.7;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 80px;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 80px;
}

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

.section-eyebrow {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.section-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.title-logo {
    height: 52px;
    width: auto;
    vertical-align: middle;
    margin-right: 4px;
}

.section-subtitle {
    font-size: 20px;
    line-height: 1.5;
    font-weight: 400;
    color: var(--text-secondary);
    max-width: 680px;
}

.text-center {
    text-align: center;
}

.text-center .section-subtitle {
    margin: 0 auto;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-secondary);
    transition: box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 80px;
    height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 21px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
}

.logo img {
    height: 36px;
    width: auto;
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    margin-right: 10px;
    object-fit: cover;
}

.logo:hover {
    color: var(--text-primary);
    opacity: 0.7;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-primary);
    opacity: 0.8;
    transition: var(--transition);
}

.nav-links a:hover {
    opacity: 1;
}

/* Nav CTA Button */
.nav-cta {
    padding: 8px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    opacity: 1 !important;
    color: white !important;
    border-radius: var(--rounded-button) !important;
    background: var(--accent) !important;
}

.nav-cta:hover {
    opacity: 0.85 !important;
    transform: none !important;
}

/* ===== Language Switcher ===== */
.nav-lang {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
    opacity: 1 !important;
    padding: 4px 12px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--rounded-button) !important;
    transition: var(--transition);
}

.nav-lang:hover {
    color: var(--text-primary) !important;
    border-color: var(--text-primary) !important;
    opacity: 1 !important;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--rounded-button);
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary);
    color: white;
    opacity: 0.85;
}

.btn-secondary {
    background: var(--accent);
    color: white;
    border: none;
}

.btn-secondary:hover {
    background: var(--accent-hover);
    color: white;
    opacity: 1;
}

.btn-secondary::after {
    content: none;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}

/* ===== Cards ===== */
.card {
    background: white;
    border-radius: var(--radius-md);
    padding: 40px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* ===== Footer ===== */
.footer {
    background: #000000;
    padding: 64px 0 32px;
    color: #ffffff;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: #ffffff;
    opacity: 1;
}

.footer-col p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.footer-logo img {
    height: 28px;
    width: auto;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.copyright {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* ===== Grid System ===== */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .container {
        padding: 0 40px;
    }

    .container-wide {
        padding: 0 40px;
    }

    .nav {
        padding: 0 40px;
    }

    .footer-content {
        padding: 0 40px;
    }

    .section-title {
        font-size: 44px;
    }

    .section-subtitle {
        font-size: 18px;
    }

    .grid-3, .grid-4, .grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Hamburger menu at 1024px */
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: #FFFFFF;
        flex-direction: column;
        gap: 0;
        padding: 80px 32px 32px;
        transition: right 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
        z-index: 1005;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 18px;
        padding: 14px 0;
        border-bottom: 1px solid var(--border-color);
        opacity: 1;
    }

    .nav-cta {
        margin-top: 16px;
        text-align: center;
    }

    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.35s, visibility 0.35s;
    }

    .nav-overlay.open {
        opacity: 1;
        visibility: visible;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 734px) {
    .container {
        padding: 0 20px;
    }

    .container-wide {
        padding: 0 20px;
    }

    .nav {
        padding: 0 20px;
    }

    .footer-content {
        padding: 0 20px;
    }

    .section {
        padding: 64px 0;
    }

    .section-title {
        font-size: 36px;
    }

    .section-subtitle {
        font-size: 17px;
    }

    .grid-2, .grid-3, .grid-4, .grid-5 {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

/* ===== Utility Classes ===== */
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }

.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.py-80 { padding-top: 80px; padding-bottom: 80px; }
.py-100 { padding-top: 100px; padding-bottom: 100px; }

.bg-white { background: white; }
.bg-secondary { background: var(--bg-secondary); }

/* ===== Page Load Transition ===== */
body {
    opacity: 0;
    transition: opacity 0.4s ease;
}
body.loaded {
    opacity: 1;
}

/* ===== Skip Link ===== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    z-index: 2000;
    padding: 12px 24px;
    background: var(--primary);
    color: white;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
    color: white;
    opacity: 1;
}

/* ===== Focus Visible ===== */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ===== Nav Active State ===== */
.nav-links a.active {
    opacity: 1;
    font-weight: 600;
}

/* ===== Hamburger Toggle ===== */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1010;
}
.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}
.nav-overlay {
    display: none;
}

/* ===== Scroll Reveal ===== */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}
[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}
[data-reveal="delay-1"] { transition-delay: 0.1s; }
[data-reveal="delay-2"] { transition-delay: 0.2s; }
[data-reveal="delay-3"] { transition-delay: 0.3s; }
[data-reveal="delay-4"] { transition-delay: 0.4s; }
[data-reveal="delay-5"] { transition-delay: 0.5s; }
[data-reveal="scale"] {
    transform: scale(0.95);
}
[data-reveal="scale"].revealed {
    transform: scale(1);
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: #ffffff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s, transform 0.3s, background 0.3s;
    z-index: 999;
}
.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}
.back-to-top:hover {
    opacity: 0.85;
}

/* ===== Form Validation ===== */
.form-group.has-error input,
.form-group.has-error textarea,
.form-group.has-error select {
    border-color: #f83a3a;
    background: #fee7e7;
}
.form-error {
    display: block;
    font-size: 13px;
    color: #f83a3a;
    margin-top: 6px;
}
.form-success {
    background: #e0f4e8;
    border: 1px solid var(--success);
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: center;
    color: var(--success);
    font-size: 17px;
    line-height: 1.5;
    margin-bottom: 24px;
}

/* ===== ICP ===== */
.icp {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
}
.icp a {
    color: rgba(255, 255, 255, 0.4);
}
.icp a:hover {
    color: #ffffff;
    opacity: 1;
}

/* ===== Accessibility: Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }
}
