/* ============================================================
   sbom.study // sunset-warm sci-fi terminal
   ------------------------------------------------------------
   Palette:
     #1A1008 terminal-dark   (bg)
     #E8A040 amber-primary   (accent / headings / counters)
     #E86040 coral-alert     (warnings)
     #A06030 burnt-sienna    (borders / frames)
     #F0E0C8 warm-parchment  (text)
     #8B7B65 dust-gray       (meta)
     #6BA84A leaf-green      (motifs)
     #A8D040 sap-flow        (nutrient dots)
   ============================================================ */

* {
    box-sizing: border-box;
}

html {
    background: #1A1008;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    color: #F0E0C8;
    font-family: 'Nunito Sans', sans-serif;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.75;
    background: #1A1008;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* Scan-line overlay spanning the entire page */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent 0 2px,
        rgba(26, 16, 8, 0.15) 2px 3px
    );
    pointer-events: none;
    z-index: 1000;
}

/* Soft amber vignette glow */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(232, 160, 64, 0.06), transparent 50%),
        radial-gradient(ellipse at 80% 90%, rgba(232, 96, 64, 0.05), transparent 55%);
    pointer-events: none;
    z-index: 0;
}

h1, h2, h3 {
    font-family: 'Orbitron', sans-serif;
    color: #E8A040;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
}

h1 {
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
}

h2 {
    font-weight: 500;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
}

h3 {
    font-weight: 500;
    font-size: 1.05rem;
}

p {
    margin: 0 0 1rem 0;
}

p:last-child {
    margin-bottom: 0;
}

em {
    color: #E8A040;
    font-style: normal;
    font-weight: 600;
}

/* ============================================================
   BOOT SCREEN
   ============================================================ */

#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

#boot-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.boot-content {
    width: min(520px, 90vw);
    text-align: center;
    color: #E8A040;
    font-family: 'Share Tech Mono', monospace;
}

.boot-domain {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    color: #E8A040;
    margin-bottom: 2rem;
    min-height: 3rem;
    text-shadow: 0 0 20px rgba(232, 160, 64, 0.5);
}

.boot-domain::after {
    content: '_';
    animation: blink 0.7s step-end infinite;
}

.boot-domain.done::after {
    content: '';
}

@keyframes blink {
    50% { opacity: 0; }
}

.boot-progress-wrap {
    margin-bottom: 2rem;
}

.boot-progress-label {
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #8B7B65;
    margin-bottom: 0.5rem;
    text-align: left;
}

.boot-progress-track {
    width: 100%;
    height: 8px;
    background: #1A1008;
    border: 1px solid #A06030;
    position: relative;
    overflow: hidden;
}

.boot-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #E8A040, #E86040);
    box-shadow: 0 0 12px rgba(232, 160, 64, 0.6);
}

.boot-progress-percent {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #E8A040;
    text-align: right;
    letter-spacing: 0.1em;
}

.boot-log {
    text-align: left;
    font-size: 0.75rem;
    color: #8B7B65;
    line-height: 1.6;
}

.boot-log-line {
    opacity: 0;
    transform: translateX(-8px);
}

.boot-log-line.visible {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ============================================================
   SITE MAIN
   ============================================================ */

.site-main {
    position: relative;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.7s ease;
}

.site-main.revealed {
    opacity: 1;
}

/* ============================================================
   TERMINAL HEADER
   ============================================================ */

.terminal-header {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: rgba(26, 16, 8, 0.9);
    border-bottom: 1px solid #A06030;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: #8B7B65;
    letter-spacing: 0.1em;
}

.term-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.15rem;
}

.term-dot-red { background: #E86040; box-shadow: 0 0 6px #E86040; }
.term-dot-amber { background: #E8A040; box-shadow: 0 0 6px #E8A040; }
.term-dot-green { background: #6BA84A; box-shadow: 0 0 6px #6BA84A; }

.term-title {
    margin-left: 0.75rem;
    color: #E8A040;
    text-transform: uppercase;
}

.term-clock {
    margin-left: auto;
    color: #E8A040;
}

.hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
}

.hero-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, rgba(232, 160, 64, 0.08), transparent 60%);
    pointer-events: none;
}

