/* =========================================================================
   ScriptHub — shared surface styles
   -------------------------------------------------------------------------
   Written in plain CSS on purpose. The theme ships a pre-compiled Tailwind
   sheet, so utilities authored only here would not exist in the build.
   Loaded after app.css, so these rules win on equal specificity.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. Page canvas
   Soft aurora wash + paper-like vertical gradient. Sections that paint their
   own background (hero, white panels) simply sit on top of it.
   ------------------------------------------------------------------------- */
body.site-canvas {
    background-color: var(--color-background-light, #f1f1f1);
    background-image:
        radial-gradient(55rem 34rem at 84% -14%, rgba(54, 77, 109, 0.14), transparent 62%),
        radial-gradient(40rem 26rem at -8% 14%, rgba(221, 195, 147, 0.22), transparent 60%),
        linear-gradient(180deg, #fbfcfd 0%, #f2f4f7 48%, #e9edf3 100%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

html.dark body.site-canvas {
    background-color: #0f1217;
    background-image:
        radial-gradient(55rem 34rem at 84% -14%, rgba(54, 77, 109, 0.55), transparent 62%),
        radial-gradient(40rem 26rem at -8% 14%, rgba(221, 195, 147, 0.10), transparent 60%),
        linear-gradient(180deg, #15181e 0%, #101318 48%, #0b0e13 100%);
}

/* -------------------------------------------------------------------------
   2. Product card
   ------------------------------------------------------------------------- */
.pcard {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(18, 20, 23, 0.08);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, rgba(248, 250, 252, 0.94) 100%);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.35s ease,
                border-color 0.3s ease;
}

/* Gradient hairline that lights up on hover. */
.pcard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4;
    height: 3px;
    background: linear-gradient(90deg,
        var(--color-primary, #364d6d) 0%,
        var(--color-accent, #DDC393) 100%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.pcard:hover {
    transform: translateY(-6px);
    border-color: rgba(54, 77, 109, 0.26);
    box-shadow:
        0 24px 48px -24px rgba(18, 32, 56, 0.42),
        0 4px 12px -6px rgba(18, 32, 56, 0.10);
}

.pcard:hover::before,
.pcard:focus-within::before {
    opacity: 1;
}

.pcard:focus-within {
    border-color: rgba(54, 77, 109, 0.4);
    box-shadow:
        0 0 0 3px rgba(54, 77, 109, 0.14),
        0 24px 48px -24px rgba(18, 32, 56, 0.4);
}

/* ---------- Media ---------- */
.pcard-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background:
        radial-gradient(120% 120% at 20% 0%, #fbfcfd 0%, #e8edf4 100%);
}

.pcard-media-link {
    display: block;
    width: 100%;
    height: 100%;
}

.pcard-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.001);
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
                filter 0.45s ease;
}

.pcard:hover .pcard-media img {
    transform: scale(1.035);
    filter: saturate(1.05);
}

/* Bottom shading so the floating "peek" chip stays legible on any artwork. */
.pcard-media::after {
    content: '';
    position: absolute;
    inset: 40% 0 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(180deg,
        rgba(9, 13, 21, 0) 0%,
        rgba(9, 13, 21, 0.52) 100%);
    opacity: 0.55;
    transition: opacity 0.35s ease;
}

.pcard:hover .pcard-media::after {
    opacity: 0.9;
}

/* Floating hint that appears above the artwork. */
.pcard-peek {
    position: absolute;
    left: 50%;
    bottom: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.92);
    color: #121417;
    font-size: 12px;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 10px);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.55);
    transition: opacity 0.28s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pcard-peek .material-symbols-outlined {
    font-size: 15px;
}

.pcard:hover .pcard-peek,
.pcard:focus-within .pcard-peek {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---------- Badges ---------- */
.pcard-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 3;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    pointer-events: none;
}

.pcard-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    line-height: 1;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 12px -4px rgba(16, 24, 40, 0.35);
}

.pcard-badge .material-symbols-outlined {
    font-size: 13px;
}

.pcard-badge--new {
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.92);
    color: #121417;
}

.pcard-badge--bundle {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
    color: #ffffff;
}

/* ---------- Body ---------- */
.pcard-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 18px 20px 20px;
}

.pcard-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 24px;
    margin-bottom: 10px;
}

