/**
 * FleetOps Landing Pages - Base Typography Styles
 *
 * Base styles for typography and fundamental elements.
 * Uses Montserrat font family from Google Fonts.
 */

/* ============================================
 * FONT IMPORTS
 * ============================================ */

/* Montserrat from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

/* ============================================
 * HTML & BODY
 * ============================================ */

html {
  font-family: var(--font-family);
  font-size: 100%; /* Respects user's browser setting */
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
}

body {
  font-size: var(--font-size-body);
  line-height: var(--line-height-normal);
  font-weight: var(--font-weight-regular);
}

/* ============================================
 * HEADINGS
 * ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
}

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-tight);
}

h3 {
  font-size: var(--font-size-h3);
}

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-medium);
}

/* Heading variants */
.heading-display {
  font-size: 4rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.heading-section {
  font-size: var(--font-size-h2);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-xl);
}

.heading-card {
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-sm);
}

/* ============================================
 * BODY TEXT
 * ============================================ */

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

p:last-child {
  margin-bottom: 0;
}

/* Text size variants */
.text-lg {
  font-size: var(--font-size-body-lg);
  line-height: var(--line-height-relaxed);
}

.text-sm {
  font-size: var(--font-size-body-sm);
}

.text-xs {
  font-size: var(--font-size-body-xs);
}

/* Lead paragraph */
.lead {
  font-size: var(--font-size-body-lg);
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
}

/* ============================================
 * LINKS
 * ============================================ */

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--border-radius-sm);
}

/* Link variants */
.link-underline {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-underline:hover {
  text-decoration-color: var(--color-primary-dark);
}

.link-muted {
  color: var(--color-text-muted);
}

.link-muted:hover {
  color: var(--color-primary);
}

.link-inverse {
  color: var(--color-text-inverse);
}

.link-inverse:hover {
  color: var(--color-primary-light);
}

/* ============================================
 * LISTS
 * ============================================ */

ul, ol {
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
}

ul {
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

li {
  margin-bottom: var(--space-xs);
  color: var(--color-text-secondary);
}

li:last-child {
  margin-bottom: 0;
}

/* Styled list */
.list-styled {
  list-style: none;
  padding-left: 0;
}

.list-styled li {
  position: relative;
  padding-left: var(--space-xl);
}

.list-styled li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: var(--border-radius-full);
}

/* Check list */
.list-check {
  list-style: none;
  padding-left: 0;
}

.list-check li {
  position: relative;
  padding-left: var(--space-xl);
}

.list-check li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: var(--font-weight-bold);
}

/* ============================================
 * TEXT UTILITIES
 * ============================================ */

/* Colors */
.text-primary { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-primary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }
.text-inverse { color: var(--color-text-inverse); }

/* Additional text utilities */
.text-secondary {
  color: var(--color-text-secondary);
  font-size: var(--font-size-body-lg);
  line-height: var(--line-height-relaxed);
}

/* Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Transform */
.text-uppercase { text-transform: uppercase; }
.text-lowercase { text-transform: lowercase; }
.text-capitalize { text-transform: capitalize; }

/* Weight */
.font-light { font-weight: var(--font-weight-light); }
.font-normal { 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); }

/* Letter spacing */
.tracking-tight { letter-spacing: var(--letter-spacing-tight); }
.tracking-normal { letter-spacing: var(--letter-spacing-normal); }
.tracking-wide { letter-spacing: var(--letter-spacing-wide); }
.tracking-wider { letter-spacing: var(--letter-spacing-wider); }

/* ============================================
 * BLOCKQUOTES
 * ============================================ */

blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: var(--space-lg);
  margin: var(--space-xl) 0;
  font-style: italic;
  color: var(--color-text-secondary);
}

blockquote p {
  font-size: var(--font-size-body-lg);
}

blockquote cite {
  display: block;
  margin-top: var(--space-sm);
  font-size: var(--font-size-body-sm);
  font-style: normal;
  color: var(--color-text-muted);
}

/* ============================================
 * CODE & PREFORMATTED TEXT
 * ============================================ */

code {
  font-family: var(--font-family-mono);
  font-size: 0.9em;
  background-color: var(--color-bg-tertiary);
  padding: 0.125em 0.375em;
  border-radius: var(--border-radius-sm);
}

pre {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-body-sm);
  background-color: var(--color-bg-dark);
  color: var(--color-text-inverse);
  padding: var(--space-lg);
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin: var(--space-lg) 0;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
}

/* ============================================
 * HORIZONTAL RULE
 * ============================================ */

hr {
  border: none;
  border-top: var(--border-width) solid var(--color-border-light);
  margin: var(--space-xl) 0;
}

hr.dark {
  border-top-color: var(--color-border-default);
}

/* ============================================
 * MARK & HIGHLIGHT
 * ============================================ */

mark {
  background-color: var(--color-warning-light);
  padding: 0.125em 0.25em;
  border-radius: var(--border-radius-sm);
}

.highlight {
  background: linear-gradient(180deg, transparent 60%, rgba(0, 160, 233, 0.2) 60%);
}

/* ============================================
 * SMALL TEXT
 * ============================================ */

small, .text-small {
  font-size: var(--font-size-body-sm);
}

small {
  color: var(--color-text-muted);
}

/* ============================================
 * LABELS & BADGES
 * ============================================ */

.label {
  display: inline-block;
  font-size: var(--font-size-body-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wider);
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--font-size-body-xs);
  font-weight: var(--font-weight-medium);
  border-radius: var(--border-radius-full);
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
}

.badge-primary {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
}

.badge-success {
  background-color: var(--color-success);
  color: var(--color-text-inverse);
}
