/* ============================================================
   阿若源码官网 - 前台样式（暗色科技风）
   ============================================================ */
:root {
    --bg: #0B0F24;
    --bg-2: #111633;
    --panel: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.09);
    --text-1: #F4F6FF;
    --text-2: #A5ACC8;
    --text-3: #6B7394;
    --accent: #818CF8;
    --accent-2: #22D3EE;
    --grad: linear-gradient(135deg, #818CF8, #22D3EE);
    --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg); color: var(--text-2); font-size: 15px; line-height: 1.7;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
/* SVG 保险丝：防止内联 SVG 失控放大 */
svg[viewBox] { max-width: 100%; max-height: 100%; }

.grad-text {
    background: var(--grad); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- 导航 ---------- */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
    border-bottom: 1px solid transparent;
}
.nav.scrolled {
    background: rgba(11, 15, 36, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom-color: var(--border);
}
.nav-inner {
    max-width: 1180px; margin: 0 auto; padding: 16px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
    width: 34px; height: 34px; border-radius: 10px; background: var(--grad);
    color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
    font-size: 17px; box-shadow: 0 4px 16px rgba(129, 140, 248, 0.4);
}
.logo-text { font-size: 17px; font-weight: 700; color: var(--text-1); letter-spacing: 0.5px; }
.nav-menu { display: flex; align-items: center; gap: 30px; }
.nav-menu a { color: var(--text-2); font-size: 14px; transition: color 0.2s; }
.nav-menu a:hover { color: var(--text-1); }
.nav-cta {
    padding: 8px 18px; border-radius: 99px; background: var(--grad); color: #fff !important;
    font-weight: 500; box-shadow: 0 4px 14px rgba(129, 140, 248, 0.35); transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(129, 140, 248, 0.5); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text-1); margin: 5px 0; border-radius: 2px; transition: 0.3s; }

