:root {
    --bg: #fcfcfc;
    --fg: #555;
    --muted: #999;
    --accent: #8310b5;
    --highlight: #8410b518;
    --card-bg: #fcfcfc;
    --card-brd: rgba(0, 0, 0, .08);
    --gradient: linear-gradient(135deg, rgba(71, 71, 71, 1) 0%, rgba(91, 91, 91, 1) 100%);
}

@font-face {
    font-family: "Atkinson Hyperlegible";
    src:
        url("../fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2"),
        url("../fonts/AtkinsonHyperlegible-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Atkinson Bold";
    src:
        url("../fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2"),
        url("../fonts/AtkinsonHyperlegible-Bold.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

html,
body {
    min-height: 100%;
    height: auto;
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: "Atkinson Hyperlegible", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    display: grid;
    place-items: start start;
    overflow-x: hidden;
}

body {
    min-height: 100svh;
    width: 100%;
    box-sizing: border-box;
    display: grid;
    place-items: start start;
    overflow-x: hidden;
    color: var(--fg);
    background: transparent;
    position: relative;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
}

a {
    color: var(--accent);
}

.wrap {
    overflow: visible;
    background-color: rgba(255, 255, 255, 0.98);
    padding: clamp(24px, 4vw, 64px);
    box-sizing: border-box;
    height: 100%;
    width: 100%;
}

img.smooth-appear {
    opacity: 0;
    transform: translateY(0);
    animation: smoothMoveFade 1s ease-out forwards;
}

img.logo {
    width: 200px;
    margin-bottom: 2em;
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, .1);
    border-radius: 50vw;
    outline: 1px solid rgba(0, 0, 0, .1);
}

@keyframes smoothMoveFade {
    0% {
        opacity: 0;
        transform: translateY(-.5em);
    }

    100% {
        opacity: 1;
        transform: translateY(.5em);
    }
}

#text {
    display: block;
    max-width: 100%;
    overflow: visible;
    contain: none;
}

.line {
    display: block;
    margin: 0 0 1rem 0;
    font-size: clamp(1.25rem, 2.2vw + 0.5rem, 1.75rem);
    font-weight: 450;
    letter-spacing: 0.01em;
    animation: none;
    background: none filter: none;
    max-width: 768px;
}

.cursor {
    display: inline-block;
    width: 0.6ch;
    border-right: 2px solid var(--muted);
    animation: blink 1s steps(1) infinite;
    translate: 0 0.07em;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.highlight {
    position: relative;
    color: var(--accent);
    cursor: pointer;
    text-decoration: none;
    background-color: var(--highlight);
}

.highlight::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: color-mix(in srgb, var(--accent) 65%, transparent);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform .18s ease;
    pointer-events: none;
}

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

@media (hover: hover) and (pointer: fine) {

    .highlight:hover .highlight-card,
    .highlight:focus-visible .highlight-card {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.highlight-card {
    position: absolute;
    left: 0;
    bottom: 120%;
    min-width: 360px;
    max-width: min(420px, 92vw);
    background: var(--card-bg);
    color: var(--fg);
    outline: 1px solid var(--card-brd);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
    z-index: 1000;
    font-size: .95rem;
}

.highlight-card.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.highlight:hover .highlight-card,
.highlight:focus-visible .highlight-card {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.card-media {
    display: block;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 0 0.5rem 0;
}

.card-media img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.card-title {
    margin: 0.75rem 0 0.125rem 0;
    font-size: 1.125rem;
    line-height: 1.2;

}

.card-text {
    margin: 0 0 .25rem 0;
    color: var(--muted);
    font-size: .9125rem;
    line-height: 1.3;
}

@media (max-width:640px) {
    img.logo {
        width: 120px;
        margin-bottom: 1.5em;
    }
}

@media (max-width: 640px) {
    .highlight {
        position: static;
    }

    .highlight-card {
        position: fixed;
        top: 1.5em;
        right: 5%;
        left: 5%;
        bottom: auto;
        max-width: calc(100vw - 24px);
        width: auto;
        max-height: calc(100vh - 24px);
        min-width: 320px;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
    }
}

@media (max-width: 640px) {
    body.card-open::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .15);
        pointer-events: none;
        z-index: 999;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cursor {
        animation: none;
        border-color: transparent;
    }

    .highlight-card,
    .highlight::after {
        transition: none;
    }
}
