@font-face {
    font-family: 'Ethnocentric';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/ethnocentric.regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Ethnocentric';
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/ethnocentric.italic.ttf') format('truetype');
}

:root {
    --bg: #080808;
    --bg2: #0e0e0e;
    --bg3: #161616;
    --purple: #dc2626;
    --purple-light: #ef4444;
    --purple-glow: #dc262644;
    --purple-dim: #7f1d1d;
    --accent: #3b82f6;
    --accent2: #60a5fa;
    --text: #f1f5f9;
    --text-dim: #a0aec0;
    --text-faint: #4a5568;
    --border: #1f1f1f;
    --border-glow: #dc262655;
    --card: #0c0c0c;
    --tag-bg: #141414;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'IBM Plex Sans Thai', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Particle Canvas Background */
#particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Ensure all content sits above canvas */
nav, section, footer, .lightbox, .marquee-strip {
    position: relative;
    z-index: 1;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg2);
}

::-webkit-scrollbar-thumb {
    background: var(--purple-dim);
    border-radius: 3px;
}

/* NAV */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    height: 60px;
    background: rgba(8, 8, 8, 0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: 'Ethnocentric', sans-serif;
    font-weight: 400;
    font-size: 1.3rem;
    color: #fff;
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    transition: color .2s;
}

.nav-links a:hover {
    color: var(--purple-light);
}

.nav-cta {
    padding: .45rem 1.2rem;
    background: var(--purple);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    transition: background .2s, box-shadow .2s;
    white-space: nowrap;
}

.nav-cta:hover {
    background: var(--purple-light);
    box-shadow: 0 0 18px var(--purple-glow);
}

/* HERO */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 7rem 1.5rem 5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(-45deg,
            transparent,
            transparent 60px,
            rgba(220, 38, 38, 0.03) 60px,
            rgba(220, 38, 38, 0.03) 62px),
        repeating-linear-gradient(180deg,
            transparent,
            transparent 120px,
            rgba(255, 255, 255, 0.015) 120px,
            rgba(255, 255, 255, 0.015) 121px);
    mask-image: radial-gradient(ellipse 90% 70% at 50% 45%, black 20%, transparent 100%);
    opacity: 1;
    pointer-events: none;
}

