/* ==========================================================================
   RGY Digital Design System — Global Styles
   ========================================================================== */

/* Fonts */
@import url("https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700,900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,400&display=swap");

/* Design Tokens */
:root {
  --bg-primary: #0a0a0a;
  --bg-surface: #141414;
  --bg-elevated: #1a1a1a;
  --border: #1f1f1f;
  --border-hover: #2a2a2a;
  --accent: #b8ff57;
  --accent-muted: rgba(184, 255, 87, 0.12);
  --accent-hover: #cdff85;
  --text-primary: #ededed;
  --text-secondary: #737373;
  --text-tertiary: #525252;
  --success: #22c55e;
  --warning: #eab308;
  --error: #ef4444;
  --info: #3b82f6;
  --font-display: "Satoshi", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Legacy aliases for existing components that reference old vars */
  --primary-color: #0a0a0a;
  --background-color: #141414;
  --button-color: #b8ff57;
  --background-secondary: #1a1a1a;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-width: thin;
  scrollbar-color: var(--border-hover) var(--bg-primary);
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

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

ul,
ol {
  list-style: none;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 40px;
  }
}

@media (min-width: 1280px) {
  .container {
    padding: 0 64px;
    max-width: 1440px;
  }
}

/* Typography Scale */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  letter-spacing: -0.01em;
}

h4 {
  font-size: 1.125rem;
}

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

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

.text-muted {
  color: var(--text-tertiary);
}

/* Sections */
section {
  padding: 80px 0;
}

@media (max-width: 768px) {
  section {
    padding: 48px 0;
  }
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-header p {
  margin-top: 16px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(184, 255, 87, 0.25);
}

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

.btn-ghost:hover {
  border-color: var(--text-tertiary);
  background: rgba(255, 255, 255, 0.03);
}

.btn-sm {
  font-size: 0.8125rem;
  padding: 8px 20px;
}

.btn-lg {
  font-size: 1rem;
  padding: 16px 36px;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.badge-accent {
  border-color: rgba(184, 255, 87, 0.2);
  background: var(--accent-muted);
  color: var(--accent);
}

/* Card */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: var(--border-hover);
}

/* Input */
.input {
  width: 100%;
  padding: 12px 16px;
  font-size: 0.9375rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

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

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border);
  border: none;
}

/* Utility: Visually Hidden (accessible) */
.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;
}

/* Header spacing — fixed nav offset */
.header {
  background: linear-gradient(
    95.93deg,
    #262626 -26.82%,
    rgba(38, 38, 38, 0) 40.46%
  );
  border-bottom: 1px solid var(--border);
}

.container-header {
  max-width: 1440px;
  margin: 0 auto;
  padding-top: 100px;
  padding-bottom: 100px;
}

.header-text {
  padding-left: 80px;
}

.header-text h1 {
  font-size: 38px;
  font-weight: 600;
  line-height: 150%;
  color: var(--text-primary);
  margin: 0;
  padding-bottom: 10px;
}

.header-text p {
  font-size: 16px;
  font-weight: 500;
  line-height: 150%;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 768px) {
  .container-header {
    padding-top: 120px;
    padding-bottom: 50px;
  }

  .header-text {
    padding: 0 16px;
  }

  .header-text h1 {
    font-size: 28px;
  }

  .header-text p {
    font-size: 14px;
  }
}
