/*
|--------------------------------------------------------------------------
| File: assets/css/typography.css
|--------------------------------------------------------------------------
| Purpose:
| Shared typography system for the luxury yacht media concierge platform.
| This file defines hierarchy, editorial rhythm, readable content widths,
| and premium text treatments used across public and admin pages.
|--------------------------------------------------------------------------
*/

/* ==========================================================================
   1. Font stack and document typography
   ========================================================================== */

html,
body {
    font-family:
        "Inter",
        "Segoe UI",
        "Helvetica Neue",
        Arial,
        sans-serif;
    line-height: 1.6;
}

body {
    font-size: 1rem;
    letter-spacing: 0.005em;
}

/* ==========================================================================
   2. Heading system
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-family:
        "Cormorant Garamond",
        "Georgia",
        "Times New Roman",
        serif;
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: 0.005em;
    color: var(--color-text);
}

h1,
.heading-hero {
    font-size: clamp(2.7rem, 5vw, 5rem);
    line-height: 0.97;
    letter-spacing: -0.018em;
}

h2,
.heading-display {
    font-size: clamp(1.95rem, 3.2vw, 3.1rem);
    line-height: 1.03;
    letter-spacing: -0.014em;
}

h3,
.heading-section {
    font-size: clamp(1.4rem, 2.1vw, 2rem);
    line-height: 1.1;
}

h4,
.heading-card {
    font-size: clamp(1.08rem, 1.35vw, 1.34rem);
    line-height: 1.2;
}

h5,
.heading-sm {
    font-size: 0.98rem;
    line-height: 1.25;
}

h6,
.heading-xs {
    font-size: 0.82rem;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

/* ==========================================================================
   3. Paragraph and content text
   ========================================================================== */

p,
.body-copy,
.rich-text {
    color: var(--color-text-soft);
    font-size: 1rem;
    line-height: 1.78;
}

.body-lg {
    font-size: 1.08rem;
    line-height: 1.82;
    color: var(--color-text-soft);
}

.body-sm {
    font-size: 0.93rem;
    line-height: 1.65;
    color: var(--color-text-soft);
}

.lead {
    max-width: 52rem;
    font-size: clamp(1.06rem, 1.35vw, 1.24rem);
    line-height: 1.82;
    color: var(--color-text-soft);
}

.eyebrow {
    display: inline-block;
    margin-bottom: var(--space-4);
    color: var(--color-accent-soft);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.kicker {
    display: inline-block;
    color: var(--color-accent-soft);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

/* ==========================================================================
   4. Link treatments
   ========================================================================== */

.text-link {
    color: var(--color-text);
    border-bottom: 1px solid rgba(200, 164, 106, 0.34);
    padding-bottom: 0.08rem;
}

.text-link:hover {
    color: var(--color-accent-soft);
    border-bottom-color: rgba(200, 164, 106, 0.6);
}

.muted-link {
    color: var(--color-text-muted);
}

.muted-link:hover {
    color: var(--color-text);
}

/* ==========================================================================
   5. Rich text formatting
   ========================================================================== */

.rich-text > * + * {
    margin-top: var(--space-5);
}

.rich-text h2,
.rich-text h3,
.rich-text h4 {
    margin-top: var(--space-10);
    margin-bottom: var(--space-4);
}

.rich-text ul,
.rich-text ol {
    display: grid;
    gap: var(--space-3);
    padding-left: var(--space-6);
    list-style: initial;
}

.rich-text ul {
    list-style: disc;
}

.rich-text ol {
    list-style: decimal;
}

.rich-text li {
    color: var(--color-text-soft);
    line-height: 1.72;
}

.rich-text strong {
    color: var(--color-text);
    font-weight: 600;
}

.rich-text em {
    color: var(--color-accent-soft);
    font-style: italic;
}

.rich-text blockquote {
    padding: var(--space-6) var(--space-8);
    border-left: 2px solid rgba(200, 164, 106, 0.52);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    color: var(--color-text);
    font-size: 1.04rem;
    line-height: 1.78;
}

.rich-text code {
    padding: 0.15rem 0.4rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xs);
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-accent-soft);
    font-family:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 0.92em;
}

/* ==========================================================================
   6. Meta and small text
   ========================================================================== */

.meta-text {
    color: var(--color-text-muted);
    font-size: 0.84rem;
    line-height: 1.5;
}

.caption {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.overline {
    color: var(--color-accent-soft);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

/* ==========================================================================
   7. Width helpers for readable copy
   ========================================================================== */

.measure-sm {
    max-width: 38rem;
}

.measure-md {
    max-width: 48rem;
}

.measure-lg {
    max-width: 60rem;
}

/* ==========================================================================
   8. Light mode refinements
   ========================================================================== */

html[data-theme="light"] .rich-text blockquote {
    background: rgba(20, 35, 52, 0.025);
    border-left-color: rgba(179, 138, 75, 0.46);
}

html[data-theme="light"] .text-link {
    border-bottom-color: rgba(179, 138, 75, 0.3);
}

html[data-theme="light"] .text-link:hover {
    border-bottom-color: rgba(179, 138, 75, 0.5);
}