/* ═══════════════════════════════════════════════════════════════
   BUILDATIONS — Design System v3
   OpenAI-Inspired · Artistic · 2026 Effects
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@300;400;500;700&display=swap');

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-card: #161616;
    --bg-elevated: #1a1a1a;
    --bg-light: #F0EDE5;

    --text-primary: #e8e6e3;
    --text-secondary: #888888;
    --text-dim: #555555;
    --text-dark: #1a1a1a;

    --accent: #A8D5BA;
    --accent-hover: #8FC5A3;
    --accent-dim: rgba(168, 213, 186, 0.12);
    --accent-glow: rgba(168, 213, 186, 0.25);
    --green: #A8D5BA;
    --purple: #B8A9C9;
    --purple-deep: #6B4C6E;
    --rose: #D4A5A5;
    --blue: #8BA7C7;

    --border: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(168, 213, 186, 0.15);

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);

    /* Legacy aliases for service page compatibility */
    --bg-dark: var(--bg-primary);
    --bg-dark-card: var(--bg-card);
    --bg-light: #F0EDE5;
    --text-light: var(--text-primary);
    --text-light-dim: var(--text-secondary);
    --border-light: var(--border);
    --border-dark: var(--border);
    --font-heading: var(--font-body);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
}

::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

/* ═══ Cursor Follower ═══ */
.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    background: radial-gradient(circle,
            rgba(168, 213, 186, 0.04) 0%,
            rgba(184, 169, 201, 0.02) 30%,
            transparent 70%);
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    will-change: transform;
}

/* ═══ Grain Texture Overlay ═══ */
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px;
}

/* ═══ Dot Grid Background ═══ */
.dot-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ═══ Gradient Mesh Blobs ═══ */
.gradient-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.gradient-mesh .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.08;
    animation: blobFloat 25s ease-in-out infinite alternate;
}

.gradient-mesh .blob-1 {
    width: 700px;
    height: 700px;
    background: var(--accent);
    top: -15%;
    left: -10%;
}

.gradient-mesh .blob-2 {
    width: 550px;
    height: 550px;
    background: var(--purple);
    top: 35%;
    right: -15%;
    animation-delay: -8s;
    animation-duration: 30s;
}

.gradient-mesh .blob-3 {
    width: 450px;
    height: 450px;
    background: var(--rose);
    bottom: -5%;
    left: 25%;
    animation-delay: -15s;
    animation-duration: 28s;
}

.gradient-mesh .blob-4 {
    width: 400px;
    height: 400px;
    background: var(--purple-deep);
    top: 55%;
    left: -8%;
    animation-delay: -5s;
    animation-duration: 32s;
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(60px, -50px) scale(1.15);
    }

    50% {
        transform: translate(-20px, 40px) scale(0.9);
    }

    75% {
        transform: translate(40px, 20px) scale(1.08);
    }

    100% {
        transform: translate(-30px, -30px) scale(1.02);
    }
}

/* ═══ Canvas Flow Field ═══ */
#flowCanvas {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ═══ Navigation ═══ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 3rem;
    transition: all 0.5s var(--ease-out);
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 3rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-logo {
    height: 34px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.nav-logo-placeholder {
    width: 34px;
    height: 34px;
    background: var(--text-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-primary);
    font-size: 0.6rem;
    font-family: var(--font-mono);
    font-weight: 700;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    position: relative;
    transition: color 0.4s var(--ease-out);
    padding: 0.25rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.4s var(--ease-out);
}

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

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    background: rgba(168, 213, 186, 0.1) !important;
    color: var(--accent) !important;
    padding: 0.55rem 1.4rem !important;
    border-radius: 100px !important;
    border: 1px solid var(--border-accent) !important;
    font-weight: 500 !important;
    transition: all 0.4s var(--ease-out) !important;
}

.nav-cta:hover {
    background: var(--accent) !important;
    color: var(--bg-primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 32px var(--accent-glow);
}

.nav-cta::after {
    display: none !important;
}

/* ═══ Section System ═══ */
.section {
    position: relative;
    z-index: 2;
    padding: 8rem 3rem;
}


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

.section-light {
    background: var(--bg-light);
    color: var(--text-dark);
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-label::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent);
    flex-shrink: 0;
}

.section-max {
    max-width: 1400px;
    margin: 0 auto;
}

