/* =========================================================================
   หน้าแรก — ชุดการเคลื่อนไหว
   - สถานะ "ก่อนเล่น" ทั้งหมดอยู่ใต้ .motion (ใส่โดย landing-motion.js เมื่อผู้ใช้ไม่ได้ตั้งค่าลดการเคลื่อนไหว)
     ไม่มี JS หรือปิด motion = หน้าเว็บแสดงครบแบบนิ่ง
   - ค่าที่ขยับตาม scroll/เมาส์ส่งมาเป็น CSS variable (--p, --mx, --my, --q ...)
   ========================================================================= */

:root {
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-soft: cubic-bezier(0.2, 0.7, 0.2, 1);
    --hand: "Mali", "Anuphan", cursive;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ---------- ปุ่ม: แม่เหล็ก + แสงวิ่ง ---------- */

.nav-cta,
.primary-action,
.secondary-action {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, translate 0.45s var(--ease-out), box-shadow 0.3s ease;
}

.primary-action::after,
.nav-cta::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.7s var(--ease-out);
}

.primary-action:hover::after,
.nav-cta:hover::after {
    transform: translateX(120%);
}

.primary-action:hover {
    box-shadow: 0 10px 28px rgba(79, 70, 229, 0.35);
}

.primary-action.light {
    color: var(--ink);
    background: #ffffff;
}

.primary-action.light::after {
    background: linear-gradient(105deg, transparent 30%, rgba(37, 99, 235, 0.16) 50%, transparent 70%);
}

/* ---------- Navigation: กลายเป็นแคปซูลลอยเมื่อเลื่อน ---------- */

.landing-nav {
    transition: top 0.5s var(--ease-out), background 0.3s ease, border-color 0.3s ease;
}

.landing-nav .nav-inner {
    transition: width 0.6s var(--ease-out), min-height 0.5s var(--ease-out), padding 0.5s var(--ease-out),
        background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, border-radius 0.5s var(--ease-out);
    border: 1px solid transparent;
}

.landing-nav.scrolled {
    top: 12px;
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
}

.landing-nav.scrolled .nav-inner {
    width: min(1080px, 100% - 24px);
    min-height: 58px;
    padding: 0 8px 0 20px;
    border-color: rgba(12, 19, 34, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px) saturate(1.5);
    -webkit-backdrop-filter: blur(18px) saturate(1.5);
    box-shadow: 0 12px 34px rgba(12, 19, 34, 0.12);
}

.landing-nav.scrolled .nav-cta {
    min-height: 42px;
    border-radius: 999px;
}

/* อยู่เหนือ section สีเข้ม → แคปซูลกระจกสีเข้ม */
.landing-nav.scrolled.on-dark .nav-inner {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}

.landing-nav.scrolled.on-dark .landing-brand {
    color: #ffffff;
}

.landing-nav.scrolled.on-dark .landing-brand strong {
    color: #7ea8fb;
}

.landing-nav.scrolled.on-dark .landing-links {
    color: rgba(255, 255, 255, 0.72);
}

.landing-nav.scrolled.on-dark .landing-links a:hover {
    color: #ffffff;
}

.landing-nav.scrolled.on-dark .nav-toggle {
    border-color: rgba(255, 255, 255, 0.3);
}

.landing-nav.scrolled.on-dark .nav-toggle span {
    background: #ffffff;
}

/* ---------- HERO ---------- */

.hero.hero-collage {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: max(100svh, 760px);
    padding: 120px 0 110px;
    overflow: hidden;
}

/* แสงพื้นหลังลอยช้า ๆ */
.hero.hero-collage::before,
.hero.hero-collage::after {
    content: "";
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}

.hero.hero-collage::before {
    top: -20%;
    left: 18%;
    width: 44rem;
    height: 44rem;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.3), transparent 65%);
}

.hero.hero-collage::after {
    right: 10%;
    bottom: -35%;
    width: 40rem;
    height: 40rem;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.28), transparent 65%);
}

.motion .hero.hero-collage::before {
    animation: heroDrift 18s ease-in-out infinite alternate;
}

.motion .hero.hero-collage::after {
    animation: heroDrift 22s ease-in-out infinite alternate-reverse;
}

@keyframes heroDrift {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(8%, 6%, 0) scale(1.08); }
    100% { transform: translate3d(-6%, 10%, 0) scale(0.95); }
}

.hero-center {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 700px;
    text-align: center;
    will-change: transform, filter, opacity;
}

.motion .hero-center {
    /* --p = ความคืบหน้าการเลื่อนผ่าน hero (0 → 1) */
    opacity: calc(1 - var(--p, 0) * 1.5);
    filter: blur(calc(var(--p, 0) * 16px));
    transform: translate3d(0, calc(var(--p, 0) * -70px), 0) scale(calc(1 - var(--p, 0) * 0.07));
}

.hero-center .hero-title {
    margin: 14px 0 18px;
    font-size: clamp(2.2rem, 4.6vw, 3.8rem);
    letter-spacing: -0.015em;
    line-height: 1.2;
}

.hero-center > p {
    max-width: 600px;
    margin: 0;
    color: rgba(224, 231, 244, 0.82);
    font-size: 1.1rem;
}

.hero-center .hero-actions {
    justify-content: center;
}

.hero-center .hero-trust {
    justify-content: center;
    width: 100%;
    max-width: 620px;
}

/* คำที่สลายเป็นจุดแล้วรวมเป็นคำใหม่ */
.morph {
    position: relative;
    display: inline-grid;
    justify-items: center;
    vertical-align: top;
}

