/**
 * Unified Typography System
 * Consistent typography across all pages
 * 
 * @package TrekkingInNepal
 */

/* ==========================================================================
   Typography Scale
   ========================================================================== */

:root {
  /* Font Families */
  --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  
  /* Font Sizes - Mobile First */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  --font-black: 900;
  
  /* Line Heights */
  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 2;
  
  /* 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;
}

/* ==========================================================================
   Base Typography
   ========================================================================== */

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: #181411;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Headings
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: #181411;
  margin: 0;
}

h1 {
  font-size: var(--text-3xl);
  font-weight: var(--font-extrabold);
  letter-spacing: var(--tracking-tight);
}

h2 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
}

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

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

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

h6 {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/* Desktop Heading Sizes */
@media (min-width: 768px) {
  h1 {
    font-size: var(--text-4xl);
  }
  
  h2 {
    font-size: var(--text-3xl);
  }
  
  h3 {
    font-size: var(--text-2xl);
  }
}

@media (min-width: 1024px) {
  h1 {
    font-size: var(--text-5xl);
  }
}

/* ==========================================================================
   Text Elements
   ========================================================================== */

p {
  margin: 0 0 1rem 0;
  line-height: var(--leading-relaxed);
}

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

strong, b {
  font-weight: var(--font-bold);
}

em, i {
  font-style: italic;
}

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

/* ==========================================================================
   Links
   ========================================================================== */

a {
  color: #f47b25;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #e06a1a;
}

a:focus {
  outline: 2px solid #f47b25;
  outline-offset: 2px;
}

/* ==========================================================================
   Lists
   ========================================================================== */

ul, ol {
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
}

ul {
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

li {
  margin-bottom: 0.5rem;
  line-height: var(--leading-relaxed);
}

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

/* ==========================================================================
   Utility Classes
   ========================================================================== */

/* Font Sizes */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }

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

/* Line Heights */
.leading-none { line-height: var(--leading-none); }
.leading-tight { line-height: var(--leading-tight); }
.leading-snug { line-height: var(--leading-snug); }
.leading-normal { line-height: var(--leading-normal); }
.leading-relaxed { line-height: var(--leading-relaxed); }
.leading-loose { line-height: var(--leading-loose); }

/* Letter Spacing */
.tracking-tighter { letter-spacing: var(--tracking-tighter); }
.tracking-tight { letter-spacing: var(--tracking-tight); }
.tracking-normal { letter-spacing: var(--tracking-normal); }
.tracking-wide { letter-spacing: var(--tracking-wide); }
.tracking-wider { letter-spacing: var(--tracking-wider); }
.tracking-widest { letter-spacing: var(--tracking-widest); }

/* Text Colors */
.text-primary { color: #f47b25; }
.text-dark { color: #181411; }
.text-muted { color: #8a7260; }
.text-light { color: #a08b7d; }
.text-white { color: #ffffff; }

/* 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; }

/* ==========================================================================
   Section Titles (Consistent across pages)
   ========================================================================== */

.section-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: #181411;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: var(--text-3xl);
  }
}

.section-subtitle {
  font-size: var(--text-base);
  color: #8a7260;
  line-height: var(--leading-relaxed);
}

.section-description {
  font-size: var(--text-base);
  color: #5a4a3f;
  line-height: var(--leading-relaxed);
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Card Typography
   ========================================================================== */

.card-title {
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: #181411;
  line-height: var(--leading-snug);
}

.card-description {
  font-size: var(--text-sm);
  color: #5a4a3f;
  line-height: var(--leading-relaxed);
}

.card-meta {
  font-size: var(--text-sm);
  color: #8a7260;
  font-weight: var(--font-medium);
}

/* ==========================================================================
   Button Typography
   ========================================================================== */

.btn {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  letter-spacing: var(--tracking-wide);
  line-height: var(--leading-none);
}

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

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

/* ==========================================================================
   Form Typography
   ========================================================================== */

label {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: #181411;
  display: block;
  margin-bottom: 0.5rem;
}

input, textarea, select {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
}

::placeholder {
  color: #8a7260;
  opacity: 0.7;
}

/* ==========================================================================
   Responsive Typography
   ========================================================================== */

@media (max-width: 640px) {
  body {
    font-size: 0.9375rem; /* 15px */
  }
  
  .section-title {
    font-size: var(--text-xl);
  }
}