.pcard-cat {
    display: inline-flex;
    align-items: center;
    max-width: 60%;
    padding: 4px 9px;
    border-radius: 6px;
    background: rgba(54, 77, 109, 0.07);
    color: #48607f;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pcard-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #647082;
    font-size: 12px;
    font-weight: 650;
    line-height: 1;
}

.pcard-rating .material-symbols-outlined {
    color: #f59e0b;
    font-size: 15px;
    font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 20;
}

.pcard-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: #121417;
}

.pcard-title a {
    display: -webkit-box;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}

.pcard:hover .pcard-title a {
    color: var(--color-primary, #364d6d);
}

.pcard-desc {
    display: -webkit-box;
    flex: 1 1 auto;
    overflow: hidden;
    margin: 0 0 16px;
    color: #647082;
    font-size: 13.5px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ---------- Footer row ---------- */
.pcard-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px dashed rgba(18, 20, 23, 0.11);
}

.pcard-price {
    min-width: 0;
    color: #121417;
    font-size: 18px;
    font-weight: 750;
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.pcard-cta {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: rgba(54, 77, 109, 0.08);
    color: var(--color-primary, #364d6d);
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease,
                box-shadow 0.25s ease;
}

.pcard-cta .material-symbols-outlined {
    font-size: 18px;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.pcard:hover .pcard-cta,
.pcard-cta:focus-visible {
    background: var(--color-primary, #364d6d);
    color: #ffffff;
    box-shadow: 0 8px 18px -8px rgba(54, 77, 109, 0.9);
}

.pcard:hover .pcard-cta .material-symbols-outlined {
    transform: translateX(2px);
}

/* ---------- Dark mode ---------- */
html.dark .pcard {
    border-color: rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, #23262b 0%, #1b1e23 100%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

html.dark .pcard:hover {
    border-color: rgba(221, 195, 147, 0.28);
    box-shadow:
        0 24px 48px -24px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(54, 77, 109, 0.25);
}

html.dark .pcard-media {
    background:
        radial-gradient(120% 120% at 20% 0%, #24282f 0%, #171a1f 100%);
}

html.dark .pcard-badge--new {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(15, 17, 21, 0.82);
    color: #f8fafc;
}

html.dark .pcard-cat {
    background: rgba(54, 77, 109, 0.38);
    color: #c3cfe0;
}

html.dark .pcard-rating {
    color: #9aa4b2;
}

html.dark .pcard-title {
    color: #f8fafc;
}

html.dark .pcard:hover .pcard-title a {
    color: #ffffff;
}

html.dark .pcard-desc {
    color: #9aa4b2;
}

html.dark .pcard-foot {
    border-top-color: rgba(255, 255, 255, 0.08);
}

html.dark .pcard-price {
    color: #ffffff;
}

html.dark .pcard-cta {
    background: rgba(255, 255, 255, 0.06);
    color: #dbe3ee;
}

html.dark .pcard:hover .pcard-cta,
html.dark .pcard-cta:focus-visible {
    background: var(--color-primary, #364d6d);
    color: #ffffff;
}

html.dark .pcard-peek {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 17, 21, 0.82);
    color: #f8fafc;
}

/* -------------------------------------------------------------------------
   3. Footer
   ------------------------------------------------------------------------- */
.site-footer {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    margin-top: 72px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #aab4c4;
    background:
        radial-gradient(60rem 30rem at 82% -18%, rgba(221, 195, 147, 0.15), transparent 60%),
        radial-gradient(52rem 30rem at -10% 18%, rgba(54, 77, 109, 0.60), transparent 58%),
        linear-gradient(165deg, #0e131c 0%, #111826 44%, #090c12 100%);
}

/* Accent hairline across the top edge. */
.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(221, 195, 147, 0) 0%,
        rgba(221, 195, 147, 0.55) 30%,
        rgba(54, 77, 109, 0.9) 70%,
        rgba(54, 77, 109, 0) 100%);
}

/* Faint blueprint grid, fading out to the left. */
.site-footer::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(46rem 28rem at 74% 0%, #000 0%, transparent 74%);
    mask-image: radial-gradient(46rem 28rem at 74% 0%, #000 0%, transparent 74%);
    opacity: 0.8;
}

.site-footer-inner {
    position: relative;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 64px 40px 28px;
}

.site-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 56px;
    padding-bottom: 48px;
}

/* ---------- Brand column ---------- */
.site-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    text-decoration: none;
}

.site-footer-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    border: 1px solid rgba(221, 195, 147, 0.28);
    background: linear-gradient(145deg, rgba(54, 77, 109, 0.95), rgba(26, 38, 55, 0.95));
    color: var(--color-accent, #DDC393);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12),
                0 10px 24px -12px rgba(0, 0, 0, 0.9);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-footer-logo:hover .site-footer-logo-mark {
    transform: translateY(-2px) rotate(-3deg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18),
                0 14px 28px -12px rgba(0, 0, 0, 0.95);
}

.site-footer-logo-mark .material-symbols-outlined {
    font-size: 22px;
}

.site-footer-logo-text {
    font-size: 19px;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.site-footer-desc {
    max-width: 23rem;
    margin: 18px 0 20px;
    color: #94a0b2;
    font-size: 13.5px;
    line-height: 1.7;
}

.site-footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.site-footer-badges span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #c3ccda;
    font-size: 11.5px;
    font-weight: 550;
    line-height: 1;
}

.site-footer-badges .material-symbols-outlined {
    color: #6ee7b7;
    font-size: 14px;
}

.site-footer-socials {
    display: flex;
    gap: 8px;
}

.site-footer-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.05);
    color: #c7d0dd;
    transition: transform 0.25s ease, background 0.25s ease,
                border-color 0.25s ease, color 0.25s ease;
}

.site-footer-social:hover {
    transform: translateY(-3px);
    border-color: rgba(221, 195, 147, 0.45);
    background: linear-gradient(145deg, rgba(54, 77, 109, 1), rgba(32, 46, 66, 1));
    color: #ffffff;
}

.site-footer-social svg {
    width: 16px;
    height: 16px;
}

/* ---------- Link columns ---------- */
.site-footer-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.14em;
    line-height: 1;
    text-transform: uppercase;
}

.site-footer-heading::before {
    content: '';
    width: 14px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--color-accent, #DDC393), rgba(221, 195, 147, 0));
}

.site-footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer-link {
    display: inline-block;
    color: #9aa6b8;
    font-size: 13.5px;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.25s ease;
}

.site-footer-link:hover,
.site-footer-link:focus-visible {
    color: #ffffff;
    transform: translateX(3px);
}

/* ---------- Trust note ---------- */
.site-footer-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 24px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.015));
}

