/* ===========================
   Lumeve • Sketches section
   Unified panel, perfect-fit images, clean labels,
   smooth entrance and hover animations
   =========================== */

.sketches {
    --off: #f9f8f6;
    --white: #fff;
    --blue-600: #165c7d;
    --blue-500: #398fba;
    --pink: #ff6c63;

    --radius-xl: 10px;
    --radius-lg: 10px;
    --rail-pad: clamp(16px, 4vw, 48px);

    padding: calc(var(--rail-pad) + 8px) 0 var(--rail-pad);
}

/* unified white panel */
.sketches__rail {
    max-width: 1160px;
    margin: 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.1), 0 10px 24px rgba(0, 0, 0, 0.06);
    position: relative;
}

/* scroll hint: stick to bottom with animated arrows */
.scroll-hint {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 6px 12px;
    font: 700 12px/1.2 "IBM Plex Sans", system-ui, -apple-system, Segoe UI,
        Roboto, sans-serif;
    color: var(--blue-600);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(22, 92, 125, 0.2);
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    letter-spacing: 0.03em;
    pointer-events: none;
    z-index: 5;
    white-space: nowrap;
}
.scroll-hint::after {
    content: " ⇠ ⇢";
    display: inline-block;
    margin-left: 6px;
    animation: scrollPulse 1.6s infinite;
}

@keyframes scrollPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translateX(0);
    }
    50% {
        opacity: 1;
        transform: translateX(4px);
    }
}

/* horizontal scroller */
.sketches__wall {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(240px, 46vw, 420px);
    gap: clamp(12px, 2.6vw, 24px);
    overflow-x: auto;
    padding: 12px 24px 24px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 24px;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(22, 92, 125, 0.35) transparent;
}
.sketches__wall::-webkit-scrollbar {
    height: 10px;
}
.sketches__wall::-webkit-scrollbar-thumb {
    background: rgba(22, 92, 125, 0.28);
    border-radius: 10px;
}
.sketches__wall::-webkit-scrollbar-thumb:hover {
    background: rgba(22, 92, 125, 0.45);
}

/* cards */
.sketches__item {
    position: relative;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    scroll-snap-align: start;
    overflow: hidden;

    --label-space: 36px;
    aspect-ratio: 3 / 4;
    opacity: 0;
    transform: translateY(8px);
    animation: skFadeUp 0.45s ease forwards;
}
.sketches__item:nth-child(2) {
    animation-delay: 0.05s;
}
.sketches__item:nth-child(3) {
    animation-delay: 0.1s;
}
.sketches__item:nth-child(4) {
    animation-delay: 0.15s;
}

@keyframes skFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* label */
.sketches__item::before {
    content: attr(data-label);
    position: absolute;
    top: 8px;
    left: 12px;
    z-index: 2;
    padding: 6px 10px;
    font: 700 13px/1 "IBM Plex Sans", system-ui, sans-serif;
    color: var(--blue-600);
    background: linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, var(--blue-500), var(--pink)) border-box;
    border: 1px solid transparent;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(22, 92, 125, 0.14);
    white-space: nowrap;
}

/* images */
.sketches__item > img {
    position: absolute;
    inset: var(--label-space) 12px 12px 12px;
    width: 100%;
    height: calc(100% - var(--label-space) - 12px);
    object-fit: contain;
    background: transparent;
    filter: contrast(1.12) brightness(1.03);
    mix-blend-mode: multiply;
    transform-origin: center;
    transition: transform 0.35s ease, filter 0.35s ease;
}

/* hover */
.sketches__item:hover {
    box-shadow: 0 16px 36px rgba(22, 92, 125, 0.18);
    border-color: rgba(22, 92, 125, 0.25);
}
.sketches__item:hover > img {
    transform: scale(1.03) rotate(0.4deg);
    filter: contrast(1.18) brightness(1.03);
}

/* hover ring */
.sketches__item::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: conic-gradient(
        from 0deg,
        var(--blue-500),
        var(--pink),
        var(--blue-500)
    );
    opacity: 0;
    transition: opacity 0.35s ease, transform 0.35s ease;
    transform: scale(1.02);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask: linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    padding: 1px;
    border-radius: var(--radius-lg);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
}
.sketches__item:hover::after {
    opacity: 0.35;
    transform: scale(1);
}

/* CTA */
.sketches__cta-wrap {
    display: flex;
    justify-content: center;
    padding: 0 24px 42px; /* leave room for scroll hint */
}
.btn {
    font: 700 14px/1 "IBM Plex Sans", system-ui, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    padding: 10px 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* secondary button */
.btn--secondary,
.sketches__cta {
    position: relative;
    overflow: hidden;
    border: 2px solid var(--blue-600);
    color: var(--blue-600);
    background:
        linear-gradient(var(--pink), var(--pink)) left center / 0% 100% no-repeat,
        #fff;
    box-shadow: 0 8px 18px rgba(22, 92, 125, 0.12);
    transition:
        background-size .32s ease,
        color .18s ease,
        border-color .18s ease,
        transform .06s ease,
        box-shadow .18s ease;
}
.btn--secondary::before,
.sketches__cta::before { content: none; }
.btn--secondary:hover,
.sketches__cta:hover {
    background:
        linear-gradient(var(--pink), var(--pink)) left center / 100% 100% no-repeat,
        #fff;
    color: #fff;
    border-color: var(--pink);
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(22, 92, 125, 0.18);
}
.btn--secondary:focus-visible,
.sketches__cta:focus-visible {
    outline: 3px solid rgba(255, 108, 99, 0.45);
    outline-offset: 2px;
}
.btn--secondary:active,
.sketches__cta:active {
    transform: translateY(0);
}

/* responsive */
@media (max-width: 640px) {
    .scroll-hint {
        font-size: 11px;
        padding: 4px 10px;
    }
    .sketches__wall {
        padding: 8px 16px 16px;
        grid-auto-columns: clamp(220px, 78vw, 360px);
    }
    .sketches__item::before {
        font-size: 12px;
        padding: 5px 8px;
    }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    .sketches__item,
    .sketches__item > img,
    .sketches__item::after,
    .btn--secondary,
    .sketches__cta,
    .scroll-hint::after {
        transition: none;
        animation: none;
    }
}
