/* boi na stranata */

body {
    --paper: #FAF7F2;
    --muted: #85746c;
    --soft: #9f8e70;
    --line: rgba(43, 37, 32, .14);
    --accent: #9f8e70;
    --placeholder: #ddd6ce;
}

body.dark {
    --paper: #151014;
    --muted: #a99b96;
    --soft: #b9a784;
    --line: rgba(255, 255, 255, .11);
    --accent: #b9a784;
    --placeholder: #2a2126;
}

.container {
    width: min(1280px, calc(100% - 140px));
    margin: auto;
}


/* hero */

.about-hero {
    position: relative;
    padding-top: 190px;

    background:
            radial-gradient(
                    circle at 50% 35%,
                    rgba(159, 142, 112, .10),
                    transparent 45%
            ),
            #FAF7F2;
}

body.dark .about-hero {
    background:
            radial-gradient(
                    circle at 50% 35%,
                    rgba(159, 142, 112, .10),
                    transparent 45%
            ),
            #151014;
}

.about-text {
    position: sticky;
    top: 140px;
    width: 100%;
    padding: 0 24px;
    text-align: center;
    z-index: 1;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--soft);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.hero-kicker::before,
.hero-kicker::after {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--soft);
    opacity: .6;
}

.about-text h1 {
    max-width: 900px;
    margin: 26px auto 0;
    font-family: "Playfair Display", serif;
    font-size: clamp(44px, 6vw, 88px);
    font-weight: 400;
    line-height: .98;
    letter-spacing: -2.5px;
}

.about-text h1 em {
    color: #9f8e70;
    font-style: italic;
}

.img-cube-wrap {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding: 2rem 0 10rem;
    perspective: 1000px;
}

.img-cube {
    --cube-w: 250px;
    --cube-h: 420px;

    position: relative;
    width: var(--cube-w);
    height: var(--cube-h);
    transform-style: preserve-3d;
    animation: imgCubeSpin 16s linear infinite;
}

.img-cube-face {
    position: absolute;
    top: 0;
    left: 0;
    width: var(--cube-w);
    height: var(--cube-h);
    border-radius: 25px;
    overflow: hidden;
    background: var(--placeholder);
    box-shadow: 0 25px 45px rgba(40, 30, 20, .2);
}

.img-cube-face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-cube-face::after {
    content: "";
    position: absolute;
    inset: 60% 0 0;
    background: linear-gradient(transparent, rgba(43, 35, 30, .65));
}

.face-caption {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 18px;
    z-index: 2;
    color: #fff;
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-size: 20px;
    line-height: 1.2;
}

.img-cube-face--front {
    transform: rotateY(0deg) translateZ(calc(var(--cube-w) / 2));
}

.img-cube-face--right {
    transform: rotateY(90deg) translateZ(calc(var(--cube-w) / 2));
}

.img-cube-face--back {
    transform: rotateY(180deg) translateZ(calc(var(--cube-w) / 2));
}

.img-cube-face--left {
    transform: rotateY(-90deg) translateZ(calc(var(--cube-w) / 2));
}

@keyframes imgCubeSpin {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}


/* zaednichki sekcii */

.how,
.workshops-section,
.team-section {
    padding: 130px 0 140px;
}

/* light mode */

.how {
    background: #EBE5DE;
    transition: background .8s ease;
}

.workshops-section {
    background: #FAF7F2;
    transition: background .8s ease;
}

.team-section {
    background: #EBE5DE;
    transition: background .8s ease;
}

/* dark mode */

body.dark .how,
body.dark .workshops-section,
body.dark .team-section {
    background: #151014;
}


/* naslovi na sekciite */

.section-label {
    padding-bottom: 18px;
    margin-bottom: 70px;
    border-bottom: 1px solid var(--line);
    color: var(--soft);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.section-head {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 90px;
    align-items: end;
    margin-bottom: 80px;
}

.section-head h2 {
    font-family: "Playfair Display", serif;
    font-size: clamp(44px, 5.2vw, 76px);
    font-weight: 400;
    line-height: .98;
    letter-spacing: -2.5px;
}

.section-head h2 em {
    color: var(--accent);
    font-style: italic;
}

.section-head p {
    max-width: 400px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}


/* kako rabotime */

.how .section-label,
.team-section .section-label {
    text-align: center;
}

.how .section-head,
.team-section .section-head {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 18px;
    text-align: center;
}

.how .section-head p {
    max-width: 460px;
}

.path {
    position: relative;
    max-width: 1000px;
    margin: 20px auto 0;
}

.path-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    z-index: 0;
}

.path-track {
    fill: none;
    stroke: var(--line);
    stroke-width: 2;
    stroke-dasharray: 3 10;
    stroke-linecap: round;
}

.path-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2.5;
    stroke-linecap: round;
}