.site-footer-note .material-symbols-outlined {
    flex: 0 0 auto;
    color: #6ee7b7;
    font-size: 19px;
}

.site-footer-note p {
    margin: 0;
    color: #9aa6b8;
    font-size: 12px;
    line-height: 1.65;
}

/* ---------- Payment strip ---------- */
.site-footer-payments {
    padding-bottom: 28px;
}

/* Theme-aware EPS acceptance strip: light artwork on light theme,
   dark artwork on dark theme (both files live in
   public/assets/images/payments/eps/). */
.eps-pay {
    display: block;
}

.eps-pay-dark {
    display: none;
}

.eps-pay img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
}

html.dark .eps-pay-light {
    display: none;
}

html.dark .eps-pay-dark {
    display: block;
}

/* ---------- Bottom bar ---------- */
.site-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.site-footer-bottom p {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #7d8899;
    font-size: 12px;
}

.site-footer-bottom .material-symbols-outlined {
    color: #8d99aa;
    font-size: 14px;
}

.site-footer-bottom strong {
    color: #c3ccda;
    font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
    .site-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 40px;
    }

    .site-footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .site-footer {
        margin-top: 56px;
    }

    .site-footer-inner {
        padding: 48px 20px 24px;
    }

    .site-footer-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
        padding-bottom: 36px;
    }

    .site-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* -------------------------------------------------------------------------
   4. Motion preferences
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .pcard,
    .pcard-media img,
    .pcard-peek,
    .pcard-cta,
    .pcard-cta .material-symbols-outlined,
    .site-footer-logo-mark,
    .site-footer-social,
    .site-footer-link {
        transition: none !important;
    }

    .pcard:hover {
        transform: none;
    }

    .pcard:hover .pcard-media img {
        transform: none;
    }

    .site-footer-link:hover,
    .site-footer-social:hover,
    .site-footer-logo:hover .site-footer-logo-mark {
        transform: none;
    }
}