/* ใส่สีไล่เฉดที่ลูกแต่ละตัว (ถ้าใส่ที่แม่ เบราว์เซอร์จะใช้ตัวอักษรของลูกทั้งสองเป็นหน้ากากโดยไม่สน opacity) */
.morph > span {
    grid-area: 1 / 1;
    white-space: nowrap;
    background: linear-gradient(90deg, #8fb4ff, #c4b5fd 55%, #f0abfc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.morph.morphing {
    filter: url(#morphThreshold);
}

.morph-filter {
    position: absolute;
    width: 0;
    height: 0;
}

/* ตัวเลขนับขึ้น */
.hero-trust [data-count] {
    color: inherit;
    font-size: inherit;
}

/* ส่วนหัว hero โผล่ไล่กัน */
.motion .hero-center > * {
    animation: heroUp 1s var(--ease-out) both;
}

.motion .hero-center > :nth-child(2) { animation-delay: 0.08s; }
.motion .hero-center > :nth-child(3) { animation-delay: 0.2s; }
.motion .hero-center > :nth-child(4) { animation-delay: 0.3s; }
.motion .hero-center > :nth-child(5) { animation-delay: 0.4s; }

@keyframes heroUp {
    from { opacity: 0; transform: translate3d(0, 28px, 0); filter: blur(10px); }
    to { opacity: 1; transform: none; filter: none; }
}

/* การ์ดผลงานรอบหัวข้อ */
.hero-cards {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hc {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: clamp(120px, calc(var(--w) * 100vw / 1440), calc(var(--w) * 1.15px));
    margin: 0;
    transform:
        translate3d(
            calc(var(--side) * var(--p, 0) * var(--depth) * 0.45vw + var(--mx, 0) * var(--depth) * 0.3px),
            calc(var(--vy) * var(--p, 0) * var(--depth) * 0.35vh + var(--my, 0) * var(--depth) * 0.22px),
            0)
        rotate(calc(var(--r) + var(--side) * var(--p, 0) * 16deg));
    will-change: transform;
}

.hc-dup {
    display: none;
}

.hc-inner {
    padding: 7px 7px 9px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 24px 50px rgba(2, 8, 20, 0.45), 0 2px 6px rgba(2, 8, 20, 0.2);
}

.hc img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: top left;
    border-radius: 11px;
    background: #e9edf5;
}

.hc figcaption {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px 0;
    color: var(--ink);
    line-height: 1.25;
}

.hc figcaption i {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--grad);
}

.hc figcaption span {
    display: grid;
    min-width: 0;
}

.hc figcaption b {
    overflow: hidden;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hc figcaption small {
    color: var(--muted);
    font-size: 0.68rem;
}

.motion .hc-inner {
    animation:
        hcIn 1.3s calc(0.25s + var(--i) * 0.07s) var(--ease-out) both,
        hcFloat calc(6s + var(--i) * 0.45s) calc(1.6s + var(--i) * 0.07s) ease-in-out infinite;
}

@keyframes hcIn {
    from {
        opacity: 0;
        transform: translate3d(calc(var(--side) * -16vw), calc(var(--vy) * -6vh), 0) scale(0.55) rotate(calc(var(--side) * -18deg));
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

@keyframes hcFloat {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    50% { transform: translate3d(0, -9px, 0) rotate(calc(var(--side) * 0.8deg)); }
}

/* ปุ่มเลื่อนลง */
.scroll-cue {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 26px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(203, 213, 229, 0.7);
    font-size: 0.8rem;
    transform: translateX(-50%);
    opacity: calc(1 - var(--p, 0) * 6);
    transition: color 0.2s ease;
}

.scroll-cue:hover {
    color: #ffffff;
}

.scroll-cue .mouse {
    position: relative;
    width: 22px;
    height: 34px;
    border: 2px solid currentColor;
    border-radius: 12px;
}

.scroll-cue .mouse i {
    position: absolute;
    top: 6px;
    left: 50%;
    width: 3px;
    height: 7px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: currentColor;
}

.motion .scroll-cue .mouse i {
    animation: wheel 1.8s ease-in-out infinite;
}

@keyframes wheel {
    0% { opacity: 0; transform: translateY(-3px); }
    30% { opacity: 1; }
    70% { opacity: 0; transform: translateY(9px); }
    100% { opacity: 0; }
}

/* ---------- หัวข้อ: คำค่อย ๆ ชัดขึ้นทีละคำ ---------- */

.split-heading .w {
    display: inline-block;
}

.motion .split-heading .w {
    opacity: 0;
    filter: blur(10px);
    transform: translate3d(0, 0.45em, 0);
    transition:
        opacity 0.8s var(--ease-out) calc(var(--wi) * 55ms),
        filter 0.8s var(--ease-out) calc(var(--wi) * 55ms),
        transform 0.8s var(--ease-out) calc(var(--wi) * 55ms);
}

.motion .split-heading.in .w {
    opacity: 1;
    filter: none;
    transform: none;
}

/* ไอคอนแทรกกลางหัวข้อ (เหมือนแทรกรูปคนกลางคำ) */
.inline-chips {
    display: inline-flex;
    align-items: center;
    gap: 0;
    max-width: 200px;
    margin: 0 0.18em;
    padding: 4px;
    border-radius: 999px;
    background: var(--bg-alt);
    vertical-align: middle;
    overflow: hidden;
}

.inline-chips i {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin-left: -8px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    background: var(--grad);
}

.inline-chips i:first-child {
    margin-left: 0;
}

.inline-chips i:nth-child(2) {
    background: linear-gradient(135deg, #10b981, #059669);
}

.inline-chips i:nth-child(3) {
    background: linear-gradient(135deg, #f43f5e, #e11d48);
}

.inline-chips .icon {
    width: 18px;
    height: 18px;
}

.motion .split-heading .inline-chips {
    max-width: 0;
    margin: 0;
    padding: 4px 0;
    transition: max-width 0.9s var(--ease-out) 0.55s, margin 0.9s var(--ease-out) 0.55s, padding 0.9s var(--ease-out) 0.55s;
}

.motion .split-heading.in .inline-chips {
    max-width: 200px;
    margin: 0 0.18em;
    padding: 4px;
}

.motion .split-heading .inline-chips i {
    transform: scale(0);
    transition: transform 0.6s var(--ease-spring);
}

.motion .split-heading.in .inline-chips i:nth-child(1) { transform: scale(1); transition-delay: 0.85s; }
.motion .split-heading.in .inline-chips i:nth-child(2) { transform: scale(1); transition-delay: 0.97s; }
.motion .split-heading.in .inline-chips i:nth-child(3) { transform: scale(1); transition-delay: 1.09s; }

/* ---------- โผล่ตอนเลื่อนถึง (ใช้ translate แยกจาก transform เพื่อไม่ชนกับ hover/tilt) ---------- */

.motion .reveal {
    opacity: 0;
    translate: 0 30px;
    filter: blur(6px);
    transition:
        opacity 0.9s var(--ease-out) var(--reveal-delay, 0ms),
        translate 0.9s var(--ease-out) var(--reveal-delay, 0ms),
        filter 0.9s var(--ease-out) var(--reveal-delay, 0ms);
}

.motion .reveal.in {
    opacity: 1;
    translate: 0 0;
    filter: none;
}

/* ---------- ชั้นซ้อน: section ขาวหดเป็นการ์ดมุมมน เผยชั้นสีเข้มด้านล่าง ---------- */

.stack-group {
    background:
        radial-gradient(circle at 20% 35%, rgba(37, 99, 235, 0.16), transparent 34rem),
        radial-gradient(circle at 85% 70%, rgba(124, 58, 237, 0.16), transparent 32rem),
        #0f172a;
}

.stack-group > .stack-out,
.stack-group > .stack-in {
    position: relative;
    z-index: 1;
}

#solutions.showcase-sec {
    background: var(--bg);
}

/* ---------- SHOWCASE: เลือกบริการทางซ้าย การ์ดเปลี่ยนทางขวา ---------- */

.showcase-sec {
    padding-bottom: 40px;
}

.showcase-sec .section-heading {
    max-width: 760px;
}

.sc-stage {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 48px;
    align-items: center;
}

.sc-nav {
    display: none;
    margin: 0;
    padding: 0;
    list-style: none;
}

.js .sc-nav {
    display: grid;
    gap: 6px;
}

.sc-nav button {
    position: relative;
    display: block;
    width: 100%;
    padding: 6px 0 6px 18px;
    border: 0;
    background: none;
    color: #9aa3b2;
    font: inherit;
    font-size: 1.02rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: color 0.35s ease;
}

.sc-nav button span {
    display: inline-block;
    transform-origin: left center;
    transition: transform 0.5s var(--ease-out), font-weight 0.3s;
}

.sc-nav button:hover {
    color: var(--muted);
}

.sc-nav button[aria-selected="true"] {
    color: var(--ink);
}

.sc-nav button[aria-selected="true"] span {
    transform: scale(1.22);
    font-weight: 600;
}

/* แถบความคืบหน้าในบริการที่เลือก */
.sc-progress {
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: var(--line);
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sc-progress::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--grad);
    transform: scaleY(var(--sp, 1));
    transform-origin: top;
}

.sc-nav button[aria-selected="true"] .sc-progress {
    opacity: 1;
}

.sc-panel {
    position: relative;
}

.sc-card {
    display: grid;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 30px 70px rgba(12, 19, 34, 0.1), 0 2px 8px rgba(12, 19, 34, 0.04);
}

.sc-card + .sc-card {
    margin-top: 20px;
}

.js .sc-card {
    display: none;
}

.js .sc-card + .sc-card {
    margin-top: 0;
}

.js .sc-card.is-active {
    display: grid;
}

.sc-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    gap: 22px;
    align-items: start;
}

.sc-id {
    display: flex;
    gap: 14px;
}

.sc-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: #ffffff;
    background: var(--grad);
    box-shadow: 0 0 0 4px #ffffff, 0 0 0 5px #e5e9f2;
}

.sc-icon .icon {
    width: 24px;
    height: 24px;
}

.sc-id small {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
}

.sc-id h3 {
    margin: 2px 0 6px;
    font-size: 1.35rem;
}

.sc-id p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.sc-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.sc-stats li {
    display: grid;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    line-height: 1.3;
}

.sc-stats b {
    font-size: 0.9rem;
}

.sc-stats small {
    color: var(--muted);
    font-size: 0.72rem;
}

.sc-banner {
    overflow: hidden;
    aspect-ratio: 16 / 7;
    border-radius: 14px;
}

.sc-banner img,
.sc-shot img,
.sc-work-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
}

.sc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sc-chips span {
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--bg-alt);
    color: #3b4352;
    font-size: 0.82rem;
    font-weight: 500;
}