.hero-tag {
    font-family: 'Share Tech Mono', monospace;
    color: #E8A040;
    font-size: 0.85rem;
    letter-spacing: 0.3em;
    margin-bottom: 1.5rem;
    padding: 0.4rem 1rem;
    border: 1px solid #A06030;
    background: rgba(26, 16, 8, 0.6);
}

.hero-tag::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #6BA84A;
    border-radius: 50%;
    margin-right: 0.6rem;
    box-shadow: 0 0 8px #6BA84A;
    animation: pulse 1.6s ease-in-out infinite;
    vertical-align: middle;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.hero-title {
    text-transform: lowercase;
    letter-spacing: 0.08em;
    text-shadow:
        0 0 30px rgba(232, 160, 64, 0.4),
        0 0 60px rgba(232, 96, 64, 0.2);
    margin: 0;
}

.hero-dot {
    color: #E86040;
    font-family: 'Share Tech Mono', monospace;
    animation: blink 1.2s step-end infinite;
}

.hero-sub {
    font-family: 'Nunito Sans', sans-serif;
    color: #F0E0C8;
    max-width: 560px;
    margin: 1.25rem auto 2rem;
    font-size: 1.1rem;
}

.hero-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: #8B7B65;
    letter-spacing: 0.15em;
}

.hero-meta-item {
    color: #8B7B65;
}

.hero-meta-sep {
    color: #A06030;
}

.leaf-divider {
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    opacity: 0.7;
}

.leaf-divider svg {
    width: 100%;
    height: 100%;
}

/* ============================================================
   SECTION HEADING
   ============================================================ */

.section-heading {
    padding: 3rem 2rem 1.5rem;
    border-bottom: 1px solid rgba(160, 96, 48, 0.3);
    margin-bottom: 2rem;
}

.section-index {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    color: #8B7B65;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    margin-bottom: 0.4rem;
}

.section-heading h2 {
    margin-bottom: 0.4rem;
}

.section-meta {
    font-family: 'Share Tech Mono', monospace;
    color: #A06030;
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* ============================================================
   MODULE GRID
   ============================================================ */

.module-grid-section {
    width: 100vw;
    padding-bottom: 4rem;
    position: relative;
}

.module-grid-section::before {
    content: '';
    position: absolute;
    top: 6rem;
    right: 4%;
    width: 320px;
    height: 320px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><path d='M100 10 C60 40 30 80 30 120 C30 160 60 190 100 190 C140 190 170 160 170 120 C170 80 140 40 100 10 Z' fill='none' stroke='%236BA84A' stroke-width='1'/><line x1='100' y1='10' x2='100' y2='190' stroke='%236BA84A' stroke-width='1'/></svg>");
    background-repeat: no-repeat;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

.module-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.module {
    background: rgba(26, 16, 8, 0.8);
    border: 1px solid #A06030;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.module.in-view {
    opacity: 1;
    transform: translateY(0);
}

.module:hover {
    border-color: #E8A040;
    box-shadow: 0 0 0 1px rgba(232, 160, 64, 0.3), 0 8px 30px rgba(0, 0, 0, 0.4);
}

.module::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><path d='M100 10 C60 40 30 80 30 120 C30 160 60 190 100 190 C140 190 170 160 170 120 C170 80 140 40 100 10 Z' fill='none' stroke='%236BA84A' stroke-width='1'/><line x1='100' y1='10' x2='100' y2='190' stroke='%236BA84A' stroke-width='1'/></svg>");
    background-repeat: no-repeat;
    background-position: bottom right;
    background-size: 180px;
    opacity: 0.03;
    pointer-events: none;
}

.module-span {
    grid-column: 1 / -1;
}

.module-top-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(160, 96, 48, 0.3);
    background: rgba(26, 16, 8, 0.5);
    position: relative;
    z-index: 1;
}

.module-number {
    font-family: 'Share Tech Mono', monospace;
    color: #8B7B65;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.module-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    transform: scale(1);
    transition: transform 0.4s ease;
}

.module.in-view .module-icon {
    animation: icon-bounce 0.6s ease both;
}

@keyframes icon-bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.module-title {
    font-family: 'Orbitron', sans-serif;
    color: #E8A040;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex: 1;
}

