/**
 * =====================================================
 * TYPOGRAPHY - Gli Amici di Colombo Design System
 * =====================================================
 * 
 * Typography system with Playfair Display for headings
 * and Inter for body text. Professional, elegant look.
 */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-relaxed);
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

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

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-heading);
    font-weight: var(--font-semibold);
    line-height: var(--leading-tight);
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: var(--space-4);
}

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

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

h3, .h3 {
    font-size: var(--text-3xl);
    font-weight: var(--font-semibold);
}

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

h5, .h5 {
    font-size: var(--text-xl);
    font-weight: var(--font-medium);
}

h6, .h6 {
    font-size: var(--text-lg);
    font-weight: var(--font-medium);
}

/* ===================================================
   DISPLAY HEADINGS (Extra Large)
   =================================================== */

.display-1 {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: var(--font-bold);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.display-2 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: var(--font-bold);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.display-3 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: var(--font-semibold);
    line-height: 1.15;
    letter-spacing: -0.01em;
}

/* ===================================================
   PARAGRAPH & BODY TEXT
   =================================================== */

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

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

.lead {
    font-size: var(--text-xl);
    font-weight: var(--font-light);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
}

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

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

/* ===================================================
   TEXT EMPHASIS
   =================================================== */

strong, b, .bold {
    font-weight: var(--font-bold);
}

em, i, .italic {
    font-style: italic;
}

.highlight {
    background: linear-gradient(120deg, rgba(212, 168, 83, 0.2) 0%, rgba(212, 168, 83, 0.3) 100%);
    padding: 0.1em 0.3em;
    border-radius: var(--radius-sm);
}

mark {
    background-color: rgba(212, 168, 83, 0.3);
    color: inherit;
    padding: 0.1em 0.2em;
    border-radius: var(--radius-sm);
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
    color: var(--color-accent);
}

a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Link with underline animation */
.link-animated {
    position: relative;
    display: inline-block;
}

.link-animated::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--duration-normal) var(--ease-out);
}

.link-animated:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Arrow link */
.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-weight: var(--font-medium);
}

.link-arrow i,
.link-arrow svg {
    transition: transform var(--duration-fast) var(--ease-out);
}

.link-arrow:hover i,
.link-arrow:hover svg {
    transform: translateX(4px);
}

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

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

ul ul, ul ol, ol ul, ol ol {
    margin-bottom: 0;
}

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

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

.list-styled li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 8px;
    height: 8px;
    background: var(--gradient-accent);
    border-radius: 50%;
}

/* Check list */
.list-check {
    list-style: none;
    padding-left: 0;
}

.list-check li {
    position: relative;
    padding-left: var(--space-6);
    margin-bottom: var(--space-3);
}

.list-check li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-success);
    font-weight: var(--font-bold);
}

/* ===================================================
   BLOCKQUOTE
   =================================================== */

blockquote {
    margin: var(--space-6) 0;
    padding: var(--space-6) var(--space-8);
    background: var(--bg-secondary);
    border-left: 4px solid var(--color-accent);
    border-radius: 0 var(--radius-default) var(--radius-default) 0;
}

blockquote p {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

blockquote cite,
blockquote footer {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-style: normal;
    color: var(--text-muted);
}

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

/* ===================================================
   CODE
   =================================================== */

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

code {
    background: var(--bg-tertiary);
    color: var(--color-primary);
    padding: 0.2em 0.4em;
    border-radius: var(--radius-sm);
}

pre {
    background: var(--bg-tertiary);
    padding: var(--space-4);
    border-radius: var(--radius-default);
    overflow-x: auto;
    margin: var(--space-4) 0;
}

pre code {
    background: none;
    padding: 0;
}

kbd {
    background: var(--color-primary);
    color: var(--text-inverse);
    padding: 0.2em 0.5em;
    border-radius: var(--radius-sm);
    font-size: 0.85em;
}

/* ===================================================
   HORIZONTAL RULE
   =================================================== */

hr {
    border: none;
    height: 1px;
    background: var(--border-light);
    margin: var(--space-8) 0;
}

hr.divider-accent {
    height: 2px;
    background: var(--gradient-divider);
}

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

.section-heading {
    text-align: center;
    margin-bottom: var(--space-10);
}

.section-heading h2 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-4);
    position: relative;
    display: inline-block;
}

.section-heading p {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.section-heading .divider {
    height: 3px;
    width: 80px;
    background: var(--gradient-accent);
    margin: var(--space-4) auto;
    border-radius: var(--radius-full);
}

/* Section heading with icon */
.section-heading-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.section-heading-icon i {
    font-size: var(--text-3xl);
    color: var(--color-accent);
}

/* ===================================================
   LABEL & BADGE TEXT
   =================================================== */

.label {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--text-muted);
}

.label-accent {
    color: var(--color-accent);
}

.overline {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-widest);
    color: var(--color-accent);
    margin-bottom: var(--space-2);
    display: block;
}

/* ===================================================
   CAPTIONS & METADATA
   =================================================== */

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

.meta {
    font-size: var(--text-sm);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.meta i {
    color: var(--color-accent);
}

/* ===================================================
   RESPONSIVE TYPOGRAPHY
   =================================================== */

@media (max-width: 768px) {
    body {
        font-size: var(--text-sm);
    }
    
    h1, .h1 {
        font-size: var(--text-4xl);
    }
    
    h2, .h2 {
        font-size: var(--text-3xl);
    }
    
    h3, .h3 {
        font-size: var(--text-2xl);
    }
    
    h4, .h4 {
        font-size: var(--text-xl);
    }
    
    .lead {
        font-size: var(--text-lg);
    }
    
    .section-heading h2 {
        font-size: var(--text-3xl);
    }
    
    blockquote {
        padding: var(--space-4) var(--space-5);
    }
    
    blockquote p {
        font-size: var(--text-lg);
    }
}

@media (max-width: 480px) {
    .display-1 {
        font-size: 2.5rem;
    }
    
    .display-2 {
        font-size: 2rem;
    }
    
    .display-3 {
        font-size: 1.75rem;
    }
}
