@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════ */
:root {
    --red: #ff0000;
    --red-bright: #ff3333;
    --red-deep: #cc0000;
    --bg: #ffffff;
    --text: #ff0000;
    --subtext: #1a1a2e;
    --border: rgba(255, 0, 0, 0.15);
    --btn-text: #ffffff;
    --status-bg: rgba(255, 255, 255, 0.6);
    --status-hover-bg: #ff0000;
    --status-hover-text: #ffffff;
    --card-glass: rgba(255, 255, 255, 0.55);
    --card-glass-border: rgba(255, 255, 255, 0.6);
    --glow-color: rgba(255, 0, 0, 0.08);
    --glow-hero: rgba(255, 0, 0, 0.06);
    --noise-opacity: 0.03;
    --footer-gradient: linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.3), transparent);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #000000;
        --text: #ff3333;
        --subtext: #b0b0c0;
        --border: rgba(255, 50, 50, 0.12);
        --status-bg: rgba(18, 18, 24, 0.7);
        --status-hover-bg: #cc0000;
        --card-glass: rgba(20, 20, 30, 0.6);
        --card-glass-border: rgba(255, 255, 255, 0.08);
        --glow-color: rgba(255, 0, 0, 0.06);
        --glow-hero: rgba(255, 0, 0, 0.08);
        --noise-opacity: 0.04;
        --footer-gradient: linear-gradient(90deg, transparent, rgba(255, 60, 60, 0.25), transparent);
    }
}

/* ═══════════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════════ */
body {
    font-family: "Inter", "IBM Plex Sans Thai", sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    transition: background-color 0.4s ease;
}

/* Subtle noise overlay for depth */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: var(--noise-opacity);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 200px 200px;
}

/* ═══════════════════════════════════════════════
   HERO — INTRO
   ═══════════════════════════════════════════════ */
.intro {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    z-index: 1;
    overflow: hidden;
}

/* Hero ambient glow */
.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow-hero) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    pointer-events: none;
    z-index: -1;
    animation: pulseGlow 6s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        opacity: 0.6;
        transform: translate(-50%, -55%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -55%) scale(1.15);
    }
}

/* Secondary glow orb */
.hero-glow-2 {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 60, 60, 0.04) 0%, transparent 70%);
    top: 20%;
    right: -100px;
    pointer-events: none;
    z-index: -1;
    animation: pulseGlow2 8s ease-in-out infinite;
}

@keyframes pulseGlow2 {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* ═══════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════ */
.intro h1 {
    font-family: "Chillax-Variable", "IBM Plex Sans Thai", sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.intro h2 {
    font-family: "Chillax-Variable", "IBM Plex Sans Thai", sans-serif;
    font-size: clamp(2.8rem, 7vw, 5rem);
    line-height: 1.05;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.plus-mark {
    font-style: italic;
    font-weight: 800;
    background: linear-gradient(135deg, var(--red), #ff6644);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.25rem;
    max-width: 500px;
    margin: 0 auto 3rem;
    font-weight: 400;
    color: var(--subtext);
    line-height: 1.7;
}

/* ═══════════════════════════════════════════════
   CTA BUTTON — GLOW + PULSE
   ═══════════════════════════════════════════════ */
.btn-solid {
    display: inline-block;
    background: linear-gradient(135deg, var(--red), var(--red-bright));
    color: var(--btn-text);
    padding: 1.2rem 3.2rem;
    border-radius: 60px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 0.5px;
    border: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(255, 0, 0, 0.25);
}

.btn-solid:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 35px rgba(255, 0, 0, 0.4);
}

/* Shimmer sweep on hover */
.btn-solid::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent 30%,
            rgba(255, 255, 255, 0.25) 50%,
            transparent 70%);
    transition: left 0.6s ease;
}

.btn-solid:hover::after {
    left: 100%;
}

/* ═══════════════════════════════════════════════
   FEATURES — GLASSMORPHISM CARDS
   ═══════════════════════════════════════════════ */
.features {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Gradient divider instead of solid border */
.features::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    height: 1px;
    background: var(--footer-gradient);
}

.grid-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-item {
    background: var(--card-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-glass-border);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.4s ease;
    position: relative;
    overflow: hidden;
}

/* Hover glow underlay */
.feature-item::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    background: radial-gradient(ellipse at 50% 0%,
            var(--glow-color) 0%,
            transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(255, 0, 0, 0.08);
    border-color: rgba(255, 0, 0, 0.25);
}

.feature-item:hover::before {
    opacity: 1;
}

.feature-item h3 {
    font-family: "Chillax-Variable", "IBM Plex Sans Thai", sans-serif;
    font-size: 1.6rem;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
    position: relative;
}

.feature-item p {
    font-size: 1.05rem;
    color: var(--subtext);
    opacity: 0.85;
    line-height: 1.6;
    position: relative;
}

.feature-item .num {
    font-family: "Chillax-Variable", "IBM Plex Sans Thai", sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    opacity: 0.08;
    line-height: 1;
    margin-bottom: 0.5rem;
    display: block;
}

/* ═══════════════════════════════════════════════
   STATUS SECTION — GLASSMORPHIC
   ═══════════════════════════════════════════════ */
.status-section {
    padding: 4rem 2rem 8rem;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.status-box {
    background: var(--card-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-glass-border);
    padding: 3rem;
    border-radius: 28px;
    text-align: center;
    max-width: 600px;
    width: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.4s ease;
}

.status-box:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(255, 0, 0, 0.1);
    background: var(--status-hover-bg);
    color: var(--status-hover-text);
}

.status-box:hover p,
.status-box:hover .thai-font {
    color: var(--status-hover-text);
}

.status-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--red);
    animation: livePulse 2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

