/* ============================
   Mento Goods - Common Styles
   ============================ */

/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --brand-bg: #FAF7F2;
    --brand-ink: #111111;
    --brand-accent: #6B4423;
    --brand-accent2: #A06838;
    --brand-line: #E7E1D6;
    
    /* Typography */
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --container-max-width: 1200px;
    --container-padding: 2rem;
    --section-padding: 4rem 0;
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    font-family: var(--font-body);
    background-color: var(--brand-bg);
    color: var(--brand-ink);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: rgba(var(--brand-ink), 0.8);
}

a {
    color: var(--brand-accent);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    opacity: 0.8;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--brand-line);
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--brand-ink);
    text-decoration: none;
}

.logo-img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--brand-line);
}

/* Navigation */
.nav-desktop {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: rgba(var(--brand-ink), 0.8);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-accent);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--brand-accent);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-line {
    width: 1.5rem;
    height: 2px;
    background: var(--brand-ink);
    transition: var(--transition);
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(0.4rem, 0.4rem);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(0.4rem, -0.4rem);
}

.nav-mobile {
    display: none;
    border-top: 1px solid var(--brand-line);
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 0;
}

.nav-mobile.active {
    display: block;
    animation: slideDown 0.3s ease;
}

.nav-link-mobile {
    display: block;
    padding: 0.75rem var(--container-padding);
    color: rgba(var(--brand-ink), 0.8);
    border-bottom: 1px solid transparent;
    transition: var(--transition-fast);
}

.nav-link-mobile:hover {
    background: var(--brand-line);
    color: var(--brand-accent);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    font-size: 0.875rem;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent2) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(107, 68, 35, 0.25);
    border: 2px solid transparent;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--brand-accent2) 0%, var(--brand-accent) 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(107, 68, 35, 0.35);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-outline {
    background: white;
    color: var(--brand-accent);
    border: 2px solid var(--brand-accent);
    position: relative;
    z-index: 1;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--brand-accent);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn-outline:hover::before {
    width: 100%;
}

.btn-outline:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 68, 35, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--brand-accent);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.btn-ghost:hover {
    text-decoration: none;
}

/* Footer */
.footer {
    background: rgba(107, 68, 35, 0.03);
    border-top: 1px solid rgba(107, 68, 35, 0.2);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

/* Footer Header */
.footer-header {
    text-align: center;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(107, 68, 35, 0.15);
}

.footer-brand-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--brand-accent);
    letter-spacing: 0.5px;
}

.footer-brand-slogan {
    font-size: 1rem;
    color: rgba(17, 17, 17, 0.6);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.footer-title {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    animation: titleShine 3s ease-in-out infinite;
}

@keyframes titleShine {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

.footer-text {
    color: rgba(var(--brand-ink), 0.7);
    max-width: 300px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-link {
    color: rgba(17, 17, 17, 0.7);
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-accent) 0%, var(--brand-accent2) 100%);
    transition: width 0.3s ease;
}

.footer-link:hover {
    color: var(--brand-accent);
    transform: translateX(5px);
}

.footer-link:hover::after {
    width: 100%;
}

.footer-bottom {
    border-top: 1px solid rgba(107, 68, 35, 0.15);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(17, 17, 17, 0.6);
    font-size: 0.875rem;
}

.footer-bottom p {
    margin-bottom: 0.25rem;
}

.footer-bottom a {
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: var(--brand-accent);
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--brand-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(var(--brand-accent), 0.4);
}

.whatsapp-icon {
    width: 1.75rem;
    height: 1.75rem;
    fill: currentColor;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--brand-accent), 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(var(--brand-accent), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--brand-accent), 0);
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--brand-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--brand-line);
    border-top: 3px solid var(--brand-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Section */
.section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: rgba(var(--brand-ink), 0.7);
    max-width: 32rem;
    margin: 0 auto;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, rgba(231, 225, 214, 0.3) 0%, rgba(250, 247, 242, 0.5) 100%);
    padding: 6rem 0 4rem;
    text-align: center;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 40%;
    height: 200%;
    background: linear-gradient(45deg, rgba(107, 68, 35, 0.03) 0%, transparent 100%);
    transform: rotate(-15deg);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: rotate(-15deg) translateY(0);
    }
    50% {
        transform: rotate(-15deg) translateY(-20px);
    }
}

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-subtitle {
    font-size: 1.25rem;
    color: rgba(17, 17, 17, 0.7);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards */
.card {
    background: white;
    border: 2px solid var(--brand-line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(107, 68, 35, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.card:hover::after {
    opacity: 1;
}

.card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 12px 32px rgba(107, 68, 35, 0.15);
    border-color: var(--brand-accent);
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --container-padding: 1rem;
        --section-padding: 3rem 0;
    }
    
    .nav-desktop {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .page-header {
        padding: 5rem 0 3rem;
    }
    
    .whatsapp-float {
        bottom: 1rem;
        right: 1rem;
        width: 3rem;
        height: 3rem;
    }
    
    .whatsapp-icon {
        width: 1.5rem;
        height: 1.5rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .whatsapp-float {
        animation: none;
    }
}
