/* martiallaw.wiki - Sci-Fi Pastoral Chrome Archive */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 6rem;
}

body {
    background-color: #1c1f26;
    background-image:
        linear-gradient(rgba(192, 200, 216, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(192, 200, 216, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    color: #c8ccd6;
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.72;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ===== Vignettes ===== */
.vignette-top,
.vignette-bottom {
    position: fixed;
    left: 0;
    right: 0;
    height: 200px;
    pointer-events: none;
    z-index: 50;
}

.vignette-top {
    top: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(28, 31, 38, 0.6) 0%, transparent 70%);
}

.vignette-bottom {
    bottom: 0;
    background: radial-gradient(ellipse at 50% 100%, rgba(28, 31, 38, 0.8) 0%, transparent 70%);
}

/* ===== Mobile Progress Bar ===== */
.mobile-progress {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background-color: #c0c0c8;
    z-index: 200;
    transition: width 0.1s linear;
}

/* ===== Compass Navigation ===== */
.compass {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 100;
    width: 48px;
    height: 48px;
    cursor: pointer;
    transition: width 0.3s ease, height 0.3s ease;
}

.compass.expanded {
    width: 240px;
    height: 240px;
}

.compass-ring {
    width: 48px;
    height: 48px;
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
}

.compass.expanded .compass-ring {
    width: 240px;
    height: 240px;
    opacity: 0.3;
}

.compass-ring:hover circle {
    stroke: #e0e4ec;
}

.compass-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 240px;
    height: 240px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.compass.expanded .compass-nav {
    opacity: 1;
    pointer-events: all;
}

.compass-nav a {
    position: absolute;
    color: #d8dce6;
    text-decoration: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    letter-spacing: 0.05em;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.compass-nav a:hover {
    color: #e0e4ec;
}

.compass-nav a[data-angle='0'] { top: 10px; left: 50%; transform: translateX(-50%); }
.compass-nav a[data-angle='60'] { top: 55px; right: 5px; }
.compass-nav a[data-angle='120'] { top: 130px; right: 5px; }
.compass-nav a[data-angle='180'] { bottom: 10px; left: 50%; transform: translateX(-50%); }
.compass-nav a[data-angle='240'] { top: 130px; left: 5px; }
.compass-nav a[data-angle='300'] { top: 55px; left: 5px; }

/* ===== Opening Viewport (The Threshold) ===== */
.threshold-viewport {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

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

.domain-title {
    font-family: 'Saira', sans-serif;
    font-weight: 300;
    font-size: clamp(48px, 10vw, 140px);
    letter-spacing: -0.04em;
    text-transform: uppercase;
    color: #d8dce6;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.subtitle {
    font-family: 'Source Serif 4', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: 20px;
    color: #e8e0d0;
    opacity: 0.8;
}

.chevron-container {
    position: absolute;
    bottom: 3rem;
}

.chevron {
    width: 16px;
    height: 8px;
    animation: pulse 2.4s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 0.8; transform: translateY(6px); }
}

/* ===== Threshold Strips ===== */
.threshold-strip {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.threshold-rule {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    border: none;
    border-top: 0.5px solid #9ca3b0;
    transform: translateY(-50%);
}

.threshold-icon {
    position: relative;
    z-index: 1;
    width: 48px;
    height: 48px;
    background-color: #1c1f26;
    padding: 4px;
}

.threshold-strip-final {
    height: 120px;
}

/* ===== Content Sections ===== */
.content-section {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
    padding-bottom: 2rem;
}

.section-header {
    font-family: 'Saira Condensed', 'Saira', sans-serif;
    font-weight: 500;
    font-size: clamp(28px, 4vw, 36px);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #e8e0d0;
    margin-bottom: 2rem;
}

.section-body p {
    margin-bottom: 1.5rem;
    color: #c8ccd6;
}

/* ===== Chrome Panels ===== */
.chrome-panel {
    margin: 2.5rem 2rem;
    border: 1px solid transparent;
    border-radius: 2px;
    background-color: #252830;
    box-shadow: 0 0 12px rgba(192, 200, 216, 0.15);
    overflow: hidden;
}

.chrome-panel.visible {
    animation: border-draw 0.6s ease forwards;
}

@keyframes border-draw {
    0% { border-color: transparent; clip-path: inset(0 100% 100% 0); }
    25% { clip-path: inset(0 0 100% 0); }
    50% { clip-path: inset(0 0 0 100%); }
    75% { clip-path: inset(0 0 0 0); }
    100% { border-color: #c0c0c8; clip-path: inset(0 0 0 0); }
}

.panel-header {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(192, 192, 200, 0.15);
}

.panel-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.15em;
    color: #9ca3b0;
    text-transform: uppercase;
}

.panel-content {
    padding: 1.25rem;
}

.definition-term {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 19px;
    font-weight: 400;
    color: #d8dce6;
    margin-bottom: 0.75rem;
}

.definition-body {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 16px;
    line-height: 1.65;
    color: #c8ccd6;
    margin-bottom: 0.75rem;
}

.meta-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #9ca3b0;
}

/* ===== Timeline ===== */
.timeline-entry {
    display: flex;
    gap: 1.25rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(192, 192, 200, 0.08);
    align-items: baseline;
}

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

.date-copper {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    font-weight: 400;
    color: #b87a5e;
    min-width: 4ch;
    flex-shrink: 0;
}

.timeline-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 15px;
    line-height: 1.6;
    color: #c8ccd6;
}

/* ===== Footer ===== */
.site-footer {
    max-width: 960px;
    margin: 0 auto;
    padding: 4rem clamp(1.5rem, 5vw, 4rem) 6rem;
    text-align: center;
}

.footer-text {
    font-family: 'Saira', sans-serif;
    font-weight: 300;
    font-size: 16px;
    letter-spacing: 0.02em;
    color: #9ca3b0;
    margin-bottom: 0.5rem;
}

.footer-meta {
    font-family: 'Source Serif 4', Georgia, serif;
    font-style: italic;
    font-size: 14px;
    color: #9ca3b0;
    opacity: 0.6;
}

/* ===== Atmospheric Green Veils ===== */
.content-section:last-of-type .section-body {
    position: relative;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .chrome-panel {
        margin-left: 0;
        margin-right: 0;
    }

    .compass {
        width: 36px;
        height: 36px;
    }

    .compass-ring {
        width: 36px;
        height: 36px;
    }

    .domain-title {
        font-size: clamp(36px, 8vw, 64px);
    }
}

@media (max-width: 480px) {
    .compass {
        display: none;
    }

    .mobile-progress {
        display: block;
    }

    .threshold-strip {
        height: 120px;
    }

    .domain-title {
        font-size: 36px;
    }

    .subtitle {
        font-size: 16px;
    }
}


/* ===== Atmospheric Green Veils ===== */
.threshold-strip::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(122, 158, 130, 0.03), transparent);
    pointer-events: none;
}

/* ===== Light Panel Text Variant ===== */
.chrome-panel .panel-content .light-text {
    color: #2a2d36;
}

/* ===== Lichen accent underlines ===== */
.section-header::after {
    content: '';
    display: block;
    width: 48px;
    height: 2px;
    background-color: #7a9e82;
    margin-top: 0.75rem;
    opacity: 0.6;
}
