/* ==========================================================================
   songzejiancai.com — Main Stylesheet
   Tesla-inspired · Computer-science aesthetic · Rich animation
   ========================================================================== */

/* ----- Design Tokens ----- */
:root {
    /* Colors */
    --bg-0: #050510;
    --bg-1: #0a0a14;
    --bg-2: #11111e;
    --bg-3: #1a1a2e;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-strong: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);

    --text-0: #ffffff;
    --text-1: #e6e8f2;
    --text-2: #a4a8bd;
    --text-3: #6b6f85;
    --text-mute: #4a4d63;

    --c-cyan: #00e5ff;
    --c-violet: #7c4dff;
    --c-pink: #ff1744;
    --c-amber: #ffd600;
    --c-lime: #76ff03;
    --c-emerald: #00e676;

    --grad-primary: linear-gradient(135deg, #00e5ff 0%, #7c4dff 50%, #ff1744 100%);
    --grad-cyan-violet: linear-gradient(135deg, #00e5ff, #7c4dff);
    --grad-violet-pink: linear-gradient(135deg, #7c4dff, #ff1744);
    --grad-pink-amber: linear-gradient(135deg, #ff1744, #ffd600);
    --grad-cyan-amber: linear-gradient(135deg, #00e5ff, #ffd600);

    /* Typography */
    --ff-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ff-mono: 'JetBrains Mono', 'SF Mono', Monaco, Consolas, 'Courier New', monospace;

    --fs-7xl: clamp(3rem, 7vw, 5.5rem);
    --fs-6xl: clamp(2.5rem, 6vw, 4.5rem);
    --fs-5xl: clamp(2rem, 5vw, 3.5rem);
    --fs-4xl: clamp(1.75rem, 4vw, 2.75rem);
    --fs-3xl: clamp(1.5rem, 3vw, 2.25rem);
    --fs-2xl: clamp(1.25rem, 2.5vw, 1.75rem);
    --fs-xl: 1.25rem;
    --fs-lg: 1.125rem;
    --fs-base: 1rem;
    --fs-sm: 0.875rem;
    --fs-xs: 0.75rem;

    /* Spacing */
    --sp-1: 0.25rem;
    --sp-2: 0.5rem;
    --sp-3: 0.75rem;
    --sp-4: 1rem;
    --sp-5: 1.5rem;
    --sp-6: 2rem;
    --sp-7: 3rem;
    --sp-8: 4rem;
    --sp-9: 6rem;
    --sp-10: 8rem;

    /* Layout */
    --container: 1280px;
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Easing */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow-cyan: 0 0 40px rgba(0, 229, 255, 0.3);
    --shadow-glow-violet: 0 0 40px rgba(124, 77, 255, 0.3);
    --shadow-glow-pink: 0 0 40px rgba(255, 23, 68, 0.3);

    --header-h: 80px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--ff-sans);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--text-1);
    background: var(--bg-0);
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

img, svg, video, canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s var(--ease-out);
}

button {
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
}

ul, ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-0);
    letter-spacing: -0.02em;
}

p {
    color: var(--text-2);
    line-height: 1.7;
}

/* ----- Accessibility ----- */
.skip-link {
    position: absolute;
    top: -100px;
    left: var(--sp-4);
    z-index: 9999;
    padding: var(--sp-3) var(--sp-5);
    background: var(--c-cyan);
    color: var(--bg-0);
    border-radius: var(--radius-sm);
    font-weight: 600;
}
.skip-link:focus { top: var(--sp-4); }

:focus-visible {
    outline: 2px solid var(--c-cyan);
    outline-offset: 3px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ----- Layout ----- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--sp-5);
}

section {
    position: relative;
    padding: var(--sp-10) 0;
}

/* ----- Particle Canvas & Matrix ----- */
#particle-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    opacity: 0.6;
}

.matrix-rain {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: -3;
    pointer-events: none;
    opacity: 0.08;
    overflow: hidden;
}
#matrix-canvas {
    width: 100%;
    height: 100%;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 0%, rgba(0, 229, 255, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(124, 77, 255, 0.08), transparent),
        radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255, 23, 68, 0.04), transparent);
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 30%, transparent 80%);
}

