/* ===========================================
   BRAVADO SOLUTIONS - PREMIUM DARK THEME
   Tactical. Strategic. Cutting-Edge.
   =========================================== */

/* === ROOT VARIABLES === */
:root {
  /* Colors - Monochrome Premium Palette */
  --primary-black: #000000;
  --secondary-black: #0a0a0a;
  --tertiary-black: #151515;
  --dark-gray: #1f1f1f;
  --accent-silver: #e8e8e8;
  --mid-silver: #b8b8b8;
  --dark-silver: #888888;
  --pure-white: #ffffff;
  --accent-gold: #c9a961;
  --success-green: #4ade80;

  /* Typography */
  --font-heading: 'Orbitron', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing Scale */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 3rem;
  --spacing-xl: 5rem;

  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows & Glows */
  --shadow-subtle: 0 2px 8px rgba(0, 0, 0, 0.8);
  --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.9);
  --shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.95);
  --glow-white: 0 0 30px rgba(232, 232, 232, 0.3);
  --glow-silver: 0 0 20px rgba(184, 184, 184, 0.25);
  --glow-gold: 0 0 20px rgba(201, 169, 97, 0.4);

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Prevent text size adjustment on iOS */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--primary-black);
  color: var(--accent-silver);
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Better touch scrolling on iOS */
  -webkit-overflow-scrolling: touch;
  /* Prevent pull-to-refresh on iOS */
  overscroll-behavior-y: none;
}

/* === TYPOGRAPHY === */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--pure-white);
  letter-spacing: -0.02em;
  margin-bottom: var(--spacing-md);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
  color: var(--mid-silver);
}

a {
  color: var(--accent-silver);
  text-decoration: none;
  transition: all var(--transition-fast);
  /* Remove iOS tap highlight */
  -webkit-tap-highlight-color: transparent;
}

a:hover {
  color: var(--pure-white);
}

/* === UTILITY CLASSES === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.grid {
  display: grid;
  gap: var(--spacing-md);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (max-width: 768px) {

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* === NAVIGATION === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  /* Fallback for browsers that don't support backdrop-filter */
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(232, 232, 232, 0.1);
  transition: all var(--transition-normal);
  /* Ensure navbar stays on top on iOS */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Fallback for older iOS versions without backdrop-filter support */
@supports not (backdrop-filter: blur(20px)) {
  .navbar {
    background: rgba(0, 0, 0, 0.95);
  }
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.95);
  box-shadow: var(--shadow-medium);
  border-bottom-color: rgba(232, 232, 232, 0.15);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem var(--spacing-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--pure-white);
  transition: all var(--transition-normal);
}

.nav-logo img {
  height: 40px;
  width: auto;
  filter: drop-shadow(var(--glow-white));
  transition: all var(--transition-normal);
}

.nav-logo:hover img {
  filter: drop-shadow(0 0 25px rgba(232, 232, 232, 0.7));
  transform: scale(1.05);
}

.nav-brand {
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, var(--pure-white), var(--mid-silver));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  align-items: center;
}

.nav-menu a {
  position: relative;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mid-silver);
  padding: 0.5rem 0;
  transition: all var(--transition-fast);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--pure-white), var(--mid-silver));
  transition: width var(--transition-normal);
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--pure-white);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  /* Better touch target for mobile */
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  align-items: center;
  /* Prevent iOS tap highlight */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.nav-toggle span {
  width: 25px;
  height: 2px;
  background: var(--accent-silver);
  transition: all var(--transition-fast);
  border-radius: 2px;
}

.nav-toggle:hover span {
  background: var(--pure-white);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.98);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 2rem;
    border-left: 1px solid rgba(232, 232, 232, 0.1);
    box-shadow: var(--shadow-elevated);
    width: 280px;
    height: calc(100vh - 70px);
    /* Better iOS scrolling */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    gap: 1.5rem;
    transition: right var(--transition-normal);
    /* Hardware acceleration for smoother animation on iOS */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  .nav-menu.active {
    right: 0;
  }
}

