/* ============================================================
   matsurika.bid — Botanical Terminal Field Report
   Y2K-Futurism × Ma-Negative-Space × Serif-Classic
   ============================================================ */

/* === CUSTOM PROPERTIES === */
:root {
    --bg-primary:    #0C0E0B;
    --bg-secondary:  #131510;
    --cyan:          #4ECDC4;
    --rust:          #E8955A;
    --green:         #7AB648;
    --text-primary:  #E8E6E0;
    --text-secondary:#6B7260;
    --scanline:      rgba(78, 205, 196, 0.03);

    --font-serif:    'Playfair Display', Georgia, serif;
    --font-body:     'Lora', Georgia, serif;
    --font-mono:     'Space Mono', 'Courier New', monospace;

    --gutter:        24px;
    --col:           calc((100% - 11 * var(--gutter)) / 12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
}

/* Scan-line overlay — barely visible, felt not seen */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background-image: repeating-linear-gradient(
        0deg,
        var(--scanline) 0px,
        var(--scanline) 1px,
        transparent 1px,
        transparent 4px
    );
    animation: scanline-drift 4s linear infinite;
}

@keyframes scanline-drift {
    0%   { background-position-y: 0px; }
    100% { background-position-y: 60px; }
}

/* === VERTICAL SECTION NAV LABEL === */
.section-nav-label {
    position: fixed;
    left: 24px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: center center;
    z-index: 100;
    pointer-events: none;
}

.section-nav-label span {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 0.4s ease;
}

/* === DOT NAVIGATION === */
.dot-nav {
    position: fixed;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100;
}

.dot-nav__item {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--text-secondary);
    border: none;
    cursor: pointer;
    padding: 0;
    opacity: 0.4;
    transition: transform 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 200ms ease,
                background-color 200ms ease;
}

.dot-nav__item.active {
    background-color: var(--green);
    opacity: 1;
    transform: scale(1.4);
}

.dot-nav__item:hover {
    transform: scale(1.06);
    opacity: 0.8;
    background-color: var(--cyan);
}

/* === SECTIONS === */
.section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.section__inner {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 80px 80px 80px;
    min-height: inherit;
}

/* === SECTION 1: IDENTIFICATION === */
.section--identification {
    min-height: 100vh;
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
}

.section--identification .section__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 40px 80px;
}

.site-title {
    position: absolute;
    top: 40px;
    left: 80px;
    font-family: var(--font-serif);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.12em;
    color: var(--text-primary);
    opacity: 0.7;
}

.timestamp-counter {
    position: absolute;
    top: 40px;
    right: 80px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--cyan);
    letter-spacing: 0.05em;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.timestamp-label {
    font-size: 9px;
    color: var(--text-secondary);
    letter-spacing: 0.15em;
}

#timestamp-value {
    font-size: 11px;
    color: var(--cyan);
}

/* Radial diagram — offset 8% right of true center */
.radial-diagram-wrapper {
    position: relative;
    left: 4%;
    opacity: 0.4;
    transition: opacity 0.6s ease;
}

.radial-diagram-wrapper:hover {
    opacity: 0.55;
}