/* ----- Header ----- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    z-index: 100;
    transition: all 0.4s var(--ease-out);
    background: rgba(10, 10, 20, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid transparent;
}

.site-header.scrolled {
    background: rgba(5, 5, 16, 0.85);
    border-bottom-color: var(--border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: var(--sp-5);
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    font-weight: 700;
    transition: transform 0.3s var(--ease-out);
}
.brand:hover { transform: translateY(-1px); }

.brand-mark {
    width: 36px;
    height: 36px;
    transition: transform 0.5s var(--ease-out);
}
.brand:hover .brand-mark { transform: rotate(180deg); }

.brand-text {
    display: flex;
    align-items: baseline;
    gap: 2px;
    letter-spacing: -0.02em;
}
.brand-name { font-size: var(--fs-lg); color: var(--text-0); }
.brand-tld { font-size: var(--fs-sm); color: var(--c-cyan); font-family: var(--ff-mono); }

.primary-nav ul {
    display: flex;
    gap: var(--sp-2);
}

.nav-link {
    position: relative;
    padding: var(--sp-2) var(--sp-4);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-2);
    border-radius: var(--radius-sm);
    transition: color 0.3s var(--ease-out);
}

.nav-link::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius-sm);
    background: var(--surface);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease-out);
    z-index: -1;
}

.nav-link:hover { color: var(--text-0); }
.nav-link:hover::before { transform: scaleX(1); transform-origin: left; }

.nav-link.active { color: var(--c-cyan); }
.nav-link.active::before {
    transform: scaleX(1);
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.12), transparent);
}

.header-cta { display: flex; gap: var(--sp-3); }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 8px;
    border-radius: var(--radius-sm);
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--text-0);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out);
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-5);
    font-family: var(--ff-sans);
    font-weight: 600;
    font-size: var(--fs-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    border: 1px solid transparent;
}

.btn-sm { padding: var(--sp-2) var(--sp-4); font-size: var(--fs-xs); }
.btn-lg { padding: var(--sp-4) var(--sp-6); font-size: var(--fs-base); }

.btn-primary {
    background: var(--text-0);
    color: var(--bg-0);
}
.btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--grad-primary);
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-out);
    z-index: 0;
}
.btn-primary:hover { color: var(--text-0); box-shadow: var(--shadow-glow-violet); }
.btn-primary:hover::before { transform: translateY(0); }
.btn-primary > * { position: relative; z-index: 1; }

.btn-ghost {
    background: transparent;
    color: var(--text-1);
    border-color: var(--border-strong);
}
.btn-ghost:hover {
    border-color: var(--c-cyan);
    color: var(--c-cyan);
    background: rgba(0, 229, 255, 0.05);
}

/* ----- Section Utilities ----- */
.section-eyebrow {
    display: inline-block;
    font-family: var(--ff-mono);
    font-size: var(--fs-xs);
    letter-spacing: 0.1em;
    color: var(--c-cyan);
    margin-bottom: var(--sp-4);
    text-transform: uppercase;
}

.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto var(--sp-9);
}

.section-title {
    font-size: var(--fs-5xl);
    font-weight: 800;
    margin-bottom: var(--sp-4);
    letter-spacing: -0.03em;
}

.section-lead {
    font-size: var(--fs-lg);
    color: var(--text-2);
    line-height: 1.7;
}

.gradient-text {
    background: var(--grad-primary);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ----- Hero ----- */
.hero {
    min-height: 100vh;
    padding: calc(var(--header-h) + var(--sp-8)) 0 var(--sp-9);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.04) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, #000 30%, transparent 80%);
    animation: grid-pan 30s linear infinite;
}

@keyframes grid-pan {
    0% { background-position: 0 0; }
    100% { background-position: 80px 80px; }
}

.hero-glow {
    position: absolute;
    top: 10%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(124, 77, 255, 0.2), transparent 60%);
    filter: blur(60px);
    pointer-events: none;
    animation: float-glow 12s ease-in-out infinite;
}

@keyframes float-glow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-30px, 30px); }
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: var(--sp-9);
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: var(--ff-mono);
    font-size: var(--fs-xs);
    color: var(--text-1);
    margin-bottom: var(--sp-6);
    backdrop-filter: blur(10px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--c-lime);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--c-lime);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
    font-size: var(--fs-7xl);
    font-weight: 900;
    line-height: 0.95;
    margin-bottom: var(--sp-6);
    letter-spacing: -0.04em;
}

