/**
 * Typography Styles
 * 
 * All text elements and typographic hierarchy for Collekton UI.
 * Gallery-inspired, refined aesthetic for art inventory management.
 */

/* =========================================
 * BASE TYPOGRAPHY
 * ========================================= */

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--color-neutral-900);
  background-color: var(--color-neutral-50);
}

/* =========================================
 * HEADINGS
 * ========================================= */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-serif);
  font-weight: var(--font-medium);
  line-height: var(--leading-tight);
  color: var(--color-neutral-950);
  margin-bottom: var(--space-4);
}

h1, .h1 {
  font-size: var(--text-4xl);
  letter-spacing: var(--tracking-tight);
}

h2, .h2 {
  font-size: var(--text-3xl);
  letter-spacing: var(--tracking-tight);
}

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

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

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

h6, .h6 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
}

/* Display headings - larger, more impactful */
.display-1 {
  font-family: var(--font-serif);
  font-size: var(--text-6xl);
  font-weight: var(--font-light);
  line-height: var(--leading-none);
  letter-spacing: var(--tracking-tighter);
}

.display-2 {
  font-family: var(--font-serif);
  font-size: var(--text-5xl);
  font-weight: var(--font-light);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tighter);
}

/* =========================================
 * PARAGRAPHS & BODY TEXT
 * ========================================= */

p {
  margin-bottom: var(--space-4);
}

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

.lead {
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--color-neutral-600);
}

.text-body {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
}

.text-body-sm {
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

/* =========================================
 * LINKS
 * ========================================= */

a {
  color: var(--color-accent-600);
  text-decoration: none;
  transition: color var(--duration-150) var(--ease-in-out);
}

a:hover {
  color: var(--color-accent-700);
  text-decoration: underline;
}

a:active {
  color: var(--color-accent-800);
}

/* Subtle link - less emphasis */
.link-subtle {
  color: var(--color-neutral-600);
}

.link-subtle:hover {
  color: var(--color-neutral-900);
}

/* Underlined link style */
.link-underline {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-underline:hover {
  text-decoration-thickness: 2px;
}

/* =========================================
 * LISTS
 * ========================================= */

ul, ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-6);
}

ul {
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

li {
  margin-bottom: var(--space-2);
}

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

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

/* Unstyled list */
.list-unstyled {
  padding-left: 0;
  list-style: none;
}

/* Inline list */
.list-inline {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.list-inline li {
  margin-bottom: 0;
}

/* Description list */
dl {
  margin-bottom: var(--space-4);
}

dt {
  font-weight: var(--font-semibold);
  color: var(--color-neutral-700);
  margin-bottom: var(--space-1);
}

dd {
  margin-bottom: var(--space-3);
}

/* =========================================
 * BLOCKQUOTES
 * ========================================= */

blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-6);
  border-left: 4px solid var(--color-accent-400);
  background-color: var(--color-neutral-100);
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-neutral-700);
}

blockquote cite {
  display: block;
  margin-top: var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-style: normal;
  color: var(--color-neutral-500);
}

blockquote cite::before {
  content: '— ';
}

/* =========================================
 * CODE & PREFORMATTED TEXT
 * ========================================= */

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

code {
  padding: var(--space-0-5) var(--space-1-5);
  background-color: var(--color-neutral-100);
  border-radius: var(--radius-sm);
  color: var(--color-error-600);
}

/* Code inside pre should not have extra styling */
pre code {
  padding: 0;
  background: none;
  border-radius: 0;
  color: inherit;
}

pre {
  margin: var(--space-4) 0;
  padding: var(--space-4);
  background-color: var(--color-neutral-900);
  border-radius: var(--radius-lg);
  color: var(--color-neutral-100);
  overflow-x: auto;
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}

kbd {
  padding: var(--space-0-5) var(--space-1-5);
  background-color: var(--color-neutral-200);
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 -1px 0 var(--color-neutral-400);
}

/* =========================================
 * TEXT UTILITIES - SIZE
 * ========================================= */

