/* AOE STUDIO · 奥艺工场 — Art of Engineering */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bg:       #06060b;
    --surface:  #0d0d16;
    --text:     #d0d0da;
    --text-dim: #a5a5b2;
    --text-meta:#8b8b98;
    --heading:  #f4f4f8;
    --border:   rgba(255,255,255,0.09);
    --border-hover: rgba(255,255,255,0.16);
    --accent:   #a78bfa;
    --accent-soft: rgba(139,92,246,0.10);
    --header-bg: rgba(6,6,11,0.85);
}

[data-theme="light"] {
    --bg:       #fafafa;
    --surface:  #ffffff;
    --text:     #3f3f46;
    --text-dim: #6b6b76;
    --text-meta:#90909a;
    --heading:  #18181b;
    --border:   rgba(0,0,0,0.06);
    --border-hover: rgba(0,0,0,0.12);
    --accent:   #7c3aed;
    --accent-soft: rgba(124,58,237,0.06);
    --header-bg: rgba(250,250,250,0.85);
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
    line-height: 1.5;
}

::selection { background: rgba(139,92,246,0.25); color: #fff; }

/* ── Header ────────────────────────────────────── */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    background: var(--header-bg);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: 1160px; margin: 0 auto; padding: 0 40px;
    height: 56px; display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo {
    width: 28px; height: 28px; border-radius: 7px;
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700;
    color: #fff;
}
.brand-name { font-size: 14px; font-weight: 600; color: var(--heading); letter-spacing: -0.02em; }
.brand-sub   { font-size: 11px; color: var(--text-meta); font-family: 'JetBrains Mono', monospace; }

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
    font-size: 13px; color: var(--text-dim); text-decoration: none;
    transition: color 0.2s; font-weight: 450;
}
.nav-links a:hover { color: var(--heading); }

.theme-toggle {
    background: none; border: 1px solid var(--border);
    color: var(--text-meta); width: 34px; height: 34px; border-radius: 8px;
    cursor: pointer; font-size: 14px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.theme-toggle:hover { color: var(--heading); border-color: var(--accent); }

/* ── Hero ──────────────────────────────────────── */
.hero {
    position: relative; padding: 180px 40px 120px; overflow: hidden;
}
.hero-glow { position: absolute; border-radius: 50%; filter: blur(200px); pointer-events: none; opacity: 0.6; }
.hero-glow--main {
    width: 800px; height: 800px; top: 50%; left: 50%;
    transform: translate(-50%,-50%); background: rgba(139,92,246,0.06);
}
.hero-glow--sub {
    width: 400px; height: 400px; top: 25%; right: 15%;
    background: rgba(99,102,241,0.04);
}
.hero-inner { max-width: 680px; margin: 0 auto; text-align: center; position: relative; z-index: 10; }

.hero-pill {
    display: inline-flex; align-items: center; gap: 6px;
    margin-bottom: 48px; padding: 8px 20px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 24px; font-size: 14px; color: var(--text-dim);
}
.hero-pill span:first-child { color: var(--heading); font-weight: 500; }
.hero-pill span.sep { color: var(--text-meta); }

.hero-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px; color: var(--text-meta);
    letter-spacing: 0.08em; margin-bottom: 28px;
}
.hero-title {
    font-size: clamp(44px, 7vw, 72px); font-weight: 800;
    line-height: 1.04; color: var(--heading);
    margin-bottom: 20px; letter-spacing: -0.04em;
}
.hero-title em { color: var(--accent); font-style: normal; }

.hero-subtitle {
    font-size: 18px; color: var(--text-dim);
    margin-bottom: 32px; font-weight: 450;
}

.hero-desc {
    font-size: 15px; color: var(--text-dim); max-width: 500px;
    margin: 0 auto 52px; line-height: 1.75;
}

/* Hero stats */
.hero-stats { display: flex; justify-content: center; gap: 64px; }
.hero-stat { text-align: center; }
.hero-stat-num { display: block; font-size: 36px; font-weight: 800; color: var(--heading); letter-spacing: -0.03em; }
.hero-stat-label { font-size: 13px; color: var(--text-meta); margin-top: 4px; font-weight: 450; }

