/* ============================================
   FTI CEO Industrial Reinvention — style.css
   ============================================ */

/* ---------- FONTS ---------- */
@font-face { font-family: 'Degular'; src: url('assets/fonts/Degular-Semibold.otf') format('opentype');     font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Degular'; src: url('assets/fonts/Degular-Black.otf') format('opentype');        font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Degular'; src: url('assets/fonts/Degular-RegularItalic.otf') format('opentype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Degular'; src: url('assets/fonts/Degular-SemiboldItalic.otf') format('opentype'); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: 'FCIconic'; src: url('assets/fonts/FC Iconic ExtraBold Italic ver 1.10.ttf') format('truetype'); font-weight: 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Anuphan'; src: url('assets/fonts/Anuphan-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Anuphan'; src: url('assets/fonts/Anuphan-Medium.ttf')  format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Anuphan'; src: url('assets/fonts/Anuphan-Bold.ttf')    format('truetype'); font-weight: 700; font-display: swap; }

/* ---------- CSS VARIABLES ---------- */
:root {
  --bg-void: #050816;
  --bg-deep: #0A0E27;
  --bg-elevated: #11163A;
  --gold-100: #F5E6A8;
  --gold-300: #E8C547;
  --gold-500: #D4AF37;
  --gold-700: #A8841D;
  --cyan-500: #00D4FF;
  --purple-500: #7B2FFF;
  --white-70: rgba(255,255,255,0.7);
  --white-50: rgba(255,255,255,0.5);
  --white-10: rgba(255,255,255,0.08);

  --font-sans: 'Degular', 'Anuphan', system-ui, -apple-system, sans-serif;
  --font-thai: 'Anuphan', system-ui, sans-serif;
  --font-display: 'FCIconic', 'Degular', serif;

  --container: 1200px;
  --container-narrow: 800px;

  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --transition: 0.3s ease;
}

/* ---------- RESET ---------- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: #fff;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 3px; }
::selection { background: var(--gold-500); color: var(--bg-deep); }

/* ---------- UTILITIES ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}
.container-narrow { max-width: var(--container-narrow); }
.text-center { text-align: center; }

.text-gold {
  background: linear-gradient(135deg, #D4AF37 0%, #F5E6A8 50%, #D4AF37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.display-italic {
  font-family: 'Degular', serif;
  font-style: italic;
  font-weight: 600;
}

.kicker {
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--gold-300);
  font-weight: 600;
  text-transform: uppercase;
  display: block;
  margin-bottom: 14px;
}

/* Section header kickers — bigger & bolder so they read clearly */
.section-header .kicker {
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 700;
  letter-spacing: 0.32em;
  margin-bottom: 18px;
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.25);
}

/* Site visit card kickers ("SITE VISIT 01"…) — bump up for readability */
.site-info .kicker {
  font-size: clamp(14px, 1.2vw, 16px);
  font-weight: 700;
  letter-spacing: 0.28em;
  margin-bottom: 10px;
}

/* Shenzhen meta — date strip above the timeline */
.shenzhen-meta .kicker {
  font-size: clamp(14px, 1.4vw, 17px);
  font-weight: 700;
  letter-spacing: 0.28em;
  margin-bottom: 0;
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.25);
}

.divider {
  height: 1px;
  width: 120px;
  margin: 18px auto;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
  border: none;
}