.path-dot {
    fill: var(--accent);
    filter: drop-shadow(0 0 8px var(--accent));
}

.path-dot-halo {
    fill: var(--accent);
    transform-box: fill-box;
    transform-origin: center;
    animation: dotPulse 1.8s ease-out infinite;
}

@keyframes dotPulse {
    0% {
        transform: scale(.6);
        opacity: .45;
    }

    100% {
        transform: scale(2.6);
        opacity: 0;
    }
}

.path-step {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: 360px;
}

.path-step:nth-of-type(even) .path-circle {
    order: 2;
}


/* krugot za kako rabotime */

.path-circle {
    position: relative;
    justify-self: center;
    width: clamp(200px, 24vw, 250px);
    aspect-ratio: 1;
    border-radius: 50%;
    opacity: 0;
    transform: scale(.55);

    transition:
            opacity .9s ease,
            transform 1s cubic-bezier(.2, .9, .3, 1.25);
}

.path-step.in .path-circle {
    opacity: 1;
    transform: none;
}

.path-circle::before {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 1px dashed var(--accent);
    opacity: .55;
    animation: ringSpin 26s linear infinite;
}

@keyframes ringSpin {
    to { transform: rotate(360deg); }
}

.path-circle::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--accent);
    opacity: 0;
    transform: scale(.9);

    transition:
            opacity .6s ease,
            transform .8s cubic-bezier(.2, .9, .3, 1.25);
}

.path-step.active .path-circle::after {
    opacity: 1;
    transform: none;
}

.path-photo {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--placeholder);
    box-shadow: 0 25px 45px rgba(40, 30, 20, .18);
}

.path-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}

.path-step:hover .path-photo img {
    transform: scale(1.08);
}

.path-num {
    position: absolute;
    right: 2%;
    bottom: 8%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--accent);
    background: var(--paper);
    color: var(--accent);
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-size: 20px;

    transition:
            background .5s ease,
            color .5s ease,
            transform .5s ease;
}

.path-step.active .path-num {
    background: var(--accent);
    color: var(--paper);
    transform: scale(1.1);
}


/* tekst kraj patekata */

.path-text {
    padding: 0 40px;
    opacity: 0;
    transform: translateX(40px);

    transition:
            opacity .9s ease .25s,
            transform .9s cubic-bezier(.2, .7, .2, 1) .25s;
}

.path-step:nth-of-type(even) .path-text {
    justify-self: end;
    text-align: right;
    transform: translateX(-40px);
}

.path-step.in .path-text,
.path-step.in:nth-of-type(even) .path-text {
    opacity: 1;
    transform: none;
}

.path-kicker {
    color: var(--accent);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.path-text h3 {
    margin-top: 10px;
    font-family: "Playfair Display", serif;
    font-size: clamp(30px, 3.2vw, 42px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -1px;
}

.path-text p {
    max-width: 320px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}

.path-step:nth-of-type(even) .path-text p {
    margin-left: auto;
}


/* rabotilnici */

.workshops-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 90px;
    align-items: start;
}

.workshops-media {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
}

.workshops-frame {
    position: relative;
    width: 100%;
    height: min(620px, 78vh);
    border-radius: 4px;
    overflow: hidden;
    background: var(--placeholder);
}

.workshop-img {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.workshop-img.active {
    opacity: 1;
}

.workshop-img video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.workshops-list {
    display: flex;
    flex-direction: column;
}

.workshop-item {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
    opacity: .25;
    transform: translateY(20px);
    transition: opacity .7s ease, transform .7s ease;
}

.workshop-item.active {
    opacity: 1;
    transform: none;
}

.workshop-item h3 {
    font-family: "Playfair Display", serif;
    font-size: clamp(34px, 3.6vw, 52px);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: -1px;
}

.workshop-item h3::after {
    content: "";
    display: block;
    width: 40px;
    height: 1px;
    margin-top: 24px;
    background: var(--accent);
}

.workshop-item p {
    max-width: 420px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}


/* timot */

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.team-float {
    animation: teamFloat 6s ease-in-out infinite;
}

.team-grid .team-float:nth-child(1) {
    animation-duration: 6.2s;
    animation-delay: 0s;
}

.team-grid .team-float:nth-child(2) {
    animation-duration: 7.1s;
    animation-delay: -2.4s;
}

.team-grid .team-float:nth-child(3) {
    animation-duration: 6.6s;
    animation-delay: -4.3s;
}

@keyframes teamFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.team-card {
    height: 500px;
    perspective: 1400px;
    cursor: pointer;
}

.team-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform .8s cubic-bezier(.22, .85, .3, 1);
}

.team-card.flipped .team-card-inner {
    transform: rotateY(180deg);
}

.team-card-front,
.team-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border: 1.5px solid var(--accent);
    border-radius: 10px;
    overflow: hidden;
    transition: box-shadow .4s ease;
}