/* ── Sections ──────────────────────────────────── */
.section { padding: 100px 40px; }
.section-header { max-width: 1160px; margin: 0 auto 64px; }
.section-label {
    font-family: 'JetBrains Mono', monospace; font-size: 12px;
    letter-spacing: 0.12em; color: var(--text-meta);
    margin-bottom: 10px; text-transform: uppercase;
}
.section-title {
    font-size: 30px; font-weight: 700; color: var(--heading);
    letter-spacing: -0.03em;
}
.section-sub { font-size: 14px; color: var(--text-dim); margin-top: 10px; line-height: 1.6; }

/* ── Product Cards ─────────────────────────────── */
.card-grid {
    max-width: 1160px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
.product-card {
    display: block; background: var(--surface);
    border: 1px solid var(--border); border-radius: 18px;
    padding: 30px; text-decoration: none; color: inherit;
    transition: all 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative; overflow: hidden;
}
.product-card::after {
    content: ''; position: absolute; inset: 0; border-radius: 18px;
    background: radial-gradient(500px circle at 80% 20%, var(--accent-soft), transparent);
    opacity: 0; transition: opacity 0.35s ease;
}
.product-card:hover::after { opacity: 1; }
.product-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}
.product-card--placeholder {
    cursor: default;
}
.product-card--placeholder:hover {
    transform: none; border-color: var(--border);
    box-shadow: none;
}
.product-card--placeholder:hover::after { opacity: 0; }
.product-card--placeholder .card-head .card-icon { opacity: 0.5; }
.product-card--placeholder .card-title { color: var(--text-dim); }

/* Arrow indicator on linked cards */
.product-card:not(.product-card--placeholder)::before {
    content: '↗';
    position: absolute; top: 28px; right: 28px;
    font-size: 14px; color: var(--text-meta);
    opacity: 0; transform: translate(4px, -4px);
    transition: all 0.3s ease;
    z-index: 2;
}
.product-card:not(.product-card--placeholder):hover::before {
    opacity: 1; transform: translate(0, 0);
}

.card-icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    position: relative; z-index: 1;
}
.card-icon svg { width: 22px; height: 22px; }

.card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; position: relative; z-index: 1; }
.card-title { font-size: 16px; font-weight: 600; color: var(--heading); margin-bottom: 6px; position: relative; z-index: 1; }
.card-desc { font-size: 13px; color: var(--text-dim); line-height: 1.65; position: relative; z-index: 1; }
.card-tags { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; position: relative; z-index: 1; }
.tag { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--text-meta); font-weight: 500; }

