/* ===== CINEMATIC 3D INTRO GATE (สไตล์ Studio Ferrofluid) ===== */
body.intro-locked {
  overflow: hidden;
  height: 100vh;
}

.cinematic-intro {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: radial-gradient(circle at 66% 48%, #F8F4EC 0%, #ECE4D6 56%, #DDD1BE 100%);
  color: #180A06;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition:
    transform 0.9s cubic-bezier(0.77, 0, 0.175, 1),
    opacity 0.65s ease;
  will-change: transform, opacity;
}

/* เอฟเฟกต์ม่านยกขึ้นตอนกดเข้าชมเว็บ */
.cinematic-intro.is-leaving {
  transform: translateY(-100%) scale(1.03);
  opacity: 0;
  pointer-events: none;
}

.cinematic-intro.is-hidden {
  display: none;
}

/* Canvas 3D Ferrofluid พื้นหลัง */
.intro-webgl-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
}

/* วิดีโอเปิดตัวจริง (จะโผล่อัตโนมัติเมื่อมีไฟล์ images/intro.mp4) */
.intro-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.cinematic-intro.has-video .intro-video {
  opacity: 1;
}

.cinematic-intro.has-video .intro-webgl-canvas {
  display: none;
}

/* แผ่นไล่แสงบางๆ ด้านซ้ายให้ตัวหนังสืออ่านชัดทุกเฟรมของคลิป */
.intro-scrim {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(248, 244, 236, 0.86) 0%,
    rgba(248, 244, 236, 0.52) 42%,
    rgba(248, 244, 236, 0.04) 72%,
    transparent 100%
  );
}

/* ถ้าคลิปที่ใส่มาเป็นโทนมืด ตัวหนังสือจะอ่านชัดด้วยคลาสนี้ (สลับธีมอัตโนมัติได้) */
.cinematic-intro.dark-video-mode {
  color: #FFF6DF;
}
.cinematic-intro.dark-video-mode .intro-scrim {
  background: linear-gradient(90deg, rgba(20, 8, 4, 0.84) 0%, rgba(20, 8, 4, 0.42) 48%, transparent 100%);
}

/* แถบบนสุดของ Intro */
.intro-topbar {
  position: relative;
  z-index: 5;
  width: 92%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 22px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.intro-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Prompt', sans-serif;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

.intro-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #180A06;
  color: #FFD24C;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
}

.intro-edition-tag {
  font-family: 'Prompt', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #7A4B34;
  text-transform: uppercase;
}

.intro-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.intro-ghost-btn {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1.5px solid rgba(24, 10, 6, 0.28);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  color: #180A06;
  font-family: 'Prompt', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.15s ease;
}

.intro-ghost-btn:hover {
  background: #180A06;
  color: #FFD24C;
  transform: translateY(-1px);
}

/* เนื้อหาหลักด้านซ้าย (สไตล์ Editorial แบบ ARRIVE LIKE YOU MEAN IT) */
.intro-content-wrap {
  position: relative;
  z-index: 5;
  width: 92%;
  max-width: 1320px;
  margin: auto;
  display: flex;
  align-items: center;
}

.intro-copy {
  max-width: 520px;
  animation: introSlideUp 0.75s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes introSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.intro-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Prompt', sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #C64106;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.intro-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #C64106;
  box-shadow: 0 0 0 4px rgba(198, 65, 6, 0.2);
}

.intro-title {
  font-family: 'Prompt', sans-serif;
  font-size: clamp(2.5rem, 5.6vw, 4.7rem);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: #180A06;
  margin-bottom: 16px;
}

.intro-title-accent {
  color: #C64106;
}

.intro-sub {
  font-size: 1rem;
  color: #4D3124;
  margin-bottom: 28px;
  max-width: 440px;
  line-height: 1.65;
}

.intro-sub strong {
  color: #180A06;
}

/* ปุ่มเข้าชมเว็บ + ปุ่มวาร์ปไปหน้าเมนูอาหาร */
.intro-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.intro-btn-enter,
.intro-btn-menu {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 12px;
  font-family: 'Prompt', sans-serif;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  border: 2px solid #180A06;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.intro-btn-enter {
  background: #180A06;
  color: #FFD24C;
  box-shadow: 5px 5px 0 #C64106;
}

.intro-btn-enter:hover {
  background: #C64106;
  color: #FFFFFF;
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 #180A06;
}

.intro-btn-menu {
  background: #FFD24C;
  color: #180A06;
  box-shadow: 5px 5px 0 #180A06;
}

.intro-btn-menu:hover {
  background: #FFFFFF;
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 #C64106;
}

