/* repnak.com – hand-written stylesheet, no framework */

@font-face {
    font-family: "Nunito Sans";
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url("/fonts/NunitoSans/NunitoSans-Light.woff2") format("woff2");
}

@font-face {
    font-family: "Nunito Sans";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/fonts/NunitoSans/NunitoSans-Regular.woff2") format("woff2");
}

@font-face {
    font-family: "Nunito Sans";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("/fonts/NunitoSans/NunitoSans-Bold.woff2") format("woff2");
}

@font-face {
    font-family: "Nunito Sans";
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url("/fonts/NunitoSans/NunitoSans-Black.woff2") format("woff2");
}

:root {
    color-scheme: light dark;

    --olive: #b9b9a5;
    --olive-dark: #66665a;
    --glow: rgba(185, 185, 165, 0.32);
    --bg: #fbfbf9;
    --surface: #ffffff;
    --text: #33332e;
    --text-soft: #737368;
    --border: #e5e5dc;
    --shadow: 0 1px 2px rgba(51, 51, 46, 0.05);
    --shadow-lift: 0 18px 40px -12px rgba(51, 51, 46, 0.18);

    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
    :root {
        --olive: #b9b9a5;
        --olive-dark: #cfcfba;
        --glow: rgba(185, 185, 165, 0.12);
        --bg: #1d1d1a;
        --surface: #262622;
        --text: #ecece4;
        --text-soft: #a3a394;
        --border: #3a3a33;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-lift: 0 18px 40px -12px rgba(0, 0, 0, 0.6);
    }
}

* {
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    border-top: 6px solid var(--olive);
    background:
        radial-gradient(60rem 28rem at 50% -10rem, var(--glow), transparent 70%),
        var(--bg);
    color: var(--text);
    font-family: "Nunito Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: var(--olive);
    color: #33332e;
}

:focus-visible {
    outline: 2px solid var(--olive-dark);
    outline-offset: 3px;
    border-radius: 4px;
}

main {
    flex: 1;
    width: 100%;
    max-width: 44rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

a {
    color: var(--olive-dark);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

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

/* Entrance motion */

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.site-header,
.card,
.prose,
.error-page,
.site-footer {
    animation: rise 0.7s var(--ease) backwards;
}

.card:nth-child(1) {
    animation-delay: 0.15s;
}

.card:nth-child(2) {
    animation-delay: 0.25s;
}

.prose,
.error-page {
    animation-delay: 0.15s;
}

.site-footer {
    animation-delay: 0.35s;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Header */

.site-header {
    text-align: center;
    padding: 4.5rem 1.25rem 0;
}

.wordmark {
    margin: 0;
    font-size: clamp(2.25rem, 7vw, 3.25rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.wordmark a {
    display: inline-block;
    color: var(--text);
    text-decoration: none;
}

.wordmark strong {
    font-weight: 900;
}

.wordmark .tld {
    color: var(--olive-dark);
    transition: color 0.2s ease;
}

.wordmark a:hover .tld {
    color: var(--text);
}

.site-nav {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 1.5rem;
}

.site-nav a {
    position: relative;
    padding: 0.5rem 0.1rem;
    color: var(--text-soft);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.2rem;
    height: 2px;
    border-radius: 999px;
    background: var(--olive);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s var(--ease), background-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
    color: var(--text);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.site-nav a[aria-current="page"]::after {
    transform: scaleX(1);
}

.site-nav a[aria-current="page"]::after {
    background: var(--olive-dark);
}

/* Link cards on the start page */

main.center {
    display: flex;
    align-items: center;
}

.cards {
    flex: 1;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    margin: 4rem 0;
}

.card {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.1rem;
    padding: 1.5rem 1.5rem 1.5rem 1.35rem;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s ease;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--olive), var(--olive-dark));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}

.card:hover,
.card:focus-visible {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
    border-color: var(--olive);
    color: var(--text);
}

.card:hover::before,
.card:focus-visible::before {
    transform: scaleX(1);
}

.card .icon {
    display: block;
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    box-shadow: 0 0 0 1px var(--border), var(--shadow);
    transition: transform 0.25s var(--ease);
}

.card:hover .icon,
.card:focus-visible .icon {
    transform: scale(1.06);
}

.card .name {
    display: block;
    font-size: 1.1875rem;
    font-weight: 700;
    line-height: 1.3;
}

.card .domain {
    display: block;
    margin-top: 0.15rem;
    color: var(--text-soft);
    font-size: 0.9375rem;
    transition: color 0.25s ease;
}

.card:hover .domain {
    color: var(--olive-dark);
}

.card .arrow {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--border);
    transition: transform 0.25s var(--ease), color 0.25s ease;
}

.card:hover .arrow,
.card:focus-visible .arrow {
    transform: translateX(4px);
    color: var(--olive-dark);
}

/* Prose pages (imprint) */

.prose {
    margin: 3.5rem 0 4rem;
}

.prose h1 {
    margin: 0 0 2rem;
    padding-bottom: 1rem;
    font-size: 1.875rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    position: relative;
}

.prose h1::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 3rem;
    height: 3px;
    border-radius: 999px;
    background: var(--olive);
}

.prose h2 {
    margin: 1.75rem 0 0.35rem;
    color: var(--olive-dark);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.prose p {
    margin: 0.35rem 0;
    color: var(--text-soft);
}

/* 404 */

.error-page {
    margin: 4rem 0;
    text-align: center;
}

.error-page .code {
    margin: 0;
    font-size: clamp(5rem, 22vw, 9rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--olive-dark);
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
    .error-page .code {
        background: linear-gradient(180deg, var(--olive-dark), var(--text));
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

.error-page p {
    color: var(--text-soft);
}

/* Footer */

.site-footer {
    padding: 2.5rem 1.25rem 2rem;
    text-align: center;
    color: var(--text-soft);
    font-size: 0.875rem;
}

.site-footer::before {
    content: "";
    display: block;
    width: 3rem;
    height: 3px;
    margin: 0 auto 1.5rem;
    border-radius: 999px;
    background: var(--olive);
}
