/* ============================================
   4byte Research - Styles
   ============================================ */

/* --- CSS Variables (Design System) --- */
:root {
  /* Background layers */
  --bg-primary: #09090B;
  --bg-secondary: #0F0F12;
  --bg-tertiary: #18181B;

  /* Brand purple spectrum */
  --brand-50: #EEEEF9;
  --brand-100: #DCDCF3;
  --brand-400: #9896D8;
  --brand-500: #7C80DE;
  --brand-600: #615DCE;
  --brand-800: #3D3A8C;
  --brand-950: #1A1933;

  /* Accent (CTA yellow) */
  --accent-primary: #F0CA32;
  --accent-hover: #F5D654;
  --accent-glow: rgba(240, 202, 50, 0.4);

  /* Text hierarchy */
  --text-primary: #FAFAFA;
  --text-secondary: #A1A1AA;
  --text-tertiary: #71717A;

  /* Glassmorphism */
  --glass-bg: rgba(35, 34, 68, 0.5);
  --glass-border: rgba(124, 128, 222, 0.2);
  --glass-blur: 10px;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Typography */
  --font-primary: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../assets/images/ether.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.12;
  z-index: -1;
  pointer-events: none;
}

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

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: var(--text-4xl);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-3xl);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--text-xl);
}

p {
  margin-bottom: var(--space-sm);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-3xl) 0;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) 0;
  transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
}

.nav.scrolled {
  background-color: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

.nav-logo {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.nav-logo span {
  color: var(--brand-500);
}

.nav-links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  position: relative;
  background: var(--accent-primary);
  color: var(--bg-primary);
  overflow: hidden;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent-glow);
  background: var(--accent-hover);
}

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

.btn-secondary:hover {
  border-color: var(--brand-500);
  background: rgba(124, 128, 222, 0.1);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
  position: relative;
}


.hero .container {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-size: var(--text-sm);
  color: var(--brand-400);
  margin-bottom: var(--space-lg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
}

.hero-title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-md);
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--brand-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  margin-bottom: var(--space-2xl);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-2xl);
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* --- Experience Section --- */
.experience {
  text-align: center;
}

.experience-label {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-lg);
}

.experience-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2xl);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.experience-logo {
  height: 32px;
  width: auto;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

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

.experience-quote {
  max-width: 600px;
  margin: 0 auto;
  font-size: var(--text-lg);
  color: var(--text-secondary);
  font-style: italic;
}

/* --- Services Section --- */

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

.section-title {
  margin-bottom: var(--space-sm);
}

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

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.service-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-500);
}

.service-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-500) 100%);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  color: var(--text-primary);
}

.service-title {
  margin-bottom: var(--space-sm);
}

.service-description {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.service-features {
  list-style: none;
}

.service-features li {
  position: relative;
  padding-left: var(--space-md);
  margin-bottom: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.service-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  background: var(--brand-500);
  border-radius: 50%;
}

/* --- Contact Section --- */

.contact-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.contact-title {
  margin-bottom: var(--space-md);
}

.contact-text {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xl);
}

/* Contact Form */
.contact-form {
  text-align: left;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

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

.form-group-full {
  margin-top: var(--space-md);
}

.form-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.form-input {
  padding: 0.875rem 1rem;
  font-family: var(--font-primary);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(124, 128, 222, 0.2);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A1A1AA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-select option {
  background: var(--bg-primary);
  color: var(--text-primary);
}

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

.form-submit {
  width: 100%;
  margin-top: var(--space-lg);
}

.form-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* hCaptcha styling */
.h-captcha {
  margin-top: var(--space-md);
  display: flex;
  justify-content: center;
}

/* Form messages */
.form-message {
  text-align: center;
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-top: var(--space-lg);
  font-weight: 500;
}

.form-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10B981;
}

.form-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #EF4444;
}

/* Form responsive */
@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Why Us Section --- */

.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.why-item {
  padding: var(--space-lg);
  border-left: 2px solid var(--brand-600);
}

.why-number {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--brand-500);
  margin-bottom: var(--space-xs);
}

.why-title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xs);
}

.why-description {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: 0;
}

/* --- Careers Section --- */
.careers {
  text-align: center;
}

.careers-content {
  max-width: 600px;
  margin: 0 auto;
}

.careers-badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-500) 100%);
  border-radius: 100px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.careers-title {
  margin-bottom: var(--space-md);
}

.careers-text {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

/* --- Footer --- */
.footer {
  padding: var(--space-lg) 0;
  text-align: center;
}

.footer-text {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-bottom: var(--space-xs);
}

.footer-credit {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  opacity: 0.7;
}

.footer-credit a {
  color: var(--brand-400);
  transition: color 0.2s ease;
}

.footer-credit a:hover {
  color: var(--brand-500);
}

/* --- Mobile Navigation --- */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 99;
  padding: 100px var(--space-md) var(--space-md);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.mobile-menu-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  text-align: center;
}

.mobile-menu-links a {
  font-size: var(--text-2xl);
  color: var(--text-primary);
  font-weight: 500;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --text-4xl: 2rem;
    --text-3xl: 1.75rem;
    --text-2xl: 1.25rem;
  }

  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .mobile-menu {
    display: block;
  }

  .hero {
    padding-top: 100px;
    min-height: auto;
    padding-bottom: var(--space-3xl);
  }

  .hero-stats {
    gap: var(--space-lg);
  }

  .stat-value {
    font-size: var(--text-2xl);
  }

  .experience-logos {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .section {
    padding: var(--space-2xl) 0;
  }
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  :root {
    --text-5xl: 3.5rem;
    --text-4xl: 2.5rem;
  }

  .hero-title {
    font-size: var(--text-5xl);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
