/* =============================================
   prototype.report — styles.css
   Inflated-3D Naturalism + Botanical Field Journal
   ============================================= */


:root {
    --bg-main: #f5f0e8;
    --bg-sidebar: #2c2418;
    --text-primary: #3b3024;
    --text-secondary: #8c7e6a;
    --accent-sage: #7a8c6e;
    --accent-moss-gold: #b5a24a;
    --parchment: #d4c9b0;
    --deep-fern: #4a5d3e;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #f5f0e8;
    color: #3b3024;
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Sidebar --- */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background-color: #2c2418;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 100;
    overflow: hidden;
}

#sidebar-logotype {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: rotate(-90deg) translateX(-50%);
    transform-origin: left center;
    white-space: nowrap;
}

.logotype-text {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.08em;
    color: #d4c9b0;
    text-transform: none;
}

#sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;
    margin-top: auto;
    margin-bottom: auto;
    padding-left: 40px;
}

.nav-item {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #d4c9b0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-item:hover {
    color: #b5a24a;
}

.nav-item::after {
    content: '';
    display: block;
    width: 0;
    height: 1px;
    background-color: #7a8c6e;
    transition: width 0.3s ease;
}

.nav-item:hover::after {
    width: 100%;
}

#sidebar-leaf {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 60px;
}

#leaf-svg {
    width: 40px;
    height: 60px;
    transition: transform 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

#mobile-toggle {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #d4c9b0;
    font-size: 1.5rem;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
}

/* --- Main Content --- */
#main-content {
    margin-left: 240px;
    flex: 1;
    min-height: 100vh;
}

/* --- Chapters --- */
.chapter {
    position: relative;
    padding: 0 calc((100% - 680px) / 2);
    overflow: visible;
}

.chapter-origins {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chapter-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
}

/* --- Typography --- */
h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #3b3024;
}

h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: #3b3024;
    margin-bottom: 1rem;
}

h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    font-size: 1.3rem;
    line-height: 1.3;
    color: #3b3024;
    margin-bottom: 0.75rem;
}

.metadata {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8c7e6a;
    margin-top: 1rem;
}

.chapter-intro {
    max-width: 62ch;
    color: #8c7e6a;
    margin-bottom: 60px;
    font-size: clamp(1rem, 1.8vw, 1.125rem);
    line-height: 1.72;
}

.chapter-process,
.chapter-archive {
    padding-top: 80px;
    padding-bottom: 80px;
    max-width: 680px;
    margin: 0 auto;
}

/* Book-style text indent for consecutive paragraphs */
.glass-card p + p {
    text-indent: 1.5em;
}

/* --- Fade-in Animation --- */
.fade-in {
    opacity: 0;
    animation: fadeIn 1.2s ease forwards;
}

.fade-in:nth-child(2) {
    animation-delay: 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Section Dividers --- */
.section-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 60px 0;
}

.divider-leaf {
    width: 16px;
    height: 24px;
}

/* --- Glassmorphic Cards --- */
.glass-card {
    background: rgba(163, 177, 138, 0.08);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border: 1px solid rgba(163, 177, 138, 0.15);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(44, 36, 24, 0.06);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

.card-stack {
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
}

.card-corner-ornament {
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    overflow: hidden;
    pointer-events: none;
}

.card-corner-ornament::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 1.5px solid rgba(122, 140, 110, 0.2);
    background: transparent;
}

.card-corner-ornament::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 12px;
    width: 24px;
    height: 36px;
    background: linear-gradient(135deg, transparent 40%, rgba(122, 140, 110, 0.12) 60%, transparent 80%);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-15deg);
}

.card-date {
    display: block;
    margin-top: 1.5rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8c7e6a;
}

.glass-card-wide {
    position: relative;
}

/* --- Archive List --- */
.archive-list {
    list-style: none;
    padding: 0;
}

.archive-entry {
    display: flex;
    align-items: baseline;
    gap: 2rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(163, 177, 138, 0.12);
}

.archive-entry:last-child {
    border-bottom: none;
}

.archive-date {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8c7e6a;
    flex-shrink: 0;
    min-width: 100px;
}

.archive-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    font-style: italic;
    font-size: 1.1rem;
    color: #3b3024;
}

/* --- Inflated 3D Forms --- */
.inflated-form {
    position: absolute;
    z-index: 1;
    pointer-events: none;
}

