/* =========================================
   SWISS GRID SYSTEM (12 Columns)
   Inspired by Josef Müller-Brockmann
   Flexible, modular typography placement
   ========================================= */
.swiss-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: 2rem;
    row-gap: 4rem;
    /* Breathable vertical rhythm */
    width: 100%;
    align-items: start;
}

/* Column Spans - "Flexible spans" */
/* Using grid-column-end allows mixing with col-start-X without conflict */
.col-span-1 {
    grid-column-end: span 1;
}

.col-span-2 {
    grid-column-end: span 2;
}

.col-span-3 {
    grid-column-end: span 3;
}

.col-span-4 {
    grid-column-end: span 4;
}

.col-span-5 {
    grid-column-end: span 5;
}

.col-span-6 {
    grid-column-end: span 6;
}

.col-span-7 {
    grid-column-end: span 7;
}

.col-span-8 {
    grid-column-end: span 8;
}

.col-span-9 {
    grid-column-end: span 9;
}

.col-span-10 {
    grid-column-end: span 10;
}

.col-span-11 {
    grid-column-end: span 11;
}

.col-span-12 {
    grid-column-end: span 12;
}

/* Column Placements - "Place type in multiple places" */
.col-start-1 {
    grid-column-start: 1;
}

.col-start-2 {
    grid-column-start: 2;
}

.col-start-3 {
    grid-column-start: 3;
}

.col-start-4 {
    grid-column-start: 4;
}

.col-start-5 {
    grid-column-start: 5;
}

.col-start-6 {
    grid-column-start: 6;
}

.col-start-7 {
    grid-column-start: 7;
}

.col-start-8 {
    grid-column-start: 8;
}

.col-start-9 {
    grid-column-start: 9;
}

.col-start-10 {
    grid-column-start: 10;
}

.col-start-11 {
    grid-column-start: 11;
}

.col-start-12 {
    grid-column-start: 12;
}

/* Typographic Alignment / Identity */
.swiss-align-right {
    text-align: right;
}

.swiss-align-left {
    text-align: left;
}

.swiss-align-just {
    text-align: justify;
}

/* Responsive Fallback (Stack on Mobile) */
/* =========================================
   RESPONSIVE TYPOGRAPHY & LAYOUT ADJUSTMENTS
   ========================================= */

/* Tablet / Narrow Laptop (1100px) - Prevent unreadable narrow columns */
@media (max-width: 1100px) {
    .swiss-grid {
        /* Switch to Flex earlier to prevent squashed columns */
        display: flex;
        flex-direction: column;
        gap: 3rem;
    }

    [class*="col-span-"],
    [class*="col-start-"] {
        /* Force full width or controlled width for readability */
        width: 100%;
        max-width: 700px;
        /* Optimal reading measure */
        grid-column: auto;
        margin-left: 0;
    }

    /* Optional: Indent specific items if you still want a grid feel */
    .col-start-3,
    .col-start-6,
    .col-start-9 {
        margin-left: 0;
        /* Flatten hierarchy for readability */
    }
}


/* Mobile (768px) - Full Stack */
@media (max-width: 768px) {
    .swiss-grid {
        display: flex;
        flex-direction: column;
        gap: 3rem;
    }

    [class*="col-span-"],
    [class*="col-start-"] {
        width: 100%;
        grid-column: auto;
        margin-left: 0;
    }
}