/**
 * Global Base Styles
 *
 * Minimal resets and base styles applied to all pages.
 * Heavy lifting done by Bootstrap 5 + _variables.css
 *
 * @package GFX_Theme
 * @since 1.0.0
 */

/* ========================================
   RESETS & NORMALIZATIONS
   ======================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Note: Do NOT add overflow-x: hidden to html - causes scrollbar issues */
}

body {
  overflow-x: hidden;
}

/* ========================================
   SELECTION STYLES
   ======================================== */

::selection {
  background-color: var(--gfx-primary);
  color: var(--gfx-white);
}

::-moz-selection {
  background-color: var(--gfx-primary);
  color: var(--gfx-white);
}

/* ========================================
   FOCUS STATES (ACCESSIBILITY)
   ======================================== */

:focus-visible {
  outline: 2px solid var(--gfx-primary);
  outline-offset: 2px;
}

/* ========================================
   IMAGES
   ======================================== */

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   SKIP LINK (ACCESSIBILITY)
   ======================================== */

.gfx-skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--gfx-space-3) var(--gfx-space-6);
  background: var(--gfx-primary);
  color: var(--gfx-white);
  text-decoration: none;
  font-weight: var(--gfx-font-semibold);
  border-radius: 0 0 var(--gfx-radius) var(--gfx-radius);
  z-index: 9999;
  transition: top var(--gfx-transition);
}

.gfx-skip-link:focus {
  top: 0;
  color: var(--gfx-white);
}

/* ========================================
   MAIN CONTENT
   ======================================== */

.gfx-main {
  min-height: calc(100vh - 200px);
}

/* ========================================
   SECTION SPACING
   ======================================== */

.gfx-section {
  padding: var(--gfx-space-16) 0;
}

.gfx-section-sm {
  padding: var(--gfx-space-10) 0;
}

.gfx-section-lg {
  padding: var(--gfx-space-20) 0;
}

/* ========================================
   TEXT UTILITIES
   ======================================== */

.gfx-eyebrow {
  font-size: var(--gfx-text-sm);
  font-weight: var(--gfx-font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gfx-primary);
  margin-bottom: var(--gfx-space-2);
}

.gfx-lead {
  font-size: var(--gfx-text-lg);
  line-height: var(--gfx-leading-relaxed);
  color: var(--gfx-gray);
}

/* ========================================
   BUTTON ENHANCEMENTS
   ======================================== */

.gfx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gfx-space-2);
  font-family: var(--gfx-font-body);
  font-weight: var(--gfx-font-semibold);
  padding: var(--gfx-space-3) var(--gfx-space-6);
  border-radius: var(--gfx-radius);
  transition: all var(--gfx-transition);
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
}

/* Primary Button - Logo blue, goes primary-light on hover */
.gfx-btn-primary {
  background: var(--gfx-primary);
  border-color: var(--gfx-primary);
  color: var(--gfx-white);
}

.gfx-btn-primary:hover,
.gfx-btn-primary:focus {
  background: var(--gfx-primary-dark);
  border-color: var(--gfx-primary-dark);
  color: var(--gfx-white);
  transform: translateY(-1px);
  box-shadow: var(--gfx-shadow);
}

/* Secondary Button - Dark blue, goes lighter on hover */
.gfx-btn-secondary {
  background: var(--gfx-primary-dark);
  border-color: var(--gfx-primary-dark);
  color: var(--gfx-white);
}

.gfx-btn-secondary:hover,
.gfx-btn-secondary:focus {
  background: var(--gfx-primary);
  border-color: var(--gfx-primary);
  color: var(--gfx-white);
  transform: translateY(-1px);
  box-shadow: var(--gfx-shadow);
}

/* Outline Button - Transparent, fills on hover */
.gfx-btn-outline {
  background: transparent;
  border: 2px solid var(--gfx-primary);
  color: var(--gfx-primary);
}

.gfx-btn-outline:hover,
.gfx-btn-outline:focus {
  background: var(--gfx-primary);
  border-color: var(--gfx-primary);
  color: var(--gfx-white);
  transform: translateY(-1px);
  box-shadow: var(--gfx-shadow);
}

/* Size Variations */
.gfx-btn-lg {
  padding: var(--gfx-space-4) var(--gfx-space-8);
  font-size: var(--gfx-text-lg);
}

.gfx-btn-sm {
  padding: var(--gfx-space-2) var(--gfx-space-4);
  font-size: var(--gfx-text-sm);
}

/* ========================================
   CARD COMPONENT
   ======================================== */

.gfx-card {
  background: var(--gfx-white);
  border-radius: var(--gfx-radius-lg);
  padding: var(--gfx-space-6);
  box-shadow: var(--gfx-shadow);
  transition: transform var(--gfx-transition), box-shadow var(--gfx-transition);
}

.gfx-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--gfx-shadow-lg);
}

.gfx-card-icon {
  width: 56px;
  height: 56px;
  background: var(--gfx-light);
  border-radius: var(--gfx-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--gfx-space-4);
  color: var(--gfx-primary);
  font-size: var(--gfx-text-2xl);
}

.gfx-card-title {
  font-size: var(--gfx-text-xl);
  font-weight: var(--gfx-font-bold);
  color: var(--gfx-primary-dark);
  margin-bottom: var(--gfx-space-2);
}

.gfx-card-text {
  color: var(--gfx-gray);
  margin-bottom: 0;
}

