/*
 * © 2025 Dr Michael Guo. All rights reserved.
*/

/* 
   Main stylesheet for Double Entry Accounting Game
   Apple-inspired design with clean, minimalist aesthetics
*/

/* Base reset and font setup */
:root {
    --primary-color: #0071e3;
    --secondary-color: #86868b;
    --dark-color: #1d1d1f;
    --light-color: #f5f5f7;
    --success-color: #34c759;
    --background-color: #ffffff;
    --card-background: #f8f8fa;
    --hover-effect: rgba(0, 0, 0, 0.05);
    --transition-speed: 0.3s;
    --border-radius: 12px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 62.5%; /* 10px for easier rem calculations */
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--dark-color);
    line-height: 1.5;
    background-color: var(--background-color);
    font-size: 1.6rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 5.2rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 4.0rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 2.8rem;
}

h4 {
    font-size: 2.2rem;
}

p {
    margin-bottom: 1.5rem;
    font-weight: 400;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all var(--transition-speed) ease;
}

a:hover {
    opacity: 0.8;
}

ul {
    list-style: none;
}

/* Header and Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.6rem 2.4rem;
}

.logo a {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--dark-color);
    letter-spacing: -0.01em;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 3.0rem;
}

.nav-links li a {
    color: var(--dark-color);
    font-size: 1.6rem;
    font-weight: 500;
    padding: 0.8rem 0;
}

.nav-links li a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #667eea 50%, #764ba2 75%, #667eea 100%);
    background-size: 400% 400%;
    padding: 0 2.4rem;
    position: relative;
    overflow: hidden;
    animation: gradientShift 20s ease infinite;
}

/* Animated mesh gradient background */
.hero-section::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 60% 60%, rgba(0, 113, 227, 0.2) 0%, transparent 45%),
        radial-gradient(circle at 40% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 35%);
    animation: meshFloat 25s ease-in-out infinite;
    pointer-events: none;
}

/* Floating geometric shapes */
.hero-section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(255, 255, 255, 0.05) 50%, transparent 70%);
    background-size: 120px 120px;
    animation: geometricDance 30s linear infinite;
    pointer-events: none;
    opacity: 0.6;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes meshFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(-30px, -20px) rotate(90deg) scale(1.1);
    }
    50% {
        transform: translate(20px, -30px) rotate(180deg) scale(0.9);
    }
    75% {
        transform: translate(-15px, 25px) rotate(270deg) scale(1.05);
    }
}

@keyframes geometricDance {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(-30px, -30px) rotate(90deg);
    }
    50% {
        transform: translate(30px, -30px) rotate(180deg);
    }
    75% {
        transform: translate(30px, 30px) rotate(270deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(2px);
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 4rem 3rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    transform: translateY(0);
    animation: contentFloat 8s ease-in-out infinite;
}

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

.hero-content h1 {
    margin-bottom: 2rem;
    color: white;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: titleGlow 4s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% {
        text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 255, 255, 0.1);
    }
    100% {
        text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 255, 255, 0.2);
    }
}

.hero-content p {
    font-size: 2.2rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 3.2rem;
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cta-button {
    background-color: var(--primary-color);
    color: white;
    padding: 1.6rem 3.2rem;
    border-radius: 9999px;
    font-size: 1.8rem;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    display: inline-block;
}

.cta-button:hover {
    transform: scale(1.05);
    opacity: 1;
    box-shadow: 0 6px 12px rgba(0, 113, 227, 0.2);
}

/* Section Styling */
section {
    padding: 10rem 2.4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 6rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section-header p {
    font-size: 2.2rem;
    color: var(--secondary-color);
}

/* Games Section */
.games-section {
    background-color: var(--light-color);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3.2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Game card styles moved to game-cards.css 
   This helps maintain better organization of styles for the Apple-inspired design
*/

.game-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 2.4rem;
    border-radius: 9999px;
    font-size: 1.6rem;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    display: inline-block;
}

.game-button:hover {
    transform: scale(1.05);
    opacity: 1;
}

/* Learn Section */
.learn-section {
    background-color: var(--background-color);
}

.learn-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4.8rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.learn-icon {
    width: 80px;
    height: 80px;
    background-color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2.4rem;
}

.learn-icon img {
    width: 40px;
    height: 40px;
}

.learn-item {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2rem;
    border-radius: var(--border-radius);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.learn-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    background-color: var(--card-background);
}

.learn-item h3 {
    font-size: 2.4rem;
    margin-bottom: 1.6rem;
}

.learn-item p {
    color: var(--secondary-color);
    font-size: 1.6rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.learn-item .game-button {
    align-self: center;
    margin-top: auto;
}

/* About Section */
.about-section {
    background-color: var(--light-color);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.8rem;
}

/* Footer */
footer {
    background-color: #f5f5f5;
    padding: 1rem;
    text-align: center;
    margin-top: 2rem;
    border-top: 1px solid #eee;
}

footer p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4.8rem;
}

.footer-logo a {
    font-size: 2.4rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.01em;
}

.footer-links h4, .footer-contact h4 {
    color: var(--light-color);
    margin-bottom: 2.4rem;
}

.footer-links ul li {
    margin-bottom: 1.2rem;
}

.footer-links ul li a {
    color: var(--secondary-color);
    font-size: 1.6rem;
}

.footer-links ul li a:hover {
    color: white;
}

.footer-contact p {
    color: var(--secondary-color);
    margin-bottom: 1.6rem;
}

.social-links {
    display: flex;
    gap: 1.6rem;
}

.social-icon {
    color: var(--secondary-color);
}

.social-icon:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 6.4rem auto 0;
    padding-top: 2.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    color: var(--secondary-color);
    font-size: 1.4rem;
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    html {
        font-size: 56.25%; /* 9px */
    }

    h1 {
        font-size: 4.2rem;
    }

    h2 {
        font-size: 3.2rem;
    }

    .hero-content p {
        font-size: 1.8rem;
    }

    section {
        padding: 8rem 2.4rem;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 50%; /* 8px */
    }

    nav {
        padding: 1.2rem 1.6rem;
    }

    .logo a {
        font-size: 2rem;
    }

    .nav-links {
        gap: 2rem;
    }

    .nav-links li a {
        font-size: 1.4rem;
    }

    .games-grid, .learn-content, .footer-content {
        grid-template-columns: 1fr;
        gap: 3.2rem;
    }

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

    .social-links {
        justify-content: center;
    }
}
