/* Main CSS for KopiNusa Coffee Website */

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

:root {
    --primary-color: #8B4513;
    --secondary-color: #D2691E;
    --accent-color: #A0522D;
    --light-color: #F5F5DC;
    --dark-color: #3E2723;
    --text-color: #333;
    --text-light: #666;
    --bg-light: #FFF8F0;
    --bg-card: white;
    --border-color: #ddd;
    --border-radius: 8px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
}

/* Dark mode */
[data-drkmode="true"] {
    --primary-color: #c4956a;
    --secondary-color: #e8a55c;
    --accent-color: #d4a574;
    --light-color: #2d2520;
    --dark-color: #e8e0d8;
    --text-color: #e8e0d8;
    --text-light: #b8a99a;
    --bg-light: #1a1512;
    --bg-card: #252019;
    --border-color: #3d3329;
}

[data-drkmode="true"] body {
    background-color: var(--bg-light);
}

[data-drkmode="true"] .navbar,
[data-drkmode="true"] .mobile-menu {
    background-color: var(--bg-card);
    border-color: var(--border-color);
}

[data-drkmode="true"] .feature-card,
[data-drkmode="true"] .product-card,
[data-drkmode="true"] .contact-section {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-drkmode="true"] .form-group input,
[data-drkmode="true"] .form-group textarea {
    background-color: var(--bg-light);
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-drkmode="true"] .product-image-placeholder {
    background-color: var(--light-color);
}

[data-drkmode="true"] .lang-switcher,
[data-drkmode="true"] .lang-btn {
    border-color: var(--border-color);
}

[data-drkmode="true"] .site-footer {
    background-color: #0f0d0b;
    border-top-color: var(--border-color);
}

[data-drkmode="true"] .article-card,
[data-drkmode="true"] .featured-article {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-drkmode="true"] .tool-card {
    background-color: var(--bg-card);
    border-color: var(--border-color);
}

[data-drkmode="true"] .hero-visual {
    background-color: var(--light-color);
}

[data-drkmode="true"] .cup-body {
    background: linear-gradient(180deg, var(--accent-color), var(--primary-color));
}

[data-drkmode="true"] .method-section,
[data-drkmode="true"] .guideline-card,
[data-drkmode="true"] .tip-card,
[data-drkmode="true"] .quiz-question,
[data-drkmode="true"] .brew-step,
[data-drkmode="true"] .guide-progress {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
}

[data-drkmode="true"] .method-btn {
    border-color: var(--border-color);
    color: var(--text-color);
}

[data-drkmode="true"] .method-btn.active {
    background-color: var(--primary-color);
    color: white;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-light);
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 1001;
    text-decoration: none;
    border-radius: var(--border-radius);
}

.skip-link:focus {
    top: 0;
}

