/* kkaji.com - Botanical Brutalism */
/* Palette:
   Weathered Plaster: #e8e3dc
   Shuttered Grey: #d4cfc8
   Formwork Charcoal: #2d2b28
   Deep Loam: #3a3632
   Vine Green: #4a6741
   Oxidized Iron: #8b5e3c
   Raw Concrete: #8b8680
   Pressed Leaf Gold: #a89460
   Foundation Slate: #1e1d1b
*/

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #e8e3dc;
    color: #3a3632;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    line-height: 1.72;
    overflow-x: hidden;
}

/* Floor Indicator */
.floor-indicator {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    font-family: 'Azeret Mono', monospace;
    font-size: clamp(0.7rem, 1.4vw, 0.85rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8b8680;
    z-index: 100;
    opacity: 0;
    transition: opacity 600ms ease-out;
}

.floor-indicator.visible {
    opacity: 1;
}

/* Entry Screen */
.entry-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #e8e3dc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 800ms ease-out;
}

.entry-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.entry-line {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 0;
    background-color: #8b8680;
    transition: height 1200ms cubic-bezier(0.25, 0.1, 0.25, 1.0);
}

.entry-line.drawing {
    height: 60vh;
}

.entry-line.fade {
    opacity: 0;
    transition: opacity 600ms ease-out;
}

.entry-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(2.6rem, 7vw, 5.8rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #2d2b28;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 700ms ease-out, transform 700ms ease-out;
    position: relative;
    z-index: 2;
}

.entry-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-leaf-entry {
    position: absolute;
    top: 50%;
    left: calc(50% + clamp(100px, 18vw, 260px));
    transform: translateY(-60%);
    z-index: 2;
}

.hero-leaf-entry .leaf-path {
    stroke-dasharray: var(--path-length);
    stroke-dashoffset: var(--path-length);
    transition: stroke-dashoffset 2400ms ease-in-out;
}

.hero-leaf-entry.draw-active .leaf-path {
    stroke-dashoffset: 0;
}

.entry-subtitle {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    color: #4a6741;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 500ms ease-out, transform 500ms ease-out;
    margin-top: 0.8rem;
    position: relative;
    z-index: 2;
}

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

/* Tower Shaft */
.tower-shaft {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    background-color: #d4cfc8;
    position: relative;
    overflow: visible;
    min-height: 100vh;
}

.formwork-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Concrete Fragments */
.concrete-fragment {
    position: absolute;
    background-color: #d4cfc8;
    border: 1px solid #8b8680;
    z-index: 1;
    pointer-events: none;
}

.fragment-1 {
    top: 8vh;
    right: -60px;
    width: 120px;
    height: 90px;
    clip-path: polygon(15% 0%, 100% 8%, 85% 100%, 5% 88%, 0% 35%);
    transform: rotate(5deg);
}

.fragment-2 {
    top: 50%;
    left: -80px;
    width: 140px;
    height: 100px;
    clip-path: polygon(10% 5%, 95% 0%, 100% 70%, 80% 100%, 0% 90%);
    transform: rotate(-3deg);
}

.fragment-3 {
    bottom: 15%;
    right: -50px;
    width: 110px;
    height: 80px;
    clip-path: polygon(0% 10%, 85% 0%, 100% 45%, 90% 100%, 8% 85%);
    transform: rotate(7deg);
}

/* Floor Sections */
.floor {
    position: relative;
    z-index: 2;
    min-height: 80vh;
    padding: clamp(4rem, 10vh, 8rem) 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Meta Labels */
.meta-label {
    font-family: 'Azeret Mono', monospace;
    font-size: clamp(0.7rem, 1.4vw, 0.85rem);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8b8680;
    display: block;
    margin-bottom: 1.5rem;
}

/* Section Headings */
.section-heading {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3.2vw, 2.4rem);
    letter-spacing: 0.06em;
    color: #2d2b28;
    margin-bottom: 2rem;
    text-align: left;
}

/* Body Text */
.body-text {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    line-height: 1.72;
    color: #3a3632;
    margin-bottom: 1.5rem;
    text-align: left;
}

.body-text:last-child {
    margin-bottom: 0;
}

/* Pull Quotes */
.pull-quote {
    position: relative;
    padding: 2rem 0 2rem 2.5rem;
    margin: 2.5rem 0;
    border-left: 2px solid #4a6741;
}

.pull-quote p {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    line-height: 1.5;
    color: #4a6741;
}

.quote-leaf {
    position: absolute;
    top: 1.5rem;
    left: -40px;
}

/* Floor Slab Dividers */
.floor-slab {
    height: 4px;
    background-color: #8b8680;
    width: 100%;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 0 rgba(0,0,0,0);
    transition: box-shadow 400ms ease-out;
}

.floor-slab.weighted {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* SVG Leaf Animations */
.leaf-svg .leaf-path {
    stroke-dasharray: var(--path-length);
    stroke-dashoffset: var(--path-length);
    transition: stroke-dashoffset 1800ms ease-in-out;
}

.leaf-svg.draw-active .leaf-path {
    stroke-dashoffset: 0;
}

/* Section Break Vine */
.vine-container {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
    position: relative;
    z-index: 2;
}

.section-vine .leaf-path {
    transition: stroke-dashoffset 1800ms ease-in-out;
}

/* Margin Fern */
.margin-fern-container {
    position: absolute;
    left: -80px;
    top: 55%;
    z-index: 3;
    pointer-events: none;
}

.margin-fern .leaf-path {
    transition: stroke-dashoffset 2000ms ease-in-out;
}

/* Quote Leaf */
.quote-leaf .leaf-path {
    transition: stroke-dashoffset 800ms ease-in-out;
}

/* Footer Root */
.footer-root-container {
    display: flex;
    justify-content: center;
    padding: 3rem 0 0;
    position: relative;
    z-index: 2;
}

.footer-root .leaf-path {
    transition: stroke-dashoffset 3000ms ease-in-out;
}

/* Links */
a {
    color: #3a3632;
    text-decoration: none;
    font-weight: 500;
    background-image: linear-gradient(#8b5e3c, #8b5e3c);
    background-size: 0% 1px;
    background-repeat: no-repeat;
    background-position: 0 100%;
    transition: color 200ms ease-out, background-size 300ms ease-out, font-weight 200ms ease-out;
}

a:hover {
    color: #8b5e3c;
    background-size: 100% 1px;
}

a:visited {
    color: #a89460;
}

/* Footer */
.site-footer {
    background-color: #1e1d1b;
    padding: clamp(3rem, 8vh, 6rem) clamp(1.5rem, 4vw, 3rem);
    text-align: center;
}

.footer-content {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.footer-domain {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #e8e3dc;
}

.footer-meaning {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: #8b8680;
}

/* Responsive */
@media (max-width: 800px) {
    .concrete-fragment {
        display: none;
    }

    .margin-fern-container {
        display: none;
    }

    .hero-leaf-entry {
        left: calc(50% + 80px);
    }

    .quote-leaf {
        left: -30px;
    }
}

@media (max-width: 480px) {
    .hero-leaf-entry {
        display: none;
    }

    .pull-quote {
        padding-left: 1.5rem;
    }

    .quote-leaf {
        display: none;
    }
}
