/* 
   International Typographic Style / Swiss Style
   1950s post-war Switzerland aesthetic
*/

:root {
    --color-black: #111111;
    /* Off-black for print feel */
    --color-bg: #f4f4f0;
    /* Warm, light neutral off-white */
    --color-red: #ea2314;
    /* True Swiss Vermilion Red */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--color-black);
    padding: 0;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

.poster-container {
    width: 100%;
    container-type: inline-size;
}

.poster {
    width: 100%;
    background-color: var(--color-bg);
    position: relative;
    overflow: hidden;
    padding: 5vw;
    min-height: 100vh;

    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: 1.5vw;
    grid-auto-rows: min-content;
}

.poster * {
    z-index: 2;
    /* Important for grid placement above background elements */
}

/* Background Visual Elements */
.red-circle {
    position: absolute;
    width: 70vw;
    height: 70vw;
    background-color: var(--color-red);
    border-radius: 50%;
    top: -15vw;
    right: -25vw;
    z-index: 0;
    pointer-events: none;
    mix-blend-mode: multiply;
    /* Gives it the ink overlay aesthetic */
}

.red-rule {
    position: absolute;
    grid-column: 7;
    /* Placed exactly on the line dividing column 6 and 7 */
    grid-row: 1 / -1;
    /* Spans top to bottom of grid */
    border-left: 0.2vw solid var(--color-red);
    top: 5vw;
    /* Start inside padding */
    bottom: 5vw;
    /* End inside padding */
    width: 0;
    z-index: 1;
    transform: translateX(calc(-0.75vw - 0.1vw));
    /* Center it exactly in the 1.5vw gap */
}

/* Toggleable Grid Overlay Layer */
.grid-overlay {
    position: absolute;
    inset: 0;
    padding: 5vw;
    display: none;
    /* Toggled by JS */
    grid-template-columns: repeat(12, 1fr);
    column-gap: 1.5vw;
    pointer-events: none;
    z-index: 100;

    background-image: linear-gradient(to bottom, rgba(234, 35, 20, 0.2) 1px, transparent 1px);
    background-size: 100% 2vw;
    /* Horizontal baseline rhythm */
}

body.show-grid .grid-overlay {
    display: grid;
}

.grid-overlay .col-line {
    background-color: rgba(234, 35, 20, 0.05);
    /* Very light red to show grid columns visually */
    height: 100%;
}

/* Typography & Layout */
.top-left-label {
    grid-column: 1 / span 5;
    font-size: clamp(14px, 0.9vw, 18px);
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
    margin-bottom: 4vw;
}

.top-left-label p {
    margin-bottom: 1vw;
}

.main-header {
    grid-column: 1 / 13;
    margin-bottom: 4.5vw;
}

h1 {
    font-size: clamp(50px, 18vw, 350px);
    font-weight: 700;
    line-height: 0.78;
    letter-spacing: -0.05em;
    margin-bottom: 1.5vw;
    margin-left: -0.8vw;
    /* Optical edge alignment for oversized text */
}

h2 {
    font-size: clamp(22px, 3.5vw, 64px);
    line-height: 1.1;
    font-weight: 500;
    letter-spacing: -0.03em;
}

.left-column {
    grid-column: 1 / span 6;
    /* Uses the left 6 columns entirely */
}

.column-item {
    display: flex;
    margin-bottom: 2.2vw;
}

.column-item:last-child {
    margin-bottom: 0;
}

.roman-numeral {
    width: clamp(24px, 3.5vw, 50px);
    font-size: clamp(20px, 1.6vw, 40px);
    font-weight: 700;
    color: var(--color-red);
    padding-top: 0.1vw;
    /* Optical alignment with H3 */
}

.item-text {
    flex: 1;
}

.item-text h3 {
    font-size: clamp(18px, 1.4vw, 32px);
    font-weight: 700;
    margin-bottom: 0.6vw;
    line-height: 1.1;
    letter-spacing: -0.01em;
}

.item-text p {
    font-size: clamp(16px, 1.05vw, 24px);
    line-height: 1.4;
    margin-bottom: 1vw;
    color: #222;
    /* High legibility */
}

.item-text p:last-child {
    margin-bottom: 0;
}

.black-horizontal-bar {
    grid-column: 1 / 13;
    height: 1.2vw;
    min-height: 5px;
    background-color: var(--color-black);
    margin-top: 4vw;
    margin-bottom: 3vw;
}

.bottom-section {
    grid-column: 7 / 13;
    /* Shifted to right 6 columns for strong asymmetry */
    font-size: clamp(18px, 1.75vw, 48px);
    line-height: 1.3;
    font-weight: 400;
    letter-spacing: -0.02em;
    margin-bottom: 2vw;
}

/* User Interface Controls */
button#toggle-grid {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--color-red);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(234, 35, 20, 0.3);
    z-index: 1000;
    transition: transform 0.2s, background 0.2s;
    font-family: inherit;
}

button#toggle-grid:hover {
    background: #c01a0e;
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .red-rule {
        display: none;
    }

    .left-column {
        grid-column: 1 / 13;
    }

    .bottom-section {
        grid-column: 1 / 13;
        margin-top: 2rem;
    }

    .top-left-label {
        grid-column: 1 / 13;
    }
}