/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #08090c;
    --bg-card: #0e1015;
    --bg-card-hover: #14161e;
    --bg-alt: #0b0c10;
    --text: #e8e4df;
    --text-muted: #8a8680;
    --gold: #c9a84c;
    --gold-light: #dfc071;
    --gold-glow: rgba(201, 168, 76, 0.1);
    --gold-border: rgba(201, 168, 76, 0.2);
    --accent2: #c9a84c;
    --border: rgba(255,255,255,0.04);
    --border-gold: rgba(201, 168, 76, 0.15);
    --radius: 2px;
    --font-body: 'DM Sans', 'Anuphan', 'Noto Sans Thai', -apple-system, sans-serif;
    --font-display: 'DM Sans', 'Anuphan', 'Noto Sans Thai', -apple-system, sans-serif;
    /* ===== Premium motion identity (motion-design skill) ===== */
    --ease-premium: cubic-bezier(0.4, 0, 0.2, 1);     /* signature curve — 80% of motion */
    --ease-emphasized: cubic-bezier(0.05, 0.7, 0.1, 1); /* entrances / attention */
    --dur-quick: 0.18s;   /* hover, feedback */
    --dur-std: 0.4s;      /* cards, panels */
    --dur-slow: 0.6s;     /* hero, reveals */
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; transition: 0.4s; }
a:hover { color: var(--gold-light); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

section { padding: 120px 0; }

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 24px 0;
    transition: all 0.5s;
    background: transparent;
}
.navbar.scrolled {
    /* no backdrop-filter here: it turns the navbar into the containing block
       for the position:fixed mobile menu (.nav-links) and the overlay breaks */
    background: rgba(8, 9, 12, 0.97);
    padding: 14px 0;
    border-bottom: 1px solid var(--border-gold);
}
.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}
.nav-logo {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-logo-img {
    height: 32px;
    width: auto;
}
.nav-logo span { color: var(--gold); }
.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
}
.nav-links a {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: 0.4s;
}
.nav-links a:hover { color: var(--gold); }
.lang-toggle {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: var(--font-body);
    margin-left: 1rem;
}
.lang-toggle:hover {
    background: var(--gold);
    color: var(--bg);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--gold);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse at 70% 20%, rgba(201, 168, 76, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 30% 80%, rgba(201, 168, 76, 0.02) 0%, transparent 50%);
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10%;
    width: 1px;
    height: 200px;
    background: linear-gradient(to bottom, transparent, var(--gold-border), transparent);
    transform: translateY(-50%);
}
.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.hero-centered {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0;
}
.hero-centered .hero-text .eyebrow {
    justify-content: center;
}
.hero-centered .hero-text .eyebrow::before { display: none; }
.hero-centered .hero-text p {
    margin-left: auto;
    margin-right: auto;
}
.hero-centered .hero-buttons {
    justify-content: center;
}
.hero-logo-center {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}
.hero-logo-center .hero-logo {
    width: 120px;
    max-width: 120px;
}
.hero-text .eyebrow {
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.hero-text .eyebrow::before {
    content: '';
    width: 40px;
    height: 1px;
    background: var(--gold);
}
.hero-text h1 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 32px;
    letter-spacing: -1px;
}
.hero-text h1 .gradient {
    font-weight: 600;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-text p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 48px;
    max-width: 440px;
    line-height: 1.9;
}
.hero-buttons { display: flex; gap: 20px; flex-wrap: wrap; }
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 40px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: background var(--dur-std) var(--ease-premium),
                color var(--dur-std) var(--ease-premium),
                border-color var(--dur-std) var(--ease-premium),
                transform var(--dur-quick) var(--ease-premium),
                box-shadow var(--dur-std) var(--ease-premium);
    font-family: var(--font-body);
}
.btn:active { transform: translateY(0) scale(0.97); } /* tactile press feedback */
.btn-primary {
    background: var(--gold);
    color: #08090c;
    border-radius: 0;
}
.btn-primary:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(201, 168, 76, 0.25);
    color: #08090c;
}
.btn-outline {
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold-border);
    border-radius: 0;
}
.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold-light);
    background: var(--gold-glow);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(201, 168, 76, 0.12);
}
.hero-image { display: flex; justify-content: center; }
.hero-photo {
    width: 380px;
    height: 460px;
    object-fit: cover;
    border: 1px solid var(--border-gold);
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    border-radius: 0;
}
.hero-logo {
    width: 100%;
    max-width: 250px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(200, 170, 110, 0.3));
}
.hero-image {
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-visual-stack {
    position: relative;
    width: 380px;
    height: 420px;
    flex-shrink: 0;
}
.hv-main {
    width: 380px;
    height: 420px;
    object-fit: cover;
    object-position: top;
    border-radius: 4px;
    border: 1px solid var(--border-gold);
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    display: block;
}
.hv-thumb {
    position: absolute;
    width: 160px;
    height: 100px;
    object-fit: cover;
    object-position: top;
    border-radius: 4px;
    border: 1px solid var(--accent-gold);
    box-shadow: 0 12px 32px rgba(0,0,0,0.6);
    display: block;
}
.hv-thumb-tl {
    top: -24px;
    left: -40px;
    transform: rotate(-4deg);
    opacity: 0.85;
}
.hv-thumb-br {
    bottom: -24px;
    right: -40px;
    transform: rotate(3deg);
    opacity: 0.85;
}
@media (max-width: 768px) {
    .hero-visual-stack { width: 260px; height: 290px; }
    .hv-main { width: 260px; height: 290px; }
    .hv-thumb { width: 120px; height: 75px; }
    .hv-thumb-tl { top: -16px; left: -20px; }
    .hv-thumb-br { bottom: -16px; right: -20px; }
}

.hero-photo-placeholder {
    width: 340px;
    height: 420px;
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-alt) 100%);
    border: 1px solid var(--border-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 8rem;
    font-weight: 600;
    color: var(--gold);
    opacity: 0.6;
    border-radius: 0;
    position: relative;
}
.hero-photo-placeholder::after {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid var(--border-gold);
}

