/* ============================================
   simulai.tech - Cottagecore Digital Study
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Merriweather', serif;
    font-size: 1rem;
    line-height: 1.8;
    font-weight: 400;
    color: #5A4A38;
    background-color: #FAF5EB;
    overflow-x: hidden;
}

/* --- Journal Container --- */
.journal {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.ruled-frame {
    border-top: 1px solid #D8C898;
    border-bottom: 1px solid #D8C898;
    padding: 4rem 3rem;
    text-align: center;
    position: relative;
}

.ruled-frame::before,
.ruled-frame::after {
    content: '';
    position: absolute;
    left: 2rem;
    right: 2rem;
    height: 1px;
    background: #D8C898;
}

.ruled-frame::before { top: 8px; }
.ruled-frame::after { bottom: 8px; }

.hero-content {
    position: relative;
}

.dropcap {
    font-family: 'Caveat', cursive;
    font-size: 5rem;
    font-weight: 700;
    color: #C87850;
    line-height: 0.8;
    display: block;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-family: 'Caveat', cursive;
    font-size: clamp(4rem, 9vw, 7rem);
    font-weight: 700;
    color: #2A2018;
    line-height: 1;
}

.hero-tagline {
    font-family: 'Merriweather', serif;
    font-size: 1.05rem;
    color: #7A8A65;
    margin-top: 1rem;
    font-style: italic;
}

.hero-icons {
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: flex-end;
    margin-top: 2rem;
}

/* --- Isometric Blocks --- */
.iso-block {
    width: 50px;
    height: var(--block-height, 50px);
    background: var(--block-color, #C87850);
    position: relative;
    transform: rotateX(60deg) rotateZ(45deg);
}

.iso-block::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: var(--block-color);
    filter: brightness(1.2);
    transform: skewX(-45deg);
    transform-origin: bottom left;
}

.iso-block::after {
    content: '';
    position: absolute;
    top: -7px;
    right: -15px;
    width: 15px;
    height: calc(100% + 7px);
    background: var(--block-color);
    filter: brightness(0.8);
    transform: skewY(-45deg);
    transform-origin: top left;
}

.iso-small {
    width: 35px;
}

/* --- Asymmetric Layout --- */
.asymmetric-section {
    display: flex;
    gap: 3rem;
    padding: 6vh 0;
    align-items: flex-start;
}

.main-column {
    flex: 0 0 55%;
}

.annotation-column {
    flex: 0 0 30%;
    padding-top: 2rem;
}

.asymmetric-reverse {
    flex-direction: row-reverse;
}

/* --- Page-Fold Card --- */
.page-fold-card {
    background: #FAF5EB;
    padding: 2.5rem;
    position: relative;
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
    box-shadow: 0 2px 12px rgba(42, 32, 24, 0.08);
    border-bottom: 1px solid #D8C898;
}

.page-fold-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #D8C898 50%, transparent 50%);
}

/* --- Section Heading --- */
.section-heading {
    font-family: 'Caveat', cursive;
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    font-weight: 700;
    color: #2A2018;
    margin-bottom: 1rem;
    line-height: 1.1;
}

/* --- Body Text --- */
.body-text {
    font-family: 'Merriweather', serif;
    font-size: 1rem;
    line-height: 1.8;
    color: #5A4A38;
    margin-bottom: 1rem;
    border-bottom: none;
}

.ruled-line {
    border-bottom: 1px solid #C8B898;
}

/* --- Dropcap Inline --- */
.dropcap-inline {
    font-family: 'Caveat', cursive;
    font-size: 3.5rem;
    font-weight: 700;
    color: #C87850;
    float: left;
    line-height: 0.75;
    margin-right: 0.15em;
    margin-top: 0.1em;
}

/* --- Marginalia --- */
.marginalia {
    font-family: 'Merriweather', serif;
    font-size: 0.85rem;
    font-style: italic;
    color: #7A8A65;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid #D8C898;
}

/* --- Iso Diagram --- */
.iso-diagram {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

/* --- Progressive Disclosure --- */
.disclosure-section {
    margin-top: 1.5rem;
    border-bottom: 1px solid #D8C898;
}

.disclosure-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: 'Merriweather', serif;
    font-size: 1rem;
    color: #2A2018;
}

.disclosure-header:hover {
    color: #C87850;
}

/* --- Bookmark Ribbon --- */
.bookmark-ribbon {
    display: inline-block;
    width: 12px;
    height: 20px;
    background: #C87850;
    position: relative;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.bookmark-ribbon::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 6px solid #FAF5EB;
    border-right: 6px solid #FAF5EB;
    border-top: 5px solid #C87850;
}

.disclosure-section.expanded .bookmark-ribbon {
    transform: rotate(90deg);
}

.disclosure-title {
    font-family: 'Caveat', cursive;
    font-size: 1.4rem;
    font-weight: 700;
}

.disclosure-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.disclosure-section.expanded .disclosure-content {
    max-height: 300px;
}

/* --- Closing Section --- */
.closing-section {
    padding: 8vh 0;
    text-align: center;
}

.closing-card {
    display: inline-block;
    padding: 3rem 4rem;
    position: relative;
    clip-path: polygon(20px 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, calc(100% - 20px) 100%, 0 100%, 0 20px);
    background: #FAF5EB;
    box-shadow: 0 2px 12px rgba(42, 32, 24, 0.08);
    border: 1px solid #D8C898;
}

.iso-scatter {
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.closing-title {
    font-family: 'Caveat', cursive;
    font-size: 2rem;
    font-weight: 700;
    color: #2A2018;
}

.closing-text {
    font-family: 'Merriweather', serif;
    font-size: 0.95rem;
    color: #7A8A65;
    font-style: italic;
    margin-top: 0.5rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .asymmetric-section {
        flex-direction: column;
    }

    .asymmetric-reverse {
        flex-direction: column;
    }

    .main-column,
    .annotation-column {
        flex: 1;
    }

    .page-fold-card {
        padding: 1.5rem;
    }

    .journal {
        padding: 0 1rem;
    }

    .ruled-frame {
        padding: 3rem 1.5rem;
    }
}
