/* =====================================================
   ai ง่ายจนงง — Landing Page Styles
   ===================================================== */

:root {
  --bg: #f3efe6;
  --bg-2: #ebe5d6;
  --ink: #0e0e0e;
  --ink-soft: #2a2a28;
  --muted: #6b6b66;
  --line: #d8d2c2;
  --accent: #ff4f2b;
  --accent-soft: #ffe9e1;
  --teal: #0e3d3a;
  --yellow: #fdd835;
  --cream: #faf7ee;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'IBM Plex Sans Thai', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  font-weight: 400;
}

.display, h1, h2, h3 {
  font-family: 'Bai Jamjuree', 'IBM Plex Sans Thai', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.mono { font-family: 'IBM Plex Mono', monospace; letter-spacing: 0.02em; }

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

/* ---------- NAV ---------- */
nav {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  z-index: 100;
  padding: 14px 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.logo {
  font-family: 'Bai Jamjuree', sans-serif;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 8px;
}
.logo-mark {
  width: 30px; height: 30px;
  background: var(--ink); color: var(--bg);
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  position: relative;
}
.logo-mark::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  bottom: -2px; right: -2px;
  border: 2px solid var(--bg);
}
.nav-cta {
  background: var(--ink); color: var(--cream);
  text-decoration: none;
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 14px; font-weight: 500;
  transition: transform 0.2s ease, background 0.2s ease;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-cta:hover { background: var(--accent); transform: translateY(-1px); }
.nav-cta::after { content: '→'; transition: transform 0.2s ease; }
.nav-cta:hover::after { transform: translateX(3px); }

/* ---------- HERO ---------- */
.hero {
  padding: 80px 0 100px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 60px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
  letter-spacing: 0.08em;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--ink);
}
.hero h1 {
  font-size: clamp(40px, 6vw, 76px);
  margin-bottom: 28px;
  font-weight: 700;
}
.hero h1 .accent { color: var(--accent); position: relative; display: inline-block; }
.hero h1 .underline { position: relative; display: inline-block; }
.hero h1 .underline::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0.05em;
  height: 0.35em;
  background: var(--yellow);
  z-index: -1;
  transform: skew(-2deg);
}
.hero-sub {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 560px;
  margin-bottom: 40px;
  line-height: 1.6;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 18px 28px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 6px 20px rgba(255, 79, 43, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(255, 79, 43, 0.35);
}
.btn-secondary { background: var(--ink); color: var(--cream); }
.btn-secondary:hover { transform: translateY(-2px); background: var(--teal); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--cream); }

.hero-stats {
  display: flex;
  gap: 40px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.stat-num {
  font-family: 'Bai Jamjuree', sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'IBM Plex Mono', monospace;
}

/* Hero visual: stack of 2 course poster previews */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1.05;
  max-width: 460px;
  margin-left: auto;
}
.hero-poster {
  position: absolute;
  width: 70%;
  aspect-ratio: 0.84 / 1;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(14, 14, 14, 0.18), 0 4px 12px rgba(14, 14, 14, 0.1);
  border: 1px solid var(--ink);
  background: var(--cream);
}
.hero-poster img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
}
.hero-poster.p1 {
  top: 0; right: 0;
  transform: rotate(4deg);
  z-index: 2;
}
.hero-poster.p2 {
  bottom: 0; left: 0;
  transform: rotate(-5deg);
  z-index: 1;
}
.hero-poster:hover {
  transform: rotate(0deg) scale(1.03);
  transition: transform 0.4s ease;
  z-index: 3;
}
.hero-badge {
  position: absolute;
  width: 84px; height: 84px;
  background: var(--yellow);
  color: var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border: 2px solid var(--ink);
  z-index: 3;
  top: 38%; right: -8%;
  font-family: 'Bai Jamjuree', sans-serif;
  box-shadow: 4px 4px 0 var(--ink);
}
.hero-badge .b-num { font-size: 22px; font-weight: 700; line-height: 1; }
.hero-badge .b-label { font-size: 10px; margin-top: 2px; }

/* ---------- SECTION ---------- */
section { padding: 100px 0; position: relative; }
.section-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0.05em;
}
.section-num::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--muted);
}
.section-title {
  font-size: clamp(32px, 4.5vw, 56px);
  margin-bottom: 24px;
  max-width: 800px;
}
.section-lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 56px;
}

