.kg-landing--home {
    --overview-cream: #f5f1e8;
    --overview-forest: #1b3930;
    --overview-navy: #182735;
    --overview-wine: #652b3b;
}

.kg-landing--home .kg-hero--wide {
    min-height: clamp(520px, 82svh, 850px);
    padding-block: clamp(156px, 21vh, 230px) clamp(78px, 10vh, 125px);
    background: var(--overview-forest);
}
.kg-landing--home .kg-hero__title {
    max-width: 16ch;
    font-size: clamp(46px, 5.85vw, 84px);
    line-height: 1.03;
    letter-spacing: -.043em;
    text-wrap: balance;
}
.kg-landing--home .kg-hero__intro { max-width: 44ch; margin-top: 19px; font-size: clamp(16px, 1.4vw, 20px); line-height: 1.5; }
.kg-landing--home .kg-hero--wide .kg-hero__figure::after {
    background: linear-gradient(90deg, #111b23e8, #11251be0 19%, #13261b92 46%, #13261b0f 81%),
                linear-gradient(180deg, #101b25a3, transparent 34%, #0d191752);
}
.kg-landing--home .kg-hero__actions { margin-top: 25px; gap: 15px 25px; }
.kg-landing--home .kg-hero__actions .button { color: #202821; border-color: var(--overview-cream); background: var(--overview-cream); }
.kg-landing--home .kg-hero__actions .button:hover { background: #e4ddc9; border-color: #e4ddc9; }
.kg-hero__film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 53%; pointer-events: none; }

.kg-gallery--projects { color: #203b31; background: #f0f4ee; }
.kg-gallery--projects .kg-section { padding-block: clamp(36px, 5vw, 70px); }
.kg-gallery--projects .kg-section__head { grid-template-columns: 1fr auto; align-items: center; gap: 10px 28px; }
.kg-gallery--projects .kg-section__head h2 { color: inherit; }
.kg-gallery--projects .kg-section__head p { color: #45584e; grid-column: 1; }
.kg-project-map { grid-column: 2; grid-row: 1; color: var(--overview-wine); }
.kg-gallery--projects .kg-gallery__grid { gap: clamp(14px, 1.8vw, 26px); }
.kg-gallery--projects .kg-gallery__card { width: 100%; min-width: 0; }
.kg-gallery--projects .kg-gallery__image { aspect-ratio: 3 / 2; background: #e1e8de; }
.kg-gallery--projects figcaption { margin-top: clamp(10px, 1vw, 15px); }
.kg-gallery--projects figcaption h3 { color: #203b31; font-size: clamp(19px, 1.7vw, 25px); }
.kg-gallery--projects figcaption p { margin-top: 5px; color: #45584e; font-size: 15px; line-height: 1.45; }
.kg-gallery--projects .kg-gallery__image:focus-within { outline: 2px solid var(--overview-wine); outline-offset: 2px; }
.kg-project-nav { display: none; }

.kg-landing--home #uslugi { padding-block: clamp(40px, 5vw, 72px); }
.kg-landing--home .kg-service-card { position: relative; }
.kg-landing--home .kg-service-card__image { aspect-ratio: 3 / 2; max-height: none; }
.kg-landing--home .kg-service-card h3 a::after { position: absolute; inset: 0; content: ''; }
.kg-landing--home .kg-service-card h3 a .kg-arrow, .kg-landing--home .kg-service-card h3 a:hover { color: var(--overview-wine); }
.kg-landing--home .kg-service-card:focus-within { outline: 2px solid var(--overview-wine); outline-offset: 4px; }
.kg-service-index { margin-top: clamp(32px, 4vw, 52px); }
.kg-service-index .kg-service-index__title { margin-bottom: 16px; font-size: clamp(22px, 2vw, 29px); }
.kg-service-index__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(20px, 4vw, 56px);
    margin: 0;
    padding: 0;
    list-style: none;
}
.kg-service-index__list li { min-width: 0; border-top: 1px solid #d8ddd6; }
.kg-service-index__list a {
    display: flex;
    gap: clamp(12px, 1.5vw, 20px);
    align-items: center;
    min-height: 62px;
    text-decoration: none;
    padding: 10px 4px;
    color: var(--kg-ink);
    font-size: clamp(16px, 1.4vw, 20px);
    line-height: 1.3;
}
.kg-service-index__list img { flex: none; width: 34px; height: 34px; object-fit: contain; }
.kg-service-index__list a .kg-arrow { margin-left: auto; color: var(--overview-wine); }
.kg-service-index__list a:is(:hover, :focus-visible) { color: var(--overview-wine); background: #f7f8f4; }
@media (max-width: 620px) {
    .kg-service-index__list { grid-template-columns: 1fr; }
    .kg-service-index__list a { min-height: 54px; }
    .kg-service-index__list img { width: 29px; height: 29px; }
}

.kg-materials { color: var(--overview-forest); background: #f0f4ee; }
.kg-materials__layout { display: grid; grid-template-columns: minmax(220px, .64fr) minmax(0, 1.36fr); gap: 24px clamp(28px, 4vw, 60px); padding-block: clamp(32px, 4vw, 60px); }
.kg-materials__copy p { margin-top: 13px; max-width: 36ch; color: #45584e; line-height: 1.5; }
.kg-materials__copy .kg-text-link { min-height: 44px; margin-top: 8px; color: var(--overview-wine); }
.kg-materials__categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 0 clamp(14px, 2.3vw, 32px); margin: 0; padding: 0; list-style: none; }
.kg-materials__categories li { min-width: 0; border-top: 1px solid #c7d0c5; }
.kg-materials__categories a { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 100%; min-height: 52px; padding: 9px 2px; color: inherit; font-size: 16px; line-height: 1.3; }
.kg-materials__categories a span { overflow-wrap: anywhere; }
.kg-materials__categories a small { color: #506156; font-size: 13px; white-space: nowrap; }
.kg-materials__categories a:is(:hover, :focus-visible) { color: var(--overview-wine); }
.kg-materials__categories a:is(:hover, :focus-visible) span { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 960px) {
    .kg-materials__layout { grid-template-columns: 1fr; }
    .kg-materials__copy p { max-width: 60ch; }
}
@media (max-width: 620px) {
    .kg-materials__categories { grid-template-columns: 1fr; }
    .kg-materials__categories a { min-height: 46px; }
}

.kg-landing--home #opyt-kompanii { color: var(--overview-forest); background: var(--overview-cream); }
.kg-story__spread {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    align-items: center;
    column-gap: clamp(32px, 6.8vw, 100px);
}
.kg-story__copy:only-child { grid-column: 1 / -1; max-width: 700px; }
.kg-story__still { position: relative; isolation: isolate; overflow: hidden; min-height: 290px; aspect-ratio: 1.28; background: #e6ddc9; }
.kg-story__still img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: center 5%; }
.kg-story__tenure {
    --tenure-padding: clamp(20px, 2.6vw, 38px);
    --tenure-fade: clamp(32px, 4vw, 60px);
    position: relative;
    isolation: isolate;
    width: fit-content;
    padding: var(--tenure-padding);
    max-width: min(79%, 345px);
    font-size: clamp(14px, 1.22vw, 17px);
    line-height: 1.42;
    font-weight: 500;
    overflow-wrap: anywhere;
    text-wrap: balance;
}
.kg-story__tenure::before {
    position: absolute;
    inset: 0 calc(-1 * var(--tenure-fade)) calc(-1 * var(--tenure-fade)) 0;
    z-index: -1;
    content: "";
    background: rgb(244 236 220 / 93%);
    --fade-start: calc(100% - var(--tenure-padding) - var(--tenure-fade));
    mask-image: linear-gradient(to right, #000 var(--fade-start), transparent),
                linear-gradient(to bottom, #000 var(--fade-start), transparent);
    mask-composite: intersect;
    pointer-events: none;
}
.kg-story__tenure :is(span, strong) {
    display: block;
    margin-bottom: 5px;
    font: 400 clamp(57px, 6.8vw, 97px)/1.01 Georgia, serif;
    letter-spacing: -.055em;
}
.kg-story__plate figcaption { padding-top: 6px; color: #545b50; font-size: 13px; }
.kg-story__copy > p { max-width: 45ch; margin: 16px 0 12px; color: #48564d; font-size: clamp(16px, 1.45vw, 19px); line-height: 1.55; }
.kg-story__copy .kg-text-link { min-height: 44px; color: var(--overview-wine); }
.kg-story__facts { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px clamp(22px, 3.5vw, 54px); margin: clamp(21px, 2.8vw, 40px) 0 0; padding: 20px 0 0; border-top: 1px solid #c4c9b9; }
.kg-story__facts > div { display: flex; flex-direction: column; }
.kg-story__facts dd { order: -1; margin: 0; font-size: clamp(24px, 2.5vw, 36px); font-weight: 500; line-height: 1.12; letter-spacing: -.045em; }
.kg-story__facts dd span { display: block; margin-bottom: 5px; color: #4b594e; font-size: 12px; font-weight: 400; letter-spacing: normal; }
.kg-story__facts dt { margin-top: 6px; color: #48564d; font-size: 14px; line-height: 1.4; }

@media (prefers-reduced-motion: no-preference) {
    .kg-gallery--projects .kg-gallery__image img { transition: transform .65s ease; }
}
@media (min-width: 761px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .kg-gallery--projects .kg-gallery__image:is(:hover,:focus-within) img { transform: scale(1.025); }
}
@media (max-width: 760px) {
    .kg-landing--home .kg-hero--wide { min-height: clamp(470px, 77svh, 620px); padding-block: 127px 87px; }
    .kg-landing--home .kg-hero__title { max-width: 16ch; font-size: clamp(32px, 8.6vw, 56px); }
    .kg-landing--home .kg-hero__intro { max-width: 39ch; }
    .kg-landing--home .kg-hero--wide .kg-hero__figure::after { background: linear-gradient(90deg,#102019d9,#1020197d), linear-gradient(180deg,#101b2555,transparent 45%); }
    .kg-landing--home .kg-hero__actions { gap: 11px 20px; margin-top: 20px; }
    .kg-hero__film { object-position: 63% center; }
    .kg-gallery--projects .kg-section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; }
    .kg-gallery--projects .kg-gallery__grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 12px;
        scrollbar-width: thin;
        scrollbar-color: #6d8072 transparent;
    }
    .kg-gallery--projects .kg-gallery__card { flex: 0 0 clamp(210px, 78vw, 376px); scroll-snap-align: start; }
    .kg-project-nav:not([hidden]) { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
    .kg-project-nav button { display: grid; place-items: center; padding: 0; width: 44px; height: 44px; border: 1px solid #687d6c; border-radius: 50%; color: #203b31; background: transparent; font-size: 20px; line-height: 1; }
    .kg-project-nav button:enabled:hover { background: #e1e8de; }
    .kg-project-nav button:disabled { opacity: .32; }
    .kg-landing--home .kg-service-card__image { aspect-ratio: 16 / 10; }
    .kg-story__spread { grid-template-columns: 1fr; gap: 25px; }
    .kg-story__still { min-height: 0; aspect-ratio: 1.65; }
    .kg-story__tenure { max-width: min(80%, 280px); }
    .kg-story__facts { gap: 15px 24px; }
}