/* ---------- BUTTONS ---------- */
.btn-gold, .btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  border: none;
}
.btn-gold {
  background: linear-gradient(135deg, #D4AF37, #F5E6A8, #D4AF37);
  background-size: 200% 100%;
  color: var(--bg-deep);
}
.btn-gold:hover {
  background-position: 100% 0;
  box-shadow: 0 8px 30px rgba(212,175,55,0.5);
  transform: translateY(-2px);
}
.btn-outline {
  background: rgba(10,14,39,0.5);
  color: var(--gold-300);
  border: 1.5px solid var(--gold-500);
  backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: rgba(212,175,55,0.1);
  box-shadow: 0 0 25px rgba(212,175,55,0.25);
}
.btn-sm { padding: 10px 22px; font-size: 13px; }

/* ---------- NAVIGATION ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background var(--transition), backdrop-filter var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10,14,39,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--white-10);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-logo img { height: 36px; width: auto; }
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
  flex: 1;
  justify-content: center;
}
.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--white-70);
  letter-spacing: 0.05em;
  transition: color var(--transition);
  position: relative;
}
.nav-links a:hover { color: var(--gold-300); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -6px; left: 50%;
  transform: translateX(-50%);
  width: 0; height: 1px;
  background: var(--gold-500);
  transition: width var(--transition);
}
.nav-links a:hover::after { width: 100%; }

.nav-cta-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-register { position: relative; }
.nav-register::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-100), var(--gold-500));
  filter: blur(8px);
  opacity: 0.45;
  z-index: -1;
  animation: register-pulse 2.4s ease-in-out infinite;
}
@keyframes register-pulse {
  50% { opacity: 0.8; }
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  width: 36px; height: 36px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  align-items: center;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--gold-300);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: var(--bg-void);
}
.hero-image {
  position: absolute; inset: 0;
  background-image: url('assets/images/hero-desktop.webp');
  background-size: cover;
  background-position: center;
  animation: ken-burns 20s ease-in-out infinite alternate;
  will-change: transform;
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 30%, rgba(5,8,22,0.5) 80%),
    linear-gradient(180deg, rgba(5,8,22,0.3) 0%, transparent 35%, rgba(5,8,22,0.95) 100%);
  pointer-events: none;
}
@keyframes ken-burns {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
  padding: 80px 24px;
  text-align: center;
}
.hero-fti {
  height: clamp(48px, 6vw, 72px);
  width: auto;
  margin: 0 auto 20px;
  filter: drop-shadow(0 0 24px rgba(212,175,55,0.35));
}

.hero-logo {
  width: clamp(280px, 50vw, 600px);
  margin: 0 auto 32px;
  filter: drop-shadow(0 0 40px rgba(212,175,55,0.4));
}

.hero-thai {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 800;
  color: var(--gold-300);
  font-size: clamp(1.4rem, 3.2vw, 2.4rem);
  letter-spacing: 0.04em;
  line-height: 1.25;
  margin-bottom: 14px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.6);
}

.hero-sub {
  font-family: var(--font-thai);
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  font-size: clamp(1.05rem, 2.2vw, 1.7rem);
  line-height: 1.45;
  letter-spacing: 0.01em;
  margin-bottom: 40px;
  text-shadow: 0 2px 14px rgba(0,0,0,0.5);
}
.hero-sub-br { display: none; }
@media (max-width: 540px) {
  .hero-sub-br { display: inline; }
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-indicator {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  width: 24px; height: 40px;
  border: 1.5px solid var(--gold-500);
  border-radius: 12px;
  z-index: 3;
  opacity: 0.6;
}
.scroll-indicator span {
  display: block;
  width: 3px; height: 8px;
  background: var(--gold-300);
  border-radius: 2px;
  margin: 8px auto;
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(14px); }
}

/* Hero intro animations */
.anim-in {
  opacity: 0;
  transform: translateY(20px);
  animation: anim-in 0.8s ease forwards;
  animation-delay: var(--d, 0s);
}
@keyframes anim-in {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- SECTION BASE ---------- */
.section {
  padding: clamp(64px, 10vw, 120px) 0;
  position: relative;
}
.section-framework    { background: var(--bg-deep); position: relative; overflow: hidden; }
.section-stats        { background: var(--bg-void); }
.section-masters      { background: var(--bg-deep); }
.section-experience   { background: var(--bg-deep); }
.section-alumni       { background: var(--bg-void); }
.section-investment   { background: var(--bg-deep); }
.section-brochure     { background: var(--bg-void); }
.section-contact      { background: var(--bg-deep); }

.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-title {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: #fff;
}
.section-title em {
  font-style: italic;
  font-weight: 600;
}

/* ---------- GRID ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: 1fr; }

/* ---------- CARD ---------- */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--white-10);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(212,175,55,0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(212,175,55,0.15);
}

/* ---------- 5PX FRAMEWORK ---------- */
.section-framework::before {
  content: '';
  position: absolute;
  top: 30%; left: 50%;
  width: 900px; height: 900px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(212,175,55,0.10) 0%, rgba(212,175,55,0.04) 30%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.section-framework .container { position: relative; z-index: 1; }

.dimension-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.dimension-card {
  position: relative;
  padding: 40px 28px 36px;
  background: linear-gradient(160deg, rgba(17,22,58,0.85) 0%, rgba(10,14,39,0.92) 100%);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: var(--radius-xl);
  text-align: center;
  isolation: isolate;
  overflow: hidden;
  transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.dimension-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(212,175,55,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
}
.dimension-card:hover {
  transform: translateY(-8px);
  border-color: var(--gold-500);
  box-shadow:
    0 24px 50px rgba(0,0,0,0.45),
    0 0 32px rgba(212,175,55,0.25),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
.dimension-card:hover::before { opacity: 1; }

.dim-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(212,175,55,0.18), rgba(212,175,55,0.04));
  border: 1px solid rgba(212,175,55,0.3);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.dim-icon img,
.dim-icon svg {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(212,175,55,0.4));
}
.dimension-card:hover .dim-icon {
  transform: scale(1.08) rotate(-3deg);
  border-color: var(--gold-300);
  box-shadow: 0 0 24px rgba(212,175,55,0.45);
}

.dim-num {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--gold-300);
  font-weight: 700;
  margin-bottom: 6px;
  opacity: 0.7;
}
.dim-title {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  letter-spacing: -0.005em;
  line-height: 1.1;
  margin-bottom: 12px;
  white-space: nowrap;
}
.dim-body {
  font-family: var(--font-thai);
  color: var(--white-70);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ---------- BY THE NUMBERS ---------- */
.big-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  text-align: center;
}
.big-stat {
  padding: 40px 16px;
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(17,22,58,0.6), rgba(10,14,39,0.6));
  position: relative;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.big-stat:hover {
  border-color: var(--gold-500);
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.4), 0 0 24px rgba(212,175,55,0.18);
}
.big-stat .num {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(3rem, 6vw, 5rem);
  letter-spacing: -0.04em;
  line-height: 1;
  display: inline-block;
}
.big-stat .plus {
  font-style: normal;
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-left: 4px;
  vertical-align: top;
}
.big-stat small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--white-50);
  font-weight: 700;
  margin-top: 18px;
}

