/* Scribble Chain Website - Main Styles */

/* Font Face Declaration */
@font-face {
    font-family: 'Schoolbell';
    src: url('../assets/fonts/Schoolbell-Regular.ttf') format('truetype');
    font-display: swap;
}

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Schoolbell', 'Comic Sans MS', cursive, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: 
        linear-gradient(135deg, rgba(232, 245, 232, 0.3), rgba(240, 248, 240, 0.3)),
        url('../assets/images/paper_texture.png');
    background-attachment: fixed, fixed;
    background-size: cover, 300px 300px;
    background-repeat: no-repeat, repeat;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Focus styles for accessibility - only for interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid #f4d03f;
    outline-offset: 2px;
}

/* Remove default focus outline for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Ensure no unwanted outlines on non-interactive elements */
div:focus,
span:focus,
p:focus,
h1:focus,
h2:focus,
h3:focus,
h4:focus,
h5:focus,
h6:focus,
img:focus {
    outline: none;
}

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #f4d03f;
    color: #2c3e50;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: rgba(244, 208, 63, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

/* Main Logo Section */
.main-logo {
    padding: 2rem 0 1rem 0;
    text-align: center;
    background: rgba(249, 249, 246, 0.9);
}

.centered-logo {
    height: 120px;
    width: auto;
    max-width: 100%;
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #1a252f;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    position: absolute;
    left: 0;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, rgba(244, 208, 63, 0.2), rgba(232, 245, 232, 0.3));
    border-radius: 20px;
    margin: 1rem 0 2rem 0;
    border: 2px solid rgba(44, 62, 80, 0.1);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: #555;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Download Buttons */
.download-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #f4d03f, #f1c40f);
    color: #2c3e50;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(244, 208, 63, 0.3);
    border: 2px solid rgba(44, 62, 80, 0.1);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 208, 63, 0.4);
    background: linear-gradient(135deg, #f1c40f, #e6b800);
}

.download-btn.android {
    background: linear-gradient(135deg, #a8d5ba, #7fb069);
    box-shadow: 0 4px 15px rgba(168, 213, 186, 0.3);
    color: #2c3e50;
}

.download-btn.android:hover {
    box-shadow: 0 6px 20px rgba(168, 213, 186, 0.4);
    background: linear-gradient(135deg, #7fb069, #6b9556);
}

/* Features Section */
.features {
    padding: 4rem 0;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature-card {
    background: rgba(249, 249, 246, 0.9);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    border: 2px solid rgba(44, 62, 80, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(244, 208, 63, 0.3);
    box-shadow: 0 8px 25px rgba(244, 208, 63, 0.2);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.feature-card p {
    color: #666;
    font-size: 1.1rem;
}

/* Screenshots Section */
.screenshots {
    padding: 4rem 0;
    text-align: center;
}

.screenshots h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.screenshot-gallery {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.screenshot {
    max-width: 300px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.screenshot:hover {
    transform: scale(1.05);
}

.screenshot img {
    width: 100%;
    height: auto;
    border-radius: 15px;
}

/* Footer */
footer {
    background: rgba(244, 208, 63, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    color: #2c3e50;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #1a252f;
}

/* Performance Optimizations - loading and decoding attributes are set in HTML */

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Reduce layout shift */
.screenshot {
    aspect-ratio: 1/2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Optimize animations for performance */
.feature-card,
.download-btn,
.screenshot {
    will-change: transform;
}

.feature-card:hover,
.download-btn:hover,
.screenshot:hover {
    will-change: auto;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 2rem;
}

/* Scroll to top button styles */
.scroll-to-top:hover {
    background: #f1c40f !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(244, 208, 63, 0.4) !important;
}

.scroll-to-top:focus {
    outline: 2px solid #f4d03f !important;
    outline-offset: 2px !important;
}