/* mechanic.monster - Goblincore / Steampunk Industrial */
/* Colors: #1A1B1E, #3A3B3F, #3D9B8F, #6B3FA0, #B8A99A, #E8DCC8, #FF8C42, #FFCC00 */
/* Fonts: Russo One, Exo 2, Space Mono */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Exo 2', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    color: #B8A99A;
    background: #1A1B1E;
    overflow-x: hidden;
}

/* Noise Texture */
.noise-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.6;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
}

/* Blueprint Grid */
.blueprint-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    background:
        linear-gradient(rgba(61, 155, 143, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(61, 155, 143, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    transition: opacity 0.5s ease;
}

.blueprint-grid.visible {
    opacity: 1;
}

/* Sections */
.section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    position: relative;
    z-index: 10;
}

.section-title {
    font-family: 'Russo One', sans-serif;
    font-size: 42px;
    color: #E8DCC8;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 140, 66, 0.15);
    margin-bottom: 48px;
    text-align: center;
}

/* Hero Section */
.hero-section {
    gap: 32px;
}

.gear-container {
    position: relative;
    width: 300px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gear {
    width: 150px;
    height: 150px;
    position: absolute;
    opacity: 0;
}

.gear-left {
    left: 0;
}

.gear-right {
    right: 0;
}

.gear-path {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
}

.gear.drawing .gear-path {
    animation: drawGear 1.5s ease-out forwards;
}

@keyframes drawGear {
    to { stroke-dashoffset: 0; }
}

.gear.drawing {
    opacity: 1;
    animation: spinGear 4s linear infinite;
}

@keyframes spinGear {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.gear.split-left {
    animation: splitLeft 0.6s ease-out forwards;
}

.gear.split-right {
    animation: splitRight 0.6s ease-out forwards;
}

@keyframes splitLeft {
    to { transform: translateX(-80px); }
}

@keyframes splitRight {
    to { transform: translateX(80px); }
}

.hero-content {
    text-align: center;
    opacity: 0;
    z-index: 11;
}

.hero-content.visible {
    animation: stampReveal 0.3s ease-out forwards;
}

@keyframes stampReveal {
    from { opacity: 0; transform: scale(1.05); }
    to { opacity: 1; transform: scale(1); }
}

.hero-title {
    font-family: 'Russo One', sans-serif;
    font-size: 56px;
    color: #E8DCC8;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 140, 66, 0.2);
    line-height: 1;
}

.hero-subtitle {
    font-size: 14px;
    color: #FF8C42;
    letter-spacing: 0.12em;
    margin-top: 12px;
}

.hero-status {
    display: flex;
    gap: 32px;
    font-size: 11px;
    color: #3D9B8F;
    letter-spacing: 0.1em;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.hero-status.visible {
    opacity: 0.6;
}

.mono-text {
    font-family: 'Space Mono', monospace;
}

/* Broken Grid */
.broken-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
    max-width: 900px;
    width: 100%;
}

/* Metal Panels */
.metal-panel {
    background: linear-gradient(135deg, #3A3B3F 0%, #2A2B2E 100%);
    border: 1px solid #4A4B4F;
    border-radius: 4px;
    position: relative;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metal-panel:hover {
    box-shadow: 6px 6px 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 15px rgba(255, 140, 66, 0.1);
}

/* Rivets */
.rivet {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #5A5B5F, #252628);
    z-index: 5;
}

.rivet-tl { top: 8px; left: 8px; }
.rivet-tr { top: 8px; right: 8px; }
.rivet-bl { bottom: 8px; left: 8px; }
.rivet-br { bottom: 8px; right: 8px; }

.panel-content {
    padding: 32px;
    position: relative;
}

.panel-title {
    font-family: 'Russo One', sans-serif;
    font-size: 24px;
    color: #FF8C42;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.panel-body {
    font-size: 15px;
    color: #B8A99A;
    line-height: 1.7;
    margin-bottom: 16px;
}

.panel-tag {
    font-size: 11px;
    color: #3D9B8F;
    letter-spacing: 0.1em;
    padding-top: 12px;
    border-top: 1px solid #4A4B4F;
}

/* Oil Drips */
.oil-drip-container {
    position: absolute;
    top: 0;
    left: 20%;
    width: 60%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.oil-drip {
    position: absolute;
    top: -10px;
    width: 4px;
    height: 8px;
    background: #3A3B3F;
    border-radius: 0 0 4px 4px;
    opacity: 0.6;
}

.drip-1 { left: 20%; animation: oilDrip 3s ease-in infinite 0s; }
.drip-2 { left: 50%; animation: oilDrip 2.5s ease-in infinite 0.8s; }
.drip-3 { left: 75%; animation: oilDrip 4s ease-in infinite 1.5s; }

@keyframes oilDrip {
    0% { transform: translateY(0); opacity: 0.6; }
    80% { opacity: 0.6; }
    100% { transform: translateY(100px); opacity: 0; }
}

/* Grid positions */
.panel-1 { grid-column: 1; grid-row: 1; margin-top: 20px; }
.panel-2 { grid-column: 2; grid-row: 1; margin-top: -10px; }
.panel-3 { grid-column: 1; grid-row: 2; margin-top: -15px; }
.panel-4 { grid-column: 2; grid-row: 2; margin-top: 10px; }

/* Conveyor Belt */
.conveyor-section {
    min-height: auto;
    padding: 80px 0;
    overflow: hidden;
}

.conveyor-belt {
    width: 100%;
    overflow: hidden;
    border-top: 2px solid #3A3B3F;
    border-bottom: 2px solid #3A3B3F;
    padding: 24px 0;
    background: rgba(58, 59, 63, 0.2);
}

.conveyor-track {
    display: flex;
    gap: 48px;
    animation: conveyorScroll 20s linear infinite;
    white-space: nowrap;
}

.conveyor-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.item-icon {
    font-size: 24px;
    color: #FF8C42;
    animation: spinIcon 3s linear infinite;
}

@keyframes spinIcon {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.item-label {
    font-size: 13px;
    color: #E8DCC8;
    letter-spacing: 0.08em;
}

@keyframes conveyorScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Monster Section */
.monster-card {
    max-width: 600px;
    width: 100%;
}

.monster-ascii {
    font-size: 14px;
    color: #3D9B8F;
    text-align: center;
    margin-bottom: 24px;
    white-space: pre;
    line-height: 1.2;
}

.monster-desc {
    font-size: 16px;
    color: #B8A99A;
    margin-bottom: 24px;
    text-align: center;
}

.monster-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding-top: 20px;
    border-top: 1px solid #4A4B4F;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-label {
    font-size: 10px;
    color: #7A7B7F;
    letter-spacing: 0.12em;
}

.stat-value {
    font-family: 'Exo 2', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #E8DCC8;
}

.highlight-gold {
    color: #FFCC00;
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
}

/* Fade Reveal */
.fade-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.site-footer {
    padding: 40px 24px 60px;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.footer-plate {
    max-width: 600px;
    width: 100%;
}

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

.footer-text {
    font-size: 13px;
    color: #FF8C42;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.footer-sub {
    font-size: 11px;
    color: #7A7B7F;
    letter-spacing: 0.1em;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }

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

    .metal-panel {
        transform: none !important;
        margin-top: 0 !important;
    }

    .section-title {
        font-size: 32px;
    }

    .hero-status {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    .monster-stats {
        flex-direction: column;
        gap: 16px;
    }

    .gear-container {
        width: 200px;
    }

    .gear {
        width: 100px;
        height: 100px;
    }
}
