/*!
 * 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;
}
/* Each card has its own light: Free leans warm, Custom leans cool, both stay
   in the brand's purple family. --tint is the matching icon colour (r, g, b). */
.product-free    { --g1: #9c1f93; --g2: #c2307a; --g3: #f0663f; --angle: 125deg; --tint: 245, 140, 110; }
.product-premium { --g1: #e8603f; --g2: #a21caf; --g3: #6a0a84; --angle: 160deg; }
.product-custom  { --g1: #4c1d95; --g2: #7c22c4; --g3: #a21caf; --angle: 225deg; --tint: 160, 120, 250; }
/* 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, transform .2s 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; }

/* Free and Custom: dark glass lit from one corner. The scrim is static with a
   clear patch top right, so the light stays put while the gradient drifts
   underneath it; only the featured card is coloured edge to edge. */
.product-card:not(.product-card--featured) {
    background: #141016;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 40px -22px rgba(0, 0, 0, 0.8);
}
.product-card:not(.product-card--featured)::before {
    background: radial-gradient(75% 60% at 88% 8%, rgba(20, 16, 22, 0) 0%, rgba(20, 16, 22, 0.55) 40%, rgba(20, 16, 22, 0.94) 72%, #141016 100%);
}
.product-card:not(.product-card--featured):hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 28px 50px -22px rgba(118, 9, 145, 0.6); }
.product-card:not(.product-card--featured) .product-card-art { color: rgba(255, 255, 255, 0.09); }
.product-card:not(.product-card--featured):hover .product-card-art { color: rgba(255, 255, 255, 0.14); }
.product-card:not(.product-card--featured) .product-card-icon { background: rgba(var(--tint), 0.14); border-color: rgba(var(--tint), 0.4); color: color-mix(in srgb, rgb(var(--tint)) 65%, #fff); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.product-card:not(.product-card--featured) .product-card-price small,
.product-card:not(.product-card--featured) .product-card-price span { color: #a99eb0; }
.product-card:not(.product-card--featured) .product-card-desc { color: #c4bacb; }
.product-card:not(.product-card--featured) .product-card-specs li { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); color: #ddd3e3; }
.product-card:not(.product-card--featured) .product-card-btn { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.product-card:not(.product-card--featured) .product-card-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.4); }

/* Pressed: answer on pointer-down, not on release. */
.product-card-btn:active { transform: scale(0.97); transition-duration: .1s; }

@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; }
}
/* Phones: a still gradient, no SVG grain and no 50px blur pass under the haze.
   Each drifting layer also pushed the card content above it onto layers of
   its own, so every card had to be rasterised several times over as it
   scrolled in and appeared late. The haze gradients fade out on their own. */
@media (hover: none), (pointer: coarse) {
    .products-grid::before { filter: none; }
    .product-card-bg {
        background: linear-gradient(var(--angle), var(--g1) 0%, var(--g2) 50%, var(--g3) 100%);
        background-blend-mode: normal;
        transform: translate(-13%, -13%);
        will-change: auto;
        animation: none;
    }
}
/* 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; }
}
/* Increased contrast: firmer edges and brighter copy on every card. */
@media (prefers-contrast: more) {
    .product-card, .product-card:not(.product-card--featured) { border-color: rgba(255, 255, 255, 0.55); }
    .product-card:not(.product-card--featured) .product-card-desc,
    .product-card:not(.product-card--featured) .product-card-price span { color: #fff; }
    .product-card-specs li, .product-card-btn, .product-card:not(.product-card--featured) .product-card-specs li,
    .product-card:not(.product-card--featured) .product-card-btn { border-color: rgba(255, 255, 255, 0.6); }
}
