/* =============================================================
   TYPOGRAPHY.CSS — Scala tipografica e stili testo
   ============================================================= */

/* --- Headings --- */
h1 { font-size: clamp(var(--t-4xl), 5vw, var(--t-7xl)); letter-spacing: -0.03em; }
h2 { font-size: clamp(var(--t-3xl), 4vw, var(--t-5xl)); letter-spacing: -0.02em; }
h3 { font-size: clamp(var(--t-xl), 2.5vw, var(--t-3xl)); }
h4 { font-size: var(--t-xl); }
h5 { font-size: var(--t-lg); font-family: var(--f-sans); font-weight: 600; }
h6 { font-size: var(--t-base); font-family: var(--f-sans); font-weight: 600; }

/* --- Classi tipografiche --- */
.text-serif  { font-family: var(--f-serif); }
.text-mono   { font-family: var(--f-mono); }

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

.text-light  { font-weight: 300; }
.text-normal { font-weight: 400; }
.text-medium { font-weight: 500; }
.text-semi   { font-weight: 600; }
.text-bold   { font-weight: 700; }

.text-brand  { color: var(--c-brand); }
.text-accent { color: var(--c-accent); }
.text-muted  { color: var(--c-muted); }
.text-white  { color: var(--c-white); }

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

.leading-tight  { line-height: 1.2; }
.leading-snug   { line-height: 1.4; }
.leading-normal { line-height: 1.6; }
.leading-loose  { line-height: 1.9; }

/* --- Componente intro snippet (ottimizzato AI answers) --- */
.intro-snippet {
    font-size: var(--t-lg);
    line-height: 1.7;
    color: var(--c-text);
    max-width: var(--max-w-text);
    padding: var(--sp-6) var(--sp-8);
    background: var(--c-white);
    border-left: 4px solid var(--c-accent);
    border-radius: 0 var(--r-md) var(--r-md) 0;
    box-shadow: var(--shadow-sm);
}

/* --- Label / tag categoria --- */
.label {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
    font-family: var(--f-mono);
    font-size: var(--t-xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-accent);
    background: rgba(232, 97, 42, 0.08);
    padding: var(--sp-1) var(--sp-3);
    border-radius: var(--r-full);
    border: 1px solid rgba(232, 97, 42, 0.2);
}

.label--brand {
    color: var(--c-brand);
    background: rgba(26, 58, 92, 0.06);
    border-color: rgba(26, 58, 92, 0.15);
}

/* --- Prosette e testo corpo --- */
.prose p + p { margin-top: var(--sp-4); }
.prose ul, .prose ol {
    margin-top: var(--sp-4);
    padding-left: var(--sp-6);
    list-style: initial;
}
.prose ul li + li,
.prose ol li + li { margin-top: var(--sp-2); }
.prose h2 { margin-top: var(--sp-10); margin-bottom: var(--sp-4); }
.prose h3 { margin-top: var(--sp-8); margin-bottom: var(--sp-3); }

/* --- Eyebrow (sopra H1) --- */
.eyebrow {
    display: block;
    font-family: var(--f-mono);
    font-size: var(--t-xs);
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-accent);
    margin-bottom: var(--sp-4);
}

/* --- Highlight underline --- */
.underline-accent {
    position: relative;
    display: inline;
}
.underline-accent::after {
    content: '';
    position: absolute;
    bottom: 0.05em;
    left: 0;
    right: 0;
    height: 0.12em;
    background: var(--c-accent);
    opacity: 0.4;
    border-radius: 2px;
}
