/* =============================================
   p9r.xyz -- Brutalist Concrete + Aurora Light
   ============================================= */

/* --- Palette: #D0D0D0 #A0A0A0 #808080 #606060 #2A2A30 #6080D0 #9060C0 #E8C090 --- */
/* --- Fonts: Libre Baskerville (inter fallback) --- */

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

:root {
    --concrete-light: #D0D0D0;
    --concrete-mid: #A0A0A0;
    --concrete-border: #808080;
    --concrete-dark: #606060;
    --steel-charcoal: #2A2A30;
    --aurora-blue: #6080D0;
    --aurora-violet: #9060C0;
    --bokeh-warm: #E8C090;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: clamp(15px, 1vw, 17px);
    line-height: 1.8;
    color: #2A2A30;
    background-color: #D0D0D0;
    overflow-x: hidden;
    position: relative;
}

/* --- Concrete Noise Texture Overlay --- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url(#noiseFilter);
    opacity: 0.05;
    pointer-events: none;
    z-index: 1000;
}

/* --- Noise Filter SVG (hidden) --- */
#noise-filter-svg {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* --- Bokeh Background --- */
#bokeh-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.bokeh-circle {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: bokehBloom 600ms ease-out forwards;
}

.bokeh-1 {
    width: 80px;
    height: 80px;
    top: 5%;
    left: 3%;
    background: radial-gradient(circle, rgba(232, 192, 144, 0.25) 0%, transparent 70%);
    animation-delay: 200ms;
}

.bokeh-2 {
    width: 60px;
    height: 60px;
    top: 15%;
    right: 5%;
    background: radial-gradient(circle, rgba(96, 128, 208, 0.2) 0%, transparent 70%);
    animation-delay: 400ms;
}

.bokeh-3 {
    width: 50px;
    height: 50px;
    bottom: 20%;
    left: 8%;
    background: radial-gradient(circle, rgba(232, 192, 144, 0.2) 0%, transparent 70%);
    animation-delay: 600ms;
}

.bokeh-4 {
    width: 70px;
    height: 70px;
    bottom: 10%;
    right: 4%;
    background: radial-gradient(circle, rgba(96, 128, 208, 0.25) 0%, transparent 70%);
    animation-delay: 300ms;
}

.bokeh-5 {
    width: 40px;
    height: 40px;
    top: 40%;
    left: 2%;
    background: radial-gradient(circle, rgba(144, 96, 192, 0.2) 0%, transparent 70%);
    animation-delay: 500ms;
}

.bokeh-6 {
    width: 55px;
    height: 55px;
    top: 60%;
    right: 3%;
    background: radial-gradient(circle, rgba(232, 192, 144, 0.15) 0%, transparent 70%);
    animation-delay: 700ms;
}

.bokeh-7 {
    width: 45px;
    height: 45px;
    top: 80%;
    left: 6%;
    background: radial-gradient(circle, rgba(96, 128, 208, 0.2) 0%, transparent 70%);
    animation-delay: 350ms;
}

.bokeh-8 {
    width: 65px;
    height: 65px;
    top: 30%;
    right: 7%;
    background: radial-gradient(circle, rgba(144, 96, 192, 0.15) 0%, transparent 70%);
    animation-delay: 550ms;
}

@keyframes bokehBloom {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- Aurora Lights --- */
#aurora-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: hidden;
}

#aurora-svg {
    width: 100%;
    height: 100%;
}

.aurora-path {
    fill: none;
    stroke-width: 1;
    opacity: 0.4;
}

.aurora-path-1 {
    stroke: #6080D0;
    animation: auroraDrift1 20s ease-in-out infinite;
}

.aurora-path-2 {
    stroke: #9060C0;
    animation: auroraDrift2 24s ease-in-out infinite;
}

.aurora-path-3 {
    stroke: #6080D0;
    animation: auroraDrift3 22s ease-in-out infinite;
    opacity: 0.3;
}

.aurora-path-4 {
    stroke: #9060C0;
    animation: auroraDrift1 26s ease-in-out infinite;
    opacity: 0.25;
}

