@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

:root {
    --espresso: #2C1E16;      /* Dark text, rich backgrounds */
    --crema: #F9F6F0;         /* Off-white background */
    --latte: #E8DCCB;         /* Secondary background, cards */
    --roast: #6A3E2A;         /* Primary brand color, buttons, accents */
    --gold: #D4A373;          /* Warm highlights, borders, hover states */
    --sage: #7B8B6F;          /* Subtle natural accent */
    --text-main: #3A2F2B;
    --text-muted: #5C4E47;
    
    --font-heading: 'Fraunces', serif;
    --font-body: 'DM Sans', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --border-radius: 4px;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--crema);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--espresso);
    font-weight: 400;
    line-height: 1.2;
}

a {
    color: var(--roast);
    text-decoration: none;
    transition: var(--transition);
}

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

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography Scales */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-6xl { font-size: 3.75rem; }
.text-7xl { font-size: 4.5rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-radius: 0;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--roast);
    color: var(--crema);
}

.btn-primary:hover {
    background-color: var(--espresso);
    color: var(--crema);
}

.btn-secondary {
    background-color: transparent;
    color: var(--espresso);
    border-color: var(--espresso);
}

.btn-secondary:hover {
    background-color: var(--espresso);
    color: var(--crema);
}

.btn-accent {
    background-color: var(--gold);
    color: var(--espresso);
}

.btn-accent:hover {
    background-color: #C38E5A;
    color: var(--espresso);
}

/* Header & Nav */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: var(--transition);
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-header.scrolled {
    background-color: rgba(249, 246, 240, 0.98);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(44, 30, 22, 0.05);
    border-bottom-color: transparent;
}

.main-header.scrolled .logo,
.main-header.scrolled .nav-link,
.main-header.scrolled .menu-toggle {
    color: var(--espresso);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--crema); /* Assumes header starts on dark/image bg */
    letter-spacing: -0.02em;
    z-index: 1001;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--crema);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--gold);
    transition: width 0.3s ease;
}

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

.menu-toggle {
    display: none;
    color: var(--crema);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

/* Sections */
.section {
    padding: 8rem 0;
}

.section-sm {
    padding: 4rem 0;
}

.section-lg {
    padding: 12rem 0;
}

.section-dark {
    background-color: var(--espresso);
    color: var(--crema);
}

.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 {
    color: var(--crema);
}

.section-latte {
    background-color: var(--latte);
}

.text-center { text-align: center; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }

/* Grids */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

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

/* Hero Generic */
.page-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    padding-top: 5rem;
    background-color: var(--espresso);
    color: var(--crema);
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
    background-color: rgba(44, 30, 22, 0.6);
}

.page-hero h1 {
    color: var(--crema);
    margin-bottom: 1rem;
}

.page-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Cards */
.card {
    background-color: #fff;
    padding: 2.5rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(44, 30, 22, 0.08);
}

.card-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    margin-bottom: 1.5rem;
}

/* Footer */
.main-footer {
    background-color: var(--espresso);
    color: var(--crema);
    padding: 6rem 0 2rem;
}

.main-footer h4 {
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

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

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #A39189;
}

.footer-links a:hover {
    color: var(--crema);
}

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    color: #A39189;
    font-size: 0.9rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    font-family: var(--font-body);
    background-color: var(--crema);
    border: 1px solid #D1C7BD;
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--roast);
    box-shadow: 0 0 0 1px var(--roast);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Utilities */
.text-roast { color: var(--roast); }
.text-gold { color: var(--gold); }
.uppercase { text-transform: uppercase; letter-spacing: 0.05em; }
.italic { font-style: italic; }

/* Specific Industry Elements */
.decorative-line {
    width: 60px;
    height: 2px;
    background-color: var(--gold);
    margin: 1.5rem auto;
}

.decorative-line-left {
    width: 60px;
    height: 2px;
    background-color: var(--gold);
    margin: 1.5rem 0;
}

.image-frame {
    position: relative;
    padding: 1rem;
}

.image-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid var(--gold);
    z-index: 0;
    transform: translate(15px, 15px);
}

.image-frame img {
    position: relative;
    z-index: 1;
}

/* Feature/Process steps */
.step-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--gold);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: -1.5rem;
    position: relative;
    z-index: 0;
}

.step-content {
    position: relative;
    z-index: 1;
}

/* Mobile specific overrides */
@media (max-width: 991px) {
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
    
    .section { padding: 6rem 0; }
    .text-5xl { font-size: 2.5rem; }
    .text-6xl { font-size: 3rem; }
    .text-7xl { font-size: 3.5rem; }
}

@media (max-width: 767px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
    
    .main-header {
        background-color: var(--crema);
        padding: 1rem 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .logo {
        color: var(--espresso);
    }
    
    .menu-toggle {
        display: block;
        color: var(--espresso);
    }
    
    .main-nav {
        position: fixed;
        top: 65px; /* height of header approx */
        left: -100%;
        width: 100%;
        height: calc(100vh - 65px);
        background-color: var(--crema);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 2rem;
        transition: var(--transition);
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        width: 100%;
        text-align: center;
        gap: 0;
    }
    
    .nav-list li {
        width: 100%;
    }
    
    .nav-link {
        display: block;
        color: var(--espresso);
        font-size: 1.2rem;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .nav-link::after { display: none; }
    
    .page-hero {
        padding-top: 6rem;
    }
    
    .section { padding: 4rem 0; }
    
    .image-frame::before {
        transform: translate(10px, 10px);
    }
}

/* Subtle Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) backwards;
}

.grid-cols-2 .card:nth-child(2),
.grid-cols-3 .card:nth-child(2),
.grid-cols-4 .card:nth-child(2) {
    animation-delay: 0.1s;
}

.grid-cols-3 .card:nth-child(3),
.grid-cols-4 .card:nth-child(3) {
    animation-delay: 0.2s;
}

.grid-cols-4 .card:nth-child(4) {
    animation-delay: 0.3s;
}