.module-status {
    font-family: 'Share Tech Mono', monospace;
    color: #6BA84A;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    padding: 0.15rem 0.5rem;
    border: 1px solid #6BA84A;
    border-radius: 2px;
    background: rgba(107, 168, 74, 0.08);
}

.module-status-alert {
    color: #E86040;
    border-color: #E86040;
    background: rgba(232, 96, 64, 0.08);
    animation: alert-flash 2s ease-in-out infinite;
}

@keyframes alert-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.module-body {
    padding: 1.25rem 1.25rem 1rem;
    flex: 1;
    position: relative;
    z-index: 1;
}

.module-list {
    padding: 0;
    margin: 0.75rem 0 0;
    list-style: none;
}

.module-list li {
    position: relative;
    padding-left: 1.2rem;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    color: #F0E0C8;
}

.module-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: #E8A040;
    font-family: 'Share Tech Mono', monospace;
    font-weight: 700;
}

.module-bottom-bar {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(160, 96, 48, 0.3);
    background: rgba(26, 16, 8, 0.6);
    position: relative;
    z-index: 1;
}

.module-bottom-bar-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.counter-display {
    background: #1A1008;
    border: 1px solid #A06030;
    padding: 1rem 1.5rem;
    transition: border-color 0.8s ease, box-shadow 0.8s ease;
}

.counter-display.loaded {
    border-color: #E8A040;
    box-shadow: 0 0 14px rgba(232, 160, 64, 0.25), inset 0 0 12px rgba(232, 160, 64, 0.08);
}

