/* ============================================
   PLANFRI DESIGN SYSTEM — TOKENS
   Global spacing, typography, and layout tokens
   ============================================ */

:root {
    /* Spacing Scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;

    /* Typography Scale */
    --text-caption: 9px;
    --text-label: 10px;
    --text-small: 11px;
    --text-body: 13px;
    --text-body-lg: 14px;
    --text-h3: 24px;
    --text-h2: 36px;
    --text-h1: 56px;
    --text-display: 80px;

    /* A4 Page Dimensions */
    --a4-width: 210mm;
    --a4-height: 297mm;
    --page-padding: 25mm;
    --page-content-height: 247mm;

    /* Component Tokens */
    --card-radius: 2rem;
    --card-radius-lg: 3rem;
    --card-radius-xl: 4rem;
    --card-padding: var(--space-xl);
    --section-gap: var(--space-2xl);
}

/* ============================================
   TYPOGRAPHY UTILITY CLASSES
   ============================================ */

.typo-display {
    font-size: var(--text-display);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.85;
    font-family: var(--heading-font, 'Inter', sans-serif);
}

.typo-h1 {
    font-size: var(--text-h1);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 0.9;
    font-family: var(--heading-font, 'Inter', sans-serif);
}

.typo-h2 {
    font-size: var(--text-h2);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.1;
    font-family: var(--heading-font, 'Inter', sans-serif);
}

.typo-h3 {
    font-size: var(--text-h3);
    font-weight: 800;
    line-height: 1.2;
}

.typo-body {
    font-size: var(--text-body);
    font-weight: 500;
    line-height: 2;
    font-family: var(--body-font, 'Inter', sans-serif);
}

.typo-body-lg {
    font-size: var(--text-body-lg);
    font-weight: 500;
    line-height: 2;
    font-family: var(--body-font, 'Inter', sans-serif);
}

.typo-caption {
    font-size: var(--text-caption);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    font-family: var(--body-font, 'Inter', sans-serif);
}

.typo-label {
    font-size: var(--text-label);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5em;
    font-family: var(--body-font, 'Inter', sans-serif);
}

/* ============================================
   CARD STYLE VARIANTS
   ============================================ */

.card-flat {
    background: var(--card-bg, white);
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius, 2rem);
}

.card-elevated {
    background: var(--card-bg, white);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius, 2rem);
}

.card-glass {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius, 2rem);
}

/* ============================================
   SECTION HEADER STYLE VARIANTS
   ============================================ */

.section-header-minimal {
    padding-bottom: var(--space-lg);
    margin-bottom: var(--space-2xl);
    border-bottom: 2px solid #e2e8f0;
}

.section-header-bold {
    padding-bottom: var(--space-lg);
    margin-bottom: var(--space-2xl);
    border-bottom: 12px solid #0f172a;
}

.section-header-decorative {
    text-align: center;
    padding-bottom: var(--space-xl);
    margin-bottom: var(--space-3xl);
}

/* ============================================
   BROCHURE PAGE SYSTEM
   ============================================ */

.brochure-page {
    position: relative;
    width: var(--a4-width);
    height: var(--a4-height);
    box-sizing: border-box;
    overflow: hidden;
    background: white;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.05);
    page-break-after: always;
}

.brochure-page:last-child {
    page-break-after: avoid;
}

.brochure-page-content {
    padding: var(--page-padding);
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.brochure-cover-page {
    position: relative;
    width: var(--a4-width);
    height: var(--a4-height);
    box-sizing: border-box;
    overflow: hidden;
    background: white;
    page-break-after: always;
}

/* Content flow container (pre-pagination) */
.brochure-flow {
    width: var(--a4-width);
    box-sizing: border-box;
}

.brochure-flow-section {
    width: var(--a4-width);
    box-sizing: border-box;
    padding: var(--page-padding);
}

/* No-break marker for pagination engine */
.no-break {
    page-break-inside: avoid;
    break-inside: avoid;
}

/* Page number */
.page-number {
    position: absolute;
    bottom: 12mm;
    right: 16mm;
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.page-number::before {
    content: '';
    display: block;
    width: 12mm;
    height: 0.5px;
    background: #cbd5e1;
}

.page-number span {
    font-size: var(--text-label);
    font-weight: 900;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.4em;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    body { margin: 0; padding: 0; }
    .brochure-page { box-shadow: none; margin: 0; }
}
