/* ==========================================================================
   mechanic.stream -- Scandinavian Workshop Streaming Platform
   Palette: Lavender Cream #F0E8F5, Soft Pink #F5E0E8, Mint Light #E0F5E8,
            Aurora Purple #B0A0D0, Aurora Green #80C0A0, Marble White #F0ECE8,
            Charcoal Soft #3A3040
   Fonts: Zilla Slab (headlines), Nunito (body), Inconsolata (data)
   ========================================================================== */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 1vw, 17px);
    line-height: 1.7;
    color: #3A3040;
    background-color: #F0E8F5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    line-height: 1.25;
}

h2 {
    font-size: clamp(20px, 2.5vw, 32px);
}

h3 {
    font-size: clamp(16px, 1.5vw, 22px);
}

p {
    margin-bottom: 1em;
}

.stream-data {
    font-family: 'Inconsolata', monospace;
    font-weight: 400;
    font-size: 12px;
    color: rgba(58, 48, 64, 0.6);
}

a {
    color: #3A3040;
    text-decoration: none;
}

/* --- Aurora Keyframes --- */
@keyframes auroraShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes springIn {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(20px);
    }
    60% {
        opacity: 1;
        transform: scale(1.03) translateY(-4px);
    }
    80% {
        transform: scale(0.99) translateY(1px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

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

/* --- Layout Helpers --- */
.section-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 48px);
}

.section-title {
    margin-bottom: 1.5rem;
    color: #3A3040;
}

/* ==========================================================================
   AURORA HEADER
   ========================================================================== */
.aurora-header {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: clamp(80px, 15vh, 160px);
    background-color: #F0E8F5;
    overflow: hidden;
    perspective: 800px;
}

.aurora-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 220px;
    background: linear-gradient(
        90deg,
        rgba(128, 192, 160, 0.25),
        rgba(176, 160, 208, 0.30),
        rgba(240, 180, 200, 0.20)
    );
    background-size: 300% 100%;
    animation: auroraShift 12s ease infinite;
    pointer-events: none;
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: fadeIn 800ms ease-out forwards;
}

.logotype {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: clamp(24px, 3.5vw, 44px);
    color: #3A3040;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.tagline {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(14px, 1.2vw, 18px);
    color: rgba(58, 48, 64, 0.65);
    font-weight: 400;
}

/* ==========================================================================
   HERO SECTION -- Marble Panel with Featured Stream
   ========================================================================== */
.hero-section {
    position: relative;
    z-index: 3;
    margin-top: -35vh;
    padding: 0 clamp(20px, 4vw, 48px);
    padding-bottom: clamp(40px, 6vh, 80px);
}

.marble-panel {
    background-color: #F0ECE8;
    background-image:
        linear-gradient(125deg, rgba(176, 160, 208, 0.06) 0%, transparent 40%),
        linear-gradient(235deg, rgba(128, 192, 160, 0.05) 0%, transparent 35%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.5) 10%, transparent 30%),
        linear-gradient(340deg, rgba(200, 190, 180, 0.12) 5%, transparent 25%),
        linear-gradient(80deg, rgba(220, 215, 210, 0.15) 0%, transparent 50%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(58, 48, 64, 0.08);
}

.hero-panel {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(24px, 3vw, 40px);
    animation: slideUp 400ms ease-out forwards;
    animation-delay: 200ms;
    opacity: 0;
}

.featured-stream {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(20px, 3vw, 40px);
    align-items: center;
}

.stream-preview {
    position: relative;
    background: linear-gradient(135deg, #3A3040 0%, #4a3f55 100%);
    border-radius: 12px;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preview-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.play-icon {
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
}

.play-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

.stream-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Inconsolata', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.live-badge {
    background: rgba(128, 192, 160, 0.9);
    color: #3A3040;
}

.live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3A3040;
    animation: livePulse 1.5s ease-in-out infinite;
}

.small-badge {
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    font-size: 10px;
}

.small-badge .live-dot {
    width: 5px;
    height: 5px;
}

.featured-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.featured-title {
    font-size: clamp(20px, 2.2vw, 30px);
    color: #3A3040;
    line-height: 1.3;
}

