/*
 * CrazyRat - Simple, Clean CSS
 * Mobile-first responsive design
 */

/* CSS Variables for easy customization */
:root {
    --blur-amount: 8px;
    --background-overlay: rgba(0, 0, 0, 0.4);
    --transition-duration: 1s;
    --transition-delay-step: 0.15s;
}

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

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

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 200;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    background-color: #000;
    min-height: 100vh;
    min-width: 320px;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    position: relative;
    z-index: 0;
}

/* Background with blur effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://crazyrat.ninja/img/crazyrat-bg.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    filter: blur(var(--blur-amount));
    transform: scale(1.1); /* Prevents blur edge artifacts */
    z-index: -2;
}

/* Dark overlay for better text readability */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background-overlay);
    z-index: -1;
}

/* Typography */
h1, h2, h3 {
    font-weight: 200;
    line-height: 1.3;
    color: #fff;
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -0.05rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.7);
}

strong {
    font-weight: 600;
    color: inherit;
}

a {
    color: inherit;
    text-decoration: underline;
    transition: opacity 0.25s ease;
}

a:hover {
    opacity: 0.8;
}

/* Layout */
.wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    position: relative;
    z-index: 1;
}

.main {
    width: 100%;
    max-width: 600px;
    text-align: center;
    transition: opacity var(--transition-duration) ease,
                transform var(--transition-duration) ease;
}

.inner {
    padding: 1.5rem 1rem;
}

/* Loading Animation */
body.is-loading .main {
    opacity: 0;
    transform: scale(0.95);
}

body.is-loading .inner > * {
    opacity: 0;
}

.inner > * {
    transition: opacity var(--transition-duration) ease;
}

/* Staggered animation delays for children */
.inner > *:nth-child(1) { transition-delay: calc(var(--transition-delay-step) * 1); }
.inner > *:nth-child(2) { transition-delay: calc(var(--transition-delay-step) * 2); }
.inner > *:nth-child(3) { transition-delay: calc(var(--transition-delay-step) * 3); }
.inner > *:nth-child(4) { transition-delay: calc(var(--transition-delay-step) * 4); }
.inner > *:nth-child(5) { transition-delay: calc(var(--transition-delay-step) * 5); }
.inner > *:nth-child(6) { transition-delay: calc(var(--transition-delay-step) * 6); }
.inner > *:nth-child(7) { transition-delay: calc(var(--transition-delay-step) * 7); }
.inner > *:nth-child(8) { transition-delay: calc(var(--transition-delay-step) * 8); }
.inner > *:nth-child(9) { transition-delay: calc(var(--transition-delay-step) * 9); }
.inner > *:nth-child(10) { transition-delay: calc(var(--transition-delay-step) * 10); }
.inner > *:nth-child(11) { transition-delay: calc(var(--transition-delay-step) * 11); }
.inner > *:nth-child(12) { transition-delay: calc(var(--transition-delay-step) * 12); }

/* Divider */
.divider {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 1.5rem 0;
}

/* Navigation Icons */
.nav-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    text-decoration: none;
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.nav-icons a:hover {
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-icons svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke: rgba(255, 255, 255, 0.7);
    fill: none;
    transition: stroke 0.25s ease;
}

.nav-icons a:hover svg {
    stroke: #fff;
}

/* Social Icons */
.social-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    text-decoration: none;
    transition: border-color 0.25s ease, background-color 0.25s ease;
}

.social-icons a:hover {
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.social-icons svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: rgba(255, 255, 255, 0.7);
    transition: fill 0.25s ease;
}

.social-icons a:hover svg {
    fill: #fff;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Tagline */
.tagline {
    font-size: 1.25rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.tagline strong {
    color: rgba(255, 255, 255, 0.9);
}

/* Quote */
.quote {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* Services */
.service-list {
    text-align: center;
}

.service-item {
    margin: 2rem 0;
}

.service-item h3 {
    background: #fff;
    color: #000;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    font-size: 1rem;
}

.service-item p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 400;
}

/* About section */
.about-text {
    text-align: left;
}

.about-text p {
    margin-bottom: 1.25rem;
    font-weight: 400;
}

/* Footer */
.footer {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive - Tablet and up */
@media (min-width: 768px) {
    html {
        font-size: 18px;
    }

    .inner {
        padding: 2rem 1.5rem;
    }

    h1 {
        font-size: 3rem;
    }

    .nav-icons a,
    .social-icons a {
        width: 3.5rem;
        height: 3.5rem;
    }

    .nav-icons svg,
    .social-icons svg {
        width: 1.75rem;
        height: 1.75rem;
    }
}

/* Responsive - Desktop */
@media (min-width: 1024px) {
    .main {
        max-width: 700px;
    }
}

/* Noscript fallback - show content immediately */
noscript + .wrapper .main,
noscript + .wrapper .inner > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

/* Print styles */
@media print {
    body::before,
    body::after {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
    }

    .nav-icons,
    .social-icons {
        display: none;
    }
}
