@import url('https://fonts.googleapis.com/css2?family=Geist+Pixel&display=swap');


/* =========================================
   VARIABLES
========================================= */

:root {
    --background: #f2f4f3;
    --text: #111111;
    --grey: #666666;
    --border: #111113;
    --white: #FFFFFF;
    --accent: #111113;

    --max-width: 1200px;
    --font-main: "Geist Pixel", Arial, Helvetica, sans-serif;
    --font-display: "Geist Pixel", Helvetica, sans-serif;
}


/* =========================================
   RESET
========================================= */

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

html {
    scroll-behavior: smooth;
    background: var(--background);
}

body {
    background: var(--background);
    color: var(--text);
    font-family: var(--font-main);
    line-height: 1.5;
}

::selection {
    background: var(--accent);
    color: var(--white);
}

::-moz-selection {
    background: var(--accent);
    color: var(--white);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--grey);
}

img {
    max-width: 100%;
    display: block;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    letter-spacing: normal;
}


/* =========================================
   LAYOUT
========================================= */

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 30px;
    background: var(--background);
}


/* =========================================
   HEADER
========================================= */

.site-header {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    font-size: 32px;
    font-weight: 900;
}

.logo img {
    width: 80px;
    height: 80px;
    display: block;
    flex-shrink: 0;
}

.logo:hover {
    color: var(--text);
}

.main-nav {
    display: flex;
    gap: 30px;
}

.main-nav a {
    position: relative;
    text-decoration: none;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 2px;
    background: var(--text);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
    transform: scaleX(1);
}


/* =========================================
   MOBILE MENU
========================================= */

.menu-toggle {
    display: none;
    background: none;
    border: 0;
    font: inherit;
    cursor: pointer;
}

.main-nav.active {
    display: flex;
}


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

.eyebrow {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    color: var(--accent);
}


/* =========================================
   HERO
========================================= */

.hero {
    padding: 120px 0 110px;
    max-width: 900px;
}

.hero h1 {
    font-size: clamp(48px, 8vw, 96px);
    line-height: 0.95;
    margin-bottom: 35px;
}

.intro {
    font-size: 22px;
    line-height: 1.45;
    max-width: 650px;
    color: var(--grey);
}


/* =========================================
   HOME SECTIONS
========================================= */

.home-section {
    padding: 70px 0;
    border-top: 1px solid var(--border);
}

.section-heading {
    margin-bottom: 40px;
}

.section-heading h2 {
    font-size: 40px;
    line-height: 1;
}


/* =========================================
   THE INDEX
========================================= */

.index-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
}

.index-group {
    border-top: 4px solid var(--border);
    padding-top: 20px;
}

.index-group h3 {
    font-size: 34px;
    line-height: 1;
    margin-bottom: 12px;
}

.index-group > p {
    color: var(--grey);
    max-width: 280px;
    margin-bottom: 25px;
}

.index-group ul {
    list-style: none;
    border-top: 1px solid var(--border);
}

.index-group li {
    border-bottom: 1px solid var(--border);
}

.index-group a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 0;
    font-weight: 700;
    transition: color 0.15s ease;
}

.index-group a span {
    color: var(--grey);
    transition:
        transform 0.2s ease,
        color 0.2s ease;
}

.index-group a:hover {
    color: var(--grey);
}

.index-group a:hover span {
    color: var(--accent);
    transform: translateX(6px);
}


/* =========================================
   RECENTLY ADDED
========================================= */

.recent-list {
    border-top: 1px solid var(--border);
}

.recent-entry {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 40px;
    padding: 30px 0;
    border-bottom: 1px solid var(--border);
}

.recent-date {
    font-size: 13px;
    font-weight: 700;
    color: var(--grey);
    padding-top: 4px;
}

.recent-content {
    max-width: 800px;
}

.recent-content .entry-meta {
    margin-bottom: 15px;
}

.recent-content h3 {
    font-size: 28px;
    line-height: 1.05;
    margin-bottom: 12px;
}

.recent-content p {
    max-width: 650px;
    color: var(--grey);
}

.recent-content a {
    display: inline-block;
    margin-top: 15px;
    font-weight: 700;
    transition: color 0.15s ease;
}

.recent-content a:hover {
    color: var(--grey);
}


/* =========================================
   ENTRY META
========================================= */

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.entry-meta span {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid var(--border);
    padding: 5px 9px;
}


/* =========================================
   SECTION MORE
========================================= */

.section-more {
    margin-top: 30px;
}

.section-more a {
    font-weight: 700;
    transition: color 0.15s ease;
}

.section-more a:hover {
    color: var(--grey);
}


/* =========================================
   WHY BLACK FLAG
========================================= */

.why-section {
    padding: 120px 0;
}

.why-content {
    max-width: 800px;
}