.title-line {
    display: block;
    overflow: hidden;
}

.hero-subtitle {
    font-size: var(--fs-xl);
    color: var(--text-2);
    line-height: 1.6;
    margin-bottom: var(--sp-7);
    max-width: 540px;
}

.hero-subtitle strong {
    color: var(--text-0);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: var(--sp-4);
    flex-wrap: wrap;
    margin-bottom: var(--sp-9);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: var(--sp-5);
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
}

.stat-value {
    font-size: var(--fs-3xl);
    font-weight: 800;
    color: var(--text-0);
    font-family: var(--ff-mono);
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.stat-suffix {
    font-size: var(--fs-xl);
    color: var(--c-cyan);
    font-weight: 700;
}

.stat-label {
    font-size: var(--fs-xs);
    color: var(--text-3);
    font-family: var(--ff-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border-strong);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    width: 100%;
    height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orbital-system {
    position: relative;
    width: 100%;
    height: 100%;
}

.orbit-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    animation: pulse-core 4s ease-in-out infinite;
}

@keyframes pulse-core {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.05); }
}

.orbit {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.orbit-1 {
    width: 280px;
    height: 280px;
    animation: spin-orbit 18s linear infinite;
}
.orbit-2 {
    width: 380px;
    height: 380px;
    animation: spin-orbit 26s linear infinite reverse;
}
.orbit-3 {
    width: 480px;
    height: 480px;
    animation: spin-orbit 34s linear infinite;
}
.orbit-4 {
    width: 580px;
    height: 580px;
    animation: spin-orbit 42s linear infinite reverse;
}

@keyframes spin-orbit {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.orbit-node {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 0 12px currentColor);
}

.terminal-card {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 360px;
    background: rgba(10, 10, 20, 0.85);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
    font-family: var(--ff-mono);
    z-index: 5;
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-4);
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

.terminal-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
    margin-left: auto;
    font-size: var(--fs-xs);
    color: var(--text-3);
}

.terminal-body {
    padding: var(--sp-4);
    font-size: var(--fs-xs);
    line-height: 1.8;
}

.terminal-body .line { color: var(--text-2); }
.terminal-body .prompt { color: var(--c-cyan); margin-right: var(--sp-2); }
.terminal-body .ok { color: var(--c-lime); margin-right: var(--sp-2); }

.cursor {
    display: inline-block;
    color: var(--c-cyan);
    animation: blink 1s steps(1) infinite;
}
@keyframes blink {
    50% { opacity: 0; }
}

.scroll-indicator {
    position: absolute;
    bottom: var(--sp-5);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-3);
    font-family: var(--ff-mono);
    font-size: var(--fs-xs);
    color: var(--text-3);
    letter-spacing: 0.2em;
}

.scroll-line {
    width: 1px;
    height: 50px;
    background: linear-gradient(to bottom, transparent, var(--c-cyan));
    animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
    0%, 100% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ----- Marquee ----- */
.marquee-section {
    padding: var(--sp-6) 0;
    background: linear-gradient(180deg, transparent, rgba(0, 229, 255, 0.02), transparent);
    border-block: 1px solid var(--border);
    overflow: hidden;
}

.marquee {
    overflow: hidden;
    white-space: nowrap;
}

.marquee-track {
    display: inline-flex;
    gap: var(--sp-7);
    animation: marquee-flow 40s linear infinite;
    font-family: var(--ff-mono);
    font-size: var(--fs-base);
    color: var(--text-2);
    align-items: center;
}

.marquee-track span:nth-child(even) {
    color: var(--c-cyan);
    font-size: var(--fs-xl);
}

@keyframes marquee-flow {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ----- Philosophy Pillars ----- */
.pillar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-5);
}

.pillar-card {
    position: relative;
    padding: var(--sp-7) var(--sp-6);
    background: linear-gradient(135deg, var(--surface), transparent);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.5s var(--ease-out);
}

.pillar-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grad-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s var(--ease-out);
}

.pillar-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-strong);
    background: linear-gradient(135deg, var(--surface-strong), var(--surface));
}

.pillar-card:hover::before { transform: scaleX(1); }

