/*
  styles.css
  ------------------------------------------------------------
  ไฟล์นี้คือ CSS หลักของหน้าเว็บ (layout + หน้าตาของแต่ละ section)
  ใช้ค่าตัวแปรจาก tokens.css เกือบทั้งหมด (สี/ฟอนต์/ระยะห่าง)
  ท่าเคลื่อนไหว (animation) แยกไปอยู่ใน motion.css

  โครงสร้างไฟล์นี้เรียงตามลำดับ section บนหน้าเว็บจริง
  อยากแก้ section ไหน กด Cmd+F หาคอมเมนต์ชื่อ section นั้นได้เลย
  ------------------------------------------------------------
*/

/* ========================================================
   RESET & BASE
   ======================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-th), var(--font-en), sans-serif;
  font-weight: var(--fw-regular);
  color: var(--color-black);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ให้ scroll ไม่โดนบัง sticky bar ตอนกด anchor link */
:target,
[id] {
  scroll-margin-top: calc(var(--sticky-bar-height) + 16px);
}

h1, h2, h3, h4 {
  font-weight: var(--fw-extrabold);
  line-height: 1.1;
}

/* ภาษาอังกฤษ/ตัวเลขที่โชว์เป็น label หรือ CTA -> uppercase + ชิดตัวอักษร
   (ภาษาไทยไม่มี case ให้ปรับ จึงใช้ weight หนัก + ขนาดใหญ่แทนความรู้สึก "ตะโกน") */
.eyebrow, .btn-cta, .label-en {
  text-transform: uppercase;
  letter-spacing: -0.01em;
  font-family: var(--font-en), var(--font-th), sans-serif;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

.section {
  padding: var(--space-xl) 0;
}

.section--black {
  background: var(--gradient-dark);
  color: var(--color-offwhite);
}

.section--yellow {
  background: var(--gradient-yellow);
  color: var(--color-black);
}

.section--offwhite {
  background: var(--color-offwhite);
  color: var(--color-black);
}

.section--white {
  background: var(--color-white);
  color: var(--color-black);
}

.eyebrow {
  display: inline-block;
  font-size: var(--fs-caption);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-xs);
}

.section-title {
  font-size: var(--fs-h2);
  margin-bottom: var(--space-md);
}

/* ========================================================
   BUTTONS
   ======================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 1rem 2rem;
  font-weight: var(--fw-extrabold);
  font-size: 1.125rem;
  border: var(--border-width) solid var(--color-black);
  border-radius: var(--radius-md);
  white-space: nowrap;
}

.btn-cta {
  background: var(--gradient-yellow);
  color: var(--color-black);
}

.btn-cta:hover {
  background: var(--color-black);
  color: var(--color-yellow);
}

.btn-outline {
  background: transparent;
  border-color: currentColor;
}

/* ========================================================
   0) STICKY TOP/BOTTOM BAR
   ======================================================== */

.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-black);
  color: var(--color-offwhite);
  border-bottom: var(--border-width) solid var(--color-yellow);
}

.sticky-bar--top {
  top: 0;
}

.sticky-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--sticky-bar-height);
}

.sticky-bar__logo img {
  height: 32px;
}

.sticky-bar__countdown {
  font-family: var(--font-en);
  font-weight: var(--fw-bold);
  font-size: var(--fs-caption);
  color: var(--color-yellow);
}

.sticky-bar--bottom {
  bottom: 0;
  top: auto;
  display: none; /* โชว์เฉพาะ mobile ผ่าน media query ด้านล่าง */
  border-bottom: none;
  border-top: var(--border-width) solid var(--color-yellow);
}

.sticky-bar--bottom .sticky-bar__inner {
  justify-content: center;
  padding: var(--space-xs) 0;
}

@media (max-width: 768px) {
  .sticky-bar--bottom {
    display: block;
  }
  body {
    padding-bottom: 72px; /* กันเนื้อหาโดนแถบล่างบัง */
  }
}

/* ========================================================
   1) HERO
   ======================================================== */