/* ---------- MASTERS ---------- */
.speakers-loading {
  text-align: center;
  padding: 60px;
  color: var(--white-50);
}

.speaker-group { margin-bottom: 72px; }
.speaker-group:last-child { margin-bottom: 0; }

.speaker-group-header {
  text-align: center;
  margin-bottom: 36px;
}
.speaker-group-title {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  position: relative;
  display: inline-block;
}
/* Decorative gold underline replacing the old "N People" count */
.speaker-group-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
}

.speakers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* When a group has fewer than 5 cards, center them while
   keeping each card the same width as one 5-col grid track. */
@media (min-width: 1024px) {
  .speakers-grid.is-few {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
  }
  .speakers-grid.is-few .speaker-card {
    /* Match one of 5 tracks: (100% − 4 gaps) / 5 */
    flex: 0 0 calc((100% - 88px) / 5);
    max-width: calc((100% - 88px) / 5);
  }
}

.speaker-card {
  background: var(--bg-elevated);
  border: 1px solid var(--white-10);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.speaker-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212,175,55,0.4);
  box-shadow: 0 16px 30px rgba(0,0,0,0.35), 0 0 18px rgba(212,175,55,0.12);
}

/* Portrait image — square crop limited to head-to-chest only */
.speaker-image {
  aspect-ratio: 1 / 1;
  background: var(--bg-deep);
  overflow: hidden;
  position: relative;
}
.speaker-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;

  /* Per-speaker fine-tuning via CSS variables.
     - --opos-y shifts the cover crop *window* (only effective when image
       overflows the container; for square 800×800 in 1:1 it's a no-op).
     - --scale zooms the rendered image (anchored at top so head stays put).
     - --ty translates the image vertically (negative = move up; combine
       with scale > 1 to use the headroom that scale already cropped). */
  --opos-y: 0%;
  --scale: 1;
  --ty: 0%;
  --hover-bump: 1.04;

  object-position: 50% var(--opos-y);
  transform-origin: center top;
  transform: translateY(var(--ty)) scale(var(--scale));
  transition: transform 0.5s ease;
  display: block;
}
.speaker-card:hover .speaker-image img {
  transform: translateY(var(--ty)) scale(calc(var(--scale) * var(--hover-bump)));
}

/* ---- Per-speaker adjustments ----
   "ขึ้น"  → เพิ่ม --opos-y (เลื่อน crop window ลง เพื่อโชว์ส่วนล่างของภาพ
              ดันหัวขึ้นสู่ขอบบนของกรอบ โดยไม่มีอะไรหายไป)
   "ขยาย" → --scale > 1
   "ย่อ"  → --scale < 1 (มีขอบสีพื้นรอบเล็กน้อย แต่ไม่ตัดเนื้อภาพ) */
/* All speaker images are face-cropped to uniform size by smart_crop_speakers.py.
   These per-speaker overrides only handle the few that look off in context. */

/* Coach row */
/* โกวิทย์ (41-coach): ขยายเพิ่ม + เลื่อนขึ้น (bottom ไม่ขาด เพราะ scale clipped อยู่แล้ว) */
.speaker-image img[src*="41-coach"]     { --scale: 1.20; --ty: -5%; }
/* สุพจน์ (42-coach): มี headroom เยอะ → ขยาย + เลื่อนขึ้น */
.speaker-image img[src*="42-coach"]     { --scale: 1.18; --ty: -6%; }

/* Keynote row — วิเชฐ & สง่า ดูเล็กกว่าเพื่อนบ้านในแถว → ขยาย */
/* อาร์ชวัส: ขยาย (headroom ดี, ไม่ชนขอบบน) */
.speaker-image img[src*="04-exclusive"] { --scale: 1.15; }
/* ยอด: ใหญ่ขึ้นนิดเดียว */
.speaker-image img[src*="06-keynote"]   { --scale: 1.06; }
/* วิเชฐ: ขยาย + เลื่อนขึ้น (มี headroom ว่างด้านบน) — bottom ไม่ขาด เพราะ
   scale 1.20 clipped bottom อยู่แล้ว ขยับขึ้นแค่เปิดเผยพิกเซลที่ซ่อนอยู่ */
