/* ============================================================
   WH Consulting - Main Stylesheet
   Design System: Tokens, Reset, Layout, Typography
   ============================================================ */

/* ---------- Design Tokens ---------- */
:root {
    /* Colors */
    --color-primary: #0D0D0D;
    --color-secondary: #1A1A2E;
    --color-accent: #C9A96E;
    --color-accent-hover: #E2C48A;
    --color-accent-dark: #A88B4A;
    --color-surface: #F5F5F5;
    --color-surface-alt: #EAEAEA;
    --color-text-light: #FFFFFF;
    --color-text-dark: #1A1A1A;
    --color-text-muted: #8A8A8A;
    --color-glass: rgba(255, 255, 255, 0.05);
    --color-glass-border: rgba(255, 255, 255, 0.08);
    --color-border: rgba(201, 169, 110, 0.3);
    --color-border-light: rgba(201, 169, 110, 0.12);
    --color-overlay: rgba(0, 0, 0, 0.65);
    --color-gold-gradient: linear-gradient(135deg, #C9A96E 0%, #E2C48A 50%, #A88B4A 100%);

    /* Typography */
    --font-heading: 'Playfair Display', 'Georgia', serif;
    --font-subheading: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Inter', 'Helvetica Neue', sans-serif;
    --font-logo: 'Cinzel Decorative', 'Georgia', serif;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --space-2xl: 8rem;
    --space-3xl: 12rem;

    /* Sizing */
    --max-width: 1280px;
    --max-width-narrow: 900px;

    /* Borders */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 24px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 48px rgba(0,0,0,0.18);
    --shadow-glow: 0 0 30px rgba(201, 169, 110, 0.15);
    --shadow-glow-strong: 0 0 60px rgba(201, 169, 110, 0.3);

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-index layers */
    --z-preloader: 9999;
    --z-nav: 1000;
    --z-modal: 2000;
    --z-cursor: 3000;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

/* Accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    background-color: var(--color-primary);
    line-height: 1.7;
    overflow-x: hidden;
    /* iOS safe area for notched phones */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

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

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

ul, ol {
    list-style: none;
}

button, input, textarea {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
    background: none;
}

::selection {
    background: var(--color-accent);
    color: var(--color-primary);
}

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

.container--narrow {
    max-width: var(--max-width-narrow);
}

.section {
    padding: var(--space-2xl) 0;
    position: relative;
    overflow: hidden;
}

.section--dark {
    background: var(--color-primary);
    color: var(--color-text-light);
}

.section--gradient {
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-primary) 100%);
    color: var(--color-text-light);
}

.section--light {
    background: var(--color-surface);
    color: var(--color-text-dark);
}

.section--split {
    display: flex;
    min-height: 80vh;
}

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* Grid */
.grid {
    display: grid;
    gap: var(--space-md);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* Text alignment */
.text-center { text-align: center; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.heading-xl {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.heading-lg {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
}

.heading-md {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-family: var(--font-subheading);
    font-weight: 500;
}

.heading-sm {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-family: var(--font-subheading);
    font-weight: 400;
    letter-spacing: 0.05em;
}

.tagline {
    font-family: var(--font-subheading);
    font-size: clamp(0.9rem, 1.5vw, 1.15rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    font-weight: 300;
}

.body-lg {
    font-size: 1.125rem;
    line-height: 1.8;
}

.body-sm {
    font-size: 0.875rem;
    line-height: 1.6;
}

.text-accent {
    color: var(--color-accent);
}

.text-muted {
    color: var(--color-text-muted);
}

/* ---------- Gold Divider ---------- */
.gold-divider {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
    margin: var(--space-md) auto;
    position: relative;
}

.gold-divider::after {
    content: '◆';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-accent);
    font-size: 0.5rem;
    background: inherit;
    padding: 0 8px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 14px 36px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-full);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn--primary {
    background: var(--color-accent);
    color: var(--color-primary);
    border: 1px solid var(--color-accent);
}

.btn--primary:hover {
    background: var(--color-accent-hover);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

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

.btn--outline:hover {
    background: var(--color-accent);
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-secondary), var(--color-accent));
    border-radius: var(--radius-sm);
    border: 2px solid var(--color-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .grid-5 { grid-template-columns: repeat(3, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .section { padding: var(--space-xl) 0; }
}

@media (max-width: 768px) {
    .grid-5 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .section { padding: var(--space-lg) 0; }
    .container { padding: 0 var(--space-sm); }
    .section--split { flex-direction: column; }
    .heading-xl { font-size: clamp(1.8rem, 5vw, 2.5rem); }
    .heading-lg { font-size: clamp(1.5rem, 4vw, 2rem); }
    .gold-divider { width: 60px; margin: var(--space-sm) auto; }
}

@media (max-width: 576px) {
    .grid-5 { grid-template-columns: 1fr; }
    html { font-size: 15px; }
    .heading-xl { letter-spacing: 0.04em; }
    .btn { padding: 12px 24px; font-size: 0.8rem; letter-spacing: 0.08em; }
}

@media (max-width: 360px) {
    html { font-size: 14px; }
}

/* ---------- Scroll Progress Bar ---------- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-secondary) 0%, var(--color-accent) 50%, var(--color-accent-hover) 100%);
    width: 0%;
    z-index: 9999;
    transition: width 0.1s ease-out;
}
