/* === iisugi.com - Botanical Cedar Grove === */
/* Palette: #5B3A29 #3A4A3C #7A8B6F #F7F3EC #EDF5F0 #C4943A #B8A99A #2E3B30 #ffffff */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #F7F3EC;
    color: #2E3B30;
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.85;
    overflow-x: hidden;
}

/* === Navigation Cedar Icon === */
.nav-cedar {
    position: fixed;
    top: 24px;
    left: 24px;
    z-index: 100;
    opacity: 0.6;
    transition: opacity 0.4s ease-in-out;
    text-decoration: none;
}

.nav-cedar:hover {
    opacity: 1;
}

/* === Root Section (Hero) === */
.root-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-cedar {
    width: clamp(250px, 40vw, 400px);
    height: 80vh;
}

.cedar-path {
    stroke-dasharray: var(--path-length, 1000);
    stroke-dashoffset: var(--path-length, 1000);
    animation: drawPath 4s ease-in-out forwards;
}

.trunk-main { --path-length: 800; animation-delay: 0s; }
.trunk-detail { --path-length: 700; animation-delay: 0.3s; }
.bark-line { --path-length: 400; animation-delay: 0.8s; }
.canopy-line { --path-length: 500; animation-delay: 1.5s; }

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

.site-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Cormorant Infant', serif;
    font-weight: 300;
    font-size: clamp(48px, 8vw, 96px);
    letter-spacing: 0.6em;
    text-transform: lowercase;
    color: #5B6F5E;
    opacity: 0;
    animation: titleFade 1.5s ease-in-out 2.5s forwards;
    pointer-events: none;
}

@keyframes titleFade {
    to { opacity: 0.4; }
}

/* === Trunk Section (Narrative) === */
.trunk-section {
    max-width: 42ch;
    margin: 0 auto;
    padding: 15vh 24px;
}

.narrative-block {
    margin-bottom: 8vh;
    position: relative;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.narrative-block.revealed {
    opacity: 1;
    transform: translateY(0);
}

.narrative-text {
    color: #2E3B30;
    font-size: 1.06rem;
    line-height: 1.85;
    max-width: 42ch;
}

.marginal-illustration {
    position: absolute;
    left: -90px;
    top: var(--offset, 0px);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease-in-out 0.2s, transform 0.6s ease-in-out 0.2s;
}

.marginal-illustration.right {
    left: auto;
    right: -90px;
}

.revealed .marginal-illustration {
    opacity: 0.6;
    transform: translateY(0);
}

.caption {
    display: block;
    font-family: 'Caveat', cursive;
    font-size: 14px;
    color: #7A8B6F;
    margin-top: 4px;
}

/* === Cedar Divider === */
.cedar-divider {
    text-align: center;
    margin: 10vh 0;
    opacity: 0.5;
}

/* === Canopy Section (Portfolio Grid) === */
.canopy-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15vh 24px;
    position: relative;
}

.growth-rings-bg {
    position: absolute;
    right: -200px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.15;
    animation: ringsSpin 120s linear infinite;
    pointer-events: none;
}

@keyframes ringsSpin {
    from { transform: translateY(-50%) rotate(0deg); }
    to { transform: translateY(-50%) rotate(360deg); }
}

.section-heading {
    font-family: 'Crimson Pro', serif;
    font-weight: 400;
    font-size: clamp(28px, 4vw, 36px);
    color: #3A4A3C;
    letter-spacing: 0.08em;
    text-align: center;
    margin-bottom: 8vh;
    position: relative;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

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

.section-heading::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: #C4943A;
    margin: 12px auto 0;
}

.specimen-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr 0.8fr;
    gap: clamp(2rem, 4vw, 5rem);
    align-items: start;
}

.specimen-card {
    text-align: center;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.specimen-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.specimen-svg {
    display: block;
    margin: 0 auto 12px;
    transition: all 0.4s ease-in-out;
}

.specimen-card:hover .specimen-svg path,
.specimen-card:hover .specimen-svg circle,
.specimen-card:hover .specimen-svg line,
.specimen-card:hover .specimen-svg rect,
.specimen-card:hover .specimen-svg ellipse {
    stroke: #C4943A;
    transition: stroke 0.4s ease-in-out;
}

.specimen-label {
    font-family: 'Caveat', cursive;
    font-size: 15px;
    color: #7A8B6F;
    display: inline-block;
    transition: transform 0.4s ease-in-out;
}

.specimen-card:hover .specimen-label {
    transform: translateX(4px);
}

/* === Sky Section === */
.sky-section {
    min-height: 80vh;
    background: #EDF5F0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 15vh 24px;
    transition: background 0.6s ease-in-out;
}

.sky-text {
    font-family: 'Crimson Pro', serif;
    font-weight: 400;
    font-size: clamp(20px, 3vw, 28px);
    color: #3A4A3C;
    letter-spacing: 0.06em;
    text-align: center;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.sky-text.revealed {
    opacity: 1;
    transform: translateY(0);
}

.cedar-reflection {
    opacity: 0.15;
}

/* === Needle Scatter === */
.needle-scatter {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.needle-cluster {
    position: absolute;
    opacity: 0.06;
    transform: rotate(var(--rotation, 0deg));
}

/* === Responsive === */
@media (max-width: 768px) {
    .marginal-illustration {
        position: relative;
        left: 0;
        right: 0;
        margin-bottom: 16px;
    }

    .marginal-illustration.right {
        right: 0;
    }

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

    .growth-rings-bg {
        display: none;
    }

    .trunk-section {
        padding: 10vh 20px;
    }
}

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