.featured-description {
    color: rgba(58, 48, 64, 0.75);
    font-size: clamp(14px, 1vw, 16px);
    line-height: 1.65;
    margin-bottom: 0;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.streamer-avatar svg {
    border-radius: 50%;
}

.streamer-details {
    display: flex;
    flex-direction: column;
}

.streamer-name {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #3A3040;
}

/* ==========================================================================
   CATEGORIES SECTION (midground plane)
   ========================================================================== */
.categories-section {
    padding: clamp(40px, 6vh, 80px) 0 clamp(20px, 3vh, 40px);
    background-color: #F0E8F5;
}

.category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-chip {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 18px;
    border-radius: 24px;
    border: 1.5px solid rgba(58, 48, 64, 0.15);
    background: transparent;
    color: #3A3040;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.category-chip:hover {
    background: rgba(176, 160, 208, 0.15);
    border-color: #B0A0D0;
    transform: scale(1.03);
}

.category-chip.active {
    background: #B0A0D0;
    border-color: #B0A0D0;
    color: #fff;
}

/* ==========================================================================
   STREAMS GRID (foreground plane)
   ========================================================================== */
.streams-section {
    padding: clamp(20px, 3vh, 40px) 0 clamp(60px, 8vh, 100px);
    background-color: #F0E8F5;
}

.streams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: clamp(16px, 2vw, 24px);
}

.stream-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(58, 48, 64, 0.08);
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.stream-card.visible {
    animation: springIn 500ms ease forwards;
}

.stream-card:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 32px rgba(58, 48, 64, 0.12);
}

.stream-card:hover .play-icon-small {
    opacity: 1;
    transform: scale(1.15);
}

.card-preview {
    position: relative;
    background: linear-gradient(135deg, #3A3040 0%, #4a3f55 100%);
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-placeholder.small {
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon-small {
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.card-viewers {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(58, 48, 64, 0.7);
    color: rgba(255, 255, 255, 0.9);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.card-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-title {
    font-size: clamp(14px, 1.2vw, 17px);
    color: #3A3040;
    line-height: 1.35;
    margin-bottom: 4px;
}

.card-streamer {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: #B0A0D0;
}

/* ==========================================================================
   SCHEDULE SECTION
   ========================================================================== */
.schedule-section {
    padding: clamp(60px, 8vh, 100px) 0;
    background-color: #F5E0E8;
}

.schedule-panel {
    padding: clamp(24px, 3vw, 40px);
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.schedule-item {
    display: grid;
    grid-template-columns: 140px 1fr auto;
    gap: clamp(16px, 2vw, 32px);
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(58, 48, 64, 0.08);
    transition: background 0.2s ease;
}

.schedule-item:last-child {
    border-bottom: none;
}

.schedule-item:hover {
    background: rgba(176, 160, 208, 0.06);
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    border-radius: 8px;
}

.schedule-time {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.schedule-hour {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: 18px;
    color: #3A3040;
}

.schedule-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.schedule-title {
    font-size: clamp(15px, 1.3vw, 19px);
    color: #3A3040;
}

.schedule-category {
    display: flex;
    align-items: center;
}

.category-tag {
    font-family: 'Inconsolata', monospace;
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 12px;
    background: rgba(128, 192, 160, 0.2);
    color: #3A3040;
    white-space: nowrap;
}

/* ==========================================================================
   ABOUT / COMMUNITY SECTION
   ========================================================================== */
.about-section {
    padding: clamp(60px, 8vh, 100px) 0;
    background-color: #E0F5E8;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(32px, 4vw, 64px);
    align-items: start;
}

.about-block p {
    color: rgba(58, 48, 64, 0.8);
    font-size: clamp(14px, 1vw, 16px);
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
    padding: 24px 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(58, 48, 64, 0.05);
}

.stat-number {
    display: block;
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: clamp(24px, 2.5vw, 36px);
    color: #3A3040;
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-family: 'Inconsolata', monospace;
    font-size: 11px;
    color: rgba(58, 48, 64, 0.55);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    padding: clamp(40px, 5vh, 60px) 0;
    background-color: #3A3040;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.footer-logo {
    font-family: 'Zilla Slab', serif;
    font-weight: 700;
    font-size: 22px;
    color: #F0E8F5;
}

.footer-tagline {
    font-size: 13px;
    color: rgba(240, 232, 245, 0.5);
    margin-top: 4px;
    margin-bottom: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

.footer-link {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: rgba(240, 232, 245, 0.7);
    transition: color 0.25s ease;
}

.footer-link:hover {
    color: #E0F5E8;
}

.footer-copy .stream-data {
    color: rgba(240, 232, 245, 0.35);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
    .featured-stream {
        grid-template-columns: 1fr;
    }

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

    .schedule-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .schedule-category {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .streams-grid {
        grid-template-columns: 1fr;
    }

    .stats-row {
        grid-template-columns: 1fr;
    }

    .hero-section {
        margin-top: -20vh;
    }

    .category-row {
        gap: 8px;
    }

    .category-chip {
        font-size: 12px;
        padding: 6px 14px;
    }
}
