/* ANA SAYFA — projeler: kavis üzerinde dönen, sürüklenebilen kartlar */
.ugr-works {
    --ink: #0d0d0d;
    --brand: #ffdd00;
    --line: rgba(13, 13, 13, 0.1);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);

    /* Kart çerçevesi (görsel bu kutuya kendi oranıyla sığar), dairenin
       yarıçapı ve kartlar arası açı */
    --w: clamp(260px, 20vw, 560px);
    --h: clamp(280px, calc(100svh - 420px), 680px);
    --r: calc(var(--h) * 1.35);
    --step: 48deg;
    --cy: 46%;
    --pos: 0;

    position: relative;
    margin: 20px 12px;
    background: #fff;
    color: var(--ink);
    border-radius: 28px;
    /* hidden yerine clip: sticky sabitlemeyi bozmaz */
    overflow: clip;
    isolation: isolate;
}

/* Bölüm kaydırılırken ekrana sabitlenen iç kısım */
.ugr-works__pin {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100svh;
    overflow: hidden;
    isolation: isolate;
}

/* --- Dev arka plan yazısı --- */
.ugr-works__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    display: flex;
    justify-content: center;
    pointer-events: none;
    user-select: none;
    -webkit-mask-image: linear-gradient(#000 30%, transparent 78%);
    mask-image: linear-gradient(#000 30%, transparent 78%);
}

.ugr-works__bg span {
    display: block;
    font-size: 15.5vw;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.04em;
    white-space: nowrap;
    color: #efefef;
    transform: scaleY(1.35);
    transform-origin: top center;
    margin-top: 1vw;
}

/* --- Üst satır --- */
.ugr-works__head {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 14px 24px;
    padding: clamp(22px, 3vw, 40px) clamp(20px, 3vw, 44px) 0;
}

.ugr-works__eyebrow {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ugr-works__eyebrow span {
    width: 8px;
    height: 8px;
    background: var(--brand);
}

.ugr-works__title {
    flex: 1;
    margin: 0;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: rgba(13, 13, 13, 0.55);
}

.ugr-works__count {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
    color: rgba(13, 13, 13, 0.4);
}

.ugr-works__count b {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--ink);
}

/* --- Sahne --- */
.ugr-works__stage {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    touch-action: pan-y;
    cursor: grab;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}

.ugr-works__stage.is-dragging {
    cursor: grabbing;
}

@media (hover: hover) and (pointer: fine) {
    .ugr-works__stage {
        cursor: none;
    }
}

/* Kavis çizgileri: dairenin merkezi sahnenin altında kalır */
.ugr-works__orbit {
    position: absolute;
    left: 50%;
    top: calc(var(--cy) + var(--r));
    width: calc(var(--r) * 2);
    aspect-ratio: 1;
    border: 1px solid var(--line);
    border-radius: 50%;
    translate: -50% -50%;
    pointer-events: none;
}

.ugr-works__orbit--outer {
    width: calc(var(--r) * 2.9);
    border-color: rgba(13, 13, 13, 0.06);
}

.ugr-works__wheel {
    position: absolute;
    left: 50%;
    top: calc(var(--cy) + var(--r));
    width: 0;
    height: 0;
    rotate: calc(var(--pos) * var(--step) * -1);
}

/* --- Kart --- */
.wk-card {
    position: absolute;
    left: calc(var(--w) / -2);
    top: calc(var(--r) * -1 - var(--h) / 2);
    width: var(--w);
    height: var(--h);
    transform-origin: 50% calc(var(--r) + var(--h) / 2);
    rotate: calc(var(--i) * var(--step));
    opacity: var(--o, 1);
    text-decoration: none;
    -webkit-user-drag: none;
}

/* Karttan dairenin merkezine inen ince çizgi */
.wk-card::before {
    content: '';
    position: absolute;
    left: 50%;
    /* Görselin arkasından başlar; yatay görsellerde alttaki boşlukta kopukluk olmaz */
    top: 24px;
    width: 1px;
    height: calc(var(--r) + var(--h) / 2);
    background: linear-gradient(var(--line), rgba(13, 13, 13, 0.14) 40%, transparent);
    z-index: -1;
}

.wk-card[hidden-far] {
    visibility: hidden;
}

/* Görsel kırpılmaz: çerçeveye kendi oranıyla sığar, üst kenara yaslanır
   (firma adı her görselin hemen üstünde kalsın diye) */
.wk-card__media {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    height: 100%;
}

.wk-card img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    border-radius: 28px;
    background: #eee;
    box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.45);
    filter: grayscale(1) contrast(1.05);
    transition: filter 0.6s ease, scale 0.8s var(--ease);
    pointer-events: none;
}

.wk-card.is-active img {
    filter: none;
}

.wk-card.is-active:hover img {
    scale: 1.04;
}

.wk-card:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 4px;
}

/* Kartın hemen üstündeki firma adı (kartla birlikte döner) */
.wk-card__label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 12px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    color: var(--ink);
    pointer-events: none;
}

.wk-card__label-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(0.95rem, calc(var(--w) * 0.05), 1.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.04em;
    opacity: 0.45;
    transition: opacity 0.4s ease;
}

.wk-card__label-tag {
    flex: none;
    padding: 4px 10px;
    border-radius: 999px;
    background: #efefef;
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background-color 0.4s ease;
}

.wk-card.is-active .wk-card__label-name {
    opacity: 1;
}

.wk-card.is-active .wk-card__label-tag {
    background: var(--brand);
}