/* ═══ Typography ═══ */
.heading-xl {
    font-family: var(--font-body);
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 800;
    line-height: 1.0;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.heading-xl .accent-word {
    -webkit-text-fill-color: var(--accent);
    background: none;
}

.heading-lg {
    font-family: var(--font-body);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.heading-md {
    font-family: var(--font-body);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.body-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 560px;
    font-weight: 400;
}

.section-light .body-text {
    color: #6b6560;
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ═══ Buttons ═══ */
.btn {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.9rem 2.4rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.5s var(--ease-out);
    font-weight: 500;
    border-radius: 100px;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.btn:hover::before {
    opacity: 1;
}

.btn-accent {
    background: var(--accent);
    color: var(--bg-primary);
    font-weight: 600;
}

.btn-accent:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 16px 48px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(168, 213, 186, 0.08);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 48px rgba(255, 255, 255, 0.1);
}

.section-light .btn-outline {
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--text-dark);
}

.section-light .btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ═══ Cards ═══ */
.card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all 0.5s var(--ease-out);
    position: relative;
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--accent-dim), transparent 50%);
    opacity: 0;
    transition: opacity 0.5s var(--ease-out);
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--border-accent);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}

.card:hover::before {
    opacity: 1;
}

.card-id {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    color: var(--accent);
    letter-spacing: 0.25em;
    margin-bottom: 1rem;
    display: block;
    position: relative;
    z-index: 1;
}

