/* ==========================================
   ProsoftExpress — Refined Design System
   Inspired by Stripe, Linear, Vercel
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600;700;800;900&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --violet-50: #f5f3ff;
    --violet-100: #ede9fe;
    --violet-200: #ddd6fe;
    --violet-400: #a78bfa;
    --violet-500: #8b5cf6;
    --violet-600: #7c3aed;
    --violet-700: #6d28d9;
    --violet-900: #4c1d95;
    --violet-950: #2e1065;
    --emerald: #10b981;
    --sky: #0ea5e9;
    --rose: #f43f5e;
    --amber: #f59e0b;
    --line: #06C755;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;
    --radius: 16px;
    --radius-lg: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans Thai', -apple-system, system-ui, sans-serif;
    color: var(--slate-900);
    background: #fff;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 28px;
    position: relative;
}

/* ===== NAVIGATION ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    transition: all 0.3s ease;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 18px;
    color: var(--slate-900);
    letter-spacing: -0.3px;
}

.logo img {
    height: 32px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-500);
    transition: color 0.2s;
    letter-spacing: -0.1px;
}

.nav-links a:hover {
    color: var(--slate-900);
}

.nav-cta {
    background: var(--slate-900);
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s;
}

.nav-cta:hover {
    background: var(--violet-600);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--slate-800);
    cursor: pointer;
}

/* ===== HERO ===== */
.hero {
    padding: 140px 0 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle gradient backdrop */
.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 1200px;
    height: 800px;
    background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.08) 0%, rgba(14, 165, 233, 0.04) 40%, transparent 70%);
    pointer-events: none;
}

/* Fine grid */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, #000, transparent);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, #000, transparent);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--violet-600);
    background: var(--violet-50);
    border: 1px solid var(--violet-100);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 28px;
    letter-spacing: 0.2px;
}

.hero-eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--emerald);
    box-shadow: 0 0 6px var(--emerald);
}

.hero h1 {
    font-size: clamp(40px, 6vw, 72px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -2px;
    color: var(--slate-900);
    margin-bottom: 24px;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--violet-600), var(--sky), var(--emerald));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.hero-desc {
    font-size: 18px;
    color: var(--slate-500);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.8;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    letter-spacing: -0.2px;
}

.btn-dark {
    background: var(--slate-900);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-dark:hover {
    background: var(--violet-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25);
}

.btn-outline {
    background: #fff;
    color: var(--slate-800);
    border: 1px solid var(--slate-200);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-outline:hover {
    border-color: var(--slate-400);
    transform: translateY(-1px);
}

/* Hero visual: Browser mockup */
.hero-visual {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.browser-frame {
    background: var(--slate-900);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.08),
        0 8px 30px rgba(0, 0, 0, 0.12),
        0 30px 80px rgba(124, 58, 237, 0.08);
}

.browser-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.05);
}

.browser-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.browser-dot.r {
    background: #ff5f57;
}

.browser-dot.y {
    background: #febc2e;
}

.browser-dot.g {
    background: #28c840;
}

.browser-url {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 6px 14px;
    margin-left: 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    font-family: monospace;
}

.browser-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 0;
}

.browser-body img {
    width: 100%;
    height: auto;
}

/* ===== MARQUEE ===== */
.marquee {
    border-top: 1px solid var(--slate-100);
    border-bottom: 1px solid var(--slate-100);
    padding: 16px 0;
    overflow: hidden;
    background: var(--slate-50);
}

.marquee-inner {
    display: flex;
    gap: 40px;
    animation: marquee 30s linear infinite;
    width: max-content;
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-400);
    white-space: nowrap;
}

.marquee-item i {
    color: var(--violet-400);
    font-size: 16px;
}

@keyframes marquee {
    0% {
        transform: translateX(0)
    }

    100% {
        transform: translateX(-50%)
    }
}

/* ===== SECTIONS ===== */
.section {
    padding: 100px 0;
}

.section-gray {
    background: var(--slate-50);
}

.section-header {
    margin-bottom: 64px;
}

.section-header.center {
    text-align: center;
}

.section-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--violet-600);
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 900;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 16px;
    color: var(--slate-900);
}

.section-header p {
    font-size: 17px;
    color: var(--slate-500);
    max-width: 480px;
    line-height: 1.7;
}

.section-header.center p {
    margin: 0 auto;
}

/* ===== SOLUTIONS BENTO ===== */
.bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 12px;
}

.bento-item {
    background: #fff;
    border: 1px solid var(--slate-100);
    border-radius: var(--radius);
    padding: 28px 20px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.bento-item:hover {
    border-color: var(--violet-200);
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.06);
    transform: translateY(-2px);
}

/* Featured = 2 cols, horizontal layout */
.bento-wide {
    grid-column: span 2;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 32px 28px;
    background: linear-gradient(135deg, var(--violet-50), #fff 60%);
}

.bento-wide .icon {
    flex-shrink: 0;
}

.bento-wide h3 {
    font-size: 16px;
}

.bento-wide p {
    font-size: 14px;
}

.icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

.bento-wide .icon {
    width: 52px;
    height: 52px;
    font-size: 22px;
    margin-bottom: 0;
}

.ic-v {
    background: var(--violet-600);
}

.ic-b {
    background: var(--sky);
}

.ic-g {
    background: var(--emerald);
}

.ic-r {
    background: var(--rose);
}

.ic-a {
    background: var(--amber);
}

.ic-i {
    background: #6366f1;
}

.ic-l {
    background: var(--line);
}

.ic-s {
    background: var(--slate-800);
}

.bento-item h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.bento-item p {
    font-size: 13px;
    color: var(--slate-500);
    line-height: 1.5;
}

.new-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--violet-600);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 1px;
}

