/* ============================================
   POINTUS HERO CAROUSEL — Polished
   ============================================ */

.hc {
    position: relative;
    width: 100%;
    height: 92vh;
    min-height: 620px;
    max-height: 880px;
    overflow: hidden;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #fff;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    transition: background 750ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hc[data-active="0"] { background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%); }
.hc[data-active="1"] { background: linear-gradient(135deg, #0c4a6e 0%, #0ea5e9 100%); }
.hc[data-active="2"] { background: linear-gradient(135deg, #312e81 0%, #6366f1 100%); }
.hc[data-active="3"] { background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%); }

/* Subtle radial glow behind the centre product */
.hc-glow {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 80vw;
    max-width: 1200px;
    height: 80vh;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at bottom, rgba(255, 255, 255, 0.18) 0%, transparent 55%);
    pointer-events: none;
    z-index: 1;
    transition: opacity 750ms ease;
}

/* Grain */
.hc-grain {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 51;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    background-repeat: repeat;
}

/* Top-left brand */
.hc-brand {
    position: absolute;
    top: 28px;
    left: 24px;
    z-index: 60;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: #fff;
    opacity: 0.85;
}
@media (min-width: 640px) {
    .hc-brand { left: 40px; }
}

/* Giant ghost text */
.hc-ghost {
    position: absolute;
    inset-inline: 0;
    top: 14%;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    user-select: none;
    margin: 0;
}

.hc-ghost-text {
    font-family: 'Anton', sans-serif;
    font-size: clamp(72px, 18vw, 240px);
    font-weight: 900;
    color: #fff;
    opacity: 0.92;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    white-space: nowrap;
    transition: opacity 280ms ease;
    padding: 0 24px;
}

.hc-ghost-text.is-fading { opacity: 0; }

/* Stage */
.hc-stage {
    position: absolute;
    inset: 0;
    z-index: 3;
}

.hc-item {
    position: absolute;
    aspect-ratio: 0.6 / 1;
    display: block;
    transition: transform 750ms cubic-bezier(0.4, 0, 0.2, 1),
                filter 750ms cubic-bezier(0.4, 0, 0.2, 1),
                opacity 750ms cubic-bezier(0.4, 0, 0.2, 1),
                left 750ms cubic-bezier(0.4, 0, 0.2, 1),
                bottom 750ms cubic-bezier(0.4, 0, 0.2, 1),
                height 750ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, filter, opacity;
    text-decoration: none;
}

.hc-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
    filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.28));
}

/* Desktop roles — product positioned to be clearly visible */
.hc-item.is-center {
    left: 50%;
    bottom: 14%;
    height: 65%;
    transform: translateX(-50%) scale(1.25);
    filter: none;
    opacity: 1;
    z-index: 20;
}

.hc-item.is-left {
    left: 22%;
    bottom: 18%;
    height: 30%;
    transform: translateX(-50%) scale(1);
    filter: blur(2px);
    opacity: 0.75;
    z-index: 10;
}

.hc-item.is-right {
    left: 78%;
    bottom: 18%;
    height: 30%;
    transform: translateX(-50%) scale(1);
    filter: blur(2px);
    opacity: 0.75;
    z-index: 10;
}

.hc-item.is-back {
    left: 50%;
    bottom: 22%;
    height: 22%;
    transform: translateX(-50%) scale(1);
    filter: blur(4px);
    opacity: 0.65;
    z-index: 5;
}

/* Bottom-left info + nav */
.hc-info {
    position: absolute;
    bottom: 28px;
    left: 24px;
    z-index: 60;
    max-width: 360px;
}
@media (min-width: 640px) {
    .hc-info {
        bottom: 64px;
        left: 96px;
        max-width: 420px;
    }
}

.hc-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    line-height: 1.2;
    transition: opacity 280ms ease;
}
@media (min-width: 640px) {
    .hc-title { font-size: 24px; margin-bottom: 14px; }
}

.hc-desc {
    display: none;
    margin: 0 0 22px;
    font-size: 14px;
    color: #fff;
    opacity: 0.78;
    line-height: 1.65;
    transition: opacity 280ms ease;
}
@media (min-width: 640px) {
    .hc-desc { display: block; font-size: 15px; }
}

