/**
 * Typography System
 * Implements Inter font family and text styling hierarchy
 *
 * @package AIIMN
 * @since 1.0.0
 */

/* ========================================
   WEB FONT LOADING
   ======================================== */

/* Inter Font Family - Regular */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Inter Font Family - Medium */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Inter Font Family - SemiBold */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Inter Font Family - Bold */
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* JetBrains Mono - For code elements */
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ========================================
   HEADING STYLES
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--font-size-h1);
  letter-spacing: var(--letter-spacing-tight);
}

h2 {
  font-size: var(--font-size-h2);
  letter-spacing: var(--letter-spacing-snug);
}

h3 {
  font-size: var(--font-size-h3);
  letter-spacing: var(--letter-spacing-snug);
}

h4 {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-semibold);
}

h5 {
  font-size: var(--font-size-h5);
  font-weight: var(--font-weight-semibold);
}

h6 {
  font-size: var(--font-size-h6);
  font-weight: var(--font-weight-semibold);
}

/* ========================================
   PARAGRAPH & BODY TEXT
   ======================================== */

p {
  margin-bottom: var(--space-6);
  line-height: var(--line-height-relaxed);
}

.lead,
.text-lead {
  font-size: var(--font-size-body-xl);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
}

/* ========================================
   TEXT SIZE UTILITIES
   ======================================== */

.text-xl {
  font-size: var(--font-size-body-xl);
  line-height: var(--line-height-relaxed);
}

.text-lg {
  font-size: var(--font-size-body-lg);
  line-height: var(--line-height-relaxed);
}

.text-base {
  font-size: var(--font-size-body);
  line-height: var(--line-height-relaxed);
}

.text-sm {
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-normal);
}

.text-caption,
.text-xs {
  font-size: var(--font-size-caption);
  line-height: var(--line-height-normal);
}

/* ========================================
   TEXT COLOR UTILITIES
   ======================================== */

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

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

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

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

.text-electric {
  color: var(--color-electric-base);
}

.text-coral {
  color: var(--color-coral-base);
}

/* ========================================
   TEXT WEIGHT UTILITIES
   ======================================== */

.font-regular {
  font-weight: var(--font-weight-regular);
}

.font-medium {
  font-weight: var(--font-weight-medium);
}

.font-semibold {
  font-weight: var(--font-weight-semibold);
}

.font-bold {
  font-weight: var(--font-weight-bold);
}

/* ========================================
   OVERLINE TEXT
   ======================================== */

.overline {
  display: block;
  font-size: var(--font-size-overline);
  font-weight: var(--font-weight-semibold);
  color: var(--color-electric-base);
  letter-spacing: var(--letter-spacing-widest);
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

/* ========================================
   KICKER TEXT
   ======================================== */

.kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--font-size-body-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

/* ========================================
   BLOCKQUOTE
   ======================================== */

blockquote {
  font-size: var(--font-size-body-xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-primary);
  border-left: 4px solid var(--color-electric-base);
  padding-left: var(--space-6);
  margin: var(--space-8) 0;
}

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

blockquote cite {
  display: block;
  font-size: var(--font-size-body-sm);
  font-style: normal;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  margin-top: var(--space-4);
}

/* ========================================
   CODE & PRE
   ======================================== */

code,
pre {
  font-family: var(--font-mono);
}

code {
  background: var(--color-arctic-base);
  color: var(--color-electric-dark);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

pre {
  background: var(--color-primary-900);
  color: var(--color-arctic-light);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin-bottom: var(--space-8);
  line-height: var(--line-height-normal);
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
  font-size: var(--font-size-body-sm);
}

/* ========================================
   LISTS
   ======================================== */

.content-list,
.entry-content ul,
.entry-content ol {
  margin-bottom: var(--space-6);
}

.content-list li,
.entry-content ul li {
  position: relative;
  padding-left: var(--space-8);
  margin-bottom: var(--space-3);
}

.content-list li::before,
.entry-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.4em;
  width: 20px;
  height: 20px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%2310B981"><path fill-rule="evenodd" d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z" clip-rule="evenodd"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
}

ol.content-list,
.entry-content ol {
  counter-reset: list-counter;
}

ol.content-list li,
.entry-content ol li {
  counter-increment: list-counter;
}

ol.content-list li::before,
.entry-content ol li::before {
  content: counter(list-counter);
  background: none;
  color: var(--color-electric-base);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-body-lg);
  width: auto;
  height: auto;
  top: 0;
}

/* ========================================
   TEXT ALIGNMENT
   ======================================== */

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

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

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

/* ========================================
   LINE CLAMP (TEXT TRUNCATION)
   ======================================== */

.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   LINKS IN CONTENT
   ======================================== */

.entry-content a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.entry-content a:hover {
  text-decoration-thickness: 2px;
}

/* ========================================
   WORDPRESS EDITOR STYLES
   ======================================== */

.wp-block-quote {
  border-left: 4px solid var(--color-electric-base);
  padding-left: var(--space-6);
  margin: var(--space-8) 0;
}

.wp-block-pullquote {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-medium);
  text-align: center;
  border-top: 4px solid var(--color-electric-base);
  border-bottom: 4px solid var(--color-electric-base);
  padding: var(--space-8) var(--space-4);
  margin: var(--space-12) 0;
}
