/* ═══════════════════════════════════════════════════════════════════════════
   Brela Landing Page — Stylesheet
   Pure CSS, no dependencies. Targets sub-500ms load.
   Theme: Black & charcoal with subtle gray accents + scroll animations.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Custom Properties ──────────────────────────────────────────────────── */
:root {
  /* Primary palette — shades of black */
  --black-50: #fafafa;
  --black-100: #f0f0f0;
  --black-200: #e0e0e0;
  --black-300: #c0c0c0;
  --black-400: #8a8a8a;
  --black-500: #5a5a5a;
  --black-600: #333333;
  --black-700: #222222;
  --black-800: #1a1a1a;
  --black-900: #111111;
  --black-950: #0a0a0a;

  /* Surfaces */
  --bg: #fafafa;
  --bg-hero: linear-gradient(180deg, #f5f5f5 0%, #fafafa 100%);
  --surface: #ffffff;
  --surface-alt: #f5f5f5;

  /* Text */
  --text: #0a0a0a;
  --text-muted: #6b6b6b;
  --text-light: #999999;

  /* Terminal */
  --term-bg: #0a0a0a;
  --term-bar: #1a1a1a;
  --term-green: #34d399;
  --term-blue: #60a5fa;
  --term-yellow: #fbbf24;
  --term-purple: #a78bfa;
  --term-gray: #94a3b8;
  --term-white: #e2e8f0;
  --term-orange: #fb923c;

  /* Misc */
  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 100px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.10);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --container: 1120px;
  --gap: 2rem;
}

/* ── Keyframe Animations ────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(32px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes terminalType {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

@keyframes blinkCaret {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.08);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(0, 0, 0, 0.001);
  }
}

/* ── Scroll-triggered animation base ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

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

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Typography ─────────────────────────────────────────────────────────── */
h1,
h2,
h3 {
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}

h3 {
  font-size: 1.25rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--black-600);
  background: var(--black-100);
  padding: 0.375rem 1rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}

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

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-pill);
  padding: 0.875rem 2rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

/* Button shimmer effect on hover */
.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s ease;
}

.btn:hover::after {
  left: 100%;
}

.btn-primary {
  background: var(--black-900);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background: var(--black-950);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--black-900);
  border: 2px solid var(--black-200);
}

.btn-outline:hover {
  background: var(--black-50);
  border-color: var(--black-400);
}

.btn-sm {
  font-size: 0.875rem;
  padding: 0.625rem 1.5rem;
}

/* ── Navigation ─────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  animation: slideDown 0.6s ease-out;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--black-950);
}

.nav-logo-alpha {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-light);
}

.nav-logo-dot {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--black-900);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  transition: transform var(--transition);
}

.nav-logo:hover .nav-logo-dot {
  transform: rotate(8deg) scale(1.1);
}

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

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}

/* Underline hover animation */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--black-900);
  transition: width var(--transition);
}

.nav-links a:hover {
  color: var(--black-900);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-github {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

.nav-github svg {
  width: 20px;
  height: 20px;
  transition: transform var(--transition);
}

.nav-github:hover svg {
  transform: scale(1.15);
}

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

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding: 10rem 0 5rem;
  background: var(--bg-hero);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--black-200);
  border-radius: var(--radius-pill);
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--black-600);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-badge-icon {
  font-size: 1rem;
}

.hero h1 {
  margin-bottom: 1.5rem;
  color: var(--black-950);
  animation: fadeInUp 0.6s ease-out 0.35s both;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--black-900), var(--black-500));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
  animation: fadeInUp 0.6s ease-out 0.5s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 4rem;
  animation: fadeInUp 0.6s ease-out 0.65s both;
}

/* ── Terminal Mockup ────────────────────────────────────────────────────── */
.terminal {
  max-width: 680px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.08);
  text-align: left;
  position: relative;
  animation: scaleIn 0.7s ease-out 0.8s both;
}

.terminal:hover {
  animation: float 3s ease-in-out infinite;
}

.terminal-bar {
  background: var(--term-bar);
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot--red {
  background: #f87171;
}

.terminal-dot--yellow {
  background: #fbbf24;
}

.terminal-dot--green {
  background: #34d399;
}

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--term-gray);
  font-weight: 500;
}

