/* ===== RESET & VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #f7f5f0;
    --bg-secondary: #f0ede6;
    --fg: #2c241e;
    --card: #ffffff;
    --primary: #2c241e;
    --primary-foreground: #f7f5f0;
    --secondary: #e8e3da;
    --muted: #d5cfc4;
    --muted-foreground: #8a7a6e;
    --accent: #c1be9d;
    --accent-dark: #a8a583;
    --accent-foreground: #2c241e;
    --border: #e0dbd2;
    --shadow: rgba(44, 36, 30, 0.06);
    --shadow-hover: rgba(44, 36, 30, 0.12);
    --radius: 6px;
    --font-heading: 'DM Sans', 'Questrial', sans-serif;
    --font-body: 'Questrial', 'DM Sans', sans-serif;
    --transition: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--fg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 1024px) {
    .container {
        padding: 0 3rem;
    }
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
.heading {
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.04em;
}

h1 {
    font-size: clamp(2.8rem, 8vw, 6.5rem);
}
h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}
h3 {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
}

.section-title {
    letter-spacing: 0.06em;
}
.section-title span {
    color: var(--accent);
}

/* ===== LOADER ===== */
#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    overflow: hidden;
}

#loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.loader-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    background: var(--accent);
    animation: floatShape 8s ease-in-out infinite alternate;
}

.loader-shape:nth-child(1) {
    width: 200px;
    height: 200px;
    top: -60px;
    right: -60px;
    animation-delay: 0s;
}

.loader-shape:nth-child(2) {
    width: 140px;
    height: 140px;
    bottom: -40px;
    left: -40px;
    animation-delay: 2s;
    background: var(--accent-dark);
}

.loader-shape:nth-child(3) {
    width: 100px;
    height: 100px;
    top: 30%;
    left: -30px;
    animation-delay: 4s;
    background: var(--muted);
}

@keyframes floatShape {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    100% {
        transform: translate(30px, -30px) scale(1.1) rotate(20deg);
    }
}

.loader-ring {
    width: 48px;
    height: 48px;
    border: 1.5px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

.loader-text {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--muted-foreground);
    letter-spacing: 0.15em;
    animation: pulse 1.5s ease-in-out infinite;
    font-family: var(--font-heading);
    z-index: 1;
}

.loader-bar {
    margin-top: 1rem;
    width: 200px;
    height: 1.5px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    z-index: 1;
}

.loader-bar-inner {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--primary));
    border-radius: 2px;
    animation: progress 2.8s ease-in-out forwards;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.4;
    }
    50% {
        opacity: 1;
    }
}

@keyframes progress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
    background: var(--muted);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-block;
    padding: 0.9rem 2.8rem;
    background: var(--primary);
    color: var(--primary-foreground);
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 50%, rgba(255, 255, 255, 0.05) 100%);
    pointer-events: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px -10px var(--shadow-hover);
    background: #3d332b;
}

.btn-outline {
    display: inline-block;
    padding: 0.85rem 2.8rem;
    background: transparent;
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: 1px solid var(--primary);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--primary-foreground);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px -10px var(--shadow-hover);
}

.btn-accent {
    background: var(--accent);
    color: var(--accent-foreground);
}
.btn-accent:hover {
    background: var(--accent-dark);
}

/* ===== SECTIONS ===== */
section {
    padding: 5rem 0;
}

@media (max-width: 640px) {
    section {
        padding: 3rem 0;
    }
}

.section-label {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 0.6rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--muted-foreground);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    color: var(--primary);
    text-align: center;
    margin-bottom: 0.75rem;
    letter-spacing: 0.06em;
}

.section-title span {
    color: var(--accent);
}

@media (max-width: 640px) {
    .section-title {
        font-size: 1.8rem;
    }
}

.section-sub {
    text-align: center;
    color: var(--muted-foreground);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-size: 1rem;
    line-height: 1.7;
    font-weight: 400;
}

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

.bg-dark {
    background: var(--primary);
    color: var(--primary-foreground);
}

.bg-dark .section-label {
    color: rgba(255, 255, 255, 0.35);
}
.bg-dark .section-title {
    color: var(--primary-foreground);
}
.bg-dark .section-sub {
    color: rgba(255, 255, 255, 0.55);
}

/* ===== SCROLL REVEAL ===== */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.9s var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE FINE-TUNE ===== */
@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }
    .hero {
        padding-top: 5rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .shipping-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}