.speaker-image img[src*="07-exclusive"] { --scale: 1.20; --ty: -6%; }
/* ดำรงชัย: headroom เยอะ → ขยาย + เลื่อนขึ้นเยอะหน่อย */
.speaker-image img[src*="09-exclusive"] { --scale: 1.18; --ty: -8%; }
/* วรฉัตร: ขยาย + เลื่อนขึ้นเล็กน้อย (top hair clip นิดเดียว, bottom เปิดเผยอกเพิ่ม) */
.speaker-image img[src*="10-exclusive"] { --scale: 1.18; --ty: -5%; }
/* สง่า: headroom พอประมาณ → ขยาย + เลื่อนขึ้นพอประมาณ */
.speaker-image img[src*="13-exclusive"] { --scale: 1.08; }                   /* วาสนา */
.speaker-image img[src*="14-exclusive"] { --scale: 1.08; }                   /* นันทมาลี */
.speaker-image img[src*="15-exclusive"] { --scale: 1.15; --ty: -6%; }
.speaker-image img[src*="20-exclusive"] { --scale: 1.08; }                   /* ทัศวรินทร์ */
/* เมธา: ผมแตะขอบบน → ขยับขึ้นได้น้อย (ty -3% = clip ผมเล็กน้อย) bottom ไม่ขาด */
.speaker-image img[src*="16-exclusive"] { --scale: 1.08; --ty: -3%; }
/* วิธพล: headroom พอเหลือ → ขยายอย่างเดียว (transform-origin top ทำให้ headroom ขยายเพิ่ม หัวยิ่งห่างขอบ) */
.speaker-image img[src*="18-exclusive"] { --scale: 1.18; }
/* กิตติศักดิ์: เหมือนวิธพล */
.speaker-image img[src*="19-exclusive"] { --scale: 1.18; }
/* ฉัตรพล: ขยาย (headroom พอ, ไม่ชนขอบบน) */
.speaker-image img[src*="24-exclusive"] { --scale: 1.18; }

/* Expert row — เพิ่มนิดเดียวบางคน */
.speaker-image img[src*="32-expert"] { --scale: 1.10; } /* วิวัฒน์ */
.speaker-image img[src*="33-expert"] { --scale: 1.10; } /* วราพร */
.speaker-image img[src*="35-expert"] { --scale: 1.10; } /* นราธิป */
.speaker-image img[src*="36-expert"] { --scale: 1.10; } /* เฉลิมรัฐ */

/* Commentators row — เพิ่มทุกคนนิดเดียวให้ใกล้เคียงกับ section อื่น */
.speaker-image img[src*="37-commentator"] { --scale: 1.10; } /* สืบพงศ์ */
.speaker-image img[src*="38-commentator"] { --scale: 1.10; } /* ธีระวัฒน์ */
.speaker-image img[src*="39-commentator"] { --scale: 1.10; } /* วิรัช */

/* ทวีทรัพย์ (12-exclusive) — ขอบมี dark strip → zoom ครอบให้มิดทุกขอบ
   (1.10 = ตัดขอบประมาณ 40px จากแต่ละด้าน เผื่อขอบทุกทิศ) */
.speaker-image img[src*="12-exclusive"] { --scale: 1.10; }

/* วุฒิ (17-exclusive) — มี headroom ว่าง → ขยายเล็กน้อย + เลื่อนขึ้น
   (scale ต้อง > 1 ก่อน ty ถึงจะเลื่อนได้โดยไม่มี empty ที่ขอบล่าง) */
.speaker-image img[src*="17-exclusive"] { --scale: 1.10; --ty: -5%; }

/* ภิรตา (27-expert) — ผมแตะขอบบน → เลื่อนลงเล็กน้อยให้มี headroom
   (ขอบบนจะเห็น navy bg เพิ่ม กลืนกับ bg ของรูป; ขอบล่าง clip ~24px ของสูท) */
.speaker-image img[src*="27-expert"] { --ty: 3%; }