/* Görseli olmayan firmalar için marka kartı */
.wk-card__mark {
    display: grid;
    place-content: center;
    gap: 10px;
    width: min(100%, var(--h));
    aspect-ratio: 1;
    border-radius: 28px;
    overflow: hidden;
    padding: 16px;
    box-sizing: border-box;
    text-align: center;
    background:
        radial-gradient(circle at 1px 1px, rgba(13, 13, 13, 0.14) 1px, transparent 0) 0 0 / 16px 16px,
        #e9e9e9;
    transition: background-color 0.6s ease;
}

.wk-card.is-active .wk-card__mark {
    background-color: var(--brand);
}

.wk-card__initials {
    font-size: calc(min(var(--w), var(--h)) * 0.3);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.06em;
    color: var(--ink);
}

.wk-card__name {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    color: rgba(13, 13, 13, 0.55);
}

/* --- Kadran --- */
.ugr-works__dial {
    position: absolute;
    left: 50%;
    bottom: clamp(16px, 4svh, 44px);
    width: 170px;
    height: 85px;
    translate: -50% 0;
    overflow: hidden;
    pointer-events: none;
}

.ugr-works__ticks {
    position: absolute;
    left: 50%;
    top: 100%;
    width: 0;
    height: 0;
    rotate: calc(var(--pos) * -30deg);
}

.ugr-works__ticks i {
    position: absolute;
    left: -1px;
    top: -72px;
    width: 2px;
    height: 16px;
    background: var(--ink);
    transform-origin: 50% 72px;
    rotate: calc(var(--i) * 30deg);
    transition: background-color 0.3s ease, height 0.3s ease, width 0.3s ease;
}

.ugr-works__ticks i.is-active {
    left: -2.5px;
    width: 5px;
    height: 30px;
    top: -80px;
    transform-origin: 50% 80px;
    background: var(--brand);
}

.ugr-works__dot {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 12px;
    height: 12px;
    translate: -50% 0;
    border-radius: 2px;
    background: var(--brand);
}

/* --- Fareyi izleyen "Sürükle" etiketi --- */
.ugr-works__cursor {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 4px;
    background: var(--brand);
    color: var(--ink);
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0;
    scale: 0.6;
    transition: opacity 0.25s ease, scale 0.35s var(--ease);
    will-change: transform;
}

.ugr-works__cursor svg {
    width: 16px;
    height: 16px;
}

.ugr-works__stage.has-cursor .ugr-works__cursor {
    opacity: 1;
    scale: 1;
}

.ugr-works__stage.is-dragging .ugr-works__cursor {
    scale: 0.85;
}

@media not ((hover: hover) and (pointer: fine)) {
    .ugr-works__cursor {
        display: none;
    }
}

/* --- Alt satır --- */
.ugr-works__info {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px 24px;
    padding: 8px clamp(20px, 3vw, 44px) clamp(24px, 3vw, 40px);
}

.ugr-works__meta {
    min-width: 0;
}

.ugr-works__tags {
    margin: 0 0 6px;
    min-height: 1em;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(13, 13, 13, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ugr-works__name {
    margin: 0;
    font-size: clamp(1.3rem, 2.2vw, 2.1rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.ugr-works__name a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.ugr-works__arrow {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--brand);
    color: var(--ink);
    transition: rotate 0.45s var(--ease);
}

.ugr-works__arrow svg {
    width: 15px;
    height: 15px;
}

.ugr-works__name a:hover .ugr-works__arrow,
.ugr-works__all:hover .ugr-works__arrow {
    rotate: 45deg;
}

.ugr-works__nav {
    display: flex;
    gap: 10px;
}

.ugr-works__btn {
    display: grid;
    place-items: center;
    width: 86px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f4f4f4;
    color: var(--ink);
    cursor: pointer;
    transition: background-color 0.25s ease, opacity 0.25s ease;
}

.ugr-works__btn svg {
    width: 20px;
    height: 20px;
}

.ugr-works__btn:hover:not(:disabled) {
    background: var(--brand);
}

.ugr-works__btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.ugr-works__btn:focus-visible,
.ugr-works__all:focus-visible,
.ugr-works__name a:focus-visible {
    outline: 3px solid var(--brand);
    outline-offset: 3px;
}

.ugr-works__all {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--ink);
    text-decoration: none;
}

.ugr-works__all b {
    font-weight: 900;
    color: rgba(13, 13, 13, 0.4);
}

/* --- Tablet / telefon --- */
@media (max-width: 900px) {
    .ugr-works {
        --w: min(76vw, 420px);
        --h: clamp(240px, calc(100svh - 670px), 560px);
        --r: calc(var(--h) * 1.4);
        --step: 50deg;
        --cy: 50%;
    }

    .ugr-works__bg span {
        font-size: 17vw;
        opacity: 0.4;
    }


    .ugr-works__info {
        grid-template-columns: 1fr auto;
    }

    .ugr-works__all {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 620px) {
    .ugr-works__head {
        flex-wrap: wrap;
    }

    .ugr-works__title {
        flex: 1 0 100%;
        order: 3;
    }

    .ugr-works__info {
        grid-template-columns: 1fr;
    }

    .ugr-works__btn {
        width: 64px;
        height: 44px;
    }

    .ugr-works__dial {
        scale: 0.8;
        transform-origin: bottom center;
    }
}

/* Sabitleme kapalıyken (hareket azaltma) bölüm normal akışta durur */
.ugr-works.is-static .ugr-works__pin {
    position: relative;
    height: auto;
}

.ugr-works.is-static .ugr-works__stage {
    flex: none;
    height: clamp(520px, 80svh, 860px);
}

@media (prefers-reduced-motion: reduce) {
    .wk-card img,
    .wk-card__media,
    .ugr-works__arrow,
    .ugr-works__cursor {
        transition: none !important;
    }
}
