/* ========================================
   COMPONENTS
   ======================================== */

/* === HEADER === */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(9, 9, 11, 0.95);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
}

.header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent-primary) 50%,
    transparent 100%
  );
  opacity: 0.3;
}

.header .container {
  height: 100%;
}

/* === NAV === */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo a {
  font-size: 20px;
  font-weight: var(--font-weight-bold);
  color: var(--text-primary);
  letter-spacing: 0.5px;
  transition: color var(--transition-base);
}

.nav-logo a:hover {
  color: var(--accent-primary);
}

/* === NAV TOGGLE (Mobile) === */

.nav-toggle {
  display: none;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  z-index: 1001;
}

.nav-toggle:hover {
  color: var(--accent-primary);
}

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }
}

/* === NAV MENU === */

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-link {
  position: relative;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  padding: var(--space-xs) 0;
  transition: color var(--transition-base);
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-primary);
  transition: width var(--transition-base);
}

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

.nav-close {
  display: none;
}

/* === NAV MOBILE === */

@media (max-width: 767px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(280px, 85vw);
    max-width: 100%;
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
    padding: var(--space-2xl) var(--space-md);
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-subtle);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform var(--transition-slow), visibility var(--transition-slow);
    z-index: 1002;
  }
  
  .nav-menu[aria-expanded="true"] {
    transform: translateX(0);
    visibility: visible;
  }
  
  .nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    align-self: flex-end;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
  }
  
  .nav-link {
    padding: var(--space-sm);
    text-align: center;
  }
  
  .nav-link::after {
    display: none;
  }
}

/* === BACKDROP === */

.nav-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.nav-backdrop.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* === BUTTONS === */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 14px 32px;
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-md);
  transition: transform var(--transition-base), 
              background-color var(--transition-base),
              color var(--transition-base),
              box-shadow var(--transition-base);
  cursor: pointer;
  text-align: center;
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--accent-primary);
  color: var(--text-primary);
  box-shadow: 0 2px 12px rgba(139, 92, 246, 0.2);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(167, 139, 250, 0.2) 100%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.25);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent-accessible);
  border: 1px solid var(--accent-accessible);
}

.btn-secondary:hover {
  background-color: var(--accent-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* === CTA GROUP === */

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

@media (max-width: 767px) {
  .cta-group {
    flex-direction: column;
    width: 100%;
  }
  
  .cta-group .btn {
    width: 100%;
  }
}

/* === CARD === */

.card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-subtle);
  transition: transform var(--transition-base),
              border-color var(--transition-base),
              box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-hover);
}

.card h3 {
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.card p {
  color: var(--text-secondary);
  line-height: var(--line-height-relaxed);
}

/* === SECTION HEADER === */

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-title {
  margin-bottom: var(--space-sm);
  position: relative;
  display: inline-block;
}

/* Pixel corner markers */
.section-title::before,
.section-title::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background-color: var(--accent-primary);
}

.section-title::before {
  top: -12px;
  left: -12px;
  box-shadow: 
    6px 0 0 var(--accent-primary),
    0 6px 0 var(--accent-primary);
}

.section-title::after {
  top: -12px;
  right: -12px;
  box-shadow: 
    -6px 0 0 var(--accent-primary),
    0 6px 0 var(--accent-primary);
}

.section-subtitle {
  font-size: var(--font-size-body);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* === FOOTER === */

.footer {
  padding: var(--space-2xl) 0;
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent-primary) 50%,
    transparent 100%
  );
  opacity: 0.2;
}

.footer p {
  font-size: var(--font-size-small);
  color: var(--text-tertiary);
}

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

.footer a:hover {
  color: var(--accent-primary);
}
