/**
 * v3.4 Global Overrides — load LAST to win specificity wars.
 * Fixes from production audit: cursor lock, nav contrast, muted text on dark bg.
 */

/* ---- 1. Kill cursor lock from legacy custom-cursor.js ---- */
html, body,
body.no-js,
body.luxury-theme,
body.one-page-portfolio,
body.one-page-portfolio-v3,
body * {
	cursor: auto !important;
}
.custom-cursor,
body > .custom-cursor {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}
a, button, [role="button"], .btn-cta-solid, .btn-cta-ghost, .bento-tile, .case-card,
.q-opt, .filter-chip, .news-card, .blog-card, .faq-item summary, .cases-btn, .sticky-book-cta {
	cursor: pointer !important;
}
input, textarea, select, [contenteditable] {
	cursor: text !important;
}

/* ---- 2. Restore scroll — kill any legacy body locks ---- */
html {
	scroll-behavior: smooth;
	overflow-x: hidden;
	overflow-y: auto !important;
}
body:not(.mobile-menu-open) {
	overflow-x: hidden;
	overflow-y: auto !important;
	height: auto !important;
}

/* ---- 3. Force white nav menu (both desktop + mobile) ---- */
.main-navigation .nav-menu > li > a,
.main-navigation .nav-menu a,
#site-navigation .nav-menu a,
.mobile-nav-overlay .nav-menu a {
	color: #f5f0eb !important;
	opacity: 0.82;
	font-weight: 500 !important;
	letter-spacing: 0.04em !important;
	text-transform: uppercase !important;
	transition: color .25s ease, opacity .25s ease !important;
}
.main-navigation .nav-menu a:hover,
#site-navigation .nav-menu a:hover,
.mobile-nav-overlay .nav-menu a:hover {
	color: #c9a96e !important;
	opacity: 1 !important;
}

/* Nav CTA button readable */
.main-navigation .nav-cta,
#site-navigation .nav-cta,
.main-navigation .btn-primary.nav-cta {
	background: #f5f0eb !important;
	color: #0a0a0f !important;
	border-color: #f5f0eb !important;
	padding: 10px 22px !important;
	border-radius: 999px !important;
	font-weight: 600 !important;
	text-transform: none !important;
	letter-spacing: 0.01em !important;
}
.main-navigation .nav-cta:hover,
#site-navigation .nav-cta:hover {
	background: #c9a96e !important;
	color: #0a0a0f !important;
	border-color: #c9a96e !important;
}

/* Hamburger lines visible */
.mobile-menu-toggle .hamburger-line {
	background: #f5f0eb !important;
}

/* Mobile menu overlay readable */
.mobile-nav-overlay {
	background: rgba(10, 10, 15, 0.98) !important;
	backdrop-filter: blur(20px);
}
.mobile-nav-overlay .nav-menu {
	flex-direction: column;
	gap: 2rem;
}
.mobile-nav-overlay .nav-menu a {
	font-size: 1.5rem !important;
	font-family: 'Cormorant Garamond', serif !important;
	font-weight: 300 !important;
	text-transform: none !important;
	letter-spacing: -0.01em !important;
}

/* Logo visible — force white stroke */
.site-logo .logo-svg,
.site-logo .logo-text {
	color: #f5f0eb !important;
	fill: #f5f0eb !important;
}
.site-logo .logo-svg text { fill: #f5f0eb !important; }

/* Scrolled nav bg */
.main-navigation.scrolled,
#site-navigation.scrolled {
	background: rgba(10, 10, 15, 0.92) !important;
	backdrop-filter: blur(12px) !important;
	border-bottom: 1px solid rgba(245, 240, 235, 0.08) !important;
}

/* ---- 4. Rescue dark-on-dark text across old + new sections ---- */
body p,
body li,
body dd,
body blockquote:not(.wp-block-quote) {
	color: rgba(245, 240, 235, 0.78);
}
body h1, body h2, body h3, body h4, body h5, body h6 {
	color: #f5f0eb;
}

