/* =========================================================
   CENTUAL PREMIUM - 03 TYPOGRAPHY
   Estilos tipograficos, headings, texto

   Fonts: Plus Jakarta Sans (display) + Source Sans 3 (body)
   - Plus Jakarta Sans: Modern, geometric with soft curves
   - Source Sans 3: Highly legible, professional, light feel
   ========================================================= */

/* ========================================
   FONT IMPORTS
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* ========================================
   FONT VARIABLES
   ======================================== */
:root {
  /* Font Families */
  --font-primary: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Source Sans 3', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Font Sizes (fluid typography) */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.5vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.25rem + 1.25vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.5rem + 1.875vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.75rem + 2.5vw, 3.5rem);
  --text-5xl: clamp(3rem, 2rem + 5vw, 5rem);
  --text-6xl: clamp(3.5rem, 2.5rem + 5vw, 6rem);

  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* Letter Spacing */
  --tracking-tighter: -0.05em;
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.1em;

  /* Font Weights */
  --weight-light: 300;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
}

/* ========================================
   BASE TYPOGRAPHY
   ======================================== */
body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-normal);
  line-height: 1.7;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   HEADINGS
   ======================================== */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

h1, .h1 {
  font-size: var(--text-5xl);
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-weight: var(--weight-bold);
}

h2, .h2 {
  font-size: var(--text-4xl);
  letter-spacing: -0.02em;
  font-weight: var(--weight-semibold);
}

h3, .h3 {
  font-size: var(--text-3xl);
  letter-spacing: -0.015em;
  font-weight: var(--weight-semibold);
}

h4, .h4 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-medium);
}

h5, .h5 {
  font-size: var(--text-xl);
  font-weight: var(--weight-medium);
}

h6, .h6 {
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
}

/* Headings on dark backgrounds */
.text-on-dark h1,
.text-on-dark h2,
.text-on-dark h3,
.text-on-dark h4,
.text-on-dark h5,
.text-on-dark h6,
h1.text-light, h2.text-light, h3.text-light,
h4.text-light, h5.text-light, h6.text-light {
  color: var(--text-on-dark);
}

/* ========================================
   PARAGRAPHS & BODY TEXT
   ======================================== */
p {
  margin-bottom: var(--space-sm);
  max-width: 70ch; /* Optimal reading width */
}

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

.lead {
  font-size: var(--text-xl);
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: var(--weight-light);
  letter-spacing: 0.01em;
}

.lead-lg {
  font-size: var(--text-2xl);
  line-height: 1.5;
  font-weight: var(--weight-light);
}

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

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

/* ========================================
   LINKS
   ======================================== */
a {
  color: var(--centual-primary);
  text-decoration: none;
  transition: color var(--transition-fast) var(--ease-out);
}

a:hover {
  color: var(--centual-secondary);
}

/* Link with underline animation */
.link-underline {
  position: relative;
  display: inline-block;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width var(--transition-base) var(--ease-out);
}

.link-underline:hover::after {
  width: 100%;
}

/* Navigation links */
.nav-link {
  font-family: var(--font-primary);
  color: var(--text-primary);
  font-weight: var(--weight-medium);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  text-transform: none;
}

.nav-link:hover {
  color: var(--centual-primary);
}

/* ========================================
   LISTS
   ======================================== */
ul, ol {
  margin-bottom: var(--space-sm);
  padding-left: var(--space-lg);
}

li {
  margin-bottom: var(--space-xs);
}

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

/* Clean list (no bullets) */
.list-none {
  list-style: none;
  padding-left: 0;
}

/* Check list style */
.list-check {
  list-style: none;
  padding-left: 0;
}

.list-check li {
  position: relative;
  padding-left: var(--space-lg);
}

.list-check li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--centual-primary);
  font-weight: var(--weight-bold);
}

/* ========================================
   BLOCKQUOTE
   ======================================== */
blockquote {
  margin: var(--space-lg) 0;
  padding: var(--space-md) var(--space-lg);
  border-left: 4px solid var(--centual-primary);
  background: var(--centual-subtle);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--text-secondary);
}

blockquote cite {
  display: block;
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  font-style: normal;
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

/* ========================================
   CODE & PRE
   ======================================== */
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--centual-subtle);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--centual-primary);
}

pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--centual-primary-dark);
  color: var(--text-on-dark);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: var(--space-md);
}

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

/* ========================================
   EMPHASIS & HIGHLIGHTS
   ======================================== */
strong, b {
  font-weight: var(--weight-semibold);
}

em, i {
  font-style: italic;
}

mark {
  background: linear-gradient(120deg, rgba(75, 113, 161, 0.2) 0%, rgba(75, 113, 161, 0.3) 100%);
  padding: 0.1em 0.3em;
  border-radius: 0.2em;
}

/* ========================================
   TEXT UTILITIES
   ======================================== */
/* Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* Colors */
.text-primary { color: var(--centual-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--centual-muted); }
.text-light { color: var(--text-on-dark); }
.text-accent { color: var(--centual-accent); }

/* Weights */
.font-light { font-weight: var(--weight-light); }
.font-normal { font-weight: var(--weight-normal); }
.font-medium { font-weight: var(--weight-medium); }
.font-semibold { font-weight: var(--weight-semibold); }
.font-bold { font-weight: var(--weight-bold); }

/* Transform */
.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

/* Truncate */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.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;
}

/* Balance text */
.text-balance {
  text-wrap: balance;
}

/* ========================================
   SECTION TITLES
   ======================================== */
.section-label {
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--centual-secondary);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-family: var(--font-primary);
  font-size: var(--text-xl);
  color: var(--text-secondary);
  font-weight: var(--weight-light);
  max-width: 60ch;
  line-height: 1.7;
}

/* Section subtitle on dark backgrounds */
.section-subtitle.text-light,
.text-on-dark .section-subtitle {
  color: rgba(255, 255, 255, 0.95);
}

/* Hero specific */
.hero-title {
  font-size: var(--text-6xl);
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-weight: var(--weight-bold);
}

.hero-subtitle {
  font-family: var(--font-primary);
  font-size: var(--text-2xl);
  font-weight: var(--weight-light);
  line-height: var(--leading-snug);
  opacity: 0.9;
  letter-spacing: 0.01em;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) {
  .hero-title {
    font-size: var(--text-4xl);
  }

  .hero-subtitle {
    font-size: var(--text-lg);
  }

  .section-title {
    font-size: var(--text-3xl);
  }

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

@media (max-width: 480px) {
  h1, .h1 {
    font-size: var(--text-3xl);
  }

  h2, .h2 {
    font-size: var(--text-2xl);
  }

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

  .hero-title {
    font-size: var(--text-3xl);
  }
}