.radial-diagram .growth-ring {
    transform-origin: 190px 190px;
    transition: transform 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.radial-diagram:hover .growth-ring {
    transform: scale(1.03);
}

/* Growth ring draw-in animation */
.growth-ring {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
}

.growth-ring.animated {
    animation: ring-draw 0.6s ease-out forwards;
}

@keyframes ring-draw {
    to {
        stroke-dashoffset: 0;
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-arrow {
    font-family: var(--font-mono);
    font-size: 16px;
    color: var(--cyan);
    display: block;
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(4px); }
}

/* === FIELD LAYOUT SYSTEM === */
.field-layout {
    display: grid;
    gap: var(--gutter);
    align-items: start;
    padding-top: 60px;
}

/* text-left: text cols 1-4, void 5-7, viz cols 8-12 */
.field-layout--text-left {
    grid-template-columns: repeat(4, 1fr) repeat(3, 1fr) repeat(5, 1fr);
    grid-template-areas: "text text text text void void void viz viz viz viz viz";
}

.field-layout--text-left .field-text {
    grid-area: text;
}

.field-layout--text-left .field-void {
    grid-area: void;
}

.field-layout--text-left .field-visualization {
    grid-area: viz;
}

/* viz-left: viz cols 1-6, void 7-8, text 9-12 */
.field-layout--viz-left {
    grid-template-columns: repeat(6, 1fr) repeat(2, 1fr) repeat(4, 1fr);
    grid-template-areas: "viz viz viz viz viz viz void void text text text text";
    align-items: center;
}

.field-layout--viz-left .field-visualization--bloom {
    grid-area: viz;
    display: flex;
    justify-content: center;
}

.field-layout--viz-left .field-void--bloom {
    grid-area: void;
    position: relative;
    align-self: stretch;
}

.field-layout--viz-left .field-text--right {
    grid-area: text;
}

/* === SECTION IDENTIFIERS === */
.section-id {
    position: absolute;
    z-index: 10;
}

.section-id--left {
    top: 32px;
    left: 80px;
}

.section-id--bottom-left {
    bottom: 40px;
    left: 80px;
}

.section-bracket {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
}

/* === SECTION 2: GROWTH DATA === */
.section--growth {
    min-height: 110vh;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
}

.body-text {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.body-text--data {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 32px;
}

.data-active {
    color: var(--cyan);
}

/* Blinking cursor */
.blink-cursor {
    display: inline-block;
    color: var(--cyan);
    animation: blink 1.1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Scatter plot */
.scatter-plot {
    display: block;
}

.scatter-plot circle {
    transition: transform 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
    transform-box: fill-box;
}

.scatter-plot circle:hover {
    transform: scale(1.1);
}

.scatter-plot text {
    font-family: var(--font-mono);
    font-size: 8px;
    fill: var(--text-secondary);
    pointer-events: none;
}

/* === SECTION 3: BLOOM CYCLE === */
.section--bloom {
    min-height: 120vh;
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
}

.bloom-chart {
    display: block;
    overflow: visible;
}

.rust-accent-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    background-color: var(--rust);
    opacity: 0.6;
}

.pull-quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 600;
    font-size: 22px;
    color: var(--text-primary);
    border: none;
    padding: 32px 0 0 0;
    line-height: 1.4;
}

/* === SECTION 4: FIELD VECTORS === */
.section--vectors {
    min-height: 100vh;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: flex-start;
}

.section--vectors .section__inner {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.coordinates-grid {
    position: absolute;
    top: 80px;
    left: 80px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px 20px;
}

.coord {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    cursor: default;
    transition: transform 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                color 200ms ease;
    display: block;
}

.coord:hover {
    transform: scale(1.1);
    color: var(--cyan);
}

.vector-diagram {
    display: block;
    opacity: 0;
    transition: opacity 0.8s ease;
    position: relative;
    right: 40px;
}

.vector-diagram.visible {
    opacity: 1;
}

/* === SECTION 5: DISTRIBUTION === */
.section--distribution {
    min-height: 110vh;
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    position: relative;
}

.section--distribution .section__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 110vh;
}

.distribution-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    pointer-events: none;
}

.distribution-text-overlay {
    position: relative;
    z-index: 10;
    background-color: rgba(19, 21, 16, 0.9);
    padding: 48px 56px;
    max-width: 600px;
    width: 100%;
}

/* === SECTION 6: CLOSE === */
.section--close {
    min-height: 80vh;
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
}

.section__inner--close {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    width: 100%;
}

.close-content {
    text-align: center;
}

.close-title {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 22px;
    font-weight: 400;
    color: var(--text-primary);
    line-height: 1.6;
    letter-spacing: 0.04em;
    margin-bottom: 32px;
}

.close-title em {
    font-style: italic;
    color: var(--text-secondary);
}

.close-rule {
    border: none;
    border-top: 1px solid var(--rust);
    width: 60px;
    margin: 0 auto 24px;
    opacity: 0.6;
}

.close-domain {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--cyan);
    letter-spacing: 0.2em;
}

/* === DATA FOOTER TICKER === */
.data-footer {
    width: 100%;
    height: 200px;
    background-color: var(--bg-secondary);
    border-top: 1px solid rgba(78, 205, 196, 0.12);
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.ticker-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 0 24px;
}

.ticker {
    display: inline-flex;
    white-space: nowrap;
    animation: ticker-scroll 40s linear infinite;
}

.ticker span {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--rust);
    letter-spacing: 0.06em;
    padding-right: 40px;
    opacity: 0.7;
}

@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* === SCAN LINE ARTIFACTS (in viz sections) === */
.scan-artifact {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--cyan);
    opacity: 0.06;
    pointer-events: none;
}

/* === UTILITY === */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* === SCROLL REVEAL STATES === */
.section {
    --reveal-offset: 40px;
}

.reveal-target {
    opacity: 0;
    transform: translateY(var(--reveal-offset));
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-target.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* === RESPONSIVE (basic) === */
@media (max-width: 900px) {
    .section-nav-label,
    .dot-nav {
        display: none;
    }

    .field-layout--text-left,
    .field-layout--viz-left {
        grid-template-columns: 1fr;
        grid-template-areas:
            "text"
            "viz";
    }

    .field-layout--text-left .field-void,
    .field-layout--viz-left .field-void--bloom {
        display: none;
    }

    .section__inner {
        padding: 60px 32px;
    }

    .site-title {
        left: 32px;
    }

    .timestamp-counter {
        right: 32px;
    }

    .coordinates-grid {
        left: 32px;
        grid-template-columns: 1fr 1fr;
    }

    .section-id--left {
        left: 32px;
    }

    .section-id--bottom-left {
        left: 32px;
    }

    .section--vectors .section__inner {
        justify-content: center;
    }
}