.speaker-info {
  padding: 14px 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
  flex: 1;
}
.speaker-name {
  font-family: var(--font-thai);
  font-weight: 700;
  font-size: clamp(0.78rem, 1vw, 0.95rem);
  color: #fff;
  line-height: 1.25;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.speaker-title {
  font-size: 0.78rem;
  color: var(--gold-300);
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.speaker-company {
  font-size: 0.78rem;
  color: var(--white-70);
  font-family: var(--font-thai);
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- EXPERIENCE ---------- */
.exp-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.exp-tab {
  padding: 14px 28px;
  border-radius: 9999px;
  background: transparent;
  border: 1px solid var(--white-10);
  color: var(--white-70);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  transition: all var(--transition);
}
.exp-tab:hover { border-color: var(--gold-500); color: var(--gold-300); }
.exp-tab.active {
  background: var(--gold-500);
  color: var(--bg-deep);
  border-color: var(--gold-500);
}

.exp-content { display: none; }
.exp-content.active { display: block; }

.sites-list { display: flex; flex-direction: column; gap: 32px; }
.site-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--white-10);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition);
}
.site-row:hover { border-color: rgba(212,175,55,0.4); }
.site-image {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 260px;
  overflow: hidden;
  background: var(--bg-void);
}
.site-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.site-row:hover .site-image img { transform: scale(1.04); }
.site-num {
  position: absolute;
  top: 16px; left: 20px;
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: 0 4px 24px rgba(0,0,0,0.6);
}
.site-info {
  padding: 24px 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.site-title {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(1.15rem, 1.9vw, 1.6rem);
  line-height: 1.2;
  margin: 6px 0 10px;
  color: #fff;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
/* Auto-shrink for very long names — add class="site-title long" in HTML */
.site-title.long {
  font-size: clamp(0.95rem, 1.5vw, 1.3rem);
}
.site-desc {
  color: var(--white-70);
  font-size: 1rem;
}

/* Shenzhen timeline */
.shenzhen-meta { text-align: center; margin-bottom: 48px; }
.timeline {
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 12px; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--gold-500), transparent);
}
.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 48px;
  background: var(--bg-elevated);
  border: 1px solid var(--white-10);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition);
}
.timeline-item:hover { border-color: rgba(212,175,55,0.4); }
.timeline-dot {
  position: absolute;
  left: -27px; top: 24px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--gold-500);
  box-shadow: 0 0 18px var(--gold-500);
  border: 2px solid var(--bg-deep);
}
.timeline-image {
  aspect-ratio: 16 / 9;
  max-height: 240px;
  overflow: hidden;
}
.timeline-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.timeline-item:hover .timeline-image img { transform: scale(1.04); }
.timeline-body {
  padding: 0 28px 32px;
}
.day-badge {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.2em;
  display: block;
  margin-bottom: 8px;
}
.timeline-title {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(1.1rem, 1.9vw, 1.55rem);
  line-height: 1.2;
  margin-bottom: 6px;
  text-wrap: balance;
}
.timeline-title.long {
  font-size: clamp(0.95rem, 1.5vw, 1.3rem);
}
.timeline-desc { color: var(--white-70); font-size: 0.98rem; }

/* ---------- ALUMNI MARQUEE ---------- */
.marquee {
  overflow: hidden;
  width: 100%;
  padding: 16px 0;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 24px;
  align-items: center;
  width: max-content;
}
.marquee-left  { animation: marquee-left 80s linear infinite; }
.marquee-right { animation: marquee-right 70s linear infinite; }
@keyframes marquee-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes marquee-right {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
.marquee-cell {
  width: 200px;
  height: 110px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
  opacity: 0.45;
  filter: grayscale(1);
  transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.marquee-cell:hover {
  opacity: 1;
  filter: grayscale(0);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}
.marquee-logo {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Per-logo sizing — square logos appear small because contain fits them to
   the cell's height; scale up to use more of the cell width. VCS is wide
   and dominates → scale down. */
.marquee-logo[src*="suwan-group"],
.marquee-logo[src*="shibata"],
.marquee-logo[src*="siam-senater"],
.marquee-logo[src*="asia-metal"],
.marquee-logo[src*="peerapat"],
.marquee-logo[src*="pmk-diamond-glass"],
.marquee-logo[src*="phoenix-steel"] {
  transform: scale(1.3);
}

.marquee-logo[src*="vcs"] {
  transform: scale(0.82);
}

/* ---------- INVESTMENT ---------- */
.section-investment { text-align: center; }
.price-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 32px 0;
}
.price-unit {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  letter-spacing: 0.3em;
  color: var(--gold-300);
  font-weight: 600;
}
.price-big {
  font-size: clamp(5rem, 14vw, 12rem);
  line-height: 1;
  letter-spacing: -0.03em;
  display: block;
}
.price-vat {
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  letter-spacing: 0.3em;
  color: var(--white-50);
  font-weight: 600;
  margin-top: 8px;
}
.price-note {
  font-family: var(--font-thai);
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.price-tax {
  font-family: var(--font-thai);
  color: var(--white-70);
  font-size: 1rem;
}
.price-tax strong {
  font-weight: 900;
  font-size: 1.15em;
}

/* ---------- BROCHURE ---------- */
.brochure-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 900px;
  margin: 0 auto;
  padding: 32px;
  align-items: center;
}
.brochure-cover {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-deep));
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  max-width: 320px;
  margin: 0 auto;
  width: 100%;
}
.brochure-cover img { width: 100%; height: 100%; object-fit: cover; }
.brochure-info { display: flex; flex-direction: column; gap: 16px; }
.brochure-title {
  font-family: var(--font-sans);
  font-weight: 900;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  letter-spacing: -0.01em;
}
.brochure-desc {
  font-family: var(--font-thai);
  color: var(--white-70);
  font-size: 1rem;
}
.brochure-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0; }
.brochure-meta { font-size: 11px; letter-spacing: 0.25em; color: var(--white-50); font-weight: 600; text-transform: uppercase; }