.hero {
  position: relative;
  padding-top: calc(var(--sticky-bar-height) + var(--space-lg));
  padding-bottom: var(--space-lg);
  background: var(--gradient-dark);
  color: var(--color-offwhite);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-yellow-glow);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-lg);
  align-items: center;
}

.hero__eyebrow {
  color: var(--color-yellow);
}

.hero__headline {
  font-size: var(--fs-hero);
  font-weight: var(--fw-black);
  color: var(--color-offwhite);
  margin-bottom: var(--space-sm);
}

.hero__headline em {
  font-style: normal;
  color: var(--color-yellow);
}

.hero__subhead {
  font-size: 1.25rem;
  max-width: 44ch;
  margin-bottom: var(--space-md);
  color: rgba(245, 243, 235, 0.85);
}

.hero__cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  margin-bottom: var(--space-sm);
}

.hero__countdown {
  font-family: var(--font-en);
}

.hero__media {
  position: relative;
  border: var(--border-width) solid var(--color-yellow);
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 5;
  background: var(--muted-on-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-yellow);
  font-weight: var(--fw-bold);
  text-align: center;
  padding: var(--space-sm);
  overflow: hidden;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================
   TRUST / STATS MARQUEE (หลัง Hero)
   ======================================================== */

.trust-bar {
  background: var(--gradient-yellow);
  color: var(--color-black);
  padding: var(--space-sm) 0;
  font-weight: var(--fw-extrabold);
  font-size: 1.25rem;
  border-bottom: var(--border-width) solid var(--color-black);
}

/* ========================================================
   2) PROBLEM / AGITATION
   ======================================================== */

.problem {
  background: var(--gradient-dark);
  color: var(--color-offwhite);
}

.problem__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.problem__card {
  border: var(--border-width) solid var(--border-on-dark);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.problem__card-num {
  font-family: var(--font-en);
  font-size: 3rem;
  font-weight: var(--fw-black);
  color: var(--color-yellow);
  display: block;
  margin-bottom: var(--space-xs);
}

@media (max-width: 900px) {
  .problem__grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================
   3) THE CEILING
   ======================================================== */

.ceiling__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.ceiling__col {
  border: var(--border-width) solid var(--color-black);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.ceiling__col--in {
  opacity: 0.6;
}

.ceiling__col--on {
  background: var(--gradient-yellow);
}

.ceiling__heading {
  display: block;
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: var(--fw-extrabold);
  margin-bottom: var(--space-xs);
}

.ceiling__accent {
  font-weight: var(--fw-black);
}

.ceiling__sub {
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  opacity: 0.6;
  margin-bottom: var(--space-sm);
}

.ceiling__col ul {
  border-top: 1px solid currentColor;
  padding-top: var(--space-xs);
  opacity: 0.7;
}

.ceiling__col li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.1rem;
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
}

.ceiling__col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

@media (max-width: 700px) {
  .ceiling__grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================
   4) SOLUTION / MECHANISM
   ======================================================== */

.solution {
  background: var(--gradient-yellow);
  color: var(--color-black);
}

.solution__box {
  border: var(--border-width) solid var(--color-black);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  background: var(--color-white);
  max-width: 760px;
  margin: var(--space-md) auto 0;
  text-align: center;
}

.solution__box p {
  font-size: 1.25rem;
  font-weight: var(--fw-bold);
}

/* ========================================================
   5) VIDEO PREVIEW
   ======================================================== */

.video-preview__frame {
  border: var(--border-width) solid var(--color-black);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  max-width: 900px;
  margin: var(--space-md) auto 0;
  background: var(--gradient-dark);
  color: var(--color-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-bold);
  text-align: center;
  padding: var(--space-sm);
}

/* ========================================================
   6) CURRICULUM BREAKDOWN
   โครงสร้าง 2 ชั้น: หัวข้อใหญ่ (accordion) -> รายบทเรียนข้างใน
   ======================================================== */

.curriculum__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.curriculum__chapter {
  border: var(--border-width) solid var(--color-black);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  overflow: hidden;
}

.curriculum__chapter-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-md);
  text-align: left;
}

