/* ---------- Fonts ---------- */

@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('../font/BricolageGrotesque-VariableFont_opsz,wdth,wght.ttf') format('truetype-variations');
    font-weight: 200 800;
    font-style: normal;
    font-display: swap;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
    color: #0a0a0a;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: #0a0a0a;
    color: #ffffff;
}

/* ---------- Layout ---------- */

.page {
    position: relative;
    isolation: isolate;
    width: 100%;
    max-width: 64rem;
    min-height: 100vh;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Repeated logo watermark */

.page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: url("../.img/8qnlab-logo.png");
    background-repeat: repeat;
    background-position: center;
    background-size: 11rem 11rem;
    opacity: 0.05;
    pointer-events: none;
}

@media (min-width: 768px) {
    .page {
        padding: 3rem;
    }
}

/* ---------- Header ---------- */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.page-header__brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
}

.page-header__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background-color: #0a0a0a;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page-header__label,
.page-header__back {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #737373;
    text-decoration: none;
}

.page-header__back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border: 1px solid #e5e5e5;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: box-shadow 200ms ease, transform 200ms ease, color 200ms ease;
}

.page-header__back:hover {
    color: #0a0a0a;
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}

.page-header__back-icon {
    width: 0;
    height: 0;
    border-top: 0.3rem solid transparent;
    border-bottom: 0.3rem solid transparent;
    border-right: 0.4rem solid currentColor;
}

/* ---------- Main ---------- */

.page-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.page-eyebrow {
    margin: 0;
    padding: 0.25rem 0.75rem;
    background-color: #f5f5f5;
    border: 1px solid #e5e5e5;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #525252;
}

.page-title {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
    text-transform: uppercase;
    color: #0a0a0a;
}

.page-title__accent {
    color: #a3a3a3;
}

@media (min-width: 640px) {
    .page-title {
        font-size: 3.5rem;
    }
}

@media (min-width: 1024px) {
    .page-title {
        font-size: 4.5rem;
    }
}

.page-lead {
    margin: 0;
    max-width: 34rem;
    font-size: 1.125rem;
    line-height: 1.6;
    color: #525252;
}

/* ---------- Cards ---------- */

.card {
    width: 100%;
    padding: 1.75rem;
    background-color: rgba(255, 255, 255, 0.75);
    border: 1px solid #e5e5e5;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 12px 32px -16px rgba(0, 0, 0, 0.25);
    scroll-margin-top: 1.5rem;
    transition: box-shadow 250ms ease, transform 250ms ease;
}

.card:hover {
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.05),
        0 24px 48px -20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.card__title {
    margin: 0 0 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #a3a3a3;
}

.card__text {
    margin: 0;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: #262626;
}

/* ---------- Footer ---------- */

.page-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #f5f5f5;
    font-size: 0.75rem;
    color: #a3a3a3;
}

.page-footer p {
    margin: 0;
}

/* ---------- Actions ---------- */

.card__actions {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.125rem;
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: #0a0a0a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: box-shadow 200ms ease, transform 200ms ease, background-color 200ms ease;
}

.btn:hover {
    box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.btn--primary {
    background-color: #0a0a0a;
    border-color: #0a0a0a;
    color: #ffffff;
}

/* ---------- Link card ---------- */

.card__link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background-color: rgba(250, 250, 250, 0.8);
    border: 1px solid #e5e5e5;
    text-decoration: none;
    transition: background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.card__link:hover {
    background-color: #ffffff;
    border-color: #d4d4d4;
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.card__link-label {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9375rem;
    color: #0a0a0a;
    overflow-wrap: anywhere;
}

.card__link-icon {
    flex-shrink: 0;
    width: 0.75rem;
    height: 0.75rem;
    border-top: 2px solid #737373;
    border-right: 2px solid #737373;
    transform: rotate(45deg);
}

/* ---------- Card sections ---------- */

.card__subtitle {
    margin: 0 0 0.5rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #a3a3a3;
}

.card__section {
    scroll-margin-top: 1.5rem;
}

.card__rule {
    margin: 1.5rem 0;
    border: none;
    border-top: 1px solid #f0f0f0;
}

.btn--text {
    text-transform: none;
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
}
