@font-face {
    font-family: "Borel";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/assets/fonts/borel/latin.woff2) format("woff2");
    unicode-range:
        U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
        U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
        U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Delius";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url(/assets/fonts/delius/latin.woff2) format("woff2");
    unicode-range:
        U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
        U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
        U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@view-transition {
    navigation: auto;
}

:root {
    /* --- Post-It Gradients --- */
    --color-1: linear-gradient(135deg, #ffff88 80%, #eee866 100%);
    --color-2: linear-gradient(135deg, #ffc0cb 80%, #ffacc0 100%);
    --color-3: linear-gradient(135deg, #add8e6 80%, #99cfe0 100%);
    --color-4: linear-gradient(135deg, #98fb98 80%, #86e886 100%);
    --color-5: linear-gradient(135deg, #e6e6fa 80%, #d8d8f2 100%);
    --color-6: linear-gradient(135deg, #ffd7b5 80%, #ffcc99 100%);
    --color-7: linear-gradient(135deg, #afeeee 80%, #96e3e3 100%);
    --color-8: linear-gradient(135deg, #ffb7c5 80%, #ffa7b8 100%);
    --color-photo-bg: linear-gradient(135deg, #ffffff 80%, #eaeaea 100%);

    /* --- Base Colors --- */
    --bg-color: #eceade;
    --text-color: #3d3d3d;
    --link-color: #0056b3;
    --link-color-hover: #003d82;

    /* --- UI Element Colors --- */
    --tape-color: rgba(255, 255, 255, 0.42);
    --post-it-header-bg: rgba(48, 48, 48, 0.05);
    --hr-border-color: rgba(0, 0, 0, 0.2);

    /* --- Background Sketch Pattern Colors --- */
    --pattern-dots-1: #f1f1f1;
    --pattern-dots-2: #777777;
    --pattern-lines-margin: #ab4444;
    --pattern-lines-grid: #94acd4;

    /* --- Typography --- */
    --font-primary: "Borel", cursive;
    --font-secondary: "Delius", cursive;

    /* --- Shadows --- */
    --text-stroke-shadow: #f2f2f280 2px 2px, #f2f2f280 -2px 2px, #f2f2f280 2px -2px, #f2f2f280 -2px -2px;
    --card-shadow: 5px 5px 10px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 8px 12px 20px rgba(0, 0, 0, 0.12);

    /* --- Layout & Spacing --- */
    --max-width: 1024px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    /* Enable smooth scrolling for anchor links */
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100svh;
    background-color: var(--bg-color);
    font-family: var(--font-primary);
    color: var(--text-color);

    background-image:
        radial-gradient(circle, var(--pattern-dots-1) 10px, transparent 11px),
        radial-gradient(circle, var(--pattern-dots-2) 10px, transparent 11px),
        linear-gradient(90deg, transparent 79px, var(--pattern-lines-margin) 79px, var(--pattern-lines-margin) 81px, transparent 81px),
        repeating-linear-gradient(transparent, transparent 23px, var(--pattern-lines-grid) 24px),
        url("/assets/images/sketch-me.png"),
        url("/assets/images/sketch-head.png");

    background-repeat: repeat-y, repeat-y, repeat-y, repeat, no-repeat, no-repeat;
    background-position: 16px 31px, 15px 30px, 0 0, 0 0, 64px bottom, right 24px;
    background-size:
        40px 80px,
        40px 80px,
        100% 24px,
        100% 24px,
        auto min(var(--max-width), min(40vw, 512px)),
        auto min(var(--max-width), min(40vw, 320px));

    padding: 8px clamp(16px, (100% - var(--max-width)) / 2, 50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

header {
    width: 100%;
    padding-top: 64px;
    margin-bottom: 40px;
}

h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    line-height: 1;
    margin: 0;
    text-shadow: var(--text-stroke-shadow);
    text-align: center;
}

/* --- THE GRID --- */
.board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
    max-width: var(--max-width);
}

.board > *:nth-child(8n+1) { transform: rotate(-2deg); }
.board > *:nth-child(8n+2) { transform: rotate(3deg); }
.board > *:nth-child(8n+3) { transform: rotate(-1deg); }
.board > *:nth-child(8n+4) { transform: rotate(4deg); }
.board > *:nth-child(8n+5) { transform: rotate(-3deg); }
.board > *:nth-child(8n+6) { transform: rotate(1deg); }
.board > *:nth-child(8n+7) { transform: rotate(-4deg); }
.board > *:nth-child(8n+8) { transform: rotate(2deg); }

.photo-it, .post-it {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.photo-it:hover, .post-it:hover {
    transform: scale(1.05) rotate(0deg) !important;
    box-shadow: var(--card-shadow-hover);
    z-index: 10;
}

.photo-it {
    display: grid;
    padding: 16px;
    gap: 8px;
    grid-template-rows: 1fr auto;
    background: var(--color-photo-bg);
}

.photo-it > div {
    overflow: hidden;
}

.photo-it > div > img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.photo-it > span {
    padding: 4px;
    font-family: var(--font-secondary);
    text-align: center;
}

.photo-it::before, .photo-it::after {
    display: block;
    content: "";
    width: 88px;
    height: 32px;
    background-color: var(--tape-color);
    position: absolute;
    transform: rotate(-30deg);
    backdrop-filter: blur(0.5px);
    z-index: 2;
}

.photo-it::before {
    left: -20px;
    top: -10px;
}
.photo-it::after {
    right: -20px;
    bottom: -10px;
}

.post-it {
    color: var(--text-color);
    display: grid;
    grid-template-rows: 40px 1fr;
    row-gap: 8px;
    overflow: hidden;
}

.post-it > h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    font-size: 20px;
    line-height: 1.25;
    margin: 0;
    background-color: var(--post-it-header-bg);
    padding: 16px 16px 0;
}

.post-it-content {
    padding: 0 16px 16px;
    font-family: var(--font-secondary);
    line-height: 1.4;
}

.post-it-content > p {
    margin: 0;
    font-size: 16px;
}

.contact-links {
    list-style: none;
    padding: 16px 0 0 0;
    margin: 0;
    font-size: 16px;
}

.contact-links li {
    margin-bottom: 8px;
}

.contact-links a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-links a:hover, .contact-links a:focus {
    text-decoration: underline;
    color: var(--link-color-hover);
}

.board > .post-it:nth-child(8n+1) { background: var(--color-1); }
.board > .post-it:nth-child(8n+2) { background: var(--color-2); }
.board > .post-it:nth-child(8n+3) { background: var(--color-3); }
.board > .post-it:nth-child(8n+4) { background: var(--color-4); }
.board > .post-it:nth-child(8n+5) { background: var(--color-5); }
.board > .post-it:nth-child(8n+6) { background: var(--color-6); }
.board > .post-it:nth-child(8n+7) { background: var(--color-7); }
.board > .post-it:nth-child(8n+8) { background: var(--color-8); }

/* --- RESPONSIVENESS --- */
@media (max-width: 601px) {
    .board > .post-it, .board > .photo-it {
        max-width: initial;
    }
    .board > *:nth-child(odd) { grid-column: 1 / span 3; }
    .board > *:nth-child(even) { grid-column: 2 / span 3; }
}

@media (min-width: 600px) and (max-width: 800px) {
    .board {
        grid-template-columns: repeat(8, 1fr);
        column-gap: 24px;
        row-gap: 32px;
    }
    .board > .post-it, .board > .photo-it {
        max-width: initial;
    }

    .board > :nth-child(1) { grid-column: 1 / span 4; grid-row: 1 / span 4; }
    .board > :nth-child(2) { grid-column: 5 / span 4; grid-row: 2 / span 2; }
    .board > :nth-child(3) { grid-column: 1 / span 4; grid-row: 5 / span 3; }
    .board > :nth-child(4) { grid-column: 5 / span 4; grid-row: 4 / span 3; }
    .board > :nth-child(5) { grid-column: 1 / span 4; grid-row: 8 / span 3; }
    .board > :nth-child(6) { grid-column: 5 / span 4; grid-row: 7 / span 3; }
    .board > :nth-child(7) { grid-column: 5 / span 4; grid-row: 10 / span 3; }
    .board > :nth-child(8) { grid-column: 1 / span 4; grid-row: 11 / span 3; }
    .board > :nth-child(9) { grid-column: 2 / span 6; grid-row: 14 / span 3; }
}

@media (min-width: 799px) {
    .board {
        grid-template-columns: repeat(8, 1fr);
        column-gap: 32px;
        row-gap: 40px;
    }
    .board > .post-it, .board > .photo-it {
        max-width: initial;
    }

    .board > :nth-child(1) { grid-column: 2 / span 3; grid-row: 1 / span 4; }
    .board > :nth-child(2) { grid-column: 5 / span 3; grid-row: 2 / span 2; }
    .board > :nth-child(3) { grid-column: 1 / span 4; grid-row: 5 / span 3; }
    .board > :nth-child(4) { grid-column: 5 / span 4; grid-row: 4 / span 3; }
    .board > :nth-child(5) { grid-column: 1 / span 4; grid-row: 8 / span 3; }
    .board > :nth-child(6) { grid-column: 5 / span 4; grid-row: 7 / span 3; }
    .board > :nth-child(7) { grid-column: 5 / span 4; grid-row: 10 / span 3; }
    .board > :nth-child(8) { grid-column: 1 / span 4; grid-row: 11 / span 3; }
    .board > :nth-child(9) { grid-column: 4 / span 3; grid-row: 14 / span 3; }
}

/* --- FOOTER & LEGAL --- */
footer {
    width: 100%;
}

footer nav {
    text-align: center;
    padding: 24px;
    font-family: var(--font-secondary);
    font-size: 14px;
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

footer a {
    color: var(--text-color);
    text-decoration: none;
    text-shadow: var(--text-stroke-shadow);
}

footer a:hover, footer a:focus {
    text-decoration: underline;
}

/* Non-grid legal layout */
.legal-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0 16px;
}

.legal-only {
    max-width: 800px !important;
    height: auto !important;
    grid-template-rows: auto 1fr !important;
    background: var(--color-1) !important;
    transform: rotate(1deg) !important;
    margin-bottom: 40px;
}

.legal-only h2 {
    font-size: 24px;
    padding-bottom: 8px;
}

.legal-only hr {
    border: 0;
    border-top: 1px dashed var(--hr-border-color);
    margin: 20px 0;
}