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

:root {
    --color-text: #1a1a1a;
    --color-text-light: #888;
    --color-line: #1a1a1a;
    --color-line-light: #ccc;
    --color-accent: #1a1a1a;
    --color-bg: #fafafa;
    --color-bg-white: #ffffff;
    --font-main: 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', serif;
    --font-sans: 'Inter', 'Helvetica Neue', 'PingFang SC', sans-serif;
    --spacing-xl: 160px;
    --spacing-lg: 120px;
    --spacing-md: 80px;
    --spacing-sm: 40px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ========== Hero ========== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-white);
    overflow: hidden;
}

.hero-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.line-art {
    width: 100%;
    height: 100%;
    opacity: 0;
    animation: linesFadeIn 2s ease-out 0.5s forwards;
}

/* Horizontal lines */
.h-line {
    stroke: var(--color-line);
    stroke-width: 1;
    opacity: 0;
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
}

.h1 { animation: lineDraw 1.5s ease-out 0.8s forwards; }
.h2 { animation: lineDraw 1.5s ease-out 1.0s forwards; }
.h3 { animation: lineDraw 1.5s ease-out 1.2s forwards; }

/* Vertical lines */
.v-line {
    stroke: var(--color-line);
    stroke-width: 1;
    opacity: 0;
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
}

.v1 { animation: lineDraw 1.5s ease-out 1.0s forwards; }
.v2 { animation: lineDraw 1.5s ease-out 1.2s forwards; }
.v3 { animation: lineDraw 1.5s ease-out 1.4s forwards; }

/* Diagonal lines */
.d-line {
    stroke: var(--color-line-light);
    stroke-width: 0.5;
    opacity: 0;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.d1 { animation: lineDraw 2s ease-out 1.6s forwards; }
.d2 { animation: lineDraw 2s ease-out 1.8s forwards; }

/* Arcs - cultural imagery */
.arc {
    stroke: var(--color-line);
    stroke-width: 0.8;
    fill: none;
    opacity: 0;
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
}

.a1 { animation: lineDraw 2s ease-out 2.0s forwards; }
.a2 { animation: lineDraw 2s ease-out 2.2s forwards; stroke-dasharray: 500; stroke-dashoffset: 500; }
.a3 { animation: lineDraw 2s ease-out 2.4s forwards; stroke-dasharray: 250; stroke-dashoffset: 250; }

/* Dots */
.dot {
    fill: var(--color-accent);
    opacity: 0;
}

.d1 { animation: dotAppear 0.4s ease-out 2.0s forwards; }
.d2 { animation: dotAppear 0.4s ease-out 2.2s forwards; }
.d3 { animation: dotAppear 0.4s ease-out 2.4s forwards; }
.d4 { animation: dotAppear 0.5s ease-out 2.6s forwards; }
.d5 { animation: dotAppear 0.4s ease-out 2.8s forwards; }
.d6 { animation: dotAppear 0.4s ease-out 2.8s forwards; }

/* Hero text content */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0;
    animation: contentFadeIn 1.5s ease-out 3.0s forwards;
}

.hero-brand {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 24px;
    margin-bottom: 40px;
}

.hero-logo-text {
    font-family: var(--font-main);
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--color-text);
}

.hero-logo-sub {
    font-family: var(--font-sans);
    font-size: 1rem;
    letter-spacing: 0.5em;
    color: var(--color-text-light);
    font-weight: 300;
}

.hero-tagline {
    font-family: var(--font-main);
    font-size: 1.5rem;
    letter-spacing: 0.3em;
    margin-bottom: 24px;
    color: var(--color-text);
}

.hero-desc {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--color-text-light);
    letter-spacing: 0.1em;
    max-width: 480px;
    margin: 0 auto;
}

/* ========== Sections ========== */
.section {
    padding: var(--spacing-xl) var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-inner {
    max-width: 900px;
    width: 100%;
}

.section-title {
    font-family: var(--font-main);
    font-size: 1.75rem;
    letter-spacing: 0.2em;
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: var(--color-line);
    margin-top: 16px;
}

.section-body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 2;
    color: var(--color-text);
    letter-spacing: 0.05em;
}

