/* 
===========================================================================
DeHash Technologies - Custom Styles
Brand: DeHash
Tagline: Dream. Develop. Deploy.
===========================================================================
*/

/* --- 1. CSS Custom Properties --- */
:root {
  --color-primary-dark: #171717;
  --color-secondary-slate: #64748B;
  --color-background: #FFFFFF;
  --color-soft-background: #F8FAFC;
  --color-border: #E2E8F0;
  --color-accent-blue: #2563EB;
  --color-accent-hover: #1D4ED8;
  
  --header-height: 4rem; /* 64px */
  --header-height-lg: 5rem; /* 80px */
}

/* --- 2. Smooth Scroll Behavior --- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height-lg);
}

/* --- 3. Custom Scrollbar Styling --- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-soft-background);
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-secondary-slate);
}

/* --- 4. Selection Color Styling --- */
::selection {
  background-color: var(--color-accent-blue);
  color: #FFFFFF;
}

/* --- 5. Loading/Page Transition Styles --- */
body {
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}
body.loaded {
  opacity: 1;
}

/* --- 6. Hero Canvas Animation Container --- */
#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
.hero-section {
  position: relative;
  overflow: hidden;
  z-index: 1;
}
/* 18. Subtle Gradient Overlays for Hero */
.hero-gradient {
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(248,250,252,0.7) 100%);
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* --- 7. Scroll Reveal Animations --- */
[data-reveal] {
  opacity: 0;
  will-change: transform, opacity;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal="up"] {
  transform: translateY(40px);
}
[data-reveal="left"] {
  transform: translateX(-40px);
}
[data-reveal="right"] {
  transform: translateX(40px);
}
[data-reveal="scale"] {
  transform: scale(0.9);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* --- 8. Counter Animation Styles --- */
[data-counter] {
  font-variant-numeric: tabular-nums;
}

/* --- 9. FAQ Accordion Transition Styles --- */
.faq-content {
  overflow: hidden;
  transition: height 0.4s ease, opacity 0.4s ease;
}
.faq-content[aria-hidden="true"] {
  height: 0;
  opacity: 0;
}
.faq-content[aria-hidden="false"] {
  opacity: 1;
}
.faq-toggle-icon {
  transition: transform 0.3s ease;
}
[aria-expanded="true"] .faq-toggle-icon {
  transform: rotate(180deg);
}

/* --- 10. Card Hover Elevation Effects --- */
.hover-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* --- 11. Service Card Number Styling --- */
.service-card-number {
  font-size: 6rem;
  font-weight: 900;
  color: var(--color-primary-dark);
  opacity: 0.05;
  position: absolute;
  top: -1rem;
  right: -1rem;
  line-height: 1;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.hover-card:hover .service-card-number {
  opacity: 0.1;
}

/* --- 12. Process/Timeline Connector Lines --- */
.timeline-line {
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--color-border);
  z-index: -1;
}
@media (min-width: 1024px) {
  .timeline-line.horizontal {
    left: 0;
    right: 0;
    top: 24px;
    height: 2px;
    width: 100%;
  }
}

/* --- 13. Technology Badge Styles --- */
.tech-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background-color: var(--color-soft-background);
  color: var(--color-secondary-slate);
  border: 1px solid var(--color-border);
  transition: all 0.2s ease;
}
.tech-badge:hover {
  border-color: var(--color-accent-blue);
  color: var(--color-accent-blue);
}

/* --- 14. Form Input Focus Styles --- */
.form-input {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--color-accent-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.form-input.is-invalid {
  border-color: #EF4444;
}
.form-input.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.form-error {
  color: #EF4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}
.form-error.is-visible {
  display: block;
}

/* --- 15. Mobile Menu Animation --- */
#mobile-menu {
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: top;
  position: absolute;
  width: 100%;
}
#mobile-menu.hidden {
  display: none;
}
#mobile-menu.entering {
  display: block;
  opacity: 0;
  transform: translateY(-10px);
}
#mobile-menu.entered {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* --- 16. Navbar Scroll State --- */
#navbar.scrolled {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  background-color: rgba(255, 255, 255, 0.95);
}
.nav-brand {
  background-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* --- 17. CTA Button Hover Effects --- */
.btn-cta {
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.btn-cta::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300%;
  height: 300%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 60%);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.4s ease-out;
}
.btn-cta:hover::after {
  transform: translate(-50%, -50%) scale(1);
}
.btn-cta:active {
  transform: scale(0.98);
}

/* --- 21. Custom Utilities --- */
.text-balance {
  text-wrap: balance;
}

/* --- 19. prefers-reduced-motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  [data-reveal], [data-reveal].revealed {
    opacity: 1;
    transform: none !important;
    transition: none !important;
  }
  
  .faq-content {
    transition: none !important;
  }
}

/* --- 20. Print Styles --- */
@media print {
  #navbar, #mobile-menu, .btn-cta, footer .social-links {
    display: none !important;
  }
  body {
    color: #000;
    background: #fff;
  }
  .tech-badge {
    border: 1px solid #000;
  }
  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }
}
