/* ============================================
   Clawlands Landing Page
   Theme: Lobster Red + Retro Computer Terminal
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Courier New', 'Lucida Console', monospace;
    background: #0d0806;
    color: #e8d5cc;
    overflow-x: hidden;
    line-height: 1.7;
}

/* Pixel art rendering for all game sprites */
img[src*="sprites"] {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* --- Fixed Background --- */
.bg-fixed {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.bg-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(140, 20, 10, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 30%, rgba(100, 15, 8, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, #0d0806 0%, #140a08 30%, #1a0c0a 60%, #0d0806 100%);
}

#bg-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Subtle scanline overlay on entire page */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 14px 28px;
    transition: all 0.3s;
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    background: rgba(13, 8, 6, 0.95);
    border-bottom: 1px solid rgba(180, 50, 30, 0.3);
    backdrop-filter: blur(10px);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #c43a24;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 4px;
}

.nav-sprite {
    width: 24px;
    height: 24px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    color: #8a7068;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #e8d5cc;
}

.nav-play-btn {
    background: #c43a24 !important;
    color: #fff !important;
    padding: 6px 18px;
    border-radius: 4px;
    font-weight: bold;
    transition: background 0.2s, transform 0.1s !important;
}

.nav-play-btn:hover {
    background: #d94a32 !important;
    transform: translateY(-1px);
}

/* --- Hero --- */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 60px;
}

.hero-content {
    max-width: 640px;
}

.hero-sprite {
    width: 72px;
    height: 72px;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 20px rgba(196, 58, 36, 0.4));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.hero-title {
    font-size: clamp(56px, 12vw, 110px);
    line-height: 0.9;
    letter-spacing: 4px;
    margin-bottom: 16px;
}

.title-claw {
    display: block;
    color: #c43a24;
    text-shadow:
        0 0 40px rgba(196, 58, 36, 0.5),
        0 0 80px rgba(196, 58, 36, 0.2),
        0 3px 0 #7a1a0e;
}

.title-world {
    display: block;
    color: #e8d5cc;
    text-shadow:
        0 0 30px rgba(232, 213, 204, 0.15),
        0 3px 0 #5a3a30;
}

.hero-tagline {
    font-size: clamp(11px, 2vw, 14px);
    color: #c43a24;
    letter-spacing: 8px;
    text-transform: uppercase;
    margin-bottom: 32px;
    opacity: 0.8;
}

.hero-desc {
    font-size: 14px;
    color: #8a7068;
    line-height: 1.9;
    margin-bottom: 40px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

/* Play button - big and bold */
.btn-play {
    display: inline-block;
    padding: 18px 48px;
    background: #c43a24;
    color: #fff;
    font-family: inherit;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 4px;
    text-decoration: none;
    border: 2px solid #c43a24;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.btn-play::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.btn-play:hover::before {
    left: 100%;
}

.btn-play:hover {
    background: #d94a32;
    border-color: #d94a32;
    transform: translateY(-2px);
    box-shadow:
        0 8px 30px rgba(196, 58, 36, 0.4),
        0 0 60px rgba(196, 58, 36, 0.15);
}

.btn-play:active {
    transform: translateY(0);
}

.btn-play-lg {
    padding: 22px 56px;
    font-size: 20px;
}

.hero-sub {
    margin-top: 16px;
    font-size: 11px;
    color: #5a3a30;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Scroll hint */
.hero-scroll {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #5a3a30;
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 32px;
    background: linear-gradient(180deg, #5a3a30, transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 1; height: 32px; }
    50% { opacity: 0.4; height: 20px; }
}

/* --- Sections --- */
.section {
    position: relative;
    z-index: 1;
    padding: 100px 24px;
}

.section-alt {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(196, 58, 36, 0.1);
    border-bottom: 1px solid rgba(196, 58, 36, 0.1);
}

.section-inner {
    max-width: 1050px;
    margin: 0 auto;
}

/* Section headers - retro terminal style */
.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-label {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #c43a24;
    border: 1px solid rgba(196, 58, 36, 0.4);
    padding: 4px 16px;
    margin-bottom: 16px;
    position: relative;
}

/* Terminal bracket decoration */
.section-label::before {
    content: '>';
    margin-right: 6px;
    opacity: 0.6;
}

.section-header h2 {
    font-size: clamp(28px, 5vw, 42px);
    color: #e8d5cc;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 0 30px rgba(196, 58, 36, 0.15);
}

.section-subtitle {
    margin-top: 12px;
    color: #8a7068;
    font-size: 13px;
    letter-spacing: 1px;
}

/* --- Story Cards --- */
.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.story-card {
    background: rgba(196, 58, 36, 0.04);
    border: 1px solid rgba(196, 58, 36, 0.15);
    padding: 32px 28px;
    position: relative;
    transition: border-color 0.2s;
}

.story-card:hover {
    border-color: rgba(196, 58, 36, 0.4);
}

/* Terminal-style top-left corner decoration */
.story-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 12px;
    height: 12px;
    border-top: 2px solid #c43a24;
    border-left: 2px solid #c43a24;
}

.story-num {
    font-size: 36px;
    font-weight: bold;
    color: rgba(196, 58, 36, 0.2);
    margin-bottom: 8px;
    line-height: 1;
}

.story-card h3 {
    color: #c43a24;
    font-size: 16px;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.story-card p {
    color: #8a7068;
    font-size: 13px;
    line-height: 1.8;
}

/* --- Features Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 28px 24px;
    position: relative;
    transition: border-color 0.2s;
}

.feature-card:hover {
    border-color: rgba(196, 58, 36, 0.3);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 8px;
    height: 8px;
    border-top: 2px solid rgba(196, 58, 36, 0.5);
    border-left: 2px solid rgba(196, 58, 36, 0.5);
}

.feature-card h3 {
    color: #c43a24;
    font-size: 14px;
    margin-bottom: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.feature-card p {
    color: #8a7068;
    font-size: 13px;
    line-height: 1.7;
}

/* --- Species Grid --- */
.species-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 20px;
}

.species-card {
    text-align: center;
    background: rgba(196, 58, 36, 0.04);
    border: 1px solid rgba(196, 58, 36, 0.12);
    padding: 28px 16px 24px;
    transition: transform 0.2s, border-color 0.2s;
    position: relative;
}

.species-card:hover {
    transform: translateY(-4px);
    border-color: rgba(196, 58, 36, 0.5);
}

.species-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 10px;
    height: 10px;
    border-top: 2px solid #c43a24;
    border-left: 2px solid #c43a24;
}

.species-card::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-bottom: 2px solid #c43a24;
    border-right: 2px solid #c43a24;
}

.species-sprite {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 8px rgba(196, 58, 36, 0.25));
    transition: transform 0.2s;
}