.card-title {
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.card-description {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

/* ═══ Status Indicators ═══ */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: pulse-dot 2.5s ease-in-out infinite;
}

.status-dot.online {
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

/* ═══ Dithered Image Containers ═══ */
.dither-frame {
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
}

.dither-frame canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* ═══ Scroll Reveal Animations ═══ */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 1s var(--ease-out);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 1s var(--ease-out);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 1s var(--ease-out);
}

.reveal-scale.visible {
    opacity: 1;
    transform: scale(1);
}

.stagger-children>* {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s var(--ease-out);
}

.stagger-children.visible>*:nth-child(1) {
    transition-delay: 0.05s;
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible>*:nth-child(2) {
    transition-delay: 0.12s;
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible>*:nth-child(3) {
    transition-delay: 0.19s;
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible>*:nth-child(4) {
    transition-delay: 0.26s;
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible>*:nth-child(5) {
    transition-delay: 0.33s;
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible>*:nth-child(6) {
    transition-delay: 0.4s;
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible>*:nth-child(7) {
    transition-delay: 0.47s;
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible>*:nth-child(8) {
    transition-delay: 0.54s;
    opacity: 1;
    transform: translateY(0);
}

.stagger-children.visible>*:nth-child(9) {
    transition-delay: 0.61s;
    opacity: 1;
    transform: translateY(0);
}

/* ═══ Magnetic ═══ */
.magnetic {
    transition: transform 0.3s var(--ease-out);
}

/* ═══ Marquee ═══ */
.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    position: relative;
    z-index: 2;
}

.marquee-track {
    display: inline-flex;
    animation: marquee 30s linear infinite;
}

.marquee-item {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0 3rem;
    color: var(--text-primary);
    opacity: 0.3;
    transition: opacity 0.4s, color 0.4s;
}

.marquee-item:hover {
    opacity: 1;
    color: var(--accent);
}

.marquee-separator {
    font-size: 0.6rem;
    color: var(--accent);
    padding: 0 0.5rem;
    opacity: 0.3;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ═══ Pillar Grid (Value Propositions) ═══ */
.pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.pillar {
    padding: 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.5s var(--ease-out);
    cursor: default;
    background: rgba(255, 255, 255, 0.02);
}

.pillar:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    background: var(--accent-dim);
}

.pillar-title {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.pillar-desc {
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ═══ Services Grid ═══ */
.services-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
}

.services-sidebar {
    position: sticky;
    top: 8rem;
    align-self: start;
}

.service-category {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.4s var(--ease-out);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.service-category:hover {
    color: var(--text-primary);
}

.service-category.active {
    color: var(--accent);
}

.service-category .arrow {
    font-size: 0.8rem;
    transition: transform 0.3s var(--ease-out);
    opacity: 0.5;
}

.service-category.active .arrow {
    transform: rotate(90deg);
    opacity: 1;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

/* ═══ Form ═══ */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-field label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.75rem;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 0.85rem 0;
    font-family: var(--font-body);
    font-size: 1rem;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.4s;
}

.form-field input:focus,
.form-field textarea:focus {
    border-bottom-color: var(--accent);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--text-dim);
}

/* ═══ Footer ═══ */
.footer {
    position: relative;
    z-index: 2;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* ═══ Service Page Styles ═══ */
.svc-page {
    position: relative;
    z-index: 2;
}

.svc-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding: 10rem 3rem 5rem;
}

.svc-hero .section-max {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 5rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.svc-hero-content {
    max-width: 700px;
}

.svc-hero-art {
    aspect-ratio: 1;
    max-width: 480px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-secondary);
    position: relative;
}

.svc-hero-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(30%) contrast(1.2);
    transition: all 0.6s var(--ease-out);
    mix-blend-mode: lighten;
}

.svc-hero-art:hover img {
    filter: grayscale(0%) contrast(1.1);
    transform: scale(1.03);
}

.svc-id {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.25em;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.svc-id::before {
    content: '';
    width: 20px;
    height: 1px;
    background: var(--accent);
}

.svc-subtitle {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 1.5rem;
}

.svc-description {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-top: 1rem;
    max-width: 600px;
}

.svc-actions {
    margin-top: 2.5rem;
    display: flex;
    gap: 1rem;
}

/* ═══ Stats Row ═══ */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat-block {
    padding: 3.5rem 2rem;
    text-align: center;
    border-right: 1px solid var(--border);
    transition: all 0.4s;
    cursor: default;
}

.stat-block:last-child {
    border-right: none;
}

.stat-block:hover {
    background: var(--accent-dim);
}

.stat-number {
    font-family: var(--font-body);
    font-size: 2.8rem;
    font-weight: 800;
    display: block;
    letter-spacing: -0.03em;
}

.stat-name {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    display: block;
}

/* ═══ Feature Grid ═══ */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.feature-box {
    padding: 3rem 2.5rem;
    background: var(--bg-secondary);
    transition: all 0.4s;
    cursor: default;
}

.feature-box:hover {
    background: var(--bg-card);
}

.feature-num {
    font-family: var(--font-mono);
    font-size: 0.55rem;
    color: var(--accent);
    letter-spacing: 0.25em;
    margin-bottom: 1.25rem;
}

.feature-title {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.feature-desc {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ═══ Launch Panel ═══ */
.launch-panel {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* ═══ Model Cards ═══ */
.models-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
}

.model-card {
    background: var(--bg-primary);
    padding: 2.5rem;
    transition: all 0.5s var(--ease-out);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.model-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--purple));
    transition: width 0.6s var(--ease-out);
}

.model-card:hover {
    background: var(--bg-card);
}

.model-card:hover::after {
    width: 100%;
}

.model-type-tag {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
    display: block;
}

.model-name {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.model-desc {
    font-size: 0.85rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.model-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.model-stat-val {
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
    display: block;
}

.model-stat-label {
    font-family: var(--font-mono);
    font-size: 0.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-top: 0.25rem;
}

/* ═══ Test Section ═══ */
.test-section {
    max-width: 800px;
    margin: 0 auto;
}

.test-input {
    width: 100%;
    min-height: 120px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 1.5rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s;
}

.test-input:focus {
    border-color: var(--accent);
}

.test-output {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 2rem;
    min-height: 150px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.test-output.empty {
    color: var(--text-dim);
}

/* ═══ Workflow Cards (Grafana, n8n) ═══ */
.workflow-card,
.graph-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: all 0.4s var(--ease-out);
}

.workflow-card:hover,
.graph-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-4px);
}

/* ═══ Animations ═══ */
@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes breathe {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* ═══ Glitch Effect ═══ */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-text-fill-color: initial;
    background: none;
}

.glitch::before {
    color: var(--accent);
    animation: glitch 4s infinite;
    clip-path: inset(0 0 92% 0);
}

.glitch::after {
    color: var(--purple);
    animation: glitch 4s infinite reverse;
    clip-path: inset(92% 0 0 0);
}

@keyframes glitch {

    0%,
    100% {
        clip-path: inset(0 0 92% 0);
    }

    20% {
        clip-path: inset(20% 0 60% 0);
    }

    40% {
        clip-path: inset(60% 0 10% 0);
    }

    60% {
        clip-path: inset(10% 0 80% 0);
    }

    80% {
        clip-path: inset(40% 0 20% 0);
    }
}

/* ═══ Split Text Animation ═══ */
.split-text .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px) rotateX(-40deg);
    transition: all 0.6s var(--ease-out);
}

.split-text.visible .char {
    opacity: 1;
    transform: translateY(0) rotateX(0);
}

/* ═══ Horizontal Divider ═══ */
.divider {
    width: 100%;
    height: 1px;
    background: var(--border);
    position: relative;
    z-index: 2;
}

/* ═══ Responsive ═══ */
@media (max-width: 1024px) {
    .pillars {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .services-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .services-sidebar {
        position: static;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns: 1fr 1fr;
    }

    .models-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-block:nth-child(2) {
        border-right: none;
    }
}

/* ═══ GLOBAL INTERACTIVE TERMINAL ═══ */
#global-term-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 50%;
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s var(--ease-out);
}

#global-term-toggle:hover {
    background: var(--accent);
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 4px 24px rgba(220, 20, 60, 0.4);
}

#global-terminal {
    position: fixed;
    bottom: 5rem;
    right: 2rem;
    width: 400px;
    max-width: calc(100vw - 4rem);
    height: 350px;
    background: rgba(10, 10, 12, 0.95);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(220, 20, 60, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.3s var(--ease-out);
}

#global-terminal.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.term-header {
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: var(--text-dim);
    user-select: none;
}

.term-header-controls span {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    margin-left: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.term-header-controls span:hover {
    background: var(--accent);
}

.term-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
}

.term-output {
    margin-bottom: 0.5rem;
}

.term-output.command {
    color: var(--text-primary);
    font-weight: bold;
}

.term-output.system {
    color: var(--accent);
}

.term-output.error {
    color: #ff3333;
}

.term-input-line {
    display: flex;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
}

.term-prompt {
    color: var(--accent);
    margin-right: 0.5rem;
    font-weight: bold;
    white-space: nowrap;
}

.term-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    outline: none;
    width: 100%;
}

@media (max-width: 600px) {
    #global-terminal {
        width: calc(100vw - 2rem);
        right: 1rem;
        bottom: 5rem;
    }

    #global-term-toggle {
        right: 1rem;
        bottom: 1rem;
    }
}

/* ═══ GLOBAL PRELOADER ═══ */
#global-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 10001;
    /* Above CRT transition */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-out;
}