.why-content h2 {
    font-size: clamp(42px, 6vw, 70px);
    line-height: 0.95;
    margin-bottom: 35px;
}

.why-content p {
    max-width: 650px;
    color: var(--grey);
    font-size: 19px;
    margin-bottom: 18px;
}

.why-content a {
    display: inline-block;
    margin-top: 15px;
    font-weight: 700;
    transition: color 0.15s ease;
}

.why-content a:hover {
    color: var(--grey);
}


/* =========================================
   PAGE HEADER
========================================= */

.page-header {
    padding: 100px 0 70px;
    max-width: 800px;
}

.page-header h1 {
    font-size: clamp(48px, 8vw, 80px);
    line-height: 0.95;
    margin-bottom: 30px;
}

.page-header .intro {
    font-size: 22px;
}


/* =========================================
   INDEX LIST
========================================= */

.index-list {
    border-top: 1px solid var(--border);
}

.index-entry {
    padding: 50px 0;
    border-bottom: 1px solid var(--border);
    max-width: 850px;
}

.index-entry h2 {
    font-size: 38px;
    line-height: 1;
    margin: 15px 0 20px;
}

.index-entry p {
    color: var(--grey);
    max-width: 650px;
}

.entry-link {
    display: inline-block;
    margin-top: 25px;
    font-weight: 700;
}

.entry-link:hover {
    color: var(--grey);
}


/* =========================================
   FOOTER
========================================= */

.site-footer {
    max-width: var(--max-width);
    margin: 80px auto 0;
    padding: 40px 30px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    gap: 40px;
}

.footer-brand p {
    color: var(--grey);
    margin-top: 5px;
}

.footer-nav {
    display: flex;
    gap: 20px;
}

.footer-nav a {
    transition: color 0.15s ease;
}

.footer-nav a:hover {
    color: var(--grey);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-brand img {
    width: 64px;
    height: 64px;
    display: block;
    flex-shrink: 0;
}

.footer-brand-text {
    display: flex;
    flex-direction: column;
}

.footer-brand-text p {
    color: var(--grey);
    margin-top: 2px;
}


/* =========================================
   BLACK CURSOR
========================================= */

@media (pointer: fine) {

    body,
    a,
    button,
    label,
    [role="button"] {
        cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 2 L3 20 L8 15 L12 22 L15 20 L11 13 L18 13 Z' fill='%23111111'/%3E%3C/svg%3E") 3 2, auto;
    }

}


/* =========================================
   PAGE TOOLS
========================================= */

.page-tools {
    position: fixed;
    right: 20px;
    bottom: 20px;

    display: flex;
    flex-direction: column;
    align-items: flex-end;

    gap: 8px;

    text-align: right;

    z-index: 100;
}

.copy-link {
    background: var(--background);
    color: var(--text);

    border: 1px solid var(--border);

    padding: 4px 6px;

    font: inherit;
    font-size: 10px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.copy-link:hover,
.copy-link.copied {
    background: var(--text);
    color: var(--background);
}

.back-to-top {
    font-size: 12px;
    font-weight: 700;
}

.back-to-top:hover {
    color: var(--grey);
}


/* =========================================
   ORGANISATION INDEX
========================================= */

.organisation-index {
    border-top: 1px solid var(--border);
}

.organisation-letter {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 40px;
    padding: 55px 0;
    border-bottom: 1px solid var(--border);
}

.organisation-letter > h2 {
    font-size: 64px;
    line-height: 1;
    font-weight: 900;
}

.organisation-list {
    max-width: 850px;
}

.organisation-entry {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    gap: 25px;
    align-items: start;

    padding: 0 0 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.organisation-entry:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}


/* =========================================
   ORGANISATION LOGO
========================================= */

.organisation-logo {
    width: 90px;
    height: 90px;

    border: 1px solid var(--border);

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--white);
}

.organisation-logo img {
    max-width: 75%;
    max-height: 75%;
    object-fit: contain;
}


/* =========================================
   ORGANISATION CONTENT
========================================= */

.organisation-content {
    max-width: 750px;
}

.organisation-entry .entry-meta {
    margin-bottom: 15px;
}

.organisation-entry h3 {
    font-size: 32px;
    line-height: 1;
    margin-bottom: 15px;
}

.organisation-entry p {
    color: var(--grey);
    max-width: 650px;
}

.organisation-entry .entry-link {
    margin-top: 20px;
}


/* =========================================
   ORGANISATION FILTERS
========================================= */

.organisation-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    padding: 0 0 35px;
}

.organisation-filter {
    background: transparent;
    color: var(--text);

    border: 1px solid var(--border);

    padding: 7px 11px;

    font: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}

.organisation-filter:hover,
.organisation-filter.active {
    background: var(--text);
    color: var(--background);
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 800px) {

    .index-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }

}


