:root {
    --bg-color: #0a0a0a;
    --text-color: #e0e0e0;
    --accent-gold: #D4AF37;
    --accent-gold-dim: #8a7020;
    --surface-dark: #141414;
    --surface-light: #1f1f1f;
    --font-serif: 'Zen Old Mincho', 'Cormorant Garamond', serif;
    --font-sans: 'Lato', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-serif);
    line-height: 1.8;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-weight: 400;
    letter-spacing: 0.05em;
}

p {
    margin-bottom: 1.5rem;
    color: #b0b0b0;
    font-size: 1.05rem;
    text-align: justify;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Utility */
.text-gold {
    color: var(--accent-gold);
}

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

.uppercase {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-family: var(--font-sans);
    font-size: 0.8rem;
}

.section-padding {
    padding: 8rem 0;
}

/* Hero Section */
header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url('../assets/hero_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-subtitle {
    font-family: var(--font-sans);
    color: #ebd37d;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.5s;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.6), 0 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.2;
    margin-bottom: 2rem;
    text-align: center;
    opacity: 0;
    animation: fadeUp 1s ease forwards 0.8s;
    color: #ffffff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 0, 0, 0.2);
}

.hero-desc {
    max-width: 600px;
    text-align: center;
    font-size: 1.1rem;
    opacity: 0;
    animation: fadeUp 1s ease forwards 1.1s;
    color: #ffffff;
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.scroll-down {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.6;
    animation: pulse 2s infinite;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent-gold), transparent);
    margin-top: 10px;
}

/* Navigation */
nav {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-links {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-gold);
}

/* Content Sections */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    padding-bottom: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: var(--accent-gold);
}

/* Chapter 1: Terms */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.term-card {
    background: var(--surface-dark);
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.term-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--accent-gold-dim);
}

.term-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--accent-gold);
}

.keyword-list dt {
    font-weight: bold;
    color: #fff;
    margin-top: 1rem;
}

.keyword-list dd {
    margin-left: 0;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: #999;
}

.killer-phrase {
    margin-top: 2rem;
    padding: 1.5rem;
    border-left: 3px solid var(--accent-gold);
    background: rgba(212, 175, 55, 0.05);
    font-style: italic;
    color: #fff;
    font-family: var(--font-serif);
}

.killer-phrase span {
    display: block;
    font-size: 0.8rem;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
    font-family: var(--font-sans);
    text-transform: uppercase;
}

/* Chapter 2: Process */
.process-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.process-row {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.process-row:nth-child(even) {
    flex-direction: row-reverse;
}

.process-image-placeholder {
    flex: 1;
    height: 300px;
    background: linear-gradient(45deg, var(--surface-light), var(--surface-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.process-image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-size: cover;
}

/* Abstract visual representations via CSS gradients */
.img-washed {
    background-image: url('../assets/process_washed.png');
    background-size: cover;
    background-position: center;
}

.img-natural {
    background-image: url('../assets/process_natural.png');
    background-size: cover;
    background-position: center;
}

.process-content {
    flex: 1;
}

.process-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.wine-metaphor {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    color: #ddd;
}

/* Chapter 3: Roast */
.roast-scale {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    position: relative;
}

.roast-scale::before {
    content: '';
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, #d4a373, #6f4e37, #3e2723);
    z-index: 0;
}

.roast-point {
    position: relative;
    z-index: 1;
    width: 30%;
    text-align: center;
    background: var(--bg-color);
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.roast-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    border: 2px solid var(--accent-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.roast-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

.bg-light {
    background-image: url('../assets/roast_light.png');
}

.bg-medium {
    background-image: url('../assets/roast_medium.png');
}

.bg-dark {
    background-image: url('../assets/roast_dark.png');
}

/* Chapter 4: Order */
.tips-list {
    list-style: none;
    counter-reset: tip-counter;
}

.tips-list li {
    position: relative;
    padding-left: 4rem;
    margin-bottom: 2.5rem;
}

.tips-list li::before {
    counter-increment: tip-counter;
    content: "0" counter(tip-counter);
    position: absolute;
    left: 0;
    top: 0;
    font-size: 2.5rem;
    font-family: var(--font-serif);
    color: var(--accent-gold);
    opacity: 0.3;
    line-height: 1;
}

.dialogue-box {
    background: var(--surface-light);
    padding: 1.5rem;
    border-radius: 4px;
    border-left: 2px solid var(--accent-gold);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: #fff;
    margin-top: 1rem;
}

/* Trivia Section */
.trivia-box {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    padding: 3rem;
    border: 1px solid var(--accent-gold);
    margin-bottom: 2rem;
}

.trivia-title {
    color: var(--accent-gold);
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 5rem 2rem;
    background: #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-message {
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 2rem;
    color: #fff;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.3;
        height: 40px;
    }

    50% {
        opacity: 1;
        height: 60px;
    }

    100% {
        opacity: 0.3;
        height: 40px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .grid-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .process-row,
    .process-row:nth-child(even) {
        flex-direction: column;
        text-align: left;
        gap: 1rem;
    }

    .roast-scale {
        flex-direction: column;
        gap: 2rem;
    }

    .roast-scale::before {
        display: none;
    }

    .roast-point {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 2rem;
    }

    .nav-links {
        display: none;
    }

    /* Hide nav on mobile for simplicity */
}