/* Navigation */
.navbar {
    background-color: var(--bg-card);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

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

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

.nav-cta {
    background-color: var(--primary-color);
    color: white !important;
    padding: 8px 20px !important;
}

.nav-cta:hover {
    background-color: var(--accent-color) !important;
}

/* Dark Mode Toggle */
.drkmode-toggle {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 12px;
    cursor: pointer;
    margin-left: var(--spacing-xs);
    font-size: 1rem;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.drkmode-toggle:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.drkmode-toggle[aria-pressed="true"] {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Language Switcher */
.lang-switcher {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4px;
    display: flex;
    gap: 4px;
    cursor: pointer;
    margin-left: var(--spacing-xs);
}

.lang-option {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.875rem;
    font-weight: 500;
}

.lang-option[data-lang="en"] {
    background-color: var(--primary-color);
    color: white;
}

.lang-switcher:hover .lang-option[data-lang="en"] {
    background-color: var(--accent-color);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: var(--text-color);
    text-decoration: none;
    padding: 12px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.mobile-menu a:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.mobile-lang-switcher {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
}

.lang-btn {
    flex: 1;
    padding: 8px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.lang-btn:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg) var(--spacing-sm);
}

/* Hero Section */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xl) 0;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.hero-title {
    font-size: 3rem;
    color: var(--dark-color);
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-light);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.hero-cta {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 14px 32px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-cta:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.2);
}

.hero-cta-secondary {
    display: inline-block;
    background: none;
    color: var(--primary-color);
    padding: 14px 32px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
}

.hero-cta-secondary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Hero Visual - CSS Coffee Cup */
.hero-visual {
    background: linear-gradient(135deg, var(--light-color) 0%, var(--bg-light) 100%);
    border-radius: 16px;
    height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.coffee-cup-animation {
    position: relative;
    width: 200px;
    height: 280px;
}

.cup {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.cup-body {
    width: 120px;
    height: 140px;
    background: linear-gradient(180deg, #D2691E, #8B4513);
    border-radius: 0 0 40px 40px;
    position: relative;
    box-shadow: inset 0 -20px 40px rgba(0,0,0,0.2), 0 8px 20px rgba(0,0,0,0.15);
}

.cup-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(180deg, #654321, #8B4513);
    border-radius: 50%;
    transform: scaleX(1.1);
}

.cup-body::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 10px;
    right: 10px;
    height: 12px;
    background: linear-gradient(180deg, #3E2723, #5D3A1A);
    border-radius: 50%;
}

.cup-handle {
    position: absolute;
    right: -30px;
    top: 30px;
    width: 35px;
    height: 50px;
    border: 8px solid #8B4513;
    border-left: none;
    border-radius: 0 25px 25px 0;
}

/* Steam Animation */
.steam {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.steam-line {
    width: 4px;
    height: 40px;
    background: linear-gradient(to top, rgba(200,200,200,0.4), transparent);
    border-radius: 4px;
    animation: steam-rise 2s ease-in-out infinite;
}

.steam-1 { animation-delay: 0s; }
.steam-2 { animation-delay: 0.4s; }
.steam-3 { animation-delay: 0.8s; }

@keyframes steam-rise {
    0% {
        opacity: 0;
        transform: translateY(0) scaleX(1);
        height: 20px;
    }
    50% {
        opacity: 0.6;
        transform: translateY(-20px) scaleX(1.5);
        height: 35px;
    }
    100% {
        opacity: 0;
        transform: translateY(-50px) scaleX(2);
        height: 20px;
    }
}

/* Floating Beans */
.beans {
    position: absolute;
    width: 100%;
    height: 100%;
}

.bean {
    position: absolute;
    width: 18px;
    height: 24px;
    background: #5D3A1A;
    border-radius: 50%;
    animation: float-bean 4s ease-in-out infinite;
}

.bean::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 14px;
    background: #3E2723;
    border-radius: 1px;
}

.bean-1 { top: 60px; right: 20px; animation-delay: 0s; }
.bean-2 { top: 100px; left: 10px; animation-delay: 1.5s; width: 14px; height: 20px; }
.bean-3 { bottom: 60px; right: 40px; animation-delay: 3s; width: 16px; height: 22px; }

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

/* Features Section */
.features-section {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.feature-card {
    background: var(--bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

/* Tools Section */
.tools-section {
    margin-bottom: var(--spacing-xl);
    text-align: center;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--spacing-md);
}

.tool-card {
    background: var(--bg-card);
    padding: var(--spacing-lg);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
    text-align: left;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.tool-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.tool-card h3 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: var(--spacing-xs);
}

.tool-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    flex: 1;
}

.tool-cta {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: var(--spacing-sm);
    transition: gap 0.2s ease;
}

.tool-card:hover .tool-cta {
    text-decoration: underline;
}

/* Shop Section */
.shop-section {
    margin-bottom: var(--spacing-xl);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.product-card {
    background: var(--bg-card);
    padding: var(--spacing-md);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-image-placeholder {
    background: linear-gradient(135deg, var(--light-color), #e8d5c0);
    height: 200px;
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: var(--spacing-sm);
    position: relative;
}

.product-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
}

.product-origin {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Contact Section */
.contact-section {
    background: var(--bg-card);
    padding: var(--spacing-xl);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
}

.contact-subtitle {
    max-width: 500px;
    margin: 0 auto var(--spacing-lg);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group label {
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background-color: var(--bg-light);
    color: var(--text-color);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.contact-form button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.contact-form button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Footer */
.site-footer {
    background-color: var(--dark-color);
    color: white;
    padding: var(--spacing-xl) 0 0;
    margin-top: var(--spacing-xl);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: var(--spacing-md);
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-tagline {
    color: rgba(255,255,255,0.8);
    margin-bottom: var(--spacing-xs);
}

.footer-address {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.social-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.social-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding: var(--spacing-md);
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-section {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-cta,
    .hero-cta-secondary {
        text-align: center;
    }

    .hero-visual {
        height: 260px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    main {
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .contact-section {
        padding: var(--spacing-md);
    }

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

@media (max-width: 480px) {
    .features-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        height: 220px;
    }

    .coffee-cup-animation {
        transform: scale(0.8);
    }
}

/* Accessibility Focus Styles */
:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .mobile-menu,
    .hero-cta,
    .hero-cta-secondary,
    .product-btn,
    .contact-form button,
    .footer-bottom,
    .tools-section {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}
