/*!
 * Copyright (c) 2026 Daki.cc — Niclas Specht. All rights reserved.
 * Proprietary and confidential.
 */

/* "What we provide": three vivid gradient cards that light up the dark page. */
.products-section { position: relative; padding-top: 3rem; padding-bottom: .5rem; }
.products-intro { margin: 0 0 34px; }

.products-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
/* Coloured haze behind the cards so they glow off the background. */
.products-grid::before {
    content: '';
    position: absolute;
    inset: 8% 4% -6%;
    z-index: -1;
    border-radius: 50%;
    background:
        radial-gradient(40% 60% at 20% 50%, rgba(192, 38, 211, 0.18), transparent 70%),
        radial-gradient(40% 60% at 55% 45%, rgba(251, 99, 65, 0.14), transparent 70%),
        radial-gradient(40% 60% at 85% 55%, rgba(118, 9, 145, 0.24), transparent 70%);
    filter: blur(50px);
    pointer-events: none;
}

.product-card {
    --g1: #760991; --g2: #c026d3; --g3: #fb6341; --angle: 135deg;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 26px 24px 24px;
    border-radius: 18px;
    color: #fff;
    background: var(--g2);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 18px 40px -18px rgba(118, 9, 145, 0.7);
    transition: transform .35s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow .35s ease;
}
.product-free    { --g1: #6a0a84; --g2: #9c1f93; --g3: #e8603f; --angle: 125deg; }
.product-premium { --g1: #e8603f; --g2: #a21caf; --g3: #6a0a84; --angle: 160deg; }
.product-custom  { --g1: #8f1a9c; --g2: #6a0a84; --g3: #e8603f; --angle: 225deg; }
/* The gradient lives on an oversized layer that drifts via transform, so the
   card is never repainted while it moves. */
.product-card-bg {
    position: absolute;
    top: 0; left: 0;
    width: 135%; height: 135%;
    z-index: -2;
    /* Film grain is blended into this layer once, not re-blended every frame. */
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E"), linear-gradient(var(--angle), var(--g1) 0%, var(--g2) 50%, var(--g3) 100%);
    background-blend-mode: overlay, normal;
    will-change: transform;
    animation: product-shift 14s ease-in-out infinite alternate;
    pointer-events: none;
}
.product-premium .product-card-bg { animation-delay: -5s; }
.product-custom .product-card-bg  { animation-delay: -9s; }
@keyframes product-shift {
    from { transform: translate(0, -7.78%); }
    to   { transform: translate(-25.93%, -18.15%); }
}
/* Gloss on top of the drifting gradient. */
.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 28%, transparent 50%);
    pointer-events: none;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 28px 50px -18px rgba(192, 38, 211, 0.75);
}

/* Big line-art watermark in the corner */
.product-card-art {
    position: absolute;
    top: -26px;
    right: -30px;
    z-index: -1;
    width: 190px;
    height: 190px;
    color: rgba(255, 255, 255, 0.16);
    transform: rotate(-12deg);
    transition: transform .5s cubic-bezier(0.22, 0.61, 0.36, 1), color .3s ease;
    pointer-events: none;
}
.product-card-art svg { width: 100%; height: 100%; }
.product-card:hover .product-card-art { transform: rotate(-4deg) translate(-8px, 6px) scale(1.04); color: rgba(255, 255, 255, 0.22); }

.product-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.product-card-icon {
    display: grid;
    place-items: center;
    width: 46px; height: 46px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.product-card-icon svg { width: 22px; height: 22px; }
.product-card-badge {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(17, 10, 20, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font: 600 10.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.product-card-title { margin: 0 0 6px; font: 600 1.3rem/1.2 'Poppins', sans-serif; letter-spacing: -.02em; }
.product-card-price { display: flex; align-items: baseline; gap: 6px; margin: 0 0 14px; }
.product-card-price strong { font-size: 2.5rem; font-weight: 700; line-height: 1; letter-spacing: -.04em; }
.product-card-price small, .product-card-price span { color: rgba(255, 255, 255, 0.82); font-size: .9rem; }
.product-card-desc { flex-grow: 1; margin: 0 0 18px; color: rgba(255, 255, 255, 0.92); font-size: .95rem; line-height: 1.6; }

.product-card-specs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
.product-card-specs li {
    padding: 5px 10px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    font-size: .78rem;
    font-weight: 500;
}

.product-card-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: .92rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .25s ease, border-color .25s ease, color .25s ease;
}
.product-card-btn svg { width: 16px; height: 16px; transition: transform .2s ease; }
.product-card-btn:hover { background: rgba(255, 255, 255, 0.22); border-color: #fff; color: #fff; }
.product-card-btn:hover svg { transform: translateX(4px); }
.product-card-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Premium: the brightest card with a solid white call to action. */
.product-card--featured {
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 0 0 1px rgba(251, 99, 65, 0.35), 0 24px 60px -16px rgba(251, 99, 65, 0.6);
}
.product-card--featured:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 0 1px rgba(251, 99, 65, 0.5), 0 32px 70px -16px rgba(251, 99, 65, 0.75); }
.product-card--featured .product-card-btn { background: #fff; border-color: #fff; color: #5b0a70; box-shadow: 0 8px 20px -8px rgba(17, 10, 20, 0.6); }
.product-card--featured .product-card-btn:hover { background: #fbeefe; color: #5b0a70; }

@media (max-width: 991px) {
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-custom { grid-column: 1 / -1; }
    .product-custom .product-card-desc { max-width: 560px; }
}
@media (max-width: 767px) {
    .products-section { padding-top: 2rem; }
    .products-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .product-card { padding: 22px 20px 20px; }
    .product-card-price strong { font-size: 2.2rem; }
}
/* Off screen: freeze the drifting gradients (home.js toggles the class). */
.products-section.is-offscreen .product-card-bg { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
    .product-card, .product-card-bg, .product-card-art, .product-card-btn svg { animation: none; transition: none; }
}
