/*
 * The holding page and its privacy notice in the Corner system (#900 to #903).
 * Its sizes and colours are copied here, not imported, because the pages are
 * served on their own with no build step.
 */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('fonts/inter-latin.woff2') format('woff2');
}

@font-face {
    font-family: 'Space Grotesk';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/space-grotesk-700-latin.woff2') format('woff2');
}

:root {
    --indigo: #4b3bf7;
    --indigo-pressed: #2f22c9;
    --ink: #120c2e;
    --white: #ffffff;
    --on-ink: #dddaff;
    --display: 'Space Grotesk', system-ui, sans-serif;
    --gutter: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--white);
    color: var(--ink);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.45;
}

p {
    margin: 0;
}

a {
    color: var(--indigo);
    font-weight: 600;
}

a:hover {
    color: var(--indigo-pressed);
}

a:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
}

.frame {
    width: 100%;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.top {
    height: 56px;
    flex: none;
    display: flex;
    align-items: center;
}

.lockup {
    display: flex;
    align-items: flex-end;
    gap: 9px;
}

.lockup-tile {
    width: 23px;
    height: 23px;
}

.lockup-name {
    width: 53px;
    height: 18px;
}

.hero {
    padding-block: 20px 48px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.words {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

h1 {
    margin: 0;
    font-family: var(--display);
    font-weight: 700;
    font-size: 46px;
    line-height: 0.98;
    letter-spacing: -0.035em;
}

/*
 * The corner. Each side carries the stem, gap and word sizes the Corner frame
 * (#902) works out for it: the stem a sixth of the side, the gap a forty-eighth.
 * A side is chosen to fit the width left inside the gutters.
 */
.corner {
    --side: 248px;
    --stem: 42px;
    --gap: 5px;
    --word-size: 20px;
    --word-inset: 8px;
    --foot-square: 11px;
    --foot-text-size: 14px;
    position: relative;
    flex: none;
    width: var(--side);
    height: var(--side);
    color: var(--white);
}

.corner-stem {
    position: absolute;
    inset-block: 0;
    left: 0;
    width: var(--stem);
    background: var(--indigo);
}

.corner-word {
    position: absolute;
    left: 0;
    top: 0;
    bottom: var(--stem);
    width: var(--stem);
    padding-bottom: var(--word-inset);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

/* Turned so the word reads upward from the corner. */
.corner-word span {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: var(--display);
    font-weight: 700;
    font-size: var(--word-size);
    line-height: 1;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.corner-square {
    position: absolute;
    top: 0;
    right: 0;
    left: calc(var(--stem) + var(--gap));
    bottom: calc(var(--stem) + var(--gap));
    border: 4px solid var(--indigo);
}

.corner-foot {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: var(--stem);
    display: flex;
    align-items: center;
    background: var(--indigo);
}

.corner-foot-block {
    flex: none;
    width: calc(var(--stem) + var(--gap));
    display: flex;
    justify-content: center;
}

.corner-foot-square {
    width: var(--foot-square);
    height: var(--foot-square);
    border: 2px solid var(--white);
}

.corner-foot-words {
    padding-right: 16px;
    font-size: var(--foot-text-size);
    font-weight: 600;
}

/* The privacy notice: one reading column under the page's heading. */
.notice {
    padding-block: 20px 48px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.notice section {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notice h2 {
    margin: 0;
    font-family: var(--display);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

/* The two site addresses in the notice have no space to break at on a narrow phone. */
.notice p {
    max-width: 560px;
    overflow-wrap: anywhere;
}

.bottom {
    margin-top: auto;
    padding-block: 32px 28px;
    background: var(--ink);
    color: var(--on-ink);
    font-size: 14px;
}

.bottom .frame {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* On the ink footer the page's indigo link falls short of readable contrast. */
.bottom a,
.bottom a:hover {
    color: var(--white);
}

.bottom a:focus-visible {
    outline-color: var(--white);
}

@media (min-width: 320px) {
    .corner {
        --side: 288px;
        --stem: 48px;
        --gap: 6px;
        --word-size: 23px;
        --word-inset: 9px;
        --foot-square: 12px;
    }
}

@media (min-width: 360px) {
    .corner {
        --side: 328px;
        --stem: 54px;
        --gap: 7px;
        --word-size: 25px;
        --word-inset: 10px;
        --foot-square: 14px;
        --foot-text-size: 15px;
    }
}

@media (min-width: 390px) {
    .corner {
        --side: 358px;
        --stem: 60px;
        --word-size: 28px;
        --word-inset: 11px;
        --foot-square: 15px;
    }
}

@media (min-width: 422px) {
    .corner {
        --side: 390px;
        --stem: 64px;
        --gap: 8px;
        --word-size: 30px;
        --word-inset: 12px;
        --foot-square: 16px;
        --foot-text-size: 16px;
    }
}

@media (min-width: 512px) {
    .corner {
        --side: 480px;
        --stem: 80px;
        --gap: 10px;
        --word-size: 38px;
        --word-inset: 15px;
        --foot-square: 20px;
        --foot-text-size: 17px;
    }
}

/* From here the heading has the 560 px column its desktop size was drawn for. */
@media (min-width: 640px) {
    :root {
        --gutter: 40px;
    }

    body {
        line-height: 1.5;
    }

    .frame {
        max-width: 640px;
    }

    .top {
        height: 72px;
    }

    .lockup {
        gap: 10px;
    }

    .lockup-tile {
        width: 26px;
        height: 26px;
    }

    .lockup-name {
        width: 61px;
        height: 21px;
    }

    .hero {
        padding-block: 48px 96px;
        gap: 64px;
    }

    .words {
        gap: 28px;
    }

    h1 {
        font-size: 104px;
        line-height: 0.94;
        letter-spacing: -0.04em;
    }

    .words p {
        max-width: 520px;
    }

    .lead {
        font-size: 19px;
    }

    .notice {
        padding-block: 48px 96px;
        gap: 20px;
    }

    .notice section {
        margin-top: 28px;
        gap: 14px;
    }

    .notice h2 {
        font-size: 28px;
    }

    .corner {
        --side: 560px;
        --stem: 94px;
        --gap: 12px;
        --word-size: 44px;
        --word-inset: 18px;
        --foot-square: 24px;
    }

    .bottom {
        padding-block: 48px 40px;
    }
}

/*
 * Two columns from the width where the words' 560 px, the 64 px gap and a
 * 328 px corner fit between the gutters. The corner grows in steps above it.
 */
@media (min-width: 1032px) {
    .frame {
        max-width: 1280px;
    }

    .hero {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .words {
        flex: none;
        width: 560px;
    }

    .corner {
        --side: 328px;
        --stem: 54px;
        --gap: 7px;
        --word-size: 25px;
        --word-inset: 10px;
        --foot-square: 14px;
        --foot-text-size: 15px;
    }
}

@media (min-width: 1120px) {
    .corner {
        --side: 390px;
        --stem: 64px;
        --gap: 8px;
        --word-size: 30px;
        --word-inset: 12px;
        --foot-square: 16px;
        --foot-text-size: 16px;
    }
}

@media (min-width: 1200px) {
    .corner {
        --side: 480px;
        --stem: 80px;
        --gap: 10px;
        --word-size: 38px;
        --word-inset: 15px;
        --foot-square: 20px;
        --foot-text-size: 17px;
    }
}

@media (min-width: 1280px) {
    .corner {
        --side: 560px;
        --stem: 94px;
        --gap: 12px;
        --word-size: 44px;
        --word-inset: 18px;
        --foot-square: 24px;
    }
}