/* ---------- CONTACT ---------- */
.contact-card {
  max-width: 560px;
  margin: 0 auto;
  padding: 56px 32px;
  text-align: center;
}
.contact-qr {
  width: 240px;
  height: 240px;
  margin: 0 auto 28px;
  border-radius: 18px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 30px rgba(212,175,55,0.15);
}
.contact-org {
  font-family: var(--font-thai);
  font-weight: 700;
  font-size: 1.3rem;
  margin: 10px 0 4px;
}
.contact-org-sub {
  font-family: var(--font-thai);
  color: var(--white-70);
  margin-bottom: 20px;
}
.contact-scan-hint {
  font-family: var(--font-thai);
  color: var(--white-50);
  font-size: 0.92rem;
  margin-top: 12px;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--bg-void);
  padding: 64px 0 24px;
  border-top: 1px solid var(--white-10);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-bottom: 48px;
}
.footer-logo { height: 40px; width: auto; margin-bottom: 16px; }
.footer-col h4 {
  font-size: 12px;
  letter-spacing: 0.25em;
  color: var(--gold-300);
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.footer-col p { font-family: var(--font-thai); color: rgba(255,255,255,0.85); margin-bottom: 4px; font-size: 0.95rem; }
.footer-col .muted { color: var(--white-50); font-size: 0.85rem; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  color: var(--white-70);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--gold-300); }

.footer-bottom {
  border-top: 1px solid var(--white-10);
  padding-top: 24px;
  text-align: center;
  color: var(--white-50);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

/* ---------- REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.stagger.visible > .reveal,
.stagger > .reveal.visible { transition-delay: 0s; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 767px) {
  .hero-image { background-image: url('assets/images/hero-mobile.webp'); }
  .nav-toggle { display: flex; }
  .nav-cta-group .btn-outline { display: none; }
  .nav-cta-group .nav-register { padding: 8px 16px; font-size: 12px; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(10,14,39,0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 18px;
    border-top: 1px solid var(--white-10);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a { font-size: 16px; }
  .hero-content { padding: 60px 20px; }
  .footer-grid { gap: 40px; }
  .timeline { padding-left: 28px; }
}

@media (min-width: 768px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .speakers-grid { grid-template-columns: repeat(4, 1fr); }
  .big-stats { grid-template-columns: repeat(3, 1fr); }
  .dimension-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .site-row { grid-template-columns: 1fr 1fr; }
  .site-row:nth-child(even) { direction: rtl; }
  .site-row:nth-child(even) > * { direction: ltr; }
  .timeline-item { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .timeline-body { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
  .brochure-card { grid-template-columns: 280px 1fr; padding: 48px; gap: 48px; }
  .brochure-cover { max-width: none; }
  .footer-grid { grid-template-columns: 2fr 1fr 1.5fr; }
}

@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .speakers-grid { grid-template-columns: repeat(5, 1fr); gap: 22px; }
  .big-stats { grid-template-columns: repeat(5, 1fr); }
  .dimension-grid { grid-template-columns: repeat(5, 1fr); gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .hero-image { animation: none; }
  .marquee-track { animation: none; }
}

/* ============================================================
   SUBTLE SECTION BACKGROUNDS
   Pattern per section:
     ::before  → bg image (cover, center, blur 1px, low opacity)
     ::after   → vertical gradient that fades to bg-deep at top/bottom
                 so adjacent sections blend cleanly + improves text contrast
     content   → position:relative + z-index:1 to sit above both
   ============================================================ */

/* Shared: ::before bg layer */
.section-framework::before,
.section-masters::before,
.section-alumni::before,
.section-investment::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(1px);
  pointer-events: none;
  z-index: 0;
}

/* Shared: ::after gradient overlay */
.section-framework::after,
.section-masters::after,
.section-alumni::after,
.section-investment::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--bg-deep) 0%,
    transparent 25%,
    transparent 75%,
    var(--bg-deep) 100%
  );
  pointer-events: none;
  z-index: 0;
}

/* Ensure containers / direct content sit ABOVE bg layers */
.section-framework .container,
.section-masters   .container,
.section-alumni    .container,
.section-alumni    .marquee,
.section-investment .container { position: relative; z-index: 1; }

/* Sections that need overflow:hidden + position:relative explicitly added */
.section-masters,
.section-alumni,
.section-investment { position: relative; overflow: hidden; }

/* ---- Per-section background images ---- */

/* 5PX Framework — override the existing radial-glow ::before */
.section-framework::before {
  /* Reset previous radial-glow positioning so inset:0 takes effect */
  top: auto;
  left: auto;
  width: auto;
  height: auto;
  transform: none;
  background-image: url('assets/images/bg-cosmic.webp');
  opacity: 0.07;
}

/* Meet the Masters */
.section-masters::before {
  background-image: url('assets/images/hero-desktop.webp');
  opacity: 0.05;
}

/* Alumni */
.section-alumni::before {
  background-image: url('assets/images/bg-cosmic.webp');
  opacity: 0.06;
}

