/*
Theme Name: StablEdge
Theme URI: https://stbledge.com
Author: wuzejian
Author URI: https://stbledge.com
Description: AI Agent SaaS 企业级官网主题，含 WebGL 双摆背景、Three.js 线框动画、毛玻璃网格特效。所有文案、颜色、动效参数均可在「外观 → 自定义」中修改。
Version: 1.4.8
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stbledge
Tags: one-page, custom-colors, custom-logo, custom-menu, threaded-comments
*/

/* Token 见 css/tokens.css，字体见 css/fonts.css（均先于本文件加载） */

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

body {
    font-family: var(--font-mono);
    background-color: var(--bg-light);
    color: var(--text-dark);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100vh;
}

body.home {
    background-color: #010208;
}

#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* ── Navigation — 见 css/nav.css ── */

/* ── Panels & Layout ── */

section {
    position: relative;
    width: 100vw;
    z-index: 1;
    padding: 48px;
}

.panel {
    height: 100vh;
    overflow: hidden;
}

/* ── Hero ── */

.hero {
    display: block;
    padding-top: 6.25rem;
}

.hero-left {
    z-index: 10;
    pointer-events: none;
}

.hero-left .panel-scroll {
    pointer-events: auto;
}

.hero h1 {
    font-size: 5.5vw;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.05em;
    position: relative;
    mix-blend-mode: difference;
    color: #ffffff;
    white-space: pre-wrap;
}

.hero-sub {
    margin-top: 24px;
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255,255,255,.5);
    mix-blend-mode: difference;
}

.cursor {
    font-weight: 300;
    animation: blink .6s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* ── Hero Grid ── */

.hero-grid {
    position: absolute;
    inset: 0;
    display: grid;
    z-index: 2;
    pointer-events: none;
}

.grid-cell {
    position: relative;
    border: 1px solid rgba(255,255,255,var(--grid-border-opacity, 0.04));
}

.grid-cell::after {
    content: '';
    position: absolute;
    inset: 0;
    backdrop-filter: blur(var(--grid-blur, 10px)) saturate(1.2);
    -webkit-backdrop-filter: blur(var(--grid-blur, 10px)) saturate(1.2);
    background: rgba(255,255,255,var(--grid-bg-opacity, 0.045));
    opacity: 0;
    transition: opacity 1.4s ease;
    pointer-events: none;
}

.grid-cell.blur::after {
    opacity: 1;
}

/* ── Core Tech Section ── */

.content-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding-top: 8vh;
    padding-bottom: 8vh;
    background-color: var(--bg-light);
}

.content-left {
    max-width: 580px;
    pointer-events: auto;
}

.section-title {
    font-size: 3.4vw;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin-bottom: 32px;
}

.section-title span {
    color: #d0d0d0;
}

.section-desc {
    font-size: 13px;
    line-height: 1.7;
    color: #444;
    margin-bottom: 48px;
    max-width: 90%;
    font-weight: 400;
}

.accordion {
    border-top: 1px solid #e0e0e0;
}

.accordion-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 24px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.accordion-item.active {
    color: var(--text-dark);
}

.accordion-item:not(.active) {
    color: #b0b0b0;
}

.accordion-title {
    font-size: 16px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 16px;
    letter-spacing: -0.02em;
}

.acc-number {
    font-size: 13px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid currentColor;
    font-weight: 400;
}

.accordion-item.active .acc-number {
    background: var(--text-dark);
    color: #fff;
    border-color: var(--text-dark);
}

.accordion-icon {
    font-size: 24px;
    font-weight: 300;
}

.content-right {
    pointer-events: auto;
    width: 100%;
    height: 80vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.three-anim {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.92) translateY(10px);
    pointer-events: none;
}

.three-anim.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    z-index: 2;
}

/* ── Contacts & Footer — 已迁移至 template-parts/contact-panel.php ── */

/* ══════════════════════════════════════════════════════════
   Company Page Template
   ══════════════════════════════════════════════════════════ */

body.page-template-page-company {
    overflow-y: auto;
    height: auto;
}

.company-page {
    --co-accent: #3b82f6;
    --co-accent-light: #60a5fa;
    --co-bg-dark: #0b0f1a;
    --co-bg-dark-2: #111827;
    --co-text-muted: rgba(255,255,255,0.55);
    --co-border: rgba(255,255,255,0.08);
}

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

.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero */

