/* Roast Levels - Coffee Roast Comparison Site */

:root {
    /* Roast Color Palette */
    --light-roast: #c4a76c;
    --medium-light: #a67c52;
    --medium-roast: #8b5a3c;
    --medium-dark: #5c3d2e;
    --dark-roast: #2d1810;

    /* UI Colors */
    --bg-primary: #faf8f5;
    --bg-secondary: #f5f0e8;
    --bg-dark: #1a1412;
    --text-primary: #2d1810;
    --text-secondary: #5c3d2e;
    --text-light: #faf8f5;
    --accent: #c4713e;
    --accent-hover: #a85d32;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Typography */
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-heading: Georgia, 'Times New Roman', serif;

    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

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

p {
    margin-bottom: var(--space-md);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

main {
    flex: 1;
}

/* Header */
.site-header {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: var(--space-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo:hover {
    color: var(--light-roast);
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.main-nav a {
    color: var(--text-light);
    font-size: 0.9rem;
    padding: var(--space-sm) 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--light-roast);
    border-bottom-color: var(--light-roast);
}

/* Mobile Nav */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .main-nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .main-nav.open {
        max-height: 500px;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: var(--space-md) 0;
    }

    .main-nav li {
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .main-nav a {
        display: block;
        padding: var(--space-md) 0;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--dark-roast) 0%, var(--medium-dark) 50%, var(--medium-roast) 100%);
    color: var(--text-light);
    padding: var(--space-3xl) 0;
    text-align: center;
}

.hero h1 {
    color: var(--text-light);
    font-size: 3rem;
    margin-bottom: var(--space-lg);
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

/* Roast Spectrum */
.roast-spectrum {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    margin: var(--space-xl) 0;
    padding: var(--space-md);
}

.roast-spectrum-bar {
    width: 60px;
    height: 80px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: var(--space-sm);
    transition: transform 0.2s ease;
    text-decoration: none;
}

.roast-spectrum-bar:hover {
    transform: translateY(-5px);
}

.roast-spectrum-bar span {
    font-size: 0.7rem;
    color: var(--text-light);
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    text-align: center;
}

.roast-spectrum-bar.light { background: var(--light-roast); }
.roast-spectrum-bar.medium-light { background: var(--medium-light); }
.roast-spectrum-bar.medium { background: var(--medium-roast); }
.roast-spectrum-bar.medium-dark { background: var(--medium-dark); }
.roast-spectrum-bar.dark { background: var(--dark-roast); }

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin: var(--space-xl) 0;
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.comparison-table th,
.comparison-table td {
    padding: var(--space-md) var(--space-lg);
    text-align: left;
    border-bottom: 1px solid var(--bg-secondary);
}

.comparison-table th {
    background: var(--bg-dark);
    color: var(--text-light);
    font-weight: 600;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover td {
    background: var(--bg-secondary);
}

/* Roast Badge */
.roast-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
}

.roast-badge.light { background: var(--light-roast); }
.roast-badge.medium-light { background: var(--medium-light); }
.roast-badge.medium { background: var(--medium-roast); }
.roast-badge.medium-dark { background: var(--medium-dark); }
.roast-badge.dark { background: var(--dark-roast); }

/* Progress Bars */
.progress-bar {
    height: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

/* Flavor Profile */
.flavor-profile {
    display: grid;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
}

.flavor-item {
    display: grid;
    grid-template-columns: 100px 1fr 40px;
    align-items: center;
    gap: var(--space-md);
}

.flavor-item label {
    font-weight: 500;
    color: var(--text-secondary);
}

.flavor-item .value {
    font-weight: 600;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 1rem;
}

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

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

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

.btn-outline:hover {
    background: var(--accent);
    color: white;
}

/* Sections */
.section {
    padding: var(--space-3xl) 0;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-title h2 {
    margin-bottom: var(--space-sm);
}

.section-title p {
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card-body {
    padding: var(--space-lg);
}

.product-card h4 {
    margin-bottom: var(--space-sm);
}

.product-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
}

.amazon-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: #ff9900;
    color: #111;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
}

.amazon-btn:hover {
    background: #e68a00;
    color: #111;
}

/* Brewing Guide Card */
.brew-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
}

.brew-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.brew-card h3 {
    margin-bottom: var(--space-sm);
}

.brew-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Footer */
.site-footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: var(--space-2xl) 0;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-2xl);
    margin-bottom: var(--space-xl);
}

.footer-section h4 {
    color: var(--light-roast);
    margin-bottom: var(--space-md);
    font-size: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: var(--space-sm);
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: var(--light-roast);
}

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

.footer-bottom a {
    color: rgba(255,255,255,0.8);
}

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

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Responsive Typography */
@media (max-width: 768px) {
    html { font-size: 15px; }
    h1 { font-size: 2rem; }
    .hero h1 { font-size: 2.25rem; }
    .hero p { font-size: 1.1rem; }

    .roast-spectrum-bar {
        width: 45px;
        height: 60px;
    }

    .roast-spectrum-bar span {
        font-size: 0.6rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

    .section {
        padding: var(--space-2xl) 0;
    }

    .comparison-table th,
    .comparison-table td {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.9rem;
    }
}