.section-body.secondary {
    color: var(--color-text-light);
    margin-top: 16px;
    font-size: 0.875rem;
}

.section-body.centered {
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.em {
    font-family: var(--font-main);
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Decorative lines in sections */
.section-line-top,
.section-line-bottom {
    width: 100%;
    height: 1px;
    background: var(--color-line-light);
    margin: 0;
}

.section-line-top {
    margin-bottom: var(--spacing-md);
}

.section-line-bottom {
    margin-top: var(--spacing-md);
}

/* ========== Business Cards ========== */
.biz-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.biz-card {
    padding: var(--spacing-sm);
    border: 1px solid var(--color-line-light);
    border-radius: 0;
    transition: border-color 0.3s ease;
}

.biz-card:hover {
    border-color: var(--color-line);
}

.biz-icon {
    margin-bottom: 20px;
    color: var(--color-text);
}

.biz-icon svg {
    transition: transform 0.3s ease;
}

.biz-card:hover .biz-icon svg {
    transform: scale(1.05);
}

.biz-card h3 {
    font-family: var(--font-main);
    font-size: 1.125rem;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
}

.biz-card p {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    color: var(--color-text-light);
    line-height: 1.8;
}

/* ========== Tech Section ========== */
.tech {
    background: var(--color-bg-white);
}

.tech-visual {
    margin: var(--spacing-md) 0;
    display: flex;
    justify-content: center;
}

.tech-svg {
    width: 100%;
    max-width: 600px;
    height: auto;
}

.tech-node {
    fill: var(--color-accent);
    opacity: 0;
}

.tech-edge {
    stroke: var(--color-line-light);
    stroke-width: 1;
    opacity: 0;
}

.tech-label {
    font-family: var(--font-main);
    font-size: 14px;
    fill: var(--color-text);
    letter-spacing: 0.2em;
    opacity: 0;
}

/* ========== Footer ========== */
.footer {
    background: var(--color-bg-white);
    padding: var(--spacing-md) var(--spacing-sm);
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
}

.footer-line {
    width: 100%;
    height: 1px;
    background: var(--color-line-light);
    margin-bottom: var(--spacing-sm);
}

.footer-brand {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 24px;
}

.footer-logo {
    font-family: var(--font-main);
    font-size: 1.25rem;
    letter-spacing: 0.2em;
    font-weight: 600;
}

.footer-en {
    font-family: var(--font-sans);
    font-size: 0.625rem;
    letter-spacing: 0.3em;
    color: var(--color-text-light);
    font-weight: 300;
}

.footer-legal {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--color-text-light);
    line-height: 2;
}

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

.footer-legal a:hover {
    color: var(--color-text);
}

.beian-gongan {
    display: flex;
    align-items: center;
    gap: 4px;
}

.beian-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

.footer-location {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-top: 12px;
}

/* ========== Animations ========== */
@keyframes linesFadeIn {
    to { opacity: 1; }
}

@keyframes lineDraw {
    to {
        opacity: 1;
        stroke-dashoffset: 0;
    }
}

@keyframes dotAppear {
    to { opacity: 1; }
}

@keyframes contentFadeIn {
    to { opacity: 1; }
}

@keyframes nodeAppear {
    to { opacity: 1; }
}

@keyframes edgeAppear {
    to { opacity: 0.6; }
}

@keyframes labelAppear {
    to { opacity: 1; }
}

/* ========== Reveal on Scroll ========== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hero-logo-text {
        font-size: 2.5rem;
    }

    .hero-logo-sub {
        font-size: 0.75rem;
        letter-spacing: 0.3em;
    }

    .hero-brand {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .hero-tagline {
        font-size: 1.125rem;
    }

    .section {
        padding: var(--spacing-md) var(--spacing-sm);
    }

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

    .biz-card {
        padding: 24px;
    }

    :root {
        --spacing-xl: 100px;
        --spacing-lg: 80px;
    }
}

@media (max-width: 480px) {
    .hero-logo-text {
        font-size: 2rem;
    }

    .hero-tagline {
        font-size: 1rem;
        letter-spacing: 0.2em;
    }

    .hero-desc {
        font-size: 0.75rem;
    }

    .section-title {
        font-size: 1.25rem;
    }
}
