/* ==========================================================================
   GLOBAL TYPOGRAPHY SYSTEM
   ========================================================================== */

/* 1. Global CSS Variables */
:root {
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    --font-small: 'Montserrat', sans-serif;

    --color-heading: #111111;
    --color-body: #555555;
    --color-muted: #777777;
    --color-primary: var(--accent-color, #BA9731);
}

/* 2. Base Resets & Global Font Apply */
html,
body {
    font-family: var(--font-body) !important;
    color: var(--color-body);
    font-size: 16px;
    /* Accessibility baseline */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    font-family: var(--font-body);
}

/* 3. Fluid Typography (Clamp) & Headings */

/* Hero Heading (Skipped from 40px rule) */
.hero-content h1 {
    font-family: var(--font-heading) !important;
    font-size: 56px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.0625rem !important;
    /* -1px */
    color: #000000 !important;
}

/* H1 */
h1,
.heading-1,
.section-title h1 {
    font-family: var(--font-heading) !important;
    font-size: 40px !important;
    font-weight: 800 !important;
    line-height: 1.1 !important;
    letter-spacing: -0.0625rem !important;
    /* -1px */
    color: #000000 !important;
}

/* H2 */
h2,
.heading-2,
.section-title h2,
.spc-title,
.page-header-box h2 {
    font-family: var(--font-heading) !important;
    font-size: 40px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    color: #000000 !important;
}

/* H3 */
h3,
.heading-3,
.section-title h3 {
    font-family: var(--font-heading) !important;
    font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem) !important;
    font-weight: 700 !important;
    color: #000000 !important;
}

/* H4 */
h4,
.heading-4,
.wwd-content h4 {
    font-family: var(--font-heading) !important;
    font-size: clamp(1.5rem, 1.5vw + 1rem, 2rem) !important;
    font-weight: 600 !important;
    color: #000000 !important;
}

/* H5 */
h5,
.heading-5 {
    font-family: var(--font-heading) !important;
    font-size: clamp(1.25rem, 1vw + 1rem, 1.625rem) !important;
    font-weight: 600 !important;
    color: #000000 !important;
}

/* H6 */
h6,
.heading-6,
.spc-f-block h6 {
    font-family: var(--font-heading) !important;
    font-size: clamp(1.125rem, 1vw + 0.5rem, 1.375rem) !important;
    font-weight: 600 !important;
    color: #000000 !important;
}

/* Paragraphs */
p,
.paragraph,
.text-body {
    font-size: clamp(1rem, 0.5vw + 0.8rem, 1.125rem) !important;
    font-weight: 400 !important;
    line-height: 1.8 !important;
    color: var(--color-body);
}

/* Small Text */
small,
.small-text {
    font-size: 14px !important;
    font-weight: 400 !important;
}

/* Caption */
.caption {
    font-size: 13px !important;
    font-weight: 500 !important;
    opacity: 0.8;
}

/* Buttons */
.btn,
.btn-default,
.btn-text {
    font-size: 16px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0.01875rem !important;
    /* 0.3px */
    transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease, color 0.4s ease !important;
    /* Default light-mode button is dark */
    background: var(--primary-color) !important;
    color: var(--white-color) !important;
}

/* Light buttons inside dark sections */
.dark-section .btn,
.dark-section .btn-default {
    background: var(--white-color) !important;
    color: var(--primary-color) !important;
}

/* Highlighted Gold Button (works everywhere) */
.btn-highlighted {
    background: var(--accent-color) !important;
    color: var(--white-color) !important;
}

/* Fix button circle icon colors to match */
.dark-section .btn-default::before {
    background: var(--primary-color) !important;
}

.dark-section .btn-default::after {
    background-color: transparent !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

.btn-highlighted::before {
    background: var(--primary-color) !important;
}

.btn-highlighted::after {
    background-color: transparent !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E") !important;
}

/* Navbar */
.navbar-nav .nav-link,
.main-menu ul li a {
    font-size: 16px !important;
    font-weight: 600 !important;
    transition: color 0.3s ease !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active,
.main-menu ul li a:hover,
.main-menu ul li a.active {
    color: var(--color-primary) !important;
}

/* Footer */
footer,
.footer-content p,
.footer-menu ul li a {
    font-size: 15px !important;
    font-weight: 400 !important;
}

/* White text overrides for dark sections */
.text-white,
.dark-section h1,
.dark-section h2,
.dark-section h3,
.dark-section h4,
.dark-section h5,
.dark-section h6,
.dark-section p {
    color: #ffffff !important;
}

/* 4. Interactive Hover Effects */

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    transition: color 0.3s ease;
}

h1:hover,
h2:hover,
h3:hover,
h4:hover,
h5:hover,
h6:hover {
    opacity: 0.85;
    /* Only applying opacity on hover state, without transition on opacity */
}

/* Links (Underline growing from left) */
a.custom-link {
    position: relative;
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

a.custom-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s ease-out;
}

a.custom-link:hover::after {
    width: 100%;
}

/* Buttons */
.btn-default:hover,
.btn:hover {
    transform: translateY(-3px) scale(1.03) !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Cards */
.card-hover,
.service-item,
.project-item,
.sticky-project-card,
.post-item {
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
    will-change: transform, box-shadow;
}

.card-hover:hover,
.service-item:hover,
.project-item:hover,
.sticky-project-card:hover,
.post-item:hover {
    transform: none !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

/* Images Zoom */
.img-zoom-wrapper,
.post-image {
    overflow: hidden;
}

.img-zoom-wrapper img,
.project-image img,
.post-image img {
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.img-zoom-wrapper:hover img,
.project-item:hover .project-image img,
.post-item:hover .post-image img {
    transform: scale(1.05) !important;
}

/* 5. Accessibility & Motion Preference */
:focus-visible {
    outline: 2px solid var(--color-primary) !important;
    outline-offset: 4px !important;
}

/* Fix for disabled wow.js */
.wow {
    visibility: visible !important;
    animation: none !important;
}

/* Magic Cursor Styles */
.cb-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border-radius: 50%;
    border: 2px solid var(--accent-color);
    pointer-events: none;
    z-index: 99999;
    transform: translate3d(-100%, -100%, 0);
    transition: width 0.3s ease, height 0.3s ease, margin 0.3s ease, background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cb-cursor.-visible {
    opacity: 1;
}

.cb-cursor:before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-color);
    transition: opacity 0.3s ease;
}

.cb-cursor.-active {
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    background-color: rgba(186, 151, 49, 0.1);
}

.cb-cursor.-pointer {
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    background-color: rgba(186, 151, 49, 0.2);
}

.cb-cursor.-pointer:before {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}