.intro-animated-gradient__root {
    padding-top: clamp(4rem, 12vw, 10rem);
    padding-bottom: clamp(4rem, 12vw, 10rem);
    min-height: min(32rem, 85vh);
}

@keyframes intro-animated-gradient-spin {
    to {
        transform: rotate(360deg);
    }
}

.intro-animated-gradient__spin--left,
.intro-animated-gradient__spin--right {
    width: 85%;
    height: 85%;
    top: 7.5%;
    animation-name: intro-animated-gradient-spin;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    transform-origin: 50% 50%;
}

.intro-animated-gradient__spin--left {
    left: -18%;
    animation-duration: 48s;
}

.intro-animated-gradient__spin--right {
    right: -18%;
    animation-duration: 60s;
    animation-direction: reverse;
}

.intro-animated-gradient__area {
    max-width: 48rem;
}

/* gallery v15 — hero image + caption chips.
   Geometry shared by both CSS frameworks (Bootstrap has no utilities for it). */
.gallery-hero-chips__section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.mxw-5xl {
    max-width: 64rem !important;
}

.mxw-2xl {
    max-width: 42rem !important;
}

.gallery-hero-chips__head {
    margin-bottom: 2.5rem;
}

.gallery-hero-chips__title {
    font-size: 1.875rem;
    margin-bottom: 0.75rem;
}

.gallery-hero-chips__lead {
    font-size: 1.125rem;
}

.gallery-hero-chips__stage {
    aspect-ratio: 16 / 9;
}

.gallery-hero-chips__img {
    object-fit: cover;
}

/* The chips sit in a grid overlay — one chip per cell. Grid cells never overlap, so no
   amount of generated copy can make two chips collide (the cell just grows/wraps). */
.gallery-hero-chips__overlay {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 0.75rem;
    padding: 1.5rem;
}