.species-card:hover .species-sprite {
    transform: scale(1.15);
}

.species-card h3 {
    color: #e8d5cc;
    font-size: 14px;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.species-card p {
    color: #8a7068;
    font-size: 11px;
    line-height: 1.7;
}

/* --- Guide Grid --- */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.guide-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 28px 24px;
    position: relative;
}

.guide-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 10px;
    height: 10px;
    border-top: 2px solid rgba(196, 58, 36, 0.5);
    border-left: 2px solid rgba(196, 58, 36, 0.5);
}

.guide-card h3 {
    color: #c43a24;
    font-size: 15px;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(196, 58, 36, 0.15);
    padding-bottom: 12px;
}

/* Steps */
.guide-steps {
    list-style: none;
    counter-reset: step;
}

.guide-steps li {
    counter-increment: step;
    position: relative;
    padding-left: 32px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #8a7068;
    line-height: 1.7;
}

.guide-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    background: rgba(196, 58, 36, 0.15);
    border: 1px solid rgba(196, 58, 36, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c43a24;
    font-size: 11px;
    font-weight: bold;
}

.guide-steps li strong,
.guide-tips li strong {
    color: #e8d5cc;
}

/* Controls */
.controls-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #8a7068;
}

.key-group {
    display: flex;
    gap: 4px;
    min-width: 120px;
}

