/* ========================================
   SQC General Contractors - Custom Styles
   ======================================== */

/* CSS Custom Properties */
:root {
  --color-primary: #E6A817;
  --color-primary-dark: #C48F10;
  --color-primary-light: #F5CC50;
  --color-dark-blue: #0A1628;
  --color-dark-blue-mid: #132240;
  --color-dark-blue-light: #1B3058;
  --color-bright-orange: #E8601C;
  --color-bright-orange-light: #F07A3A;
}

/* Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--color-primary);
  color: var(--color-dark-blue);
}

/* Focus states for accessibility */
*:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--color-dark-blue);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-light);
}

/* ========================================
   Preloader
   ======================================== */
#preloader {
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ========================================
   Ticker
   ======================================== */
.ticker-bar {
  position: relative;
}

.ticker-track {
  animation: ticker 30s linear infinite;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ========================================
   Navigation
   ======================================== */
#main-nav {
  background: transparent;
}

#main-nav.scrolled {
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#main-nav.scrolled .nav-spacer {
  height: 0;
  transition: height 0.3s ease;
}

.nav-spacer {
  transition: height 0.3s ease;
}

/* Nav link hover underline */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 60%;
}

/* Primary button text overlap fix */
.btn-primary {
  position: relative;
}

.btn-primary span:first-child {
  position: absolute;
}

.btn-primary span:last-child {
  position: relative;
}

/* Menu toggle animation */
#menu-toggle.active .menu-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

#menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

#menu-toggle.active .menu-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Mobile menu */
#mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

/* ========================================
   Hero
   ======================================== */
.hero-grid {
  background-image: 
    linear-gradient(rgba(230, 168, 23, 0.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 168, 23, 0.3) 1px, transparent 1px);
  background-size: 60px 60px;
}

.scroll-line {
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.3); }
}

/* ========================================
   Value Cards
   ======================================== */
.value-card {
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

/* ========================================
   Stats counter
   ======================================== */
.stat-item {
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

/* ========================================
   Contact Form
   ======================================== */
.contact-form-wrapper {
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 24px 100%, 0 calc(100% - 24px));
}

/* Form input focus animation */
.form-group {
  position: relative;
}

input:focus ~ .focus-line,
textarea:focus ~ .focus-line {
  transform: scaleX(1);
}

/* ========================================
   Cookie Banner
   ======================================== */
#cookie-banner.visible {
  transform: translateY(0);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================
   Responsive adjustments
   ======================================== */
@media (max-width: 768px) {
  .value-card {
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  }
  
  .contact-form-wrapper {
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  }
}

@media (max-width: 640px) {
  .hero-frame, .hero-frame-inner {
    display: none;
  }
}

/* ========================================
   Utility animations
   ======================================== */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
}

/* ========================================
   Print styles
   ======================================== */
@media print {
  #preloader, #cookie-banner, #mobile-menu, .ticker-bar {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
}