/* === 1U Website === */

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

:root {
    --bg: #0f1117;
    --bg-alt: #161922;
    --surface: #1c1f2e;
    --border: #2a2d3a;
    --text: #e4e4e7;
    --text-2: #a1a1aa;
    --text-3: #71717a;
    --accent: #818cf8;
    --accent-dim: rgba(129, 140, 248, 0.12);
    --radius: 12px;
    --font: "Inter", -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    --mono: "JetBrains Mono", "SF Mono", monospace;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Nav */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(15, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

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

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

.nav-links { display: flex; gap: 28px; }
.nav-links a {
    font-size: 14px;
    color: var(--text-2);
    font-weight: 500;
    transition: color .2s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    transition: opacity .2s;
}
.nav-cta:hover { opacity: 0.85; }

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    transition: opacity .2s;
}
.btn-primary:hover { opacity: 0.85; }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 10px;
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 15px;
    font-weight: 500;
    transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

/* Hero */
.hero {
    padding: 140px 0 80px;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
}

.hero-words {
    font-size: 15px;
    color: var(--text-2);
    margin-bottom: 12px;
}

.word-rotate {
    color: var(--accent);
    font-weight: 600;
}

.hero-title {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-2);
    max-width: 580px;
    margin: 0 auto 32px;
    line-height: 1.75;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.hero-image {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Sections */
.section {
    padding: 96px 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-head {
    text-align: center;
    margin-bottom: 56px;
}

.section-head h2 {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.section-head p {
    font-size: 16px;
    color: var(--text-2);
}

.text-accent { color: var(--accent); }

/* Cards Grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.card {
    padding: 28px 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: border-color .25s;
}

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

.card-icon {
    width: 36px;
    height: 36px;
    color: var(--accent);
    margin-bottom: 16px;
}

.card-icon svg { width: 100%; height: 100%; }

.card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card p {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.7;
}

/* Module Tags */
.module-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.module-tag {
    padding: 8px 18px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    transition: border-color .2s, color .2s;
}

.module-tag:hover {
    border-color: var(--accent);
    color: var(--text);
}

/* Split Layout */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.split-text h2 {
    font-size: clamp(24px, 3.5vw, 32px);
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.3;
    margin-bottom: 16px;
}

.split-text p {
    font-size: 15px;
    color: var(--text-2);
    line-height: 1.75;
}

.code-card {
    padding: 24px;
    border-radius: var(--radius);
    background: #0a0c12;
    border: 1px solid var(--border);
    font-family: var(--mono);
    font-size: 13px;
    line-height: 1.9;
}

.c-comment { color: var(--text-3); }
.c-fn { color: var(--accent); }
.c-str { color: #34d399; }

/* Download */
.download-block {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.download-block h2 {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 700;
    margin-bottom: 12px;
}

.download-block p {
    font-size: 15px;
    color: var(--text-2);
    margin-bottom: 32px;
}

.download-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 24px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.footer-copy {
    font-size: 13px;
    color: var(--text-3);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-3);
    transition: color .2s;
}

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

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: none;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .grid-3 { grid-template-columns: 1fr; }
    .split { grid-template-columns: 1fr; gap: 32px; }
    .hero { padding: 110px 0 60px; }
    .hero-actions { flex-direction: column; align-items: center; }
    .download-actions { flex-direction: column; align-items: center; }
    .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; }
}

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