.curriculum__chapter-num {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-pill);
  background: var(--gradient-yellow);
  color: var(--color-black);
  font-family: var(--font-en);
  font-size: 1.25rem;
  font-weight: var(--fw-black);
  display: flex;
  align-items: center;
  justify-content: center;
}

.curriculum__chapter-heading {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
}

.curriculum__chapter-heading h3 {
  font-size: 1.25rem;
  line-height: 1.3;
}

.curriculum__chapter-count {
  font-weight: var(--fw-regular);
  font-size: 0.85rem;
  opacity: 0.6;
}

.curriculum__chapter-blurb {
  font-size: 0.95rem;
  font-weight: var(--fw-regular);
  opacity: 0.7;
  line-height: 1.4;
}

.curriculum__chapter-toggle .accordion__icon {
  flex-shrink: 0;
  font-family: var(--font-en);
  font-size: 1.5rem;
}

.curriculum__lesson {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
}

.curriculum__lesson + .curriculum__lesson {
  border-top: 1px solid var(--muted-on-light);
}

/* หมายเหตุ: ห้ามใส่ padding/border บน .accordion__inner โดยตรง เพราะมันคือกล่องที่ต้อง
   ยุบเหลือ 0 height ตอนปิด (ดู motion.css) — ถ้ามี padding ติดอยู่ที่กล่องนี้ ขนาด padding
   จะ "รั่ว" ออกมาเป็นพื้นที่ว่างเกินตอนปิดเสมอ เลยต้องย้าย padding ไปไว้ที่ลูกแทน */
.curriculum__lesson:first-child {
  border-top: var(--border-width) solid var(--muted-on-light);
  padding-top: var(--space-md);
}

.curriculum__lesson:last-child {
  padding-bottom: var(--space-md);
}

.curriculum__lesson-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-pill);
  background: var(--muted-on-light);
  color: var(--color-black);
  font-family: var(--font-en);
  font-size: 0.85rem;
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.curriculum__lesson-body {
  flex: 1;
}

.curriculum__lesson-body h4 {
  font-size: 1.05rem;
  font-weight: var(--fw-bold);
  margin-bottom: 0.2rem;
}

.curriculum__lesson-highlight {
  font-size: 0.875rem;
  opacity: 0.65;
  margin-bottom: 0.5rem;
}

.curriculum__lesson-body ul {
  font-size: 0.9rem;
}

.curriculum__lesson-body li {
  margin-bottom: 0.3rem;
  padding-left: 1.1rem;
  position: relative;
}

.curriculum__lesson-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  background: currentColor;
}

/* ========================================================
   7) MBA REFRAME
   ======================================================== */

.mba-reframe__list {
  margin-top: var(--space-lg);
  border-top: var(--border-width) solid var(--border-on-dark);
}

.mba-reframe__item {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: var(--border-width) solid var(--border-on-dark);
}

.mba-reframe__num {
  font-size: 1.5rem;
  font-weight: var(--fw-black);
  color: var(--color-yellow);
  flex-shrink: 0;
}

.mba-reframe__item p {
  font-weight: var(--fw-bold);
  font-size: 1.125rem;
}

/* ========================================================
   8) INSTRUCTOR CREDIBILITY
   ======================================================== */

.instructors__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.instructor-card {
  text-align: center;
}

.instructor-card__photo {
  aspect-ratio: 1 / 1;
  background: var(--muted-on-light);
  border: var(--border-width) solid var(--color-black);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-black);
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-sm);
}

.instructor-card__name {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.instructor-card__title {
  font-size: 0.95rem;
  opacity: 0.75;
}

@media (max-width: 700px) {
  .instructors__grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================
   9) SOCIAL PROOF
   ======================================================== */

.testimonials__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: var(--fw-extrabold);
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
}

.testimonial-card {
  display: inline-block;
  width: 340px;
  white-space: normal;
  vertical-align: top;
  padding: var(--space-md);
  border: var(--border-width) solid var(--color-black);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  margin-right: var(--space-sm);
}