/* ---------- INTRO VIDEO ---------- */
.video-section {
  padding: 88px 0;
  background: var(--cream);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.video-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 40px;
  align-items: center;
}
.video-copy h2 {
  font-size: clamp(30px, 4vw, 48px);
  margin-bottom: 18px;
}
.video-copy p {
  color: var(--ink-soft);
  font-size: 17px;
  margin-bottom: 28px;
  max-width: 420px;
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: 8px 8px 0 var(--accent);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ---------- PAIN POINTS ---------- */
.pain-section { background: var(--bg-2); }
.pain-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--ink);
  border-radius: 20px;
  overflow: hidden;
  background: var(--cream);
}
.pain-item {
  padding: 36px 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease;
  cursor: default;
}
.pain-item:nth-child(2n) { border-right: none; }
.pain-item:nth-last-child(-n+2) { border-bottom: none; }
.pain-item:hover { background: var(--accent-soft); }
.pain-icon {
  width: 44px; height: 44px;
  background: var(--ink);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bai Jamjuree', sans-serif;
  font-weight: 700;
  margin-bottom: 18px;
  font-size: 20px;
}
.pain-item h3 { font-size: 22px; margin-bottom: 10px; }
.pain-item p { color: var(--muted); font-size: 15px; }

/* ---------- BRAND INTRO ---------- */
.brand-intro { text-align: center; padding: 120px 0; }
.brand-intro .quote-mark {
  font-family: 'Bai Jamjuree', sans-serif;
  font-size: 80px;
  color: var(--accent);
  line-height: 0.8;
  margin-bottom: 16px;
}
.brand-intro h2 {
  font-size: clamp(32px, 5vw, 60px);
  max-width: 900px;
  margin: 0 auto 32px;
  line-height: 1.2;
}
.brand-intro h2 em { font-style: normal; color: var(--accent); font-weight: 700; }
.brand-intro p {
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 580px;
  margin: 0 auto;
}

/* ---------- COURSES ---------- */
.courses-section { background: var(--bg-2); }
.courses-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}
.course-card {
  background: var(--cream);
  border: 1.5px solid var(--ink);
  border-radius: 24px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.course-card:hover {
  transform: translateY(-6px);
  box-shadow: 8px 8px 0 var(--ink);
}

.course-poster-wrap {
  position: relative;
  background: linear-gradient(135deg, #f5f0e3, #e8e1cf);
  overflow: hidden;
  border-bottom: 1.5px solid var(--ink);
}
.course-poster-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}
.course-card:hover .course-poster-wrap img { transform: scale(1.04); }

.course-tag-float {
  position: absolute;
  top: 16px; left: 16px;
  background: var(--ink);
  color: var(--cream);
  padding: 8px 14px;
  border-radius: 100px;
  font-size: 11px;
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  z-index: 2;
}
.course-tag-float.accent { background: var(--accent); color: white; }

.course-body {
  padding: 24px 24px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.course-card h3 {
  font-size: 24px;
  margin-bottom: 8px;
  line-height: 1.2;
}
.course-tagline {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.course-meta {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.course-meta-item {
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 5px 10px;
  border-radius: 100px;
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
}
.course-divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}

.course-section-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  letter-spacing: 0.08em;
}

.course-list {
  list-style: none;
  margin-bottom: 24px;
}
.course-list li {
  padding: 5px 0 5px 22px;
  position: relative;
  font-size: 14px;
  line-height: 1.5;
}
.course-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 14px;
  width: 12px; height: 2px;
  background: var(--ink);
}

.course-price-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  margin-top: auto;
}
.price {
  font-family: 'Bai Jamjuree', sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
}
.price-currency {
  font-size: 20px;
  font-weight: 500;
  margin-right: 4px;
  opacity: 0.7;
}
.price-old {
  font-size: 16px;
  color: var(--muted);
  text-decoration: line-through;
}
.course-cta {
  width: 100%;
  justify-content: center;
}

/* ---------- WHY US ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 32px;
}
.why-item {
  padding: 32px 24px;
  border-top: 2px solid var(--ink);
  transition: padding-left 0.3s ease;
}
.why-item:hover { padding-left: 8px; }
.why-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 16px;
}
.why-item h3 { font-size: 22px; margin-bottom: 12px; }
.why-item p { font-size: 15px; color: var(--muted); }

/* ---------- INSTRUCTOR ---------- */
.instructor-section {
  background: var(--ink);
  color: var(--cream);
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}
.instructor-section::before {
  content: 'INSTRUCTOR';
  position: absolute;
  bottom: -30px;
  right: -20px;
  font-family: 'Bai Jamjuree', sans-serif;
  font-weight: 700;
  font-size: clamp(80px, 14vw, 200px);
  color: rgba(255,255,255,0.04);
  letter-spacing: -0.05em;
  pointer-events: none;
  line-height: 1;
}
.instructor-inner {
  position: relative;
  z-index: 2;
  max-width: 760px;
}
.instructor-section .section-num { color: rgba(255,255,255,0.5); }
.instructor-section .section-num::before { background: rgba(255,255,255,0.5); }
.instructor-section h2 {
  font-size: clamp(32px, 5vw, 56px);
  margin-bottom: 28px;
  line-height: 1.15;
}
.instructor-section h2 em {
  font-style: normal;
  color: var(--accent);
  font-weight: 700;
}
.instructor-bio {
  font-size: 18px;
  color: rgba(255,255,255,0.78);
  margin-bottom: 36px;
  line-height: 1.7;
  max-width: 620px;
}
.instructor-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.instructor-tag {
  border: 1px solid rgba(255,255,255,0.25);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-family: 'IBM Plex Mono', monospace;
}
.instructor-note {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  font-family: 'IBM Plex Mono', monospace;
  border-left: 2px solid var(--accent);
  padding: 10px 16px;
}