.hc-title.is-fading, .hc-desc.is-fading { opacity: 0; }

/* Per-slot small CTA button */
.hc-slot-cta {
    display: none;
    margin: 0 0 24px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 200ms ease, transform 200ms ease, opacity 280ms ease;
    align-items: center;
    gap: 8px;
    width: fit-content;
}
@media (min-width: 640px) {
    .hc-slot-cta { display: inline-flex; }
}
.hc-slot-cta:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
    color: #fff;
}
.hc-slot-cta.is-fading { opacity: 0; }

/* Nav arrows */
.hc-nav {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.hc-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-heading, #0F172A);
    cursor: pointer;
    transition: transform 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
    font-family: inherit;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
@media (min-width: 640px) {
    .hc-arrow { width: auto; height: 54px; }
}
.hc-arrow:hover,
.hc-arrow:focus {
    transform: translateY(-2px);
    background-color: #fff;
    color: var(--color-accent, #0067FF);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    outline: none;
}
.hc-arrow:active {
    transform: translateY(0);
}

/* Slide indicators (dots with autoplay progress fill) */
.hc-indicators {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 60;
    display: flex;
    gap: 10px;
    align-items: center;
}
@media (min-width: 640px) {
    .hc-indicators {
        bottom: 76px;
        left: 50%;
    }
}

.hc-dot {
    position: relative;
    width: 28px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 999px;
    cursor: pointer;
    overflow: hidden;
    transition: width 350ms cubic-bezier(0.4, 0, 0.2, 1);
}
@media (min-width: 640px) {
    .hc-dot { width: 38px; height: 4px; }
}

.hc-dot:hover { background: rgba(255, 255, 255, 0.5); }

.hc-dot.is-active {
    width: 60px;
    background: rgba(255, 255, 255, 0.25);
}
@media (min-width: 640px) {
    .hc-dot.is-active { width: 76px; }
}

.hc-dot-fill {
    position: absolute;
    inset: 0;
    width: 0;
    background: #fff;
    border-radius: inherit;
    pointer-events: none;
}

.hc-dot.is-active .hc-dot-fill {
    width: 100%;
    transition: width var(--hc-interval, 6000ms) linear;
}

.hc-dot.is-active.is-paused .hc-dot-fill {
    transition-duration: 0ms;
}

/* When autoplay is OFF, fill instantly on active */
.hc[data-autoplay="0"] .hc-dot.is-active .hc-dot-fill {
    width: 100%;
    transition: none;
}

/* Bottom-right discover link */
.hc-discover {
    position: absolute;
    bottom: 28px;
    right: 24px;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Anton', sans-serif;
    font-size: clamp(20px, 4vw, 52px);
    font-weight: 400;
    color: #fff;
    opacity: 0.9;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    text-decoration: none;
    transition: opacity 200ms ease, gap 200ms ease;
}
.hc-discover:hover {
    opacity: 1;
    color: #fff;
    gap: 16px;
}
@media (min-width: 640px) {
    .hc-discover { bottom: 64px; right: 40px; gap: 14px; }
}

.hc-discover svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
@media (min-width: 640px) {
    .hc-discover svg { width: 32px; height: 32px; }
}

/* ============ MOBILE ============ */
@media (max-width: 640px) {
    .hc {
        height: 78vh;
        min-height: 520px;
        max-height: 720px;
    }

    .hc-ghost-text {
        font-size: clamp(54px, 16vw, 120px);
    }

    .hc-item.is-center {
        height: 50%;
        bottom: 28%;
        transform: translateX(-50%) scale(1.1);
    }
    .hc-item.is-left {
        left: 18%;
        bottom: 36%;
        height: 14%;
    }
    .hc-item.is-right {
        left: 82%;
        bottom: 36%;
        height: 14%;
    }
    .hc-item.is-back {
        bottom: 38%;
        height: 11%;
    }

    .hc-indicators {
        bottom: 96px;
    }

    .hc-info {
        bottom: 24px;
        max-width: calc(100% - 48px);
    }

    .hc-arrow {
        width: auto;
        height: 42px;
    }

    .hc-discover {
        font-size: 18px;
    }
}

/* Astra reset on home */
body.home .hc,
body.pointai-home .hc,
body.front-page .hc { margin: 0; }