.testimonial-card__stars {
  color: var(--color-yellow);
  -webkit-text-stroke: 1px var(--color-black);
  margin-bottom: var(--space-xs);
}

.testimonial-card__name {
  font-weight: var(--fw-bold);
  margin-top: var(--space-xs);
}

/* ========================================================
   10) OFFER STACK / BONUSES
   ======================================================== */

.bonus__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.bonus-card {
  padding: var(--space-md);
}

.bonus-card__value {
  font-family: var(--font-en);
  font-size: 2rem;
  font-weight: var(--fw-black);
  text-decoration: line-through;
  opacity: 0.5;
  display: block;
}

.bonus-card__title {
  font-size: 1.25rem;
  margin: 0.25rem 0 0.5rem;
}

.bonus-total {
  border: var(--border-width) solid var(--color-black);
  border-radius: var(--radius-lg);
  background: var(--gradient-yellow);
  padding: var(--space-md);
  text-align: center;
  margin-top: var(--space-md);
  font-size: 1.5rem;
  font-weight: var(--fw-extrabold);
}

@media (max-width: 700px) {
  .bonus__grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================
   11) PRICING PSYCHOLOGY PREVIEW
   ======================================================== */

.framework__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.framework-card {
  padding: var(--space-md);
}

.framework-card__title {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

@media (max-width: 700px) {
  .framework__grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================
   12) PRICING / URGENCY + CHECKOUT
   ======================================================== */

.pricing {
  background: var(--gradient-dark);
  color: var(--color-offwhite);
  text-align: center;
}

.pricing__anchor {
  font-family: var(--font-en);
  font-size: 1.5rem;
  text-decoration: line-through;
  opacity: 0.6;
}

.pricing__price {
  font-family: var(--font-en);
  font-size: var(--fs-price);
  font-weight: var(--fw-black);
  background: var(--gradient-red);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin: var(--space-xs) 0;
}

.pricing__countdown {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin: var(--space-md) 0;
  font-family: var(--font-en);
}

.pricing__countdown-unit {
  border: var(--border-width) solid var(--color-yellow);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  min-width: 80px;
}

.pricing__countdown-num {
  font-size: 2rem;
  font-weight: var(--fw-black);
  color: var(--color-yellow);
  display: block;
}

.pricing__countdown-label {
  font-size: 0.75rem;
  text-transform: uppercase;
}

.checkout-box {
  border: var(--border-width) dashed var(--color-yellow);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 480px;
  margin: var(--space-md) auto 0;
}

.checkout-box__note {
  font-size: 0.875rem;
  opacity: 0.7;
  margin-top: var(--space-sm);
}

/* ========================================================
   13) FAQ
   ======================================================== */

.faq__item {
  border: var(--border-width) solid var(--color-black);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xs);
  overflow: hidden;
  background: var(--color-white);
}

.faq__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-weight: var(--fw-bold);
  font-size: 1.125rem;
  text-align: left;
}

.faq__icon {
  font-family: var(--font-en);
  font-size: 1.5rem;
}

/* ห้ามใส่ padding บน .accordion__inner เอง (ดูหมายเหตุที่ curriculum ด้านบน) ย้ายไปที่ p แทน */
.faq__answer .accordion__inner p {
  padding: 0 var(--space-md) var(--space-md);
  max-width: 70ch;
}

/* ========================================================
   14) FINAL CTA
   ======================================================== */

.final-cta {
  background: var(--gradient-dark);
  color: var(--color-offwhite);
  text-align: center;
}

.final-cta__headline {
  font-size: var(--fs-h2);
  color: var(--color-yellow);
  margin-bottom: var(--space-md);
}

/* ========================================================
   15) FOOTER
   ======================================================== */

.footer {
  background: var(--color-black);
  color: rgba(245, 243, 235, 0.6);
  padding: var(--space-md) 0;
  font-size: 0.875rem;
  text-align: center;
}

.footer a {
  text-decoration: underline;
}

/* ========================================================
   UTILITIES
   ======================================================== */

.text-center { text-align: center; }
.mt-md { margin-top: var(--space-md); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
