/* ============================================
   0xhades — Style System
   ============================================ */

:root {
  --bg-primary: #050505;
  --bg-secondary: #0a0a0a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);

  --purple: #7c3aed;
  --purple-light: #a78bfa;
  --purple-dark: #5b21b6;
  --purple-glow: rgba(124, 58, 237, 0.15);
  --purple-glow-subtle: rgba(124, 58, 237, 0.08);

  --white: #ffffff;
  --text-primary: #e5e5e5;
  --text-secondary: #888888;
  --text-muted: #555555;

  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(124, 58, 237, 0.4);

  --ff-heading: 'Space Grotesk', sans-serif;
  --ff-body: 'Inter', sans-serif;
  --ff-mono: 'JetBrains Mono', monospace;
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  --section-pad: 100px;
  --container-max: 1200px;
}

/* ============================================
   RESET
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--ff-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

input, textarea {
  font: inherit;
  background: none;
  border: none;
  outline: none;
  color: inherit;
}

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

/* ============================================
   NOISE OVERLAY
   ============================================ */

.noise {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
}

/* ============================================
   CURSOR GLOW
   ============================================ */

.cursor-glow {
  position: fixed;
  width: 750px;
  height: 750px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.1), transparent 70%);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}

body:hover .cursor-glow {
  opacity: 1;
}

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

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--purple-light), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section {
  padding: var(--section-pad) 0;
  position: relative;
}

.section-dark {
  background: var(--bg-secondary);
}

.section-header {
  max-width: 640px;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--ff-heading);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 20px;
}

.section-sub {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 540px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-body);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: 10px;
  transition: all var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
}

.btn-primary {
  background: var(--white);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: var(--purple);
  color: var(--white);
  box-shadow: 0 0 20px var(--purple-glow-subtle);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

.btn-ghost:hover {
  color: var(--white);
  border-color: var(--white);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 13px;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ============================================
   NAVIGATION
   ============================================ */

.nav-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 20px 0;
  transition: all var(--transition-base);
}

.nav-header.scrolled {
  padding: 12px 0;
  background: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  z-index: 101;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo-mark {
  position: relative;
  isolation: isolate;
  height: 56px;
  aspect-ratio: 1024 / 1536;
  flex-shrink: 0;
}

.nav-logo-mark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-primary);
}

.nav-logo-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../images/0xhades.png');
  background-color: #fff;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-blend-mode: difference;
  mix-blend-mode: screen;
}

.nav-logo-mark-sm {
  height: 32px;
}

.nav-logo-text {
  font-family: var(--ff-mono);
  font-size: 19px;
  font-weight: 500;
  color: var(--white);
  letter-spacing: 0.5px;
  font-feature-settings: "zero" 1;
  text-shadow: 0 0 30px rgba(124, 58, 237, 0.3);
}

.logo-prefix {
  color: var(--purple);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 40px;
}

.nav-link {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--purple);
  transition: width var(--transition-base);
}

.nav-link:hover {
  color: var(--white);
}

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

.nav-cta {
  display: none;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 32px;
  height: 32px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--white);
  transition: all var(--transition-base);
  transform-origin: center;
}

.nav-toggle.active span:first-child {
  transform: rotate(45deg) translate(2.5px, 2.5px);
}

.nav-toggle.active span:last-child {
  transform: rotate(-45deg) translate(2.5px, -2.5px);
}

/* ============================================
   MOBILE MENU
   ============================================ */

.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.95);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-slow);
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.mobile-link {
  font-family: var(--ff-heading);
  font-size: 32px;
  font-weight: 600;
  color: var(--text-secondary);
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--transition-base);
}

.mobile-menu.active .mobile-link {
  transform: translateY(0);
  opacity: 1;
}

.mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 0.2s; }

.mobile-link:hover {
  color: var(--white);
}

.mobile-cta {
  margin-top: 16px;
  transform: translateY(20px);
  opacity: 0;
  transition: all var(--transition-base);
}

.mobile-menu.active .mobile-cta {
  transform: translateY(0);
  opacity: 1;
  transition-delay: 0.25s;
}

/* ============================================
   HERO
   ============================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, var(--purple-glow), transparent 70%);
  transform: translate(-50%, -55%);
  animation: heroFloat 20s ease-in-out infinite;
}

.hero-glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.08), transparent 70%);
  transform: translate(-30%, -40%);
  animation: heroFloat2 25s ease-in-out infinite;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 20%, transparent 70%);
}

/* Hero Emblem — logo background effect */

.hero-emblem {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: 500px;
  height: 500px;
  pointer-events: none;
}

.hero-emblem img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hero-emblem-glow {
  filter: invert(1) sepia(1) saturate(8) hue-rotate(230deg) brightness(1.5) blur(35px);
  opacity: 0.12;
  mix-blend-mode: screen;
  animation: emblemPulse 8s ease-in-out infinite;
}

.hero-emblem-main {
  filter: invert(1);
  opacity: 0.05;
  mix-blend-mode: screen;
  animation: emblemPulse 8s ease-in-out infinite 1s;
  mask-image: radial-gradient(circle, black 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle, black 40%, transparent 75%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 24px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: 100px;
  margin-bottom: 40px;
  opacity: 0;
}

.badge-pulse {
  width: 8px;
  height: 8px;
  background: var(--purple);
  border-radius: 50%;
  position: relative;
}

.badge-pulse::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--purple);
  animation: pulse 2s ease-in-out infinite;
}

