/* ============================================
   archetypic.dev - Archaeological Neomorphism
   ============================================ */

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

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    color: #3B2F1E;
    background: #E8D5B7;
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- Dot Grid Texture Overlay --- */
.page-surface {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(circle, #C4A882 1px, transparent 1px);
    background-size: 24px 24px;
    background-attachment: fixed;
}

.page-surface::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle, #C4A882 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.page-surface > * {
    position: relative;
    z-index: 1;
}

/* Override the page-surface background to be transparent since we use ::before */
.page-surface {
    background: transparent;
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: fixed;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 100;
}

.scroll-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #E8D5B7;
    box-shadow: 3px 3px 6px #C4A882, -3px -3px 6px #FFF5E6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-dot.active {
    background: #B85C38;
    box-shadow: 2px 2px 4px #C4A882, -2px -2px 4px #FFF5E6, inset 1px 1px 2px rgba(0,0,0,0.15);
}

/* --- Sections --- */
.section {
    scroll-snap-align: start;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 2rem;
}

/* --- Hero Zone --- */
.hero-zone {
    position: relative;
    padding: 6rem 2rem;
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: #3B2F1E;
    margin-bottom: 1.5rem;
    min-height: 1.2em;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(10px);
    text-shadow:
        2px 2px 4px #C4A882,
        -1px -1px 2px #FFF5E6;
}

.hero-title .char.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    color: #6B5D4F;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease 1.2s, transform 0.8s ease 1.2s;
    max-width: 600px;
    margin: 0 auto;
}

.hero-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Hero Spiral --- */
.hero-spiral {
    position: absolute;
    width: clamp(250px, 40vw, 500px);
    height: clamp(250px, 40vw, 500px);
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.15;
    z-index: 1;
}

.spiral-arc {
    position: absolute;
    border: 3px solid transparent;
    border-radius: 50%;
}

.spiral-arc-1 {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-top-color: #B85C38;
    border-right-color: #B85C38;
}

.spiral-arc-2 {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 15%;
    border-bottom-color: #9A6B50;
    border-right-color: #9A6B50;
}

.spiral-arc-3 {
    width: 60%;
    height: 60%;
    top: 22%;
    left: 22%;
    border-bottom-color: #7A8B6F;
    border-left-color: #7A8B6F;
}

.spiral-arc-4 {
    width: 44%;
    height: 44%;
    top: 32%;
    left: 32%;
    border-top-color: #7A8B6F;
    border-left-color: #7A8B6F;
}

.spiral-arc-5 {
    width: 30%;
    height: 30%;
    top: 38%;
    left: 38%;
    border-top-color: #B85C38;
    border-right-color: #B85C38;
}

.spiral-arc-6 {
    width: 18%;
    height: 18%;
    top: 43%;
    left: 43%;
    border-bottom-color: #B85C38;
    border-right-color: #B85C38;
}

/* --- Section Headers --- */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 1200px;
}

.section-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    color: #3B2F1E;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px #C4A882, -1px -1px 2px #FFF5E6;
}

.section-label {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: #6B5D4F;
    letter-spacing: 0.1em;
}

/* --- Section Dividers --- */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.divider-line {
    display: block;
    width: 80px;
    height: 1px;
    background: rgba(59, 47, 30, 0.1);
}

.divider-shape {
    display: block;
    box-shadow: 3px 3px 6px #C4A882, -3px -3px 6px #FFF5E6;
    background: #E8D5B7;
}

