/* masugomi.com - Hand-drawn tech-tutorial aesthetic */

:root {
    --slate: #6b7b8a;
    --warm-gray: #d9cfc0;
    --dark-brown: #2c2824;
    --terracotta: #c4956a;
    --red-ink: #c45c3e;
    --deep-brown: #a0673f;
    --marble: #f7f0e6;
    --parchment: #f5e6c8;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--marble);
    color: var(--dark-brown);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Full viewport intro */
#intro {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.marble-bg {
    position: absolute;
    inset: 0;
    background: var(--marble);
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(196, 149, 106, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(107, 123, 138, 0.05) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 80%, rgba(245, 230, 200, 0.3) 0%, transparent 60%);
}

/* Marble veining via pseudo-elements */
.marble-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(135deg, transparent 40%, rgba(196, 149, 106, 0.06) 41%, rgba(196, 149, 106, 0.06) 41.5%, transparent 42%),
        linear-gradient(120deg, transparent 55%, rgba(217, 207, 192, 0.1) 55.5%, rgba(217, 207, 192, 0.1) 56%, transparent 56.5%),
        linear-gradient(150deg, transparent 30%, rgba(160, 103, 63, 0.04) 30.5%, rgba(160, 103, 63, 0.04) 31%, transparent 31.5%);
}

.intro-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.title-fade {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    letter-spacing: 0.02em;
    color: var(--dark-brown);
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 1.2s ease forwards;
}

.subtitle-fade {
    font-family: 'Inconsolata', monospace;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    color: var(--slate);
    margin-top: 0.75rem;
    opacity: 0;
    animation: fadeInUp 1.2s ease 0.4s forwards;
}

.scroll-indicator {
    margin-top: 3rem;
    opacity: 0;
    animation: fadeInUp 1.2s ease 0.8s forwards;
}

.hand-drawn-arrow {
    animation: bobDown 2s ease-in-out infinite;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bobDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

/* Main content column */
#content-column {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
    padding: 4rem 2rem 6rem;
}

.notebook-spine {
    position: absolute;
    left: 48px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(196, 149, 106, 0.3);
}

/* Chapters */
.chapter {
    position: relative;
    margin-bottom: 5rem;
    padding-left: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.chapter.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-marker {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.marker-number {
    font-family: 'Inconsolata', monospace;
    font-size: 0.75rem;
    color: var(--terracotta);
    font-weight: 700;
}

.marker-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--terracotta), transparent);
    opacity: 0.4;
}

.chapter h2 {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 3vw, 2rem);
    letter-spacing: 0.02em;
    color: var(--dark-brown);
    margin-bottom: 1rem;
}

.body-text {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.75;
    color: var(--dark-brown);
    margin-bottom: 1.5rem;
}

.annotation {
    font-family: 'Inconsolata', monospace;
    background: rgba(245, 230, 200, 0.6);
    padding: 0.1em 0.3em;
    border-radius: 2px;
    color: var(--deep-brown);
}

/* Sketch containers */
.sketch-container {
    margin: 1.5rem 0;
    padding: 1rem;
    border: 1px dashed rgba(196, 149, 106, 0.4);
    border-radius: 4px;
    background: rgba(247, 240, 230, 0.5);
}

.inline-sketch {
    display: block;
    margin: 0 auto;
}

/* Code annotation block */
.code-annotation {
    position: relative;
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: rgba(44, 40, 36, 0.03);
    border-left: 3px solid var(--terracotta);
    border-radius: 0 4px 4px 0;
}

.code-annotation pre {
    font-family: 'Inconsolata', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    color: var(--dark-brown);
    overflow-x: auto;
}

.red-underline {
    position: absolute;
    bottom: 1.25rem;
    left: 1.25rem;
    right: 1.25rem;
    height: 2px;
    background: linear-gradient(to right, var(--red-ink), transparent);
    opacity: 0.5;
}

/* Notebook page */
.notebook-page {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--parchment);
    border-radius: 2px;
    box-shadow: 2px 3px 8px rgba(44, 40, 36, 0.06);
}

.notebook-line {
    font-family: 'Inconsolata', monospace;
    font-size: 0.85rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(196, 149, 106, 0.2);
    color: var(--dark-brown);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.notebook-line.revealed {
    opacity: 1;
    transform: translateX(0);
}

.notebook-line.correction {
    color: var(--red-ink);
    font-weight: 700;
}

/* CTA */
.cta-block {
    margin-top: 2rem;
    padding: 1.25rem 2rem;
    border: 1.5px solid var(--terracotta);
    border-radius: 4px;
    display: inline-block;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.cta-block:hover {
    background: rgba(196, 149, 106, 0.1);
    transform: translateX(4px);
}

.cta-text {
    font-family: 'Commissioner', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--deep-brown);
}

/* Footer */
#site-footer {
    border-top: 1px solid rgba(196, 149, 106, 0.3);
    padding: 2rem;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-family: 'Inconsolata', monospace;
    font-size: 0.8rem;
    color: var(--slate);
}

/* Responsive */
@media (max-width: 600px) {
    #content-column {
        padding: 3rem 1.25rem 4rem;
    }

    .notebook-spine {
        left: 20px;
    }

    .chapter {
        padding-left: 1rem;
    }
}