/* ===== STATS ===== */
.stats {
    padding: 60px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}
.stat-item .stat-number {
    font-family: var(--font-body);
    font-size: 3rem;
    font-weight: 600;
    color: var(--gold);
    -webkit-text-fill-color: var(--gold);
    background: none;
    letter-spacing: -1px;
}
.stat-item .stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    text-align: center;
    margin-bottom: 80px;
}
.section-header .eyebrow {
    color: var(--gold);
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 400;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}
.section-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Decorative line under section headers */
.section-header h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 1px;
    background: var(--gold);
    margin: 20px auto 0;
}

/* ===== ABOUT ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}
.about-content h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 400;
    margin-bottom: 24px;
    font-weight: 600;
}
.about-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.92rem;
    line-height: 1.9;
}
.about-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
}
.tag {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--border-gold);
    border-radius: 0;
    font-size: 0.7rem;
    color: var(--gold);
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: 0.3s;
}
.tag:hover {
    background: var(--gold-glow);
    border-color: var(--gold);
}

/* Journey */
.journey-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border);
}
.journey-card {
    background: var(--bg-card);
    border: none;
    border-radius: 0;
    padding: 40px;
    transition: all 0.4s;
}
.journey-card:hover {
    background: var(--bg-card-hover);
}
.journey-card .card-icon {
    font-size: 1.5rem;
    margin-bottom: 20px;
    opacity: 0.7;
}
.journey-card h4 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--text);
    font-weight: 400;
    font-weight: 600;
}
.journey-card ul { list-style: none; }
.journey-card li {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    line-height: 1.6;
}
.journey-card li:last-child { border-bottom: none; }
.journey-card li strong { color: var(--gold-light); font-weight: 500; }

