/* Custom Design System Tokens & Utilities */

:root {
    --color-moss: #2E4036;
    --color-clay: #CC5833;
    --color-cream: #F2F0E9;
    --color-charcoal: #1A1A1A;
}

body {
    -webkit-tap-highlight-color: transparent;
}

/* Global Noise Overlay */
#noise-overlay {
    background: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* View Transitions */
.view-content {
    will-change: transform, opacity;
}

/* Typography Overrides */
h1, h2, h3 {
    letter-spacing: -0.02em;
}

/* Glassmorphism */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.dark .glass-panel {
    background: rgba(13, 13, 18, 0.7);
}

/* Animations */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shuffle {
    0%, 100% { transform: translateY(0); }
    33% { transform: translateY(-72px); }
    66% { transform: translateY(-144px); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes scan-line {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.animate-fade-up {
    animation: fade-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-shuffle {
    animation: shuffle 6s cubic-bezier(0.8, 0, 0.2, 1) infinite;
}

.animate-blink {
    animation: blink 0.8s infinite;
}

/* Magnetic Button Feel */
.btn-magnetic {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.btn-magnetic:hover {
    transform: scale(1.03);
}
.btn-magnetic:active {
    transform: scale(0.95);
}

/* Stacking Protocol Effect */
.stack-card {
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.stack-card.active {
    transform: scale(1);
    opacity: 1;
    filter: blur(0);
}
.stack-card.under {
    transform: scale(0.9);
    opacity: 0.5;
    filter: blur(10px);
}

/* Terms Inline Content — normalize WP page HTML for SPA */
.terms-content {
    font-family: inherit !important;
    color: inherit !important;
}
.terms-content * {
    font-family: inherit !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}
.terms-content div[style],
.terms-content p[style],
.terms-content span[style] {
    background-color: transparent !important;
    border-color: currentColor !important;
    color: inherit !important;
}
.terms-content h2, .terms-content h3 {
    color: var(--color-clay) !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    margin: 1em 0 0.5em !important;
    letter-spacing: -0.02em;
}
.terms-content h2:first-child { margin-top: 0 !important; }
.terms-content ul {
    padding-left: 1.2em !important;
    margin: 0.5em 0 !important;
    list-style-type: disc !important;
}
.terms-content li {
    margin-bottom: 0.35em !important;
    line-height: 1.6 !important;
}
.terms-content strong {
    font-weight: 700 !important;
    opacity: 1 !important;
}
.terms-content a {
    color: var(--color-clay) !important;
    text-decoration: underline !important;
}

/* Gallery Scrollbar Hide */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Product Modal Navigation Buttons */
.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #FAF8F5; /* ivory */
    border: 1px solid rgba(254, 254, 254, 0.15);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 110;
    cursor: pointer;
}
.modal-nav-btn:hover {
    background: #CC5833; /* clay */
    border-color: #CC5833;
}
.modal-nav-btn:active {
    transform: translateY(-50%) scale(0.9);
}
@media (min-width: 768px) {
    .modal-nav-btn-left { left: 32px; }
    .modal-nav-btn-right { right: 32px; }
}
@media (max-width: 767px) {
    .modal-nav-btn-left { left: 16px; }
    .modal-nav-btn-right { right: 16px; }
}

/* ─── Checkout button: shimmer sweep animation ─────────────────────────── */
@keyframes am4-shimmer {
    0%   { left: -60%; opacity: 0; }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { left: 110%; opacity: 0; }
}
