:root {
  --minitab-blue: #0083ca;
  --minitab-blue-deep: #017cbd;
  --minitab-teal: #62c3be;
  --minitab-navy: #0f3c61;
  --minitab-part: #156082;
  --minitab-heading: #6387ae;
  --minitab-gray: #404041;
  --minitab-black: #1e1e1e;
  --minitab-soft: #f7f7f7;
  --minitab-line: rgba(255, 255, 255, 0.28);
  --font-sans: "Outfit", "Noto Sans Thai", system-ui, sans-serif;
  --font-mono: "Outfit", "Noto Sans Thai", ui-monospace, monospace;
  --shell: min(1100px, calc(100% - 2.5rem));
  --header-h: 72px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--minitab-black);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

body.is-lang-switching main {
  opacity: 0.45;
  filter: blur(1px);
  transition: opacity 0.18s var(--ease-out), filter 0.18s var(--ease-out);
}

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

a {
  color: var(--minitab-blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #e8e8e8;
  min-height: var(--header-h);
  backdrop-filter: blur(12px) saturate(1.15);
  transition:
    background 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out),
    min-height 0.3s var(--ease-out);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 28px rgba(15, 60, 97, 0.08);
  border-color: transparent;
  min-height: 64px;
}

.site-header.is-scrolled .brand-logo {
  height: 42px;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: inherit;
  gap: 1rem;
  transition: min-height 0.3s var(--ease-out);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  transition: transform 0.35s var(--ease-spring);
}

.brand:hover {
  text-decoration: none;
  transform: translateY(-1px) scale(1.02);
}

.brand-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: min(320px, 58vw);
  object-fit: contain;
  transition: height 0.3s var(--ease-out), filter 0.3s ease;
}

.catalog-link {
  color: var(--minitab-navy);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.4rem 0.55rem;
  border-radius: 2px;
  transition: color 0.2s ease, background 0.2s ease;
}

.catalog-link:hover {
  color: var(--minitab-blue);
  background: rgba(0, 131, 202, 0.08);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-toggle {
  position: relative;
  display: inline-flex;
  border: 1px solid #cfd6dc;
  overflow: hidden;
  border-radius: 2px;
  background: #fff;
}

.lang-toggle::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc(50% - 2px);
  background: var(--minitab-blue);
  border-radius: 1px;
  transform: translateX(0);
  transition: transform 0.35s var(--ease-spring);
  z-index: 0;
  pointer-events: none;
}

.lang-toggle[data-active="en"]::before {
  transform: translateX(100%);
}

.lang-btn {
  position: relative;
  z-index: 1;
  appearance: none;
  border: 0;
  background: transparent;
  color: #667;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.7rem;
  min-width: 2.4rem;
  cursor: pointer;
  transition: color 0.25s ease, transform 0.2s var(--ease-spring);
}

.lang-btn:hover {
  color: var(--minitab-navy);
}

.lang-btn.is-active {
  background: transparent;
  color: #fff;
}

.lang-btn:active {
  transform: scale(0.94);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.7rem 1.15rem;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  isolation: isolate;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.3s var(--ease-spring),
    box-shadow 0.3s var(--ease-out);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn-shine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 25%,
    rgba(255, 255, 255, 0.35) 45%,
    transparent 65%
  );
  transform: translateX(-130%);
  transition: transform 0.65s var(--ease-out);
  pointer-events: none;
  z-index: 1;
}

.btn-shine:hover::after {
  transform: translateX(130%);
}

.btn-outline {
  background: #fff;
  color: #111;
  border-color: #111;
  padding: 0.55rem 0.95rem;
  font-size: 0.88rem;
}

.btn-outline:hover {
  background: #111;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.btn-primary {
  background: var(--minitab-blue);
  color: #fff;
  border-color: var(--minitab-blue);
}

.btn-primary:hover {
  background: var(--minitab-blue-deep);
  box-shadow: 0 12px 28px rgba(0, 131, 202, 0.35);
}

.btn-teal {
  background: var(--minitab-teal);
  color: #fff;
  border-color: var(--minitab-teal);
}

.btn-teal:hover {
  filter: brightness(1.03);
  box-shadow: 0 12px 28px rgba(98, 195, 190, 0.4);
}