/* === HERO SECTION === */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-md);
  position: relative;
  background:
    radial-gradient(ellipse at top, rgba(232, 232, 232, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(232, 232, 232, 0.02) 0%, transparent 50%),
    var(--primary-black);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%),
    repeating-linear-gradient(0deg, rgba(232, 232, 232, 0.02) 0px, transparent 1px, transparent 80px);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  animation: fadeInUp 1s var(--transition-normal) backwards;
}

.hero-logo {
  margin-bottom: var(--spacing-lg);
  animation: float 6s ease-in-out infinite;
}

.hero-logo img {
  height: 180px;
  width: auto;
  filter: drop-shadow(var(--glow-white));
  transition: all var(--transition-slow);
}

.hero-subtitle {
  font-size: 0.95rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid-silver);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  margin-bottom: var(--spacing-md);
  background: linear-gradient(135deg, var(--pure-white) 0%, var(--mid-silver) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--mid-silver);
  margin-bottom: var(--spacing-lg);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dark-silver);
  animation: scrollDown 2s ease-in-out infinite;
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  position: relative;
  overflow: hidden;
  /* Better mobile touch */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  /* Minimum touch target size for iOS */
  min-height: 44px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pure-white), var(--mid-silver));
  color: var(--primary-black);
  box-shadow: var(--shadow-subtle), var(--glow-white);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium), var(--glow-white);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-silver);
  border: 2px solid var(--mid-silver);
}

.btn-secondary:hover {
  border-color: var(--pure-white);
  color: var(--pure-white);
  box-shadow: var(--glow-silver);
  transform: translateY(-2px);
}

/* === SECTIONS === */
section {
  padding: var(--spacing-xl) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-label {
  font-size: 0.875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--dark-silver);
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-title {
  margin-bottom: var(--spacing-md);
}

.section-description {
  font-size: 1.125rem;
  color: var(--mid-silver);
  line-height: 1.8;
}

/* === CARDS === */
.card {
  background: linear-gradient(135deg, rgba(232, 232, 232, 0.03) 0%, rgba(0, 0, 0, 0.5) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(232, 232, 232, 0.08);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  transition: all var(--transition-normal);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(232, 232, 232, 0.05), transparent);
  transition: left 0.5s;
}

.card:hover::before {
  left: 100%;
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(232, 232, 232, 0.2);
  box-shadow: var(--shadow-elevated), var(--glow-silver);
  background: linear-gradient(135deg, rgba(232, 232, 232, 0.05) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
  filter: grayscale(20%);
}

.card-title {
  font-size: 1.35rem;
  margin-bottom: var(--spacing-sm);
  color: var(--pure-white);
}

.card-description {
  color: var(--mid-silver);
  line-height: 1.7;
  margin-bottom: var(--spacing-md);
}

/* === FORMS === */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--accent-silver);
  letter-spacing: 0.02em;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(232, 232, 232, 0.03);
  border: 1px solid rgba(232, 232, 232, 0.1);
  border-radius: var(--radius-sm);
  color: var(--accent-silver);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--pure-white);
  background: rgba(232, 232, 232, 0.05);
  box-shadow: 0 0 0 3px rgba(232, 232, 232, 0.1);
}

.form-textarea {
  min-height: 150px;
  resize: vertical;
}

/* === FOOTER === */
.footer {
  background: var(--secondary-black);
  border-top: 1px solid rgba(232, 232, 232, 0.08);
  padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
  font-size: 1rem;
  margin-bottom: var(--spacing-sm);
  color: var(--pure-white);
  letter-spacing: 0.05em;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: var(--dark-silver);
  font-size: 0.95rem;
}

.footer-section a:hover {
  color: var(--accent-silver);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(232, 232, 232, 0.05);
  color: var(--dark-silver);
  font-size: 0.875rem;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes scrollDown {

  0%,
  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }

  50% {
    transform: translateX(-50%) translateY(10px);
    opacity: 0.5;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s var(--transition-normal);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  :root {
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
  }

  .hero {
    min-height: 90vh;
  }

  .hero-logo img {
    height: 120px;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}