/* =============================================
   mechanic.stream - Holographic Workshop Broadcast
   Colors: #40B0C0, #F8F8FF, #E0F0F8, #E0C040, #0A0E14, #E070B0, #B0C0D0
   Fonts: Share Tech Mono, Inter
   ============================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0A0E14;
    color: #B0C0D0;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    line-height: 1.75;
    overflow-x: hidden;
}

/* --- Scanline Overlay --- */
.scanline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(10, 14, 20, 0.03) 2px,
        rgba(10, 14, 20, 0.03) 4px
    );
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Share Tech Mono', monospace;
    font-weight: 400;
    color: #E0F0F8;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

/* --- Hero Section --- */
.section-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0A0E14;
}

.holographic-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(64, 176, 192, 0.04) 20%,
        rgba(224, 112, 176, 0.04) 40%,
        rgba(224, 192, 64, 0.04) 60%,
        rgba(64, 176, 192, 0.03) 80%,
        transparent 100%
    );
    background-size: 400% 400%;
    animation: shimmerMove 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.shimmer-secondary {
    background: radial-gradient(
        ellipse at 30% 50%,
        rgba(64, 176, 192, 0.06) 0%,
        transparent 50%
    ),
    radial-gradient(
        ellipse at 70% 30%,
        rgba(224, 112, 176, 0.04) 0%,
        transparent 40%
    ),
    radial-gradient(
        ellipse at 50% 80%,
        rgba(224, 192, 64, 0.03) 0%,
        transparent 45%
    );
    background-size: 100% 100%;
    animation: shimmerSecondary 12s ease-in-out infinite;
}

@keyframes shimmerMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes shimmerSecondary {
    0% { opacity: 0.5; }
    33% { opacity: 1; }
    66% { opacity: 0.7; }
    100% { opacity: 0.5; }
}

.hero-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 40%, #0A0E14 100%);
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    opacity: 0;
    animation: heroFadeIn 2.5s ease-out 0.5s forwards;
}

@keyframes heroFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(4px);
    }
    60% {
        filter: blur(0px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0px);
    }
}

.broadcast-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2rem;
    padding: 6px 16px;
    border: 1px solid rgba(64, 176, 192, 0.4);
    border-radius: 2px;
    background: rgba(64, 176, 192, 0.05);
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #E070B0;
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px #E070B0; }
    50% { opacity: 0.3; box-shadow: 0 0 16px #E070B0; }
}

.live-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: #40B0C0;
    letter-spacing: 0.2em;
}

.hero-title {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    letter-spacing: 0.08em;
    background: linear-gradient(90deg, #40B0C0, #E070B0, #E0C040, #40B0C0);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbowShift 6s linear infinite;
    text-shadow: none;
    line-height: 1.1;
}

@keyframes rainbowShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.title-dot {
    -webkit-text-fill-color: #E0C040;
}

.hero-subtitle {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(0.8rem, 1.5vw, 1rem);
    color: #B0C0D0;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.signal-line {
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #40B0C0, transparent);
    margin: 0 auto 2rem;
    animation: signalPulse 3s ease-in-out infinite;
}

@keyframes signalPulse {
    0%, 100% { opacity: 0.4; width: 120px; }
    50% { opacity: 1; width: 200px; }
}

.hero-data-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.data-fragment {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    color: rgba(64, 176, 192, 0.6);
    letter-spacing: 0.1em;
}

.data-fragment-sep {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    color: rgba(224, 192, 64, 0.3);
}

/* Star Field */
.star-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star-particle {
    position: absolute;
    background: #F8F8FF;
    border-radius: 50%;
    animation: starTwinkle var(--twinkle-duration) ease-in-out infinite;
    animation-delay: var(--twinkle-delay);
}

@keyframes starTwinkle {
    0%, 100% { opacity: 0.15; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.3); }
}

/* --- Glitch Dividers --- */
.glitch-divider {
    position: relative;
    height: 4px;
    margin: 0;
    overflow: hidden;
    background: transparent;
}

.glitch-divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #40B0C0, #E070B0, #E0C040, transparent);
    animation: glitchSweep 4s ease-in-out infinite;
}

.glitch-divider[data-glitch="2"]::before { animation-delay: 0.5s; }
.glitch-divider[data-glitch="3"]::before { animation-delay: 1.0s; }
.glitch-divider[data-glitch="4"]::before { animation-delay: 1.5s; }
.glitch-divider[data-glitch="5"]::before { animation-delay: 2.0s; }
.glitch-divider[data-glitch="6"]::before { animation-delay: 2.5s; }

.glitch-divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent 0px,
        transparent 4px,
        rgba(64, 176, 192, 0.3) 4px,
        rgba(64, 176, 192, 0.3) 5px
    );
}