/* Investment / Pricing */
.section-investment::before {
  background-image: url('assets/images/brochure-cover.webp');
  opacity: 0.08;
}

/* ============================================================
   VISUAL EFFECTS — particles, shimmer, dividers, polished hovers
   ============================================================ */

/* ---- 1. Hero CSS-only floating particles ---- */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;          /* above hero-image/overlay, below hero-content (z-index 2) */
}
.hero-particles span {
  position: absolute;
  bottom: -10px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  animation: float-up linear infinite;
  will-change: transform, opacity;
}
.hero-particles span:nth-child(odd) {
  background: rgba(212, 175, 55, 0.6);
}
/* Slightly larger every third dot */
.hero-particles span:nth-child(3n) { width: 3px; height: 3px; }

@keyframes float-up {
  0%   { transform: translateY(0); opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-100vh); opacity: 0; }
}

/* Per-particle position + timing — 20 dots, scattered & staggered */
.hero-particles span:nth-child(1)  { left:  5%; animation-duration: 12s; animation-delay: 0s;   }
.hero-particles span:nth-child(2)  { left: 12%; animation-duration:  9s; animation-delay: 2s;   }
.hero-particles span:nth-child(3)  { left: 18%; animation-duration: 14s; animation-delay: 5s;   }
.hero-particles span:nth-child(4)  { left: 24%; animation-duration: 10s; animation-delay: 1s;   }
.hero-particles span:nth-child(5)  { left: 30%; animation-duration: 13s; animation-delay: 6s;   }
.hero-particles span:nth-child(6)  { left: 35%; animation-duration:  8s; animation-delay: 3s;   }
.hero-particles span:nth-child(7)  { left: 41%; animation-duration: 15s; animation-delay: 7s;   }
.hero-particles span:nth-child(8)  { left: 47%; animation-duration: 11s; animation-delay: 0.5s; }
.hero-particles span:nth-child(9)  { left: 52%; animation-duration:  9s; animation-delay: 4s;   }
.hero-particles span:nth-child(10) { left: 58%; animation-duration: 12s; animation-delay: 2.5s; }
.hero-particles span:nth-child(11) { left: 63%; animation-duration: 14s; animation-delay: 6.5s; }
.hero-particles span:nth-child(12) { left: 68%; animation-duration:  8s; animation-delay: 1.5s; }
.hero-particles span:nth-child(13) { left: 73%; animation-duration: 13s; animation-delay: 8s;   }
.hero-particles span:nth-child(14) { left: 78%; animation-duration: 10s; animation-delay: 3.5s; }
.hero-particles span:nth-child(15) { left: 83%; animation-duration: 15s; animation-delay: 0s;   }
.hero-particles span:nth-child(16) { left: 88%; animation-duration:  9s; animation-delay: 5.5s; }
.hero-particles span:nth-child(17) { left: 92%; animation-duration: 12s; animation-delay: 2s;   }
.hero-particles span:nth-child(18) { left: 95%; animation-duration: 11s; animation-delay: 7s;   }
.hero-particles span:nth-child(19) { left: 15%; animation-duration: 14s; animation-delay: 4.5s; }
.hero-particles span:nth-child(20) { left: 55%; animation-duration:  8s; animation-delay: 6s;   }

/* Mobile: keep only 10 of 20 dots to reduce paint load */
@media (max-width: 768px) {
  .hero-particles span:nth-child(n+11) { display: none; }
}

/* ---- 1b. Hero CSS-only light rays ---- */
.hero-light-rays {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.hero-light-rays span {
  position: absolute;
  top: -10vh;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(0, 212, 255, 0.15), transparent);
  filter: blur(8px);
  opacity: 0;
  will-change: opacity;
  animation: ray-pulse ease-in-out infinite alternate;
}
.hero-light-rays span:nth-child(1) {
  left: 20%;
  height: 70vh;
  transform: rotate(15deg);
  animation-duration: 5s;
  animation-delay: 0s;
}
.hero-light-rays span:nth-child(2) {
  left: 50%;
  height: 80vh;
  transform: rotate(-15deg);
  animation-duration: 6s;
  animation-delay: 1.5s;
}
.hero-light-rays span:nth-child(3) {
  left: 75%;
  height: 60vh;
  transform: rotate(15deg);
  animation-duration: 4s;
  animation-delay: 3s;
}

@keyframes ray-pulse {
  0%   { opacity: 0;   }
  50%  { opacity: 0.6; }
  100% { opacity: 0;   }
}

/* Both effects honour reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .hero-particles span,
  .hero-light-rays span { animation: none; opacity: 0; }
}

/* Per-logo overrides — square or compact logos get reduced padding so they
   fill more of the white tile vertically. Cap at padding 4px so there's
   still a tiny white margin (looks intentional, not cramped). */
.marquee-cell:has(img[src*="asia-metal"]) { padding: 4px; }

