/* ==========================================================
   mosun.xyz — Corporate Neon Circuit Board
   Colors: #E0E0F0, #A0A0B0, #00D4A0, #E040A0, #0E0E1A, #3A3850, #16162A
   Fonts: Righteous (display), Inter (body), Fira Code (code/data)
   ========================================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: #0E0E1A;
    color: #A0A0B0;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
}

/* --- Circuit Background --- */
.circuit-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.circuit-background.visible {
    opacity: 1;
}

.circuit-background svg {
    width: 100%;
    height: 100%;
}

/* --- Blur-Focus Reveals --- */
.blur-target {
    filter: blur(4px);
    opacity: 0.4;
    transition: filter 400ms ease, opacity 400ms ease, transform 600ms ease;
}

.blur-target.in-view {
    filter: blur(0);
    opacity: 1;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Righteous', cursive;
    font-weight: 400;
    color: #E0E0F0;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: #E0E0F0;
    text-shadow: 0 0 40px rgba(0, 212, 160, 0.4), 0 0 80px rgba(0, 212, 160, 0.15);
    letter-spacing: 0.08em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.section-heading {
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    color: #E0E0F0;
    margin-bottom: 1.5rem;
    position: relative;
}

.section-heading::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #00D4A0;
    margin-top: 0.75rem;
    box-shadow: 0 0 10px rgba(0, 212, 160, 0.5);
}

.body-text {
    color: #A0A0B0;
    margin-bottom: 1rem;
    font-weight: 300;
}

/* --- Layout: Asymmetric Grid --- */
.asymmetric-grid {
    display: grid;
    grid-template-columns: 55% 35%;
    gap: 10%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    align-items: start;
}

.asymmetric-grid--reversed {
    grid-template-columns: 35% 55%;
}

.asymmetric-grid--reversed .col-primary {
    order: 2;
}

.asymmetric-grid--reversed .col-secondary {
    order: 1;
}

.col-primary {
    position: relative;
}

.col-secondary {
    position: relative;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
    padding: clamp(2rem, 5vw, 4rem) 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 55% 35%;
    gap: 10%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    align-items: center;
    width: 100%;
}

.hero-primary {
    position: relative;
}

.hero-tagline {
    color: #A0A0B0;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.8;
    font-weight: 300;
    max-width: 540px;
}

.hero-secondary {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* --- Marble Panels --- */
.marble-panel {
    background:
        repeating-linear-gradient(
            135deg,
            rgba(58, 56, 80, 0.08) 0px,
            rgba(58, 56, 80, 0.03) 2px,
            transparent 2px,
            transparent 12px
        ),
        repeating-linear-gradient(
            45deg,
            rgba(58, 56, 80, 0.06) 0px,
            rgba(58, 56, 80, 0.02) 1px,
            transparent 1px,
            transparent 8px
        ),
        linear-gradient(180deg, #16162A, #16162A);
    border: 1px solid rgba(0, 212, 160, 0.12);
    border-radius: 4px;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 400ms ease, box-shadow 400ms ease;
    position: relative;
    overflow: hidden;
}

.marble-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: #00D4A0;
    box-shadow: 0 0 12px rgba(0, 212, 160, 0.4);
}

.marble-panel:hover {
    border-color: rgba(224, 64, 160, 0.4);
    box-shadow: 0 0 20px rgba(224, 64, 160, 0.1);
}

.data-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: #A0A0B0;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.data-value {
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    color: #00D4A0;
    text-shadow: 0 0 8px rgba(0, 212, 160, 0.3);
}

/* --- Content Sections --- */
.content-section {
    position: relative;
    z-index: 1;
    padding: clamp(4rem, 8vw, 8rem) 0;
}

/* --- Card Panels --- */
.card-panel {
    background: #16162A;
    border: 1px solid rgba(0, 212, 160, 0.1);
    border-radius: 4px;
    padding: 2rem;
    margin-bottom: 1.25rem;
    transition: border-color 400ms ease, transform 300ms ease, box-shadow 400ms ease;
}

.card-panel:hover {
    border-color: rgba(224, 64, 160, 0.35);
    transform: translateX(-4px);
    box-shadow: 4px 0 20px rgba(224, 64, 160, 0.08);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #E0E0F0;
}

.card-text {
    color: #A0A0B0;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.card-code {
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: #00D4A0;
    background: rgba(0, 212, 160, 0.06);
    padding: 0.25rem 0.6rem;
    border-radius: 2px;
    display: inline-block;
}

/* --- Service Blocks --- */
.service-block {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(22, 22, 42, 0.5);
    border-radius: 4px;
    border: 1px solid transparent;
    transition: border-color 400ms ease, background 400ms ease;
}

.service-block:hover {
    border-color: rgba(224, 64, 160, 0.25);
    background: rgba(22, 22, 42, 0.8);
}

.service-indicator {
    width: 4px;
    min-height: 100%;
    background: linear-gradient(180deg, #00D4A0, #E040A0);
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(0, 212, 160, 0.3);
}

.service-name {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: #E0E0F0;
}

/* --- Metrics Panel --- */
.metrics-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.metrics-title {
    font-size: 1.1rem;
    color: #E0E0F0;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 212, 160, 0.15);
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(58, 56, 80, 0.3);
}

.metric-row:last-child {
    border-bottom: none;
}

.metric-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #A0A0B0;
}

.metric-value {
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    color: #00D4A0;
    text-shadow: 0 0 6px rgba(0, 212, 160, 0.25);
}