@keyframes livePulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
    }

    50% {
        opacity: 0.5;
        box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
    }
}

.status-msg {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    color: var(--subtext);
    line-height: 1.6;
}

.thai-font {
    font-family: "Inter", "IBM Plex Sans Thai", sans-serif;
    font-weight: 500;
    color: var(--subtext);
}

.link-arrow {
    text-decoration: none;
    color: var(--red);
    font-weight: 600;
    position: relative;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding-bottom: 4px;
    transition: color 0.3s ease;
}

.link-arrow::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--red), var(--red-bright));
    transform: scaleX(0.5);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.link-arrow:hover::after {
    transform: scaleX(1);
}

.status-box:hover .link-arrow {
    color: #fff;
}

.status-box:hover .link-arrow::after {
    background: #fff;
}

/* ═══════════════════════════════════════════════
   CAMPAIGN ENDED BADGE
   ═══════════════════════════════════════════════ */
.ended-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--card-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--card-glass-border);
    border-radius: 50px;
    padding: 0.6rem 1.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--subtext);
    margin-bottom: 2rem;
}

.ended-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--subtext);
    opacity: 0.5;
}

/* ═══════════════════════════════════════════════
   FOOTER — MODERN
   ═══════════════════════════════════════════════ */
footer {
    margin-top: auto;
    padding: 2.5rem 2rem;
    text-align: center;
    font-family: "Chillax-Variable", "IBM Plex Sans Thai", sans-serif;
    position: relative;
    z-index: 1;
}

/* Gradient divider */
footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    height: 1px;
    background: var(--footer-gradient);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright {
    color: var(--subtext);
    opacity: 0.6;
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--subtext);
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    opacity: 0.6;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--red);
}

/* ═══════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

/* Scroll-driven animation (elements start hidden, revealed by IntersectionObserver) */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays (applied per element via data-delay attribute) */
[data-animate][data-delay="1"] {
    transition-delay: 0.1s;
}

[data-animate][data-delay="2"] {
    transition-delay: 0.2s;
}

[data-animate][data-delay="3"] {
    transition-delay: 0.3s;
}

.delay-1 {
    animation-delay: 0.15s;
}

.delay-2 {
    animation-delay: 0.3s;
}

.delay-3 {
    animation-delay: 0.45s;
}

/* Legacy compat */
.slide-up {
    animation: fadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════ */
@media (max-width: 700px) {
    .intro {
        min-height: 80vh;
        padding: 6rem 1.5rem 3rem;
    }

    .intro h2 {
        font-size: clamp(2.2rem, 10vw, 3.5rem);
    }

    .hero-glow {
        width: 350px;
        height: 350px;
    }

    .hero-glow-2 {
        display: none;
    }

    .grid-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-item {
        padding: 2rem 1.5rem;
    }

    .status-box {
        padding: 2rem 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links a {
        margin-left: 0;
        margin: 0 0.75rem;
    }
}