/* ===========================================================
   Unloxskill - Shared Stylesheet
   =========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@400;500;600;700;800;900&display=swap');

:root {
    color-scheme: dark;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #0a0420;
    overflow-x: hidden;
    /* ฟอนต์ไทยแบบไม่มีหัว (มินิมอล) + Inter สำหรับภาษาอังกฤษ */
    font-family: 'Inter', 'Noto Sans Thai', sans-serif !important;
}

/* ===== Background gradient (deep purple + teal/cyan) ===== */
.bg-aurora {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(60% 50% at 78% 18%, rgba(124, 92, 255, 0.45) 0%, transparent 60%),
        radial-gradient(55% 55% at 12% 88%, rgba(20, 184, 166, 0.40) 0%, transparent 60%),
        radial-gradient(70% 60% at 50% 50%, rgba(91, 33, 182, 0.30) 0%, transparent 70%),
        linear-gradient(160deg, #0a0420 0%, #120833 45%, #0a0420 100%);
}

/* ===== Film grain / noise overlay ===== */
.noise-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.06;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

/* ===== Glassmorphism ===== */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.glass-card {
    background: rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.10);
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: rgba(167, 139, 250, 0.55);
    box-shadow: 0 20px 50px rgba(124, 92, 255, 0.25);
}

/* ===== Glowing CTA button ===== */
.btn-glow {
    position: relative;
    background: linear-gradient(135deg, #7c5cff 0%, #2dd4bf 100%);
    transition: box-shadow 0.4s ease, transform 0.25s ease;
    box-shadow: 0 0 0 rgba(124, 92, 255, 0);
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(124, 92, 255, 0.7), 0 0 45px rgba(45, 212, 191, 0.45);
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(120deg, #a78bfa 0%, #ffffff 45%, #2dd4bf 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0a0420; }
::-webkit-scrollbar-thumb { background: rgba(124, 92, 255, 0.4); border-radius: 8px; }

/* ===== Scroll progress bar (top) ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: 0 50%;
    background: linear-gradient(90deg, #7c5cff, #2dd4bf);
    z-index: 60;
    box-shadow: 0 0 12px rgba(124, 92, 255, 0.6);
}

/* smooth scrolling helper (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* ===========================================================
   Animated Hero Graphic (orbiting skill scene)
   =========================================================== */
.hero-scene {
    position: relative;
    width: 100%;
    max-width: 28rem;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glowing core */
.hero-core {
    position: absolute;
    width: 42%;
    height: 42%;
    border-radius: 9999px;
    background: radial-gradient(circle at 35% 30%, #c4b5fd, #7c5cff 45%, #14b8a6 100%);
    box-shadow: 0 0 70px rgba(124, 92, 255, 0.65), inset 0 0 50px rgba(255, 255, 255, 0.3);
    animation: corePulse 4s ease-in-out infinite;
}

@keyframes corePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 70px rgba(124,92,255,0.55), inset 0 0 50px rgba(255,255,255,0.3); }
    50%      { transform: scale(1.08); box-shadow: 0 0 95px rgba(45,212,191,0.6), inset 0 0 55px rgba(255,255,255,0.4); }
}

/* Orbit rings */
.hero-ring {
    position: absolute;
    border: 1px solid rgba(167, 139, 250, 0.25);
    border-radius: 9999px;
}
.hero-ring--1 { width: 100%; height: 100%; animation: spinCW 26s linear infinite; }
.hero-ring--2 { width: 74%;  height: 74%;  animation: spinCCW 18s linear infinite; }
.hero-ring--3 { width: 50%;  height: 50%;  animation: spinCW 12s linear infinite; }

@keyframes spinCW  { from { transform: rotate(0deg); }   to { transform: rotate(360deg); } }
@keyframes spinCCW { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }

/* Skill chips that ride the orbits */
.orbit {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    z-index: 3;
}
.orbit--a { animation: spinCW 22s linear infinite; }
.orbit--b { animation: spinCCW 16s linear infinite; }
.orbit--c { animation: spinCW 30s linear infinite; }

.chip {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.chip svg { width: 22px; height: 22px; }
.chip img { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }

/* รูปอัลปาก้าตรงกลาง (แทนวงกลมเดิม) */
.hero-alpaca {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    height: 98%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 0 45px rgba(124, 92, 255, 0.55)) drop-shadow(0 0 80px rgba(45, 212, 191, 0.25));
    animation: alpacaFloat 6s ease-in-out infinite;
}

@keyframes alpacaFloat {
    0%, 100% { transform: translate(-50%, -50%); }
    50%      { transform: translate(-50%, -54%); }
}

/* counter-rotate so chips stay upright */
.orbit--a .chip { animation: spinCCW 22s linear infinite; }
.orbit--b .chip { animation: spinCW 16s linear infinite; }
.orbit--c .chip { animation: spinCCW 30s linear infinite; }

/* offset chips around the ring */
.orbit--b { transform: rotate(120deg); }
.orbit--c { transform: rotate(240deg); }

/* Floating particles */
.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background: #2dd4bf;
    opacity: 0.7;
    animation: floatY 7s ease-in-out infinite;
}
.particle:nth-child(1) { top: 12%; left: 18%; background:#a78bfa; animation-delay: 0s; }
.particle:nth-child(2) { top: 78%; left: 22%; animation-delay: 1.5s; }
.particle:nth-child(3) { top: 30%; left: 86%; background:#a78bfa; animation-delay: 0.8s; }
.particle:nth-child(4) { top: 84%; left: 78%; animation-delay: 2.2s; }
.particle:nth-child(5) { top: 8%;  left: 60%; animation-delay: 1.1s; }

@keyframes floatY {
    0%, 100% { transform: translateY(0); opacity: 0.35; }
    50%      { transform: translateY(-16px); opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-core, .hero-alpaca, .hero-ring, .orbit, .chip, .particle, .marquee-track { animation: none !important; }
}

/* ===========================================================
   Marquee (แถบเลื่อนต่อเนื่อง) - ใช้กับรีวิว และโลโก้แบรนด์
   =========================================================== */
.marquee {
    overflow: hidden;
    position: relative;
    width: 100%;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
    display: flex;
    width: max-content;
    gap: 1.25rem;
    animation: marquee 40s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-rev .marquee-track { animation-direction: reverse; }
.marquee-fast .marquee-track { animation-duration: 28s; }

@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* การ์ดรีวิว (สี่เหลี่ยมแนวนอน) */
.review-card {
    flex: 0 0 auto;
    width: 340px;
    max-width: 80vw;
}

/* ชิปโลโก้แบรนด์ */
.brand-chip {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 64px;
    min-width: 160px;
    padding: 0 1.75rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: #1e293b;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-size: 1.05rem;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.brand-chip:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(124, 92, 255, 0.35); }
.brand-chip img { max-height: 34px; max-width: 130px; object-fit: contain; }
