/**
 * ONYX Real Estate Solutions — Design System & Custom Styles
 * Primary navy: #101D35
 * Metallic gold: #C6A45B
 * White: #FFFFFF
 * Cloud grey: #F3F5F8
 * Slate navy: #27364D
 * Silver grey: #DCE2EA
 * Headings: Manrope | Body & Buttons: Inter
 */

:root {
  /* ONYX Services Hub Master Brand Palette (Directive ONYX-OVERNIGHT-MASTER-DEVELOPMENT-01) */
  --onyx-primary-navy: #0B0E14;
  --onyx-secondary-surface: #0E131D;
  --onyx-gold-accent: #D4A017;

  --onyx-navy-primary: #101D35;
  --onyx-navy-deep: #0B0E14;
  --onyx-navy-surface: #0E131D;
  --onyx-navy-slate: #27364D;
  --onyx-navy-light: #324461;
  --onyx-gold-metallic: #D4A017;
  --onyx-gold-light: #DFC78A;
  --onyx-gold-dark: #9A7B36;
  --onyx-gold-shine: #FFF2CD;
  --onyx-white: #FFFFFF;
  --onyx-cloud-grey: #F3F5F8;
  --onyx-silver-grey: #DCE2EA;
  --onyx-text-muted: #64748B;
  --onyx-text-body: #334155;
  --onyx-border-subtle: #E2E8F0;
  --onyx-border-navy: #1E2D47;
  
  --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-subtle: 0 4px 20px -2px rgba(16, 29, 53, 0.05);
  --shadow-card: 0 10px 30px -5px rgba(16, 29, 53, 0.08);
  --shadow-gold: 0 10px 25px -5px rgba(198, 164, 91, 0.25);
  --shadow-navy: 0 20px 40px -10px rgba(16, 29, 53, 0.2);
}

/* Base & Typography */
html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  color: var(--onyx-text-body);
  background-color: var(--onyx-white);
  -webkit-font-smoothing: antialiased;
}

/* Accessibility Skip-to-content Link */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background-color: var(--onyx-gold-metallic);
  color: var(--onyx-navy-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: top 0.15s ease-in-out;
}

.skip-link:focus {
  top: 0;
  outline: 2px solid var(--onyx-white);
}

/* International & Right-to-Left (RTL) Layout Readiness */
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] body {
  direction: rtl;
}

html[dir="rtl"] .skip-link {
  left: auto;
  right: 1rem;
}

html[dir="rtl"] .fa-arrow-right {
  transform: scaleX(-1);
}

html[dir="rtl"] .gold-accent-line {
  margin-right: 0;
  margin-left: auto;
}

body {
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

/* Metallic Gold Gradients & Accents */
.gold-gradient-text {
  background: linear-gradient(135deg, #DFCA92 0%, #C6A45B 50%, #A38036 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gold-border-gradient {
  border-image: linear-gradient(to right, #DFC78A, #C6A45B, #9A7B36) 1;
}

.gold-accent-line {
  height: 3px;
  width: 48px;
  background: linear-gradient(90deg, var(--onyx-gold-metallic), transparent);
  border-radius: 2px;
}

/* Premium Buttons */
.btn-gold {
  background: linear-gradient(135deg, #DFC78A 0%, #C6A45B 50%, #B89243 100%);
  color: #101D35;
  font-weight: 600;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(198, 164, 91, 0.3);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(198, 164, 91, 0.45);
  background: linear-gradient(135deg, #EBD7A0 0%, #D4AF37 50%, #C6A45B 100%);
}

.btn-navy {
  background-color: var(--onyx-navy-primary);
  color: #FFFFFF;
  font-weight: 600;
  transition: all 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-navy:hover {
  background-color: var(--onyx-navy-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 29, 53, 0.25);
}

.btn-outline-gold {
  background: transparent;
  color: var(--onyx-gold-metallic);
  border: 1.5px solid var(--onyx-gold-metallic);
  font-weight: 600;
  transition: all 0.25s ease;
}

.btn-outline-gold:hover {
  background: rgba(198, 164, 91, 0.1);
  border-color: var(--onyx-gold-light);
  transform: translateY(-2px);
}

/* Card Treatments */
.card-premium {
  background: #FFFFFF;
  border: 1px solid var(--onyx-silver-grey);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-subtle);
}

.card-premium:hover {
  border-color: rgba(198, 164, 91, 0.5);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.card-dark {
  background: linear-gradient(180deg, #182742 0%, #101D35 100%);
  border: 1px solid rgba(198, 164, 91, 0.2);
  border-radius: 16px;
  color: #FFFFFF;
  transition: all 0.3s ease;
}

.card-dark:hover {
  border-color: rgba(198, 164, 91, 0.5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

/* Glassmorphism Navigation */
.nav-glass {
  background: rgba(16, 29, 53, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(198, 164, 91, 0.2);
}

/* Badge System */
.badge-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8E6D24;
  background-color: rgba(198, 164, 91, 0.12);
  border: 1px solid rgba(198, 164, 91, 0.3);
  border-radius: 9999px;
}

.badge-navy {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--onyx-navy-primary);
  background-color: var(--onyx-cloud-grey);
  border: 1px solid var(--onyx-silver-grey);
  border-radius: 9999px;
}

/* Form Styling */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #FFFFFF;
  border: 1.5px solid var(--onyx-silver-grey);
  border-radius: 10px;
  color: var(--onyx-navy-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--onyx-gold-metallic);
  box-shadow: 0 0 0 3px rgba(198, 164, 91, 0.2);
}

.form-input::placeholder {
  color: #94A3B8;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--onyx-gold-metallic);
}

/* Interactive Demos Styling */
.demo-window {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 45px -10px rgba(16, 29, 53, 0.35);
  border: 1px solid rgba(198, 164, 91, 0.25);
  background-color: #0F172A;
}

.demo-header {
  background: #101D35;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.demo-dots {
  display: flex;
  gap: 6px;
}

.demo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Modal Styling */
.modal-overlay {
  background: rgba(16, 29, 53, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ==========================================================================
   Accessibility & WCAG 2.1 AA Conformance Enhancements
   ========================================================================== */

/* 1. Screen Reader Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* 2. Universal Keyboard Focus Rings (WCAG 2.4.7 Focus Visible) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--onyx-gold-metallic) !important;
  outline-offset: 3px !important;
  border-radius: 4px;
}

/* 3. Reduced Motion Support (WCAG 2.2.2 & 2.3.3) */
@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;
  }
}

/* 4. Accessible Accordion Details/Summary */
details summary::-webkit-details-marker {
  display: none;
}
details[open] summary .faq-icon {
  transform: rotate(180deg);
}

/* 5. Accessible Touch Targets for Mobile Devices (WCAG 2.5.5) */
@media (pointer: coarse) {
  button,
  a.btn-gold,
  a.btn-navy,
  .form-input,
  nav a {
    min-height: 44px;
  }
}

/* 6. WCAG 2.1 AA Dark Surface Contrast Enforcement */
.bg-slate-900 .text-slate-500,
.bg-slate-950 .text-slate-500,
.bg-onyx-navy .text-slate-500,
.bg-onyx-deep .text-slate-500,
.card-dark .text-slate-500,
.demo-window .text-slate-500 {
  color: #94a3b8; /* >= 6.96:1 on #0F172A, >= 7.87:1 on #020617 */
}


