/* Donjai Connect landing — "Warm ครีม-ทอง" (เคาะ 2026-07-14)
   Layout: v3 (sikram-inspired energy, own design language: chat-bubble motif) */

:root {
  --bg: #faf3e7;
  --bg2: #ffffff;
  --soft: #f4e7d0;
  --tx: #2b2118;
  --mut: #6d5c49;
  --bord: rgba(60, 40, 20, .13);
  --accent: #c9762b;
  --grad-a: #8a4d1c;
  --grad-b: #d99a3e;
  --cta: #2b2118;
  --cta-tx: #faf3e7;
  --shadow: rgba(60, 40, 20, .16);
  --foot: #2b2118;
  --line: #06c755;
  --font: 'Leelawadee UI', 'Noto Sans Thai', 'Thonburi', 'Sukhumvit Set', system-ui, sans-serif;
  --demo-t: 14s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--tx); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }

.wrapx { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ── top bar ── */
.bar2 { position: sticky; top: 0; z-index: 60; background: rgba(250, 243, 231, .88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--bord); }
.bar2-in { max-width: 1180px; margin: 0 auto; padding: 0 24px; height: 62px; display: flex; align-items: center; gap: 28px; }
.bar2 .wm { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; color: var(--tx); text-decoration: none; margin-right: auto; }
.bar2 .logo { height: 30px; width: auto; filter: brightness(0) opacity(.82); }
.bar2 .wm i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-left: 4px; }
.bar2 nav { display: flex; gap: 22px; font-size: .88rem; font-weight: 600; color: var(--mut); }
.bar2 nav a { color: inherit; text-decoration: none; }
.bar2 .top-cta { padding: 10px 22px; font-size: .85rem; border-radius: 999px; background: var(--cta); color: var(--cta-tx); font-weight: 800; text-decoration: none; }

