/* ==========================================================================
   Richard Amores | Techpreneur & Trusted Advisor - Master Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Luxury Off-White Editorial Palette */
  --color-offwhite: #FAF9F5;      /* Warm alabaster / linen off-white */
  --color-offwhite-subtle: #F3F1EC;
  --color-card-surface: #FFFFFF;
  --color-border: #E5E2DA;
  --color-border-subtle: #EDEAE2;
  
  /* Text Contrast Hierarchy */
  --color-text-main: #0F172A;     /* Slate 950 - Deepest black-navy for headlines */
  --color-text-body: #1E293B;     /* Slate 800 - Crisp readable body */
  --color-text-muted: #475569;    /* Slate 600 - Secondary text (high contrast) */
  
  /* Brand Accents */
  --color-accent: #1D4ED8;        /* Rich Royal Blue */
  --color-accent-hover: #1E40AF;
  --color-gold: #B8860B;          /* Polished Gold accent matching logo */
  --color-emerald: #059669;

  /* ASL High-Clarity Neon Tech Palette */
  --asl-bg: #070B14;
  --asl-surface: #0D1527;
  --asl-surface-card: #111C33;
  --asl-border: #1E293B;
  --asl-border-bright: #334155;
  --asl-cyan: #00F0FF;
  --asl-cyan-hover: #38BDF8;
  --asl-emerald: #00E599;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background-color: var(--color-offwhite);
}

body {
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-offwhite);
  color: var(--color-text-body);
}

main {
  flex: 1 0 auto;
}

/* Fixed Center Brand Watermark (for all pages except Systems Lab) */
.brand-watermark-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, 85vw);
  height: min(720px, 85vw);
  background-image: url('../images/watermark.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: contain;
  opacity: 0.155; /* Refined luxury watermark (acceptable opacity) */
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  z-index: 1;
  filter: contrast(115%) saturate(110%);
}

/* Glassmorphism Header (Warm Off-White Blend) */
.glass-header {
  background: rgba(250, 249, 245, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 226, 218, 0.9);
}

/* Dark Glassmorphism Header for ASL page */
.glass-header-dark {
  background: rgba(7, 11, 20, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(30, 41, 59, 0.85);
}

/* Subtle Gradient Glows */
.gradient-badge {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.08) 0%, rgba(184, 134, 11, 0.08) 100%);
  border: 1px solid rgba(184, 134, 11, 0.25);
}

.gradient-hero-bg {
  background: radial-gradient(circle at 50% 0%, rgba(184, 134, 11, 0.04) 0%, rgba(250, 249, 245, 0) 70%);
}

.gradient-dark-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: #ffffff;
}

.gradient-dark-banner h1,
.gradient-dark-banner h2,
.gradient-dark-banner h3,
.gradient-dark-banner h4 {
  color: #ffffff !important;
}

/* ASL Cyberpunk/Tech Gradients & Glows */
.asl-cyber-bg {
  background-color: var(--asl-bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(0, 240, 255, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(0, 229, 153, 0.06) 0px, transparent 50%),
    radial-gradient(at 50% 30%, rgba(14, 165, 233, 0.05) 0px, transparent 60%);
}

.asl-glow-panel {
  box-shadow: 0 0 50px -10px rgba(0, 240, 255, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.asl-btn-primary {
  background: linear-gradient(135deg, #00f0ff 0%, #00b4d8 100%);
  color: #070b14;
  font-weight: 800;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.35);
}
.asl-btn-primary:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #00f0ff 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 240, 255, 0.5);
}

.asl-btn-secondary {
  background: rgba(17, 28, 51, 0.85);
  color: #ffffff;
  border: 1px solid rgba(51, 65, 85, 0.9);
  transition: all 0.2s ease-in-out;
}
.asl-btn-secondary:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(0, 240, 255, 0.6);
  color: #00f0ff;
  transform: translateY(-1px);
}

/* Service Card Hover Effects */
.pillar-card {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.pillar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  border-color: #cbd5e1;
}

/* Custom Button Styles */
.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  transition: all 0.2s ease-in-out;
}
.btn-primary:hover {
  background-color: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.btn-accent {
  background-color: var(--color-accent);
  color: #ffffff;
  transition: all 0.2s ease-in-out;
}
.btn-accent:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  transition: all 0.2s ease-in-out;
}
.btn-secondary:hover {
  background-color: var(--color-offwhite-subtle);
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

/* GHL Modal Styles */
.ghl-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(7, 11, 20, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 1rem;
}

.ghl-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.ghl-modal-container {
  background: #ffffff;
  border-radius: 1rem;
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  transform: scale(0.96) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ghl-modal-backdrop.active .ghl-modal-container {
  transform: scale(1) translateY(0);
}

/* Image fallback styling */
.img-fallback-container {
  background-color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Typography polish */
h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.025em;
  color: var(--color-text-main);
}

/* Active navigation link indicator */
.nav-link {
  position: relative;
  transition: color 0.15s ease;
}
.nav-link.active {
  color: var(--color-accent);
  font-weight: 700;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

/* ==========================================================================
   Executive Form Controls & Bulletproof Select Styling
   Guarantees 100% High Contrast & Eliminates White-on-White / Dark Mode Inversion
   ========================================================================== */
select, 
select option, 
select optgroup {
  color: #0F172A !important;
  background-color: #FFFFFF !important;
  -webkit-text-fill-color: #0F172A !important;
  font-family: var(--font-sans);
}

select:focus,
select:active,
select:hover {
  color: #0F172A !important;
  background-color: #FFFFFF !important;
  -webkit-text-fill-color: #0F172A !important;
}

/* Ensure all options inside any select element have explicit dark text */
option {
  color: #0F172A !important;
  background-color: #FFFFFF !important;
  -webkit-text-fill-color: #0F172A !important;
  font-size: 0.875rem;
  padding: 8px 12px;
}

/* Explicit form inputs contrast */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
textarea {
  color: #0F172A !important;
  background-color: #FFFFFF !important;
  -webkit-text-fill-color: #0F172A !important;
}

input::placeholder,
textarea::placeholder {
  color: #94A3B8 !important;
  -webkit-text-fill-color: #94A3B8 !important;
  opacity: 1;
}

/* Form input focus state */
#ghl-quick-booking-fallback input:focus,
#ghl-quick-booking-fallback select:focus,
#ghl-quick-booking-fallback textarea:focus {
  border-color: #1D4ED8 !important;
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15) !important;
  outline: none !important;
}

/* Submit button interactive hover */
#fb-submit-btn:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(29, 78, 216, 0.35) !important;
}

#ghl-modal-close:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #FFFFFF !important;
}
