:root {
  /* Hybrid Palette - 'Executive Marine' */
  /* Purpose: Balanced Professionalism (Dark Headers/Footers, Light Content) */
  
  --bg-body: #f8fafc;       /* Slate 50 */
  --bg-surface: #ffffff;     /* White */
  --bg-dark: #0f172a;       /* Slate 900 */
  --bg-darker: #020617;     /* Slate 950 */
  
  --primary: #475569;       /* Slate 600 */
  --primary-light: #94a3b8; /* Slate 400 */
  
  --heading: #1e293b;       /* Slate 800 */
  --heading-light: #f1f5f9; /* Slate 100 */
  
  --accent: #ca8a04;        /* Yellow 600 - Gold Accent */
  --accent-secondary: #0ea5e9; /* Sky 500 */
  
  --border-light: #e2e8f0;  /* Slate 200 */
  --border-dark: #334155;   /* Slate 700 */
  
  --glass-light: rgba(255, 255, 255, 0.9);
  --glass-dark: rgba(15, 23, 42, 0.85);
}

* {
  box-sizing: border-box;
}

body.site-bg {
  font-family: 'Manrope', sans-serif;
  background-color: var(--bg-body);
  color: var(--primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body.site-bg::before,
body.site-bg::after {
  content: '';
  position: fixed;
  z-index: -1;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.22;
}

body.site-bg::before {
  top: -140px;
  right: -120px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at center, rgba(202, 138, 4, 0.35), transparent 70%);
}

body.site-bg::after {
  bottom: -140px;
  left: -100px;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.22), transparent 70%);
}

h1, h2, h3, h4, h5, h6, .brand {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
}

h1, h2, h3 {
    color: var(--heading);
}

/* Mixed Tech Grid Background */
.mesh-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: var(--bg-body);
  background-image: 
    linear-gradient(to right, rgba(148, 163, 184, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.mesh-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(248, 250, 252, 0), rgba(248, 250, 252, 0.88) 80%);
}

.brand {
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* CARDS - Light Mode Default */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 4px; /* Sharper corners for professionalism */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.5) 48%, rgba(255, 255, 255, 0) 68%);
  transform: translateX(-120%);
  transition: transform 0.65s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
}

.card:hover::before {
  transform: translateX(120%);
}

/* BUTTONS - Hybrid Style */
.btn-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark); /* Dark Button */
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.8rem 2rem;
  border-radius: 2px;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.btn-main:hover {
  background: var(--accent); /* Gold Hover */
  color: #fff;
  box-shadow: 0 10px 15px -3px rgba(202, 138, 4, 0.3); /* Gold Glow */
}

.btn-main::after {
  content: '';
  position: absolute;
  top: 0;
  left: -160%;
  width: 140%;
  height: 100%;
  transform: skewX(-20deg);
  background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
  transition: left 0.45s ease;
}

.btn-main:hover::after {
  left: 120%;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--bg-dark);
  border: 1px solid var(--border-dark);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.8rem 2rem;
  border-radius: 2px;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.75);
  color: var(--heading);
  border-radius: 4px;
  padding: 0.72rem 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(202, 138, 4, 0.6);
  box-shadow: 0 0 0 4px rgba(202, 138, 4, 0.12);
  background: #fff;
}

label {
  color: #475569;
}

/* NAVIGATION */
.nav-link {
    position: relative;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-light); /* Light text for Dark Header */
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: #fff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* UTILITIES */
.text-accent { color: var(--accent); }
.bg-accent { background-color: var(--accent); }
.border-accent { border-color: var(--accent); }

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

.text-heading-light { color: var(--heading-light); }
.text-heading-dark { color: var(--heading); }

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.85s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.85s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

header.scrolled {
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.22);
  border-bottom-color: rgba(148, 163, 184, 0.22);
}

@media (max-width: 768px) {
  .mesh-bg {
    background-size: 28px 28px;
  }

  .btn-main,
  .btn-outline {
    width: 100%;
    padding: 0.78rem 1.2rem;
  }

  body.site-bg::before,
  body.site-bg::after {
    opacity: 0.16;
    filter: blur(52px);
  }
}