/* --- Tech Grid --- */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.tech-item {
    background: #16162A;
    border: 1px solid rgba(0, 212, 160, 0.08);
    border-radius: 4px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: border-color 400ms ease, transform 300ms ease, box-shadow 400ms ease;
}

.tech-item:hover {
    border-color: rgba(224, 64, 160, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(224, 64, 160, 0.08);
}

.tech-icon {
    display: block;
    font-size: 1.8rem;
    color: #00D4A0;
    margin-bottom: 0.75rem;
    text-shadow: 0 0 12px rgba(0, 212, 160, 0.4);
}

.tech-name {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: #A0A0B0;
    letter-spacing: 0.05em;
}

/* --- Code Panel --- */
.code-panel {
    background: #16162A;
    border: 1px solid rgba(0, 212, 160, 0.12);
    border-radius: 6px;
    overflow: hidden;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    background: rgba(14, 14, 26, 0.6);
    border-bottom: 1px solid rgba(0, 212, 160, 0.08);
}

.code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-dot--teal {
    background: #00D4A0;
    box-shadow: 0 0 6px rgba(0, 212, 160, 0.5);
}

.code-dot--magenta {
    background: #E040A0;
    box-shadow: 0 0 6px rgba(224, 64, 160, 0.5);
}

.code-dot--grey {
    background: #3A3850;
}

.code-filename {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: #A0A0B0;
    margin-left: 0.5rem;
}

.code-block {
    padding: 1.5rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.82rem;
    line-height: 1.9;
    color: #00D4A0;
    overflow-x: auto;
}

.code-block code {
    font-family: inherit;
    color: inherit;
}

/* --- Insight Cards --- */
.insight-card {
    padding: 2rem;
    margin-bottom: 1.5rem;
    background: rgba(22, 22, 42, 0.4);
    border-left: 3px solid #00D4A0;
    border-radius: 0 4px 4px 0;
    transition: border-color 400ms ease, background 400ms ease;
}

.insight-card:hover {
    border-left-color: #E040A0;
    background: rgba(22, 22, 42, 0.7);
}

.insight-date {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: #00D4A0;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    display: block;
}

.insight-title {
    font-size: 1.15rem;
    color: #E0E0F0;
    margin-bottom: 0.75rem;
}

/* --- Status Panel --- */
.status-panel {
    background: #16162A;
    border: 1px solid rgba(0, 212, 160, 0.12);
    border-radius: 4px;
    padding: 2rem;
}

.status-title {
    font-size: 1.1rem;
    color: #E0E0F0;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 212, 160, 0.15);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 0;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot--active {
    background: #00D4A0;
    box-shadow: 0 0 8px rgba(0, 212, 160, 0.6);
    animation: pulse-glow 2s ease-in-out infinite;
}

.status-dot--maintenance {
    background: #E040A0;
    box-shadow: 0 0 8px rgba(224, 64, 160, 0.6);
    animation: pulse-glow-magenta 2s ease-in-out infinite;
}

.status-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #A0A0B0;
}

/* --- Footer --- */
.site-footer {
    position: relative;
    z-index: 1;
    padding: clamp(3rem, 6vw, 5rem) 0 2rem;
    border-top: 1px solid rgba(0, 212, 160, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 55% 35%;
    gap: 10%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    margin-bottom: 3rem;
}

.footer-brand {
    font-family: 'Righteous', cursive;
    font-size: 1.5rem;
    color: #E0E0F0;
    display: block;
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(0, 212, 160, 0.3);
}

.footer-text {
    color: #A0A0B0;
    font-size: 0.9rem;
    max-width: 400px;
}

.footer-secondary {
    display: flex;
    gap: 3rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: #00D4A0;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.footer-link {
    font-size: 0.85rem;
    color: #A0A0B0;
    cursor: pointer;
    transition: color 300ms ease;
}

.footer-link:hover {
    color: #E040A0;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem clamp(1.5rem, 4vw, 3rem) 0;
    border-top: 1px solid rgba(58, 56, 80, 0.3);
}

.footer-copyright {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: #3A3850;
    letter-spacing: 0.05em;
}

/* --- Animations --- */
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 212, 160, 0.6); }
    50% { box-shadow: 0 0 16px rgba(0, 212, 160, 0.9); }
}

@keyframes pulse-glow-magenta {
    0%, 100% { box-shadow: 0 0 8px rgba(224, 64, 160, 0.6); }
    50% { box-shadow: 0 0 16px rgba(224, 64, 160, 0.9); }
}

/* --- Hero slide-in animations --- */
.hero-primary .blur-target {
    transform: translateX(-40px);
}

.hero-primary .blur-target.in-view {
    transform: translateX(0);
}

.hero-secondary .blur-target {
    transform: translateX(40px);
}

.hero-secondary .blur-target.in-view {
    transform: translateX(0);
}

/* --- Content slide-in --- */
.content-section .blur-target {
    transform: translateY(20px);
}

.content-section .blur-target.in-view {
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .asymmetric-grid,
    .asymmetric-grid--reversed,
    .hero-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .asymmetric-grid--reversed .col-primary,
    .asymmetric-grid--reversed .col-secondary {
        order: unset;
    }

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

    .footer-secondary {
        gap: 2rem;
    }

    .hero-title {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
}

@media (max-width: 480px) {
    .tech-grid {
        grid-template-columns: 1fr;
    }

    .footer-secondary {
        flex-direction: column;
        gap: 1.5rem;
    }
}
