@font-face {
    font-family: "EB Garamond";
    src: url("../fonts/eb-garamond.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --paper: #f7f4eb;
    --support-paper: #eeeadf;
    --ink: #302e27;
    --olive: #485139;
    --red: #aa3028;
    --line: #d9d4c6;
    --serif: "EB Garamond", Georgia, serif;
    --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 28px;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 20px / 1.4 var(--serif);
}

body.dialog-open {
    overflow: hidden;
}

[hidden] {
    display: none !important;
}

h1,
h2 {
    margin: 0 0 25px;
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.12;
}

h2 {
    color: var(--olive);
    font-size: 42px;
}

p {
    margin: 0 0 20px;
}

a {
    color: inherit;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}

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

button {
    color: inherit;
    font: inherit;
    cursor: pointer;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 5px;
}

.container {
    width: min(1160px, calc(100% - 96px));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 5;
    padding: 12px;
    background: var(--paper);
}

.skip-link:focus {
    top: 12px;
}

/* Fotografie s mottem společně vyplní první obrazovku. */
.intro {
    display: grid;
    grid-template-rows: minmax(min-content, 1fr) auto;
    min-height: 100vh;
    min-height: 100svh;
}

/* Úvodní fotografie a logo */
.hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 0;
    color: #fffdf5;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 55%;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgb(255 255 255 / 79%) 0%,
        rgb(255 255 255 / 70%) 30%,
        rgb(255 255 255 / 37%) 47%,
        rgb(255 255 255 / 0%) 65%
    );
    pointer-events: none;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 1;
    padding-block: 28px 48px;
}

.hero-logo {
    position: relative;
    isolation: isolate;
    display: inline-block;
    margin: 0;
    padding: 0;
    line-height: 0;
}

.hero-logo::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -25% -30%;
    background: radial-gradient(ellipse, rgb(49 48 36 / 5%), transparent 70%);
    pointer-events: none;
}

.hero-logo img {
    display: block;
    width: 270px;
    max-width: 100%;
    height: auto;
}

/* Aktuální projekt v pravé části úvodní fotografie. */
.current-project {
    display: grid;
    grid-template-columns: 1fr 48%;
    gap: 24px;
    width: 520px;
    max-width: 55%;
    padding: 14px 14px 14px 28px;
    background: var(--paper);
    color: var(--ink);
}

.project-content {
    align-self: center;
    padding-block: 10px;
}

.project-label {
    margin-bottom: 10px;
    color: #69695d;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.current-project h2 {
    margin-bottom: 16px;
    font-size: 36px;
}

.current-project h2::after {
    content: "";
    display: block;
    width: 34px;
    height: 2px;
    margin-top: 16px;
    background: var(--red);
}

.project-content > p:not(.project-label) {
    margin-bottom: 12px;
    font-size: 20px;
    line-height: 1.22;
}

.current-project a {
    color: var(--red);
    text-decoration: none;
    font-size: 21px;
}

.current-project a:hover {
    text-decoration: underline;
}

.current-project > img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    align-self: center;
    object-fit: cover;
    object-position: center;
}

.motto {
    padding-block: 28px 32px;
    text-align: center;
}

.motto h2 {
    margin-bottom: 20px;
    font-size: 72px;
}

.motto p {
    margin: 0;
    font: 23px / 1.5 var(--serif);
}

/* Odkazy a kontakt */
.information-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    padding-block: 53px 58px;
    font-size: 24px;
    line-height: 1.5;
    border-top: 1px solid var(--line);
}

.contact-section {
    padding-left: 65px;
    border-left: 1px solid var(--line);
}

.links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.links li {
    border-bottom: 1px solid var(--line);
}

.links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-block: 20px;
    font: 28px / 1.4 var(--serif);
    text-decoration: none;
}

.links a span {
    color: var(--olive);
    font-size: 19px;
}

address {
    margin-bottom: 20px;
    font-style: normal;
}

.contact-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 11px;
}

.contact-links a {
    color: var(--olive);
    overflow-wrap: anywhere;
}

/* Podpora a platby */
.support {
    padding-block: 45px 50px;
    background: var(--support-paper);
}

.support-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 75px;
    align-items: start;
}

.support-text p:last-child {
    margin-bottom: 0;
}

.payment-details {
    min-width: 0;
    padding-top: 6px;
}

.bank-details {
    margin: 0;
}

.bank-details > div + div {
    margin-top: 22px;
}

.bank-details dt {
    margin-bottom: 6px;
    color: var(--olive);
    font-size: 16px;
}

.bank-details dd {
    margin: 0;
}

.account-number {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--red);
    font: 27px / 1.3 Georgia, serif;
}

.iban {
    font: 18px / 1.4 Georgia, serif;
    overflow-wrap: anywhere;
}

.copy-account {
    display: flex;
    padding: 8px;
    border: 0;
    background: transparent;
    color: var(--olive);
}

.copy-account:hover {
    color: var(--red);
}

.copy-status {
    min-height: 22px;
    margin: 8px 0 36px;
    color: var(--olive);
    font-size: 16px;
}

.qr-codes {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 25px;
}

.qr-code {
    margin: 0;
    text-align: center;
}

.qr-option {
    display: inline-block;
    width: 92%;
    max-width: 106px;
}

.qr-option img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
}

.qr-code figcaption {
    margin-top: 10px;
    color: var(--red);
    font: 21px / 1.3 var(--serif);
    white-space: nowrap;
}

