/* PowerPlant Website - Rust / Post-Apocalyptic Aesthetic */

/* Disable Windows High Contrast mode */
@media (forced-colors: active) {
    *, *::before, *::after {
        forced-color-adjust: none;
    }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { position: relative; overflow-x: hidden; }

.pixelated {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* ========================================
   Textures & Overlays
   ======================================== */

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

.vignette {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 9997;
    background: radial-gradient(ellipse at center, transparent 0%, transparent 50%, rgba(0,0,0,0.4) 100%);
}

/* ========================================
   Parallax Backgrounds
   ======================================== */

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

/* Fallback for mobile (fixed attachment doesn't work well) */
@media (max-width: 1024px) {
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* Dark overlay for hero - heavy vignette + darkness */
.hero-overlay {
    background:
        radial-gradient(ellipse at center, rgba(18, 17, 16, 0.4) 0%, rgba(18, 17, 16, 0.85) 100%),
        linear-gradient(180deg, rgba(18, 17, 16, 0.3) 0%, rgba(18, 17, 16, 0.7) 100%);
}

/* Section overlay - darker to keep text readable */
.section-overlay {
    background:
        linear-gradient(180deg,
            rgba(18, 17, 16, 0.92) 0%,
            rgba(18, 17, 16, 0.85) 50%,
            rgba(18, 17, 16, 0.92) 100%
        );
}

/* Download section - lighter overlay to show more background */
.section-overlay-download {
    background:
        radial-gradient(ellipse at center, rgba(18, 17, 16, 0.7) 0%, rgba(18, 17, 16, 0.85) 100%),
        linear-gradient(180deg,
            rgba(18, 17, 16, 0.8) 0%,
            rgba(18, 17, 16, 0.6) 50%,
            rgba(18, 17, 16, 0.8) 100%
        );
}

/* ========================================
   Header
   ======================================== */

.header-bar {
    background: linear-gradient(180deg,
        rgba(28, 25, 21, 0.98) 0%,
        rgba(18, 17, 16, 0.95) 100%
    );
    border-bottom: 2px solid #cd412b;
    box-shadow:
        0 2px 0 #1a1512,
        0 4px 20px rgba(0,0,0,0.5);
}

.nav-link {
    color: #a08060;
    transition: all 0.2s;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    color: #d4c4a8;
    border-bottom-color: #cd412b;
}

/* ========================================
   Hero Section
   ======================================== */

.title-shadow {
    text-shadow:
        3px 3px 0 #1c1915,
        -1px -1px 0 rgba(212, 196, 168, 0.1);
}

/* Worn frame around logo */
.worn-frame {
    background: linear-gradient(135deg, #2a231d 0%, #1c1915 100%);
    border: 3px solid #3d2b1f;
    box-shadow:
        inset 0 0 20px rgba(0,0,0,0.5),
        0 0 0 1px #1a1512,
        4px 4px 15px rgba(0,0,0,0.4);
    position: relative;
}

.worn-frame::before {
    content: '';
    position: absolute;
    top: 4px; right: 4px; bottom: 4px; left: 4px;
    border: 1px solid rgba(160, 128, 96, 0.1);
}

/* Warning/radiation sign */
.warning-sign {
    opacity: 0.15;
}

.rad-symbol {
    font-size: 80px;
    color: #b8960b;
    text-shadow: 0 0 20px rgba(184, 150, 11, 0.3);
    animation: pulse-slow 4s ease-in-out infinite;
}

@keyframes pulse-slow {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.25; }
}

/* Worn tag/label */
.worn-tag {
    background: rgba(61, 43, 31, 0.6);
    border: 1px solid #5c4033;
    padding: 6px 14px;
    font-family: 'Russo One', sans-serif;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: #a08060;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ========================================
   Buttons - Rust Style
   ======================================== */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(180deg, #cd412b 0%, #a33522 100%);
    border: 2px solid #8a2a1a;
    color: #fff;
    font-family: 'Russo One', sans-serif;
    font-size: 15px;
    letter-spacing: 0.1em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2),
        0 4px 0 #6a1f15,
        0 6px 20px rgba(0,0,0,0.4);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #e05540 0%, #b5402a 100%);
    transform: translateY(-2px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2),
        0 6px 0 #6a1f15,
        0 10px 30px rgba(0,0,0,0.5);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.1),
        0 2px 0 #6a1f15,
        0 4px 10px rgba(0,0,0,0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    background: transparent;
    border: 2px solid #5c4033;
    color: #a08060;
    font-family: 'Russo One', sans-serif;
    font-size: 15px;
    letter-spacing: 0.1em;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-secondary:hover {
    border-color: #cd412b;
    color: #cd412b;
    background: rgba(205, 65, 43, 0.1);
}

/* ========================================
   Warning Stripe
   ======================================== */

.warning-stripe {
    height: 8px;
    background: repeating-linear-gradient(
        -55deg,
        #b8960b,
        #b8960b 10px,
        #1c1915 10px,
        #1c1915 20px
    );
    opacity: 0.6;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* ========================================
   Worn Plate (section labels)
   ======================================== */

.worn-plate {
    background: linear-gradient(180deg, #2a231d 0%, #1c1915 100%);
    border: 2px solid #3d2b1f;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.03),
        0 2px 0 #0d0c0b;
}

/* ========================================
   Feature Cards
   ======================================== */

.feature-card {
    background: linear-gradient(180deg, #221d19 0%, #1a1613 100%);
    border: 2px solid #3d2b1f;
    padding: 24px;
    position: relative;
    transition: all 0.2s;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.3);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(92, 64, 51, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.feature-card:hover {
    border-color: #5c4033;
    transform: translateY(-4px);
    box-shadow:
        inset 0 0 30px rgba(0,0,0,0.3),
        0 8px 30px rgba(0,0,0,0.4);
}

.feature-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(205, 65, 43, 0.15);
    border: 2px solid rgba(205, 65, 43, 0.3);
    margin-bottom: 16px;
    color: #cd412b;
    font-size: 24px;
}

/* ========================================
   Check marks
   ======================================== */

.check-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(74, 92, 58, 0.3);
    border: 1px solid #4a5c3a;
    color: #7a9a5a;
    font-weight: bold;
    font-size: 14px;
}

/* ========================================
   Torn Note (About section)
   ======================================== */

.torn-note {
    position: relative;
    transform: rotate(-1deg);
}

.torn-note-content {
    background: linear-gradient(170deg, #d4c4a0 0%, #c4b496 30%, #b8a888 100%);
    padding: 2.5rem 3rem;
    position: relative;
    box-shadow:
        4px 6px 20px rgba(0,0,0,0.4),
        inset 0 0 80px rgba(0,0,0,0.08);
}

.torn-note-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='paper'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.04' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23paper)'/%3E%3C/svg%3E");
    opacity: 0.05;
    pointer-events: none;
}

/* Coffee/rust stains on paper */
.torn-note-content::after {
    content: '';
    position: absolute;
    bottom: 20px;
    right: 30px;
    width: 80px;
    height: 80px;
    background: radial-gradient(ellipse, rgba(139, 90, 43, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    transform: rotate(15deg);
}

/* Torn paper edge effect */
.torn-edge {
    height: 15px;
    background-color: #d4c4a0;
    position: relative;
}

.torn-edge-top {
    clip-path: polygon(
        0% 100%, 2% 60%, 5% 100%, 8% 50%, 12% 100%, 15% 70%, 18% 100%,
        22% 40%, 25% 100%, 28% 65%, 32% 100%, 35% 55%, 38% 100%,
        42% 45%, 45% 100%, 48% 70%, 52% 100%, 55% 50%, 58% 100%,
        62% 60%, 65% 100%, 68% 45%, 72% 100%, 75% 70%, 78% 100%,
        82% 55%, 85% 100%, 88% 40%, 92% 100%, 95% 65%, 98% 100%, 100% 50%, 100% 100%
    );
}

.torn-edge-bottom {
    clip-path: polygon(
        0% 0%, 0% 50%, 3% 0%, 6% 40%, 10% 0%, 13% 55%, 17% 0%,
        20% 45%, 24% 0%, 27% 60%, 30% 0%, 34% 35%, 37% 0%,
        40% 50%, 44% 0%, 47% 40%, 50% 0%, 54% 55%, 57% 0%,
        60% 45%, 64% 0%, 67% 60%, 70% 0%, 74% 35%, 77% 0%,
        80% 50%, 84% 0%, 87% 45%, 90% 0%, 94% 55%, 97% 0%, 100% 40%, 100% 0%
    );
    background-color: #c4b496;
}

/* Pin/tack holding the note */
.note-pin {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, #8b4513, #5c3010);
    border-radius: 50%;
    box-shadow:
        0 3px 6px rgba(0,0,0,0.4),
        inset 0 -2px 4px rgba(0,0,0,0.3),
        inset 0 2px 2px rgba(255,255,255,0.2);
    z-index: 10;
}

.note-pin::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: radial-gradient(circle at 30% 30%, #654321, #3d2817);
    border-radius: 50%;
}

/* Blood splatter */
.blood-splatter {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 50px;
    height: 50px;
    opacity: 0.4;
    background:
        radial-gradient(ellipse at 50% 50%, #8b2500 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, #6b1c00 0%, transparent 40%),
        radial-gradient(ellipse at 30% 70%, #7a2000 0%, transparent 35%);
    transform: rotate(-20deg);
}

/* Handwritten style text */
.handwritten {
    font-style: italic;
    letter-spacing: 0.02em;
}

/* ========================================
   Windows 95 Terminal (Download widget)
   ======================================== */

.win-window {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #404040 #404040 #dfdfdf;
    box-shadow:
        inset 1px 1px 0 #ffffff,
        inset -1px -1px 0 #808080,
        8px 8px 30px rgba(0,0,0,0.5);
}

.win-titlebar {
    background: linear-gradient(90deg, #000080, #1084d0);
    color: white;
    padding: 3px 4px;
    font-family: 'VT323', monospace;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}

.win-buttons {
    display: flex;
    gap: 2px;
}

.win-btn {
    width: 16px;
    height: 14px;
    background: #c0c0c0;
    border: 1px solid;
    border-color: #dfdfdf #404040 #404040 #dfdfdf;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    cursor: pointer;
    font-family: sans-serif;
    font-weight: bold;
}

.win-content {
    background: #c0c0c0;
    color: #000;
}

.win-window-inset {
    background: #ffffff;
    border: 2px solid;
    border-color: #808080 #dfdfdf #dfdfdf #808080;
    box-shadow: inset 1px 1px 0 #404040;
}

.progress-bar {
    height: 20px;
    background: #fff;
    border: 1px solid #808080;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 100%;
    background: repeating-linear-gradient(
        90deg,
        #000080 0px,
        #000080 8px,
        #1084d0 8px,
        #1084d0 16px
    );
}

.win-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #404040 #404040 #dfdfdf;
    box-shadow: inset 1px 1px 0 #ffffff;
    color: #000;
    font-family: 'VT323', monospace;
    font-size: 18px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.05s;
}

.win-button:hover {
    background: #d4d4d4;
}

.win-button:active {
    border-color: #404040 #dfdfdf #dfdfdf #404040;
    box-shadow: inset 1px 1px 0 #808080;
}

/* ========================================
   Feature Detail Cards (Features page)
   ======================================== */

.feature-detail-card {
    background: linear-gradient(180deg, rgba(34, 29, 25, 0.95) 0%, rgba(26, 22, 19, 0.95) 100%);
    border: 2px solid rgba(205, 65, 43, 0.3);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(205, 65, 43, 0.15), inset 0 1px 0 rgba(212, 196, 168, 0.1);
    transition: all 0.3s ease;
}

.feature-detail-card:hover {
    box-shadow: 0 16px 48px rgba(205, 65, 43, 0.25), inset 0 1px 0 rgba(212, 196, 168, 0.1);
    border-color: #cd412b;
    transform: translateY(-2px);
}

.feature-detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, #a33522 0%, #cd412b 50%, #a33522 100%);
    box-shadow: 0 0 16px rgba(205, 65, 43, 0.5);
}

.feature-detail-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(205, 65, 43, 0.4);
    background: linear-gradient(90deg, rgba(205, 65, 43, 0.05) 0%, rgba(0, 0, 0, 0.2) 100%);
    position: relative;
}

.feature-detail-header::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(163, 53, 34, 0.6) 0%, transparent 100%);
}

.feature-detail-content {
    padding: 2rem;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    font-family: 'Russo One', sans-serif;
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.status-working {
    background: rgba(74, 92, 58, 0.3);
    border: 1px solid #4a5c3a;
    color: #7a9a5a;
}

.status-wip {
    background: rgba(184, 150, 11, 0.2);
    border: 1px solid #b8960b;
    color: #d4b41b;
}

.status-planned {
    background: rgba(160, 128, 96, 0.2);
    border: 1px solid #a08060;
    color: #c0a080;
}

.status-beta {
    background: rgba(163, 53, 34, 0.2);
    border: 1px solid #a33522;
    color: #cd412b;
}

/* Section header - sticky category bar (replaces navbar when scrolling) */
.section-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(180deg,
        rgba(28, 25, 21, 0.99) 0%,
        rgba(18, 17, 16, 0.98) 100%
    );
    padding: 0.75rem 0;
    border-bottom: 2px solid #cd412b;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6), 0 0 12px rgba(205, 65, 43, 0.3);
    backdrop-filter: blur(12px);
}

.section-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, #a33522 0%, #cd412b 50%, #a33522 100%);
    box-shadow: 0 0 20px rgba(205, 65, 43, 0.6);
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #a33522 0%, transparent 50%);
}

/* ========================================
   Scrollbar
   ======================================== */

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #1c1915;
}

::-webkit-scrollbar-thumb {
    background: #3d2b1f;
    border: 2px solid #1c1915;
}

::-webkit-scrollbar-thumb:hover {
    background: #5c4033;
}

/* ========================================
   Selection
   ======================================== */

::selection {
    background: rgba(205, 65, 43, 0.5);
    color: #fff;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .worn-note {
        transform: none;
    }

    .tape { display: none; }
}

@media (max-width: 640px) {
    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 12px 20px;
    }

    .nav-link {
        font-size: 12px;
    }
}
