/* ============================================
   archaic.works - Neubrutalism x Archaic Grandeur
   ============================================ */

/* CSS Custom Properties */
:root {
    --burgundy: #4A0E1B;
    --obsidian: #1A1A1A;
    --parchment: #F5EDE0;
    --violet: #7B2D8E;
    --teal: #1B6B6F;
    --gold: #C4953A;
    --slate: #2B2B2B;
    --bone: #EDEDED;
}

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

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

body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    color: var(--obsidian);
    background-color: var(--obsidian);
    overflow-x: hidden;
    line-height: 1.7;
}

/* ============================================
   Aurora Gradient Animation
   ============================================ */
@keyframes auroraShift {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 100%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 0%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulseAttention {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes pulseChevron {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
    50% { transform: translateX(-50%) scale(1.08); opacity: 0.7; }
}

@keyframes blobDrift {
    0% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-15px, 15px) scale(0.97); }
    75% { transform: translate(20px, 25px) scale(1.03); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes blobDrift2 {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-25px, 20px) scale(1.04); }
    66% { transform: translate(15px, -15px) scale(0.96); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes wispFloat {
    0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0.12; }
    25% { transform: translateY(-30px) translateX(20px) rotate(2deg); opacity: 0.18; }
    50% { transform: translateY(-10px) translateX(-15px) rotate(-1deg); opacity: 0.1; }
    75% { transform: translateY(-40px) translateX(10px) rotate(3deg); opacity: 0.16; }
    100% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0.12; }
}

/* Fade in for scroll-triggered sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Dot Navigation
   ============================================ */
#dot-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: flex-end;
}

.dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: transparent;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    position: relative;
}

.dot:hover,
.dot.active {
    background: var(--gold);
    transform: scale(1.3);
}

.dot-label {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.dot:hover .dot-label {
    opacity: 1;
}

/* ============================================
   Aurora Background Blobs (Global)
   ============================================ */
.aurora-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.aurora-blob {
    position: absolute;
    border-radius: 42% 58% 35% 65% / 55% 45% 60% 40%;
    opacity: 0.08;
    filter: blur(60px);
}

.blob-1 {
    width: 600px;
    height: 500px;
    background: radial-gradient(ellipse, var(--violet), transparent 70%);
    top: 10%;
    left: -5%;
    animation: blobDrift 25s ease-in-out infinite;
}

.blob-2 {
    width: 500px;
    height: 400px;
    background: radial-gradient(ellipse, var(--teal), transparent 70%);
    top: 50%;
    right: -5%;
    animation: blobDrift2 22s ease-in-out infinite;
}

.blob-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(ellipse, var(--violet), transparent 70%);
    bottom: 5%;
    left: 30%;
    animation: blobDrift 28s ease-in-out infinite reverse;
}

/* ============================================
   Excavation Layers (Sections)
   ============================================ */
.excavation-layer {
    position: relative;
    z-index: 1;
    width: 100%;
}

.excavation-layer .slab,
.excavation-layer .bedrock-content,
.excavation-layer .quote-container {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
    transform: translateY(30px);
}

.excavation-layer.visible .slab,
.excavation-layer.visible .bedrock-content,
.excavation-layer.visible .quote-container {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   SURFACE - Monolith Entry
   ============================================ */
.surface {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--burgundy);
    position: relative;
    overflow: hidden;
}

.surface .slab,
.surface .quote-container,
.surface .bedrock-content {
    opacity: 1;
    transform: none;
}

.viewport-border {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 6px solid var(--obsidian);
    z-index: 5;
    pointer-events: none;
}

.aurora-gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #4A0E1B 0%, #7B2D8E 40%, #1B6B6F 80%, #4A0E1B 100%);
    background-size: 400% 400%;
    animation: auroraShift 12s ease infinite;
    z-index: 1;
}

.surface-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.monolith-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: clamp(2.5rem, 8vw, 8rem);
    color: var(--parchment);
    letter-spacing: 0.03em;
    line-height: 1;
    margin-bottom: 1.5rem;
    text-shadow: 4px 4px 0 var(--obsidian);
}

.surface-tagline {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    color: var(--parchment);
    opacity: 0.85;
    letter-spacing: 0.05em;
}

.scroll-chevron {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    cursor: pointer;
    animation: pulseChevron 2s ease-in-out infinite;
}

.scroll-chevron svg {
    display: block;
}

/* ============================================
   Strata Lines
   ============================================ */
.strata-line {
    width: 100%;
    height: 2px;
    position: relative;
    z-index: 2;
}

.strata-burgundy {
    background: var(--burgundy);
}

.strata-gold {
    background: var(--gold);
}