/* ========================================
   LOADING STATES
   ======================================== */

.gfx-loading {
  position: relative;
  pointer-events: none;
}

.gfx-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--gfx-light);
  border-top-color: var(--gfx-primary);
  border-radius: 50%;
  animation: gfx-spin 0.8s linear infinite;
}

@keyframes gfx-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   CTA SECTION (Shared Component)
   ======================================== */

.gfx-cta-section {
  min-height: 50vh;
  display: flex;
  align-items: center;
  padding: var(--gfx-space-16) 0;
  background: url('../images/cta-background.jpg') center / cover no-repeat;
  color: var(--gfx-white);
  position: relative;
}

.gfx-cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(var(--gfx-primary-rgb), 0.85) 0%, rgba(var(--gfx-primary-dark-rgb), 0.9) 100%);
  z-index: 0;
}

.gfx-cta-section > * {
  position: relative;
  z-index: 1;
}

.gfx-cta-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.gfx-cta-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--gfx-white);
  margin-bottom: var(--gfx-space-4);
}

.gfx-cta-description {
  font-size: var(--gfx-text-lg);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--gfx-space-8);
}

.gfx-cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gfx-space-4);
}

.gfx-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--gfx-space-2);
  padding: var(--gfx-space-4) var(--gfx-space-8);
  font-weight: var(--gfx-font-bold);
  font-size: var(--gfx-text-base);
  border-radius: var(--gfx-radius);
  text-decoration: none;
  transition: all var(--gfx-transition);
  border: 2px solid transparent;
}

/* CTA Primary - White, goes to primary-light on hover */
.gfx-cta-btn-primary {
  background: var(--gfx-white);
  border-color: var(--gfx-white);
  color: var(--gfx-primary-dark);
}

.gfx-cta-btn-primary:hover,
.gfx-cta-btn-primary:focus {
  background: var(--gfx-primary-dark);
  border-color: var(--gfx-primary-dark);
  color: var(--gfx-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* CTA Secondary - Outline white, fills on hover */
.gfx-cta-btn-secondary {
  background: transparent;
  border-color: var(--gfx-white);
  color: var(--gfx-white);
}

.gfx-cta-btn-secondary:hover,
.gfx-cta-btn-secondary:focus {
  background: var(--gfx-white);
  border-color: var(--gfx-white);
  color: var(--gfx-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */

@media (max-width: 767.98px) {
  .gfx-cta-section {
    padding: var(--gfx-space-10) 0;
  }
  .gfx-section {
    padding: var(--gfx-space-10) 0;
  }

  .gfx-section-lg {
    padding: var(--gfx-space-12) 0;
  }

  h1, .h1 {
    font-size: var(--gfx-text-3xl);
  }

  h2, .h2 {
    font-size: var(--gfx-text-2xl);
  }
}

/* ========================================
   SCROLL PROGRESS INDICATOR
   ======================================== */

.gfx-scroll-progress {
  position: fixed;
  right: 20px;
  top: 50%;
  z-index: 1100;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.3s ease;
  pointer-events: none;
  mix-blend-mode: difference;
}

.gfx-scroll-progress.visible {
  opacity: 1;
  pointer-events: auto;
}

.gfx-scroll-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

.gfx-scroll-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin-bottom: 12px;
  color: var(--gfx-white);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: var(--gfx-font-semibold);
}

.gfx-scroll-line {
  width: 2px;
  height: 70px;
  position: relative;
  background-color: rgba(255, 255, 255, 0.3);
}

.gfx-scroll-point {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 0%;
  background-color: var(--gfx-white);
  border-radius: 999px;
  transition: height 0.1s ease;
}

/* Hide on mobile */
@media (max-width: 991.98px) {
  .gfx-scroll-progress {
    display: none;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */

/* ========================================
   CUSTOM ICONS
   ======================================== */

/* Quadcopter/Drone icon - replaces bi-airplane for drones */
.bi-drone::before {
  content: "";
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Ccircle cx='4' cy='4' r='2.5'/%3E%3Ccircle cx='20' cy='4' r='2.5'/%3E%3Ccircle cx='4' cy='20' r='2.5'/%3E%3Ccircle cx='20' cy='20' r='2.5'/%3E%3Cpath d='M4 6.5v4.5h2v-4.5M18 6.5v4.5h2v-4.5M4 13v4.5h2v-4.5M18 13v4.5h2v-4.5'/%3E%3Crect x='6' y='9' width='12' height='6' rx='1'/%3E%3Ccircle cx='12' cy='12' r='2' fill='none' stroke='currentColor' stroke-width='1.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Ccircle cx='4' cy='4' r='2.5'/%3E%3Ccircle cx='20' cy='4' r='2.5'/%3E%3Ccircle cx='4' cy='20' r='2.5'/%3E%3Ccircle cx='20' cy='20' r='2.5'/%3E%3Cpath d='M4 6.5v4.5h2v-4.5M18 6.5v4.5h2v-4.5M4 13v4.5h2v-4.5M18 13v4.5h2v-4.5'/%3E%3Crect x='6' y='9' width='12' height='6' rx='1'/%3E%3Ccircle cx='12' cy='12' r='2' fill='none' stroke='currentColor' stroke-width='1.5'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-size: contain;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  .gfx-header,
  .gfx-footer,
  .gfx-skip-link {
    display: none !important;
  }

  .gfx-main {
    padding: 0;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }
}
