/* ============================================
   BYTENOTECHH — Base Styles (Pro Redesign)
   ============================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'liga' 1, 'calt' 1;
  text-rendering: optimizeLegibility;
}

/* Subtle noise texture overlay for depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--noise-opacity, 0.03);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  color: var(--text-primary);
  letter-spacing: var(--ls-tight);
}

h1 { font-size: var(--fs-h1); font-weight: var(--fw-extrabold); }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-bold); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-semibold); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-semibold); }

p {
  color: var(--text-secondary);
  line-height: var(--lh-normal);
}

a {
  color: var(--primary-400);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--primary-300);
}

ul, ol {
  list-style: none;
}

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

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
  outline: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

/* === Accessibility === */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-500);
  color: white;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  z-index: var(--z-toast);
  font-weight: var(--fw-semibold);
  transition: top var(--duration-fast);
}

.skip-link:focus {
  top: var(--space-md);
}

/* === Focus Styles === */
:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* === Selection === */
::selection {
  background: rgba(0, 166, 255, 0.3);
  color: #FFFFFF;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-600);
}

/* === Layout Utilities === */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.container-narrow {
  max-width: var(--container-narrow);
}

.container-wide {
  max-width: var(--container-wide);
}

.section {
  padding: var(--space-5xl) 0;
  position: relative;
  scroll-margin-top: calc(var(--nav-height) + 20px);
}

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

/* === Section Header === */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-3xl);
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 5px 14px;
  background: var(--gradient-card);
  border: 1px solid var(--card-border);
  border-left: 3px solid #FFD700;
  border-radius: 6px;
  font-size: var(--fs-tiny);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: var(--ls-widest);
  color: var(--primary-300);
  margin-bottom: var(--space-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

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

.section-description {
  font-size: var(--fs-body-lg);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  max-width: 580px;
  margin: 0 auto;
}

/* === Gradient Text === */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === Buttons (Professional & Crisp) === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  border-radius: 8px;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* Shimmer effect on primary button */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent);
  transition: left 0.6s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary-subtle);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(0, 166, 255, 0.35),
              0 4px 16px rgba(27, 11, 158, 0.4),
              inset 0 1px 0 rgba(255,255,255,0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 166, 255, 0.45),
              0 8px 24px rgba(27, 11, 158, 0.5),
              inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 6px rgba(0, 166, 255, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-color);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  color: #FFFFFF;
  background: rgba(0, 166, 255, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 2px 12px rgba(0, 166, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--primary-300);
  padding: 0.5rem 1rem;
}

.btn-ghost:hover {
  background: rgba(0, 166, 255, 0.08);
  color: var(--accent-cyan-light);
}

.btn-sm {
  padding: 0.55rem 1.25rem;
  font-size: var(--fs-body-sm);
  border-radius: 6px;
}

.btn-lg {
  padding: 0.95rem 2rem;
  font-size: var(--fs-body-lg);
  border-radius: 10px;
}

/* === Form Messages === */
.form-message {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  margin-top: var(--space-md);
  font-weight: var(--fw-medium);
  font-size: var(--fs-body-sm);
  animation: fadeInUp 0.4s var(--ease-out);
}

.form-message-success {
  background: rgba(52, 211, 153, 0.1);
  color: var(--success);
  border: 1px solid rgba(52, 211, 153, 0.2);
}

.form-message-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* === 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;
  }
}
