/*
Theme Name: Human V1 Theme
Theme URI: https://humanv1.com
Author: Human V1
Author URI: https://humanv1.com
Description: Production WordPress theme for humanv1.com. High-performance, semantic, responsive, dark/light technical aesthetic for the Human performance app ecosystem.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.2
Text Domain: human-v1-theme
*/

:root {
  /* Brand Palette */
  --human-electric-blue: #0066FF;
  --human-electric-blue-pressed: #0052D4;
  --human-electric-blue-muted: #003399;
  --human-dark-bg: #0A0D10;
  --human-dark-surface: #121519;
  --human-dark-elevated: #1C2026;
  --human-light-bg: #F4F6F8;
  --human-white: #FFFFFF;
  --human-text-primary: #111827;
  --human-text-muted: #6B7280;
  --human-border-dark: #2A303A;
  --human-border-light: #E5E7EB;
  
  /* Status Colors */
  --human-success: #10B981;
  --human-warning: #F59E0B;
  --human-error: #EF4444;

  /* Fonts */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* Reset & Base Styling */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: #E2E8F0;
  background-color: var(--human-dark-bg);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--human-dark-bg);
}

a {
  color: var(--human-electric-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #3385FF;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Typography Utility Classes */
h1, h2, h3, h4, h5, h6 {
  color: var(--human-white);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.display-title {
  font-size: clamp(1.85rem, 5.5vw, 4.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-title {
  font-size: clamp(1.4rem, 4.5vw, 2.75rem);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--human-electric-blue);
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: inline-block;
}

/* Layout Utilities & Grids */
.section-padding {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.card-padding {
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.75rem, 4vw, 4rem);
  align-items: center;
}

.grid-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 3vw, 2rem);
}

.grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
}

.btn-group {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

/* Buttons & CTAs */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  min-height: 44px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--human-electric-blue);
  color: var(--human-white);
}

.btn-primary:hover {
  background-color: var(--human-electric-blue-pressed);
  color: var(--human-white);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--human-dark-elevated);
  color: var(--human-white);
  border-color: var(--human-border-dark);
}

.btn-secondary:hover {
  background-color: #262B33;
  color: var(--human-white);
  border-color: #3F4754;
}

.btn-outline {
  background-color: transparent;
  color: var(--human-white);
  border-color: var(--human-border-dark);
}

.btn-outline:hover {
  border-color: var(--human-electric-blue);
  color: var(--human-electric-blue);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-available {
  background-color: rgba(16, 185, 129, 0.12);
  color: var(--human-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-dev {
  background-color: rgba(0, 102, 255, 0.12);
  color: var(--human-electric-blue);
  border: 1px solid rgba(0, 102, 255, 0.3);
}

.badge-planned {
  background-color: rgba(107, 114, 128, 0.12);
  color: #9CA3AF;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.badge-coming {
  background-color: rgba(245, 158, 11, 0.12);
  color: var(--human-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Structural Components */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(10, 13, 16, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--human-border-dark);
  padding: 0.85rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--human-white);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--human-electric-blue), #003399);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
  font-size: 0.9rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.main-nav a {
  color: #94A3B8;
  font-weight: 500;
  font-size: 0.95rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--human-white);
}

/* Mobile Nav Toggle Button */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--human-border-dark);
  color: var(--human-white);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus-visible {
  border-color: var(--human-electric-blue);
  outline: none;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 14px;
}

.hamburger-bar {
  width: 100%;
  height: 2px;
  background-color: var(--human-white);
  border-radius: 2px;
  transition: all 0.25s ease;
}

.mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
}

.mobile-nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.site-footer {
  background-color: var(--human-dark-surface);
  border-top: 1px solid var(--human-border-dark);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--human-white);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col a {
  color: #94A3B8;
  font-size: 0.9rem;
  padding: 0.2rem 0;
  display: inline-block;
}

.footer-col a:hover {
  color: var(--human-white);
}

.footer-bottom {
  border-top: 1px solid var(--human-border-dark);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: #64748B;
  font-size: 0.85rem;
  flex-wrap: wrap;
}

/* RESPONSIVE BREAKPOINTS */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

/* Small Tablet & Mobile Header Collapse (868px and below) */
@media (max-width: 868px) {
  .grid-2col {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .grid-3col {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .grid-4col {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: rgba(10, 13, 16, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--human-border-dark);
    padding: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav li {
    width: 100%;
  }

  .main-nav a {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1.05rem;
    color: #E2E8F0;
  }

  .main-nav a:hover,
  .main-nav a.active {
    background-color: var(--human-dark-surface);
    color: var(--human-electric-blue);
  }

  .header-cta {
    display: none;
  }

  .main-nav .mobile-cta-item {
    display: block;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--human-border-dark);
    width: 100%;
  }

  .main-nav .mobile-cta-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* Mobile Devices (640px and below) */
@media (max-width: 640px) {
  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .grid-4col {
    grid-template-columns: 1fr;
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-group .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  /* Code block overflow protection */
  pre, code, .entry-content pre {
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
  }
}

/* Ultra-compact Phones (360px and below) */
@media (max-width: 360px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .brand-logo {
    font-size: 1.15rem;
  }

  .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
}