/* ============================================
   Slab Base Styles
   ============================================ */
.slab {
    border: 4px solid var(--obsidian);
    box-shadow: 8px 8px 0 var(--obsidian);
    position: relative;
    margin: 0 auto;
    width: calc(100% - 120px);
    max-width: 1400px;
}

.slab-parchment {
    background: var(--parchment);
    color: var(--obsidian);
}

.slab-slate {
    background: var(--slate);
    color: var(--parchment);
}

.slab-burgundy {
    background: var(--burgundy);
    color: var(--parchment);
}

.slab-content {
    padding: 80px 60px;
}

/* ============================================
   Corner Badges
   ============================================ */
.corner-badge {
    position: absolute;
    top: -2px;
    left: -2px;
    background: var(--gold);
    border: 3px solid var(--obsidian);
    padding: 6px 18px;
    z-index: 5;
}

.corner-badge span {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--obsidian);
}

.badge-teal {
    background: var(--teal);
}

.badge-teal span {
    color: var(--parchment);
}

.badge-gold {
    background: var(--gold);
}

/* ============================================
   Meander Border
   ============================================ */
.meander-border-top {
    height: 20px;
    width: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='20' viewBox='0 0 40 20'%3E%3Cpath d='M0 10 L10 10 L10 0 L20 0 L20 10 L30 10 L30 20 L40 20 L40 10' stroke='%23C4953A' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 40px 20px;
}

/* ============================================
   FIRST STRATUM
   ============================================ */
.first-stratum {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    position: relative;
}

.three-col {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: 40px;
    align-items: center;
}

.col-left {
    padding-right: 20px;
}

.section-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: clamp(1.8rem, 4vw, 4rem);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    line-height: 1.1;
}

.heading-light {
    color: var(--parchment);
}

.body-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: inherit;
}

.vector-art {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Floating Artifacts */
.floating-artifact {
    position: absolute;
    pointer-events: none;
    z-index: 3;
}

.artifact-1 {
    width: 60px;
    height: 60px;
    top: 15%;
    right: 8%;
    transform: rotate(3deg);
}

.floating-artifact svg {
    width: 100%;
    height: 100%;
}

/* ============================================
   SECOND STRATUM
   ============================================ */
.second-stratum {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    position: relative;
}

.card-grid {
    display: grid;
    gap: 30px;
    margin-top: 2rem;
}

.three-col-unequal {
    grid-template-columns: 40% 35% 25%;
}

/* Brutalist Cards */
.brutalist-card {
    background: var(--parchment);
    color: var(--obsidian);
    border: 4px solid var(--obsidian);
    box-shadow: 8px 8px 0 var(--obsidian);
    padding: 30px 24px;
    transition: transform 150ms ease, box-shadow 150ms ease;
    cursor: default;
    position: relative;
}

.brutalist-card:hover {
    transform: translate(4px, 4px);
    box-shadow: 4px 4px 0 var(--obsidian);
}

.card-icon {
    width: 100%;
    max-width: 120px;
    height: auto;
    margin-bottom: 20px;
}

.card-icon svg {
    width: 100%;
    height: auto;
    display: block;
}

.card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: 0.03em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.card-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.65;
}

/* Stagger pulse animations */
.pulse-attention-stagger-1 {
    animation: pulseAttention 2s ease-in-out infinite;
}

.pulse-attention-stagger-2 {
    animation: pulseAttention 2s ease-in-out 0.5s infinite;
}

.pulse-attention-stagger-3 {
    animation: pulseAttention 2s ease-in-out 1s infinite;
}

/* Section aurora blobs */
.section-aurora-blob {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    border-radius: 42% 58% 35% 65% / 55% 45% 60% 40%;
    filter: blur(80px);
}

.aurora-behind-1 {
    width: 400px;
    height: 350px;
    background: radial-gradient(ellipse, var(--violet), transparent 70%);
    opacity: 0.15;
    top: 10%;
    left: -5%;
    animation: blobDrift 20s ease-in-out infinite;
}

.aurora-behind-2 {
    width: 350px;
    height: 300px;
    background: radial-gradient(ellipse, var(--teal), transparent 70%);
    opacity: 0.12;
    bottom: 10%;
    right: -3%;
    animation: blobDrift2 24s ease-in-out infinite;
}

/* ============================================
   THIRD STRATUM - Quote
   ============================================ */