@media (max-width: 700px) {

    /* =====================================
       LAYOUT
    ===================================== */

    main {
        padding: 0 20px;
        background: var(--background);
    }


    /* =====================================
       HEADER
    ===================================== */

    .site-header {
        padding: 15px 20px;
    }

    .logo {
        font-size: 24px;
    }

    .logo img {
        width: 58px;
        height: 58px;
    }

    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
        font-size: 15px;
    }

    .main-nav.active {
        display: flex;
        flex-direction: column;

        position: absolute;

        top: 88px;
        left: 0;
        right: 0;

        background: var(--background);

        padding: 25px 20px;

        border-bottom: 1px solid var(--border);

        gap: 20px;

        z-index: 10;
    }

    .main-nav.active a {
        font-size: 18px;
    }


    /* =====================================
       HERO
    ===================================== */

    .hero {
        padding: 75px 0 70px;
    }

    .hero h1 {
        font-size: clamp(44px, 14vw, 68px);
        line-height: 0.95;
        margin-bottom: 28px;
    }

    .intro {
        font-size: 19px;
        line-height: 1.45;
    }


    /* =====================================
       HOME SECTIONS
    ===================================== */

    .home-section {
        padding: 55px 0;
    }

    .section-heading {
        margin-bottom: 30px;
    }

    .section-heading h2 {
        font-size: 34px;
        line-height: 1;
    }


    /* =====================================
       THE INDEX
    ===================================== */

    .index-grid {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .index-group {
        padding-top: 16px;
    }

    .index-group h3 {
        font-size: 32px;
    }

    .index-group > p {
        margin-bottom: 20px;
    }

    .index-group a {
        padding: 14px 0;
    }


    /* =====================================
       RECENTLY ADDED
    ===================================== */

    .recent-entry {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 25px 0;
    }

    .recent-date {
        font-size: 12px;
        padding-top: 0;
    }

    .recent-content h3 {
        font-size: 27px;
        line-height: 1.05;
    }

    .recent-content p {
        font-size: 16px;
    }


    /* =====================================
       WHY BLACK FLAG
    ===================================== */

    .why-section {
        padding: 70px 0;
    }

    .why-content h2 {
        font-size: clamp(40px, 12vw, 58px);
        line-height: 0.95;
        margin-bottom: 30px;
    }

    .why-content p {
        font-size: 18px;
    }


    /* =====================================
       PAGE HEADER
    ===================================== */

    .page-header {
        padding: 70px 0 50px;
    }

    .page-header h1 {
        font-size: clamp(44px, 13vw, 68px);
        line-height: 0.95;
        margin-bottom: 25px;
    }

    .page-header .intro {
        font-size: 19px;
    }


    /* =====================================
       INDEX LIST
    ===================================== */

    .index-entry {
        padding: 35px 0;
    }

    .index-entry h2 {
        font-size: 32px;
    }


    /* =====================================
       ORGANISATION INDEX
    ===================================== */

    .organisation-letter {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 35px 0;
    }

    .organisation-letter > h2 {
        font-size: 46px;
    }

    .organisation-entry {
        grid-template-columns: 70px 1fr;
        gap: 18px;

        padding-bottom: 30px;
        margin-bottom: 30px;
    }

    .organisation-logo {
        width: 70px;
        height: 70px;
    }

    .organisation-content {
        min-width: 0;
    }

    .organisation-entry h3 {
        font-size: 26px;
        line-height: 1.05;
    }

    .organisation-entry p {
        font-size: 16px;
        line-height: 1.5;
    }

    .organisation-entry .entry-meta {
        gap: 6px;
        margin-bottom: 12px;
    }

    .organisation-entry .entry-meta span {
        font-size: 10px;
        padding: 4px 7px;
    }

    .organisation-entry .entry-link {
        grid-column: 2;
        margin-top: 15px;
    }


    /* =====================================
       ORGANISATION FILTERS
    ===================================== */

    .organisation-filters {
        gap: 6px;
        padding-bottom: 25px;
    }

    .organisation-filter {
        font-size: 11px;
        padding: 7px 9px;
    }


    /* =====================================
       FOOTER
    ===================================== */

    .site-footer {
        flex-direction: column;
        gap: 25px;
        margin-top: 60px;
        padding: 35px 20px;
    }

    .footer-brand img {
        width: 54px;
        height: 54px;
    }

    .footer-nav {
        flex-direction: column;
        gap: 12px;
    }


    /* =====================================
       PAGE TOOLS
    ===================================== */

    .page-tools {
        right: 15px;
        bottom: 15px;
        gap: 6px;
    }

    .copy-link {
        font-size: 9px;
        padding: 4px 6px;
    }

    .back-to-top {
        font-size: 11px;
    }

}