/* แถบล่างของ Intro (แถบจังหวะแอนิเมชัน 3 ระยะ) */
.intro-bottombar {
  position: relative;
  z-index: 5;
  width: 92%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px 0 24px;
  border-top: 1px solid rgba(24, 10, 6, 0.15);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.intro-timeline {
  display: flex;
  align-items: center;
  gap: 18px;
}

.tl-step {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'Prompt', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(24, 10, 6, 0.42);
  transition: color 0.25s ease;
}

.tl-step.active {
  color: #180A06;
}

.tl-bar {
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: rgba(24, 10, 6, 0.18);
  transition: width 0.3s ease, background 0.3s ease;
}

.tl-step.active .tl-bar {
  width: 42px;
  background: #C64106;
}

.intro-hint {
  font-family: 'Prompt', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: #5C3A29;
}

/* ปุ่มเล่นคลิปเปิดตัวซ้ำที่จะถูกเพิ่มเข้าไปในแถบเมนูหลัก */
.nav-replay-pill {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 210, 76, 0.42);
  background: rgba(255, 210, 76, 0.12);
  color: #FFD24C;
  font-family: 'Prompt', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.nav-replay-pill:hover {
  background: #FFD24C;
  color: #180A06;
  transform: translateY(-1px);
}

/* ไฮไลต์แถบเมนูอาหารตอนกดวาร์ปมาจากหน้า Intro */
@keyframes directoryFocusPulse {
  0% { box-shadow: 0 0 0 0 rgba(198, 65, 6, 0.65); }
  70% { box-shadow: 0 0 0 16px rgba(198, 65, 6, 0); }
  100% { box-shadow: 0 0 0 0 rgba(198, 65, 6, 0); }
}

.category-focus-flash {
  animation: directoryFocusPulse 1.1s ease-out 2;
  border-radius: 999px;
}

/* Responsive มือถือ */
@media (max-width: 820px) {
  .intro-edition-tag { display: none; }
  .intro-scrim {
    background: linear-gradient(
      0deg,
      rgba(248, 244, 236, 0.94) 0%,
      rgba(248, 244, 236, 0.72) 44%,
      rgba(248, 244, 236, 0.08) 76%,
      transparent 100%
    );
  }
  .intro-content-wrap {
    align-items: flex-end;
    padding-bottom: 18px;
  }
  .intro-copy {
    max-width: 100%;
  }
  .intro-timeline {
    gap: 10px;
  }
  .tl-bar { display: none; }
  .nav-replay-pill { display: none; }
}/* ===== อัปเกรดหัวข้อ หมูอ้วนพากิน มมส + รวมร้านเด็ด มมส งบเด็กหอ ===== */
.intro-copy {
  max-width: 650px;
}

/* ป้ายสีเหลือง-เทา ประจำ มมส */
.intro-msu-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(24, 10, 6, 0.08);
  border: 1.5px solid rgba(24, 10, 6, 0.22);
  font-family: 'Prompt', sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #180A06;
  margin-bottom: 14px;
}

.msu-colors {
  display: inline-flex;
  align-items: center;
}

.dot-yellow {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #F6BE2C;
  border: 1.5px solid #180A06;
  z-index: 2;
}

.dot-gray {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #6B7280;
  border: 1.5px solid #180A06;
  margin-left: -4px;
}

/* บรรทัดที่ 1: หมูอ้วนพากิน มมส (ใหญ่คมชัด) */
.intro-brand-hero {
  font-family: 'Prompt', sans-serif;
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #180A06;
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* ป้ายคำว่า มมส สีดำ-ทอง เข้ากับสีคลิป 3D */
.intro-msu-tag {
  display: inline-block;
  padding: 2px 18px 4px;
  border-radius: 16px;
  background: #180A06;
  color: #FFD24C;
  border-bottom: 4px solid #C64106;
  box-shadow: 0 10px 24px rgba(24, 10, 6, 0.22);
  line-height: 1.08;
}

/* บรรทัดที่ 2: รวมร้านเด็ด มมส งบเด็กหอ (ใหญ่เด่นพร้อมแถบไฮไลต์สีทอง) */
.intro-subtitle-hero {
  font-family: 'Prompt', sans-serif;
  font-size: clamp(1.65rem, 3.2vw, 2.65rem);
  font-weight: 900;
  line-height: 1.2;
  color: #C64106;
  margin-bottom: 18px;
}

.intro-highlight-bar {
  display: inline;
  padding: 0 4px 2px;
  box-shadow: inset 0 -11px 0 rgba(255, 210, 76, 0.62);
}

/* ป้ายโซนรอบ มมส */
.intro-zone-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.zone-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1.5px solid rgba(24, 10, 6, 0.2);
  font-family: 'Prompt', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #2A140C;
  backdrop-filter: blur(6px);
}

.zone-pill-price {
  background: #FFD24C;
  border-color: #180A06;
  color: #180A06;
}

.intro-sub {
  margin-bottom: 24px;
  max-width: 480px;
}

