/* ============================================
   เครดิตทรัสต์ - หน้าหลัก (index.html)
   ============================================ */

:root {
    --color-bg-dark: #1a1a2e;
    --color-bg-mid: #16213e;
    --color-primary: #4a2c7a;
    --color-primary-light: #6b4ba8;
    --color-accent: #e6b800;
    --color-accent-light: #f5d547;
    --color-success: #2ecc71;
    --color-text: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.85);
    --color-text-soft: rgba(255, 255, 255, 0.7);
    --font-thai: 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-thai);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: linear-gradient(165deg, var(--color-bg-dark) 0%, var(--color-bg-mid) 45%, var(--color-primary) 100%);
    min-height: 100vh;
}
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(26, 26, 46, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--color-text); font-weight: 700; font-size: 1.2rem; }
.logo-img { width: 40px; height: 40px; object-fit: contain; }
.logo-text { letter-spacing: 0.02em; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav-link { color: var(--color-text-muted); text-decoration: none; font-weight: 500; transition: color var(--transition); }
.nav-link:hover, .nav-link.active { color: var(--color-accent); }
.btn-mobile-menu { display: none; background: none; border: none; color: var(--color-text); font-size: 1.5rem; cursor: pointer; padding: 8px; }

/* Buttons */
.btn {
    display: inline-block; padding: 12px 24px; border-radius: var(--radius);
    font-family: var(--font-thai); font-weight: 600; font-size: 1rem; text-decoration: none; text-align: center;
    transition: transform var(--transition), box-shadow var(--transition); cursor: pointer; border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%); color: #1a1a2e; border-color: var(--color-accent); }
.btn-primary:hover { box-shadow: 0 8px 24px rgba(230, 184, 0, 0.4); }
.btn-outline { background: transparent; color: var(--color-text); border-color: rgba(255, 255, 255, 0.5); }
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-secondary { background: var(--color-primary-light); color: var(--color-text); }
.btn-secondary:hover { box-shadow: 0 8px 24px rgba(107, 75, 168, 0.4); }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }

/* Hero */
.hero { position: relative; padding: 120px 0 80px; overflow: hidden; }
.hero-bg-coins { position: absolute; inset: 0; pointer-events: none;
    background-image: radial-gradient(circle at 15% 30%, rgba(230, 184, 0, 0.12) 0%, transparent 40%), radial-gradient(circle at 85% 60%, rgba(230, 184, 0, 0.08) 0%, transparent 35%);
}
.hero-bg-coins.light { background-image: radial-gradient(circle at 20% 50%, rgba(230, 184, 0, 0.15) 0%, transparent 45%); }
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.hero-title { font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; line-height: 1.2; margin: 0 0 8px 0; letter-spacing: 0.02em; }
.hero-sub { color: var(--color-accent); display: block; }
.hero-tagline { font-size: 1.25rem; color: var(--color-accent); font-weight: 600; margin: 0 0 16px 0; }
.hero-desc { color: var(--color-text-muted); margin: 0 0 28px 0; max-width: 480px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-visual { display: flex; justify-content: center; align-items: center; }
.hero-phone { max-width: 100%; width: 320px; height: auto; filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.35)); }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: rgba(255, 255, 255, 0.04); }
.section-title { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 700; margin: 0 0 32px 0; text-align: center; color: var(--color-text); }

.intro { padding: 48px 0; }
.intro-text { text-align: center; max-width: 800px; margin: 0 auto; color: var(--color-text-soft); font-size: 1.05rem; }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.feature-card {
    background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg); padding: 28px;
    transition: transform var(--transition), border-color var(--transition);
}
.feature-card:hover { transform: translateY(-4px); border-color: rgba(230, 184, 0, 0.3); }
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.15rem; font-weight: 600; margin: 0 0 8px 0; color: var(--color-text); }
.feature-card p { margin: 0; color: var(--color-text-soft); font-size: 0.95rem; }

/* App preview */
.app-preview-row { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.app-preview-row.reverse { direction: rtl; }
.app-preview-row.reverse > * { direction: ltr; }
.app-preview-content .section-title { text-align: left; margin-bottom: 16px; }
.app-preview-desc { color: var(--color-text-soft); margin: 0 0 20px 0; }
.app-preview-visual { display: flex; justify-content: center; align-items: center; }
.app-phone { max-width: 100%; width: 280px; height: auto; border-radius: 24px; box-shadow: var(--shadow); }

/* Product summary */
.product-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 36px; }
.product-card { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius-lg); padding: 28px; text-align: center; }
.product-label { display: block; font-size: 0.85rem; color: var(--color-accent); font-weight: 600; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; }
.product-value { font-size: 1.35rem; font-weight: 700; margin: 0 0 4px 0; }
.product-note { margin: 0; font-size: 0.9rem; color: var(--color-text-soft); }
.product-cta { text-align: center; }

/* CTA */
.cta { position: relative; padding: 80px 0; text-align: center; overflow: hidden; }
.cta-inner { position: relative; z-index: 1; }
.cta-title { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; margin: 0 0 12px 0; }
.cta-desc { color: var(--color-text-muted); margin: 0 0 28px 0; font-size: 1.1rem; }

/* Footer */
.footer { background: rgba(0, 0, 0, 0.25); padding: 48px 0 24px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-logo { width: 48px; height: 48px; object-fit: contain; margin-bottom: 8px; }
.footer-app-name { font-weight: 700; font-size: 1.1rem; margin: 0 0 4px 0; }
.footer-tagline { color: var(--color-text-soft); font-size: 0.9rem; margin: 0; }
.footer-block h4 { font-size: 0.9rem; font-weight: 600; color: var(--color-accent); margin: 0 0 12px 0; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-block p { margin: 0 0 6px 0; font-size: 0.9rem; color: var(--color-text-soft); }
.footer-link { color: var(--color-text-soft); text-decoration: none; }
.footer-link:hover { text-decoration: underline; }
.footer-bottom { padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.08); text-align: center; }
.footer-bottom p { margin: 0; font-size: 0.85rem; color: var(--color-text-soft); }

@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-desc { margin-left: auto; margin-right: auto; }
    .hero-cta { justify-content: center; }
    .app-preview-row, .app-preview-row.reverse { grid-template-columns: 1fr; direction: ltr; }
    .app-preview-content .section-title { text-align: center; }
    .app-preview-content { text-align: center; }
    .app-preview-content .btn { margin: 0 auto; }
    .product-cards { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-brand { display: flex; flex-direction: column; align-items: center; }
}
@media (max-width: 768px) {
    .nav { position: fixed; top: 64px; left: 0; right: 0; background: var(--color-bg-dark); flex-direction: column; padding: 24px; gap: 16px; transform: translateY(-120%); transition: transform 0.3s ease; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
    .nav.open { transform: translateY(0); }
    .btn-mobile-menu { display: block; }
    .section { padding: 48px 0; }
    .hero { padding: 100px 0 60px; }
    .hero-phone, .app-phone { width: 260px; }
}
