﻿/* Typography System for StyleCart */

/* CSS Custom Properties for Typography */
:root {
    /* Font Families */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-secondary: 'Poppins', sans-serif;
    --font-accent: 'Playfair Display', serif;
    /* Font Weights */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    /* Base Font Size */
    --font-size-base: 16px;
    /* Font Scale (Minor Third - 1.200) */
    --font-size-xs: 0.75rem; /* 12px */
    --font-size-sm: 0.875rem; /* 14px */
    --font-size-base: 1rem; /* 16px */
    --font-size-lg: 1.125rem; /* 18px */
    --font-size-xl: 1.25rem; /* 20px */
    --font-size-2xl: 1.5rem; /* 24px */
    --font-size-3xl: 1.875rem; /* 30px */
    --font-size-4xl: 2.25rem; /* 36px */
    --font-size-5xl: 3rem; /* 48px */
    --font-size-6xl: 3.75rem; /* 60px */
    /* Line Heights */
    --line-height-none: 1;
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    --line-height-loose: 2;
    /* Letter Spacing */
    --letter-spacing-tighter: -0.05em;
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;
    --letter-spacing-widest: 0.1em;
    /* Colors for Typography */
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-accent: #3b82f6;
    --text-success: #10b981;
    --text-warning: #f59e0b;
    --text-danger: #ef4444;
    --text-white: #ffffff;
}

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700;800&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* Base Typography Reset */
* {
    font-feature-settings: 'kern' 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    letter-spacing: var(--letter-spacing-normal);
}

/* Heading Styles */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    margin-bottom: 0.5em;
    margin-top: 0;
    color: var(--text-primary);
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    letter-spacing: var(--letter-spacing-tight);
}

h2 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-semibold);
    letter-spacing: var(--letter-spacing-tight);
}

h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
}

h4 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
}

h5 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
}

h6 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
}

/* Responsive Headings */
@media (max-width: 768px) {
    h1 {
        font-size: var(--font-size-3xl);
    }

    h2 {
        font-size: var(--font-size-2xl);
    }

    h3 {
        font-size: var(--font-size-xl);
    }

    h4 {
        font-size: var(--font-size-lg);
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: var(--font-size-2xl);
    }

    h2 {
        font-size: var(--font-size-xl);
    }

    h3 {
        font-size: var(--font-size-lg);
    }
}

/* Text Utilities */
.text-display {
    font-family: var(--font-accent);
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-none);
    letter-spacing: var(--letter-spacing-tighter);
}

.text-hero {
    font-family: var(--font-secondary);
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
}

.text-lead {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
    color: var(--text-secondary);
}

.text-body {
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
}

.text-caption {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    line-height: var(--line-height-normal);
}

.text-small {
    font-size: var(--font-size-xs);
    line-height: var(--line-height-tight);
}

/* Font Weight Utilities */
.font-light {
    font-weight: var(--font-weight-light);
}

.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);
}

.font-extrabold {
    font-weight: var(--font-weight-extrabold);
}

/* Color Utilities */
.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted);
}

.text-accent {
    color: var(--text-accent);
}

.text-success {
    color: var(--text-success);
}

.text-warning {
    color: var(--text-warning);
}

.text-danger {
    color: var(--text-danger);
}

.text-white {
    color: var(--text-white);
}

/* Navigation Typography */
.nav-link,
.navbar-nav .nav-link {
    font-family: var(--font-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    transition: color 0.3s ease;
}

/* Menu Typography */
.menu a,
.mainnav .menu a {
    font-family: var(--font-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wider);
    text-decoration: none;
}

/* Button Typography */
.btn,
button {
    font-family: var(--font-secondary);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
    font-size: var(--font-size-sm);
}

.btn-lg {
    font-size: var(--font-size-base);
    padding: 12px 24px;
}

.btn-sm {
    font-size: var(--font-size-xs);
    padding: 6px 12px;
}

/* Form Typography */
label {
    font-family: var(--font-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

input,
textarea,
select {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
}

    input::placeholder,
    textarea::placeholder {
        color: var(--text-muted);
        font-style: italic;
    }

/* Card Typography */
.card-title {
    font-family: var(--font-secondary);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: 0.75rem;
}

.card-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.card-text {
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    color: var(--text-secondary);
}

/* Price Typography */
.price,
.product-price {
    font-family: var(--font-secondary);
    font-weight: var(--font-weight-bold);
    color: var(--text-accent);
    font-size: var(--font-size-lg);
}

.price-old,
.original-price {
    font-size: var(--font-size-base);
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: var(--font-weight-normal);
}

.price-discount {
    font-size: var(--font-size-sm);
    color: var(--text-success);
    font-weight: var(--font-weight-semibold);
}

/* Badge Typography */
.badge {
    font-family: var(--font-secondary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-wide);
}

/* Alert Typography */
.alert {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-normal);
}

/* Footer Typography */
.footer {
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
}

    .footer h3,
    .footer h4,
    .footer h5 {
        font-family: var(--font-secondary);
        font-size: var(--font-size-base);
        font-weight: var(--font-weight-semibold);
        text-transform: uppercase;
        letter-spacing: var(--letter-spacing-wide);
        margin-bottom: 1rem;
    }

/* Breadcrumb Typography */
.breadcrumb {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

/* Table Typography */
.table {
    font-size: var(--font-size-sm);
}

    .table th {
        font-family: var(--font-secondary);
        font-weight: var(--font-weight-semibold);
        text-transform: uppercase;
        letter-spacing: var(--letter-spacing-wide);
        font-size: var(--font-size-xs);
    }

/* Responsive Typography Adjustments */
@media (max-width: 1200px) {
    :root {
        --font-size-base: 15px;
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-base: 14px;
    }

    .text-display {
        font-size: var(--font-size-3xl);
    }

    .text-hero {
        font-size: var(--font-size-2xl);
    }

    .text-lead {
        font-size: var(--font-size-base);
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-base: 13px;
    }

    body {
        line-height: var(--line-height-relaxed);
    }
}