.pillar-icon {
    width: 64px;
    height: 64px;
    margin-bottom: var(--sp-5);
    transition: transform 0.5s var(--ease-out);
}

.pillar-card:hover .pillar-icon { transform: scale(1.1) rotate(5deg); }

.pillar-card h3 {
    font-size: var(--fs-2xl);
    margin-bottom: var(--sp-3);
}

.pillar-card p {
    font-size: var(--fs-base);
    color: var(--text-2);
    margin-bottom: var(--sp-5);
}

.pillar-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
}

.pillar-list li {
    position: relative;
    padding-left: var(--sp-5);
    font-family: var(--ff-mono);
    font-size: var(--fs-sm);
    color: var(--text-2);
}

.pillar-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--c-cyan);
}

/* ----- Capabilities Grid ----- */
.capability-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-4);
}

.capability-tile {
    position: relative;
    padding: var(--sp-5);
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.4s var(--ease-out);
    overflow: hidden;
}

.capability-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(124, 77, 255, 0.15), transparent 50%);
    opacity: 0;
    transition: opacity 0.4s var(--ease-out);
    pointer-events: none;
}

.capability-tile:hover {
    transform: translateY(-4px);
    border-color: var(--c-violet);
    box-shadow: var(--shadow-glow-violet);
}

.capability-tile:hover::before { opacity: 1; }

.tile-num {
    font-family: var(--ff-mono);
    font-size: var(--fs-xs);
    color: var(--c-cyan);
    margin-bottom: var(--sp-3);
    letter-spacing: 0.15em;
}

.capability-tile h4 {
    font-size: var(--fs-lg);
    margin-bottom: var(--sp-3);
    color: var(--text-0);
}

.capability-tile p {
    font-size: var(--fs-sm);
    color: var(--text-2);
    margin-bottom: var(--sp-4);
}

.tile-bar {
    height: 3px;
    background: var(--bg-3);
    border-radius: 999px;
    overflow: hidden;
}

.tile-bar span {
    display: block;
    height: 100%;
    background: var(--grad-primary);
    border-radius: 999px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.2s var(--ease-out);
}

.capability-tile:hover .tile-bar span { transform: scaleX(1); }

/* ----- Showcase Cards ----- */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-5);
}

.showcase-card {
    position: relative;
    padding: var(--sp-6);
    background: linear-gradient(180deg, var(--bg-1), var(--bg-0));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.5s var(--ease-out);
}

.card-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(124, 77, 255, 0.2), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s var(--ease-out);
    pointer-events: none;
}

.showcase-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-strong);
}
.showcase-card:hover .card-glow { opacity: 1; }

.card-icon {
    width: 56px;
    height: 56px;
    margin-bottom: var(--sp-5);
    transition: transform 0.5s var(--ease-bounce);
}

.showcase-card:hover .card-icon { transform: scale(1.15) rotate(-8deg); }

.showcase-card h3 {
    font-size: var(--fs-xl);
    margin-bottom: var(--sp-1);
}

.card-tag {
    font-family: var(--ff-mono);
    font-size: var(--fs-xs);
    color: var(--c-cyan);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: var(--sp-4);
}

.card-desc {
    font-size: var(--fs-sm);
    color: var(--text-2);
}

/* ----- Process ----- */
.process-list {
    display: flex;
    flex-direction: column;
    gap: var(--sp-8);
}

.process-step {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--sp-7);
    align-items: center;
    padding: var(--sp-7);
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.4s var(--ease-out);
    position: relative;
}

.process-step:hover {
    border-color: var(--border-strong);
    transform: translateX(8px);
}

.process-step.reverse {
    grid-template-columns: 1fr auto 1fr;
}
.process-step.reverse .step-content { order: 3; text-align: right; }
.process-step.reverse .step-num { order: 2; }
.process-step.reverse .step-visual { order: 1; }
.process-step.reverse:hover { transform: translateX(-8px); }