/* ===== STATS ===== */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 80px;
    padding: 80px 0;
    border-top: 1px solid var(--slate-100);
    border-bottom: 1px solid var(--slate-100);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 56px;
    font-weight: 900;
    letter-spacing: -3px;
    color: var(--slate-900);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--slate-400);
    margin-top: 8px;
    font-weight: 500;
}

/* ===== PORTFOLIO ===== */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.portfolio-card {
    border: 1px solid var(--slate-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s;
    background: #fff;
}

.portfolio-card:hover {
    border-color: var(--violet-200);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.06);
    transform: translateY(-4px);
}

.portfolio-visual {
    height: 200px;
    position: relative;
    overflow: hidden;
}

.portfolio-gradient {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.4s;
}

.portfolio-card:hover .portfolio-gradient {
    transform: scale(1.03);
}

.pg-1 {
    background: linear-gradient(135deg, var(--violet-600), var(--violet-900));
}

.pg-2 {
    background: linear-gradient(135deg, var(--emerald), var(--sky));
}

.portfolio-gradient .emoji {
    font-size: 40px;
}

.portfolio-gradient .name {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}

.portfolio-info {
    padding: 28px;
}

.portfolio-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--violet-600);
    background: var(--violet-50);
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portfolio-info h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.portfolio-info p {
    font-size: 14px;
    color: var(--slate-500);
    margin-bottom: 16px;
    line-height: 1.6;
}

.portfolio-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--violet-600);
    transition: gap 0.2s;
}

.portfolio-link:hover {
    gap: 10px;
}

/* ===== CONTACT ===== */
.contact-section {
    background: var(--slate-950);
    color: #fff;
    padding: 100px 0;
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(124, 58, 237, 0.15), transparent 70%);
    pointer-events: none;
}

.contact-section .section-tag {
    color: var(--violet-400);
}

.contact-section .section-header h2 {
    color: #fff;
}

.contact-section .section-header p {
    color: var(--slate-400);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 48px;
}

.contact-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    padding: 28px 16px;
    text-align: center;
    transition: all 0.2s;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.contact-card i {
    font-size: 24px;
    margin-bottom: 12px;
    display: block;
    color: var(--violet-400);
}

.contact-card .label {
    font-size: 11px;
    color: var(--slate-400);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-card .value {
    font-size: 14px;
    font-weight: 700;
}

.contact-card .value a {
    color: #fff;
}

.contact-cta {
    text-align: center;
}

.btn-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--line);
    color: #fff;
    padding: 16px 44px;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    box-shadow: 0 4px 20px rgba(6, 199, 85, 0.25);
}

.btn-line:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(6, 199, 85, 0.35);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--slate-950);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--slate-500);
    padding: 28px 0;
    text-align: center;
    font-size: 13px;
}

/* ===== TABLET ===== */
@media (max-width: 1024px) {
    .bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-wide {
        grid-column: span 2;
    }

    .stats-bar {
        gap: 40px;
        padding: 60px 28px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .stat-number {
        font-size: 44px;
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 20px;
        gap: 14px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    }

    .hero {
        padding: 110px 0 60px;
    }

    .hero h1 {
        font-size: clamp(32px, 8vw, 48px);
        letter-spacing: -1px;
    }

    .hero-desc {
        font-size: 16px;
        line-height: 1.7;
    }

    .hero-visual {
        margin: 0 -10px;
    }

    .browser-frame {
        border-radius: 16px;
    }

    .section {
        padding: 72px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-header h2 {
        font-size: clamp(26px, 6vw, 36px);
    }

    .bento {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .bento-wide {
        grid-column: span 2;
    }

    .bento-item {
        padding: 20px 16px;
    }

    .bento-wide {
        padding: 24px 20px;
    }

    .stats-bar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 32px 20px;
        padding: 56px 28px;
    }

    .stat-number {
        font-size: 36px;
        letter-spacing: -2px;
    }

    .stat-label {
        font-size: 13px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .portfolio-info {
        padding: 20px;
    }

    .portfolio-info h3 {
        font-size: 16px;
    }

    .contact-section {
        padding: 72px 0;
    }

    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .contact-card {
        padding: 20px 12px;
    }

    .contact-card .value {
        font-size: 12px;
        word-break: break-all;
    }

    .btn-line {
        padding: 14px 32px;
        font-size: 15px;
    }
}

/* ===== SMALL MOBILE ===== */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 100px 0 48px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        margin-bottom: 40px;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-visual {
        margin: 0 -16px;
    }

    .bento {
        grid-template-columns: 1fr;
    }

    .bento-wide {
        grid-column: span 1;
        flex-direction: column;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 16px;
        padding: 48px 20px;
    }

    .stat-number {
        font-size: 32px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-card .value {
        font-size: 13px;
        word-break: normal;
    }

    .section {
        padding: 56px 0;
    }

    .section-header {
        margin-bottom: 32px;
    }
}

/* ===== REVEAL ===== */
.rv {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.rv.vis {
    opacity: 1;
    transform: translateY(0);
}