.sc-tabs {
    display: flex;
    gap: 22px;
    border-bottom: 1px solid var(--line);
    font-size: 0.85rem;
}

.sc-tabs b,
.sc-tabs span {
    padding: 0 0 8px;
    color: #9aa3b2;
    font-weight: 500;
}

.sc-tabs b {
    color: var(--ink);
    box-shadow: inset 0 -2px 0 var(--ink);
}

.sc-body {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 18px;
}

.sc-shots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 92px;
    gap: 10px;
}

.sc-shot {
    overflow: hidden;
    border-radius: 12px;
}

.sc-shot:nth-child(1) {
    grid-row: span 2;
}

.sc-shot:nth-child(4) {
    grid-column: 2;
    grid-row: 2 / span 2;
}

.sc-shot:nth-child(3) {
    grid-row: 3;
    grid-column: 1;
}

.sc-works {
    display: grid;
    align-content: start;
    gap: 8px;
}

.sc-works-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.sc-works-head a {
    color: var(--accent);
    font-weight: 600;
}

.sc-work {
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.25s var(--ease-out);
}

.sc-work:hover {
    border-color: #c6d4f7;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.sc-work-img {
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border-radius: 9px;
}

.sc-work b {
    display: block;
    font-size: 0.88rem;
    line-height: 1.35;
}

