/* Typography styles */

/* Headings */
h1, .h1,
h2, .h2,
h3, .h3,
h4, .h4,
h5, .h5,
h6, .h6 {
  font-family: var(--font-display);
  margin-top: 1em;
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

h1, .h1 {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-6);
  letter-spacing: -0.025em;
}

h2, .h2 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-5);
  letter-spacing: -0.025em;
}

h3, .h3 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

h4, .h4 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
  letter-spacing: -0.015em;
}

h5, .h5 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  letter-spacing: -0.01em;
}

h6, .h6 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
  letter-spacing: -0.005em;
}

/* For measurement themed headings, add ruler-style decoration */
.ruler-heading {
  position: relative;
  padding-bottom: var(--space-4);
}

.ruler-heading::after {
  content: '';
  position: absolute;
  bottom: var(--space-2);
  left: 0;
  width: 100%;
  height: 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='8' viewBox='0 0 100 8'%3E%3Cline x1='0' y1='4' x2='100' y2='4' stroke='%233b82f6' stroke-width='2'/%3E%3Cline x1='0' y1='0' x2='0' y2='8' stroke='%233b82f6' stroke-width='2'/%3E%3Cline x1='10' y1='2' x2='10' y2='6' stroke='%233b82f6' stroke-width='2'/%3E%3Cline x1='20' y1='2' x2='20' y2='6' stroke='%233b82f6' stroke-width='2'/%3E%3Cline x1='30' y1='0' x2='30' y2='8' stroke='%233b82f6' stroke-width='2'/%3E%3Cline x1='40' y1='2' x2='40' y2='6' stroke='%233b82f6' stroke-width='2'/%3E%3Cline x1='50' y1='0' x2='50' y2='8' stroke='%233b82f6' stroke-width='2'/%3E%3Cline x1='60' y1='2' x2='60' y2='6' stroke='%233b82f6' stroke-width='2'/%3E%3Cline x1='70' y1='2' x2='70' y2='6' stroke='%233b82f6' stroke-width='2'/%3E%3Cline x1='80' y1='0' x2='80' y2='8' stroke='%233b82f6' stroke-width='2'/%3E%3Cline x1='90' y1='2' x2='90' y2='6' stroke='%233b82f6' stroke-width='2'/%3E%3Cline x1='100' y1='0' x2='100' y2='8' stroke='%233b82f6' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 100px 8px;
}

/* Paragraphs */
p {
  margin-top: 0;
  margin-bottom: var(--space-4);
  line-height: var(--leading-relaxed);
}

.lead {
  font-size: var(--text-xl);
  font-weight: var(--font-light);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}

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

/* Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-normal) var(--transition-ease);
}

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

.link-underline {
  text-decoration: underline;
}

.link-underline:hover {
  text-decoration: none;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.lowercase {
  text-transform: lowercase;
}

.capitalize {
  text-transform: capitalize;
}

.normal-case {
  text-transform: none;
}

/* Text decoration */
.underline {
  text-decoration: underline;
}

.line-through {
  text-decoration: line-through;
}

.no-underline {
  text-decoration: none;
}

/* Line height */
.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);
}

/* Font style */
.italic {
  font-style: italic;
}

.not-italic {
  font-style: normal;
}

/* Lists */
ul.styled, 
ol.styled {
  padding-left: var(--space-5);
  margin-bottom: var(--space-6);
}

ul.styled li,
ol.styled li {
  margin-bottom: var(--space-2);
  position: relative;
}

ul.styled {
  list-style-type: none;
}

ul.styled li::before {
  content: '•';
  color: var(--primary-color);
  font-weight: var(--font-bold);
  position: absolute;
  left: calc(var(--space-5) * -1);
}

ol.styled {
  list-style-type: decimal;
}

/* Blockquote */
blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: var(--space-4);
  margin-left: 0;
  margin-right: 0;
  margin-bottom: var(--space-6);
  font-style: italic;
  color: var(--text-secondary);
}

blockquote cite {
  display: block;
  margin-top: var(--space-2);
  font-style: normal;
  font-weight: var(--font-medium);
  color: var(--text-tertiary);
}

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

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

.line-clamp-1 {
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

/* Font families */
.font-body {
  font-family: var(--font-body);
}

.font-display {
  font-family: var(--font-display);
}

/* Responsive font sizes */
@media (max-width: 640px) {
  h1, .h1 {
    font-size: calc(var(--text-4xl) * 0.9);
  }
  
  h2, .h2 {
    font-size: calc(var(--text-3xl) * 0.9);
  }
  
  h3, .h3 {
    font-size: calc(var(--text-2xl) * 0.9);
  }
  
  .lead {
    font-size: var(--text-lg);
  }
} 