/* Customer navigation and restrained editorial motion. Shared SaaS styles stay separate. */
.customer-menu {
  --menu-paper: var(--theme-bg, #fffbf5);
  --menu-ink: var(--theme-text, #39291f);
  --menu-rule: var(--theme-line, #eadfd1);
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--menu-ink);
  overflow: hidden;
}
.customer-menu::backdrop {
  background: #211d1973;
  backdrop-filter: blur(5px);
}
.customer-menu-panel {
  display: flex;
  flex-direction: column;
  width: min(100%, 480px);
  height: 100%;
  background: var(--menu-paper);
  box-shadow: 18px 0 70px #241c1a26;
  opacity: 0;
  transform: translate3d(-32px, 0, 0);
  transition:
    transform 260ms cubic-bezier(0.22, 0.7, 0.22, 1),
    opacity 220ms ease;
}
.customer-menu.is-open .customer-menu-panel {
  opacity: 1;
  transform: none;
}
.customer-menu-top {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 88px;
  padding: max(16px, env(safe-area-inset-top)) 24px 16px;
  border-bottom: 1px solid var(--menu-rule);
}
.customer-menu-brand {
  font:
    700 15px/1.5 Arial,
    sans-serif;
  letter-spacing: 1.1px;
}
.customer-menu-brand > span {
  color: var(--theme-accent);
  font-size: 22px;
  vertical-align: middle;
}
.customer-menu .customer-menu-close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--menu-rule);
  border-radius: 50%;
  background: transparent;
  color: inherit;
}
.customer-menu-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 24px max(28px, env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.customer-menu .main-nav {
  position: static;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.customer-menu .main-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 59px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--menu-rule);
  border-radius: 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  background: transparent;
}
.customer-menu .main-nav a::after {
  position: static;
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  margin: 0;
  content: "↗";
  color: var(--theme-muted);
  font:
    20px/1 Arial,
    sans-serif;
  border-radius: 0;
  background: transparent;
}
.customer-menu .main-nav a[aria-current="page"] {
  color: var(--theme-accent);
  font-weight: 700;
  background: transparent;
  border-radius: 0;
}
.customer-menu-account {
  margin-block: 24px;
}
.customer-menu .login-link {
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 12px 18px;
  font-size: 17px;
  color: var(--theme-text);
  background: var(--theme-soft);
  border: 1px solid var(--menu-rule);
  border-radius: 10px;
}
.customer-menu .login-link span {
  position: static;
  width: auto;
  height: auto;
  clip-path: none;
}
.customer-menu .login-link .icon {
  width: 20px;
  height: 20px;
}
.customer-menu-preferences {
  display: grid;
  gap: 18px;
  padding-block: 24px;
  border-top: 1px solid var(--menu-rule);
}
.customer-menu-preference {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, auto);
  align-items: center;
  gap: 16px;
  font-size: 16px;
  line-height: 1.6;
}
.customer-menu-preference > span {
  overflow-wrap: anywhere;
}
.customer-menu .language-switcher,
.customer-menu .language-switcher select,
.customer-menu .theme-toggle {
  width: 100%;
  min-width: 100px;
}
.customer-menu .language-switcher select,
.customer-menu .theme-toggle {
  min-height: 48px;
  height: auto;
  padding: 10px 12px;
  font-size: 16px;
  border-radius: 9px;
}
.customer-menu .theme-name {
  position: static;
  width: auto;
  height: auto;
  clip-path: none;
  white-space: normal;
}
.customer-menu-note {
  margin: 10px 0 0;
  color: var(--theme-muted);
  font-size: 13px;
  line-height: 1.8;
}
html.customer-menu-open,
html.customer-menu-open body {
  overflow: hidden;
  overscroll-behavior: none;
}
html[data-theme="night"] .customer-menu .main-nav {
  background: transparent;
}
.customer-menu.is-open .main-nav > a {
  animation: customer-menu-item 420ms both;
}
.customer-menu.is-open .main-nav > a:nth-child(2) {
  animation-delay: 35ms;
}
.customer-menu.is-open .main-nav > a:nth-child(3) {
  animation-delay: 70ms;
}
.customer-menu.is-open .main-nav > a:nth-child(4) {
  animation-delay: 105ms;
}
.customer-menu.is-open .main-nav > a:nth-child(5) {
  animation-delay: 140ms;
}
.customer-menu.is-open .main-nav > a:nth-child(6) {
  animation-delay: 175ms;
}
@keyframes customer-menu-item {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 1060px) {
  body[data-page]:has(.customer-header-ready) > .topbar {
    display: none;
  }
  body[data-page] .customer-header-ready .header-inner {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    min-height: 86px;
    gap: 12px;
    padding-block: max(8px, env(safe-area-inset-top)) 8px;
  }
  body[data-page] .customer-header-ready .brand {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    padding: 0;
  }
  body[data-page] .customer-header-ready .brand-logo {
    width: 100px;
    height: 68px;
  }
  body[data-page] .customer-header-ready .header-actions {
    display: flex;
    grid-column: 1;
    grid-row: 1;
    gap: 0;
  }
  body[data-page] .customer-header-ready .menu-toggle {
    display: inline-grid;
    width: 44px;
    height: 44px;
    border: 1px solid var(--theme-line);
    border-radius: 50%;
    background: transparent;
    color: var(--theme-text);
  }
  body[data-page] .customer-header-ready .menu-toggle .icon {
    width: 22px;
    height: 22px;
  }
  body[data-page]:has(.customer-header-ready) .floating-line {
    transition: opacity 200ms ease;
  }
}
/* Reveal complete text blocks so Thai vowel marks and translated headings stay intact. */
@media (prefers-reduced-motion: no-preference) {
  .customer-motion [data-motion] {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
    transition:
      opacity 700ms ease,
      transform 850ms cubic-bezier(0.2, 0.65, 0.2, 1);
    transition-delay: var(--motion-delay, 0ms);
  }
  .customer-motion [data-motion="image"] {
    transform: translate3d(0, 14px, 0) scale(0.975);
    clip-path: inset(4% round 24px);
    transition:
      opacity 800ms ease,
      transform 1100ms cubic-bezier(0.2, 0.65, 0.2, 1),
      clip-path 1100ms cubic-bezier(0.2, 0.65, 0.2, 1);
  }
  .customer-motion [data-motion].motion-visible,
  .customer-motion [data-motion]:focus-within {
    opacity: 1;
    transform: none;
    clip-path: inset(0 round 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .customer-menu-panel,
  .customer-menu .main-nav > a,
  [data-motion] {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}
@media print {
  .customer-menu {
    display: none !important;
  }
  .customer-motion [data-motion] {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
}

/* Two-tier desktop header with centered original logo and full-width service menus. */
body[data-page]:has(.customer-header-ready) > .topbar {
  display: none;
}
.customer-header-ready {
  background: var(--theme-bg, #fffbf5);
  color: var(--theme-text, #39291f);
  border-color: var(--theme-line, #eadfd1);
}
.customer-header-utility {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}
.customer-header-utility a {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}
.customer-account-trigger,
.customer-submenu-toggle {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  min-height: 44px;
  padding: 8px;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}
.customer-account-trigger .icon {
  width: 23px;
  height: 23px;
}
.customer-submenu-toggle .icon {
  width: 15px;
  height: 15px;
  transition: transform 220ms ease;
}
.customer-submenu-toggle[aria-expanded="true"] .icon {
  transform: rotate(180deg);
}
.customer-nav-entry {
  display: flex;
  align-items: center;
  min-width: 0;
}
.customer-mega-region {
  position: absolute;
  inset: 100% 0 auto;
  z-index: 3;
}
.customer-mega-panel {
  background: var(--theme-bg, #fffbf5);
  color: var(--theme-text, #39291f);
  border-top: 1px solid var(--theme-line, #eadfd1);
  border-bottom: 1px solid var(--theme-line, #eadfd1);
  box-shadow: 0 18px 40px #221a1414;
}
.customer-mega-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 60px;
  padding-block: 28px 44px;
}
.customer-mega-overview {
  grid-column: 1 / -1;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--theme-line, #eadfd1);
}
.customer-mega-overview a {
  font-size: 23px;
  font-weight: 600;
  color: var(--theme-accent, #b54b16);
}
.customer-mega-overview a::after {
  content: " ↗";
}
.customer-mega-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}
.customer-mega-heading {
  margin: 0 0 14px;
  color: var(--theme-muted, #715f51);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.8;
}
.customer-detail-link {
  display: inline-block;
  padding-block: 10px;
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.customer-detail-link:hover {
  color: var(--theme-accent, #b54b16);
}
.customer-mega-panel[hidden],
.customer-nav-shade[hidden],
.customer-account-popover[hidden] {
  display: none !important;
}
.customer-nav-shade {
  position: fixed;
  inset: 0;
  z-index: 39;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: #1c181742;
  cursor: default;
}
.customer-account-popover {
  position: absolute;
  z-index: 4;
  top: 100%;
  right: max(24px, calc((100% - 1200px) / 2));
  width: min(380px, calc(100vw - 40px));
  padding: 28px;
  background: var(--theme-bg, #fffbf5);
  color: var(--theme-text, #39291f);
  border: 1px solid var(--theme-line, #eadfd1);
  box-shadow: 0 18px 45px #221a1420;
}
.customer-account-heading {
  margin: 0 0 20px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.6;
}
.customer-account-popover .login-link {
  justify-content: center;
  min-height: 50px;
  font-size: 17px;
  border-radius: 4px;
  color: var(--theme-text);
  background: var(--theme-soft);
  border-color: var(--theme-line);
}
.customer-account-popover .customer-menu-preferences {
  margin-top: 24px;
  padding-bottom: 0;
}
.customer-account-popover .language-switcher,
.customer-account-popover .language-switcher select,
.customer-account-popover .theme-toggle {
  width: 100%;
  min-width: 100px;
}
.customer-account-popover .language-switcher select,
.customer-account-popover .theme-toggle {
  min-height: 48px;
  height: auto;
  padding: 10px;
  font-size: 16px;
}
.customer-account-popover .theme-name {
  position: static;
  width: auto;
  height: auto;
  clip-path: none;
}
.customer-header-ready :is(a, button):focus-visible,
.customer-menu :is(a, button, select):focus-visible {
  outline: 2px solid var(--theme-accent, #b54b16);
  outline-offset: 4px;
}
@media (min-width: 1061px) {
  .customer-header-ready .header-actions {
    gap: 12px;
  }
  .customer-header-ready .header-actions .login-link {
    order: 3;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 8px;
    border-radius: 50%;
    border: 1px solid var(--theme-line);
    background: var(--theme-surface);
    color: var(--theme-text);
  }
  .customer-header-ready .header-actions .login-link span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  html {
    scroll-padding-top: 175px;
  }
  .customer-header-ready .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: 96px auto;
    gap: 0;
    min-height: 150px;
  }
  .customer-header-ready .brand {
    grid-column: 2;
    grid-row: 1;
    padding: 4px 0;
    justify-self: center;
  }
  .customer-header-ready .brand-logo {
    width: 125px;
    height: 86px;
  }
  .customer-header-ready .header-actions {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }
  .customer-header-ready .customer-header-utility {
    grid-column: 1;
    grid-row: 1;
  }
  .customer-header-ready .menu-toggle {
    display: none;
  }
  .customer-header-ready .main-nav {
    position: static;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 clamp(10px, 1.5vw, 26px);
    min-height: 54px;
    padding-bottom: 5px;
    background: transparent;
  }
  .customer-header-ready .main-nav a {
    padding: 14px 0;
    font-size: clamp(14px, 1.12vw, 16px);
    font-weight: 600;
    line-height: 1.6;
    letter-spacing: 0;
  }
  .customer-header-ready .main-nav a::after {
    bottom: 4px;
    height: 2px;
    border-radius: 0;
  }
  .customer-header-ready .main-nav a:hover::after,
  .customer-header-ready .main-nav a[aria-current="page"]::after,
  .customer-header-ready .is-expanded > a::after {
    width: 100%;
  }
  .customer-header-ready .is-expanded > a {
    color: var(--theme-accent, #b54b16);
  }
  .customer-header-ready .customer-mega-panel {
    max-height: calc(100dvh - 160px);
    overflow-y: auto;
  }
}
@media (max-width: 1060px) {
  .customer-header-ready .customer-header-utility,
  .customer-header-ready .customer-account-trigger,
  .customer-header-ready .customer-account-popover,
  .customer-header-ready .customer-mega-region {
    display: none !important;
  }
  .customer-menu-panel {
    width: min(100%, 520px);
  }
  .customer-menu .customer-nav-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    align-items: center;
    border-bottom: 1px solid var(--menu-rule);
  }
  .customer-menu .customer-nav-entry > a {
    border: 0;
    padding-right: 12px;
  }
  .customer-menu .customer-nav-entry > a::after {
    display: none;
  }
  .customer-menu .customer-submenu-toggle {
    width: 48px;
    height: 56px;
    color: var(--menu-ink);
  }
  .customer-menu .customer-submenu-toggle .icon {
    width: 18px;
    height: 18px;
  }
  .customer-menu .customer-mega-panel {
    grid-column: 1 / -1;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  .customer-menu .customer-mega-inner.container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    padding: 4px 8px 24px 14px;
    margin: 0;
    border-left: 2px solid var(--theme-accent, #b54b16);
  }
  .customer-menu .customer-mega-overview {
    display: none;
  }
  .customer-menu .customer-mega-heading {
    margin: 0 0 6px;
    font-size: 14px;
    color: var(--theme-muted);
  }
  .customer-menu .customer-mega-panel a {
    display: block;
    min-height: 44px;
    padding: 9px 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.65;
    border: 0;
  }
  .customer-menu .customer-mega-panel a::after {
    display: none;
  }
  .customer-menu.is-open .main-nav > .customer-nav-entry {
    animation: customer-menu-item 420ms both;
  }
  .customer-menu.is-open .main-nav > .customer-nav-entry:nth-child(3) {
    animation-delay: 70ms;
  }
  .customer-menu.is-open .main-nav > .customer-nav-entry:nth-child(4) {
    animation-delay: 105ms;
  }
  .customer-menu.is-open .main-nav > .customer-nav-entry:nth-child(5) {
    animation-delay: 140ms;
  }
  .customer-menu.is-open .main-nav > .customer-nav-entry:nth-child(6) {
    animation-delay: 175ms;
  }
}
/* Decorative, scroll-linked type uses existing brand copy; semantic page text remains complete. */
.customer-type-scene {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 10px;
  width: 100%;
  min-height: 270px;
  margin-block: 30px;
  padding-block: 44px;
  overflow: hidden;
  overflow: clip;
  border-block: 1px solid var(--theme-line, #eadfd1);
  background: var(--theme-soft, #fff0de);
  color: var(--theme-text, #39291f);
}
.customer-type-line {
  width: max-content;
  max-width: calc(100% - 48px);
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  text-wrap: balance;
  transform: translate3d(var(--type-shift, 0px), 0, 0);
}
.customer-type-brand {
  color: var(--theme-accent, #b54b16);
  -webkit-text-stroke: 0;
  font:
    800 clamp(40px, 7.2vw, 112px) / 1.25 Arial,
    sans-serif;
  letter-spacing: 0.025em;
}
.customer-type-brand span {
  color: var(--theme-accent, #b54b16);
  -webkit-text-stroke: 0;
}
.customer-type-care {
  padding-block: 0.2em;
  font-size: clamp(30px, 4.1vw, 66px);
  font-weight: 500;
  line-height: 1.7;
  transform: translate3d(calc(var(--type-shift, 0px) * -1), 0, 0);
}
@media (max-width: 1060px) {
  .customer-type-scene {
    min-height: 170px;
    padding-block: 24px;
    margin-block: 20px;
  }
  .customer-type-brand {
    font-size: clamp(20px, 5vw, 48px);
    letter-spacing: 0.02em;
  }
  .customer-type-care {
    font-size: clamp(16px, 3.7vw, 32px);
    line-height: 1.65;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .customer-motion [data-motion="title"] {
    transform: translate3d(0, 34px, 0);
    clip-path: inset(0 -0.3em 75% -0.3em);
    transition:
      opacity 650ms ease,
      transform 950ms cubic-bezier(0.16, 1, 0.3, 1),
      clip-path 950ms cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--motion-delay, 0ms);
  }
  .customer-motion [data-motion="image"] {
    translate: 0 var(--image-shift, 0px);
  }
  .customer-motion [data-motion="title"].motion-visible,
  .customer-motion [data-motion="title"]:focus-within {
    clip-path: inset(-0.3em -0.3em);
  }
  .customer-motion [data-motion="image"].motion-visible {
    transform: scale(1.025);
  }
  .customer-mega-panel:not([hidden]),
  .customer-account-popover:not([hidden]) {
    animation: customer-panel-in 250ms ease both;
  }
}
@keyframes customer-panel-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .customer-menu .customer-nav-entry {
    animation: none !important;
  }
  .customer-type-line {
    width: auto;
    max-width: 100%;
    padding-inline: 16px;
    white-space: normal;
    overflow-wrap: anywhere;
    transform: none !important;
  }
  .customer-type-brand {
    font-size: clamp(20px, 5vw, 64px);
  }
  .customer-type-care {
    font-size: clamp(16px, 3.7vw, 40px);
  }
}
@media print {
  .customer-type-scene,
  .customer-nav-shade,
  .customer-account-popover,
  .customer-mega-region {
    display: none !important;
  }
  .customer-motion [data-motion] {
    translate: none !important;
  }
}
/* Keep the full sign-in label visible even on a 320px phone. */
body[data-page] .customer-menu .login-link {
  width: 100%;
  min-width: 0;
}
body[data-page] .customer-menu .login-link span {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip-path: none;
}
.customer-brand-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--theme-muted, #715f51);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}
.customer-brand-note .icon {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}
@media (min-width: 1061px) {
  .customer-header-ready .brand {
    align-self: start;
  }
  .customer-header-ready .brand-logo {
    width: 100px;
    height: 68px;
  }
  .customer-header-ready .customer-brand-note {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    justify-self: center;
    max-width: 300px;
    margin-bottom: 5px;
  }
}
.customer-menu-note .customer-brand-note {
  justify-content: flex-start;
  font-size: 13px;
  line-height: 1.8;
  text-align: left;
}
/* One aspect ratio and one reveal treatment for customer and employee artwork. */
:is(body[data-page], body[data-presentation="employee"])
  main
  :is(
    .hero-art > img,
    .page-art > img,
    .story-art > img,
    .perks-hero-art > img,
    .member-hero figure > img,
    .login-art > img,
    .ep-art > img,
    .realtime-heading-art > img,
    .cms-public-image
  ) {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: 620px;
  aspect-ratio: 3/2;
  object-fit: contain;
  object-position: center;
  background: var(--theme-soft, #fff2e1);
  border-radius: 24px;
}
@media (max-width: 768px) {
  :is(body[data-page], body[data-presentation="employee"])
    main
    :is(
      .hero-art > img,
      .page-art > img,
      .story-art > img,
      .perks-hero-art > img,
      .member-hero figure > img,
      .login-art > img,
      .ep-art > img,
      .realtime-heading-art > img,
      .cms-public-image
    ) {
    border-radius: 20px;
  }
}
:is(body[data-page], body[data-presentation="employee"])
  main
  :is(img.mascot-pose, .perks-access-copy > img) {
  max-width: 144px;
  width: min(100%, 144px);
  height: auto;
  aspect-ratio: 3/2;
  object-fit: contain;
  object-position: center;
}
body[data-page] main :is(.perks-reward-image, .perks-highlight-image) {
  width: 100%;
  height: auto;
  max-height: 300px;
  aspect-ratio: 3/2;
  object-fit: contain;
  object-position: center;
  background: var(--theme-soft);
  border-radius: 20px;
}
body[data-page] main .perks-activity-image {
  height: auto;
  aspect-ratio: 3/2;
  object-fit: contain;
  object-position: center;
}
body[data-page] main .perks-points-card > img {
  max-width: 144px;
  height: auto;
  aspect-ratio: 3/2;
  object-fit: contain;
  object-position: center;
}