.sc-work small {
    color: var(--muted);
    font-size: 0.75rem;
}

.sc-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
    color: var(--muted);
    font-size: 0.92rem;
}

.sc-foot .primary-action {
    min-height: 38px;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.9rem;
}

.sc-faces {
    display: inline-flex;
}

.sc-faces i {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    margin-left: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #ffffff;
    font-size: 0.62rem;
    font-style: normal;
    font-weight: 700;
}

.sc-faces i:first-child {
    margin-left: 0;
    background: var(--grad);
}

.sc-faces i:last-child {
    background: linear-gradient(135deg, #10b981, #06b6d4);
}

/* skeleton → เนื้อหาจริงไล่ทีละชิ้น (เหมือนการ์ดกำลังโหลด) */
.sk {
    position: relative;
    background: #eef1f6;
}

.motion .sc-card .sk::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.75) 50%, transparent 80%) #eef1f6;
    background-size: 200% 100%;
    animation: shimmer 1.1s linear infinite;
    transition: opacity 0.45s ease;
}

.motion .sc-card .sk.ready::before {
    opacity: 0;
    animation: none;
}

.motion .sc-card .sk img {
    transform: scale(1.06);
    transition: transform 1.1s var(--ease-out);
}

.motion .sc-card .sk.ready img {
    transform: none;
}

@keyframes shimmer {
    from { background-position: 150% 0; }
    to { background-position: -50% 0; }
}

.motion .sc-card.is-active .sq {
    animation: sqIn 0.6s var(--ease-out) calc(0.08s + var(--o) * 0.06s) both;
}

.motion .sc-card.is-active {
    animation: cardIn 0.5s var(--ease-out) both;
}

@keyframes sqIn {
    from { opacity: 0; transform: translate3d(0, 10px, 0); filter: blur(4px); }
    to { opacity: 1; transform: none; filter: none; }
}

@keyframes cardIn {
    from { opacity: 0.4; transform: scale(0.985); }
    to { opacity: 1; transform: none; }
}

/* โหมดเลื่อนเปลี่ยนบริการ (จอกว้าง + เปิด motion) */
@media (min-width: 1000px) {
    .motion .sc-track.pinned {
        height: calc(var(--steps) * 62vh + 100vh);
    }

    .motion .sc-track.pinned .sc-stage {
        position: sticky;
        top: 84px;
        height: calc(100vh - 100px);
        min-height: 600px;
    }
}

/* ---------- PAINS: กระดาษโน้ตหล่นลงมา ---------- */

.pains {
    position: relative;
    padding: 110px 0 120px;
    color: #ffffff;
    overflow: hidden;
}

.section-heading.light h2 {
    color: #ffffff;
}

.section-heading.light p {
    color: rgba(203, 213, 229, 0.8);
}

.section-heading.light > span {
    color: #7ea8fb;
}

.notes {
    position: relative;
    width: min(720px, 100%);
    aspect-ratio: 720 / 440;
    margin: 10px auto 0;
}

.note {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 30%;
    aspect-ratio: 1;
    rotate: var(--r);
    translate: var(--dx, 0px) var(--dy, 0px);
    z-index: var(--z, 1);
}

.note-paper {
    display: flex;
    width: 100%;
    height: 100%;
    padding: clamp(10px, 2.2vw, 18px);
    background: var(--c);
    color: #1f2937;
    font-family: var(--hand);
    font-size: clamp(0.78rem, 1.7vw, 1.05rem);
    font-weight: 500;
    line-height: 1.45;
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35), inset 0 -10px 18px rgba(0, 0, 0, 0.05);
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease;
}

.note:hover .note-paper {
    transform: translateY(-4px) rotate(-1deg);
    box-shadow: 0 26px 40px rgba(0, 0, 0, 0.4);
}

.note.dragging .note-paper {
    transform: scale(1.06) rotate(2deg);
    box-shadow: 0 34px 50px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .note {
        cursor: grab;
        touch-action: none;
    }

    .note.dragging {
        cursor: grabbing;
    }
}

.motion .notes .note-paper {
    opacity: 0;
}

.motion .notes.in .note-paper {
    animation: noteDrop 0.9s var(--ease-spring) calc(var(--i) * 0.13s) both;
}

.motion .notes.in .note-late .note-paper {
    animation: noteFly 1.3s var(--ease-out) 1.5s both;
}

@keyframes noteDrop {
    from { opacity: 0; transform: translate3d(0, -90px, 0) rotate(14deg) scale(1.18); }
    60% { opacity: 1; }
    to { opacity: 1; transform: none; }
}

@keyframes noteFly {
    from { opacity: 0; transform: translate3d(70vw, 30px, 0) rotate(60deg); }
    to { opacity: 1; transform: none; }
}

.pains-cta {
    margin: 46px auto 0;
    color: rgba(203, 213, 229, 0.85);
    text-align: center;
}

.pains-cta a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
    color: #ffffff;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.pains-cta a:hover .icon {
    transform: translateX(4px);
}

.pains-cta .icon {
    transition: transform 0.3s var(--ease-out);
}

/* ---------- PRODUCTS: ขีดเส้นใต้มือ / ไฮไลต์ / โน้ตลายมือ ---------- */

.scribble {
    position: relative;
    display: inline-block;
    white-space: nowrap;
}

