/* ============================================================
   Kedai.my — World-class polish
   Tailwind handles utilities. This adds what Tailwind can't.
   ============================================================ */

/* ---------- Typography ---------- */
.font-display {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    letter-spacing: -0.025em;
    font-feature-settings: "ss01", "cv11";
}
body {
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ---------- Custom selection color ---------- */
::selection { background: #4338CA; color: #fff; }

/* ---------- Subtle grain overlay ---------- */
.grain { position: relative; isolation: isolate; }
.grain::after {
    content: "";
    position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.65; pointer-events: none; z-index: 1; mix-blend-mode: overlay;
}
.grain > * { position: relative; z-index: 2; }

/* ---------- Mesh gradients ---------- */
.mesh-1 {
    background-color: #4F46E5;
    background-image:
        radial-gradient(at 20% 0%,  hsl(286 95% 65%) 0px, transparent 50%),
        radial-gradient(at 80% 0%,  hsl(220 95% 65%) 0px, transparent 50%),
        radial-gradient(at 0% 50%,  hsl(330 95% 60%) 0px, transparent 50%),
        radial-gradient(at 80% 100%, hsl(190 95% 60%) 0px, transparent 50%),
        radial-gradient(at 0% 100%, hsl(260 95% 65%) 0px, transparent 50%);
}
.mesh-2 {
    background-color: #050817;
    background-image:
        radial-gradient(at 12% 12%, hsl(255 75% 30%) 0px, transparent 55%),
        radial-gradient(at 88% 22%, hsl(220 75% 28%) 0px, transparent 55%),
        radial-gradient(at 50% 90%, hsl(280 75% 28%) 0px, transparent 55%),
        radial-gradient(at 30% 60%, hsl(200 80% 25%) 0px, transparent 55%);
}

/* ---------- Conic blobs ---------- */
.blob {
    background: conic-gradient(from 180deg at 50% 50%,
        #6366F1 0deg, #EC4899 90deg, #F59E0B 180deg, #10B981 270deg, #6366F1 360deg);
    filter: blur(90px);
    opacity: 0.5;
    animation: spin-slow 30s linear infinite;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }

/* ---------- Glass surfaces ---------- */
.glass {
    background: rgba(255,255,255,0.10);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.18);
}
.glass-dark {
    background: rgba(15,23,42,0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.08);
}

/* ---------- Float / fade animations ---------- */
@keyframes float-y { 0%,100% {transform:translateY(0)} 50%{transform:translateY(-10px)} }
.float-slow { animation: float-y 6s ease-in-out infinite; }
.float-mid  { animation: float-y 4.5s ease-in-out infinite; }
.float-fast { animation: float-y 3s ease-in-out infinite; }

@keyframes fade-up { from{opacity:0; transform:translateY(20px)} to{opacity:1; transform:translateY(0)} }
.fade-up { animation: fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.15s; }
.fade-up-3 { animation-delay: 0.25s; }
.fade-up-4 { animation-delay: 0.35s; }

/* ---------- Reveal on scroll (paired with IntersectionObserver in JS) ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Marquee ---------- */
@keyframes marquee { from {transform:translateX(0)} to {transform:translateX(-50%)} }
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---------- Shine sweep ---------- */
@keyframes shine { 0%{background-position:-200% center} 100%{background-position:200% center} }
.shine {
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.5) 50%, transparent 70%);
    background-size: 200% 100%;
    animation: shine 2.5s linear infinite;
}

/* ---------- Wave divider ---------- */
.wave-divider svg { display: block; width: 100%; height: 60px; }

/* ---------- No scrollbar ---------- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* ---------- Misc polish ---------- */
:focus { outline: none; }
html { scroll-behavior: smooth; }
body { -webkit-tap-highlight-color: transparent; }
.leaflet-popup-content { font-family: 'Inter', system-ui, sans-serif; font-weight: 500; }
.line-clamp-2 { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.line-clamp-3 { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

/* ---------- Card lift ---------- */
.card-lift { transition: transform 0.45s cubic-bezier(0.2,0.7,0.2,1), box-shadow 0.45s; }
.card-lift:hover { transform: translateY(-6px); }

/* ---------- Premium primary button ---------- */
.btn-primary {
    background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
    box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 8px 24px -10px rgba(15,23,42,0.65);
    transition: transform 0.18s cubic-bezier(0.2,0.7,0.2,1), box-shadow 0.18s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,0.16) inset, 0 16px 36px -12px rgba(15,23,42,0.75); }
.btn-primary:active { transform: translateY(0); }

/* ---------- Glow-on-hover ---------- */
.glow { position: relative; }
.glow::before {
    content:""; position: absolute; inset: -2px; border-radius: inherit;
    background: linear-gradient(135deg, #6366F1, #EC4899, #F59E0B);
    z-index: -1; filter: blur(12px); opacity: 0; transition: opacity 0.3s;
}
.glow:hover::before { opacity: 0.55; }

/* ---------- Refined focus ring ---------- */
input:focus, select:focus, textarea:focus, button:focus-visible {
    box-shadow: 0 0 0 3px rgba(99,102,241,0.22);
}

/* ---------- Gradient text helper ---------- */
.gradient-text {
    background: linear-gradient(135deg, #FBA5C0 0%, #FDE68A 50%, #6EE7B7 100%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent; -webkit-text-fill-color: transparent;
}

/* ---------- Custom interactive cursor on link tiles ---------- */
.cursor-arrow { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Ccircle cx='14' cy='14' r='13' fill='%230F172A'/%3E%3Cpath d='M10 14h8M14 10l4 4-4 4' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 14 14, pointer; }

/* ---------- Pretty horizontal divider ---------- */
.divider { height: 1px; background: linear-gradient(90deg, transparent, rgba(15,23,42,0.12), transparent); }

/* ---------- Tag pill base ---------- */
.tag { display:inline-flex; align-items:center; gap:.35rem; padding:.25rem .65rem; border-radius:9999px;
       font-size:11px; font-weight:600; letter-spacing:0.02em; }

/* ---------- Skeleton shimmer (for future loading states) ---------- */
@keyframes shimmer { 0%{background-position:-1000px 0} 100%{background-position:1000px 0} }
.skeleton { background: linear-gradient(90deg, #F1F5F9 0%, #E2E8F0 50%, #F1F5F9 100%);
            background-size: 1000px 100%; animation: shimmer 2s linear infinite; }