/* Muted text rescues (any color:var(--color-muted) etc) */
.text-muted,
[class*="text-muted"],
.site-main p.muted,
.site-main .muted,
.post-meta,
.entry-meta {
	color: rgba(245, 240, 235, 0.55) !important;
}

/* WP-block-quote contrast */
.wp-block-quote p,
.wp-block-pullquote p {
	color: #f5f0eb !important;
}

/* Forms: inputs must have readable text */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
textarea,
select {
	color: #f5f0eb !important;
	background: rgba(245, 240, 235, 0.04) !important;
	border: 1px solid rgba(245, 240, 235, 0.15) !important;
}
input::placeholder, textarea::placeholder {
	color: rgba(245, 240, 235, 0.35) !important;
}

/* ---- 5. Link default contrast ---- */
a:not(.btn-cta-solid):not(.btn-cta-ghost):not(.nav-cta):not(.bento-tile):not(.case-card):not(.news-card):not(.news-link):not(.filter-chip):not(.sticky-book-cta):not(.rel-card):not(.bc-link):not(.feat-card):not(.site-logo) {
	color: #f5f0eb;
	text-decoration-color: rgba(245, 240, 235, 0.3);
}

/* ---- 6. Section dividers / faint lines polish ---- */
hr,
.section-head hr {
	border-color: rgba(245, 240, 235, 0.1) !important;
}

/* ---- 7. Hero scroll icon visible ---- */
.hero-scroll,
.hero-scroll span {
	color: #f5f0eb !important;
}
.hero-scroll {
	border-color: rgba(245, 240, 235, 0.35) !important;
}
.hero-scroll span {
	background: #f5f0eb !important;
}

/* ---- 8. Footer readable ---- */
.site-footer { color: rgba(245, 240, 235, 0.72); }
.site-footer a { color: rgba(245, 240, 235, 0.72); }
.site-footer a:hover { color: #f5f0eb; }
.footer-name { color: #f5f0eb !important; }

/* ---- 9. Reduce-motion safety ---- */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto !important; }
	.rail-track, .nomad-hero-badge .dot { animation: none !important; }
}

/* ---- 11. v3.6 a11y: focus-visible + quiz aria-checked ---- */
*:focus-visible {
	outline: 2px solid #c9a96e;
	outline-offset: 3px;
	border-radius: 4px;
}
.q-opt[aria-checked="true"] {
	background: rgba(201, 169, 110, 0.15) !important;
	border-color: #c9a96e !important;
	color: #f5f0eb !important;
}
.q-opt[aria-checked="true"]::before {
	content: '✓ ';
	color: #c9a96e;
	font-weight: 600;
}

/* ---- 12. v3.6 responsive breakpoints — fill 768 + 480 gap ---- */
@media (max-width: 768px) {
	.container-luxury { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
	.section-title { font-size: clamp(1.6rem, 5vw, 2.4rem) !important; }
	.nav-menu.desktop-nav { display: none !important; }
}
@media (max-width: 480px) {
	.container-luxury { padding-left: 1rem !important; padding-right: 1rem !important; }
	.section-title { font-size: clamp(1.4rem, 6vw, 2rem) !important; }
	.btn-cta-solid, .btn-cta-ghost { padding: 12px 20px !important; font-size: 0.9rem !important; }
	.site-logo img { width: 100px !important; height: auto !important; }
}

/* ---- 13. v3.6 crunchy polish — text rendering + link underlines ---- */
body {
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
article p a, .case-body-grid a, .faq-item p a {
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
article p a:hover, .case-body-grid a:hover, .faq-item p a:hover {
	color: #c9a96e !important;
}

/* ---- 10. Kill any leftover `cursor:none` from inherited rules ---- */
.main-navigation,
.main-navigation *,
.site-footer,
.site-footer *,
.site-main,
.site-main * {
	cursor: auto;
}
.main-navigation a,
.site-footer a,
.site-main a,
.site-main button {
	cursor: pointer !important;
}