/* Zvětšený QR kód */
.qr-dialog {
    position: fixed;
    width: min(470px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 40px 32px 30px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    text-align: center;
    overflow-y: auto;
}

.qr-dialog::backdrop {
    background: rgb(24 27 20 / 70%);
}

.qr-close {
    position: absolute;
    top: 5px;
    right: 8px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--red);
    font-size: 30px;
    line-height: 1;
}

.qr-dialog h2 {
    margin-bottom: 25px;
    color: var(--red);
    font-size: 34px;
}

.qr-large {
    display: block;
    width: min(320px, 100%);
    height: auto;
    margin: 0 auto 20px;
}

.qr-dialog p {
    font-size: 15px;
    line-height: 1.6;
}

.qr-download {
    display: inline-block;
    padding: 9px 16px;
    background: var(--olive);
    color: white;
    font-size: 15px;
    text-decoration: none;
}

.qr-download:hover {
    background: #35412a;
    color: white;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-block: 20px;
    color: #777568;
    font-size: 14px;
}

.site-footer a {
    text-decoration: none;
}

/* Menší obrazovky */
@media (max-width: 1000px) {
    .container {
        width: calc(100% - 64px);
    }

    .information-grid,
    .support-grid {
        gap: 40px;
    }

    .contact-section {
        padding-left: 35px;
    }

    .support-grid {
        grid-template-columns: 1fr 1fr;
    }

    .qr-codes {
        gap: 15px;
    }
}

@media (max-width: 760px) {
    body {
        font-size: 19px;
    }

    .container {
        width: calc(100% - 40px);
    }

    .intro {
        grid-template-rows: minmax(min-content, 1fr) auto;
    }

    .hero::after {
        background: linear-gradient(to right, rgb(255 255 255 / 78%), rgb(255 255 255 / 58%) 45%, transparent 90%);
    }

    .hero-image {
        object-position: 60% center;
    }


    .hero-logo {
        padding: 0;
    }

    .hero-logo img {
        width: 202px;
    }

    .motto {
        padding-block: 20px 24px;
    }

    .motto h2 {
        font-size: 52px;
    }

    .motto p {
        font-size: 21px;
    }

    .information-grid,
    .support-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .information-grid {
        padding-block: 41px 51px;
        font-size: 21px;
    }

    .contact-section {
        padding: 32px 0 0;
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    h2 {
        font-size: 37px;
    }

    .support {
        padding-block: 40px;
    }

    .payment-details {
        padding: 30px 0 0;
        border-top: 1px solid var(--line);
    }

    .qr-code figcaption {
        font-size: 19px;
    }

    .qr-dialog {
        padding-inline: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* Barevné akcenty a nenápadný přechod fotografie. */
h2 em {
    color: var(--red);
    font-style: normal;
}

.motto h2::after,
.information-grid h2::after,
.support h2::after {
    content: "";
    display: block;
    width: 36px;
    height: 2px;
    margin-top: 18px;
    background: var(--red);
}

.motto h2::after {
    margin: 16px auto 18px;
}

.hero-edge {
    position: absolute;
    z-index: 1;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 36px;
    fill: var(--paper);
}

.bank-details dt {
    font-size: 16px;
}

.account-number {
    font-size: 26px;
}

@media (max-width: 760px) {
    .hero {
        align-items: center;
    }

    .hero-content {
        padding-block: 25px 40px;
    }

    .hero-edge {
        height: 20px;
    }
}

/* Krátké objevení při načtení bez posunu rozvržení. */
@media (prefers-reduced-motion: no-preference) {
    .hero-image {
        animation: reveal-photo 900ms ease-out both;
    }

    .hero-logo,
    .current-project {
        animation: reveal-content 850ms ease-out 150ms both;
    }

    .motto h2,
    .motto p {
        animation: reveal-content 750ms ease-out 220ms both;
    }

    .motto p {
        animation-delay: 320ms;
    }
}

@keyframes reveal-photo {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes reveal-content {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Rezerva kolem fotografie zabraňuje odkrytí okrajů při pohybu. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .hero-image {
        inset: -18px;
        width: calc(100% + 36px);
        height: calc(100% + 36px);
        transform: translate(var(--parallax-x, 0px), var(--parallax-y, 0px));
        transition: transform 650ms cubic-bezier(0.2, 0.7, 0.3, 1);
    }
}

@media (max-width: 1000px) {
    .hero-content {
        gap: 25px;
    }

    .current-project {
        gap: 16px;
        max-width: 58%;
        padding-left: 20px;
    }
}

@media (max-width: 760px) {
    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
    }

    .current-project {
        width: 100%;
        max-width: none;
        grid-template-columns: 1fr 38%;
        gap: 14px;
        padding: 12px 12px 12px 18px;
    }

    .current-project h2 {
        font-size: 30px;
    }

    .project-content > p:not(.project-label),
    .current-project a {
        font-size: 18px;
    }


}

@media (min-width: 1260px) {
    .hero-content {
        width: auto;
        flex: 1;
        margin-inline: 48px;
    }

    .hero-logo {
        margin-left: clamp(60px, calc(23vw - 313px), 300px);
    }
}

@media (min-width: 761px) {
    .hero-logo {
        top: -25px;
    }

    .current-project {
        position: relative;
        top: 25px;
        margin-right: 25px;
    }
}
