/* shared/styles/typography.css */
/* Типографика для GENESIS DeFi Platform */

/* Font Face Definitions (if needed) */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@300;400;500;600;700&family=Orbitron:wght@400;500;600;700;800;900&display=swap');

/* Base Typography */
body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-base);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, .h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-lg);
    font-family: var(--font-mono);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2, .h2 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-md);
    font-family: var(--font-mono);
}

h3, .h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-md);
}

h4, .h4 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-sm);
}

h5, .h5 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-base);
    margin-bottom: var(--spacing-sm);
}

h6, .h6 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-base);
    margin-bottom: var(--spacing-sm);
}

/* Paragraphs */
p {
    margin-bottom: var(--spacing-md);
    line-height: var(--line-height-relaxed);
}

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

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

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

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

/* Lists */
ul, ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-xl);
}

ul {
    list-style-type: disc;
}

ol {
    list-style-type: decimal;
}

li {
    margin-bottom: var(--spacing-xs);
    line-height: var(--line-height-base);
}

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

/* Nested lists */
ul ul, ol ol, ul ol, ol ul {
    margin-top: var(--spacing-xs);
    margin-bottom: 0;
}

/* Text utilities */
.text-xs {
    font-size: var(--font-size-xs);
}

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

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

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

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

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

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

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

/* Font weights */
.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);
}

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

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

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

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

/* Text transform */
.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;
}

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

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

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

.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-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Line height */
.leading-tight {
    line-height: var(--line-height-tight);
}

.leading-base {
    line-height: var(--line-height-base);
}

.leading-relaxed {
    line-height: var(--line-height-relaxed);
}

/* Letter spacing */
.tracking-tight {
    letter-spacing: -0.05em;
}

.tracking-normal {
    letter-spacing: 0;
}

.tracking-wide {
    letter-spacing: 0.05em;
}

.tracking-wider {
    letter-spacing: 0.1em;
}

.tracking-widest {
    letter-spacing: 0.2em;
}

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

/* Line clamp */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* Word break */
.break-normal {
    word-break: normal;
    overflow-wrap: normal;
}

.break-words {
    overflow-wrap: break-word;
}

.break-all {
    word-break: break-all;
}

/* Whitespace */
.whitespace-normal {
    white-space: normal;
}

.whitespace-nowrap {
    white-space: nowrap;
}

.whitespace-pre {
    white-space: pre;
}

.whitespace-pre-line {
    white-space: pre-line;
}

.whitespace-pre-wrap {
    white-space: pre-wrap;
}

/* Code and Pre */
code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--bg-secondary);
    padding: 0.125em 0.25em;
    border-radius: var(--radius-sm);
    color: var(--primary-color);
}

pre {
    font-family: var(--font-mono);
    font-size: var(--font-size-sm);
    background: var(--bg-secondary);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: var(--spacing-md);
}

pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

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

/* Mark */
mark {
    background: var(--warning-bg);
    color: var(--warning-color);
    padding: 0.125em 0.25em;
    border-radius: var(--radius-sm);
}

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

/* Strong */
strong, b {
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
}

/* Emphasis */
em, i {
    font-style: italic;
}

/* Abbreviation */
abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
}

/* Definition */
dfn {
    font-style: italic;
    font-weight: var(--font-weight-medium);
}

/* Keyboard */
kbd {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--bg-tertiary);
    padding: 0.125em 0.25em;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

/* Superscript and Subscript */
sup, sub {
    font-size: 0.75em;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
}

sup {
    top: -0.5em;
}

sub {
    bottom: -0.25em;
}

/* Time */
time {
    color: var(--text-secondary);
}

/* Address */
address {
    font-style: normal;
    line-height: var(--line-height-relaxed);
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1, .h1 {
        font-size: calc(var(--font-size-4xl) * 0.8);
    }
    
    h2, .h2 {
        font-size: calc(var(--font-size-3xl) * 0.8);
    }
    
    h3, .h3 {
        font-size: calc(var(--font-size-2xl) * 0.9);
    }
}