.terminal-body {
  background: var(--term-bg);
  padding: 1.5rem 1.75rem;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'JetBrains Mono', monospace;
  font-size: 0.8125rem;
  line-height: 1.9;
  color: var(--term-white);
  min-height: 260px;
}

.terminal-body .prompt {
  color: var(--term-green);
}

.terminal-body .cmd {
  color: var(--term-white);
  font-weight: 600;
}

.terminal-body .flag {
  color: var(--term-yellow);
}

.terminal-body .comment {
  color: var(--term-gray);
  font-style: italic;
}

.terminal-body .output {
  color: var(--term-gray);
}

.terminal-body .highlight {
  color: var(--term-purple);
  font-weight: 600;
}

.terminal-body .val-blue {
  color: var(--term-blue);
}

.terminal-body .val-green {
  color: var(--term-green);
}

.terminal-body .val-orange {
  color: var(--term-orange);
}

.terminal-body .val-yellow {
  color: var(--term-yellow);
}

.terminal-line {
  white-space: nowrap;
}

.terminal-blank {
  height: 1.25rem;
}

/* ── Sections ───────────────────────────────────────────────────────────── */
section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

/* ── Features ───────────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--black-400), var(--black-900));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  background: var(--black-50);
  color: var(--black-800);
  transition: transform var(--transition), background var(--transition);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotate(-4deg);
  background: var(--black-100);
}

.feature-card h3 {
  margin-bottom: 0.75rem;
  color: var(--black-950);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ── How it Works ───────────────────────────────────────────────────────── */
.how-it-works {
  background: var(--surface);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 32px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--black-100), var(--black-300), var(--black-100));
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--black-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--black-600);
  margin: 0 auto 1.5rem;
  position: relative;
  z-index: 1;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.step:hover .step-number {
  background: var(--black-900);
  color: #fff;
  border-color: var(--black-900);
  transform: scale(1.15);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.step h3 {
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--text-muted);
  font-size: 0.9375rem;
  max-width: 240px;
  margin: 0 auto;
}

/* ── AI Tools ───────────────────────────────────────────────────────────── */
.tools-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  max-width: 720px;
  margin: 0 auto;
}

.tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--black-200);
  border-radius: var(--radius-pill);
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--black-950);
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.tool-pill:hover {
  border-color: var(--black-500);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  background: var(--black-900);
  color: #fff;
}

.tool-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--black-400);
  transition: background var(--transition);
}

.tool-pill:hover .tool-pill-dot {
  background: var(--term-green);
}

/* ── Get Started ────────────────────────────────────────────────────────── */
.get-started {
  background: var(--surface);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.get-started-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.install-block {
  background: var(--term-bg);
  border-radius: var(--radius);
  padding: 1.25rem 1.75rem;
  margin: 2rem auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 480px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.install-block:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.install-cmd {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.9375rem;
  color: var(--term-green);
}

.install-copy {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--term-gray);
  cursor: pointer;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  transition: all var(--transition);
}

.install-copy:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.get-started-steps {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin: 2.5rem 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.get-started-steps li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.get-started-steps strong {
  color: var(--black-900);
  font-weight: 600;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  padding: 3rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-muted);
}

.footer-brand-dot {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--black-900);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.5rem;
  font-weight: 800;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--black-900);
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-light);
}

/* ── Privacy Banner ─────────────────────────────────────────────────────── */
.privacy-banner {
  background: linear-gradient(135deg, var(--black-50), var(--surface-alt));
  border: 1px solid var(--black-200);
  border-radius: var(--radius-lg);
  padding: 2.5rem 3rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 800px;
  margin: 3rem auto 0;
  transition: all var(--transition);
}

.privacy-banner:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.privacy-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--black-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
  animation: pulseGlow 2.5s ease-in-out infinite;
}

.privacy-text h3 {
  margin-bottom: 0.375rem;
}

.privacy-text p {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .steps::before {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(250, 250, 250, 0.98);
    backdrop-filter: blur(16px);
    padding: 1.5rem;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    animation: fadeInUp 0.3s ease-out;
  }

  .hero {
    padding: 8rem 0 3rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

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

  .get-started-steps {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .privacy-banner {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .install-block {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .terminal-body {
    font-size: 0.6875rem;
    padding: 1rem 1.25rem;
  }

  .hero h1 {
    font-size: 1.875rem;
  }
}

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}