/* ── hero (เต็มความสูงจอ) ── */
.hero3 {
  min-height: calc(100vh - 62px); display: flex; align-items: center; padding: 40px 0 60px; overflow: hidden;
  background:
    radial-gradient(60% 55% at 80% 10%, rgba(217, 154, 62, .3), transparent 60%),
    radial-gradient(45% 40% at 5% 70%, rgba(201, 118, 43, .14), transparent 60%);
}
.hero3-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 40px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px;
  background: var(--bg2); border: 1px solid var(--bord); font-size: .8rem; font-weight: 700; color: var(--accent);
  box-shadow: 0 4px 14px var(--shadow);
}
.chip .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--line); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(6, 199, 85, .5); } 55% { box-shadow: 0 0 0 7px rgba(6, 199, 85, 0); } }
.hero3 h1 { font-size: clamp(2.5rem, 5.6vw, 4rem); line-height: 1.12; margin: 22px 0 6px; font-weight: 800; }
.hero3 h1 .grad { background: linear-gradient(92deg, var(--grad-a), var(--grad-b)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero3 .sub { font-size: clamp(1.1rem, 2.2vw, 1.45rem); font-weight: 700; color: var(--mut); margin-bottom: 14px; }
.hero3 .lede2 { color: var(--mut); max-width: 46ch; margin-bottom: 26px; }
.cta2 { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.cta2 .main {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 30px; border-radius: 14px;
  background: var(--cta); color: var(--cta-tx); font-weight: 800; text-decoration: none; font-size: 1rem;
  box-shadow: 0 12px 30px var(--shadow); transition: transform .15s;
}
.cta2 .main:hover { transform: translateY(-2px); }
.cta2 .main:focus-visible, .top-cta:focus-visible, .linefab:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.trust2 { display: flex; gap: 20px; margin-top: 22px; flex-wrap: wrap; font-size: .84rem; color: var(--mut); font-weight: 600; }
.trust2 .ok::before { content: '✓ '; color: var(--line); font-weight: 800; }
.stats { display: flex; gap: 14px; margin-top: 38px; flex-wrap: wrap; }
.stat { background: var(--bg2); border: 1px solid var(--bord); border-radius: 18px 18px 18px 4px; padding: 14px 20px; box-shadow: 0 4px 16px var(--shadow); }
.stat .n { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; color: var(--accent); }
.stat p { font-size: .78rem; color: var(--mut); margin-top: 2px; }

/* ── phone demo + chat-bubble callouts ── */
.hero3-demo { position: relative; display: flex; justify-content: center; }
.float {
  position: absolute; z-index: 5; display: flex; align-items: center; gap: 8px;
  background: var(--bg2); border-radius: 18px; padding: 10px 16px; font-size: .76rem; font-weight: 800;
  box-shadow: 0 12px 30px var(--shadow); color: var(--tx); animation: bob 4.5s ease-in-out infinite;
}
.float::after { content: ''; position: absolute; bottom: -7px; width: 14px; height: 14px; background: inherit; border-radius: 3px; transform: rotate(45deg); }
.f1 { top: 9%; left: 2%; } .f1::after { left: 18px; }
.f2 { top: 44%; right: -2%; animation-delay: 1.2s; background: var(--line); color: #fff; } .f2::after { right: 18px; }
.f3 { bottom: 8%; left: 6%; animation-delay: 2.2s; } .f3::after { left: 24px; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.phone {
  position: relative; z-index: 1; width: 300px; height: 610px; border-radius: 46px;
  background: #1a1a1d; border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 50px 90px var(--shadow), inset 0 0 0 8px #0f0f11; padding: 14px;
}
.phone-notch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 110px; height: 22px; border-radius: 0 0 14px 14px; background: #0f0f11; z-index: 3; }
.screen { width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: #eef1f6; display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 30px 16px 12px; background: #23232a; color: #fff; font-size: .82rem; font-weight: 700; }
.chat-back { font-size: 1.2rem; line-height: 1; color: #9a9aa2; }
.chat-avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: .6rem; font-weight: 800; }
.chat-body { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; overflow: hidden; }

.msg { display: flex; margin-bottom: 10px; }
.msg.me { justify-content: flex-end; }
.msg.bot { justify-content: flex-start; }
.m-scan, .m-typing { overflow: hidden; }
.bubble { max-width: 82%; padding: 9px 13px; border-radius: 16px; background: #fff; color: #131316; font-size: .78rem; line-height: 1.5; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.msg.bot .bubble { border-top-left-radius: 4px; }

.thumb { width: 116px; height: 116px; border-radius: 14px; position: relative; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.selfie {
  border: 3px solid var(--line);
  background:
    radial-gradient(38px 44px at 50% 42%, #6b4f3f 96%, transparent),
    radial-gradient(46px 30px at 50% 92%, #23232a 96%, transparent),
    linear-gradient(160deg, #ffd9a0, #f7a97b);
}
.corner { position: absolute; width: 16px; height: 16px; border: 2.5px solid #fff; opacity: 0; }
.tl { top: 6px; left: 6px; border-right: 0; border-bottom: 0; }
.tr { top: 6px; right: 6px; border-left: 0; border-bottom: 0; }
.bl { bottom: 6px; left: 6px; border-right: 0; border-top: 0; }
.br { bottom: 6px; right: 6px; border-left: 0; border-top: 0; }

.ph { width: 104px; height: 78px; border-radius: 12px; }
.ph-a { background: radial-gradient(26px 30px at 30% 55%, #6b4f3f 94%, transparent), linear-gradient(150deg, #9fd68a, #4e9e57); }
.ph-b { background: radial-gradient(22px 26px at 62% 48%, #6b4f3f 94%, transparent), linear-gradient(150deg, #ffc36b, #e0764a); }
.ph-c { background: radial-gradient(24px 28px at 45% 52%, #6b4f3f 94%, transparent), linear-gradient(150deg, #8fb6e8, #4a6ba8); }
.badge { position: absolute; right: 6px; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--line); color: #fff; font-size: .62rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }

.scan-card { display: flex; align-items: center; gap: 10px; }
.scan-card p { font-size: .74rem; color: #55555c; }
.scan-face { width: 44px; height: 44px; flex: none; border-radius: 10px; border: 2px solid var(--line); position: relative; overflow: hidden; background: linear-gradient(160deg, #ffd9a0, #f7a97b); }
.scan-line { position: absolute; left: 0; right: 0; height: 3px; background: var(--line); box-shadow: 0 0 10px var(--line); animation: sweep 1.4s ease-in-out infinite alternate; }
@keyframes sweep { from { top: 4%; } to { top: 88%; } }
.dots i { display: inline-block; animation: blink 1.2s infinite; font-style: normal; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
.typing { display: flex; gap: 4px; padding: 12px 14px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #b5b5bd; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }

/* demo timeline — loop 14s (% = t/14s) */
.m-selfie, .m-scan, .m-typing, .m-found, .m-p1, .m-p2, .m-p3 { opacity: 0; }
.m-selfie { animation: seg-selfie var(--demo-t) linear infinite; }
.m-scan   { animation: seg-scan   var(--demo-t) linear infinite; }
.m-typing { animation: seg-typing var(--demo-t) linear infinite; }
.m-found  { animation: seg-found  var(--demo-t) linear infinite; }
.m-p1     { animation: seg-p1     var(--demo-t) linear infinite; }
.m-p2     { animation: seg-p2     var(--demo-t) linear infinite; }
.m-p3     { animation: seg-p3     var(--demo-t) linear infinite; }
.m-selfie .corner { animation: seg-corners var(--demo-t) linear infinite; }

@keyframes seg-selfie {
  0%, 2.5% { opacity: 0; transform: translateY(10px) scale(.95); }
  4.5%, 91% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: none; }
}
@keyframes seg-corners {
  0%, 13% { opacity: 0; }
  15%, 38% { opacity: 1; }
  40%, 100% { opacity: 0; }
}
@keyframes seg-scan {
  0%, 13% { opacity: 0; transform: translateY(10px) scale(.95); max-height: 0; margin-bottom: 0; }
  15% { opacity: 1; transform: none; max-height: 96px; margin-bottom: 10px; }
  38% { opacity: 1; transform: none; max-height: 96px; margin-bottom: 10px; }
  40%, 100% { opacity: 0; transform: none; max-height: 0; margin-bottom: 0; }
}
@keyframes seg-typing {
  0%, 38% { opacity: 0; max-height: 0; margin-bottom: 0; }
  40% { opacity: 1; max-height: 44px; margin-bottom: 10px; }
  45% { opacity: 1; max-height: 44px; margin-bottom: 10px; }
  47%, 100% { opacity: 0; max-height: 0; margin-bottom: 0; }
}
@keyframes seg-found {
  0%, 45% { opacity: 0; transform: translateY(10px) scale(.95); }
  47%, 91% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: none; }
}
@keyframes seg-p1 {
  0%, 51% { opacity: 0; transform: translateY(12px) scale(.92); }
  54%, 91% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: none; }
}
@keyframes seg-p2 {
  0%, 57% { opacity: 0; transform: translateY(12px) scale(.92); }
  60%, 91% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: none; }
}
@keyframes seg-p3 {
  0%, 63% { opacity: 0; transform: translateY(12px) scale(.92); }
  66%, 91% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: none; }
}

/* ── sections ── */
.sec2 { padding: 84px 0; }
.alt { background: var(--soft); border-top: 1px solid var(--bord); border-bottom: 1px solid var(--bord); }
.sec2-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.sec2-head .chip { margin-bottom: 16px; }
.sec2-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 12px; font-weight: 800; }
.sec2-head p { color: var(--mut); }

.feat4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.fcard { background: var(--bg2); border: 1px solid var(--bord); border-radius: 20px; padding: 26px 24px; transition: transform .18s, box-shadow .18s; }
.fcard:hover { transform: translateY(-4px); box-shadow: 0 18px 40px var(--shadow); }
.fcard .ic { width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 16px; background: rgba(201, 118, 43, .16); }
.fcard h3 { margin-bottom: 8px; font-size: 1rem; font-weight: 700; }
.fcard p { font-size: .86rem; color: var(--mut); }

.how2-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.hcard { position: relative; background: var(--bg2); border: 1px solid var(--bord); border-radius: 22px; padding: 30px 26px; overflow: hidden; }
.hcard .num { position: absolute; right: 14px; top: 4px; font-size: 4.6rem; font-weight: 800; color: rgba(201, 118, 43, .14); }
.hcard .art { height: 110px; border-radius: 14px; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; font-size: 3rem; background: rgba(201, 118, 43, .08); border: 1px dashed var(--bord); }
.hcard h3 { margin-bottom: 8px; font-weight: 700; }
.hcard p { font-size: .88rem; color: var(--mut); }

/* use-case chips */
.cases2 { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.case2 { display: inline-flex; align-items: center; gap: 10px; background: var(--bg2); border: 1px solid var(--bord); border-radius: 999px; padding: 12px 22px; font-weight: 700; font-size: .92rem; box-shadow: 0 2px 10px var(--shadow); }
.case2 span { font-size: 1.2rem; }

/* photo strip (รูปจริงจากงาน — เลื่อนวนอัตโนมัติ) */
.strip { overflow: hidden; padding: 20px 0 6px; }
.strip-in { display: flex; gap: 16px; width: max-content; animation: slide 40s linear infinite; }
@keyframes slide { to { transform: translateX(-50%); } }
.shot { width: 220px; height: 147px; border-radius: 16px; flex: none; object-fit: cover; box-shadow: 0 6px 20px var(--shadow); }
.strip-cap { text-align: center; font-size: .78rem; color: var(--mut); margin: 14px 0 6px; }

/* plans */
.plans2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.pcard { position: relative; background: var(--bg2); border: 1px solid var(--bord); border-radius: 22px; padding: 34px 28px; display: flex; flex-direction: column; gap: 6px; }
.pcard .tag2 { align-self: flex-start; font-size: .72rem; font-weight: 800; padding: 5px 14px; border-radius: 999px; margin-bottom: 10px; background: rgba(201, 118, 43, .14); color: var(--accent); }
.pcard h3 { font-size: 1.5rem; font-weight: 800; }
.pcard .for { font-size: .84rem; color: var(--mut); margin-bottom: 14px; }
.pcard .price { font-size: 1.1rem; font-weight: 800; color: var(--accent); margin-bottom: 16px; }
.pcard ul { list-style: none; display: flex; flex-direction: column; gap: 10px; flex: 1; margin-bottom: 20px; }
.pcard li { font-size: .88rem; color: var(--mut); }
.pcard li::before { content: '✓  '; color: var(--line); font-weight: 800; }
.pcard .go { text-align: center; padding: 13px; border-radius: 12px; font-weight: 800; text-decoration: none; background: rgba(201, 118, 43, .12); color: var(--accent); }
.pcard.hot { border: 2px solid var(--accent); box-shadow: 0 20px 50px var(--shadow); }
.pcard.hot .go { background: var(--cta); color: var(--cta-tx); }
.hotbadge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800; padding: 5px 16px; border-radius: 999px; }

/* LINE floating button */
.linefab {
  position: fixed; right: 20px; bottom: 20px; z-index: 70; display: flex; align-items: center; gap: 10px;
  padding: 14px 22px; background: var(--line); color: #fff; font-weight: 800; font-size: .92rem;
  border-radius: 999px; text-decoration: none; box-shadow: 0 14px 40px rgba(6, 199, 85, .45);
  animation: fab-in .5s ease .8s backwards;
}
.linefab .b { width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; }
@keyframes fab-in { from { transform: translateY(80px); opacity: 0; } }

.foot2 { background: var(--foot); color: #b3a591; padding: 26px 0; font-size: .82rem; }
.foot2 .wrapx { display: flex; justify-content: space-between; }
.foot2 a { color: #d8c8ae; text-decoration: none; }

/* ── responsive ── */
@media (max-width: 950px) {
  .hero3 { min-height: 0; padding: 48px 0 64px; }
  .hero3-grid { grid-template-columns: 1fr; }
  .feat4 { grid-template-columns: repeat(2, 1fr); }
  .how2-grid, .plans2 { grid-template-columns: 1fr; }
  .bar2 nav { display: none; }
  .phone { width: 272px; height: 556px; }
  .sec2 { padding: 60px 0; }
}
@media (max-width: 560px) { .feat4 { grid-template-columns: 1fr; } .foot2 .wrapx { flex-direction: column; gap: 6px; text-align: center; } }

/* accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .m-selfie, .m-found, .m-p1, .m-p2, .m-p3 { animation: none; opacity: 1; }
  .m-scan, .m-typing { animation: none; opacity: 0; position: absolute; pointer-events: none; }
  .m-selfie .corner, .scan-line, .dots i, .typing i { animation: none; }
  .float, .chip .pulse, .linefab, .strip-in { animation: none; }
  .fcard, .cta2 .main { transition: none; }
}
