/**
 * WALBRAND - Unified Color Scheme
 * Black, White, Dark Hero Layout with Gold Accent Branding
 * ============================================================
 */

:root {
    /* Primary Colors */
    --brand-black: #050811;
    --brand-white: #ffffff;
    --brand-off-white: #f8fafc;
    --brand-cream: #f5f1e0;
    
    /* Gold/Accent Colors */
    --brand-gold: #d4af37;
    --brand-gold-light: #f1b33f;
    --brand-gold-alt: #f8b33f;
    --brand-gold-dark: #a37f11;
    
    /* Dark Theme Colors */
    --bg-primary: #050811;
    --bg-dark: #050507;
    --bg-panel: rgba(255, 255, 255, 0.05);
    --bg-panel-strong: rgba(255, 255, 255, 0.08);
    --bg-panel-hover: rgba(255, 255, 255, 0.10);
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-white: #ffffff;
    --text-cream: #f5f1e0;
    --text-muted: rgba(245, 241, 224, 0.72);
    --text-secondary: rgba(248, 250, 252, 0.78);
    
    /* Borders */
    --border-gold: rgba(255, 215, 130, 0.15);
    --border-light: rgba(255, 255, 255, 0.08);
    --border-lighter: rgba(255, 255, 255, 0.05);
    
    /* Semantic Colors (using brand palette) */
    --success: #a8d194;
    --warning: #f8c35c;
    --danger: #e18a6f;
    --info: #3498db;
    
    /* Shadows */
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.3);
    --shadow-hero: 0 40px 90px rgba(0, 0, 0, 0.35);
    
    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #d4af37 0%, #a37f11 100%);
    --gradient-gold-light: linear-gradient(135deg, #f1b33f 0%, #d78819 100%);
    --gradient-dark-hero: radial-gradient(circle at top left, rgba(241, 179, 63, 0.18), transparent 24%),
                          radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 18%);
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --radius: 28px;
    --radius-lg: 28px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    /* Transitions */
    --transition: all 0.25s ease;
    --transition-long: all 0.35s ease;
}

/* Dark Mode - Default */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }
}

/* Ensure consistent application */
html {
    background: var(--bg-primary);
    font-size: 100%;
}

/* Responsive safety rules to prevent horizontal scrolling */
/* These ensure the homepage and common layouts adapt to small viewports */
html, body {
    overflow-x: hidden;
}

.page-shell {
    width: 100%;
    max-width: 1200px;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
}

img, picture, video, iframe, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Ensure headers/brand/nav can wrap instead of overflowing */
.header, .header-container, .site-header, .main-nav, .brand, .page-header {
    flex-wrap: wrap !important;
}

/* If nav is too wide, allow horizontal scroll within the nav area instead of the whole page */
.main-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Prevent unbroken content from causing overflow */
* {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Responsive grid fallback */
.grid-4, .grid-3, .grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Make fixed/floating buttons respect viewport width */
.whatsapp-float, .whatsapp-btn, .fixed-bottom {
    right: 1rem;
    left: auto;
    box-sizing: border-box;
    max-width: calc(100% - 2rem);
}

@media (max-width: 420px) {
    .page-shell { padding-left: 12px; padding-right: 12px; }
}

body {
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 1rem;
    line-height: 1.75;
}

/* Normalize shared body-copy text across pages */
body p,
body ul,
body ol,
body li,
body dl,
body dt,
body dd,
body blockquote,
body label,
body button,
body input,
body select,
body textarea,
body a,
body span {
    font-size: 1rem !important;
}

body button,
body input,
body select,
body textarea,
body .btn,
body .auth-btn {
    font-size: 1rem !important;
}

small,
.small,
.caption,
.text-muted,
.note {
    font-size: 0.9rem !important;
}
