/* ============================================
   BBATTL.com - Documentation as Craft
   Design System: Scandinavian Functionalism + Academic Publishing
   ============================================ */

/* --- Color Palette ---
   #C4623A - Terracotta Anchor
   #3A3631 - Nordic Slate
   #2B2520 - Deep Earth
   #F5EDE3 - Parchment
   #B89B7D - Worn Leather
   #8B6F4E - Umber
   #EDE4D8 - Warm Ivory
   #D4A46A - Amber Haze
   #7A6E63 - Stone
*/

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: #F5EDE3;
    color: #3A3631;
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Rokkitt', 'Rockwell', serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #2B2520;
}

strong {
    font-weight: 600;
}

a {
    color: #C4623A;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #8B6F4E;
}

/* ============================================
   OPENING VISTA
   ============================================ */
.opening-vista {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background-color: #2B2520;
}

.vista-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(43, 37, 32, 0.1) 0%,
        rgba(43, 37, 32, 0.4) 50%,
        rgba(43, 37, 32, 0.85) 100%
    );
    z-index: 2;
}

.vista-mountain {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    will-change: transform;
}

.vista-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    padding: 0 8vw 12vh;
}

.vista-headline {
    font-size: clamp(48px, 8vw, 96px);
    font-weight: 800;
    line-height: 1.05;
    color: #F5EDE3;
    text-align: left;
    max-width: 800px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeSlideUp 1.2s ease-out 0.3s forwards;
}

.vista-scroll-cue {
    display: block;
    margin-top: 40px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #B89B7D;
    opacity: 0;
    animation: fadeIn 1s ease-out 1.5s forwards;
}

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

@keyframes fadeIn {
    to {
        opacity: 0.7;
    }
}

/* ============================================
   CONTOUR DIVIDERS
   ============================================ */
.contour-divider {
    width: 100%;
    padding: 20px 0;
    background-color: #F5EDE3;
    overflow: hidden;
}

.contour-svg {
    width: 100%;
    height: 80px;
    display: block;
}

.contour-line {
    fill: none;
    stroke: #B89B7D;
    stroke-width: 1;
    opacity: 0.5;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    transition: stroke-dashoffset 2.5s ease-out;
}

.contour-line-2 {
    stroke: #D4A46A;
    opacity: 0.35;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
}

.contour-line-3 {
    stroke: #8B6F4E;
    opacity: 0.25;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
}

.contour-line-faint {
    stroke: #7A6E63;
    opacity: 0.15;
    stroke-dasharray: 2000;
    stroke-dashoffset: 0;
}

.contour-divider.animate .contour-line {
    stroke-dashoffset: 0;
}

/* ============================================
   THESIS BLOCK
   ============================================ */
.thesis-block {
    background-color: #F5EDE3;
    padding: 12vh 8vw;
    display: flex;
    justify-content: center;
}

.thesis-content {
    max-width: 640px;
    width: 100%;
}