/* Racing stripe - red/blue horizontal band */
.hero .hero-stripe {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #dc2626 0%, #dc2626 45%, #fff 45%, #fff 55%, #3b82f6 55%, #3b82f6 100%);
    opacity: .6;
    z-index: 1;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    width: 900px;
    height: 500px;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(ellipse 300px 400px at 30% 40%, #dc262625 0%, transparent 70%),
        radial-gradient(ellipse 300px 400px at 70% 50%, #3b82f620 0%, transparent 70%),
        radial-gradient(ellipse 200px 200px at 50% 45%, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    pointer-events: none;
    animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        opacity: .6;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.hero-eyebrow {
    font-family: 'Ethnocentric', sans-serif;
    font-size: .75rem;
    letter-spacing: .2em;
    color: var(--purple-light);
    text-transform: uppercase;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-family: 'Ethnocentric', 'IBM Plex Sans Thai', sans-serif;
    font-size: clamp(2.4rem, 7vw, 4.5rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: .6rem;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #fff 30%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    max-width: 600px;
    color: var(--text-dim);
    font-size: 1.05rem;
    margin-bottom: 2.2rem;
    position: relative;
    z-index: 1;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
    margin-bottom: 3rem;
}

.btn-primary {
    padding: .75rem 2rem;
    background: var(--purple);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, box-shadow .2s, transform .15s;
}

.btn-primary:hover {
    background: var(--purple-light);
    box-shadow: 0 0 28px var(--purple-glow);
    transform: translateY(-2px);
}

.btn-outline {
    padding: .75rem 2rem;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s, transform .15s;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, .08);
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
}

.hero-badges {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.badge {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .9rem;
    background: var(--tag-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-family: 'JetBrains Mono', 'IBM Plex Sans Thai', monospace;
    font-size: .75rem;
    color: var(--text-dim);
}

.badge span.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--purple-light);
    display: inline-block;
}

/* MARQUEE TICKER */
.marquee-strip {
    overflow: hidden;
    background: var(--bg2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: .75rem 0;
    white-space: nowrap;
}

.marquee-track {
    display: inline-flex;
    gap: 2.5rem;
    animation: marqueeScroll 25s linear infinite;
}

.marquee-track span {
    font-family: 'Ethnocentric', sans-serif;
    font-size: .7rem;
    letter-spacing: .15em;
    color: var(--text-faint);
    text-transform: uppercase;
    flex-shrink: 0;
    position: relative;
    padding-left: 1.2rem;
}

.marquee-track span::before {
    content: '◆';
    position: absolute;
    left: 0;
    color: var(--purple);
    font-size: .5rem;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* SECTION */
section {
    padding: 5rem 1.5rem;
}

.section-eyebrow {
    font-family: 'Ethnocentric', sans-serif;
    font-size: .7rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--purple-light);
    margin-bottom: .75rem;
    text-align: center;
}

.section-title {
    font-family: 'Rajdhani', 'IBM Plex Sans Thai', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: .6rem;
}

.section-desc {
    text-align: center;
    color: var(--text-dim);
    max-width: 520px;
    margin: 0 auto 3rem;
    font-size: .95rem;
}

/* FEATURES */
#features {
    background: var(--bg2);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    transition: border-color .2s, box-shadow .2s, transform .2s;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #dc2626, #3b82f6, transparent);
    opacity: 0;
    transition: opacity .3s;
}

.feature-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 24px #dc262622;
    transform: translateY(-3px);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.1rem;
    font-size: 1.25rem;
}

.feature-title {
    font-family: 'Rajdhani', 'IBM Plex Sans Thai', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: .45rem;
    color: #fff;
}

.feature-desc {
    color: var(--text-dim);
    font-size: .88rem;
    line-height: 1.65;
}

/* 3D CAROUSEL */
#screenshots {
    background: var(--bg);
    overflow: hidden;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 3rem;
}

.carousel-scene {
    width: 100%;
    overflow: hidden;
    perspective: 1200px;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

.carousel-slide {
    min-width: calc(100% / 3);
    padding: 0 .6rem;
    transition: transform 0.5s, opacity 0.5s, filter 0.5s;
    transform: perspective(1200px) rotateY(0deg) scale(0.85);
    opacity: 0.5;
    filter: brightness(0.5);
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.carousel-slide.active {
    transform: perspective(1200px) rotateY(0deg) scale(1);
    opacity: 1;
    filter: brightness(1);
    z-index: 2;
}

.carousel-slide.prev {
    transform: perspective(1200px) rotateY(25deg) scale(0.88);
    opacity: 0.7;
    filter: brightness(0.65);
}

.carousel-slide.next {
    transform: perspective(1200px) rotateY(-25deg) scale(0.88);
    opacity: 0.7;
    filter: brightness(0.65);
}

.carousel-slide img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    display: block;
    background: var(--bg3);
}

.carousel-label {
    padding: .65rem 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    font-size: .82rem;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
    text-align: center;
}

.carousel-slide:hover {
    filter: brightness(0.9);
}

.carousel-slide.active:hover {
    filter: brightness(1.05);
}

/* Carousel Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text-dim);
    font-size: 1.2rem;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--purple);
    color: #fff;
    border-color: var(--purple);
    box-shadow: 0 0 20px var(--purple-glow);
}

.carousel-prev { left: 0; }
.carousel-next { right: 0; }

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: 1.5rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-faint);
    border: none;
    cursor: pointer;
    transition: background .3s, transform .3s, box-shadow .3s;
    padding: 0;
}

.carousel-dot.active {
    background: var(--purple);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--purple-glow);
}

/* LIGHTBOX */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s, visibility .35s;
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox-img {
    max-width: 85vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 14px;
    box-shadow: 0 0 60px rgba(220, 38, 38, 0.15);
    transform: scale(0.85);
    transition: transform .4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.lightbox.open .lightbox-img {
    transform: scale(1);
}

.lightbox-caption {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: .9rem;
    background: rgba(0, 0, 0, 0.6);
    padding: .4rem 1.2rem;
    border-radius: 999px;
    white-space: nowrap;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: var(--purple);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    transition: background .2s, border-color .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--purple);
    border-color: var(--purple);
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

@media (max-width: 768px) {
    .carousel-slide {
        min-width: 80%;
    }
    .carousel-slide.prev,
    .carousel-slide.next {
        transform: perspective(1200px) rotateY(0deg) scale(0.85);
    }
    .carousel-wrapper {
        padding: 0 2.5rem;
    }
    .lightbox-img {
        max-width: 95vw;
    }
}

/* PRICING */
#pricing {
    background: var(--bg2);
    text-align: center;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: start;
}

.pricing-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: left;
    position: relative;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.pricing-card:hover {
    border-color: var(--border-glow);
    box-shadow: 0 0 30px #dc262618;
    transform: translateY(-4px);
}

.pricing-featured {
    border-color: var(--purple);
    box-shadow: 0 0 40px #dc262620;
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--purple);
    color: #fff;
    padding: .25rem 1.2rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .05em;
    white-space: nowrap;
}

.pricing-tier {
    font-family: 'Ethnocentric', sans-serif;
    font-size: .75rem;
    letter-spacing: .15em;
    color: var(--text-faint);
    margin-bottom: .75rem;
}

.pricing-price {
    font-family: 'IBM Plex Sans Thai', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    margin-bottom: .15rem;
}

.pricing-currency {
    font-size: 1.5rem;
    vertical-align: super;
    margin-right: .15rem;
    color: var(--text-dim);
}

.pricing-period {
    font-size: .82rem;
    color: var(--text-faint);
    margin-bottom: 1rem;
}

.pricing-desc {
    font-size: .88rem;
    color: var(--text-dim);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.pricing-includes {
    font-size: .82rem;
    font-weight: 700;
    color: var(--purple-light);
    margin-bottom: .75rem;
}

.pricing-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    margin-bottom: 2rem;
}

.pricing-features li {
    font-size: .85rem;
    color: var(--text-dim);
    padding-left: 1.6rem;
    position: relative;
    line-height: 1.45;
}

.pricing-features li.included::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: 700;
    font-size: .85rem;
}

.pricing-features li.excluded::before {
    content: '✕';
    position: absolute;
    left: 0;
    color: var(--text-faint);
    font-weight: 700;
    font-size: .85rem;
}

.pricing-features li.excluded {
    color: var(--text-faint);
}

.pricing-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: .75rem 1.5rem;
    font-size: .9rem;
}

