/* ════════════════════════════════════════════════════════════════════
   Studio DONO — shared component styles
   Loaded by index.html and every work/*.html page.
   Tokens: charcoal #2b2b2b/#303030/#343434, gold #A67D52,
           cream #EFE6D6, cream-dark #D4CBBB
   ════════════════════════════════════════════════════════════════════ */

/* ── Reduced motion: global guard ──
   Motion is an enhancement. Under prefers-reduced-motion every
   animation and transition collapses to a single instant frame and
   scroll-reveal content is always visible. */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .reveal,
    .hero-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ── Dono Compare: before/after reveal slider ──
   Markup pattern (self contained, copy paste with two new paths):

   <figure class="dono-compare">
       <div class="dono-compare__frame">
           <img class="dono-compare__img" src="AFTER.webp" alt="…" loading="lazy" decoding="async">
           <div class="dono-compare__before">
               <img class="dono-compare__img" src="BEFORE.webp" alt="…" loading="lazy" decoding="async">
           </div>
           <span class="dono-compare__label dono-compare__label--before">Oblikovanje</span>
           <span class="dono-compare__label dono-compare__label--after">Izvedba</span>
           <div class="dono-compare__divider" role="slider" tabindex="0" aria-label="…">
               <span class="dono-compare__handle" aria-hidden="true">…chevrons…</span>
           </div>
       </div>
       <figcaption class="dono-compare__caption">…</figcaption>
   </figure>

   Requires js/reveal-slider.js. */

.dono-compare {
    margin: 0;
}

.dono-compare__frame {
    --pos: 50;
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 2px;
    background: #303030;
    touch-action: pan-y;
    cursor: col-resize;
    user-select: none;
    -webkit-user-select: none;
}

@media (min-width: 1024px) {
    .dono-compare--wide .dono-compare__frame {
        aspect-ratio: 2 / 1;
    }
}

.dono-compare__frame.is-dragging {
    cursor: grabbing;
}

.dono-compare__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dono-compare__before {
    position: absolute;
    inset: 0;
    clip-path: inset(0 calc(100% - var(--pos) * 1%) 0 0);
}

.dono-compare__divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--pos) * 1%);
    width: 2px;
    margin-left: -1px;
    background: #A67D52;
}

.dono-compare__divider:focus-visible {
    outline: 2px solid #EFE6D6;
    outline-offset: 2px;
}

.dono-compare__divider:focus-visible .dono-compare__handle {
    border-color: #EFE6D6;
    box-shadow: 0 0 0 3px rgba(166, 125, 82, 0.45);
}

.dono-compare__handle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 9999px;
    border: 1px solid #A67D52;
    background: rgba(43, 43, 43, 0.65);
    color: #A67D52;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.dono-compare__label {
    position: absolute;
    top: 14px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(239, 230, 214, 0.85);
    background: rgba(43, 43, 43, 0.55);
    border-radius: 2px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
}

.dono-compare__label--before {
    left: 14px;
}

.dono-compare__label--after {
    right: 14px;
}

.dono-compare__caption {
    margin-top: 12px;
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.02em;
    color: rgba(239, 230, 214, 0.45);
}

/* ── Dono Loop: muted video loops (js/video-loops.js) ── */

.dono-loop {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 2px;
    background: #303030;
}

.dono-loop__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dono-loop__toggle {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1px solid #A67D52;
    background: rgba(43, 43, 43, 0.65);
    color: #EFE6D6;
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: background 0.3s ease;
}

.dono-loop__toggle:hover {
    background: rgba(166, 125, 82, 0.35);
}

.dono-loop__toggle:focus-visible {
    outline: 2px solid #EFE6D6;
    outline-offset: 2px;
}

.dono-loop__icon--pause { display: none; }
.dono-loop__toggle.is-playing .dono-loop__icon--pause { display: block; }
.dono-loop__toggle.is-playing .dono-loop__icon--play { display: none; }

/* ════════════════════════════════════════════════════════════════════
   Work pages (work/*.html)
   Shared styles for case study pages. index.html defines .reveal,
   .gold-line and .nav-blur inline; the copies here carry the same
   values so work pages match without duplicating the whole style block.
   ════════════════════════════════════════════════════════════════════ */

.wp .reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.wp .reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.wp .reveal-delay-1 { transition-delay: 0.1s; }
.wp .reveal-delay-2 { transition-delay: 0.2s; }
.wp .reveal-delay-3 { transition-delay: 0.3s; }

.wp .gold-line {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, #A67D52, transparent);
}

.wp .nav-blur {
    backdrop-filter: blur(20px) saturate(1.2);
    -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

.wp a:focus-visible,
.wp button:focus-visible {
    outline: 2px solid #A67D52;
    outline-offset: 3px;
    border-radius: 2px;
}

/* ── Case study gallery ──
   Each <figure> sets its own aspect-ratio inline (matching the image's
   native ratio) so nothing crops and nothing shifts while loading.
   Modifier --wide spans the full row for room shots and heroes. */

.case-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .case-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

.case-gallery__item {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 2px;
    background: #303030;
}

.case-gallery__item--wide {
    grid-column: 1 / -1;
}

.case-gallery__item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.case-gallery__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px 16px 12px;
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.04em;
    color: rgba(239, 230, 214, 0.75);
    background: linear-gradient(to top, rgba(43, 43, 43, 0.75), transparent);
}

/* ── Case study meta list ── */

.case-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    border-top: 1px solid rgba(239, 230, 214, 0.08);
    padding-top: 2rem;
}

@media (min-width: 640px) {
    .case-meta {
        grid-template-columns: repeat(3, 1fr);
    }
}

.case-meta dt {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(166, 125, 82, 0.7);
    margin-bottom: 6px;
}

.case-meta dd {
    margin: 0;
    font-size: 15px;
    font-weight: 300;
    color: rgba(239, 230, 214, 0.75);
}