/* ===== PORTFOLIO ===== */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 10px 28px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.4s;
    font-family: var(--font-body);
}
.filter-btn:hover, .filter-btn.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #08090c;
}
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1px;
    background: var(--border);
}
a.portfolio-card {
    text-decoration: none;
    color: inherit;
    display: block;
}
.portfolio-card {
    background: var(--bg-card);
    border: none;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.5s;
}
.portfolio-card:hover {
    background: var(--bg-card-hover);
    transform: none;
    box-shadow: none;
}
.portfolio-card:hover .card-body h3 { color: var(--gold); }
.card-preview {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
    opacity: 0.85;
    transition: 0.5s;
}
.portfolio-card:hover .card-preview { opacity: 1; }
.card-preview img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 28px 32px; }
.card-body .card-category {
    font-size: 0.65rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 400;
    margin-bottom: 10px;
}
.card-body h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 10px;
    transition: 0.3s;
}
.card-body p {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.7;
}
.card-tech {
    padding: 16px 32px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tech-tag {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Gradient backgrounds — dark moody tones */
.gradient-1 { background: linear-gradient(180deg, #110e1f, #1a1530); }
.gradient-2 { background: linear-gradient(180deg, #0d1520, #152535); }
.gradient-3 { background: linear-gradient(180deg, #0f1a0f, #1a2e1a); }
.gradient-4 { background: linear-gradient(180deg, #1a0f0f, #2e1a1a); }
.gradient-5 { background: linear-gradient(180deg, #0f0f1a, #1a1a2e); }
.gradient-6 { background: linear-gradient(180deg, #1a180f, #2e2a1a); }
.gradient-7 { background: linear-gradient(180deg, #0f1a1a, #1a2e2e); }
.gradient-8 { background: linear-gradient(180deg, #1a0f1a, #2e1a2e); }
.gradient-9 { background: linear-gradient(180deg, #0f1318, #1a2530); }
.gradient-10 { background: linear-gradient(180deg, #18150f, #302a1a); }

/* ===== SERVICES / SaaS ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1px;
    background: var(--border);
}
.service-card {
    background: var(--bg-card);
    border: none;
    border-radius: 0;
    padding: 48px 36px;
    text-align: center;
    transition: all 0.4s;
}
.service-card:hover {
    background: var(--bg-card-hover);
}
.service-card .service-icon {
    font-size: 2rem;
    margin-bottom: 20px;
    opacity: 0.7;
}
.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 400;
    margin-bottom: 12px;
    font-weight: 600;
}
.service-card p {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.8;
}

/* ===== PRICING ===== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1px;
    background: var(--border);
    max-width: 1100px;
    margin: 0 auto;
}
.pricing-card {
    background: var(--bg-card);
    border: none;
    border-radius: 0;
    padding: 48px 36px;
    text-align: center;
    transition: all 0.4s;
    position: relative;
}
.pricing-card.featured {
    background: var(--bg-card-hover);
    border: none;
    box-shadow: none;
    transform: none;
}
.pricing-card.featured::before {
    content: 'RECOMMENDED';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--gold);
    color: #08090c;
    padding: 6px 20px;
    border-radius: 0;
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 4px;
}
.pricing-card h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 400;
    margin-bottom: 8px;
    font-weight: 600;
}
.pricing-card .price { margin: 28px 0; }
.pricing-card .price-amount {
    font-family: var(--font-body);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: -0.5px;
}
.pricing-card .price-currency {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    vertical-align: super;
}
.pricing-card .price-period {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 1px;
}
.pricing-card .price-sub {
    text-align: center;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    margin: -8px 0 8px;
}
.pricing-note {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 1.5rem;
    font-weight: 600;
}
.pricing-card .price-desc {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 28px;
    letter-spacing: 1px;
}
.pricing-card ul {
    list-style: none;
    text-align: left;
    margin-bottom: 36px;
}
.pricing-card li {
    padding: 10px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.pricing-card li::before {
    content: '\2014';
    color: var(--gold);
    font-weight: 400;
    flex-shrink: 0;
}
.pricing-card li:last-child { border-bottom: none; }
.pricing-card .btn { width: 100%; justify-content: center; }

/* 5-col website pricing */
.pricing-grid-5 {
    max-width: 1400px;
    grid-template-columns: repeat(5, 1fr);
}
.pricing-grid-5 .pricing-card {
    padding: 36px 24px;
}
.pricing-grid-5 .pricing-card .price-amount {
    font-size: 2rem;
}

/* Add-on section */
.addon-section {
    max-width: 1100px;
    margin: 3rem auto 0;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
}
.addon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.addon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}
.addon-item strong {
    color: var(--text);
    font-size: 0.9rem;
}
.addon-item span {
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 1rem;
}

/* ===== CONTACT ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}
.contact-info h3 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 16px;
    font-weight: 600;
}
.contact-info > p {
    color: var(--text-muted);
    margin-bottom: 40px;
    font-size: 0.92rem;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}
.contact-item:last-child { border-bottom: none; }
.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 0;
    border: 1px solid var(--border-gold);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.contact-item .label {
    font-size: 0.65rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 3px;
}
.contact-item .value {
    font-size: 1rem;
    color: var(--text);
    margin-top: 4px;
}
.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 48px;
}
.form-group { margin-bottom: 24px; }
.form-group label {
    display: block;
    font-size: 0.65rem;
    color: var(--gold);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 3px;
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: 0.4s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--gold);
    box-shadow: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.15); }
.form-group textarea { min-height: 100px; resize: vertical; }

/* ===== FOOTER ===== */
.footer {
    padding: 48px 0;
    border-top: 1px solid var(--border);
    text-align: center;
}
.footer p {
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ===== ANIMATIONS =====
   Reveal ถูก gate ใต้ .js-cine (ใส่โดยสคริปต์ใน <head> เมื่อ JS ทำงาน + ไม่ reduced-motion)
   → default คือมองเห็นครบ: no-JS / บอท / screenshot ไม่มีทางเจอหน้าโล่ง */
.js-cine .fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--stagger, 0ms); /* set per-item by main.js for cascade */
}
.js-cine .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
/* การ์ดผลงาน: เผยแบบยกฟิล์มขึ้นมอง (translate + scale) */
.js-cine .featured-card.fade-in {
    transform: translateY(42px) scale(0.97);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--stagger, 0ms);
}
.js-cine .featured-card.fade-in.visible { transform: translateY(0) scale(1); }

/* ===== CERTIFICATES ===== */
.cert-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}
.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s;
    width: 220px;
    flex-shrink: 1;
}
.cert-card:hover {
    transform: translateY(-3px);
    border-color: var(--gold);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.cert-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 220 / 160;
    display: block;
    object-fit: cover;
}
.cert-label {
    padding: 0.6rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .container { padding: 0 24px; }
    .nav-inner { padding: 0 24px; }
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-text .eyebrow { justify-content: center; }
    .hero-text .eyebrow::before { display: none; }
    .hero-text p { margin: 0 auto 40px; }
    .hero-buttons { justify-content: center; }
    .hero-image { order: -1; }
    .hero-photo, .hero-photo-placeholder { width: 260px; height: 320px; }
    .hero-logo-center .hero-logo { width: 100px; max-width: 100px; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .journey-grid { grid-template-columns: 1fr; }
    .pricing-grid-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    section { padding: 80px 0; }
    .nav-links {
        display: none;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: #08090c;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 28px;
    }
    .nav-links.active { display: flex; }
    .nav-links a { font-size: 1rem; letter-spacing: 4px; }
    .menu-toggle { display: block; z-index: 1001; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .pricing-grid-5 { grid-template-columns: 1fr; }
    .pricing-card.featured { transform: none; }
    .cert-grid { gap: 12px; padding: 0 12px; }
    .cert-card { width: calc(50% - 6px); min-width: 0; }
    .cert-card img { width: 100%; height: auto; aspect-ratio: 220 / 160; }
    .cert-label { font-size: 0.7rem; padding: 0.4rem; }
    .addon-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== GALLERY CARD ===== */
.gallery-card {
    grid-column: 1 / -1;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 8px;
    margin-top: 16px;
}
.gallery-grid img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s;
}
.gallery-grid img:hover {
    transform: scale(1.02);
    opacity: 0.85;
}
.gallery-video {
    margin-top: 16px;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 4px;
}
.gallery-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    cursor: pointer;
    justify-content: center;
    align-items: center;
}
#lightbox.active {
    display: flex;
}
#lightbox img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

/* ===================================================================
   PREMIUM MOTION (motion-design skill)
   Personality: Premium — elegant, 0% overshoot, signature ease curve.
   Layers: primary (hero staged entrance) + ambient (hero visual breathing).
   =================================================================== */

/* --- Hero staged entrance: elements rise + fade in sequence on load --- */
@keyframes heroRise {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroVisualIn {
    from { opacity: 0; transform: translateY(36px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.hero .eyebrow,
.hero .hero-logo-center,
.hero h1,
.hero .hero-subtitle,
.hero-text > p,
.hero-buttons {
    opacity: 0;
    animation: heroRise var(--dur-slow) var(--ease-emphasized) forwards;
}
/* Dramatic stagger (100–180ms) — leads with the brand, settles to CTA */
.hero .eyebrow          { animation-delay: 0.10s; }
.hero .hero-logo-center { animation-delay: 0.22s; }
.hero h1                { animation-delay: 0.34s; }
.hero .hero-subtitle    { animation-delay: 0.46s; }
.hero-text > p          { animation-delay: 0.58s; }
.hero-buttons           { animation-delay: 0.70s; }

.hero-visual-stack {
    opacity: 0;
    animation: heroVisualIn 0.8s var(--ease-emphasized) 0.40s forwards;
}

/* --- Ambient layer: hero main image breathes; thumbs hold their tilt --- */
@keyframes heroFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.hv-main {
    animation: heroFloat 7s var(--ease-premium) 1.4s infinite;
    transition: box-shadow var(--dur-std) var(--ease-premium);
}
.hero-visual-stack:hover .hv-main {
    box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 0 1px var(--gold-border);
}
.hv-thumb { transition: transform var(--dur-std) var(--ease-premium),
                        opacity var(--dur-std) var(--ease-premium); }
.hero-visual-stack:hover .hv-thumb-tl { transform: rotate(-4deg) translateY(-6px); opacity: 1; }
.hero-visual-stack:hover .hv-thumb-br { transform: rotate(3deg) translateY(6px); opacity: 1; }

/* --- Respect users who prefer reduced motion (WCAG 2.3.3 / a11y) --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .fade-in { opacity: 1; transform: none; }
    .hero .eyebrow, .hero .hero-logo-center, .hero h1,
    .hero .hero-subtitle, .hero-text > p, .hero-buttons,
    .hero-visual-stack { opacity: 1; animation: none; }
    .fs-item, .flagship-foot { transition: none; }
}

/* ===== FLAGSHIP CASE STUDY — dual-value (exec ↔ team) ===== */
.flagship {
    position: relative;
    background:
        radial-gradient(720px 400px at 50% -8%, rgba(201,168,76,0.11), transparent 72%),
        var(--bg-alt);
    border-top: 1px solid var(--gold-border);
    border-bottom: 1px solid var(--gold-border);
    overflow: hidden;
}
.flagship-lead { max-width: 760px; margin: 0 auto 64px; text-align: center; }
.flagship-kicker {
    display: inline-flex; align-items: center; gap: 12px;
    font-size: 0.74rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 24px;
}
.flagship-kicker::before, .flagship-kicker::after {
    content: ""; width: 34px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-border), transparent);
}
.flagship-lead h2 {
    font-size: clamp(2.05rem, 4.6vw, 3.4rem); line-height: 1.07;
    letter-spacing: -0.025em; text-wrap: balance;
}
.flagship-lead h2 em { font-style: normal; color: var(--gold); }
.flagship-lead > p { color: #b8b4ad; font-size: 1.1rem; line-height: 1.7; margin-top: 22px; }

.flagship-split {
    display: grid; grid-template-columns: 1.04fr 0.96fr;
    border: 1px solid var(--border-gold); border-radius: var(--radius);
    background: var(--bg-card); overflow: hidden;
}
.fs-col { padding: 52px 48px; }
.fs-col.fs-exec {
    background:
        radial-gradient(420px 220px at 0% 0%, rgba(201,168,76,0.07), transparent 70%),
        linear-gradient(180deg, rgba(201,168,76,0.035), transparent);
    border-right: 1px solid var(--gold-border);
}
.fs-head { display: flex; align-items: center; gap: 18px; padding-bottom: 28px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.fs-badge {
    flex: none; width: 56px; height: 56px; display: grid; place-items: center;
    font-size: 1.6rem; border: 1px solid var(--gold-border); border-radius: var(--radius);
    background: rgba(201,168,76,0.07);
}
.fs-role { color: var(--gold); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.fs-head h3 { font-size: 1.5rem; letter-spacing: -0.015em; margin-top: 3px; line-height: 1.1; }

.fs-list { list-style: none; margin: 0; padding: 0; }
.fs-item {
    display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--border);
    transition: transform var(--dur-quick) var(--ease-premium);
}
.fs-item:last-child { border-bottom: none; padding-bottom: 0; }
.fs-mark {
    flex: none; font-size: 1.15rem; line-height: 1.5; width: 26px; text-align: center;
    filter: grayscale(0.15);
}
.fs-item h4 {
    font-size: 1.08rem; font-weight: 700; letter-spacing: -0.005em; margin: 0 0 5px;
    color: var(--text); transition: color var(--dur-quick) var(--ease-premium);
}
.fs-item p { font-size: 0.97rem; line-height: 1.62; color: #b3afa8; margin: 0; }
.fs-item:hover { transform: translateX(4px); }
.fs-item:hover h4 { color: var(--gold-light); }

.flagship-foot {
    margin-top: 40px; text-align: center;
    font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 600; letter-spacing: -0.01em;
    color: var(--text);
}
.flagship-foot strong { color: var(--gold); font-weight: 700; }

@media (max-width: 880px) {
    .flagship-split { grid-template-columns: 1fr; }
    .fs-col { padding: 40px 28px; }
    .fs-col.fs-exec { border-right: none; border-bottom: 1px solid var(--gold-border); }
}