.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }
.text-5xl { font-size: var(--text-5xl); }

/* =========================================
 * TEXT UTILITIES - WEIGHT
 * ========================================= */

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

/* =========================================
 * TEXT UTILITIES - STYLE
 * ========================================= */

.italic { font-style: italic; }
.not-italic { font-style: normal; }
.underline { text-decoration: underline; }
.line-through { text-decoration: line-through; }
.no-underline { text-decoration: none; }

/* =========================================
 * TEXT UTILITIES - ALIGNMENT
 * ========================================= */

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* =========================================
 * TEXT UTILITIES - TRANSFORM
 * ========================================= */

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }
.normal-case { text-transform: none; }

/* =========================================
 * TEXT UTILITIES - COLOR
 * ========================================= */

.text-primary { color: var(--color-primary-600); }
.text-accent { color: var(--color-accent-600); }
.text-muted { color: var(--color-neutral-500); }
.text-success { color: var(--color-success-600); }
.text-warning { color: var(--color-warning-600); }
.text-error { color: var(--color-error-600); }
.text-info { color: var(--color-info-600); }

/* =========================================
 * TEXT UTILITIES - LETTER SPACING
 * ========================================= */

.tracking-tighter { letter-spacing: var(--tracking-tighter); }
.tracking-tight { letter-spacing: var(--tracking-tight); }
.tracking-normal { letter-spacing: var(--tracking-normal); }
.tracking-wide { letter-spacing: var(--tracking-wide); }
.tracking-wider { letter-spacing: var(--tracking-wider); }
.tracking-widest { letter-spacing: var(--tracking-widest); }

/* =========================================
 * TEXT UTILITIES - 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); }

/* =========================================
 * TEXT UTILITIES - OVERFLOW
 * ========================================= */

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

.text-wrap { white-space: normal; }
.text-nowrap { white-space: nowrap; }
.break-words { word-wrap: break-word; overflow-wrap: break-word; }
.break-all { word-break: break-all; }

/* Line clamp utilities */
.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;
}

/* =========================================
 * SPECIAL TEXT ELEMENTS
 * ========================================= */

/* Small text */
small, .small {
  font-size: var(--text-sm);
  color: var(--color-neutral-500);
}

/* Marked/highlighted text */
mark, .mark {
  padding: var(--space-0-5) var(--space-1);
  background-color: var(--color-accent-100);
  border-radius: var(--radius-sm);
}

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

/* Selection styling */
::selection {
  background-color: var(--color-accent-200);
  color: var(--color-neutral-950);
}

/* =========================================
 * LABEL / TAG TEXT
 * ========================================= */

.label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wider);
  color: var(--color-neutral-500);
}

/* =========================================
 * ARTWORK-SPECIFIC TEXT
 * ========================================= */

.artwork-title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: var(--font-medium);
  font-style: italic;
  color: var(--color-neutral-900);
}

.artwork-artist {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-medium);
  color: var(--color-neutral-700);
}

.artwork-year {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-neutral-500);
}

.artwork-medium {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-neutral-600);
}

.artwork-dimensions {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-neutral-500);
}

/* =========================================
 * PRICE DISPLAY
 * ========================================= */

.price {
  font-family: var(--font-sans);
  font-weight: var(--font-semibold);
  color: var(--color-neutral-900);
}

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

.price-currency {
  font-size: 0.75em;
  font-weight: var(--font-normal);
  color: var(--color-neutral-500);
  margin-right: var(--space-0-5);
}

.price-original {
  text-decoration: line-through;
  color: var(--color-neutral-400);
  font-weight: var(--font-normal);
}

/* =========================================
 * SECTION HEADERS
 * ========================================= */

.section-title {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-widest);
  color: var(--color-neutral-500);
  margin-bottom: var(--space-4);
}

.page-title {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: var(--font-medium);
  color: var(--color-neutral-950);
  margin-bottom: var(--space-2);
}

.page-subtitle {
  font-size: var(--text-lg);
  color: var(--color-neutral-500);
  margin-bottom: var(--space-8);
}