.third-stratum {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.aurora-full {
    z-index: 0;
}

.quote-container {
    position: relative;
    z-index: 5;
    max-width: 900px;
    padding: 60px 40px;
    text-align: center;
}

.monumental-quote {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 900;
    font-style: italic;
    font-size: clamp(1.4rem, 3vw, 2.8rem);
    color: var(--parchment);
    line-height: 1.5;
    letter-spacing: 0.02em;
}

.quote-mark {
    color: var(--gold);
    font-size: 1.2em;
}

/* Aurora Wisps */
.aurora-wisp {
    position: absolute;
    pointer-events: none;
    z-index: 2;
    border-radius: 42% 58% 35% 65% / 55% 45% 60% 40%;
}

.wisp-1 {
    width: 300px;
    height: 200px;
    background: radial-gradient(ellipse, rgba(123, 45, 142, 0.2), transparent 70%);
    top: 15%;
    left: 10%;
    animation: wispFloat 20s ease-in-out infinite;
}

.wisp-2 {
    width: 250px;
    height: 180px;
    background: radial-gradient(ellipse, rgba(27, 107, 111, 0.18), transparent 70%);
    bottom: 20%;
    right: 8%;
    animation: wispFloat 25s ease-in-out 3s infinite;
}

.wisp-3 {
    width: 350px;
    height: 220px;
    background: radial-gradient(ellipse, rgba(123, 45, 142, 0.15), transparent 70%);
    top: 50%;
    left: 40%;
    transform: translateX(-50%);
    animation: wispFloat 30s ease-in-out 6s infinite;
}

/* ============================================
   FOURTH STRATUM - Gallery
   ============================================ */
.fourth-stratum {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    position: relative;
}

.masonry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 2rem;
}

.masonry-item {
    background: var(--parchment);
    color: var(--obsidian);
    padding: 20px;
    text-align: center;
}

.masonry-art {
    width: 100%;
    margin-bottom: 14px;
}

.masonry-art svg {
    width: 100%;
    height: auto;
    display: block;
}

.masonry-label {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--obsidian);
    display: block;
    margin-top: 8px;
}

/* ============================================
   BEDROCK
   ============================================ */
.bedrock {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--obsidian);
    position: relative;
    overflow: hidden;
    padding: 60px 40px;
}

.bedrock-content {
    position: relative;
    z-index: 5;
    text-align: center;
    max-width: 700px;
}

.bedrock-heading {
    margin-bottom: 1.5rem;
}

.bedrock-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    line-height: 1.7;
    color: var(--parchment);
    opacity: 0.85;
    margin-bottom: 3rem;
}

.bedrock-contact {
    margin-bottom: 2rem;
}

/* Brutalist Button */
.brutalist-button {
    display: inline-block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--obsidian);
    background: var(--parchment);
    border: 4px solid var(--gold);
    box-shadow: 6px 6px 0 var(--obsidian);
    padding: 16px 40px;
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease;
    animation: pulseAttention 2s ease-in-out infinite;
}

.brutalist-button:hover {
    transform: translate(3px, 3px);
    box-shadow: 3px 3px 0 var(--obsidian);
    background: var(--gold);
    color: var(--obsidian);
}

/* Aurora band at bottom */
.bedrock-aurora-band {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--burgundy) 0%, var(--violet) 40%, var(--teal) 80%, var(--burgundy) 100%);
    background-size: 400% 100%;
    animation: auroraShift 12s ease infinite;
    z-index: 2;
}

.bedrock-footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.footer-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--parchment);
    opacity: 0.5;
}

/* ============================================
   Gutter between sections
   ============================================ */
.first-stratum,
.second-stratum,
.fourth-stratum {
    padding-top: 60px;
    padding-bottom: 60px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .slab {
        width: calc(100% - 32px);
    }

    .slab-content {
        padding: 40px 24px;
    }

    .three-col {
        grid-template-columns: 1fr;
    }

    .three-col-unequal {
        grid-template-columns: 1fr;
    }

    .masonry-grid {
        grid-template-columns: 1fr 1fr;
    }

    .col-right {
        order: -1;
    }

    .vector-art {
        max-width: 280px;
        margin-bottom: 30px;
    }

    #dot-nav {
        right: 12px;
        gap: 14px;
    }

    .dot {
        width: 10px;
        height: 10px;
    }

    .dot-label {
        display: none;
    }

    .monolith-title {
        text-shadow: 3px 3px 0 var(--obsidian);
    }

    .quote-container {
        padding: 40px 20px;
    }

    .floating-artifact {
        display: none;
    }

    .brutalist-card {
        padding: 20px 16px;
    }
}

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

    .slab {
        width: calc(100% - 16px);
        box-shadow: 5px 5px 0 var(--obsidian);
    }

    .brutalist-card {
        box-shadow: 5px 5px 0 var(--obsidian);
    }

    .brutalist-card:hover {
        transform: translate(3px, 3px);
        box-shadow: 2px 2px 0 var(--obsidian);
    }
}