.thesis-lead {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 400;
    line-height: 1.5;
    color: #2B2520;
    margin-bottom: 40px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.thesis-body {
    font-size: 20px;
    line-height: 1.75;
    color: #3A3631;
    margin-bottom: 28px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
}

.thesis-block.animate .thesis-lead,
.thesis-block.animate .thesis-body {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   DUOTONE BREAKS
   ============================================ */
.duotone-break {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
    background-color: #2B2520;
}

.break-mountain {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.break-caption {
    position: absolute;
    bottom: 32px;
    right: 8vw;
    z-index: 2;
}

.caption-text {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #B89B7D;
    opacity: 0.7;
}

/* ============================================
   CHAPTER BLOCKS
   ============================================ */
.chapter-block {
    background-color: #F5EDE3;
    padding: 10vh 8vw;
    display: flex;
    justify-content: center;
}

.chapter-block:nth-child(odd) {
    background-color: #EDE4D8;
}

.chapter-content {
    max-width: 700px;
    width: 100%;
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.chapter-block.animate .chapter-content {
    opacity: 1;
    transform: translateY(0);
}

.chapter-heading {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 48px;
    color: #2B2520;
}

.chapter-text {
    font-size: 20px;
    line-height: 1.75;
    color: #3A3631;
    margin-bottom: 24px;
}

/* --- Triangle List --- */
.triangle-list {
    list-style: none;
    padding: 0;
}

.triangle-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 32px;
    gap: 16px;
}

.triangle-marker {
    flex-shrink: 0;
    width: 0;
    height: 0;
    margin-top: 8px;
    border-left: 8px solid #C4623A;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.list-text {
    font-size: 18px;
    line-height: 1.7;
    color: #3A3631;
}

/* --- Methodology Steps --- */
.methodology-steps {
    margin-top: 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.method-step {
    padding: 32px;
    background-color: #F5EDE3;
    border-left: 3px solid #C4623A;
    transition: transform 0.3s ease;
}

.chapter-block:nth-child(odd) .method-step {
    background-color: #EDE4D8;
    border-left-color: #D4A46A;
}

.method-step:hover {
    transform: translateY(-4px);
}

.step-number {
    display: block;
    font-family: 'Rokkitt', serif;
    font-size: 48px;
    font-weight: 800;
    color: #D4A46A;
    line-height: 1;
    margin-bottom: 12px;
    opacity: 0.6;
}

.step-title {
    font-family: 'Rokkitt', serif;
    font-size: 24px;
    font-weight: 700;
    color: #2B2520;
    margin-bottom: 12px;
}

.step-desc {
    font-size: 16px;
    line-height: 1.65;
    color: #7A6E63;
}

/* ============================================
   ARCHIVE ENTRIES
   ============================================ */
.archive-entries {
    margin-top: 40px;
}

.archive-entry {
    padding: 32px 0;
    border-bottom: 1px solid #B89B7D;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.chapter-block.animate .archive-entry {
    opacity: 1;
    transform: translateY(0);
}

.chapter-block.animate .archive-entry:nth-child(1) { transition-delay: 0.1s; }
.chapter-block.animate .archive-entry:nth-child(2) { transition-delay: 0.25s; }
.chapter-block.animate .archive-entry:nth-child(3) { transition-delay: 0.4s; }
.chapter-block.animate .archive-entry:nth-child(4) { transition-delay: 0.55s; }

.entry-date {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #B89B7D;
    display: block;
    margin-bottom: 8px;
}

.entry-title {
    font-family: 'Rokkitt', serif;
    font-size: 28px;
    font-weight: 700;
    color: #2B2520;
    margin-bottom: 8px;
    line-height: 1.2;
}

.entry-excerpt {
    font-size: 17px;
    line-height: 1.65;
    color: #7A6E63;
}

/* ============================================
   CLOSING BLOCK
   ============================================ */
.closing-block {
    background-color: #2B2520;
    padding: 14vh 8vw;
    display: flex;
    justify-content: center;
}

.closing-content {
    max-width: 640px;
    width: 100%;
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 1s ease, transform 1s ease;
}

.closing-block.animate .closing-content {
    opacity: 1;
    transform: translateY(0);
}

.closing-heading {
    font-size: clamp(48px, 7vw, 80px);
    font-weight: 800;
    color: #D4A46A;
    margin-bottom: 40px;
    line-height: 1;
}

.closing-text {
    font-size: 20px;
    line-height: 1.75;
    color: #EDE4D8;
    margin-bottom: 24px;
}

.closing-contact {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #7A6E63;
}

.contact-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #B89B7D;
    margin-bottom: 12px;
}

.contact-link {
    font-family: 'Rokkitt', serif;
    font-size: 28px;
    font-weight: 700;
    color: #D4A46A;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    border-bottom: 2px solid transparent;
}

.contact-link:hover {
    color: #F5EDE3;
    border-bottom-color: #C4623A;
}

/* ============================================
   COLOPHON / FOOTER
   ============================================ */
.colophon {
    position: relative;
    background-color: #2B2520;
    padding: 40px 8vw;
    overflow: hidden;
}

.colophon-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.colophon-text {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #7A6E63;
}

.colophon-year {
    font-family: 'Rokkitt', serif;
    font-size: 14px;
    font-weight: 700;
    color: #7A6E63;
}

.colophon-contour {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    z-index: 1;
    opacity: 0.3;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .vista-content {
        padding: 0 6vw 8vh;
    }

    .thesis-block,
    .chapter-block,
    .closing-block {
        padding: 8vh 6vw;
    }

    .methodology-steps {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .method-step {
        padding: 24px;
    }

    .colophon-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .triangle-list li {
        gap: 12px;
    }

    .entry-title {
        font-size: 22px;
    }

    .contact-link {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .vista-headline {
        font-size: 36px;
    }

    .chapter-heading {
        font-size: 32px;
    }

    .closing-heading {
        font-size: 40px;
    }

    .thesis-lead {
        font-size: 22px;
    }

    .thesis-body,
    .chapter-text,
    .closing-text {
        font-size: 17px;
    }

    .list-text {
        font-size: 16px;
    }
}