.gallery-hero-chips__chip {
    /* both frameworks position these absolutely; the overlay owns placement now */
    position: static !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 20rem;
    padding: 0.75rem 1rem;
    pointer-events: auto;
    --bs-bg-opacity: 0.95;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* a flex item never shrinks below its min-content width — let the copy wrap instead */
.gallery-hero-chips__chip > :not(i) {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.gallery-hero-chips__chip > i {
    flex-shrink: 0;
}

/* one chip per corner — four distinct grid cells, so two chips can never share a spot */
.gallery-hero-chips__chip--tl {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    align-self: start;
}

.gallery-hero-chips__chip--tr {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
}

.gallery-hero-chips__chip--bl {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
    align-self: end;
}

.gallery-hero-chips__chip--br {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
    align-self: end;
}

.gallery-hero-chips__chip-text {
    font-size: 0.75rem;
}

/* Phones/tablets: half a stage is too little for a chip, so the whole thing becomes a
   column — photo first, chips under it. Identical in both frameworks. */
@media (max-width: 767.98px) {
    .gallery-hero-chips__stage {
        aspect-ratio: auto;
        display: flex;
        flex-direction: column;
    }

    .gallery-hero-chips__img {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
    }

    .gallery-hero-chips__overlay {
        position: static !important;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: none;
        padding: 0.75rem;
    }

    .gallery-hero-chips__chip,
    .gallery-hero-chips__chip--tl,
    .gallery-hero-chips__chip--tr,
    .gallery-hero-chips__chip--bl,
    .gallery-hero-chips__chip--br {
        grid-column: 1;
        grid-row: auto;
        justify-self: stretch;
        align-self: auto;
        max-width: none;
    }
}

@media (min-width: 768px) {
    .gallery-hero-chips__title {
        font-size: 2.25rem;
    }
}

/* Flex: дозволити прокрутку тексту в колонці однакової висоти (BS + TW) */
/* Flex column: allow inner scroll in equal-height grid */
.portfolio-v8-item {
    min-height: 0;
}

.portfolio-v8-box {
    min-height: 0;
}

.portfolio-v8-tech {
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.portfolio-v8-tech:hover {
    transform: scale(1.05);
}

/* Card hover: lift up + scale */
.portfolio-item-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.portfolio-item-hover:hover {
    transform: translateY(-0.5rem) scale(1.05);
}

/* Image: zoom on card hover */
.portfolio-item-hover .portfolio-img-hover {
    transition: transform 0.5s ease;
}
.portfolio-item-hover:hover .portfolio-img-hover {
    transform: scale(1.1);
}

/* quote v21 — card-deck overlap, celtic-knot corners, chrome-frame avatar, clip-path hover reveal */

/* blueprint engineering-paper grid — pattern uses currentColor, no literal color values here */
.quote-deck__blueprint {
    background-image:
        repeating-linear-gradient(0deg, currentColor 0, currentColor 1px, transparent 1px, transparent 24px),
        repeating-linear-gradient(90deg, currentColor 0, currentColor 1px, transparent 1px, transparent 24px);
    background-size: 24px 24px;
}

/* concentric decorative rings — size/position only, border color comes from the sem/theme classes in the template */
.quote-deck__ring {
    top: 50%;
    left: 50%;
    pointer-events: none;
}
.quote-deck__ring--sm {
    width: 12rem;
    height: 12rem;
    transform: translate(-50%, -50%);
}
.quote-deck__ring--md {
    width: 18rem;
    height: 18rem;
    transform: translate(-50%, -50%);
}
.quote-deck__ring--lg {
    width: 24rem;
    height: 24rem;
    transform: translate(-50%, -50%);
}

/* lightning-flash overlay — opacity-only keyframes, irregular via staggered delays */
@keyframes quoteDeckFlash {
    0%, 88%, 100% { opacity: 0; }
    91% { opacity: 1; }
    94% { opacity: 0.2; }
}
.quote-deck__flash {
    animation: quoteDeckFlash 6s steps(1, end) infinite;
}
.quote-deck__flash--a { animation-delay: 0s; }
.quote-deck__flash--b { animation-delay: 2.3s; }
.quote-deck__flash--c { animation-delay: 4.1s; }

/* card-deck overlap rhythm — variable tight/loose offsets, resets to a plain stack below md */
@media (min-width: 768px) {
    .quote-deck__item:nth-child(1) {
        transform: translateY(0.5rem);
        margin-right: -1.25rem;
        z-index: 1;
    }
    .quote-deck__item:nth-child(2) {
        transform: translateY(-0.75rem);
        margin-left: -0.5rem;
        margin-right: -2rem;
        z-index: 3;
    }
    .quote-deck__item:nth-child(3) {
        transform: translateY(1rem);
        margin-left: -0.75rem;
        z-index: 2;
    }
}

.quote-deck__card {
    transition: transform 200ms ease, box-shadow 200ms ease;
}
.quote-deck__card:hover,
.quote-deck__card:focus-within {
    transform: translateY(-0.5rem);
    z-index: 10;
}

/* celtic-knot corner accents — identical sem content per corner, shape/placement handled here */
.quote-deck__knot {
    width: 1.25rem;
    height: 1.25rem;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 35% 35%, 35% 100%, 0 100%);
}
.quote-deck__knot--tl {
    position: absolute;
    top: -0.375rem;
    left: -0.375rem;
}
.quote-deck__knot--tr {
    position: absolute;
    top: -0.375rem;
    right: -0.375rem;
    transform: rotate(90deg);
}
.quote-deck__knot--bl {
    position: absolute;
    bottom: -0.375rem;
    left: -0.375rem;
    transform: rotate(270deg);
}
.quote-deck__knot--br {
    position: absolute;
    bottom: -0.375rem;
    right: -0.375rem;
    transform: rotate(180deg);
}

/* browser-chrome framing for the icon tile */
.quote-deck__chrome {
    height: 1.25rem;
}
.quote-deck__chrome-dot {
    width: 0.375rem;
    height: 0.375rem;
    flex: none;
}
.quote-deck__avatar {
    width: 3.5rem;
}
.quote-deck__glyph {
    height: 2.75rem;
}

/* clip-path reveal on hover — pure CSS, no JS */
.quote-deck__reveal {
    clip-path: inset(0 0 100% 0);
    max-height: 0;
    transition: clip-path 250ms ease, max-height 250ms ease;
}
.quote-deck__card:hover .quote-deck__reveal,
.quote-deck__card:focus-within .quote-deck__reveal {
    clip-path: inset(0 0 0 0);
    max-height: 6rem;
}
/* hover + focus affordances (layout/outline via theme token) */
@media (hover: hover) {
    .quote-deck-root [role="listitem"]:hover,
    .quote-deck-root article:hover,
    .quote-deck-root [class*="quote-deck__card"]:hover,
    .quote-deck-root .quote-deck__book:hover,
    .quote-deck-root .quote-deck__step:hover,
    .quote-deck-root .quote-deck__index-card:hover,
    .quote-deck-root .quote-deck__pill:hover,
    .quote-deck-root .quote-deck__item:hover {
        transform: translateY(-0.125rem);
    }
}

.quote-deck-root [role="listitem"],
.quote-deck-root article,
.quote-deck-root [class*="quote-deck__card"],
.quote-deck-root .quote-deck__book,
.quote-deck-root .quote-deck__step,
.quote-deck-root .quote-deck__index-card,
.quote-deck-root .quote-deck__pill {
    transition: transform 200ms ease;
}

.quote-deck-root a:focus-visible,
.quote-deck-root button:focus-visible,
.quote-deck-root [tabindex="0"]:focus-visible,
.quote-deck-root input:focus-visible,
.quote-deck-root summary:focus-visible,
.quote-deck-root [role="slider"]:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

@media (hover: hover) {
    .quote-deck-root button:hover,
    .quote-deck-root a:hover,
    .quote-deck-root summary:hover {
        opacity: 0.92;
    }
}

.content-trio-showcase__image {
    display: block;
    width: 100%;
    height: 10rem;
    object-fit: cover;
}

.content-trio-showcase__image--tall {
    height: 14rem;
}

.content-trio-showcase__image--short {
    height: 8rem;
}

.content-trio-showcase__card-lift {
    transition: transform 180ms ease;
}

.content-trio-showcase__card-lift:hover {
    transform: translateY(-0.25rem);
}

.content-trio-showcase__float {
    animation: content-trio-showcase-float 7s ease-in-out infinite;
}

.content-trio-showcase__rail {
    width: 100%;
    height: 0.25rem;
}

.content-trio-showcase__thumb {
    width: 7rem;
    height: 5rem;
}

.content-trio-showcase__badge {
    width: 2.5rem;
    height: 2.5rem;
}

@media (min-width: 768px) {
    .content-trio-showcase__rail {
        width: 0.25rem;
        height: auto;
    }
}

@keyframes content-trio-showcase-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(0.5rem); }
}

.content-trio-showcase__dot {
    width: 0.5rem;
    height: 0.5rem;
}

.content-trio-showcase__float {
    width: 6rem;
    height: 6rem;
}

@media (min-width: 768px) {
    .content-trio-showcase__offset {
        margin-top: 2.5rem;
    }
}

