/* marosjanota.cz — 2026 */

@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/montserrat-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Montserrat";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/montserrat-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Tokens */

:root {
    --brand: #1b263b;
    --bg: #f7f6f3;
    --surface: #ffffff;
    --text: #141c29;
    --muted: #4a5263;
    --accent: #c22a42;
    --line: #e2e0da;
    --refs-bg: #1b263b;
    --refs-text: #ffffff;
    --btn-bg: #1b263b;
    --btn-text: #ffffff;
    --mark-bg: #ffe08a;
    --mark-text: #141c29;
    --focus: #c22a42;
    --shadow: 0 1px 2px rgb(20 28 41 / 6%), 0 8px 24px rgb(20 28 41 / 6%);

    --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --radius: 14px;
    --gutter: clamp(16px, 4vw, 40px);
    --section-y: clamp(56px, 9vw, 112px);
    --topbar-h: 64px;

    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1520;
        --surface: #182131;
        --text: #eef1f6;
        --muted: #a9b3c3;
        --accent: #f26d82;
        --line: #263246;
        --refs-bg: #182131;
        --btn-bg: #eef1f6;
        --btn-text: #0f1520;
        --focus: #f26d82;
        --shadow: none;
    }
}

/* Base */

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--topbar-h) + 8px);
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

p {
    margin: 0;
    text-wrap: pretty;
}

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

a {
    color: inherit;
}

mark {
    padding: 0 0.2em;
    border-radius: 3px;
    background: var(--mark-bg);
    color: var(--mark-text);
}

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

main:focus {
    outline: none;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--btn-bg);
    color: var(--btn-text);
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-200%);
}

.skip-link:focus {
    transform: none;
}

/* Top bar */

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    border-bottom: 1px solid transparent;
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
}

.topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--topbar-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    text-decoration: none;
}

.brand__mark {
    width: 14px;
    height: 28px;
    fill: currentColor;
}

.lang {
    display: flex;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.no-js .lang {
    display: none;
}

.lang__btn {
    min-width: 44px;
    min-height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
}

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

.lang__btn[aria-pressed="true"] {
    background: var(--btn-bg);
    color: var(--btn-text);
}

/* Hero */

.hero {
    padding-block: clamp(32px, 7vw, 96px) var(--section-y);
}

.hero__inner {
    display: grid;
    gap: 32px;
    align-items: center;
}

.hero__photo {
    order: -1;
    width: clamp(140px, 40vw, 240px);
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: var(--shadow);
}

.hero__title {
    font-size: clamp(2.5rem, 1.6rem + 4.6vw, 4.75rem);
    font-weight: 800;
    letter-spacing: -0.035em;
}

.hero__lead {
    margin-top: 12px;
    font-size: clamp(1.25rem, 1rem + 1.3vw, 1.875rem);
    font-weight: 600;
    line-height: 1.3;
    color: var(--accent);
}

.hero__facts {
    max-width: 38em;
    margin-top: 20px;
    color: var(--muted);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

@media (min-width: 800px) {
    .hero__inner {
        grid-template-columns: 1fr auto;
        gap: 64px;
    }

    .hero__photo {
        order: 0;
        width: 360px;
    }
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border: 2px solid var(--btn-bg);
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
}

.btn--primary {
    background: var(--btn-bg);
    color: var(--btn-text);
}

.btn--primary:hover {
    background: transparent;
    color: var(--text);
}

.btn--ghost {
    background: transparent;
    color: var(--text);
}

.btn--ghost:hover {
    background: var(--btn-bg);
    color: var(--btn-text);
}

/* Sections */

.section {
    padding-block: var(--section-y);
}

.section--alt {
    background: var(--surface);
    border-block: 1px solid var(--line);
}

.section__title {
    margin-bottom: clamp(24px, 4vw, 40px);
    font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
    font-weight: 800;
}

/* Cards */

.cards {
    display: grid;
    gap: 16px;
}

@media (min-width: 700px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: clamp(24px, 4vw, 36px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: border-color 0.15s, transform 0.15s;
}

.card:hover {
    border-color: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
    .card:hover {
        transform: translateY(-2px);
    }
}

.card__title {
    font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
    font-weight: 700;
}

.card p {
    color: var(--muted);
}

.card__link {
    margin-top: auto;
    padding-top: 8px;
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

/* The whole card is clickable through the single link inside it */
.card__link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
}

.card__link:focus-visible {
    outline: none;
}

.card__link:focus-visible::after {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.card__arrow {
    display: inline-block;
    transition: transform 0.15s;
}

@media (prefers-reduced-motion: no-preference) {
    .card:hover .card__arrow {
        transform: translateX(3px);
    }
}

/* About */

.about {
    display: grid;
    gap: 40px;
}

.about__personal {
    font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
    line-height: 1.6;
}

.about__ps {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.9375rem;
    font-style: italic;
}

.about__items {
    display: grid;
    gap: 32px;
}

.about__item {
    padding-left: 20px;
    border-left: 3px solid var(--accent);
}

.about__item h3 {
    margin-bottom: 8px;
    font-size: 1.25rem;
    font-weight: 700;
}

.about__item p {
    color: var(--muted);
}

.about__item strong {
    color: var(--text);
}

@media (min-width: 900px) {
    .about {
        grid-template-columns: 5fr 7fr;
        gap: 64px;
    }

    .about__intro {
        position: sticky;
        top: calc(var(--topbar-h) + 24px);
        align-self: start;
    }
}

/* References */

.refs {
    background: var(--refs-bg);
    color: var(--refs-text);
}

.refs__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 24px;
    align-items: center;
    justify-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 600px) {
    .refs__list {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 24px 40px;
    }
}

.refs__list a {
    display: block;
    padding: 8px;
    border-radius: 6px;
}

.refs__list img {
    width: auto;
    max-width: 100%;
    height: 32px;
    /* Normalize all logos to plain white on the dark band */
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: opacity 0.15s;
}

.refs__list img[alt="OaksLab"] {
    height: 15px;
}

.refs__list img[alt="Kontent.ai"] {
    height: 44px;
}

.refs__list .refs__named {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: inherit;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.15s;
}

.refs__named img,
.refs__named:hover img,
.refs__named:focus-visible img {
    opacity: 1;
}

.refs__list .refs__named:hover,
.refs__list .refs__named:focus-visible {
    opacity: 1;
}

.refs__list a:hover img,
.refs__list a:focus-visible img {
    opacity: 1;
}

.refs :focus-visible {
    outline-color: #ffffff;
}

/* Contact */

.contact__lead {
    max-width: 22em;
    font-size: clamp(1.375rem, 1rem + 1.6vw, 2.25rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.contact__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 32px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
    font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
    font-weight: 700;
}

.contact__list a {
    overflow-wrap: anywhere;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

.contact__list a:hover {
    color: var(--accent);
}

.contact__billing {
    margin-top: 32px;
    color: var(--muted);
    font-size: 0.9375rem;
    font-style: normal;
}

/* Footer */

.footer {
    padding-block: 24px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.875rem;
}
