/* ===========================================
   archetypic.dev — styles.css
   Anti-design meets zen-contemplative botanical
   =========================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #F5F0E8;
    color: #2D2A26;
    font-family: 'Nunito', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.85;
    letter-spacing: 0.015em;
    cursor: crosshair;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* --- Typography --- */
.section-heading {
    font-family: 'Varela Round', sans-serif;
    font-weight: 400;
    font-size: clamp(2.2rem, 5.5vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #7B6B8A;
    text-transform: none;
    margin-bottom: 3rem;
}

.heading--offset-left {
    margin-left: -2rem;
}

.site-title {
    font-family: 'Varela Round', sans-serif;
    font-weight: 400;
    font-size: clamp(3rem, 7vw, 5.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #7B6B8A;
    position: absolute;
    bottom: 20vh;
    left: 15vw;
}

.text-body {
    margin-bottom: 2.5rem;
}

.text-body--indented {
    margin-left: 4rem;
}

.text-body p {
    margin-bottom: 1.2rem;
}

.text-body em {
    font-style: italic;
    font-weight: 600;
    color: #B07A6A;
}

.text-body--aside {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.monospace-aside {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #7B6B8A;
    opacity: 0.6;
    display: block;
    line-height: 1.6;
}

.alt-caption {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.7rem;
    color: #2D2A26;
    opacity: 0.5;
    display: block;
    margin-top: 1.5rem;
    letter-spacing: 0.08em;
}

/* --- Layout: Content Column --- */
.content-zone {
    max-width: 640px;
    margin-left: 15%;
    margin-right: auto;
    padding: 4rem 2rem;
    position: relative;
    overflow: visible;
}

.content-zone--right {
    margin-left: auto;
    margin-right: 5vw;
    max-width: 400px;
    text-align: right;
}

.content-zone--dense {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* --- Breathing Rooms --- */
.breathing-room {
    min-height: 65vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.breathing-room--hero {
    min-height: 100vh;
    overflow: hidden;
}

.breathing-room--tall {
    min-height: 75vh;
}

.breathing-room--closing {
    min-height: 100vh;
    flex-direction: column;
    gap: 3rem;
}

/* --- Voids --- */
.void {
    width: 100%;
    position: relative;
}

.void--large {
    height: 400px;
}

.void--medium {
    height: 280px;
}

/* --- Navigation Glyph --- */
#nav-glyph {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 100;
    background: none;
    border: none;
    cursor: crosshair;
    padding: 0.5rem;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

#nav-glyph:hover {
    transform: translateY(-4px);
}

#nav-glyph svg {
    display: block;
    transition: stroke 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

#nav-glyph:hover svg {
    stroke: #8AAE8B;
}

/* --- Navigation Overlay --- */
#nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 90;
    background: #1C2118;
    background: rgba(28, 33, 24, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                visibility 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

#nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

#nav-overlay ul {
    list-style: none;
    text-align: center;
}

#nav-overlay li {
    line-height: 3rem;
}

.nav-link {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    color: #F5F0E8;
    transition: color 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.nav-link:hover {
    color: #8AAE8B;
}

/* --- Botanical Illustrations --- */
.botanical {
    pointer-events: none;
}

.botanical--hero {
    position: absolute;
    top: -5vh;
    right: -5vw;
    width: clamp(300px, 45vw, 500px);
    height: auto;
    z-index: 1;
}

.botanical--right-intrusion {
    position: absolute;
    right: -150px;
    top: 0;
    width: 200px;
    height: auto;
    z-index: 2;
    pointer-events: auto;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.botanical--right-intrusion:hover {
    transform: translateY(-4px);
}

.botanical--right-intrusion:hover path,
.botanical--right-intrusion:hover ellipse {
    stroke: #7B6B8A;
    transition: stroke 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.botanical--left-intrusion {
    position: absolute;
    left: -180px;
    top: 50px;
    width: 250px;
    height: auto;
    z-index: 2;
    pointer-events: auto;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.botanical--left-intrusion:hover {
    transform: translateY(-4px);
}

.botanical--left-intrusion:hover path {
    stroke: #7B6B8A;
    transition: stroke 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.botanical--overlay {
    position: absolute;
    top: -20px;
    left: 50px;
    width: 280px;
    height: auto;
    z-index: 2;
}

.botanical--drift {
    opacity: 0.7;
}

.seed-pod-1 {
    width: 60px;
    position: relative;
    left: -20vw;
}

.seed-pod-2 {
    width: 80px;
    position: relative;
    right: -25vw;
}

.seed-pod-3 {
    width: 50px;
    position: relative;
    left: -10vw;
}

.botanical--closing-pod {
    width: 60px;
    height: auto;
}

/* --- SVG Path Draw Animation --- */
.draw-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.draw-path.is-drawn {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 3s cubic-bezier(0.23, 1, 0.32, 1),
                stroke 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Hero wisteria draws on load */
#wisteria-hero .draw-path {
    animation: heroPathDraw 3s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: 0.3s;
}

@keyframes heroPathDraw {
    to {
        stroke-dashoffset: 0;
    }
}

/* Stagger child paths */
#wisteria-hero .draw-path:nth-child(2) { animation-delay: 0.6s; }
#wisteria-hero .draw-path:nth-child(3) { animation-delay: 0.9s; }
#wisteria-hero .draw-path:nth-child(4) { animation-delay: 1.2s; }
#wisteria-hero .draw-path:nth-child(5) { animation-delay: 1.5s; }
#wisteria-hero .draw-path:nth-child(6) { animation-delay: 1.7s; }
#wisteria-hero .draw-path:nth-child(7) { animation-delay: 1.9s; }
#wisteria-hero .draw-path:nth-child(8) { animation-delay: 2.1s; }
#wisteria-hero .draw-path:nth-child(9) { animation-delay: 2.3s; }
#wisteria-hero .draw-path:nth-child(10) { animation-delay: 2.5s; }
#wisteria-hero .draw-path:nth-child(11) { animation-delay: 2.7s; }
#wisteria-hero .draw-path:nth-child(12) { animation-delay: 2.9s; }
#wisteria-hero .draw-path:nth-child(13) { animation-delay: 3.1s; }

/* --- Mixed Media / Code Fragments --- */
.mixed-media {
    position: relative;
    margin-bottom: 3rem;
    min-height: 300px;
}

.code-fragment {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 400;
    font-size: 0.7rem;
    color: #7B6B8A;
    opacity: 0.4;
    transform: rotate(-2deg);
    z-index: -1;
    position: relative;
    line-height: 1.6;
    white-space: pre;
    padding: 1rem;
}

/* --- Section Marker (seed pod glyph) --- */
.section-marker {
    display: block;
    margin: 2rem 0;
}

/* --- Watermark Background Peony --- */
#watermark {
    position: fixed;
    bottom: -10vh;
    right: -15vw;
    width: 60vw;
    height: auto;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
}

#watermark svg {
    width: 100%;
    height: auto;
    stroke: #EDE8DF;
}

/* Ensure content sits above watermark */
section, .void {
    position: relative;
    z-index: 1;
}

/* --- Hover-Lift for Links --- */
a {
    color: #B07A6A;
    text-decoration: underline;
    text-decoration-color: #B07A6A;
    text-underline-offset: 3px;
    font-weight: 600;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
                color 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    display: inline-block;
}

a:hover {
    transform: translateY(-4px);
    color: #7B6B8A;
}

/* --- The Raw / Anti-Design Section --- */
.raw {
    font-family: serif;
    color: #000;
    background: #fff;
    padding: 1rem;
    border: 1px solid #000;
    line-height: 1.4;
    letter-spacing: normal;
    max-width: 640px;
    margin-left: 15%;
    margin-right: auto;
    cursor: default;
}

.raw h2 {
    font-family: serif;
    font-weight: bold;
    font-size: 1.5rem;
    color: #000;
    margin-bottom: 0.5rem;
    letter-spacing: normal;
    line-height: 1.4;
}

.raw p {
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.raw a {
    color: #0000FF;
    text-decoration: underline;
    font-weight: normal;
    display: inline;
    transition: none;
}

.raw a:hover {
    transform: none;
    color: #0000FF;
}

.raw ul {
    padding-left: 2rem;
    margin-bottom: 0.8rem;
}

.raw li {
    margin-bottom: 0.3rem;
    font-size: 1rem;
}

.raw b {
    font-weight: bold;
}

/* --- Closing Section --- */
.closing-text {
    font-family: 'Varela Round', sans-serif;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: #7B6B8A;
    text-align: center;
    letter-spacing: -0.02em;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .content-zone {
        max-width: 100%;
        margin-left: 0;
        padding: 3rem 1.5rem;
    }

    .content-zone--right {
        margin-left: auto;
        margin-right: 1.5rem;
        max-width: 85%;
    }

    .breathing-room {
        min-height: 35vh;
    }

    .breathing-room--hero {
        min-height: 100vh;
    }

    .breathing-room--tall {
        min-height: 40vh;
    }

    .breathing-room--closing {
        min-height: 80vh;
    }

    .void--large {
        height: 200px;
    }

    .void--medium {
        height: 150px;
    }

    .site-title {
        left: 1.5rem;
        bottom: 25vh;
    }

    .heading--offset-left {
        margin-left: -0.5rem;
    }

    .text-body--indented {
        margin-left: 1.5rem;
    }

    .botanical--hero {
        right: -15vw;
        width: clamp(200px, 60vw, 350px);
    }

    .botanical--right-intrusion {
        right: -80px;
        width: 140px;
    }

    .botanical--left-intrusion {
        left: -100px;
        width: 180px;
    }

    .botanical--overlay {
        left: 20px;
        width: 200px;
    }

    .seed-pod-1 {
        left: -10vw;
    }

    .seed-pod-2 {
        right: -15vw;
    }

    .seed-pod-3 {
        left: -5vw;
    }

    .raw {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }

    #watermark {
        width: 90vw;
        right: -25vw;
    }
}

/* --- Selection --- */
::selection {
    background: #7B6B8A;
    color: #F5F0E8;
}
