/**
 * Typography System
 * Fluid responsive type with vw units + breakpoint clamping
 * Professional, readable, not overly stylized
 */

/* ==========================================
   FONT IMPORT - Roboto
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');

/* ==========================================
   FLUID TYPE SCALING
   Base font size scales with viewport width
   ========================================== */

/* Mobile: 16px base */
html {
    font-size: 16px;
}

/* Fluid scaling between mobile and tablet (768px - 1024px) */
@media (min-width: 768px) {
    html {
        font-size: calc(16px + 0.2vw);
    }
}

/* Desktop: lock at 18px */
@media (min-width: 1280px) {
    html {
        font-size: 18px;
    }
}

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

body {
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-offwhite);
}

/* ==========================================
   HEADINGS
   Clear hierarchy, no decorative styling
   ========================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-primary);
    margin-bottom: 0.5em;
}

/* H1 - Hero/Page Title */
h1, .text-h1 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* H2 - Section Title */
h2, .text-h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 600;
    letter-spacing: -0.015em;
}

/* H3 - Subsection Title */
h3, .text-h3 {
    font-size: clamp(1.5rem, 2.8vw, 2.25rem);
    font-weight: 600;
}

/* H4 - Component Title */
h4, .text-h4 {
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    font-weight: 600;
}

/* H5 - Small Title */
h5, .text-h5 {
    font-size: clamp(1.125rem, 1.8vw, 1.375rem);
    font-weight: 600;
}

/* H6 - Label */
h6, .text-h6 {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================
   BODY TEXT VARIANTS
   ========================================== */

p {
    margin-bottom: 1em;
}

.text-large {
    font-size: clamp(1.125rem, 1.5vw, 1.25rem);
    line-height: 1.7;
}

.text-small {
    font-size: 0.875rem;
    line-height: 1.5;
}

.text-tiny {
    font-size: 0.75rem;
    line-height: 1.4;
}

/* ==========================================
   TEXT MODIFIERS
   ========================================== */

.text-bold {
    font-weight: 600;
}

.text-semibold {
    font-weight: 500;
}

.text-regular {
    font-weight: 400;
}

.text-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

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

/* ==========================================
   COLOR UTILITIES
   ========================================== */

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

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

.text-gray {
    color: var(--color-gray-500);
}

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

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

strong, b {
    font-weight: 600;
}

em, i {
    font-style: italic;
}

/* Links - underline on hover, no transition lift */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-color);
}

@media (hover: hover) and (pointer: fine) {
    a:hover {
        color: var(--color-primary);
    }
}

/* Inline links in text */
.text-content a {
    color: var(--color-primary);
    border-bottom: 1px solid currentColor;
}

@media (hover: hover) and (pointer: fine) {
    .text-content a:hover {
        color: var(--color-accent);
        border-bottom-color: transparent;
    }
}

/* Code elements */
code, pre {
    font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
    font-size: 0.9em;
}

code {
    padding: 0.2em 0.4em;
    background: var(--color-gray-100);
    border: 1px solid var(--color-gray-200);
}

pre {
    padding: var(--space-md);
    background: var(--color-gray-100);
    border-left: 3px solid var(--color-primary);
    overflow-x: auto;
}

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

/* Blockquote */
blockquote {
    padding: var(--space-md);
    border-left: 3px solid var(--color-primary);
    margin: var(--space-lg) 0;
    font-size: 1.125rem;
    color: var(--color-gray-700);
}

/* Lists in content */
.text-content ul,
.text-content ol {
    margin: var(--space-md) 0;
    padding-left: var(--space-lg);
}

.text-content ul {
    list-style: disc;
}

.text-content ol {
    list-style: decimal;
}

.text-content li {
    margin-bottom: 0.5em;
}

/* ==========================================
   LEAD TEXT / INTRO TEXT
   ========================================== */

.lead-text {
    font-size: clamp(1.125rem, 1.8vw, 1.375rem);
    line-height: 1.7;
    color: var(--color-gray-700);
    max-width: 70ch;
}

/* ==========================================
   SECTION LABELS
   Small uppercase labels above sections
   ========================================== */

.section-label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.section-headline-large {
    font-size: clamp(2.25rem, 5vw, 4rem);
    font-weight: 600;
    line-height: 1.15;
    color: var(--color-dark);
    letter-spacing: -0.02em;
}

/* ==========================================
   GREEK TEXT ADJUSTMENTS
   ========================================== */

:lang(el) {
    /* Greek text often needs slightly more line height */
    line-height: 1.65;
}

:lang(el) h1,
:lang(el) h2,
:lang(el) h3,
:lang(el) h4,
:lang(el) h5,
:lang(el) h6 {
    line-height: 1.3;
}