.scribble svg {
    position: absolute;
    left: -2%;
    bottom: -0.32em;
    width: 104%;
    height: 0.5em;
    overflow: visible;
}

.scribble path {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.motion .scribble path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 1.1s var(--ease-soft) 0.7s;
}

.motion .in .scribble path,
.motion .scribble.in path {
    stroke-dashoffset: 0;
}

.hl-sweep {
    background: linear-gradient(90deg, var(--accent), var(--violet)) 0 0 / 0% 100% no-repeat, linear-gradient(var(--muted), var(--muted));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 600;
    transition: background-size 1.2s var(--ease-soft) 0.3s;
}

.hl-sweep.in,
html:not(.motion) .hl-sweep {
    background-size: 100% 100%, auto;
}

.product-media {
    position: relative;
}

.product-media img {
    position: relative;
}

.motion .product-media.reveal {
    translate: none;
    filter: none;
    opacity: 1;
    clip-path: inset(8% 8% 8% 8% round 22px);
    transition: clip-path 1.2s var(--ease-out);
}

.motion .product-media.reveal img {
    transform: scale(1.12);
    transition: transform 1.4s var(--ease-out);
}

.motion .product-media.reveal.in {
    clip-path: inset(-60px -60px -60px -60px round 16px);
}

.motion .product-media.reveal.in img {
    transform: none;
}

.hand-note {
    position: absolute;
    z-index: 2;
    top: -58px;
    right: 64px;
    display: flex;
    align-items: flex-start;
    gap: 2px;
    color: var(--ink);
    font-family: var(--hand);
    font-size: 1.12rem;
    font-weight: 600;
    pointer-events: none;
}

.hand-note span {
    margin-top: -4px;
    rotate: -4deg;
}

.hand-note svg {
    width: 70px;
    height: 54px;
}

.hand-note path {
    fill: none;
    stroke: var(--ink);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.motion .hand-note span {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
    transition: opacity 0.6s ease 1.3s, transform 0.6s var(--ease-out) 1.3s;
}

.motion .hand-note path {
    stroke-dasharray: 160;
    stroke-dashoffset: 160;
    transition: stroke-dashoffset 0.9s var(--ease-soft) 1.5s;
}

.motion .hand-note path.tip {
    transition-delay: 2.2s;
    transition-duration: 0.35s;
}

.motion .in .hand-note span {
    opacity: 1;
    transform: none;
}

.motion .in .hand-note path {
    stroke-dashoffset: 0;
}

/* ---------- WORKFLOW: การ์ดสลับซ้ายขวาบนพื้นเข้ม ---------- */

.flow {
    position: relative;
    padding: 120px 0 130px;
    color: #ffffff;
}

.flow-rows {
    display: grid;
    gap: 34px;
    max-width: 980px;
    margin: 0 auto;
}

.flow-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 56px;
    align-items: center;
}

.flow-row.reverse .flow-card {
    order: 2;
}