/* ---------- FAQ ---------- */
.faq-list { margin-top: 32px; border-top: 1px solid var(--ink); }
.faq-item { border-bottom: 1px solid var(--ink); }
.faq-q {
  width: 100%;
  background: transparent;
  border: none;
  padding: 28px 0;
  text-align: left;
  font-family: 'Bai Jamjuree', sans-serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  transition: color 0.2s ease;
}
.faq-q:hover { color: var(--accent); }
.faq-toggle {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  transition: transform 0.3s ease, background 0.2s ease;
}
.faq-item.open .faq-toggle {
  transform: rotate(45deg);
  background: var(--accent);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.7;
  padding-right: 56px;
}
.faq-item.open .faq-a {
  max-height: 320px;
  padding-bottom: 28px;
}

/* ---------- FINAL CTA ---------- */
.final-cta {
  background: var(--accent);
  color: white;
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: 'AI ง่ายจนงง';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Bai Jamjuree', sans-serif;
  font-weight: 700;
  font-size: clamp(80px, 18vw, 240px);
  color: rgba(255,255,255,0.08);
  white-space: nowrap;
  line-height: 1;
  pointer-events: none;
}
.final-cta-inner { position: relative; z-index: 2; text-align: center; }
.final-cta h2 {
  font-size: clamp(40px, 6vw, 72px);
  margin-bottom: 24px;
  line-height: 1.1;
}
.final-cta p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 40px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.final-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.final-ctas .btn { background: var(--ink); color: var(--cream); }
.final-ctas .btn:hover { background: white; color: var(--ink); }
.final-ctas .btn-light { background: white; color: var(--ink); }
.final-ctas .btn-light:hover { background: var(--ink); color: var(--cream); }
.line-qr {
  margin-top: 28px;
}
.line-qr > img {
  display: block;
  width: min(190px, 58vw);
  height: auto;
  margin: 0 auto;
  border: 8px solid white;
  border-radius: 8px;
  background: white;
}
.line-add-friend {
  display: inline-block;
  margin-top: 16px;
  line-height: 0;
}
.line-add-friend img {
  display: block;
  height: 36px;
  width: auto;
}

/* ---------- FOOTER ---------- */
footer {
  background: var(--ink);
  color: var(--cream);
  padding: 60px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .logo { color: var(--cream); margin-bottom: 16px; }
.footer-brand .logo-mark { background: var(--cream); color: var(--ink); }
.footer-brand p {
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  max-width: 320px;
}
.footer-col h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.footer-col a, .footer-col li {
  display: block;
  color: var(--cream);
  text-decoration: none;
  font-size: 15px;
  padding: 6px 0;
  transition: color 0.2s ease;
  list-style: none;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- ANIMATIONS ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero { padding: 50px 0 72px; }
  .hero-visual {
    max-width: min(320px, 84vw);
    margin: 4px auto 0;
    overflow: visible;
  }
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
  .stat-num { font-size: clamp(24px, 7vw, 32px); }
  .stat-label {
    font-size: 12px;
    line-height: 1.35;
  }
  .pain-grid, .courses-grid, .why-grid, .footer-grid {
    grid-template-columns: 1fr;
  }
  .video-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .video-copy p { max-width: 620px; }
  .pain-item {
    border-right: none !important;
    border-bottom: 1px solid var(--line) !important;
  }
  .pain-item:last-child { border-bottom: none !important; }
  .why-grid { gap: 0; }
  .why-item { border-top: 1px solid var(--line); }
  .why-item:first-child { border-top: 2px solid var(--ink); }
  section { padding: 70px 0; }
  .brand-intro { padding: 80px 0; }
  .instructor-section { padding: 80px 0; }
  .container { padding: 0 20px; }
  .hero h1 { font-size: clamp(36px, 9vw, 56px); }
  .course-body { padding: 24px 22px 28px; }
  .course-card h3 { font-size: 22px; }
  .price { font-size: 38px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .nav-cta { padding: 8px 14px; font-size: 13px; }
  .logo { font-size: 16px; }
  .hero-badge {
    width: 70px;
    height: 70px;
    right: 2%;
    top: auto;
    bottom: 8%;
  }
  .hero-badge .b-num { font-size: 18px; }
}

@media (max-width: 480px) {
  .hero-grid { gap: 32px; }
  .hero-stats { gap: 10px; }
  .btn { padding: 16px 22px; font-size: 14px; }
  .video-section { padding: 64px 0; }
  .video-frame {
    border-radius: 12px;
    box-shadow: 5px 5px 0 var(--accent);
  }
  .hero-ctas .btn {
    width: 100%;
    justify-content: center;
  }
}