/* ---- 3. Section dividers ---- */
.section-divider {
  height: 1px;
  width: 80%;
  max-width: 1100px;
  margin: 0 auto;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(212,175,55,0.15) 20%,
    rgba(212,175,55,0.5) 50%,
    rgba(212,175,55,0.15) 80%,
    transparent 100%
  );
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.8s ease;
}
.section-divider.visible {
  transform: scaleX(1);
}

/* ---- 4. Improved reveal — smoother curve, 20% threshold matches JS ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px) translateZ(0);   /* GPU layer hint */
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0) translateZ(0);
}

/* ---- 5. Speaker groups — fade in as a whole (no per-card stagger) ---- */
.speaker-group.reveal {
  opacity: 0;
  transform: none;                       /* override default translateY */
  transition: opacity 0.6s ease;
}
.speaker-group.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---- 6. Site visit alternating left/right entry ---- */
.site-row {
  opacity: 0;
  transform: translateX(-40px) translateZ(0);
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.site-row:nth-child(even) {
  transform: translateX(40px) translateZ(0);
}
.site-row.visible {
  opacity: 1;
  transform: translateX(0) translateZ(0);
}

/* ---- 7. Stats numbers — fade + scale ---- */
.big-stat {
  opacity: 0;
  transform: scale(0.85) translateZ(0);
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.big-stats.visible .big-stat { opacity: 1; transform: scale(1) translateZ(0); }
.big-stats.visible .big-stat:nth-child(2) { transition-delay: 0.08s; }
.big-stats.visible .big-stat:nth-child(3) { transition-delay: 0.16s; }
.big-stats.visible .big-stat:nth-child(4) { transition-delay: 0.24s; }
.big-stats.visible .big-stat:nth-child(5) { transition-delay: 0.32s; }

/* ---- 8. Polished hover effects ---- */

/* Speaker card hover — refined per spec */
.speaker-card {
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}
.speaker-card:hover {
  transform: translateY(-6px) translateZ(0);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(212, 175, 55, 0.15);
  will-change: transform;
}
.speaker-card:hover .speaker-image img {
  transform: translateY(var(--ty)) scale(calc(var(--scale) * 1.03));
  transition: transform 0.4s ease;
}
.speaker-card:hover .speaker-name {
  color: var(--gold-300);
  transition: color 0.3s ease;
}
.speaker-name { transition: color 0.3s ease; }

/* 5PX dimension card hover — refined per spec */
.dimension-card {
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}
.dimension-card:hover {
  transform: translateY(-8px) translateZ(0);
  will-change: transform;
}
.dimension-card:hover .dim-icon {
  transform: scale(1.1) rotate(-3deg);
  border-color: var(--gold-300);
  box-shadow: 0 0 28px rgba(212, 175, 55, 0.5);
}
.dimension-card:hover .dim-icon img {
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.7));
}

/* ---- 9. Reduced-motion handling ---- */
@media (prefers-reduced-motion: reduce) {
  /* Disable canvas particles (JS also checks this) */
  .hero-particles { display: none; }

  /* Disable stagger delays */
  .big-stat,
  .site-row { transition-delay: 0s !important; }

  /* Hover effects are user-initiated → keep them */
}

/* ============================================================
   FLOATING ACTION BUTTONS (FAB)
   Bottom-right stack of 2 circular buttons: LINE + back-to-top.
   Hidden until user has scrolled past 300px (toggled by JS via .show).
   ============================================================ */
.fab-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.fab-stack.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.fab {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  will-change: transform;
}
.fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.fab:active { transform: scale(1.05); }
.fab:focus-visible {
  outline: 2px solid var(--gold-300);
  outline-offset: 3px;
}

/* LINE button */
.fab-line {
  background: #06C755;
  color: #fff;
}
.fab-line:hover { background: #05B14A; }

/* Back-to-top button */
.fab-top {
  background: var(--bg-elevated);
  color: var(--gold-300);
  border: 1px solid rgba(212, 175, 55, 0.4);
}
.fab-top:hover {
  background: rgba(212, 175, 55, 0.12);
  border-color: var(--gold-500);
}

/* Tooltip — slides in from the LEFT on hover */
.fab::before {
  content: attr(data-tooltip);
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: rgba(10, 14, 39, 0.95);
  color: #fff;
  font-family: var(--font-thai);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  border: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
.fab::after {
  /* little arrow pointing at the button */
  content: '';
  position: absolute;
  right: calc(100% + 6px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  width: 0; height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid rgba(10, 14, 39, 0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.fab:hover::before,
.fab:hover::after,
.fab:focus-visible::before,
.fab:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Mobile — keep buttons close to viewport edge, hide tooltips (no hover on touch) */
@media (max-width: 767px) {
  .fab-stack { right: 16px; bottom: 16px; gap: 10px; }
  .fab { width: 44px; height: 44px; }
  .fab::before, .fab::after { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fab-stack, .fab, .fab::before, .fab::after { transition: none; }
  .fab:hover { transform: none; }
}
