/* =============================================================
   p9.rs - Retro-Futuristic Chrome Showroom
   Palette: Midnight Chrome #1A1A2E, Polished Silver #C8C8D0,
            Chrome Highlight #E8E8F0, Burnished Gold #D4A843,
            Teal Glow #2EC4B6, Deep Space #0F0F1A, Chrome #C0C0C0
   Fonts: Comfortaa (display), Nunito (body)
   ============================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 400;
    color: #C8C8D0;
    background-color: #1A1A2E;
    overflow-x: hidden;
    position: relative;
}

/* --- Herringbone Background Pattern --- */
.herringbone-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(200, 200, 208, 0.03) 10px,
            rgba(200, 200, 208, 0.03) 11px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 10px,
            rgba(200, 200, 208, 0.03) 10px,
            rgba(200, 200, 208, 0.03) 11px
        );
}

/* --- Cursor-Follow Spotlight Overlay --- */
.spotlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: radial-gradient(
        circle 120px at var(--mx, 50%) var(--my, 50%),
        rgba(232, 232, 240, 0.08) 0%,
        transparent 100%
    );
    transition: background 0.15s ease-out;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1A1A2E;
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    z-index: 1;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
}

.hero-title {
    font-family: 'Comfortaa', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 4.5rem);
    color: #E8E8F0;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(20px);
    animation: heroFadeIn 1s ease-out 0.3s forwards;
}

.hero-tagline {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.5vw, 1.3rem);
    color: #C8C8D0;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(15px);
    animation: heroFadeIn 1s ease-out 0.6s forwards;
}

.chrome-border-shimmer {
    width: 300px;
    height: 2px;
    margin: 0 auto;
    background: linear-gradient(90deg, transparent, #C0C0C0, #E8E8F0, #C0C0C0, transparent);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite, heroFadeIn 1s ease-out 0.9s forwards;
    opacity: 0;
    border-radius: 1px;
}

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

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Content Sections --- */
.content-section {
    position: relative;
    z-index: 1;
    padding: 6rem 2rem 4rem;
}

.diagonal-divider-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4vw;
    background: linear-gradient(
        to bottom right,
        #1A1A2E 49.5%,
        transparent 50.5%
    );
    z-index: 2;
}

/* Chrome top border for sections */
.content-section::before {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #C0C0C0, transparent);
    margin-bottom: 3rem;
}

/* --- Row 1: Full-width Featured Section --- */
.row-1-inner {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.section-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.line-illustration {
    width: 160px;
    height: 160px;
    opacity: 0.85;
}

.section-heading {
    font-family: 'Comfortaa', sans-serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2vw, 2rem);
    color: #E8E8F0;
    margin-bottom: 1.5rem;
    letter-spacing: 0.04em;
}

.section-body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.7;
    color: #C8C8D0;
    max-width: 720px;
    margin: 0 auto 1.2rem;
}

/* --- Row 2 & Row 3: 2fr + 1fr Grid --- */
.row-2-grid,
.row-3-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

.row-2 .main-content,
.row-3 .main-content {
    text-align: left;
}

.row-2 .section-illustration,
.row-3 .section-illustration {
    justify-content: flex-start;
}

.row-2 .section-body,
.row-3 .section-body {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
}

/* --- Sidebar --- */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 2rem;
    background-color: rgba(15, 15, 26, 0.5);
    border-radius: 16px;
    border: 1px solid rgba(192, 192, 192, 0.1);
    align-self: start;
    position: sticky;
    top: 2rem;
}

.sidebar-block {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.sidebar-label {
    font-family: 'Comfortaa', sans-serif;
    font-weight: 400;
    font-size: 0.75rem;
    color: #D4A843;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.sidebar-value {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #E8E8F0;
}

.status-nominal {
    color: #2EC4B6;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(192, 192, 192, 0.1);
}

.sidebar-link {
    font-family: 'Comfortaa', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    color: #2EC4B6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sidebar-link:hover {
    color: #D4A843;
}

/* --- Diagonal Section Transitions --- */
.row-1 {
    clip-path: polygon(0 0, 100% 3vw, 100% 100%, 0 calc(100% - 3vw));
    padding-top: 8rem;
    padding-bottom: 6rem;
    background-color: #1A1A2E;
}

.row-2 {
    clip-path: polygon(0 0, 100% 3vw, 100% 100%, 0 calc(100% - 3vw));
    padding-top: 8rem;
    padding-bottom: 6rem;
    background-color: rgba(15, 15, 26, 0.3);
}

.row-3 {
    clip-path: polygon(0 0, 100% 3vw, 100% 100%, 0 calc(100% - 3vw));
    padding-top: 8rem;
    padding-bottom: 6rem;
    background-color: #1A1A2E;
}

/* --- Scroll Fade-In Animation --- */
.content-section .section-heading,
.content-section .section-body,
.content-section .section-illustration,
.content-section .sidebar {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.content-section .section-heading.visible,
.content-section .section-body.visible,
.content-section .section-illustration.visible,
.content-section .sidebar.visible {
    opacity: 1;
    transform: translateY(0);
}

.content-section .section-illustration.visible .line-illustration {
    opacity: 0.85;
}

/* --- Footer --- */
.site-footer {
    background-color: #0F0F1A;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-domain {
    font-family: 'Comfortaa', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #C8C8D0;
    letter-spacing: 0.05em;
}

.footer-year {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    color: #C8C8D0;
    opacity: 0.6;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    font-family: 'Comfortaa', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    color: #C8C8D0;
    text-decoration: none;
    transition: color 0.2s ease;
    letter-spacing: 0.05em;
}

.footer-link:hover {
    color: #2EC4B6;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .row-2-grid,
    .row-3-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sidebar {
        position: static;
    }

    .hero {
        clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
    }

    .row-1,
    .row-2,
    .row-3 {
        clip-path: polygon(0 0, 100% 1.5vw, 100% 100%, 0 calc(100% - 1.5vw));
        padding-top: 5rem;
        padding-bottom: 4rem;
    }

    .content-section {
        padding: 4rem 1.2rem 3rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .line-illustration {
        width: 120px;
        height: 120px;
    }
}
