/* Cafe Project - Main Stylesheet */
/* Pure CSS, no frameworks */

/* CSS Variables for theming */
:root {
    --primary: #6F4E37;
    --primary-dark: #5a3f2d;
    --secondary: #D4A574;
    --accent: #C4A77D;
    --bg: #FFF8F0;
    --surface: #FFFFFF;
    --text: #2C1810;
    --text-light: #6B5B4F;
    --border: #E8D5C4;
    --shadow: rgba(44, 24, 16, 0.1);
    --success: #4CAF50;
    --error: #E74C3C;
    --warning: #F39C12;
    --transition: all 0.3s ease;
    --radius: 12px;
    --radius-lg: 20px;
}

[data-theme="dark"] {
    --primary: #D4A574;
    --primary-dark: #C4A77D;
    --secondary: #6F4E37;
    --accent: #8B6914;
    --bg: #1a1410;
    --surface: #2C1810;
    --text: #FFF8F0;
    --text-light: #D4A574;
    --border: #3d2b1f;
    --shadow: rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden;
}

/* Scroll animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 248, 240, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

[data-theme="dark"] .header {
    background: rgba(26, 20, 16, 0.95);
}

.header.scrolled {
    box-shadow: 0 4px 20px var(--shadow);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo svg {
    width: 36px;
    height: 36px;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}

.nav a.active {
    color: var(--primary);
    font-weight: 700;
}

.theme-toggle {
    background: none;
    border: 2px solid var(--primary);
    color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--primary);
    color: var(--bg);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 2rem 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--bg) 0%, var(--surface) 50%, var(--bg) 100%);
    z-index: -2;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236F4E37' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 50px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero h1 span {
    color: var(--primary);
    position: relative;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(111, 78, 55, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(111, 78, 55, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

/* Floating coffee cup animation */
.coffee-float {
    position: absolute;
    width: 80px;
    height: 80px;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.coffee-float:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.coffee-float:nth-child(2) { top: 20%; right: 15%; animation-delay: 2s; }
.coffee-float:nth-child(3) { bottom: 20%; left: 20%; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* Section styles */
.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.8;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

/* Slideshow */
.slideshow-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 20px 40px var(--shadow);
    aspect-ratio: 4/3;
}

.slideshow-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.slideshow-slide.active {
    opacity: 1;
}

.slideshow-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slideshow-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: white;
    width: 30px;
    border-radius: 5px;
}

/* Menu Preview */
.menu-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.category-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px var(--shadow);
}

.category-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.category-info {
    padding: 1.5rem;
}

.category-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.category-info p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Fortune Button */
.fortune-section {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--radius-lg);
    margin: 2rem auto;
    max-width: 800px;
    position: relative;
    overflow: hidden;
}

.fortune-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.3;
}

.fortune-btn {
    background: white;
    color: var(--primary);
    border: none;
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.fortune-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.fortune-result {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius);
    backdrop-filter: blur(10px);
    display: none;
    animation: fadeIn 0.5s ease;
}

.fortune-result.show {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

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

.footer-brand h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-links h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-links a {
    display: block;
    color: var(--text-light);
    text-decoration: none;
    padding: 0.3rem 0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-right: 0.5rem;
}

.footer-bottom {
    max-width: 1200px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Install PWA Button */
.install-pwa {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    z-index: 999;
    animation: slideUp 0.5s ease;
}

.install-pwa.show {
    display: flex;
}

@keyframes slideUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        gap: 0;
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav a {
        padding: 1rem;
        border-bottom: 1px solid var(--border);
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 100px;
    left: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    color: white;
    font-weight: 500;
    animation: slideInLeft 0.3s ease;
    max-width: 350px;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
.toast.warning { background: var(--warning); }

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
