/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Sarabun', 'Inter', sans-serif;
  color: #1a1a1a;
  background: #fff;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow .3s;
}
.navbar.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.1); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  font-size: 1.75rem;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.logo span { color: #c0392b; }

.nav-links {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-links a {
  font-weight: 600;
  color: #444;
  font-size: .95rem;
  transition: color .2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: #c0392b;
  transition: width .25s;
  border-radius: 2px;
}
.nav-links a:hover { color: #c0392b; }
.nav-links a:hover::after { width: 100%; }

.btn-nav {
  background: #c0392b !important;
  color: #fff !important;
  padding: 9px 24px;
  border-radius: 30px;
  font-size: .9rem !important;
  transition: background .2s, transform .15s !important;
}
.btn-nav::after { display: none !important; }
.btn-nav:hover { background: #a93226 !important; transform: translateY(-1px) !important; color: #fff !important; }

.nav-right { display: flex; align-items: center; gap: 16px; }

/* Language toggle */
.lang-toggle {
  background: #f5f5f5;
  border: 1.5px solid #e0e0e0;
  border-radius: 20px;
  padding: 5px 14px;
  font-family: 'Inter', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #666;
  transition: background .2s;
}
.lang-toggle:hover { background: #eee; }
.lang-opt { transition: color .2s; }
.lang-opt.active { color: #c0392b; }
.lang-sep { color: #ccc; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: #333;
  border-radius: 2px;
  transition: all .3s;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 12px 28px 20px;
  gap: 4px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
}
.nav-mobile a {
  font-weight: 600;
  color: #444;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: .97rem;
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile.open { display: flex; }

/* ===== TICKER ===== */
.ticker {
  background: linear-gradient(90deg, #b71c1c, #c0392b);
  padding: 12px 0;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 0;
  animation: tickerScroll 38s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker span { padding: 0 22px; font-weight: 600; color: rgba(255,255,255,.92); font-size: .82rem; letter-spacing: .4px; }
.ticker .sep { color: rgba(255,255,255,.35); padding: 0; font-size: .7rem; }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: #0f0f0f;
  overflow: hidden;
}

/* Canvas particle layer */
.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  width: 100%; height: 100%;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 20% 50%, rgba(192,57,43,0.55) 0%, transparent 70%),
    radial-gradient(ellipse 50% 80% at 90% 20%, rgba(192,57,43,0.2) 0%, transparent 60%),
    linear-gradient(135deg, #1a0505 0%, #0f0f0f 60%, #1a1a1a 100%);
}

.hero-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.shape {
  position: absolute;
  border-radius: 50%;
  opacity: .06;
  background: #c0392b;
}
.s1 { width: 600px; height: 600px; top: -200px; right: -100px; }
.s2 { width: 300px; height: 300px; bottom: 50px; left: 10%; animation: float 8s ease-in-out infinite; }
.s3 { width: 150px; height: 150px; top: 30%; right: 20%; animation: float 6s ease-in-out infinite reverse; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.hero-content {
  position: relative;
  z-index: 3;
  color: #fff;
  padding: 140px 28px 100px;
  max-width: 760px;
}

/* Typewriter cursor */
.tw-cursor {
  display: inline-block;
  color: #ff6b6b;
  font-weight: 300;
  animation: cursorBlink .75s step-end infinite;
  margin-left: 2px;
}
@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Badge pulse dot */
.badge-pulse {
  display: inline-block;
  width: 7px; height: 7px;
  background: #ff6b6b;
  border-radius: 50%;
  position: relative;
}
.badge-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid #ff6b6b;
  animation: ringPulse 2s ease-out infinite;
}
@keyframes ringPulse {
  0%   { transform: scale(.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(192,57,43,0.2);
  border: 1px solid rgba(192,57,43,0.45);
  color: #ff8a80;
  font-size: .82rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: .5px;
}

/* ===== HERO BRAND NAME ===== */
.hero-brand-name {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -2px;
  line-height: 1;
  margin-bottom: 6px;
}
.hero-brand-name em {
  font-style: normal;
  color: #c0392b;
  position: relative;
  display: inline-block;
}
.hero-brand-name em::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #c0392b, #ff6b6b);
  border-radius: 2px;
  animation: underlineGrow 1s ease 1.5s both;
  transform-origin: left;
}
@keyframes underlineGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.hero-content h1 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 16px;
  letter-spacing: -0.3px;
  color: rgba(255,255,255,.85);
}
.highlight { color: #ff6b6b; font-weight: 700; }

.hero-content > p,
.hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,.7);
  margin-bottom: 36px;
  max-width: 500px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 56px; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  background: #c0392b;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 30px;
  transition: background .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 6px 24px rgba(192,57,43,0.4);
}
.btn-primary:hover { background: #a93226; transform: translateY(-2px); box-shadow: 0 10px 32px rgba(192,57,43,0.5); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.2);
  color: #fff;
  font-weight: 600;
  font-size: .97rem;
  padding: 13px 28px;
  border-radius: 30px;
  transition: background .2s, border-color .2s;
}
.btn-ghost:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.35); }

.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
}
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 1.9rem; font-weight: 800; color: #ff6b6b; line-height: 1; }
.stat span { font-size: .82rem; color: rgba(255,255,255,.6); margin-top: 4px; }
.stat-divider { width: 1px; height: 40px; background: rgba(255,255,255,.15); }

/* ===== SECTION BASE ===== */
.section { padding: 96px 0; }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-tag {
  display: inline-block;
  background: #fdf0ee;
  color: #c0392b;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.section-tag.red { background: rgba(192,57,43,0.12); color: #c0392b; }
.section-tag.white { background: rgba(255,255,255,.15); color: #fff; }

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: #111;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-sub {
  color: #666;
  font-size: 1rem;
  max-width: 540px;
  margin: 0 auto;
}

/* ===== SERVICE CARDS ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: #fff;
  border: 1.5px solid #f0f0f0;
  border-radius: 20px;
  padding: 36px 32px;
  transition: transform .28s, box-shadow .28s, border-color .28s;
  position: relative;
  overflow: hidden;
}

/* แถบสีแดงด้านบนทุกใบ */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  border-radius: 20px 20px 0 0;
}

/* แถบและพื้นสีแดงอ่อน */
.card:nth-child(1) { background: #fff8f8; border-color: #ffd7d7; }
.card:nth-child(2) { background: #fff5f5; border-color: #ffdede; }
.card:nth-child(3) { background: #fff9f9; border-color: #ffe0e0; }
.card:nth-child(4) { background: #fff6f6; border-color: #ffd5d5; }
.card:nth-child(5) { background: #fff8f8; border-color: #ffd9d9; }
.card:nth-child(6) { background: #fff5f5; border-color: #ffdcdc; }

.card:nth-child(1)::before { background: linear-gradient(90deg, #e57373, #ef9a9a); }
.card:nth-child(2)::before { background: linear-gradient(90deg, #ef9a9a, #ffcdd2); }
.card:nth-child(3)::before { background: linear-gradient(90deg, #e57373, #ef9a9a); }
.card:nth-child(4)::before { background: linear-gradient(90deg, #ef9a9a, #ffcdd2); }
.card:nth-child(5)::before { background: linear-gradient(90deg, #e57373, #ef9a9a); }
.card:nth-child(6)::before { background: linear-gradient(90deg, #ef9a9a, #ffcdd2); }

/* icon bg โทนชมพูอ่อน */
.card:nth-child(odd)  .card-icon-wrap { background: #ffe8e8; }
.card:nth-child(even) .card-icon-wrap { background: #fff0f0; }

/* ชื่อการ์ดสีแดงอ่อน */
.card h3 { color: #c0392b !important; }

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(192,57,43,0.15);
  border-color: #ffcdd2;
}

.card-icon-wrap {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.card-icon { font-size: 1.6rem; }
.card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
.card p { color: #666; font-size: .9rem; line-height: 1.65; margin-bottom: 20px; }
.card-link { font-size: .88rem; font-weight: 700; color: #c0392b; transition: gap .2s; }
.card-link:hover { text-decoration: underline; }

/* ===== RPA ===== */
.section-rpa { background: #fafafa; }

.rpa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.rpa-card {
  background: #fff;
  border-radius: 20px;
  padding: 36px 28px;
  border: 1.5px solid #f0f0f0;
  position: relative;
  transition: transform .25s, box-shadow .25s;
}
.rpa-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(192,57,43,0.08);
}

.rpa-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}
.rpa-num {
  font-size: 3rem;
  font-weight: 800;
  color: #f5c6c0;
  position: absolute;
  top: 20px; right: 24px;
  line-height: 1;
  user-select: none;
}

.rpa-card h4 { font-size: 1rem; font-weight: 700; color: #111; margin-bottom: 10px; }
.rpa-card p { color: #666; font-size: .88rem; line-height: 1.65; }

/* ===== WHY US ===== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.why-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 28px 24px;
  border-radius: 16px;
  border: 1.5px solid #f0f0f0;
  transition: box-shadow .2s, border-color .2s;
}
.why-item:hover {
  box-shadow: 0 8px 28px rgba(192,57,43,0.07);
  border-color: #f5c6c0;
}

.why-icon-wrap {
  width: 48px; height: 48px; min-width: 48px;
  background: #fdf0ee;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.why-icon { font-size: 1.4rem; }
.why-item h4 { font-size: .97rem; font-weight: 700; color: #111; margin-bottom: 6px; }
.why-item p { color: #666; font-size: .88rem; }

/* ===== CONTACT ===== */
.section-contact {
  background: linear-gradient(135deg, #1a0505 0%, #7b0e0e 50%, #c0392b 100%);
  position: relative;
  overflow: hidden;
}
.section-contact::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,.03);
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.contact-info h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}
.contact-info > p {
  color: rgba(255,255,255,.75);
  font-size: .97rem;
  margin-bottom: 36px;
}

.contact-details { display: flex; flex-direction: column; gap: 20px; }
.contact-details li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.cd-icon {
  font-size: 1.2rem;
  margin-top: 2px;
}
.contact-details strong {
  display: block;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  font-size: .85rem;
  margin-bottom: 2px;
}
.contact-details a,
.contact-details span { color: rgba(255,255,255,.7); font-size: .9rem; }
.contact-details a:hover { color: #fff; }

.form-wrapper {
  background: #fff;
  border-radius: 24px;
  padding: 44px 40px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
}

.form-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 28px;
  letter-spacing: -0.3px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.form-group label {
  font-weight: 600;
  color: #333;
  margin-bottom: 6px;
  font-size: .88rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  padding: 11px 14px;
  font-family: 'Sarabun', 'Inter', sans-serif;
  font-size: .93rem;
  color: #333;
  background: #fafafa;
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #c0392b;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}
.form-group input.error,
.form-group select.error { border-color: #e74c3c; }
.form-group textarea { resize: vertical; }

.btn-submit {
  width: 100%;
  background: #c0392b;
  color: #fff;
  font-family: 'Sarabun', 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  padding: 14px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  margin-top: 4px;
  box-shadow: 0 4px 16px rgba(192,57,43,0.3);
}
.btn-submit:hover { background: #a93226; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(192,57,43,0.4); }
.btn-submit:active { transform: translateY(0); }

.form-note {
  text-align: center;
  font-size: .78rem;
  color: #999;
  margin-top: 12px;
}

.form-msg {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  font-size: .9rem;
}
.form-msg.success { background: #eafaf1; color: #1a7a50; border: 1px solid #abecc7; }
.form-msg.error-msg { background: #fdecea; color: #c0392b; border: 1px solid #f5b7b1; }
.hidden { display: none; }

/* ===== FOOTER ===== */
.footer {
  background: #0f0f0f;
  color: #888;
  padding: 56px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer .logo { font-size: 1.7rem; font-weight: 800; color: #fff; margin-bottom: 0; display: block; letter-spacing: -0.5px; line-height: 1.1; }
.footer .logo span { color: #c0392b; }
.footer-company-full { font-size: .78rem; font-weight: 600; color: #c0392b; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px; margin-top: 2px; }
.footer-brand p { font-size: .88rem; color: #666; }

.footer-links, .footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links strong, .footer-contact strong {
  color: #fff;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.footer-links a, .footer-contact a, .footer-contact span {
  font-size: .88rem;
  color: #666;
  transition: color .2s;
}
.footer-links a:hover, .footer-contact a:hover { color: #c0392b; }

.copyright {
  text-align: center;
  font-size: .8rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 24px;
  color: #444;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
  .contact-info { text-align: center; }
  .contact-details { align-items: center; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .form-wrapper { padding: 28px 22px; }
  .hero-stats { gap: 20px; }
}

@media (max-width: 580px) {
  .hero-content { padding: 120px 16px 80px; }
  .section { padding: 64px 0; }
  .cards { grid-template-columns: 1fr; }
  .rpa-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .hero-stats { flex-wrap: wrap; gap: 16px; }
  .stat-divider { display: none; }
}