.aurora-path-5 {
    stroke: #6080D0;
    animation: auroraDrift2 18s ease-in-out infinite;
    opacity: 0.35;
}

.aurora-path-6 {
    stroke: #6080D0;
    animation: auroraDrift3 21s ease-in-out infinite;
    opacity: 0.5;
}

.aurora-path-7 {
    stroke: #9060C0;
    animation: auroraDrift1 25s ease-in-out infinite;
    opacity: 0.45;
}

.aurora-path-8 {
    stroke: #6080D0;
    animation: auroraDrift2 19s ease-in-out infinite;
    opacity: 0.4;
}

.aurora-path-9 {
    stroke: #6080D0;
    animation: auroraDrift1 23s ease-in-out infinite;
    opacity: 0.3;
}

.aurora-path-10 {
    stroke: #9060C0;
    animation: auroraDrift3 20s ease-in-out infinite;
    opacity: 0.25;
}

@keyframes auroraDrift1 {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-30px);
    }
}

@keyframes auroraDrift2 {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(25px);
    }
}

@keyframes auroraDrift3 {
    0%, 100% {
        transform: translateY(0);
    }
    33% {
        transform: translateY(-20px);
    }
    66% {
        transform: translateY(15px);
    }
}

/* --- Hero Section --- */
#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background-color: #D0D0D0;
}

#hero-content {
    text-align: center;
    opacity: 0;
    animation: heroFadeIn 800ms ease-out 200ms forwards;
}

#domain-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: clamp(28px, 3.5vw, 56px);
    color: #2A2A30;
    letter-spacing: 0.02em;
    margin: 16px 0;
}

.structural-marker {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: 11px;
    color: #808080;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 8px;
}

.label {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 400;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #808080;
}

@keyframes heroFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* --- Module Stack --- */
#module-stack,
#module-stack-2 {
    position: relative;
    z-index: 10;
    padding: 64px 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.module-block {
    background-color: #D0D0D0;
    border: 2px solid #808080;
    border-radius: 0;
    padding: 24px;
    opacity: 0;
    transition: border-color 300ms ease;
}

.module-block.revealed {
    opacity: 1;
}

.module-block:hover {
    border-color: #6080D0;
}

.module-wide {
    grid-column: span 2;
}

.module-medium {
    grid-column: span 1;
}

.module-narrow {
    grid-column: span 1;
}

.module-block h2 {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-weight: 700;
    font-size: clamp(28px, 3.5vw, 56px);
    color: #2A2A30;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.module-block p {
    color: #2A2A30;
    margin-top: 8px;
}

/* --- Underline Draw Animation --- */
.underline-draw::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background-color: #6080D0;
    transition: width 400ms ease;
    margin-top: 4px;
}

.underline-draw.active::after {
    width: 100%;
}

.underline-draw:hover {
    text-shadow: 0 0 8px rgba(144, 96, 192, 0.3);
}

/* --- Aurora Interstitial --- */
#aurora-interstitial {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background-color: #D0D0D0;
}

#interstitial-aurora {
    width: 100%;
    height: 100%;
}

.interstitial-aurora-svg {
    width: 100%;
    height: 100%;
}

/* --- Foundation (Footer) --- */
#foundation {
    position: relative;
    z-index: 10;
    background-color: #606060;
    padding: 48px 16px;
    overflow: hidden;
}

#foundation-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.foundation-cell {
    border: 2px solid #808080;
    border-radius: 0;
    padding: 24px;
}

.foundation-cell .structural-marker {
    color: #A0A0A0;
}

.foundation-cell .label {
    color: #D0D0D0;
    margin-top: 8px;
}

#foundation-aurora {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    pointer-events: none;
    opacity: 0.3;
}

.foundation-aurora-svg {
    width: 100%;
    height: 100%;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .module-grid {
        grid-template-columns: 1fr;
    }

    .module-wide {
        grid-column: span 1;
    }

    #foundation-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    #hero-content {
        padding: 0 16px;
    }
}