.co-hero {
    min-height: 100vh;
    background: var(--co-bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    padding: 80px 48px;
}

.co-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 20% 80%, rgba(59,130,246,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 80% 20%, rgba(96,165,250,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.co-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.co-hero-tag {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(59,130,246,0.15);
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 24px;
    font-size: 13px;
    color: var(--co-accent-light);
    margin-bottom: 28px;
    letter-spacing: 2px;
    font-weight: 500;
}

.co-hero-title {
    font-size: clamp(32px, 7vw, 64px);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.co-hero-title em {
    font-style: normal;
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.co-hero-sub {
    font-size: clamp(15px, 2.5vw, 18px);
    color: var(--co-text-muted);
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.8;
    font-weight: 300;
}

.co-hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.co-stat-num {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 900;
    color: var(--co-accent-light);
    line-height: 1.1;
}

.co-stat-label {
    font-size: 13px;
    color: var(--co-text-muted);
    margin-top: 4px;
    letter-spacing: 1px;
}

/* Section Common */

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

.co-tag {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(59,130,246,0.08);
    color: var(--co-accent);
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    margin-bottom: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.co-tag-dark {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.co-section-header h2 {
    font-size: clamp(26px, 4.5vw, 38px);
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.co-section-header p {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.75;
}

/* Capabilities */

.co-capabilities {
    background: #f7f8fc;
    padding: 100px 48px;
}

/* 固定 4 / 2 / 1 列：4 张卡片用 auto-fit 在中等宽度会出现 3+1 的断行 */
.co-cap-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .co-cap-grid { grid-template-columns: repeat(2, 1fr); }
}

.co-cap-card {
    background: #fff;
    padding: 32px 24px;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    text-align: center;
    transition: all 0.3s ease;
}

.co-cap-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.co-cap-num {
    font-size: 36px;
    font-weight: 900;
    color: var(--co-accent);
    opacity: 0.15;
    margin-bottom: 12px;
    line-height: 1;
}

.co-cap-card h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
}

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

/* Pain + Scenarios */

.co-painscene {
    background: var(--co-bg-dark-2);
    color: #fff;
    padding: 100px 48px;
}

.co-painscene .co-section-header h2 { color: #fff; }
.co-painscene .co-section-header p { color: var(--co-text-muted); }

.co-ps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.co-ps-card {
    padding: 28px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--co-border);
    border-radius: 12px;
    transition: all 0.3s;
}

.co-ps-card:hover {
    background: rgba(255,255,255,0.07);
}

.co-ps-pain {
    font-size: 13px;
    color: #f87171;
    margin-bottom: 8px;
    font-weight: 500;
}

.co-ps-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

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

/* Team */

.co-team {
    background: #f7f8fc;
    padding: 100px 48px;
}

.co-team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.co-team-block {
    background: #fff;
    padding: 36px 32px;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}

.co-team-block h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.co-team-block p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.9;
}

/* Why Us */

.co-whyus {
    background: #fff;
    padding: 100px 48px;
}

.co-why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.co-why-item {
    padding: 32px 24px;
    border-radius: 14px;
    background: #f7f8fc;
    transition: all 0.3s;
}

.co-why-item:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.06);
}

.co-why-num {
    font-size: 40px;
    font-weight: 900;
    color: var(--co-accent);
    opacity: 0.12;
    margin-bottom: 12px;
    line-height: 1;
}

.co-why-item h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 10px;
}

.co-why-item p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* CTA */

.co-cta {
    background: linear-gradient(135deg, var(--co-bg-dark) 0%, var(--co-bg-dark-2) 100%);
    color: #fff;
    text-align: center;
    padding: 100px 48px;
}

.co-cta h2 {
    font-size: clamp(22px, 4.5vw, 34px);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.4;
}

.co-cta-text {
    font-size: 15px;
    color: var(--co-text-muted);
    max-width: 520px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.co-cta-box {
    display: inline-block;
    padding: 24px 40px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
}

.co-cta-hint {
    font-size: 14px;
    color: var(--co-text-muted);
    margin-bottom: 10px;
}

.co-cta-wechat {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .co-team-grid { grid-template-columns: 1fr; }
    .co-cap-grid { grid-template-columns: 1fr; }
    .co-ps-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════
   About Us Page
   ══════════════════════════════════════════════════════════ */

html:has(body.stbledge-about-page) {
    height: 100%;
}

body.stbledge-about-page {
    overflow: hidden !important;
    height: 100vh !important;
    background: #000 !important;
}

.about-page {
    --about-accent: var(--brand-blue);
    --about-text: rgba(255, 255, 255, 0.8);
    --about-text-dim: rgba(255, 255, 255, 0.5);
    position: relative;
    color: #fff;
    isolation: isolate;
    background-color: #000000;
}

.about-page,
.about-page * {
    mix-blend-mode: normal !important;
}

.about-page .panel {
    height: 100vh;
    overflow: hidden;
    position: relative;
    z-index: 2;
    padding: 6.5rem 3rem 4rem;
    box-sizing: border-box;
}

.about-page .about-panel-contact {
    padding: 0;
}

.about-panel-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    padding: 6.25rem var(--frame-inset-x, clamp(4rem, 10vw, 8rem)) 0;
}

.about-hero-left {
    grid-column: 1;
    z-index: 10;
    pointer-events: auto;
    max-width: 36rem;
}

.about-panel-story {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6.25rem 3rem;
}

.about-story-wrap {
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.about-story-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.about-story-intro {
    display: grid;
    grid-template-columns: minmax(11rem, 26%) 1fr;
    gap: 2.5rem 4rem;
    align-items: start;
}

.about-panel-inner {
    position: relative;
    z-index: 2;
}

.about-panel-intro .about-panel-inner {
    max-width: none;
}

.about-panel-story .about-panel-inner {
    max-width: 36rem;
    width: 100%;
}

/* ── Background（Figma 长图：第 1 / 2 屏） ── */

.about-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200vh;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background-color: #000000;
}

.about-bg picture {
    display: block;
    width: 100%;
    height: 100%;
}

.about-bg__art {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.about-title-zh {
    font-size: 5.5vw;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.05em;
    color: #ffffff;
    margin: 0;
}

.about-title-en {
    margin-top: 0.5rem;
    font-size: 2.5vw;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #ffffff;
}

.about-panel-intro .about-title-zh,
.about-panel-intro .about-title-en {
    mix-blend-mode: difference !important;
}

.panel-scroll {
    display: inline-flex;
    margin-top: 2rem;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    pointer-events: auto;
    transition: opacity 0.3s;
    mix-blend-mode: normal;
}

.panel-scroll:hover {
    opacity: 0.75;
}

.panel-scroll__icon {
    display: block;
    width: clamp(4.5rem, 7.5vw, 7.625rem);
    height: auto;
}

.about-heading {
    font-size: clamp(1.75rem, 3.2vw, 2.75rem);
    font-weight: 600;
    line-height: 1.35;
    margin: 0;
    padding-top: 0.125rem;
    white-space: nowrap;
}

.about-heading-main {
    color: #ffffff;
}

.about-heading-accent {
    color: var(--brand-blue);
}

.about-story-lead,
.about-paragraphs p {
    font-size: 0.875rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 1.5rem;
}

.about-story-lead {
    margin-bottom: 0;
}

.about-paragraphs p:last-child {
    margin-bottom: 0;
}

.about-highlight {
    color: var(--brand-blue);
}

/* ── 第 3 屏：关于团队 ── */

.about-page .about-panel-team {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem var(--frame-inset-x, clamp(4rem, 10vw, 8rem)) 4rem;
    background-color: #000000;
    --about-team-gutter: 3.75rem;
}

.about-team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(4.5rem, 9vw, 8rem);
    align-items: center;
    width: 100%;
    max-width: none;
    margin: 0;
    position: relative;
    z-index: 2;
}

.about-team-left {
    position: relative;
    z-index: 5;
    padding-left: calc(var(--about-team-gutter) * 2);
    box-sizing: border-box;
    pointer-events: auto;
}

.about-team-title {
    font-family: var(--font-sans);
    font-size: 3rem;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 0.25rem;
    color: #fff;
}

.about-team-sub {
    font-family: var(--font-sans);
    font-size: 3rem;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #9D9D9D;
    margin: 0 0 2.5rem;
}

.about-team-list {
    list-style: none;
    border-top: 1px solid #D9D9D9;
}

.about-team-item {
    padding: 0;
    border-bottom: 1px solid #D9D9D9;
    color: #FFFFFF;
}

.about-team-trigger {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin: 0;
    padding: 1.5rem 0;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    color: inherit;
    cursor: pointer;
    transition: color 0.3s ease;
    box-sizing: border-box;
}

.about-team-item.active {
    color: var(--brand-blue);
}

.about-team-num {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    font-size: 0.8125rem;
    line-height: 1;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.about-team-item.active .about-team-num {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #ffffff;
}

.about-team-text {
    font-size: 0.9375rem;
    line-height: 1.5;
    color: inherit;
    transition: color 0.3s ease;
}

.about-team-visual {
    width: 100%;
    height: min(70vh, 36rem);
    position: relative;
    z-index: 1;
    padding-right: var(--about-team-gutter);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    overflow: hidden;
}

.about-team-visual .three-anim {
    border-radius: 0;
}

/* ── 第 4 屏：联系我们 — 见 css/contact-panel.css ── */

@media (max-width: 768px) {
    .about-page .panel {
        padding: 6rem 1.5rem 3rem;
    }

    .about-panel-intro {
        grid-template-columns: 1fr;
        padding: 6rem var(--frame-inset-x, 1.5rem) 0;
    }

    .about-hero-left {
        max-width: 100%;
    }

    .about-title-zh {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
    }

    .about-title-en {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }

    .about-panel-story {
        padding: 6rem 1.5rem;
    }

    .about-story-intro {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-heading {
        white-space: normal;
    }

    .about-panel-intro .about-panel-inner,
    .about-panel-story .about-panel-inner {
        max-width: 100%;
    }

    .about-page .about-panel-team {
        padding-left: var(--frame-inset-x, 1.5rem);
        padding-right: var(--frame-inset-x, 1.5rem);
        --about-team-gutter: 2.25rem;
    }

    .about-team-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-team-title,
    .about-team-sub {
        font-size: clamp(2rem, 8vw, 3rem);
    }

    .about-team-visual {
        height: 16rem;
    }
}