@media (max-width: 900px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
}

/* CHANGELOG */
#changelog {
    background: var(--bg);
}

.changelog-wrap {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.changelog-entry {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.changelog-dot-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: .3rem;
}

.changelog-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--purple);
    border: 2px solid var(--purple-light);
    flex-shrink: 0;
}

.changelog-entry:not(:last-child) .changelog-dot-col::after {
    content: '';
    width: 2px;
    flex: 1;
    min-height: 2rem;
    background: linear-gradient(var(--purple-dim), transparent);
    margin-top: 4px;
}

.changelog-body {
    flex: 1;
    padding-bottom: .5rem;
}

.changelog-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .6rem;
    flex-wrap: wrap;
}

.changelog-ver {
    font-family: 'JetBrains Mono', monospace;
    font-size: .9rem;
    font-weight: 600;
    color: var(--purple-light);
}

.changelog-badge-latest {
    padding: .15rem .55rem;
    background: var(--purple);
    color: #fff;
    border-radius: 4px;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.changelog-date {
    color: var(--text-faint);
    font-size: .8rem;
    font-family: 'JetBrains Mono', 'IBM Plex Sans Thai', monospace;
}

.changelog-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.changelog-list li {
    color: var(--text-dim);
    font-size: .88rem;
    padding-left: 1rem;
    position: relative;
}

.changelog-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--purple-light);
    font-size: .7rem;
    top: .1rem;
}

/* FOOTER */
footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.footer-logo {
    font-family: 'Ethnocentric', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: #fff;
    display: block;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--text-faint);
    text-decoration: none;
    font-size: .85rem;
    transition: color .2s;
}

.footer-links a:hover {
    color: var(--purple-light);
}

.footer-contact {
    color: var(--text-faint);
    font-size: .83rem;
    margin-bottom: .6rem;
}

.footer-contact strong {
    color: var(--text-dim);
}

.footer-copy {
    color: var(--text-faint);
    font-size: .78rem;
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
    }

    nav {
        padding: 0 1rem;
    }

    .hero {
        padding: 5rem 1rem 4rem;
    }

    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
}