@keyframes glitchSweep {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.glitch-divider.glitching {
    animation: glitchFlicker 0.2s steps(2) forwards;
}

.glitch-divider.glitching::before {
    background: linear-gradient(90deg,
        #E070B0, #40B0C0, #E0C040,
        #E070B0, #40B0C0, #E0C040
    );
    left: 0;
    width: 100%;
}

@keyframes glitchFlicker {
    0% { transform: translateX(0) scaleY(1); filter: none; }
    20% { transform: translateX(-4px) scaleY(3); filter: hue-rotate(90deg); }
    40% { transform: translateX(6px) scaleY(1); filter: hue-rotate(180deg) brightness(2); }
    60% { transform: translateX(-2px) scaleY(4); filter: hue-rotate(270deg); }
    80% { transform: translateX(3px) scaleY(1); filter: hue-rotate(45deg) brightness(1.5); }
    100% { transform: translateX(0) scaleY(1); filter: none; }
}

/* --- Editorial Sections --- */
.section-editorial {
    position: relative;
    padding: 6rem 2rem;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-editorial.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-editorial .section-inner {
    margin: 0 auto;
}

.wide-column .section-inner {
    max-width: 80%;
}

.narrow-column .section-inner {
    max-width: 50%;
}

@media (max-width: 768px) {
    .wide-column .section-inner,
    .narrow-column .section-inner {
        max-width: 95%;
    }
}

/* Section Labels */
.section-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.label-index {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: #E0C040;
    letter-spacing: 0.1em;
}

.label-line {
    flex: 0 0 40px;
    height: 1px;
    background: linear-gradient(90deg, #E0C040, transparent);
}

.label-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: #40B0C0;
    letter-spacing: 0.2em;
}

/* --- Holographic Cards --- */
.holographic-card {
    position: relative;
    background: rgba(10, 14, 20, 0.8);
    border: 1px solid rgba(64, 176, 192, 0.2);
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
    --border-angle: 0deg;
}

.holographic-card:hover {
    border-color: rgba(224, 112, 176, 0.4);
    box-shadow:
        0 0 20px rgba(64, 176, 192, 0.05),
        0 0 40px rgba(224, 112, 176, 0.03);
}

.card-border-glow {
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: 4px;
    background: linear-gradient(
        var(--border-angle, 0deg),
        rgba(64, 176, 192, 0.4),
        rgba(224, 112, 176, 0.4),
        rgba(224, 192, 64, 0.4),
        rgba(64, 176, 192, 0.4)
    );
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.holographic-card:hover .card-border-glow {
    opacity: 1;
}

.card-content {
    position: relative;
    padding: 2rem;
    background: rgba(10, 14, 20, 0.95);
    margin: 1px;
    border-radius: 3px;
}

/* --- Broadcast Overlay Data --- */
.broadcast-overlay {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(64, 176, 192, 0.15);
    flex-wrap: wrap;
}

.overlay-data {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.data-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    color: #40B0C0;
    letter-spacing: 0.15em;
}

.data-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.1rem;
    color: #E0C040;
    transition: color 0.3s ease;
}

.data-value.flash {
    color: #E070B0;
}

/* --- Tool Grid --- */
.tool-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.tool-card .card-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.tool-icon {
    margin-bottom: 1rem;
    opacity: 0.85;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tool-card:hover .tool-icon {
    opacity: 1;
    transform: scale(1.05);
}

.tool-icon svg {
    filter: drop-shadow(0 0 6px rgba(64, 176, 192, 0.4));
}

/* --- Archive Grid --- */
.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.archive-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(64, 176, 192, 0.1);
}

.archive-date {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: #40B0C0;
}

.archive-duration {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: #E070B0;
}

.archive-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(64, 176, 192, 0.1);
}

.stat {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: #B0C0D0;
}

.stat-val {
    color: #E0C040;
    margin-right: 0.25rem;
}

/* --- Signal Display --- */
.signal-display {
    margin-bottom: 1.5rem;
    border: 1px solid rgba(64, 176, 192, 0.15);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.signal-display::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(64, 176, 192, 0.03) 0%,
        transparent 20%,
        transparent 80%,
        rgba(64, 176, 192, 0.03) 100%
    );
    pointer-events: none;
}

#signalCanvas {
    width: 100%;
    height: 150px;
    display: block;
    background: rgba(10, 14, 20, 0.5);
}

.signal-info {
    margin-bottom: 1.5rem;
}

/* Telemetry Readouts */
.telemetry-readouts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.readout {
    display: grid;
    grid-template-columns: 100px 1fr 60px;
    align-items: center;
    gap: 1rem;
}

.readout-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: #40B0C0;
    letter-spacing: 0.1em;
}

.readout-bar {
    height: 4px;
    background: rgba(64, 176, 192, 0.08);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.readout-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, #40B0C0, #E070B0);
    transition: width 0.8s ease;
    position: relative;
}

.readout-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: #F8F8FF;
    border-radius: 2px;
    opacity: 0.6;
}

.readout-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: #E0C040;
    text-align: right;
}

/* --- About Section --- */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: center;
}

