/* simulai.org - Annotated Treatise */

:root {
    --warm-parchment: #F5EDE0;
    --aged-cream: #EDE0D0;
    --blush-coral: #E8A0A0;
    --mineral-lavender: #C4B8D4;
    --charcoal-soft: #3A3634;
    --sage-mist: #B8C4A8;
    --warm-taupe: #C4B4A0;
    --deep-umber: #2A2624;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--warm-parchment);
    color: var(--charcoal-soft);
    font-family: 'Source Serif 4', serif;
    font-weight: 400;
    overflow-x: hidden;
    box-shadow: inset 0 0 100px rgba(42, 38, 36, 0.08);
}

/* Paper texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: url(#paper-noise);
    opacity: 0.05;
    pointer-events: none;
    z-index: 9999;
}

/* Sections */
.section {
    position: relative;
}

/* Crystal growth animation */
.crystal-grow {
    animation: crystal-breathe 10s ease-in-out infinite alternate;
}

@keyframes crystal-breathe {
    from { transform: scale(0.95); }
    to { transform: scale(1.05); }
}

/* Hero */
.section-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 60px 5vw;
}

.crystal-corner {
    position: absolute;
    width: 100px;
    height: 100px;
    pointer-events: none;
    z-index: 1;
}

.crystal-bl { bottom: 5vh; left: 5vw; }
.crystal-tr { top: 5vh; right: 5vw; }

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-lockup {
    position: relative;
    display: inline-block;
}

.graffiti-flourish {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120px;
    z-index: 0;
    pointer-events: none;
}

#flourishPath {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
}

.hero-domain {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--deep-umber);
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-family: 'Source Serif 4', serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.15vw, 1.1rem);
    line-height: 1.8;
    color: var(--charcoal-soft);
    margin-top: 2rem;
}

/* Chapter */
.section-chapter {
    padding: 10vh 5vw;
    min-height: 120vh;
}

.chapter-grid {
    display: grid;
    grid-template-columns: 1fr 2px minmax(120px, 30%);
    max-width: 1000px;
    margin: 0 auto;
    gap: 0;
}

.section-headline {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--deep-umber);
    margin-bottom: 2rem;
}

.chapter-main p {
    font-size: clamp(0.95rem, 1.15vw, 1.1rem);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.chapter-main p:not(.body-first) {
    text-indent: 1.5em;
}

.chapter-separator {
    border-left: 1px dashed var(--warm-taupe);
    opacity: 0.4;
    margin: 0 1.5rem;
}

.chapter-annotations {
    position: relative;
    padding-left: 1rem;
}

.annotation {
    position: absolute;
    left: 1rem;
}

.annotation-text {
    font-family: 'Kalam', cursive;
    font-weight: 400;
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    color: var(--blush-coral);
    transform: rotate(-2deg);
    display: inline-block;
}

.drip {
    display: block;
    width: 4px;
    height: 30px;
    margin-top: 2px;
}

.margin-tag {
    position: absolute;
    bottom: 10vh;
    left: 2rem;
    width: 40px;
    height: 20px;
}

/* Diagram */
.section-diagram {
    padding: 8vh 5vw;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.diagram-parallax {
    width: 100%;
    max-width: 800px;
}

.diagram-svg {
    width: 100%;
}

.diagram-label-graffiti {
    font-family: 'Kalam', cursive;
    font-size: 16px;
    fill: var(--blush-coral);
}

/* Gallery */
.section-gallery {
    padding: 8vh 5vw;
}

.gallery-grid {
    display: flex;
    gap: 3vw;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
}

.gallery-card {
    flex: 1;
    max-width: 30vw;
    background: var(--warm-parchment);
    border: 1px solid var(--sage-mist);
    padding: 2.5rem 2rem;
    position: relative;
}

.card-crystal {
    width: 30px;
    height: 45px;
    margin-bottom: 1rem;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--deep-umber);
    margin-bottom: 0.8rem;
}

.card-body {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--charcoal-soft);
}

.card-tag {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 40px;
    height: 20px;
}

/* Colophon */
.section-colophon {
    background: var(--aged-cream);
    padding: 8vh 5vw;
    text-align: center;
    min-height: 30vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.colophon-rule {
    width: 200px;
    height: 1px;
    background: var(--warm-taupe);
    position: relative;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.colophon-crystal {
    position: absolute;
    width: 60px;
    height: 40px;
    top: -20px;
}

.colophon-content {
    margin-bottom: 2rem;
}

.colophon-domain {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--deep-umber);
    letter-spacing: 0.04em;
}

.colophon-meta {
    font-family: 'Source Serif 4', serif;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--charcoal-soft);
    margin-top: 0.5rem;
    opacity: 0.7;
}

.colophon-tag {
    position: absolute;
    bottom: 20px;
    right: 30px;
    width: 60px;
    height: 30px;
}
