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

/* === BASE === */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background: #0a1a10;
    color: #d4e0d8;
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    line-height: 1.72;
    letter-spacing: 0.005em;
    min-height: 100vh;
}

/* === MASTHEAD === */
.masthead {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a1a10;
    position: relative;
    transition: opacity 0.3s ease;
}

.masthead-inner {
    text-align: center;
}

.masthead-title {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(4rem, 12vw, 9rem);
    letter-spacing: 0.08em;
    line-height: 1.0;
    color: #d4e0d8;
    text-transform: uppercase;
}

.masthead-rule {
    width: 40vw;
    height: 1px;
    background: #2d6b45;
    margin: 2rem auto 0;
}

/* === PAGE GRID === */
.page-grid {
    max-width: 1440px;
    margin: 0 auto;
    padding: 24px;
}

.grid-row {
    display: flex;
    gap: 32px;
    margin-bottom: 32px;
}

/* === BLOCK BASE === */
.block {
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

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

.block-inner {
    padding: 48px;
    height: 100%;
    position: relative;
}

/* === SPAN SIZES === */
.span-3 { flex: 0 0 calc(25% - 24px); }
.span-4 { flex: 0 0 calc(33.333% - 21.333px); }
.span-5 { flex: 0 0 calc(41.666% - 18.667px); }
.span-7 { flex: 0 0 calc(58.333% - 13.333px); }
.span-8 { flex: 0 0 calc(66.666% - 10.667px); }
.span-12 { flex: 0 0 100%; }

/* === DOCUMENT BLOCKS === */
.document-block {
    background: #f4f0e8;
    border: 2px solid #1b3a2a;
    color: #1a2e22;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(200, 180, 140, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(200, 180, 140, 0.06) 0%, transparent 50%),
        linear-gradient(135deg, rgba(220, 200, 160, 0.05) 0%, transparent 40%, rgba(220, 200, 160, 0.04) 100%);
    filter: url(#paper-noise);
}

.block-header {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    letter-spacing: 0.06em;
    line-height: 1.15;
    text-transform: uppercase;
    color: #1a2e22;
}

.block-rule {
    width: 100%;
    height: 1px;
    background: #1b3a2a;
    margin: 16px 0 24px;
}

.block-body p {
    max-width: 64ch;
    margin-bottom: 1.2em;
}

.block-body p:last-child {
    margin-bottom: 0;
}

.block-meta {
    margin-top: 32px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #3a5c48;
    display: flex;
    gap: 24px;
}

/* === DATA BLOCKS === */
.data-block {
    background: #0e1f15;
    border: 2px solid #1b3a2a;
}

.data-block .block-inner {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0;
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(27, 58, 42, 0.4);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.data-row:last-child {
    border-bottom: none;
}

.data-label {
    color: #6b8f7a;
}

.data-value {
    color: #d4e0d8;
}

/* === REDACTION BLOCKS === */
.redaction-block {
    width: 100%;
    height: 80px;
    background: #0a1a10;
    border-top: 1px solid #1b3a2a;
    border-bottom: 1px solid #1b3a2a;
    display: flex;
    align-items: center;
    margin-bottom: 32px;
}

.redaction-inner {
    padding: 0 48px;
    font-family: 'Source Serif 4', serif;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
    color: #6b8f7a;
    white-space: nowrap;
    overflow: hidden;
}

.redaction-bar {
    display: inline-block;
    height: 1.1em;
    vertical-align: baseline;
    background: #000000;
    width: 0;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 4px;
}

.redaction-bar.revealed {
    /* width set by JS based on data-width */
}

.redaction-bar:nth-child(odd) {
    opacity: 0.85;
}

/* === ANNOTATION BLOCKS === */
.annotation-block {
    background: transparent;
    border-left: 2px solid #1b3a2a;
}

.annotation-block .block-inner {
    padding: 24px;
}

.annotation-icon {
    margin-bottom: 12px;
}

.annotation-text {
    font-family: 'Source Serif 4', serif;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #6b8f7a;
}

/* === STAMP === */
.stamp {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 80px;
    height: 80px;
    border: 2px solid #8b5e3c;
    box-shadow: inset 0 0 0 3px transparent, 0 0 0 0 transparent;
    outline: 2px solid #8b5e3c;
    outline-offset: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 7px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #8b5e3c;
    transform: rotate(12deg);
    opacity: 0.7;
    text-align: center;
    line-height: 1.3;
    padding: 8px;
}

/* === GRID LINES (registration marks) === */
.document-block::before,
.document-block::after {
    content: '';
    position: absolute;
    background: #1b3a2a;
    opacity: 0.3;
    pointer-events: none;
}

.document-block::before {
    top: 0;
    left: 48px;
    width: 1px;
    height: 100%;
}

.document-block::after {
    top: 48px;
    left: 0;
    width: 100%;
    height: 1px;
}

/* === RIPPLE === */
@keyframes ripple-expand {
    0% {
        width: 0;
        height: 0;
        opacity: 0.15;
    }
    100% {
        width: 600px;
        height: 600px;
        opacity: 0;
    }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: #2d6b45;
    pointer-events: none;
    transform: translate(-50%, -50%);
    animation: ripple-expand 600ms ease-out forwards;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .grid-row {
        flex-direction: column;
        gap: 24px;
    }

    .span-3, .span-4, .span-5, .span-7, .span-8, .span-12 {
        flex: 0 0 100%;
    }

    .block-inner {
        padding: 32px;
    }

    .document-block::before,
    .document-block::after {
        display: none;
    }

    .redaction-inner {
        padding: 0 24px;
    }

    .page-grid {
        padding: 16px;
    }

    .stamp {
        width: 64px;
        height: 64px;
        font-size: 6px;
        top: 16px;
        right: 16px;
    }
}