.step-num {
    font-family: var(--ff-mono);
    font-size: var(--fs-6xl);
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 2px var(--border-strong);
    background: var(--grad-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradient-shift 6s ease infinite;
    line-height: 1;
}

.step-content h3 {
    font-size: var(--fs-2xl);
    margin-bottom: var(--sp-3);
}

.step-content p {
    font-size: var(--fs-base);
    color: var(--text-2);
    margin-bottom: var(--sp-4);
}

.step-tags {
    display: flex;
    gap: var(--sp-2);
    flex-wrap: wrap;
}

.process-step.reverse .step-tags { justify-content: flex-end; }

.step-tags span {
    padding: var(--sp-1) var(--sp-3);
    font-family: var(--ff-mono);
    font-size: var(--fs-xs);
    color: var(--c-cyan);
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 999px;
}

.step-visual {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

/* ----- CTA Section ----- */
.cta-section { padding: var(--sp-8) 0 var(--sp-10); }

.cta-card {
    position: relative;
    padding: var(--sp-10) var(--sp-7);
    background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    text-align: center;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(124, 77, 255, 0.3), transparent 50%);
    filter: blur(80px);
    pointer-events: none;
    animation: float-glow 8s ease-in-out infinite;
}

.cta-grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 30%, transparent 80%);
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 640px;
    margin: 0 auto;
}

.cta-title {
    font-size: var(--fs-5xl);
    margin-bottom: var(--sp-4);
    letter-spacing: -0.03em;
}

.cta-text {
    font-size: var(--fs-lg);
    color: var(--text-2);
    margin-bottom: var(--sp-7);
}

.cta-actions {
    display: flex;
    gap: var(--sp-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* ----- Footer ----- */
.site-footer {
    background: var(--bg-1);
    border-top: 1px solid var(--border);
    padding: var(--sp-9) 0 var(--sp-5);
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--c-cyan), var(--c-violet), var(--c-pink), transparent);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--sp-7);
    padding-bottom: var(--sp-7);
    border-bottom: 1px solid var(--border);
}

.footer-brand .brand { margin-bottom: var(--sp-4); }

.footer-tagline {
    font-size: var(--fs-sm);
    color: var(--text-2);
    margin-bottom: var(--sp-5);
    max-width: 380px;
}

.footer-address {
    font-style: normal;
    font-size: var(--fs-sm);
    color: var(--text-3);
    line-height: 1.8;
}

.footer-address a {
    color: var(--text-2);
    font-family: var(--ff-mono);
    transition: color 0.3s var(--ease-out);
}

.footer-address a:hover { color: var(--c-cyan); }

.footer-col h4 {
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-0);
    margin-bottom: var(--sp-4);
    font-family: var(--ff-mono);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
}

.footer-col a {
    font-size: var(--fs-sm);
    color: var(--text-2);
    transition: all 0.3s var(--ease-out);
}

.footer-col a:hover {
    color: var(--c-cyan);
    padding-left: var(--sp-3);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--sp-5);
    flex-wrap: wrap;
    gap: var(--sp-3);
}

.footer-bottom p,
.footer-meta {
    font-size: var(--fs-xs);
    color: var(--text-3);
    font-family: var(--ff-mono);
}

/* ----- Page Header (sub-pages) ----- */
.page-header {
    padding: calc(var(--header-h) + var(--sp-9)) 0 var(--sp-9);
    position: relative;
    text-align: center;
    overflow: hidden;
}

.page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(124, 77, 255, 0.15), transparent);
    pointer-events: none;
}

.page-header-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
    margin: 0 auto;
}

.page-eyebrow {
    display: inline-block;
    padding: var(--sp-2) var(--sp-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: var(--ff-mono);
    font-size: var(--fs-xs);
    color: var(--c-cyan);
    letter-spacing: 0.15em;
    margin-bottom: var(--sp-5);
}

.page-title {
    font-size: var(--fs-6xl);
    margin-bottom: var(--sp-5);
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.page-lead {
    font-size: var(--fs-xl);
    color: var(--text-2);
    line-height: 1.6;
    max-width: 680px;
    margin: 0 auto;
}

/* ----- Breadcrumbs ----- */
.breadcrumbs {
    display: flex;
    gap: var(--sp-2);
    align-items: center;
    font-family: var(--ff-mono);
    font-size: var(--fs-xs);
    color: var(--text-3);
    margin-bottom: var(--sp-5);
    justify-content: center;
}

.breadcrumbs a { color: var(--text-3); transition: color 0.3s var(--ease-out); }
.breadcrumbs a:hover { color: var(--c-cyan); }
.breadcrumbs span:last-child { color: var(--c-cyan); }
.breadcrumbs .sep { opacity: 0.4; }