@media (max-width: 768px) {
    .about-layout {
        grid-template-columns: 1fr;
    }
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

/* Holographic Projection Visual */
.holo-projection {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.projection-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid;
    top: 50%;
    left: 50%;
}

.ring-1 {
    width: 180px;
    height: 180px;
    border-color: rgba(64, 176, 192, 0.4);
    border-width: 1px;
    animation: ringOrbit1 12s linear infinite;
}

.ring-2 {
    width: 130px;
    height: 130px;
    border-color: rgba(224, 112, 176, 0.4);
    border-width: 1px;
    animation: ringOrbit2 8s linear infinite;
}

.ring-3 {
    width: 80px;
    height: 80px;
    border-color: rgba(224, 192, 64, 0.4);
    border-width: 1px;
    animation: ringOrbit3 5s linear infinite;
}

@keyframes ringOrbit1 {
    0% { transform: translate(-50%, -50%) perspective(300px) rotateX(60deg) rotateZ(0deg); }
    100% { transform: translate(-50%, -50%) perspective(300px) rotateX(60deg) rotateZ(360deg); }
}

@keyframes ringOrbit2 {
    0% { transform: translate(-50%, -50%) perspective(300px) rotateX(60deg) rotateZ(60deg); }
    100% { transform: translate(-50%, -50%) perspective(300px) rotateX(60deg) rotateZ(420deg); }
}

@keyframes ringOrbit3 {
    0% { transform: translate(-50%, -50%) perspective(300px) rotateX(60deg) rotateZ(120deg); }
    100% { transform: translate(-50%, -50%) perspective(300px) rotateX(60deg) rotateZ(480deg); }
}

.projection-core {
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(64, 176, 192, 0.8), rgba(64, 176, 192, 0.2), transparent);
    border-radius: 50%;
    animation: corePulse 3s ease-in-out infinite;
}

@keyframes corePulse {
    0%, 100% { box-shadow: 0 0 20px rgba(64, 176, 192, 0.3), 0 0 40px rgba(224, 112, 176, 0.1); }
    50% { box-shadow: 0 0 40px rgba(64, 176, 192, 0.6), 0 0 80px rgba(224, 112, 176, 0.2); }
}

/* --- Schedule --- */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.schedule-item .card-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem 2rem;
}

.schedule-day {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.4rem;
    color: #E0C040;
    min-width: 60px;
}

.schedule-detail {
    flex: 1;
}

.schedule-detail h3 {
    margin-bottom: 0.25rem;
}

.schedule-time {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    color: #E070B0;
}

.schedule-status {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    color: #B0C0D0;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border: 1px solid rgba(176, 192, 208, 0.2);
    border-radius: 2px;
}

.schedule-status.status-live {
    color: #E070B0;
    border-color: rgba(224, 112, 176, 0.4);
    background: rgba(224, 112, 176, 0.05);
    animation: statusPulse 2s ease-in-out infinite;
}

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

/* --- Star Accents --- */
.star-accent {
    position: absolute;
    pointer-events: none;
    opacity: 0.5;
    animation: starFloat 4s ease-in-out infinite;
}

.star-accent-1 {
    top: 15%;
    right: 8%;
    animation-delay: 0s;
}

.star-accent-2 {
    top: 10%;
    left: 5%;
    animation-delay: 1s;
}

.star-accent-3 {
    bottom: 20%;
    right: 12%;
    animation-delay: 2s;
}

.star-accent-4 {
    top: 25%;
    right: 5%;
    animation-delay: 0.5s;
}

.star-accent-5 {
    top: 5%;
    right: 15%;
    animation-delay: 1.5s;
}

.star-accent-6 {
    bottom: 10%;
    left: 8%;
    animation-delay: 2.5s;
}

.star-accent-7 {
    bottom: 15%;
    left: 10%;
    animation-delay: 0.8s;
}

@keyframes starFloat {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.4; }
    50% { transform: translateY(-10px) scale(1.3); opacity: 0.9; }
}

/* --- Footer --- */
.site-footer {
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(64, 176, 192, 0.15), transparent);
}

.footer-inner {
    max-width: 600px;
    margin: 0 auto;
}

.footer-signal-line {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #40B0C0, transparent);
    margin: 0 auto 1.5rem;
}

.footer-brand {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    color: #E0F0F8;
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-dot {
    color: #E0C040;
}

.footer-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    color: #B0C0D0;
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 1.5rem;
}

.footer-data {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-datum {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    color: rgba(176, 192, 208, 0.4);
    letter-spacing: 0.2em;
}

.footer-datum-sep {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.6rem;
    color: rgba(176, 192, 208, 0.2);
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .section-editorial {
        padding: 4rem 1.5rem;
    }

    .broadcast-overlay {
        gap: 1rem;
    }

    .readout {
        grid-template-columns: 80px 1fr 50px;
        gap: 0.5rem;
    }

    .schedule-item .card-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .schedule-status {
        align-self: flex-start;
    }

    .archive-grid {
        grid-template-columns: 1fr;
    }

    .hero-data-strip {
        gap: 0.5rem;
    }

    .data-fragment {
        font-size: 0.55rem;
    }
}