.btn-wide {
  width: min(100%, 520px);
  padding: 1rem 1.25rem;
  font-size: 1.05rem;
}

/* Hero */
.hero {
  position: relative;
  color: #fff;
  background:
    linear-gradient(105deg, rgba(0, 100, 160, 0.28) 0%, rgba(0, 160, 180, 0.12) 55%, rgba(255, 255, 255, 0.05) 100%),
    url("assets/header-bkg.jpg") center / cover no-repeat;
  background-size: cover;
  background-position: center;
  padding: 4.5rem 0 4rem;
  min-height: 72vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  --mx: 70%;
  --my: 40%;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      520px circle at var(--mx) var(--my),
      rgba(255, 255, 255, 0.18),
      transparent 45%
    );
  opacity: 0.85;
  transition: opacity 0.4s ease;
  z-index: 0;
  mix-blend-mode: soft-light;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 2.4rem;
  align-items: center;
  max-width: 1120px;
  width: 100%;
}

.hero-copy {
  max-width: 46rem;
}

.hero-art {
  margin: 0;
}

.hero-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(6, 12, 22, 0.65);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.hero-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.12) 50%, transparent 80%);
  transform: translateX(-130%);
  animation: heroSheen 7.5s linear infinite;
  pointer-events: none;
  z-index: 1;
}

.hero-frame img {
  width: 100%;
  height: auto;
  display: block;
}

@keyframes heroSheen {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

.hero-line {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(4px);
  animation: heroLineIn 0.8s var(--ease-out) forwards;
  animation-delay: calc(var(--d, 0) * 90ms + 80ms);
}

@keyframes heroLineIn {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.hero-kicker {
  margin: 0 0 1rem;
  font-size: 1.15rem;
  font-weight: 500;
}

.hero-brand {
  margin: 0;
  font-size: clamp(2.2rem, 5.5vw, 4.2rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-with {
  margin: 0.35rem 0 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
}

.hero-headline {
  margin: 0.65rem 0 0;
  font-size: clamp(1.5rem, 3.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(90deg, #fff 0%, #c9f3ef 45%, #fff 90%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation:
    heroLineIn 0.8s var(--ease-out) forwards,
    shimmerText 5.5s ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 90ms + 80ms), 1.2s;
}

@keyframes shimmerText {
  0%,
  100% {
    background-position: 100% 50%;
  }
  50% {
    background-position: 0% 50%;
  }
}

.hero-support {
  margin: 0.75rem 0 0;
  font-size: clamp(1.35rem, 2.8vw, 2.1rem);
  font-weight: 700;
}

.hero-facts {
  list-style: none;
  margin: 1.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  max-width: 46rem;
}

.hero-facts li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.55;
  transition: transform 0.25s var(--ease-out), opacity 0.25s ease;
}

.hero-facts li:hover {
  transform: translateX(6px);
}

.hero-facts li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.7rem;
  line-height: 1.8;
  color: var(--minitab-teal);
  transition: transform 0.25s var(--ease-spring), color 0.25s ease;
}

.hero-facts li:hover::before {
  transform: rotate(45deg) scale(1.15);
  color: #fff;
}

.hero-facts strong {
  font-weight: 700;
}

.hero-facts span {
  font-weight: 600;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

/* About */
.section {
  padding: 4.5rem 0;
}

.about {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.88) 55%, rgba(255, 255, 255, 0.72) 100%),
    url("assets/grid-bkg.jpg") right center / cover no-repeat;
  background-color: #fff;
}

.about-inner {
  max-width: 46rem;
}

.section-title {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
}

.section-title.dark,
.section-lead.dark {
  color: var(--minitab-black);
}

.section-title.light,
.section-lead.light {
  color: #fff;
}

.section-title.center,
.section-lead.center,
.agenda-note.center,
.contact-inner {
  text-align: center;
}

.section-lead {
  margin: 0.85rem 0 0;
  font-size: 1.1rem;
}

.about-body {
  margin-top: 1.5rem;
}

.about-body p {
  margin: 0 0 1rem;
  color: #333;
  font-size: 1.05rem;
}

.about-body p:last-child {
  margin-bottom: 0;
}

/* Agenda */
.agenda {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(8, 40, 70, 0.72), rgba(8, 40, 70, 0.82)),
    url("assets/agenda-bkg.jpg") center / cover no-repeat;
  background-color: var(--minitab-navy);
}

.agenda-note {
  margin: 0.75rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
}

.agenda-list {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
}

.agenda-row {
  display: grid;
  grid-template-columns: minmax(12rem, 0.38fr) 1fr;
  gap: 1.5rem;
  padding: 1.25rem 0.85rem;
  margin: 0 -0.85rem;
  border-top: 1px solid var(--minitab-line);
  border-radius: 4px;
  transition:
    background 0.3s var(--ease-out),
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}

.agenda-row:last-child {
  border-bottom: 1px solid var(--minitab-line);
}

.agenda-row:hover {
  background: rgba(255, 255, 255, 0.07);
  transform: translateX(6px);
  box-shadow: inset 3px 0 0 var(--minitab-teal);
}

.agenda-left time {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  transition: color 0.25s ease;
}

.agenda-row:hover .agenda-left time {
  color: var(--minitab-teal);
}

.agenda-left .speaker {
  margin: 0.4rem 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
  font-weight: 500;
}

.agenda-right h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  transition: transform 0.3s var(--ease-out);
}

