/**
 * Base Styles
 * Global typography and element defaults
 */

/* ==========================================
   HTML & BODY
   ========================================== */

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 36px; /* Space for urgency ticker */
}

/* Noise texture overlay for premium feel */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10000;
  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='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-wide);
  color: var(--text-primary);
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--text-primary) 0%, rgba(255,255,255,0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

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

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

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

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-base);
}

/* Paragraphs */
p {
  margin-bottom: var(--space-4);
}

p:last-child {
  margin-bottom: 0;
}

/* Lead text */
.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
}

/* Small text */
small,
.text-sm {
  font-size: var(--text-sm);
}

.text-xs {
  font-size: var(--text-xs);
}

/* Text colors */
.text-primary {
  color: var(--text-primary);
}

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

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

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

/* ==========================================
   LINKS
   ========================================== */

a {
  color: var(--green-bright);
  text-decoration: none;
  transition: var(--transition-color);
}

a:hover {
  color: var(--green-glow);
}

a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ==========================================
   SELECTION
   ========================================== */

::selection {
  background-color: var(--purple-mid);
  color: var(--text-primary);
}

::-moz-selection {
  background-color: var(--purple-mid);
  color: var(--text-primary);
}

/* ==========================================
   FOCUS STATES
   ========================================== */

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ==========================================
   IMAGES & MEDIA
   ========================================== */

img {
  height: auto;
}

figure {
  margin: 0;
}

figcaption {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

/* ==========================================
   LISTS (styled)
   ========================================== */

.styled-list {
  padding-left: var(--space-6);
}

.styled-list li {
  position: relative;
  margin-bottom: var(--space-2);
  padding-left: var(--space-2);
}

.styled-list li::before {
  content: '';
  position: absolute;
  left: calc(var(--space-6) * -1);
  top: 0.6em;
  width: 6px;
  height: 6px;
  background-color: var(--green-bright);
  border-radius: 50%;
}

/* ==========================================
   BLOCKQUOTES
   ========================================== */

blockquote {
  border-left: 3px solid var(--purple-mid);
  padding-left: var(--space-4);
  margin: var(--space-6) 0;
  font-style: italic;
  color: var(--text-secondary);
}

blockquote p {
  font-size: var(--text-lg);
}

cite {
  display: block;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-2);
  font-style: normal;
}

/* ==========================================
   HORIZONTAL RULES
   ========================================== */

hr {
  border: none;
  height: 1px;
  background: var(--border-color);
  margin: var(--space-8) 0;
}

/* ==========================================
   CODE
   ========================================== */

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background-color: var(--bg-elevated);
  padding: 0.1em 0.4em;
  border-radius: var(--radius-sm);
}

pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background-color: var(--bg-elevated);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
}

/* ==========================================
   TABLES
   ========================================== */

table {
  width: 100%;
  margin-bottom: var(--space-6);
}

th,
td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  font-family: var(--font-heading);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-wider);
  color: var(--text-secondary);
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

/* Visually hidden but 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-width: 0;
}

/* Hide visually and from screen readers */
.hidden {
  display: none !important;
}

/* Text alignment */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

/* Prevent scrolling (for when modal/menu is open) */
.no-scroll {
  overflow: hidden;
}