.counter-number {
    font-family: 'Share Tech Mono', monospace;
    color: #E8A040;
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.counter-label {
    color: #8B7B65;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Supply chain callouts inside span module */
.supply-callouts {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.supply-callout {
    border: 1px solid rgba(160, 96, 48, 0.5);
    padding: 0.75rem;
    background: rgba(26, 16, 8, 0.5);
    font-family: 'Share Tech Mono', monospace;
}

.supply-callout-key {
    color: #E8A040;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    margin-bottom: 0.3rem;
}

.supply-callout-val {
    color: #F0E0C8;
    font-size: 0.8rem;
}

/* ============================================================
   ECOSYSTEM SECTION
   ============================================================ */

.ecosystem-section {
    width: 100vw;
    padding-bottom: 5rem;
    background: linear-gradient(180deg, transparent, rgba(107, 168, 74, 0.03), transparent);
}

.ecosystem-frame {
    margin: 0 2rem;
    border: 1px solid #A06030;
    background: rgba(26, 16, 8, 0.85);
    padding: 1.5rem 1rem 2rem;
    position: relative;
}

.ecosystem-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: #8B7B65;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-swatch {
    display: inline-block;
    width: 18px;
    height: 4px;
}

.legend-swatch-midrib { background: #6BA84A; height: 4px; }
.legend-swatch-secondary { background: #6BA84A; height: 2px; }
.legend-swatch-tertiary { background: #6BA84A; height: 1px; opacity: 0.7; }
.legend-swatch-nutrient {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #A8D040;
    box-shadow: 0 0 6px #A8D040;
}

.ecosystem-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Nutrient dots animated along paths via offset-path */
.nutrient {
    filter: drop-shadow(0 0 4px #A8D040);
}

.nutrient-midrib {
    offset-path: path('M 140 260 L 1060 260');
    offset-distance: 0%;
    animation: flow 6s linear infinite;
}

.nutrient-midrib.delay-a { animation-delay: 2s; }
.nutrient-midrib.delay-b { animation-delay: 4s; }

.nutrient-sec1 {
    offset-path: path('M 280 260 L 360 150');
    animation: flow 4s linear infinite;
    animation-delay: 0.5s;
}
.nutrient-sec2 {
    offset-path: path('M 440 260 L 520 130');
    animation: flow 4.5s linear infinite;
    animation-delay: 1s;
}
.nutrient-sec3 {
    offset-path: path('M 600 260 L 680 120');
    animation: flow 5s linear infinite;
    animation-delay: 1.5s;
}
.nutrient-sec4 {
    offset-path: path('M 760 260 L 840 140');
    animation: flow 4.5s linear infinite;
    animation-delay: 2s;
}
.nutrient-sec5 {
    offset-path: path('M 920 260 L 980 160');
    animation: flow 4s linear infinite;
    animation-delay: 2.5s;
}
.nutrient-sec6 {
    offset-path: path('M 280 260 L 360 370');
    animation: flow 4.3s linear infinite;
    animation-delay: 0.8s;
}
.nutrient-sec7 {
    offset-path: path('M 440 260 L 520 390');
    animation: flow 4.8s linear infinite;
    animation-delay: 1.3s;
}
.nutrient-sec8 {
    offset-path: path('M 600 260 L 680 400');
    animation: flow 5.2s linear infinite;
    animation-delay: 1.8s;
}
.nutrient-sec9 {
    offset-path: path('M 760 260 L 840 380');
    animation: flow 4.6s linear infinite;
    animation-delay: 2.3s;
}
.nutrient-sec10 {
    offset-path: path('M 920 260 L 980 360');
    animation: flow 4.1s linear infinite;
    animation-delay: 2.8s;
}

@keyframes flow {
    0% { offset-distance: 0%; opacity: 0; }
    8% { opacity: 1; }
    92% { opacity: 1; }
    100% { offset-distance: 100%; opacity: 0; }
}

.ecosystem-caption {
    max-width: 720px;
    margin: 1.5rem auto 0;
    padding: 0 1rem;
    text-align: center;
    color: #8B7B65;
    font-size: 0.95rem;
    font-style: italic;
}

/* ============================================================
   SUMMARY
   ============================================================ */

.summary-section {
    width: 100vw;
    padding-bottom: 5rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 0 2rem;
}

.summary-card {
    background: rgba(26, 16, 8, 0.8);
    border: 1px solid #A06030;
    padding: 1.5rem 1.25rem;
    border-radius: 4px;
    position: relative;
    transition: border-color 0.4s ease, transform 0.4s ease;
    opacity: 0;
    transform: translateY(20px);
}

.summary-card.in-view {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.4s ease;
}

.summary-card:hover {
    border-color: #6BA84A;
    transform: translateY(-3px);
}

.summary-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 1rem;
}

.summary-card h3 {
    color: #F0E0C8;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.summary-card p {
    font-size: 0.9rem;
    color: #8B7B65;
    margin-bottom: 1rem;
}

.summary-stat {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-family: 'Share Tech Mono', monospace;
    border-top: 1px solid rgba(160, 96, 48, 0.3);
    padding-top: 0.75rem;
}

.summary-stat-num {
    color: #E8A040;
    font-size: 1.5rem;
}

.summary-stat-unit {
    color: #8B7B65;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ============================================================
   TERMINAL FOOTER
   ============================================================ */

.terminal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1.25rem;
    background: #1A1008;
    border-top: 1px solid #A06030;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: #8B7B65;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tf-left {
    color: #E8A040;
}

.tf-mid {
    color: #8B7B65;
}

.tf-mid #tf-module {
    color: #F0E0C8;
}

.tf-right {
    color: #E8A040;
}

.tf-cursor {
    display: inline-block;
    color: #E8A040;
    animation: blink 0.8s step-end infinite;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .supply-callouts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .module-grid {
        grid-template-columns: 1fr;
    }
    .module-bottom-bar-double {
        grid-template-columns: 1fr;
    }
    .terminal-bar {
        flex-wrap: wrap;
        font-size: 0.65rem;
    }
    .term-clock {
        margin-left: 0;
        width: 100%;
        text-align: right;
    }
    .hero-meta {
        flex-direction: column;
        gap: 0.35rem;
    }
    .hero-meta-sep {
        display: none;
    }
    .ecosystem-legend {
        gap: 0.75rem;
        font-size: 0.65rem;
    }
    .summary-grid {
        grid-template-columns: 1fr;
    }
    .ecosystem-frame {
        margin: 0 1rem;
        padding: 1rem 0.5rem 1.5rem;
    }
    .terminal-footer {
        flex-wrap: wrap;
        gap: 0.3rem;
        justify-content: flex-start;
    }
}
