/* 
 * CHRONO.CSS – Silex Chrono-Matrix Geological Textures 
 * Vertical timeline styling for the archaeological-geological axis.
 */

.chrono-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    background: #f9f4e8; /* Old parchment/map background */
    box-shadow: inset 0 0 100px rgba(0,0,0,0.05);
}

.chrono-header {
    text-align: center;
    margin-bottom: 50px;
    border-bottom: 2px double var(--ink-red);
    padding-bottom: 20px;
}

.chrono-header h1 {
    font-family: 'Special Elite', monospace;
    font-size: 2.5rem;
    color: var(--ink-red);
    margin-bottom: 10px;
}

.matrix-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--line-color);
}

/* Base layer styling with SVG Noise Overlay */
.geo-layer {
    position: relative;
    padding: 80px 40px;
    border-bottom: 1px dashed rgba(0,0,0,0.2);
    transition: filter 0.3s ease;
    overflow: hidden;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    background-blend-mode: overlay;
}

.geo-layer:hover {
    filter: brightness(1.05);
}

.geo-layer::before {
    content: attr(data-age);
    position: absolute;
    right: 25px;
    top: 25px;
    font-family: 'Special Elite', monospace;
    font-size: 0.9rem;
    color: inherit;
    opacity: 0.6;
    letter-spacing: 1px;
}

/* --- Specific Layer Textures --- */

/* Quaternary: Sand, clay, loess */
.layer-quaternary {
    background-color: #d2b48c;
    background: linear-gradient(135deg, #d2b48c 0%, #c2a278 100%);
    border-left: 14px solid #8b4513; 
    color: #3e2723;
}

/* Cretaceous: White chalk, opoka */
.layer-cretaceous {
    background-color: #ffffff;
    background: linear-gradient(135deg, #ffffff 0%, #ececec 100%);
    border-left: 14px solid #234f8a;
    color: #263238;
}

/* Jurassic: Dark limestone, marly layers */
.layer-jurassic {
    background-color: #5d5343;
    background: linear-gradient(135deg, #8d7d65 0%, #4a4235 100%);
    border-left: 14px solid var(--ink-red);
    color: #f5f5f5;
}

/* Content Styling */
.layer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.layer-info {
    flex: 1;
}

.layer-info .label {
    display: inline-block;
    font-family: 'Special Elite', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    background: rgba(0,0,0,0.1);
    padding: 3px 8px;
    border-radius: 3px;
    margin-bottom: 10px;
}

.layer-jurassic .label {
    background: rgba(255,255,255,0.1);
}

.layer-info h2 {
    font-family: 'Special Elite', monospace;
    margin: 5px 0 15px 0;
    font-size: 2.2rem;
    border: none;
}

.layer-description {
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.layer-links {
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.silex-tag {
    display: block;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid currentColor;
    color: inherit;
    text-decoration: none;
    font-family: 'Special Elite', monospace;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: center;
}

.layer-jurassic .silex-tag {
    background: rgba(0, 0, 0, 0.2);
}

.silex-tag:hover {
    background: var(--ink-red);
    color: white !important;
    border-color: var(--ink-red);
    transform: translateX(-5px);
}

/* Tablet & Mobile Adjustments */
@media (max-width: 900px) {
    .layer-content {
        flex-direction: column;
    }
    .layer-links {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .silex-tag {
        flex: 1 1 200px;
    }
}

/* --- SILEX SYNC DASHBOARD --- */
.sync-dashboard {
    background: #fff;
    border: 2px solid var(--ink);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    box-shadow: 4px 4px 0 var(--line-color);
}

.sync-toggles {
    display: flex;
    gap: 10px;
}

.toggle-btn {
    padding: 10px 15px;
    border: 1px solid var(--line-color);
    background: #fdfdfd;
    font-family: 'Special Elite', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.2s;
    border-radius: 3px;
}

.toggle-btn:hover { background: #f0f0f0; }
.toggle-btn.active { color: white; border-color: transparent; }

.btn-bio.active { background: #34a853; }
.btn-tectonic.active { background: #fbbc05; color: #000; }
.btn-human.active { background: #ea4335; }

/* --- DYNAMIC TAGS --- */
.layer-tags {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 35px;
}

.sync-tag {
    display: none; /* Controlled by JS / Classes */
    padding: 5px 12px;
    border-radius: 20px;
    font-family: 'Special Elite', monospace;
    font-size: 0.75rem;
    animation: tagFade 0.4s ease;
}

@keyframes tagFade { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

.tag-bio { background: rgba(52, 168, 83, 0.1); border: 1px solid #34a853; color: #1e4620; }
.tag-tectonic { background: rgba(251, 188, 5, 0.1); border: 1px solid #fbbc05; color: #5f4b00; }
.tag-human { background: rgba(234, 67, 53, 0.1); border: 1px solid #ea4335; color: #7a150c; }

/* Chart Styling */
.pulse-chart-container {
    width: 320px;
    height: 120px;
}

@media (max-width: 900px) {
    .sync-dashboard { flex-direction: column; text-align: center; }
    .pulse-chart-container { width: 100%; height: 100px; }
}

@media (max-width: 600px) {
    .geo-layer {
        padding: 60px 20px;
    }
    .layer-info h2 {
        font-size: 1.6rem;
    }
    .geo-layer::before {
        font-size: 0.7rem;
    }
}