.hero-title {
  font-family: var(--ff-heading);
  font-size: clamp(48px, 10vw, 96px);
  font-weight: 700;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 28px;
  letter-spacing: -2px;
}

.hero-line {
  display: block;
  overflow: hidden;
  opacity: 0;
}

/* Scramble decode characters */
.scramble-char {
  color: var(--purple-light);
  opacity: 0.6;
}

.hero-sub {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 580px;
  margin: 0 auto 44px;
  opacity: 0;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  opacity: 0;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ============================================
   SERVICES
   ============================================ */

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.service-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 32px;
  transition: border-color var(--transition-slow), box-shadow var(--transition-slow), background var(--transition-slow);
  overflow: hidden;
  will-change: transform;
}

/* Mouse spotlight on cards */
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    circle 250px at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(124, 58, 237, 0.12),
    transparent
  );
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.service-card:hover::after {
  opacity: 1;
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px var(--purple-glow-subtle);
}

.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(124, 58, 237, 0.1);
  color: var(--purple);
  margin-bottom: 24px;
  transition: all var(--transition-base);
  position: relative;
  z-index: 1;
}

.service-card:hover .service-icon {
  background: rgba(124, 58, 237, 0.2);
  box-shadow: 0 0 20px var(--purple-glow-subtle);
}

.service-title {
  font-family: var(--ff-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.service-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* ============================================
   APPROACH
   ============================================ */

.approach-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.approach-item {
  padding: 36px 32px;
  border-left: 1px solid var(--border);
  transition: border-color var(--transition-base);
}

.approach-item:hover {
  border-color: var(--purple);
}

.approach-num {
  display: block;
  font-family: var(--ff-mono);
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.4;
  line-height: 1;
  margin-bottom: 20px;
}

.approach-title {
  font-family: var(--ff-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 12px;
}

.approach-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   MARQUEE
   ============================================ */

.marquee-section {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-secondary);
}

.marquee {
  overflow: hidden;
  width: 100%;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 40px;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  width: max-content;
}

.marquee-track span {
  font-family: var(--ff-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 3px;
  flex-shrink: 0;
}

.marquee-dot {
  color: var(--purple) !important;
  font-size: 10px !important;
  letter-spacing: 0 !important;
}

/* ============================================
   CONTACT
   ============================================ */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
}

.contact-sub {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 480px;
}

.contact-socials {
  display: flex;
  gap: 16px;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

.social-link:hover {
  color: var(--white);
  border-color: var(--border-hover);
  background: rgba(124, 58, 237, 0.1);
}

/* Contact Form */

.contact-form-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  color: var(--white);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px var(--purple-glow-subtle);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer-logo .nav-logo-text {
  font-size: 16px;
}

.footer-logo {
  opacity: 0.7;
  transition: opacity var(--transition-base);
}

.footer-logo:hover {
  opacity: 1;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-socials a {
  color: var(--text-muted);
  transition: color var(--transition-base);
}

.footer-socials a:hover {
  color: var(--purple);
}

/* ============================================
   REVEAL ANIMATION BASE
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(40px);
}

/* ============================================
   KEYFRAMES
   ============================================ */

@keyframes heroFloat {
  0%, 100% { transform: translate(-50%, -55%); }
  33% { transform: translate(-45%, -50%); }
  66% { transform: translate(-55%, -60%); }
}

@keyframes heroFloat2 {
  0%, 100% { transform: translate(-30%, -40%); }
  50% { transform: translate(-70%, -60%); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0; transform: scale(2.5); }
}

@keyframes emblemPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes scrollPulse {
  0% { opacity: 1; transform: scaleY(1); transform-origin: top; }
  50% { opacity: 0.3; }
  100% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

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

/* ============================================
   RESPONSIVE — 640px+
   ============================================ */

@media (min-width: 640px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr 1fr;
  }

  .approach-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================
   RESPONSIVE — 768px+
   ============================================ */

@media (min-width: 768px) {
  .hero-emblem {
    width: 650px;
    height: 650px;
  }

  :root {
    --section-pad: 120px;
  }

  .container {
    padding: 0 40px;
  }

  .section-header {
    margin-bottom: 80px;
  }

  .hero-badge {
    margin-bottom: 48px;
  }

  .hero-title {
    letter-spacing: -3px;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }

  .contact-layout {
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
  }
}

/* ============================================
   RESPONSIVE — 1024px+
   ============================================ */

@media (min-width: 1024px) {
  :root {
    --section-pad: 140px;
  }

  /* Grid nav for proper centering */
  .nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .nav-cta {
    display: inline-flex;
    justify-self: end;
  }

  .nav-links {
    display: flex;
    justify-self: center;
  }

  .nav-toggle {
    display: none;
  }

  .approach-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .btn-full {
    width: auto;
  }
}

/* ============================================
   RESPONSIVE — 1200px+
   ============================================ */

@media (min-width: 1200px) {
  .hero-emblem {
    width: 750px;
    height: 750px;
  }

  .hero-content {
    max-width: 900px;
  }

  body::-webkit-scrollbar {
    width: 12px;
  }

  body::-webkit-scrollbar-track {
    background: var(--bg-primary);
  }

  body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border: 3px solid var(--bg-primary);
    border-radius: 10px;
  }

  body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
  }
}