.flow-card {
    position: relative;
    aspect-ratio: 5 / 4;
    overflow: hidden;
    border-radius: 22px;
    color: var(--ink);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.fc-1 { background: radial-gradient(circle at 20% 10%, #fde7c8, transparent 60%), radial-gradient(circle at 90% 90%, #c5ecef, transparent 60%), #eef4f6; }
.fc-2 { background: radial-gradient(circle at 80% 0%, #fbcfe8, transparent 55%), radial-gradient(circle at 10% 100%, #ddd6fe, transparent 60%), #f5f0fb; }
.fc-3 { background: radial-gradient(circle at 0% 0%, #dbeafe, transparent 55%), radial-gradient(circle at 100% 100%, #e0e7ff, transparent 60%), #eef2fb; }
.fc-4 { background: radial-gradient(circle at 50% 0%, #cffafe, transparent 60%), radial-gradient(circle at 0% 100%, #d1fae5, transparent 60%), #edf6f7; }

.flow-text h3 {
    margin: 8px 0 10px;
    font-size: clamp(1.4rem, 2.4vw, 1.85rem);
    color: rgba(255, 255, 255, 0.92);
}

.flow-text p {
    margin: 0;
    max-width: 380px;
    color: rgba(203, 213, 229, 0.78);
}

.flow-num {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
}

/* คำแรกค่อย ๆ เปลี่ยนเป็นสีไล่เฉดทีละตัว */
.sweep-word {
    background: var(--g) 0 0 / 0% 100% no-repeat, linear-gradient(#ffffff, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transition: background-size 1.1s var(--ease-soft) 0.35s;
}

.flow-row.play .sweep-word,
html:not(.motion) .sweep-word {
    background-size: 100% 100%, auto;
}

.motion .flow-card {
    opacity: 0;
    filter: blur(14px);
    transform: translate3d(0, 50px, 0) scale(0.96);
    transition: opacity 1s var(--ease-out), filter 1s var(--ease-out), transform 1.1s var(--ease-out);
}

.motion .flow-row.play .flow-card {
    opacity: 1;
    filter: none;
    transform: none;
}

.motion .flow-text {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    transition: opacity 0.9s var(--ease-out) 0.15s, transform 0.9s var(--ease-out) 0.15s;
}

.motion .flow-row.play .flow-text {
    opacity: 1;
    transform: none;
}

/* 1. แชต */
.chat {
    position: absolute;
    inset: 9% 8%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.bubble {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 88%;
    font-size: 0.85rem;
}

.bubble > span {
    padding: 9px 13px;
    border-radius: 16px 16px 16px 4px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(12, 19, 34, 0.08);
    line-height: 1.45;
}

.bubble.out {
    align-self: flex-end;
}

.bubble.out > span {
    border-radius: 16px 16px 4px 16px;
    color: #ffffff;
    background: var(--grad);
}

.bubble .av {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f59e0b;
    color: #ffffff;
    font-size: 0.6rem;
    font-style: normal;
    font-weight: 700;
}

.bubble .av.py {
    background: var(--navy);
}

.bubble.file > span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bubble .xls {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #16a34a;
    color: #ffffff;
    font-size: 0.75rem;
}

.bubble small {
    color: var(--muted);
}

.bubble.typing > span {
    display: flex;
    gap: 4px;
    padding: 13px 14px;
}

.bubble.typing > span i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
}

.motion .flow-row.play .bubble.typing > span i {
    animation: typingDot 1.1s ease-in-out infinite;
}

.motion .bubble.typing > span i:nth-child(2) { animation-delay: 0.15s; }
.motion .bubble.typing > span i:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingDot {
    0%, 60%, 100% { transform: none; opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.motion .bubble {
    opacity: 0;
    transform: translate3d(0, 14px, 0) scale(0.92);
    transform-origin: bottom left;
}

.motion .bubble.out {
    transform-origin: bottom right;
}

.motion .flow-row.play .bubble {
    animation: bubbleIn 0.55s var(--ease-spring) calc(0.6s + var(--d) * 0.65s) both;
}

@keyframes bubbleIn {
    to { opacity: 1; transform: none; }
}

/* 2. ใบเสนอราคา */
.quote {
    position: absolute;
    inset: 10% 11%;
    display: grid;
    align-content: center;
    gap: 12px;
    padding: 20px 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 40px rgba(76, 29, 149, 0.14);
}

.quote-head {
    display: grid;
}

.quote-head small {
    color: var(--muted);
    font-size: 0.75rem;
}

.quote ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.86rem;
}

.quote li {
    display: flex;
    align-items: center;
    gap: 9px;
}

.quote li i {
    position: relative;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 2px solid #d8dee9;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.quote li i::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 0px;
    width: 5px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.35s var(--ease-spring);
}

.flow-row.play .quote li i,
html:not(.motion) .quote li i {
    border-color: #7c3aed;
    background: #7c3aed;
    transition-delay: calc(0.7s + var(--d) * 0.28s);
}

.flow-row.play .quote li i::after,
html:not(.motion) .quote li i::after {
    transform: rotate(45deg) scale(1);
    transition-delay: calc(0.75s + var(--d) * 0.28s);
}

.quote-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px dashed #d8dee9;
}

.quote-total small {
    color: var(--muted);
}

.quote-total b {
    font-size: 1.7rem;
    letter-spacing: -0.02em;
}

.quote-time small {
    color: var(--muted);
    font-size: 0.75rem;
}

.quote-time span {
    display: block;
    height: 6px;
    margin-top: 4px;
    border-radius: 6px;
    background: #ece8f7;
    overflow: hidden;
}

.quote-time i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ec4899, #8b5cf6);
    transform-origin: left;
    transform: scaleX(1);
}

.motion .quote-time i {
    transform: scaleX(0);
    transition: transform 1.6s var(--ease-soft) 1.9s;
}

.motion .flow-row.play .quote-time i {
    transform: scaleX(1);
}

/* 3. ระบบกำลังประกอบตัว */
.build {
    position: absolute;
    inset: 11% 9% 16%;
    overflow: hidden;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(30, 64, 175, 0.15);
}

.build-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: #f1f4f9;
}

.build-bar i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f87171;
}

.build-bar i:nth-child(2) { background: #fbbf24; }
.build-bar i:nth-child(3) { background: #34d399; }

.build-bar span {
    margin-left: 8px;
    padding: 1px 10px;
    border-radius: 8px;
    background: #ffffff;
    color: #94a3b8;
    font-size: 0.68rem;
}

.build-body {
    display: grid;
    grid-template-columns: 22% 1fr;
    height: calc(100% - 32px);
}

.build-side {
    display: grid;
    align-content: start;
    gap: 9px;
    padding: 14px 10px;
    background: #0b1730;
}

.build-side i {
    height: 7px;
    border-radius: 4px;
    background: #31415f;
}

.build-side i:first-child {
    background: var(--grad);
}

.build-main {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 10px;
    padding: 12px;
}

.build-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.build-cards i {
    height: 38px;
    border-radius: 8px;
    background: #f1f4f9;
}

.build-chart {
    display: flex;
    align-items: flex-end;
    gap: 7%;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f6f8fc;
}

.build-chart i {
    flex: 1;
    height: var(--h);
    border-radius: 4px 4px 2px 2px;
    background: linear-gradient(0deg, #2563eb, #7c3aed);
    transform-origin: bottom;
}

.motion .build-side i,
.motion .build-cards i {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s var(--ease-out);
}

.motion .build-chart i {
    transform: scaleY(0);
    transition: transform 0.8s var(--ease-spring);
}

.motion .flow-row.play .build-side i,
.motion .flow-row.play .build-cards i {
    transform: none;
}

.motion .flow-row.play .build-chart i {
    transform: none;
}

.motion .flow-row.play .build-side i:nth-child(1) { transition-delay: 0.6s; }
.motion .flow-row.play .build-side i:nth-child(2) { transition-delay: 0.7s; }
.motion .flow-row.play .build-side i:nth-child(3) { transition-delay: 0.8s; }
.motion .flow-row.play .build-side i:nth-child(4) { transition-delay: 0.9s; }
.motion .flow-row.play .build-cards i:nth-child(1) { transition-delay: 1s; }
.motion .flow-row.play .build-cards i:nth-child(2) { transition-delay: 1.1s; }
.motion .flow-row.play .build-cards i:nth-child(3) { transition-delay: 1.2s; }
.motion .flow-row.play .build-chart i:nth-child(1) { transition-delay: 1.3s; }
.motion .flow-row.play .build-chart i:nth-child(2) { transition-delay: 1.38s; }
.motion .flow-row.play .build-chart i:nth-child(3) { transition-delay: 1.46s; }
.motion .flow-row.play .build-chart i:nth-child(4) { transition-delay: 1.54s; }
.motion .flow-row.play .build-chart i:nth-child(5) { transition-delay: 1.62s; }
.motion .flow-row.play .build-chart i:nth-child(6) { transition-delay: 1.7s; }

.build-badge {
    position: absolute;
    left: 50%;
    bottom: 7%;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(12, 19, 34, 0.16);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transform: translateX(-50%);
}

.build-badge .icon {
    width: 18px;
    height: 18px;
    padding: 3px;
    border-radius: 50%;
    color: #ffffff;
    background: #16a34a;
}

.motion .build-badge {
    opacity: 0;
    transform: translate(-50%, 16px) scale(0.9);
    transition: opacity 0.4s ease 2.2s, transform 0.6s var(--ease-spring) 2.2s;
}

.motion .flow-row.play .build-badge {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* 4. ส่งมอบ */
.handover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 18px;
}

.ho-line {
    position: relative;
    display: flex;
    align-items: center;
    width: 82%;
}

.ho-line svg {
    flex: 1;
    height: 30px;
    margin: 0 -2px;
}

.ho-line path {
    fill: none;
    stroke: #94a3b8;
    stroke-width: 2;
    stroke-dasharray: 5 6;
    vector-effect: non-scaling-stroke;
}

.ho-av {
    z-index: 1;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: #f59e0b;
    color: #ffffff;
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(12, 19, 34, 0.18);
}

.ho-av.py {
    background: var(--navy);
}

.ho-shield {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 86px;
    margin: -78px 0 0 -43px;
    filter: drop-shadow(0 14px 22px rgba(37, 99, 235, 0.3));
}

.ho-shield path {
    fill: #ffffff;
    stroke: #2563eb;
    stroke-width: 3;
    stroke-linejoin: round;
}

.ho-shield .ho-check {
    fill: none;
    stroke: #16a34a;
    stroke-width: 5;
    stroke-linecap: round;
}

.ho-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    width: 86%;
    margin-top: 70px;
}

.ho-chips span {
    padding: 5px 12px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(12, 19, 34, 0.08);
    font-size: 0.8rem;
    font-weight: 500;
}

.motion .ho-line path {
    stroke-dashoffset: 300;
    animation: none;
}

.motion .flow-row.play .ho-line path {
    animation: dashFlow 1.2s linear infinite;
}

@keyframes dashFlow {
    to { stroke-dashoffset: -22; }
}

.motion .ho-shield {
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.4s ease 0.7s, transform 0.7s var(--ease-spring) 0.7s;
}

.motion .flow-row.play .ho-shield {
    opacity: 1;
    transform: none;
}

.motion .ho-shield .ho-check {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    transition: stroke-dashoffset 0.5s var(--ease-soft) 1.3s;
}

.motion .flow-row.play .ho-shield .ho-check {
    stroke-dashoffset: 0;
}

.motion .ho-chips span {
    opacity: 0;
    transform: translate3d(0, 10px, 0) scale(0.9);
    transition: opacity 0.4s ease, transform 0.5s var(--ease-spring);
}

.motion .flow-row.play .ho-chips span {
    opacity: 1;
    transform: none;
    transition-delay: calc(1.6s + var(--d) * 0.14s);
}

/* ---------- WORK: เอียงตามเมาส์ ---------- */

.work-card {
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
    transition: border-color 0.2s ease, box-shadow 0.3s ease, transform 0.5s var(--ease-out);
}

.work-card:hover {
    --lift: -4px;
    transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift));
}

.work-card.tilting {
    transition: border-color 0.2s ease, box-shadow 0.3s ease, transform 0.12s linear;
}

.work-card img,
.article-card img {
    transition: transform 0.8s var(--ease-out);
}

.work-card,
.article-card a {
    overflow: hidden;
}

.work-card:hover img,
.article-card:hover img {
    transform: scale(1.05);
}

.article-card a {
    display: block;
}

.motion .work-grid.expanded .work-extra {
    animation: extraIn 0.7s var(--ease-out) calc(var(--x-i, 0) * 45ms) both;
}

@keyframes extraIn {
    from { opacity: 0; translate: 0 24px; filter: blur(6px); }
    to { opacity: 1; translate: 0 0; filter: none; }
}

/* ---------- FAQ: เปิดปิดนุ่ม ๆ ---------- */

.faq-list details {
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-list details[open] {
    box-shadow: var(--shadow-md);
}

.faq-list summary::after {
    transition: transform 0.4s var(--ease-out), background 0.25s ease, color 0.25s ease;
}

.faq-list details[open] summary::after {
    background: var(--accent);
    color: #ffffff;
}

/* ---------- FINAL CTA: การ์ดมืดบนพื้นสว่าง พื้นหลังเป็นผลงานเลื่อนช้า ๆ ---------- */

.final-cta {
    padding: 70px 0 80px;
    color: inherit;
    background: #eef1f6;
}

.final-cta .container {
    display: block;
}

.cta-card {
    position: relative;
    width: min(1160px, 100% - 32px);
    margin: 0 auto;
    overflow: hidden;
    border-radius: 30px;
    background: #0b1222;
    color: #ffffff;
    box-shadow: 0 40px 80px rgba(12, 19, 34, 0.25);
}

.motion .cta-card {
    opacity: 0;
    transform: scale(0.94);
    filter: blur(12px);
    transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out), filter 1s var(--ease-out);
}

.motion .cta-card.in {
    opacity: 1;
    transform: none;
    filter: none;
}

.cta-bg {
    position: absolute;
    inset: -20% -10%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    opacity: 0.22;
    transform: rotate(-8deg);
    mask-image: radial-gradient(ellipse at center, transparent 18%, #000 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, transparent 18%, #000 70%);
}

.cta-col {
    display: grid;
    align-content: start;
    gap: 18px;
}

.cta-col img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.motion .cta-col {
    animation: ctaColUp 38s linear infinite;
}

.motion .cta-col:nth-child(even) {
    animation-name: ctaColDown;
    animation-duration: 44s;
}

@keyframes ctaColUp {
    from { transform: translateY(0); }
    to { transform: translateY(calc(-50% - 9px)); }
}

@keyframes ctaColDown {
    from { transform: translateY(calc(-50% - 9px)); }
    to { transform: translateY(0); }
}

.cta-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(60px, 9vw, 110px) 24px;
    text-align: center;
}

.cta-content > span {
    color: #7ea8fb;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cta-content h2 {
    margin: 12px 0 12px;
    font-size: clamp(1.7rem, 3.4vw, 2.6rem);
}

.cta-content p {
    max-width: 520px;
    margin: 0 0 28px;
    color: rgba(224, 231, 244, 0.78);
}

.cta-content .final-actions {
    justify-content: center;
}

/* ---------- จอเล็ก ---------- */

@media (max-width: 1180px) {
    .hc-sm {
        display: none;
    }
}

@media (max-width: 999px) {
    .sc-stage {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .js .sc-nav {
        display: flex;
        gap: 8px;
        margin: 0 -20px;
        padding: 4px 20px 6px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .js .sc-nav::-webkit-scrollbar {
        display: none;
    }

    .sc-nav li {
        flex: 0 0 auto;
    }

    .sc-nav button {
        padding: 8px 16px;
        border: 1px solid var(--line);
        border-radius: 999px;
        font-size: 0.92rem;
        white-space: nowrap;
    }

    .sc-nav button[aria-selected="true"] {
        border-color: var(--ink);
        background: var(--ink);
        color: #ffffff;
    }

    .sc-nav button[aria-selected="true"] span {
        transform: none;
    }

    .sc-progress {
        display: none;
    }

    .sc-head {
        grid-template-columns: 1fr;
    }

    .flow-row,
    .flow-row.reverse {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .flow-row.reverse .flow-card {
        order: 0;
    }

    .flow-rows {
        gap: 64px;
    }
}

@media (max-width: 900px) {
    .hero.hero-collage {
        justify-content: flex-start;
        min-height: 0;
        padding: 112px 0 40px;
    }

    .hero-center {
        order: 1;
    }

    /* การ์ดผลงานกลายเป็นแถบเลื่อนอัตโนมัติใต้ปุ่ม */
    .hero-cards {
        position: relative;
        inset: auto;
        order: 2;
        display: flex;
        width: max-content;
        gap: 16px;
        margin-top: 42px;
        padding: 14px 0 22px;
    }

    .motion .hero-cards {
        animation: heroMarquee 48s linear infinite;
    }

    .hc,
    .hc-sm,
    .hc-dup {
        position: relative;
        left: auto;
        top: auto;
        display: block;
        width: 168px;
        flex: 0 0 auto;
        transform: rotate(calc(var(--r) * 0.5));
    }

    .motion .hc-inner {
        animation: none;
    }

    .scroll-cue {
        display: none;
    }

    .hand-note {
        display: none;
    }

    .stack-group {
        background: #0f172a;
    }
}

@keyframes heroMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-50% - 8px)); }
}

@media (max-width: 640px) {
    .hero-center .hero-title {
        font-size: clamp(1.7rem, 8.2vw, 2.1rem);
    }

    .hero-center .hero-trust {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .hero-center .hero-trust strong {
        font-size: 1.05rem;
    }

    .hero-center .hero-trust span {
        display: block;
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .nav-cta {
        padding: 8px 14px;
        white-space: nowrap;
    }

    .landing-nav.scrolled .nav-inner {
        padding-left: 12px;
    }

    .sc-card {
        padding: 16px;
        border-radius: 18px;
    }

    .sc-body {
        grid-template-columns: 1fr;
    }

    .sc-shots {
        grid-auto-rows: 70px;
    }

    .notes {
        aspect-ratio: 720 / 620;
    }

    .note {
        width: 40%;
    }

    .note:nth-child(1) { left: 2%; top: 0%; }
    .note:nth-child(2) { left: 52%; top: 3%; }
    .note:nth-child(3) { left: 6%; top: 34%; }
    .note:nth-child(4) { left: 54%; top: 37%; }
    .note:nth-child(5) { left: 4%; top: 66%; }
    .note:nth-child(6) { left: 52%; top: 69%; }

    .flow-card {
        aspect-ratio: 5 / 5.8;
    }

    .quote {
        inset: 7%;
        gap: 9px;
        padding: 16px 18px;
    }

    .cta-card {
        border-radius: 22px;
    }

    .cta-bg {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cta-col:nth-child(4) {
        display: none;
    }
}

/* จอแคบมาก: ปุ่ม LINE เหลือแค่ไอคอน ชื่อแบรนด์จะได้ไม่ชน */
@media (max-width: 420px) {
    .nav-cta {
        width: 44px;
        padding: 0;
    }

    .nav-cta span {
        display: none;
    }
}

/* ผู้ใช้ที่ตั้งค่าลดการเคลื่อนไหว: ไม่มี .motion อยู่แล้ว แต่กันพื้นหลังที่ไม่ได้ผูกกับ .motion ไว้ด้วย */
@media (prefers-reduced-motion: reduce) {
    .hc {
        transform: rotate(var(--r));
    }

    .scroll-cue {
        opacity: 1;
    }
}
