/* ==========================================================================
   GOATMAXX.APP — MAIN DESIGN SYSTEM & FOUNDATION
   Inspired by devdchaudhary.com ultra-sleek dark aesthetic
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-black: #0a0a0c;
  --bg-card: rgba(255, 255, 255, 0.018);
  --bg-card-hover: rgba(255, 255, 255, 0.035);
  --bg-card-active: rgba(255, 255, 255, 0.05);

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-active: rgba(255, 255, 255, 0.28);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-faint: #475569;

  /* Accent Colors */
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.25);
  --accent-amber-light: #fbbf24;

  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.2);
  --accent-emerald-light: #34d399;

  --accent-indigo: #6366f1;
  --accent-indigo-glow: rgba(99, 102, 241, 0.18);

  --accent-rose: #f43f5e;
  --accent-rose-glow: rgba(244, 63, 94, 0.2);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Layout & Spacing */
  --max-width: 1040px;
  --header-height: 72px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 300ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-black);
  color: var(--text-secondary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background-color: var(--bg-black);
  color: var(--text-secondary);
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

::selection {
  background-color: var(--accent-amber);
  color: #000;
}

/* Atmospheric Glowing Mesh Background */
.ambient-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.mesh-glow {
  position: absolute;
  border-radius: 9999px;
  filter: blur(100px);
  will-change: transform;
}

.mesh-glow-1 {
  top: -15%;
  left: -12%;
  width: 60vw;
  height: 60vw;
  max-width: 800px;
  max-height: 800px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.14), transparent 70%);
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.mesh-glow-2 {
  top: 20%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  max-width: 700px;
  max-height: 700px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12), transparent 70%);
  animation: floatOrb 22s ease-in-out infinite alternate-reverse;
}

.mesh-glow-3 {
  bottom: 10%;
  left: 15%;
  width: 55vw;
  height: 55vw;
  max-width: 750px;
  max-height: 750px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08), transparent 70%);
  animation: floatOrb 25s ease-in-out infinite alternate;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.05); }
  100% { transform: translate(-20px, 30px) scale(0.95); }
}

/* Grain Overlay */
.site-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Layout Wrapper */
.app-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 640px) {
  .app-container {
    padding: 0 2rem;
  }
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

p {
  color: var(--text-muted);
}

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

/* Hairline Divider */
.hairline {
  height: 1px;
  width: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.09) 12%,
    rgba(255, 255, 255, 0.09) 88%,
    transparent
  );
  margin: 3rem 0;
}

@media (min-width: 640px) {
  .hairline {
    margin: 4rem 0;
  }
}

/* Pill Badges */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 9999px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  backdrop-filter: blur(8px);
  transition: all var(--transition-smooth);
}

.pill-badge:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

/* Live Status Dot */
.status-dot {
  position: relative;
  display: inline-flex;
  width: 8px;
  height: 8px;
}

.status-dot-ping {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background-color: var(--accent-emerald-light);
  opacity: 0.6;
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.status-dot-core {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: var(--accent-emerald-light);
}

@keyframes ping {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* ==========================================================================
   ADDITIONS — accessibility, motion, utility
   ========================================================================== */

/* Skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 500;
  padding: 0.7rem 1.1rem;
  border-radius: 10px;
  background: var(--accent-amber);
  color: #0a0a0c;
  font-weight: 700;
  font-size: 0.875rem;
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Consistent, visible focus for keyboard users only */
:focus-visible {
  outline: 2px solid var(--accent-amber);
  outline-offset: 3px;
  border-radius: 6px;
}

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

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

[hidden] { display: none !important; }

.text-faint { color: var(--text-faint); }

html { scroll-padding-top: calc(var(--header-height) + 1.5rem); }

/* Scroll reveal — elements start hidden only when JS is there to reveal them */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .mesh-glow { animation: none !important; }
}
