/**
 * BYD Shares and Stocks - Base Styles
 * 
 * Typography, links, and foundational element styles.
 * This file builds upon reset.css and uses variables from variables.css.
 */

/* ============================================
   1. TYPOGRAPHY - HEADINGS
   ============================================ */
.display-1 {
  font-size: var(--text-display-1);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

.display-2 {
  font-size: var(--text-display-2);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

h1, .h1 {
  font-size: var(--text-h1);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
}

h2, .h2 {
  font-size: var(--text-h2);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
}

h3, .h3 {
  font-size: var(--text-h3);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
}

h4, .h4 {
  font-size: var(--text-h4);
  font-weight: var(--weight-medium);
  line-height: var(--leading-snug);
}

h5, .h5 {
  font-size: var(--text-h5);
  font-weight: var(--weight-medium);
  line-height: var(--leading-normal);
}

h6, .h6 {
  font-size: var(--text-h6);
  font-weight: var(--weight-medium);
  line-height: var(--leading-normal);
}

/* ============================================
   2. TYPOGRAPHY - BODY TEXT
   ============================================ */
.text-lg {
  font-size: var(--text-body-lg);
  line-height: var(--leading-relaxed);
}

.text-base {
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
}

.text-sm {
  font-size: var(--text-body-sm);
  line-height: var(--leading-normal);
}

.text-caption {
  font-size: var(--text-caption);
  line-height: var(--leading-normal);
}

/* ============================================
   3. TYPOGRAPHY - COLORS
   ============================================ */
.text-primary {
  color: var(--color-text-primary);
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-gold {
  color: var(--color-primary);
}

.text-success {
  color: var(--color-success);
}

.text-warning {
  color: var(--color-warning);
}

.text-error {
  color: var(--color-error);
}

/* ============================================
   4. TYPOGRAPHY - UTILITIES
   ============================================ */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
}

.text-capitalize {
  text-transform: capitalize;
}

.font-primary {
  font-family: var(--font-primary);
}

.font-secondary {
  font-family: var(--font-secondary);
}

.font-mono {
  font-family: var(--font-mono);
}

.font-regular {
  font-weight: var(--weight-regular);
}

.font-medium {
  font-weight: var(--weight-medium);
}

.font-semibold {
  font-weight: var(--weight-semibold);
}

.font-bold {
  font-weight: var(--weight-bold);
}

/* ============================================
   HERO / INTRO HEADINGS
   ============================================ */

.page-hero-title {
  font-size: var(--text-display-2);
  font-weight: var(--weight-bold);
  color: var(--color-text-primary);
  line-height: var(--leading-tight);
}

@media (max-width: 768px) {
  .page-hero-title {
    font-size: var(--text-h1);
  }
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-gradient-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   5. LINKS
   ============================================ */
a {
  transition: var(--transition-colors);
}

.link {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-colors);
}

.link:hover {
  color: var(--color-primary-light);
}

.link-underline {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-underline:hover {
  text-decoration-color: var(--color-primary);
}

/* Arrow link with hover animation */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-primary);
  font-weight: var(--weight-medium);
}

.link-arrow::after {
  content: '→';
  transition: transform var(--duration-fast) var(--ease-out);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* ============================================
   6. PARAGRAPHS & TEXT BLOCKS
   ============================================ */
p {
  margin-bottom: var(--space-4);
  color: var(--color-text-secondary);
}

p:last-child {
  margin-bottom: 0;
}

/* Lead paragraph - larger intro text */
.lead {
  font-size: var(--text-body-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
}

/* ============================================
   7. LISTS
   ============================================ */
.list {
  list-style: none;
  padding-left: 0;
}

.list-disc {
  padding-left: var(--space-6);
}

.list-disc li {
  position: relative;
  padding-left: var(--space-4);
  margin-bottom: var(--space-2);
}

.list-disc li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  background-color: var(--color-primary);
  border-radius: var(--radius-full);
}

.list-check li {
  position: relative;
  padding-left: var(--space-8);
  margin-bottom: var(--space-3);
}

.list-check li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  width: var(--space-6);
  height: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(var(--color-accent-soft-blue-rgb), 0.1);
  color: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: var(--text-body-sm);
  font-weight: var(--weight-bold);
}

/* ============================================
   8. HORIZONTAL RULE
   ============================================ */
hr {
  border: none;
  height: 1px;
  background-color: var(--color-border-light);
  margin: var(--space-8) 0;
}

/* ============================================
   9. BLOCKQUOTE
   ============================================ */
blockquote {
  position: relative;
  padding-left: var(--space-6);
  margin: var(--space-6) 0;
  font-size: var(--text-body-lg);
  font-style: italic;
  color: var(--color-text-secondary);
  border-left: 4px solid var(--color-primary);
}

blockquote cite {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--text-body-sm);
  font-style: normal;
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
}

/* ============================================
   10. CODE
   ============================================ */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: var(--space-1) var(--space-2);
  background-color: var(--color-bg-tertiary);
  border-radius: var(--radius-sm);
}

pre {
  font-family: var(--font-mono);
  font-size: var(--text-body-sm);
  padding: var(--space-4);
  background-color: var(--color-bg-tertiary);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

pre code {
  padding: 0;
  background: none;
}

/* ============================================
   11. IMAGES
   ============================================ */
.img-fluid {
  max-width: 100%;
  height: auto;
}

.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-contain {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.img-rounded {
  border-radius: var(--radius-lg);
}

.img-circle {
  border-radius: var(--radius-full);
}

/* ============================================
   12. VISIBILITY UTILITIES
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.visible {
  visibility: visible;
}

.invisible {
  visibility: hidden;
}

/* ============================================
   13. SECTION LABELS
   ============================================ */
.section-label {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-body-sm);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-primary);
  background-color: rgba(var(--color-accent-soft-blue-rgb), 0.1);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

/* ============================================
   14. DIVIDERS
   ============================================ */
.divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--text-body-sm);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: var(--color-border-light);
}

/* ============================================
   15. RESPONSIVE TYPOGRAPHY
   ============================================ */
@media (max-width: 768px) {
  .display-1 {
    font-size: calc(var(--text-display-1) * 0.6);
  }
  
  .display-2 {
    font-size: calc(var(--text-display-2) * 0.65);
  }
  
  h1, .h1 {
    font-size: calc(var(--text-h1) * 0.75);
  }
  
  h2, .h2 {
    font-size: calc(var(--text-h2) * 0.8);
  }
  
  h3, .h3 {
    font-size: calc(var(--text-h3) * 0.85);
  }
}

