/* ============================================
   simulai.org - Grainy-Textured Observatory
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Serif 4', serif;
    font-size: 1.05rem;
    line-height: 1.8;
    font-weight: 400;
    color: #5A4530;
    background-color: #F5E6C8;
    overflow-x: hidden;
}

/* --- Grain Overlay --- */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

/* --- Observatory --- */
.observatory {
    position: relative;
    z-index: 1;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.hero-title {
    font-family: 'Zilla Slab', serif;
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 700;
    color: #3A2A15;
    line-height: 1;
    letter-spacing: -0.01em;
}

.hero-tagline {
    font-family: 'Source Serif 4', serif;
    font-size: 1.15rem;
    color: #A07020;
    margin-top: 1rem;
    font-weight: 400;
}

/* --- Organic Blobs --- */
@keyframes blobMorph1 {
    0%   { border-radius: 40% 60% 50% 70% / 60% 40% 70% 50%; }
    25%  { border-radius: 60% 40% 70% 50% / 50% 60% 40% 70%; }
    50%  { border-radius: 50% 70% 40% 60% / 70% 50% 60% 40%; }
    75%  { border-radius: 70% 50% 60% 40% / 40% 70% 50% 60%; }
    100% { border-radius: 40% 60% 50% 70% / 60% 40% 70% 50%; }
}

@keyframes blobMorph2 {
    0%   { border-radius: 60% 40% 70% 50% / 50% 60% 40% 70%; }
    25%  { border-radius: 40% 60% 50% 70% / 60% 40% 70% 50%; }
    50%  { border-radius: 70% 50% 60% 40% / 40% 70% 50% 60%; }
    75%  { border-radius: 50% 70% 40% 60% / 70% 50% 60% 40%; }
    100% { border-radius: 60% 40% 70% 50% / 50% 60% 40% 70%; }
}

@keyframes blobMorph3 {
    0%   { border-radius: 50% 70% 40% 60% / 70% 50% 60% 40%; }
    25%  { border-radius: 70% 50% 60% 40% / 40% 70% 50% 60%; }
    50%  { border-radius: 40% 60% 50% 70% / 60% 40% 70% 50%; }
    75%  { border-radius: 60% 40% 70% 50% / 50% 60% 40% 70%; }
    100% { border-radius: 50% 70% 40% 60% / 70% 50% 60% 40%; }
}

.hero-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.blob {
    position: absolute;
    mix-blend-mode: multiply;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: rgba(212, 160, 48, 0.2);
    top: 15%;
    left: 10%;
    animation: blobMorph1 12s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.blob-2 {
    width: 350px;
    height: 350px;
    background: rgba(160, 112, 32, 0.15);
    top: 25%;
    right: 15%;
    animation: blobMorph2 14s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: rgba(212, 160, 48, 0.18);
    bottom: 15%;
    left: 35%;
    animation: blobMorph3 10s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* --- Blob Divider --- */
.blob-divider {
    display: flex;
    justify-content: center;
    padding: 4vh 0;
}

.blob-small {
    width: 60px;
    height: 60px;
    background: rgba(212, 160, 48, 0.3);
    mix-blend-mode: multiply;
}

.blob-divider-shape {
    animation: blobMorph1 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.blob-divider-shape-2 {
    animation: blobMorph2 9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    background: rgba(160, 112, 32, 0.25);
}

.blob-divider-shape-3 {
    animation: blobMorph3 7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* --- Content Sections --- */
.content-section {
    max-width: 680px;
    margin: 0 auto;
    padding: 6vh 2rem;
}

.section-heading {
    font-family: 'Zilla Slab', serif;
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 700;
    color: #3A2A15;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.section-text {
    font-family: 'Source Serif 4', serif;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #5A4530;
    margin-bottom: 1rem;
}

/* --- Glitch Art Element --- */
.glitch-art-element {
    float: left;
    width: 160px;
    height: 120px;
    margin: 0.5rem 1.5rem 1rem 0;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 4px, rgba(212, 160, 48, 0.15) 4px, rgba(212, 160, 48, 0.15) 6px),
        repeating-linear-gradient(90deg, transparent, transparent 8px, rgba(160, 112, 32, 0.1) 8px, rgba(160, 112, 32, 0.1) 10px),
        linear-gradient(135deg, rgba(212, 160, 48, 0.2) 0%, rgba(160, 112, 32, 0.15) 50%, rgba(255, 248, 236, 0.3) 100%);
    background-blend-mode: overlay;
    filter: contrast(0.95) saturate(0.8);
    border-radius: 4px;
}

/* --- Grain Intense Section --- */
.grain-intense {
    position: relative;
}

.grain-intense::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.08'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

/* --- Pull Quote --- */
.pull-quote {
    font-family: 'Zilla Slab', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #D4A030;
    border-left: 4px solid #D4A030;
    padding: 1rem 0 1rem 1.5rem;
    margin: 2rem 0;
    line-height: 1.5;
    font-style: italic;
}

/* --- Closing Section --- */
.closing-section {
    text-align: center;
    position: relative;
    padding: 8vh 2rem;
}

.closing-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.blob-close-1 {
    width: 120px;
    height: 120px;
    background: rgba(212, 160, 48, 0.2);
    top: 20%;
    left: 30%;
    animation: blobMorph1 10s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.blob-close-2 {
    width: 100px;
    height: 100px;
    background: rgba(160, 112, 32, 0.15);
    bottom: 20%;
    right: 30%;
    animation: blobMorph2 12s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.closing-title {
    font-family: 'Zilla Slab', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #3A2A15;
    position: relative;
    z-index: 2;
}

/* --- Reveal Animation --- */
.reveal-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Card surface reference: #FFF8EC */
.card-surface {
    background-color: #FFF8EC;
    box-shadow: inset 0 0 40px rgba(160,140,110,0.1);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .blob-1 { width: 250px; height: 250px; }
    .blob-2 { width: 200px; height: 200px; }
    .blob-3 { width: 180px; height: 180px; }

    .glitch-art-element {
        float: none;
        width: 100%;
        height: 80px;
        margin: 0 0 1rem 0;
    }

    .content-section {
        padding: 4vh 1.5rem;
    }
}