/* ---------- Hero ---------- */
.hero {
    position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 120px 24px 80px; overflow: hidden;
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(90px); pointer-events: none; }
.hero-glow-1 { width: 560px; height: 560px; background: rgba(99, 102, 241, 0.22); top: -140px; left: 50%; margin-left: -420px; animation: float 9s ease-in-out infinite; }
.hero-glow-2 { width: 460px; height: 460px; background: rgba(34, 211, 238, 0.13); bottom: -100px; right: -80px; animation: float 11s ease-in-out infinite reverse; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-32px); } }
.hero-grid {
    position: absolute; inset: 0; pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
}
.hero-inner { position: relative; z-index: 1; max-width: 860px; }
.hero-badge {
    display: inline-block; padding: 7px 18px; border-radius: 99px; font-size: 13px;
    border: 1px solid var(--border); background: rgba(255, 255, 255, 0.05);
    color: var(--text-2); margin-bottom: 26px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.hero-title { font-size: clamp(36px, 6vw, 62px); font-weight: 800; color: var(--text-1); line-height: 1.2; letter-spacing: 1px; }
.hero-desc { margin: 24px auto 0; max-width: 640px; font-size: 16px; color: var(--text-2); }
.hero-actions { margin-top: 40px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-scroll { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); }
.hero-scroll i {
    display: block; width: 22px; height: 36px; border: 2px solid var(--text-3); border-radius: 12px; position: relative;
}
.hero-scroll i::after {
    content: ""; position: absolute; top: 6px; left: 50%; width: 3px; height: 7px; margin-left: -1.5px;
    background: var(--accent); border-radius: 2px; animation: scrollDown 1.6s ease-in-out infinite;
}
@keyframes scrollDown { 0% { opacity: 1; transform: translateY(0); } 70% { opacity: 0; transform: translateY(12px); } 100% { opacity: 0; } }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-block; padding: 13px 34px; border-radius: 12px; font-size: 15px;
    cursor: pointer; border: none; transition: transform 0.2s, box-shadow 0.2s, background 0.2s; font-family: inherit;
}
.btn-primary { background: var(--grad); color: #fff; font-weight: 600; box-shadow: 0 6px 20px rgba(129, 140, 248, 0.38); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(129, 140, 248, 0.55); }
.btn-ghost { background: rgba(255, 255, 255, 0.06); color: var(--text-1); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---------- 通用区块 ---------- */
.section { max-width: 1180px; margin: 0 auto; padding: 90px 24px; }
.section-alt { max-width: none; background: var(--bg-2); }
.section-alt > * { max-width: 1180px; margin-left: auto; margin-right: auto; }
.section-head { text-align: center; margin-bottom: 54px; }
.section-tag {
    display: inline-block; font-size: 12px; letter-spacing: 3px; color: var(--accent);
    background: rgba(129, 140, 248, 0.1); border: 1px solid rgba(129, 140, 248, 0.25);
    padding: 4px 14px; border-radius: 99px; margin-bottom: 16px;
}
.section-head h2 { font-size: 34px; font-weight: 800; color: var(--text-1); letter-spacing: 1px; }
.section-sub { margin-top: 14px; color: var(--text-3); font-size: 15px; }

/* ---------- 关于我们 ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.about-text p { margin-bottom: 16px; color: var(--text-2); }
.about-features { margin-top: 24px; display: grid; gap: 14px; }
.about-features li { display: flex; align-items: center; gap: 10px; color: var(--text-1); font-size: 14.5px; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.stat-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px 20px; text-align: center; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.stat-card:hover { transform: translateY(-4px); border-color: rgba(129, 140, 248, 0.45); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
.stat-num { font-size: 34px; font-weight: 800; color: var(--text-1); line-height: 1.1; }
.stat-num i { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat-label { margin-top: 8px; font-size: 13px; color: var(--text-3); }

/* ---------- 核心服务 ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; padding: 0 24px; }
.service-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 30px 26px; position: relative; overflow: hidden;
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.service-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: var(--grad); opacity: 0; transition: opacity 0.25s;
}
.service-card:hover { transform: translateY(-6px); border-color: rgba(129, 140, 248, 0.4); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); }
.service-card:hover::before { opacity: 1; }
.service-icon {
    width: 52px; height: 52px; border-radius: 14px; background: rgba(129, 140, 248, 0.1);
    border: 1px solid rgba(129, 140, 248, 0.2); display: flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
}
.service-card h3 { font-size: 17px; color: var(--text-1); margin-bottom: 10px; }
.service-card p { font-size: 13.5px; color: var(--text-3); line-height: 1.75; }

/* ---------- 技术栈跑马灯 ---------- */
.techs { max-width: none; padding-left: 0; padding-right: 0; }
.techs .section-head { max-width: 1180px; margin-left: auto; margin-right: auto; padding: 0 24px; }
.marquee { overflow: hidden; margin-bottom: 18px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 16px; width: max-content; animation: scrollL 36s linear infinite; }
.marquee-right .marquee-track { animation: scrollR 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scrollL { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes scrollR { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.tech-chip {
    display: flex; align-items: center; gap: 9px; padding: 11px 22px; border-radius: 99px;
    background: var(--panel); border: 1px solid var(--border); color: var(--text-1); font-size: 14px;
    white-space: nowrap; transition: border-color 0.2s;
}
.tech-chip:hover { border-color: rgba(129, 140, 248, 0.5); }
.tech-chip i { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* ---------- 合作伙伴 ---------- */
.partners-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; padding: 0 24px; }
.partner-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 30px 16px; text-align: center; display: flex; flex-direction: column; gap: 6px;
    transition: transform 0.25s, border-color 0.25s;
}
.partner-card:hover { transform: translateY(-4px); border-color: rgba(129, 140, 248, 0.4); }
.partner-name { font-weight: 700; color: var(--text-2); letter-spacing: 1px; transition: color 0.2s; }
.partner-card:hover .partner-name { color: var(--text-1); }
.partner-sub { font-size: 12.5px; color: var(--text-3); }

/* ---------- 联系我们 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.35fr; gap: 48px; align-items: start; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.contact-item svg { margin-top: 4px; flex-shrink: 0; }
.contact-item h4 { font-size: 14px; color: var(--text-3); font-weight: 500; }
.contact-item p { font-size: 16px; color: var(--text-1); }
.contact-quote {
    margin-top: 34px; padding: 22px 24px; border-left: 3px solid var(--accent);
    background: var(--panel); border-radius: 0 12px 12px 0; color: var(--text-2); font-size: 14.5px;
}
.contact-form {
    background: var(--panel); border: 1px solid var(--border); border-radius: 20px; padding: 34px;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 13px; color: var(--text-3); margin-bottom: 8px; }
.form-field input, .form-field textarea {
    width: 100%; padding: 12px 16px; border-radius: 10px; font-size: 14px; font-family: inherit;
    background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border); color: var(--text-1);
    transition: border-color 0.2s, box-shadow 0.2s; resize: vertical;
}
.form-field input:focus, .form-field textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.15);
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--text-3); }
.form-tip { margin-top: 14px; font-size: 13.5px; text-align: center; min-height: 20px; }
.form-tip.ok { color: #34D399; }
.form-tip.err { color: #F87171; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 0 24px 40px; background: var(--bg-2); }
.footer-bottom {
    max-width: 1180px; margin: 52px auto 0; padding-top: 26px; position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13px;
}
.footer-beian {
    max-width: 1180px; margin: 14px auto 0; display: flex; justify-content: center;
    flex-wrap: wrap; gap: 8px 24px; font-size: 12.5px;
}
.footer-beian a { color: var(--text-3); transition: color 0.2s; }
.footer-beian a:hover { color: var(--accent); }

/* ---------- 滚动入场动画 ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
    .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .partners-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
    .nav-menu {
        position: fixed; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
        background: rgba(11, 15, 36, 0.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
        border-bottom: 1px solid var(--border); padding: 12px 0; display: none;
    }
    .nav-menu.open { display: flex; }
    .nav-menu a { padding: 13px 24px; width: 100%; }
    .nav-toggle { display: block; }
    .services-grid, .partners-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .contact-form { padding: 24px; }
    .section { padding: 64px 20px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