.team-card:hover .team-card-front,
.team-card:hover .team-card-back {
    box-shadow: 0 0 0 3px rgba(159, 142, 112, .18);
}


/* predna strana na karticka */

.team-card-front {
    display: flex;
    flex-direction: column;
    padding: 12px 12px 18px;
    background: #fffdfa;
}

body.dark .team-card-front {
    background: #1d171b;
}

.team-photo {
    flex: 1;
    border-radius: 6px;
    overflow: hidden;
    background: var(--placeholder);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}

.team-card:hover .team-photo img {
    transform: scale(1.04);
}

.team-card-front-body {
    padding: 18px 6px 0;
}

.team-card-front h3 {
    font-family: "Playfair Display", serif;
    font-size: 26px;
    font-weight: 400;
    letter-spacing: -.3px;
}

.team-role {
    margin-top: 6px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.flip-hint {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-size: 14px;
}


/* zadna strana na karticka */

.team-card-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    padding: 34px 30px;
    background: #2b2520;
    color: #f5eee9;
}

.team-card-back h4 {
    margin-bottom: 14px;
    font-family: "Playfair Display", serif;
    font-size: 28px;
    font-weight: 400;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
    color: #d9cbc5;
    font-size: 13px;
}

.stat-row .stars {
    color: #c2b18d;
    letter-spacing: 2px;
    font-size: 13px;
}

.fun-fact {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    color: #c9bcb6;
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-size: 16px;
    line-height: 1.5;
}

body.dark .team-card-back {
    background: #efe6dc;
    color: #2b2520;
}

body.dark .team-card-back .stat-row {
    border-top-color: rgba(43, 37, 32, .15);
    color: #5a4d45;
}

body.dark .team-card-back .stars {
    color: #9f8e70;
}

body.dark .team-card-back .fun-fact {
    border-top-color: rgba(43, 37, 32, .15);
    color: #6f625a;
}


/* pojavuvanje pri skrolanje */

.reveal {
    opacity: 0;
    transform: translateY(30px);

    transition:
            opacity .9s ease,
            transform .9s cubic-bezier(.2, .7, .2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: none;
}


/* timot na eden ekran */

@media (min-width: 901px) {

    .team-section {
        min-height: 100vh;
        padding: 90px 0 40px;
        display: flex;
        align-items: center;
    }

    .team-section .container {
        width: min(1280px, calc(100% - 140px));
    }

    .team-section .section-label {
        margin-bottom: 26px;
    }

    .team-section .section-head {
        margin-bottom: 36px;
    }

    .team-section .section-head h2 {
        font-size: clamp(34px, 4vw, 56px);
    }

    .team-section .section-head h2 br {
        display: none;
    }

    .team-grid {
        max-width: 980px;
        margin: 0 auto;
        gap: 34px;
        align-items: center;
    }

    .team-card {
        height: clamp(300px, calc(100vh - 340px), 460px);
        transition: transform .5s cubic-bezier(.2, .7, .2, 1);
    }

    .team-float:nth-child(1) .team-card {
        transform: rotate(-3deg);
    }

    .team-float:nth-child(2) .team-card {
        transform: scale(1.06);
    }

    .team-float:nth-child(3) .team-card {
        transform: rotate(3deg);
    }

    .team-float .team-card:hover {
        transform: rotate(0deg) translateY(-6px) scale(1.03);
    }
}


/* responsive */

@media (max-width: 900px) {

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

    .how,
    .workshops-section,
    .team-section {
        padding: 100px 0 110px;
    }

    .section-label {
        margin-bottom: 50px;
    }

    .section-head {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-bottom: 60px;
    }

    .path-step {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 30px;
        min-height: 0;
        padding: 30px 0 60px;
        text-align: center;
    }

    .path-step:nth-of-type(even) .path-circle {
        order: 0;
    }

    .path-circle {
        width: 200px;
    }

    .path-text,
    .path-step:nth-of-type(even) .path-text {
        justify-self: center;
        padding: 0;
        text-align: center;
        transform: translateY(30px);
    }

    .path-text p,
    .path-step:nth-of-type(even) .path-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .workshops-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .workshops-media {
        position: static;
        height: auto;
        margin-bottom: 20px;
    }

    .workshops-frame {
        height: 60vh;
    }

    .workshop-item {
        min-height: 0;
        padding: 36px 0;
        opacity: 1;
        transform: none;
    }

    .team-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
        gap: 60px;
    }
}

@media (max-width: 650px) {

    .about-hero {
        padding-top: 150px;
    }

    .about-text {
        top: 110px;
    }

    .about-text h1,
    .section-head h2 {
        font-size: 40px;
        letter-spacing: -1.5px;
    }

    .img-cube {
        --cube-w: 210px;
        --cube-h: 350px;
    }

    .team-card {
        height: 460px;
    }
}