.divider-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.divider-triangle {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 16px solid #E8D5B7;
    background: none;
    box-shadow: none;
    filter: drop-shadow(2px 2px 3px #C4A882);
}

.divider-square {
    width: 14px;
    height: 14px;
    border-radius: 2px;
}

/* --- Card Grid --- */
.discovery-grid {
    padding: 6rem 2rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 1200px;
    width: 100%;
}

/* --- Neomorphic Cards --- */
.neo-card {
    background: #E8D5B7;
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.neo-card.extruded {
    box-shadow: 8px 8px 16px #C4A882, -8px -8px 16px #FFF5E6;
    transform: translateY(0);
}

.neo-card.extruded:hover {
    box-shadow: 12px 12px 24px #C4A882, -12px -12px 24px #FFF5E6;
    transform: translateY(-6px);
}

.neo-card.extruded:active {
    box-shadow: inset 6px 6px 12px #C4A882, inset -6px -6px 12px #FFF5E6;
    transform: translateY(0);
}

.neo-card.inset {
    box-shadow: inset 6px 6px 12px #C4A882, inset -6px -6px 12px #FFF5E6;
    transform: translateY(0);
}

.neo-card.inset:hover {
    box-shadow: 8px 8px 16px #C4A882, -8px -8px 16px #FFF5E6;
    transform: translateY(-6px);
}

.neo-card.inset:active {
    box-shadow: inset 8px 8px 16px #C4A882, inset -8px -8px 16px #FFF5E6;
    transform: translateY(0);
}

/* Card fade animation */
.card-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease,
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

.neo-card.extruded.card-fade.visible {
    transform: translateY(0);
}

.neo-card.extruded.card-fade.visible:hover {
    transform: translateY(-6px);
}

.card-title {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: #3B2F1E;
    margin: 1.5rem 0 0.75rem;
}

.card-text {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
    color: #6B5D4F;
    line-height: 1.7;
}

/* --- Archetype Shapes --- */
.archetype-shape {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    position: relative;
}

/* Circle shape */
.circle-shape {
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-ring {
    position: absolute;
    border-radius: 50%;
    background: #E8D5B7;
}

.circle-ring-outer {
    width: 90px;
    height: 90px;
    box-shadow: 4px 4px 8px #C4A882, -4px -4px 8px #FFF5E6;
}

.circle-ring-outer.sage-accent {
    box-shadow: 4px 4px 8px #C4A882, -4px -4px 8px #FFF5E6;
    border: 2px solid #7A8B6F;
}

.circle-ring-middle {
    width: 60px;
    height: 60px;
    box-shadow: inset 3px 3px 6px #C4A882, inset -3px -3px 6px #FFF5E6;
}

.circle-ring-inner {
    width: 30px;
    height: 30px;
    box-shadow: 3px 3px 6px #C4A882, -3px -3px 6px #FFF5E6;
    background: #7A8B6F;
    opacity: 0.6;
}

/* Triangle shape */
.triangle-shape {
    display: flex;
    align-items: center;
    justify-content: center;
}

.triangle-inner {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid #E8D5B7;
    filter: drop-shadow(4px 4px 6px #C4A882) drop-shadow(-4px -4px 6px #FFF5E6);
    position: absolute;
}

.triangle-inner.terracotta-accent {
    border-bottom-color: #B85C38;
    opacity: 0.7;
}

.triangle-nested {
    border-left-width: 22px;
    border-right-width: 22px;
    border-bottom-width: 38px;
    border-bottom-color: #E8D5B7;
    filter: drop-shadow(2px 2px 3px #C4A882);
    top: 25px;
}

/* Square shape */
.square-shape {
    display: flex;
    align-items: center;
    justify-content: center;
}

.square-inner {
    width: 70px;
    height: 70px;
    border-radius: 0.5rem;
    background: #E8D5B7;
    box-shadow: inset 4px 4px 8px #C4A882, inset -4px -4px 8px #FFF5E6;
    position: absolute;
}

.square-inner.umber-accent {
    background: #3B2F1E;
    opacity: 0.15;
    box-shadow: inset 4px 4px 8px rgba(0,0,0,0.3), inset -4px -4px 8px rgba(255,245,230,0.1);
}

.square-nested {
    width: 40px;
    height: 40px;
    box-shadow: 3px 3px 6px #C4A882, -3px -3px 6px #FFF5E6;
}

/* --- Narrative Valley --- */
.narrative-valley {
    padding: 8rem 2rem;
    min-height: 70vh;
    position: relative;
}

.narrative-shape {
    margin-bottom: 3rem;
}

.narrative-quote {
    max-width: 600px;
    text-align: center;
}

.narrative-quote p {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: #3B2F1E;
    line-height: 1.5;
}

/* Large Spiral in Narrative */
.large-spiral {
    width: 200px;
    height: 200px;
    position: relative;
    margin: 0 auto;
    opacity: 0.3;
}

/* Large Circle in Narrative */
.large-circle {
    width: 200px;
    height: 200px;
    position: relative;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.large-circle-ring {
    position: absolute;
    border-radius: 50%;
    background: #E8D5B7;
}

.large-circle-outer {
    width: 200px;
    height: 200px;
    box-shadow: 8px 8px 16px #C4A882, -8px -8px 16px #FFF5E6;
}

.large-circle-middle {
    width: 140px;
    height: 140px;
    box-shadow: inset 6px 6px 12px #C4A882, inset -6px -6px 12px #FFF5E6;
}

.large-circle-inner {
    width: 80px;
    height: 80px;
    box-shadow: 4px 4px 8px #C4A882, -4px -4px 8px #FFF5E6;
    background: #7A8B6F;
    opacity: 0.3;
}

/* --- Footer Basin --- */
.footer-basin {
    background: #2C1F13;
    min-height: 50vh;
    border-radius: 3rem 3rem 0 0;
    position: relative;
    overflow: hidden;
}

.footer-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-spiral {
    width: 120px;
    height: 120px;
    position: relative;
    opacity: 0.2;
}

.footer-spiral .spiral-arc {
    border-color: transparent;
}

.footer-spiral .spiral-arc-1 {
    border-top-color: #C4A882;
    border-right-color: #C4A882;
}

.footer-spiral .spiral-arc-2 {
    border-bottom-color: #C4A882;
    border-right-color: #C4A882;
}

.footer-spiral .spiral-arc-3 {
    border-bottom-color: #C4A882;
    border-left-color: #C4A882;
}

.footer-spiral .spiral-arc-4 {
    border-top-color: #C4A882;
    border-left-color: #C4A882;
}

.footer-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-domain {
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #E8D5B7;
}

.footer-tagline {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    color: #C4A882;
}

.footer-contact {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    font-size: 0.95rem;
    color: #6B5D4F;
    margin-top: 0.5rem;
}

/* --- Hairline Section Borders --- */
.discovery-grid + .narrative-valley,
.narrative-valley + .discovery-grid {
    border-top: 1px solid rgba(59, 47, 30, 0.1);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 500px;
    }

    .hero-spiral {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin: 2rem auto 0;
        width: 200px;
        height: 200px;
        opacity: 0.12;
    }

    .hero-zone {
        padding: 4rem 1.5rem;
    }

    .section {
        padding: 3rem 1.5rem;
    }

    .scroll-indicator {
        right: 0.75rem;
    }

    .scroll-dot {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.8rem);
    }

    .section-title {
        font-size: clamp(1.6rem, 6vw, 2.5rem);
    }

    .neo-card {
        padding: 2rem 1.5rem;
    }

    .divider-line {
        width: 50px;
    }
}

/* --- Background spiral watermark --- */
.page-surface::after {
    content: '';
    position: fixed;
    width: 80vw;
    height: 80vw;
    max-width: 800px;
    max-height: 800px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid #B85C38;
    border-radius: 50%;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

/* --- Keyframe Animations --- */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

@keyframes glow {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}
