/* ==========================================================================
   Typography System for STRIKE
   ========================================================================== */

/* Google Fonts are already loaded in index.html:
   - Inter (400, 500, 600) - body
   - Inter Tight (700, 800) - headings
   - JetBrains Mono (400, 500) - monospace
   - Josefin Sans (700) - orbital animation only
*/

/* ==========================================================================
   Type Scale (Fluid Typography)
   ========================================================================== */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  font-weight: 400;
  line-height: 1.6;
  color: hsl(var(--txt));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-weight: 800;
  line-height: 1.2;
  color: hsl(var(--txt));
  margin: 0;
  text-wrap: balance;
}

h1, .h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  letter-spacing: -0.02em;
}

h2, .h2,
.section-title {
  font-size: clamp(2rem, 4vw + 0.5rem, 3.5rem);
  letter-spacing: -0.02em;
}

h3, .h3 {
  font-size: clamp(1.5rem, 3vw + 0.5rem, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h4, .h4 {
  font-size: clamp(1.25rem, 2.5vw + 0.25rem, 1.75rem);
  font-weight: 700;
}

h5, .h5 {
  font-size: clamp(1.125rem, 2vw + 0.125rem, 1.5rem);
  font-weight: 600;
}

h6, .h6 {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 600;
}

/* Hero typography */
.hero__title {
  font-family: 'Inter Tight', sans-serif;
  font-size: clamp(2.5rem, 6vw + 1rem, 5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, hsl(var(--txt)), hsl(var(--accent)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-4);
}

.hero__subtitle {
  font-size: clamp(1.125rem, 2vw + 0.25rem, 1.5rem);
  font-weight: 500;
  line-height: 1.6;
  color: hsl(var(--muted));
  max-width: 700px;
  margin: 0 auto var(--space-5);
}

/* Section typography */
.section-title {
  text-align: center;
  margin-bottom: var(--space-3);
  background: linear-gradient(135deg, hsl(var(--txt)), hsl(var(--accent)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 500;
  color: hsl(var(--muted));
  line-height: 1.6;
}

/* Body text variants */
p {
  margin: 0 0 var(--space-3) 0;
  line-height: 1.7;
}

.text-large {
  font-size: clamp(1.125rem, 2vw + 0.125rem, 1.375rem);
  line-height: 1.7;
}

.text-small {
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  line-height: 1.6;
}

.text-muted {
  color: hsl(var(--muted));
}

.text-accent {
  color: hsl(var(--accent));
}

.text-strike {
  color: hsl(var(--strike));
}

/* Font weights */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* Monospace (for code/technical content) */
code, kbd, pre, samp, .mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.9em;
}

code {
  padding: 0.125rem 0.375rem;
  background: hsl(var(--outline));
  border-radius: var(--radius-sm);
  color: hsl(var(--accent));
}

pre {
  padding: var(--space-4);
  background: hsl(var(--bg-elev));
  border: 1px solid hsl(var(--outline));
  border-radius: var(--radius-md);
  overflow-x: auto;
  line-height: 1.6;
}

pre code {
  padding: 0;
  background: none;
  color: hsl(var(--txt));
}

/* Links */
a {
  color: hsl(var(--accent));
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: hsl(var(--lime));
}

a:focus-visible {
  outline: 2px solid hsl(var(--accent));
  outline-offset: 2px;
  border-radius: 2px;
}

/* Lists */
ul, ol {
  padding-left: var(--space-4);
}

ul li, ol li {
  margin-bottom: var(--space-2);
  line-height: 1.7;
}

/* Blockquotes */
blockquote {
  margin: var(--space-5) 0;
  padding: var(--space-4) var(--space-5);
  border-left: 4px solid hsl(var(--accent));
  background: hsl(var(--bg-elev));
  font-style: italic;
  color: hsl(var(--txt));
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Text transform */
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

/* Letter spacing */
.tracking-tight { letter-spacing: -0.025em; }
.tracking-normal { letter-spacing: 0; }
.tracking-wide { letter-spacing: 0.025em; }

/* Line height */
.leading-tight { line-height: 1.25; }
.leading-normal { line-height: 1.6; }
.leading-relaxed { line-height: 1.8; }

/* Text truncation */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Text balance (native CSS) */
.text-balance {
  text-wrap: balance;
}

/* Gradient text utility */
.gradient-text {
  background: linear-gradient(135deg, hsl(var(--accent)), hsl(var(--lime)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