@media (max-width: 820px) {
  .intro-brand-hero {
    gap: 8px;
  }
  .intro-msu-tag {
    padding: 1px 12px 3px;
    border-radius: 12px;
  }
  .intro-highlight-bar {
    box-shadow: inset 0 -7px 0 rgba(255, 210, 76, 0.62);
  }
}/* ===== ปรับสมดุลให้วิดีโอเด่นคมชัด ไม่โดนตัวหนังสือบัง ===== */
.cinematic-intro.has-video {
  background: #EAE5DB;
}

/* ขยับวิดีโอไปฝั่งขวาอีกนิด + เร่งสีและความคมให้ชามอาหารเด้งออกมา */
.cinematic-intro.has-video .intro-video {
  transform: translateX(7%);
  filter: contrast(1.05) saturate(1.08);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 12%);
}

/* เอาหมอกขาวที่คลุมกลางชามออก ให้ไล่แสงเฉพาะขอบซ้ายสุด */
.cinematic-intro.has-video .intro-scrim {
  background: linear-gradient(
    90deg,
    rgba(234, 229, 219, 0.62) 0%,
    rgba(234, 229, 219, 0.16) 24%,
    transparent 38%
  );
}

/* ดึงกรอบชิดซ้ายและบีบชุดตัวหนังสือให้อยู่เฉพาะพื้นที่ว่างฝั่งซ้าย 36% */
.intro-topbar,
.intro-content-wrap,
.intro-bottombar {
  width: 94%;
  max-width: 1420px;
}

.intro-copy {
  max-width: min(440px, 36vw);
}

.intro-msu-badge {
  padding: 5px 12px;
  font-size: 0.74rem;
  margin-bottom: 10px;
}

.intro-brand-hero {
  font-size: clamp(1.95rem, 3.2vw, 3.3rem);
  gap: 8px;
  margin-bottom: 8px;
}

.intro-msu-tag {
  padding: 1px 14px 3px;
  border-radius: 12px;
}

.intro-subtitle-hero {
  font-size: clamp(1.2rem, 1.95vw, 1.9rem);
  margin-bottom: 14px;
}

.intro-highlight-bar {
  box-shadow: inset 0 -8px 0 rgba(255, 210, 76, 0.62);
}

.intro-zone-pills {
  gap: 6px;
  margin-bottom: 14px;
}

.zone-pill {
  padding: 4px 10px;
  font-size: 0.73rem;
}

.intro-sub {
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 365px;
  margin-bottom: 20px;
}

.intro-btn-enter,
.intro-btn-menu {
  padding: 12px 20px;
  font-size: 0.88rem;
}

@media (max-width: 820px) {
  .cinematic-intro.has-video .intro-video {
    transform: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .intro-copy {
    max-width: 100%;
  }
}/* ===== จัดหน้า Intro สำหรับมือถือโดยเฉพาะ (คลิปด้านบน / ข้อความด้านล่าง ไม่บังกัน) ===== */
@media (max-width: 820px) {
  .cinematic-intro.has-video {
    background: #EAE5DB;
  }

  /* วางคลิปไว้ครึ่งบนของจอมือถือ ไล่ขอบล่างให้กลืนกับพื้นหลัง */
  .cinematic-intro.has-video .intro-video {
    top: 0;
    left: 0;
    width: 100%;
    height: 52%;
    object-fit: cover;
    object-position: 62% 55%;
    transform: none;
    -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  }

  /* ปิดหมอกแนวนอนของคอม เปลี่ยนเป็นไล่พื้นครีมรองตัวหนังสือครึ่งล่าง */
  .cinematic-intro.has-video .intro-scrim {
    background: linear-gradient(
      to bottom,
      rgba(234, 229, 219, 0.35) 0%,
      transparent 18%,
      transparent 42%,
      rgba(234, 229, 219, 0.96) 54%,
      #EAE5DB 100%
    );
  }

  .intro-topbar {
    padding: 14px 0 6px;
  }

  .intro-content-wrap {
    align-items: flex-end;
    padding-bottom: 18px;
  }

  .intro-copy {
    max-width: 100%;
    width: 100%;
  }

  .intro-brand-hero {
    font-size: clamp(1.85rem, 7.6vw, 2.5rem);
  }

  .intro-subtitle-hero {
    font-size: clamp(1.15rem, 4.8vw, 1.55rem);
    margin-bottom: 10px;
  }

  .intro-sub {
    font-size: 0.85rem;
    margin-bottom: 16px;
    max-width: 100%;
  }

  /* จัด 2 ปุ่มให้เท่ากันสวยงามบนจอมือถือ */
  .intro-btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .intro-btn-enter,
  .intro-btn-menu {
    padding: 12px 10px;
    font-size: 0.84rem;
    width: 100%;
  }

  /* ซ่อนแถบด้านล่างสุดบนมือถือเพื่อให้ปุ่มไม่เบียด */
  .intro-bottombar {
    display: none;
  }
}