.agenda-row:hover .agenda-right h3 {
  transform: translateX(2px);
}

.agenda-row.agenda-break {
  background: rgba(98, 195, 190, 0.22);
  box-shadow: inset 3px 0 0 var(--minitab-teal);
}

.agenda-row.agenda-lunch {
  background: rgba(168, 85, 247, 0.22);
  box-shadow: inset 3px 0 0 #c084fc;
}

.agenda-row.agenda-break:hover {
  background: rgba(98, 195, 190, 0.34);
  box-shadow: inset 3px 0 0 var(--minitab-teal);
}

.agenda-row.agenda-lunch:hover {
  background: rgba(168, 85, 247, 0.34);
  box-shadow: inset 3px 0 0 #c084fc;
}

.agenda-row.agenda-break .agenda-left time,
.agenda-row.agenda-lunch .agenda-left time {
  color: #fff;
}

.agenda-right p {
  margin: 0.45rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.98rem;
}

html[lang="en"] .agenda-right p {
  display: none;
}

.agenda-part {
  margin: 0.85rem 0 0.25rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--minitab-line);
  color: #9fd7ef;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.agenda-part span {
  color: #fff;
  display: inline-block;
  transition: letter-spacing 0.35s var(--ease-out), color 0.25s ease;
}

.agenda-part:hover span {
  letter-spacing: 0.04em;
  color: var(--minitab-teal);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  filter: blur(2px);
  transition:
    opacity 0.55s var(--ease-out),
    transform 0.55s var(--ease-out),
    filter 0.55s var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.reveal-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal-section.is-visible {
  opacity: 1;
  transform: none;
}

/* Register */
.register {
  background: var(--minitab-soft);
  text-align: center;
}

.register-inner {
  max-width: 44rem;
  margin-inline: auto;
}

.register-soon {
  margin: 1.1rem 0 0;
  color: var(--minitab-part);
  font-weight: 700;
}

.register .btn {
  margin-top: 1.5rem;
}

.register-contact {
  margin: 1.1rem 0 0;
  color: #555;
}

.contact {
  background: #fff;
  padding: 2.75rem 0;
  border-top: 1px solid #ececec;
}

.contact-inner p {
  margin: 0.35rem 0;
  color: #333;
}

.contact-inner a {
  position: relative;
  display: inline-block;
}

.contact-inner a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-out);
}

.contact-inner a:hover {
  text-decoration: none;
}

.contact-inner a:hover::after {
  transform: scaleX(1);
}

@media (max-width: 800px) {
  :root {
    --shell: min(1100px, calc(100% - 1.4rem));
  }

  .hero {
    min-height: auto;
    padding: 3rem 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .hero-copy {
    max-width: none;
  }

  .agenda-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .agenda-row:hover {
    transform: translateX(3px);
  }

  .header-actions .btn-outline {
    display: none;
  }

  .hero-frame {
    border-radius: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-line,
  .hero-headline,
  .reveal,
  .reveal-section,
  .btn-shine::after,
  body.is-lang-switching main,
  .lang-toggle::before {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  .hero-headline {
    color: #fff;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
  }
}