kbd {
    display: inline-block;
    background: rgba(196, 58, 36, 0.1);
    border: 1px solid rgba(196, 58, 36, 0.3);
    border-bottom: 2px solid rgba(196, 58, 36, 0.4);
    padding: 3px 8px;
    font-family: inherit;
    font-size: 11px;
    color: #c43a24;
    font-weight: bold;
    min-width: 26px;
    text-align: center;
}

/* Tips */
.guide-tips {
    list-style: none;
}

.guide-tips li {
    position: relative;
    padding-left: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #8a7068;
    line-height: 1.7;
}

.guide-tips li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: #c43a24;
    font-weight: bold;
}

/* --- AI Block --- */
.ai-block {
    text-align: center;
    max-width: 650px;
    margin: 0 auto;
}

.ai-block > p {
    color: #8a7068;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 36px;
}

.ai-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.ai-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #8a7068;
}

.ai-step strong {
    color: #e8d5cc;
}

.ai-num {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(196, 58, 36, 0.12);
    border: 1px solid rgba(196, 58, 36, 0.35);
    color: #c43a24;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.ai-arrow {
    color: rgba(196, 58, 36, 0.3);
    font-size: 20px;
}

.btn-ai {
    display: inline-block;
    padding: 14px 32px;
    background: transparent;
    color: #c43a24;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    text-decoration: none;
    border: 1px solid rgba(196, 58, 36, 0.4);
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn-ai:hover {
    background: rgba(196, 58, 36, 0.1);
    border-color: #c43a24;
    transform: translateY(-2px);
}

.ai-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.btn-guide {
    display: inline-block;
    padding: 14px 32px;
    background: transparent;
    color: #e8d5cc;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
    text-decoration: none;
    border: 1px solid rgba(232, 213, 204, 0.3);
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn-guide:hover {
    background: rgba(232, 213, 204, 0.08);
    border-color: rgba(232, 213, 204, 0.6);
    transform: translateY(-2px);
}

/* --- CTA --- */
.section-cta {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 100px 24px;
    background: linear-gradient(180deg, transparent, rgba(196, 58, 36, 0.06));
    border-top: 1px solid rgba(196, 58, 36, 0.1);
}

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

.cta-sprites {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.cta-sprite {
    width: 48px;
    height: 48px;
    opacity: 0.6;
    filter: drop-shadow(0 0 8px rgba(196, 58, 36, 0.2));
}

.cta-sprite-main {
    width: 64px;
    height: 64px;
    opacity: 1;
    filter: drop-shadow(0 0 16px rgba(196, 58, 36, 0.35));
}

.section-cta h2 {
    font-size: clamp(22px, 4vw, 32px);
    color: #e8d5cc;
    letter-spacing: 2px;
    margin-bottom: 32px;
}

/* --- Footer --- */
.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(196, 58, 36, 0.1);
    padding: 24px;
}

.footer-inner {
    max-width: 1050px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c43a24;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 4px;
    opacity: 0.5;
}

.footer-sprite {
    width: 18px;
    height: 18px;
}

.footer-copy {
    color: #3a2820;
    font-size: 11px;
    letter-spacing: 1px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 100px 20px 60px;
    }

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

    .species-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

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

    .footer-inner {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .ai-flow {
        flex-direction: column;
    }

    .ai-arrow {
        transform: rotate(90deg);
    }

    .key-group {
        min-width: 100px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        letter-spacing: 2px;
    }

    .btn-play {
        width: 100%;
        text-align: center;
    }

    .btn-play-lg {
        padding: 18px 36px;
    }

    .species-sprite {
        width: 48px;
        height: 48px;
    }
}
