/* ==========================================================================
   SP/\LT CSS Design System & Layout (Refined)
   ========================================================================== */

/* Color Tokens & Variables */
:root {
    --bg-dark: #080b11;
    --bg-card: rgba(13, 19, 30, 0.65);
    --bg-card-hover: rgba(18, 26, 41, 0.8);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(0, 255, 196, 0.3);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Accents (Nordic Lights & Mellanrum) */
    --accent-teal: #00ffc4;
    --accent-teal-glow: rgba(0, 255, 196, 0.4);
    --accent-blue: #00b8ff;
    --accent-magenta: #ff00c8;
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Rules */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.max-width-600 {
    max-width: 600px !important;
}

/* Ambient Radial Glows */
.radial-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
    animation: floatGlow 12s infinite alternate ease-in-out;
}

.glow-1 {
    top: -100px;
    left: -100px;
    background: radial-gradient(circle, var(--accent-teal), transparent 70%);
}

.glow-2 {
    bottom: 100px;
    right: -100px;
    background: radial-gradient(circle, var(--accent-blue), transparent 70%);
    animation-delay: -6s;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.15); }
}

/* Typography Helpers */
h1, h2, h3, h4 {
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
    color: #04060a;
    box-shadow: 0 4px 20px rgba(0, 255, 196, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 255, 196, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    border-color: var(--accent-teal);
    color: var(--accent-teal);
    box-shadow: 0 0 12px var(--accent-teal-glow);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.glass-panel:hover {
    border-color: var(--border-hover);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Header & Navigation */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(8, 11, 17, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    text-decoration: none;
}

.brand-logo-wrap {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.spalt-logo-svg {
    display: block;
    filter: drop-shadow(0 0 6px rgba(0, 255, 157, 0.2));
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), filter 0.2s ease;
}

.brand-logo-wrap:hover .spalt-logo-svg {
    transform: scale(1.03);
    filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.45));
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: var(--accent-teal);
}

/* Hero Section (Grid with dashboard visual) */
.hero-section {
    padding: 7rem 0 5rem 0;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: rgba(0, 255, 196, 0.08);
    border: 1px solid rgba(0, 255, 196, 0.2);
    color: var(--accent-teal);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.8rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    max-width: 580px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

.hero-visual {
    width: 100%;
}

/* Sections Base */
section {
    padding: 6rem 0;
}

.section-header {
    margin-bottom: 4rem;
}

.text-center {
    text-align: center;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

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

/* Feature Cards */
.feature-card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
    color: #00E5FF;
}

.spalt-icon-svg {
    display: inline-block;
    vertical-align: middle;
    width: 32px;
    height: 32px;
    color: #00E5FF;
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.35));
    transition: transform 0.25s ease, filter 0.25s ease;
}

.feature-card:hover .spalt-icon-svg,
.service-card:hover .spalt-icon-svg {
    transform: scale(1.08);
    filter: drop-shadow(0 0 12px rgba(0, 255, 157, 0.6));
}

.feature-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Service Cards */
.service-card {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #00E5FF;
}

.service-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
}

.service-card p {
    color: var(--text-secondary);
}

/* Live Factory Feed (Dashboard Styles) */
.dashboard-panel {
    border-radius: 16px;
    padding: 2rem;
    border-color: rgba(0, 255, 196, 0.15);
    box-shadow: 0 0 30px rgba(0, 255, 196, 0.05);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
}

.status-indicator-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.pulse-dot.green {
    background-color: var(--accent-teal);
    box-shadow: 0 0 10px var(--accent-teal-glow);
    animation: dotPulse 1.5s infinite;
}

.pulse-dot.blue {
    background-color: var(--accent-blue);
    box-shadow: 0 0 10px rgba(0, 184, 255, 0.4);
    animation: dotPulse 1.5s infinite;
}

.pulse-dot.magenta {
    background-color: var(--accent-magenta);
    box-shadow: 0 0 10px rgba(255, 0, 200, 0.4);
    animation: dotPulse 0.6s infinite;
}

@keyframes dotPulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.status-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.dashboard-time {
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.dashboard-metric {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metric-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    letter-spacing: 0.05em;
}

.metric-val {
    font-size: 1.2rem;
    font-weight: 700;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.25rem;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue));
    border-radius: 10px;
    transition: width 0.5s ease-in-out;
}

.queue-log-section h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.log-console {
    background: #04060a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #a7f3d0;
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.log-line {
    opacity: 0.85;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Contact Form Section */
.contact-section {
    position: relative;
}

.brief-form {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-teal);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px rgba(0, 255, 196, 0.15);
}

.form-group textarea {
    resize: vertical;
}

.form-message {
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
}

.success-message {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.success-message h4 {
    margin-bottom: 0.5rem;
}

.hidden {
    display: none !important;
}

/* Footer */
.main-footer {
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    margin-top: 4rem;
}

.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    font-size: 1.4rem;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.25rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

