/**
 * Typography Styles
 * Based on Heko Pora design system
 */

/* Base font settings */
body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  color: var(--color-text-primary);
  line-height: var(--line-height-normal);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
  margin-bottom: 0.5em;
}

h1, .h1 {
  font-size: var(--font-size-5xl);
  line-height: 1.2;
}

h2, .h2 {
  font-size: var(--font-size-4xl);
  line-height: 1.3;
}

h3, .h3 {
  font-size: var(--font-size-3xl);
  line-height: 1.3;
}

h4, .h4 {
  font-size: var(--font-size-2xl);
  line-height: 1.4;
}

h5, .h5 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  line-height: 1.4;
}

h6, .h6 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  line-height: 1.5;
}

/* Responsive headings */
@media (max-width: 768px) {
  h1, .h1 {
    font-size: var(--font-size-4xl);
  }

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

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

/* Paragraphs */
p {
  margin-bottom: 1em;
}

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

/* Body text variations */
.text-lg {
  font-size: var(--font-size-lg);
  line-height: 1.6;
}

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

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

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

/* Font weights */
.font-normal {
  font-weight: var(--font-weight-normal);
}

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

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

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

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

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

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

.text-disabled {
  color: var(--color-text-disabled) !important;
}

/* Links */
a {
  color: var(--color-primary);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

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

/* Display text */
.display-1 {
  font-size: 6rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
}

.display-2 {
  font-size: 5.5rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
}

.display-3 {
  font-size: 4.5rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
}

.display-4 {
  font-size: 3.5rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.1;
}

@media (max-width: 768px) {
  .display-1,
  .display-2,
  .display-3,
  .display-4 {
    font-size: 2.5rem;
  }
}

/* Lists */
ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.25rem;
}

/* Blockquotes */
blockquote {
  padding-left: 1.5rem;
  border-left: 4px solid var(--color-primary);
  font-style: italic;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

/* Code */
code {
  font-family: var(--font-family-mono);
  font-size: 0.875em;
  background-color: var(--color-surface);
  padding: 0.2em 0.4em;
  border-radius: var(--border-radius-sm);
  color: var(--color-danger);
}

pre {
  font-family: var(--font-family-mono);
  background-color: var(--color-surface);
  padding: 1rem;
  border-radius: var(--border-radius-lg);
  overflow-x: auto;
  margin-bottom: 1rem;
}

pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
}

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

/* Mark/Highlight */
mark {
  background-color: var(--color-warning-light);
  padding: 0.1em 0.2em;
}

/* Text alignment */
.text-left {
  text-align: left !important;
}

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

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

/* Text transform */
.text-uppercase {
  text-transform: uppercase !important;
}

.text-lowercase {
  text-transform: lowercase !important;
}

.text-capitalize {
  text-transform: capitalize !important;
}

/* Text decoration */
.text-decoration-none {
  text-decoration: none !important;
}

.text-decoration-underline {
  text-decoration: underline !important;
}

/* Line height utilities */
.lh-tight {
  line-height: var(--line-height-tight) !important;
}

.lh-normal {
  line-height: var(--line-height-normal) !important;
}

.lh-relaxed {
  line-height: var(--line-height-relaxed) !important;
}

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

/* Line clamp (multiline truncate) */
.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;
}