/* Inflated Sphere */
.inflated-sphere {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #d4c9b0 0%, #8c7e6a 50%, #3b3024 100%);
    box-shadow: inset -15px -15px 30px rgba(59, 48, 36, 0.3),
                0 12px 40px rgba(44, 36, 24, 0.15);
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    animation: floatSphere 30s ease-in-out infinite;
}

.inflated-sphere::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 22px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    filter: blur(4px);
}

/* Inflated Pill */
.inflated-pill {
    width: 180px;
    height: 80px;
    border-radius: 40px;
    background: radial-gradient(ellipse at 35% 35%, #d4c9b0 0%, #8c7e6a 55%, #3b3024 100%);
    box-shadow: inset -12px -12px 24px rgba(59, 48, 36, 0.25),
                0 10px 36px rgba(44, 36, 24, 0.12);
    position: relative;
    transform: rotate(15deg);
    animation: floatPill 30s ease-in-out infinite;
    left: -100px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.inflated-pill::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 30px;
    width: 28px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    filter: blur(4px);
}

/* Inflated Disc */
.inflated-disc {
    width: 100px;
    height: 30px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 40% 30%, #d4c9b0 0%, #8c7e6a 50%, #3b3024 100%);
    box-shadow: inset -8px -6px 16px rgba(59, 48, 36, 0.3),
                0 6px 24px rgba(44, 36, 24, 0.1);
    transform: perspective(400px) rotateX(60deg);
    position: relative;
    margin-top: 2rem;
    margin-left: auto;
    margin-right: auto;
    animation: floatDisc 30s ease-in-out infinite;
}

.inflated-disc::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 20px;
    width: 16px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    filter: blur(3px);
}

/* Float Animations - Ambient, slow orbits */
@keyframes floatSphere {
    0%, 100% { transform: translateY(-50%) translate(0, 0); }
    25% { transform: translateY(-50%) translate(8px, -6px); }
    50% { transform: translateY(-50%) translate(-4px, -8px); }
    75% { transform: translateY(-50%) translate(-8px, 4px); }
}

@keyframes floatPill {
    0%, 100% { transform: rotate(15deg) translate(0, 0); }
    25% { transform: rotate(15deg) translate(-6px, 8px); }
    50% { transform: rotate(15deg) translate(8px, 4px); }
    75% { transform: rotate(15deg) translate(4px, -8px); }
}

@keyframes floatDisc {
    0%, 100% { transform: perspective(400px) rotateX(60deg) translate(0, 0); }
    25% { transform: perspective(400px) rotateX(60deg) translate(6px, -4px); }
    50% { transform: perspective(400px) rotateX(60deg) translate(-6px, -6px); }
    75% { transform: perspective(400px) rotateX(60deg) translate(-4px, 6px); }
}

/* --- Footer --- */
.divider-leaf path {
    fill: #b5a24a;
}

#leaf-svg path:first-child {
    fill: #4a5d3e;
}

#site-footer {
    padding: 80px 0 40px;
    text-align: center;
}

.footer-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8c7e6a;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 48px;
        flex-direction: row;
        align-items: center;
        padding: 0 16px;
    }

    #sidebar-logotype {
        position: static;
        transform: none;
    }

    .logotype-text {
        font-size: 0.85rem;
    }

    #sidebar-nav {
        display: none;
        position: absolute;
        top: 48px;
        left: 0;
        width: 100%;
        background-color: #2c2418;
        flex-direction: column;
        align-items: center;
        gap: 24px;
        padding: 24px 0;
        margin: 0;
    }

    #sidebar-nav.open {
        display: flex;
    }

    #sidebar-leaf {
        position: fixed;
        bottom: 20px;
        right: 20px;
        left: auto;
        transform: none;
        z-index: 50;
    }

    #mobile-toggle {
        display: block;
    }

    #main-content {
        margin-left: 0;
        margin-top: 48px;
    }

    .chapter {
        padding: 0 24px;
    }

    .chapter-process,
    .chapter-archive {
        padding-left: 24px;
        padding-right: 24px;
        max-width: 100%;
    }

    .inflated-sphere {
        right: -40px;
        width: 80px;
        height: 80px;
    }

    .inflated-pill {
        left: -60px;
        width: 120px;
        height: 56px;
    }

    .archive-entry {
        flex-direction: column;
        gap: 0.25rem;
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .chapter-process,
    .chapter-archive {
        max-width: 600px;
        padding-left: 40px;
        padding-right: 40px;
    }

    .inflated-sphere {
        right: -40px;
    }
}