/* Badges */
.badge {
    font-family: 'JetBrains Mono', monospace; font-size: 10px;
    padding: 3px 10px; border-radius: 6px; letter-spacing: 0.04em;
    display: inline-block; font-weight: 500; position: relative; z-index: 1;
}
.badge--live { background: rgba(34,197,94,0.08); color: #4ade80; border: 1px solid rgba(34,197,94,0.12); }
.badge--dev  { background: rgba(245,158,11,0.07); color: #fbbf24; border: 1px solid rgba(245,158,11,0.12); }
.badge--plan { background: rgba(148,163,184,0.04); color: #94a3b8; border: 1px solid rgba(148,163,184,0.08); }

/* ── Capabilities ──────────────────────────────── */
.cap-grid { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cap-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 18px; padding: 36px 28px; transition: all 0.3s ease;
}
.cap-card:hover { border-color: var(--border-hover); }
.cap-icon { font-size: 32px; margin-bottom: 20px; }
.cap-title { font-size: 15px; font-weight: 600; color: var(--heading); margin-bottom: 10px; }
.cap-desc { font-size: 13px; color: var(--text-dim); line-height: 1.75; }

/* ── Vision Modal ──────────────────────────────── */
.modal-panel--vision {
    max-width: 560px; text-align: center; padding: 44px;
    max-height: 85vh; overflow: hidden;
    display: flex; flex-direction: column;
}
.vision-head { flex: none; }
.vision-scroll {
    flex: 1 1 auto; min-height: 0;
    overflow-y: auto;
    scrollbar-width: none; -ms-overflow-style: none;
}
.vision-scroll::-webkit-scrollbar { display: none; }
.modal-panel--vision .section-label { color: var(--accent); }
.vision-headline {
    font-size: 22px; font-weight: 700; color: var(--heading);
    line-height: 1.7; margin-top: 20px; letter-spacing: -0.01em;
}
.vision-headline em { color: var(--accent); font-style: normal; }

.vision-cards {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
    margin-top: 32px;
}
.vision-card {
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 14px; padding: 22px 16px;
    display: flex; flex-direction: column; gap: 8px;
    transition: border-color 0.3s ease;
}
.vision-card:hover { border-color: var(--border-hover); }
.vision-card-word {
    font-size: 17px; font-weight: 700; color: var(--heading);
    transition: color 0.3s ease;
}
.vision-card:hover .vision-card-word { color: var(--accent); }
.vision-card-sub { font-size: 12.5px; color: var(--text-dim); }

.vision-text {
    margin-top: 32px;
    font-size: 13.5px; line-height: 2;
}
.vision-text p { color: var(--text-dim); }
.vision-text p:first-child { color: var(--text); }
.vision-text p + p { margin-top: 16px; }
.vision-text em { color: var(--accent); font-style: normal; font-weight: 600; }
.vision-shift {
    margin-top: 32px;
    display: inline-grid; grid-template-columns: auto auto auto;
    gap: 10px 14px; justify-items: center;
}
.vision-shift-from { font-size: 13px; color: var(--text-dim); justify-self: end; }
.vision-shift-to { font-size: 14px; color: var(--heading); font-weight: 600; justify-self: start; }
.vision-shift i { color: var(--accent); font-style: normal; }
.vision-closing {
    font-size: 15px; font-weight: 600; color: var(--heading);
    margin-top: 28px; line-height: 1.8;
}
.vision-closing em { color: var(--accent); font-style: normal; }

/* ── About Modal ───────────────────────────────── */
.modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 100;
    background: rgba(0,0,0,0.65); backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    align-items: center; justify-content: center; padding: 32px;
}
.modal-panel {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 20px; max-width: 500px; width: 100%; padding: 40px;
    position: relative; max-height: 85vh; overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
.modal-close {
    position: absolute; top: 20px; right: 20px; background: none;
    border: none; color: var(--text-meta); font-size: 22px;
    cursor: pointer; line-height: 1; transition: color 0.15s;
}
.modal-close:hover { color: var(--heading); }
.modal-about-name { font-size: 18px; font-weight: 600; color: var(--heading); margin-bottom: 6px; }
.modal-about-sub  { font-size: 13px; color: var(--text-dim); margin-bottom: 28px; }
.modal-about-text { font-size: 14px; color: var(--text-dim); line-height: 1.9; }
.modal-about-text p + p { margin-top: 16px; }
.modal-about-tags { display: flex; gap: 8px; margin-top: 28px; flex-wrap: wrap; }

/* ── Footer ────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); padding: 48px 40px; }
.footer-inner {
    max-width: 1160px; margin: 0 auto;
    display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 16px;
}
.footer-text { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-meta); }
.footer-link { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-meta); text-decoration: none; transition: color 0.15s; }
.footer-link:hover { color: var(--heading); }

/* ── Animations ────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.55s cubic-bezier(0.22,0.61,0.36,1) both; }
.fade-up:nth-child(1)  { animation-delay: 0.04s; }
.fade-up:nth-child(2)  { animation-delay: 0.08s; }
.fade-up:nth-child(3)  { animation-delay: 0.12s; }
.fade-up:nth-child(4)  { animation-delay: 0.16s; }
.fade-up:nth-child(5)  { animation-delay: 0.20s; }
.fade-up:nth-child(6)  { animation-delay: 0.24s; }
.fade-up:nth-child(7)  { animation-delay: 0.28s; }
.fade-up:nth-child(8)  { animation-delay: 0.32s; }
.fade-up:nth-child(9)  { animation-delay: 0.36s; }
.fade-up:nth-child(10) { animation-delay: 0.40s; }
.fade-up:nth-child(11) { animation-delay: 0.44s; }
.fade-up:nth-child(12) { animation-delay: 0.48s; }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 768px) {
    .hero { padding: 140px 24px 80px; }
    .hero-stats { gap: 32px; }
    .hero-stat-num { font-size: 28px; }
    .section { padding: 64px 24px; }
    .cap-grid { grid-template-columns: repeat(2, 1fr); }
    .header-inner { padding: 0 20px; }
    .nav-links { gap: 20px; font-size: 12px; }
}
@media (max-width: 480px) {
    .hero { padding: 120px 20px 60px; }
    .hero-stats { gap: 20px; }
    .hero-stat-num { font-size: 22px; }
    .section { padding: 48px 20px; }
    .card-grid { grid-template-columns: 1fr; }
    .cap-grid { grid-template-columns: 1fr; }
    .brand-sub { display: none; }
    .modal-panel--vision { padding: 36px 28px; }
}