#global-preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.preloader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.preloader-logo {
    width: 64px;
    height: 64px;
}

.preloader-text {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    animation: blink 1s infinite alternate;
}

.preloader-bar {
    width: 200px;
    height: 2px;
    background: var(--border);
    position: relative;
    overflow: hidden;
}

.preloader-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 30%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: loadingBar 2s infinite ease-in-out;
}

@keyframes loadingBar {
    0% {
        left: -30%;
        width: 30%;
    }

    50% {
        left: 30%;
        width: 70%;
    }

    100% {
        left: 100%;
        width: 30%;
    }
}

/* ═══ CRT PAGE TRANSITION ═══ */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

body.crt-transition-active::after {
    opacity: 1;
    animation: crtTurnOff 0.4s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes crtTurnOff {
    0% {
        transform: scale(1, 1.3) translate3d(0, 0, 0);
        filter: brightness(1);
    }

    60% {
        transform: scale(1, 0.001) translate3d(0, 0, 0);
        filter: brightness(10);
    }

    100% {
        animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
        transform: scale(0, 0.0001) translate3d(0, 0, 0);
        filter: brightness(0);
    }
}

@media (max-width: 768px) {
    .section {
        padding: 4rem 1.5rem;
    }

    .svc-hero {
        padding: 7rem 1.5rem 3rem;
        min-height: auto;
    }

    .svc-hero .section-max {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .svc-hero-art {
        max-width: 300px;
    }

    .nav {
        padding: 1rem 1.5rem;
    }

    .nav.scrolled {
        padding: 0.5rem 1.5rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .footer {
        padding: 2rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .feature-box {
        border-right: none !important;
    }

    .models-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}