/* ===== CSS Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --brown-dark: #3e2723;
    --brown-medium: #5d4037;
    --brown-light: #8d6e63;
    --brown-lighter: #a1887f;
    --cream: #fdf6ec;
    --cream-dark: #f5e6ca;
    --gold: #d4a056;
    --gold-light: #f0c97e;
    --white: #ffffff;
    --text-dark: #2c1810;
    --text-medium: #5a3e2b;
    --text-light: #8b7355;
    --shadow: 0 4px 20px rgba(62, 39, 35, 0.15);
    --shadow-hover: 0 8px 30px rgba(62, 39, 35, 0.25);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--text-dark);
    background-color: var(--cream);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--brown-dark);
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    margin: 15px auto 0;
    border-radius: 2px;
}

/* ===== Button ===== */
.btn {
    display: inline-block;
    padding: 14px 36px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Lato', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--brown-dark);
    box-shadow: 0 4px 15px rgba(212, 160, 86, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212, 160, 86, 0.6);
}

/* ===== Navbar ===== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

#navbar.scrolled {
    background: rgba(62, 39, 35, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--white);
}

.logo span {
    color: var(--gold-light);
}

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-light);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--gold-light);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #1a0e0a 0%, #3e2723 40%, #5d4037 70%, #4e342e 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(212, 160, 86, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(161, 136, 127, 0.06) 0%, transparent 40%);
    animation: heroFloat 20s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(2%, -2%) rotate(1deg); }
    66% { transform: translate(-1%, 1%) rotate(-0.5deg); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.hero-title {
    font-size: 4rem;
    color: var(--white);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.3s forwards;
}

.hero-title span {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto 40px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.6s forwards;
}

.hero .btn {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.9s forwards;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 2;
    opacity: 0;
    animation: fadeInUp 1s ease 1.2s forwards;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 15px;
    margin: 0 auto 8px;
    position: relative;
}

.mouse::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--gold-light);
    border-radius: 2px;
    animation: scrollAnim 2s ease-in-out infinite;
}

@keyframes scrollAnim {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 22px; }
}

.scroll-indicator p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ===== About ===== */
.about {
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.about-card {
    text-align: center;
    padding: 40px 30px;
    border-radius: 16px;
    background: var(--cream);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(40px);
}

.about-card.animated {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

.about-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.about-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.about-card h3 {
    font-size: 1.4rem;
    color: var(--brown-dark);
    margin-bottom: 15px;
}

.about-card p {
    color: var(--text-medium);
    font-size: 0.95rem;
}

/* ===== Fun Facts ===== */
.fun-facts {
    background: linear-gradient(135deg, var(--brown-dark), var(--brown-medium));
    padding: 60px 0;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.fact-item {
    padding: 20px;
}

.fact-number {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--gold-light);
    display: block;
    margin-bottom: 5px;
}

.fact-item p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===== Types ===== */
.types-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.type-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(40px);
}

.type-card.animated {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

.type-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.type-image {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.type-emoji {
    font-size: 4rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.type-content {
    padding: 25px;
}

.type-content h3 {
    font-size: 1.4rem;
    color: var(--brown-dark);
    margin-bottom: 12px;
}

.cacao-bar {
    height: 8px;
    background: var(--cream-dark);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.cacao-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brown-dark), var(--brown-light));
    border-radius: 4px;
    width: 0;
    transition: width 1.5s ease;
}

.cacao-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.type-content p:last-child {
    color: var(--text-medium);
    font-size: 0.9rem;
}

/* ===== Process Timeline ===== */
.process {
    background: var(--white);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 60px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--gold), var(--brown-light));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    opacity: 0;
    transform: translateX(-30px);
}

.timeline-item.animated {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.6s ease;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -48px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--brown-dark);
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(212, 160, 86, 0.4);
}

.timeline-content {
    background: var(--cream);
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.timeline-content h3 {
    font-size: 1.3rem;
    color: var(--brown-dark);
    margin-bottom: 10px;
}

.timeline-content p {
    color: var(--text-medium);
    font-size: 0.95rem;
}

/* ===== Recipes ===== */
.recipe-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 12px 30px;
    border: 2px solid var(--brown-light);
    border-radius: 50px;
    background: transparent;
    color: var(--brown-medium);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Lato', sans-serif;
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--brown-dark);
    border-color: var(--brown-dark);
    color: var(--white);
}

.recipe-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.recipe-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.recipe-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    background: var(--white);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow);
}

.recipe-info h3 {
    font-size: 1.6rem;
    color: var(--brown-dark);
    margin-bottom: 10px;
}

.recipe-meta {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.recipe-info h4 {
    font-size: 1.1rem;
    color: var(--brown-medium);
    margin-bottom: 12px;
    margin-top: 20px;
}

.recipe-info ul,
.recipe-info ol {
    padding-left: 20px;
    list-style: disc;
    margin-bottom: 10px;
}

.recipe-info ol {
    list-style: decimal;
}

.recipe-info li {
    color: var(--text-medium);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.recipe-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-placeholder {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, var(--brown-dark), var(--brown-medium));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    text-align: center;
    color: var(--cream);
    line-height: 1.4;
}

/* ===== Contact ===== */
.contact {
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info {
    opacity: 0;
    transform: translateY(40px);
}

.contact-info.animated {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

.contact-info h3 {
    font-size: 1.8rem;
    color: var(--brown-dark);
    margin-bottom: 15px;
}

.contact-info > p {
    color: var(--text-medium);
    margin-bottom: 30px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-medium);
}

.contact-icon {
    font-size: 1.4rem;
}

.contact-form {
    opacity: 0;
    transform: translateY(40px);
}

.contact-form.animated {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease 0.2s;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid var(--cream-dark);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Lato', sans-serif;
    color: var(--text-dark);
    background: var(--cream);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 160, 86, 0.15);
}

.form-group textarea {
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--brown-dark);
    color: var(--white);
    padding: 16px 30px;
    border-radius: 10px;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: transform 0.4s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* ===== Footer ===== */
.footer {
    background: var(--brown-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: 12px;
}

.footer-brand p {
    font-size: 0.9rem;
    max-width: 300px;
}

.footer-links h4 {
    color: var(--gold-light);
    font-size: 1rem;
    margin-bottom: 15px;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--gold-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

/* ===== Back to Top ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--brown-dark);
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(212, 160, 86, 0.4);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(212, 160, 86, 0.6);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .about-grid .about-card:last-child {
        grid-column: 1 / -1;
        max-width: 400px;
        margin: 0 auto;
    }
    .facts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.6rem; }
    .hero-subtitle { font-size: 1rem; }
    .section-title { font-size: 2rem; }
    .section { padding: 70px 0; }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--brown-dark);
        flex-direction: column;
        padding: 80px 30px 30px;
        gap: 25px;
        transition: right 0.3s ease;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    }

    .nav-links.open {
        right: 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-grid .about-card:last-child {
        max-width: none;
    }

    .types-grid {
        grid-template-columns: 1fr;
    }

    .recipe-grid {
        grid-template-columns: 1fr;
    }

    .recipe-visual {
        order: -1;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand p {
        max-width: none;
    }

    .facts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .fact-number {
        font-size: 2.2rem;
    }

    .timeline {
        padding-left: 50px;
    }

    .timeline::before {
        left: 18px;
    }

    .timeline-marker {
        left: -42px;
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2rem; }
    .section { padding: 50px 0; }
    .recipe-tabs { flex-wrap: wrap; }
    .tab-btn { padding: 10px 20px; font-size: 0.85rem; }
    .recipe-grid { padding: 25px; }
}
