@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Noto+Sans+Thai:wght@400;500;600;700&display=swap");

/* ==========================================================================
   PlainPages, demo-shared.css
   The only styles shared by all eight demo sites: the studio "museum label"
   bar at the top, the fictional-demo footer strip, and a tiny common reset.
   Each demo's personality lives in its own style.css next to its index.html.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

html[lang="th"] :is(h1, h2, h3, h4, p, a, span, label, button, input, select, textarea, li, dt, dd),
html[lang="zh"] :is(h1, h2, h3, h4, p, a, span, label, button, input, select, textarea, li, dt, dd) {
  font-family: "Noto Sans Thai", "Noto Sans SC", "Inter", system-ui, sans-serif !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}
html[lang="zh"] :is(h1, h2, h3) { line-height: 1.22 !important; }
html[lang="th"] :is(h1, h2, h3) { line-height: 1.3 !important; }

/* Optional conversion bar used by focused demo pages on small screens. */
.demo-mobile-cta { display: none; }

/* ---------- Studio label bar ---------- */
.ppd-bar {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.3rem 1rem;
  padding: 0.5rem clamp(0.9rem, 3vw, 1.6rem);
  background: rgba(18, 17, 15, 0.93);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #efeae0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  line-height: 1.3;
}
.ppd-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.ppd-brand svg { width: 0.95rem; height: 0.95rem; flex: 0 0 auto; }
.ppd-brand b { font-weight: 700; }
.ppd-brand:hover b { text-decoration: underline; text-underline-offset: 3px; }

.ppd-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.35rem;
}
.ppd-lang { position: relative; }
.ppd-lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2rem;
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(239, 234, 224, 0.28);
  border-radius: 99px;
  background: transparent;
  color: inherit;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.ppd-lang-btn:hover,
.ppd-lang-btn[aria-expanded="true"] { background: rgba(239, 234, 224, 0.12); }
.ppd-lang-menu {
  position: absolute;
  z-index: 100;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 9.5rem;
  padding: 0.35rem;
  border: 1px solid rgba(239, 234, 224, 0.24);
  border-radius: 0.65rem;
  background: #181613;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.3rem) scale(0.98);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.16s;
}
.ppd-lang[data-open="true"] .ppd-lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  transition-delay: 0s;
}
.ppd-lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.45rem 0.6rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: #efeae0;
  text-align: left;
}
.ppd-lang-option:hover,
.ppd-lang-option:focus-visible { background: rgba(239, 234, 224, 0.12); }
.ppd-lang-option b { opacity: 0; }
.ppd-lang-option[aria-checked="true"] b { opacity: 1; }
.ppd-link {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.2rem 0.65rem;
  border: 1px solid rgba(239, 234, 224, 0.28);
  border-radius: 99px;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ppd-link:hover { background: #efeae0; color: #14120f; border-color: #efeae0; }
.ppd-link--cta { background: #efeae0; color: #14120f; border-color: #efeae0; font-weight: 600; }
.ppd-link--cta:hover { background: transparent; color: #efeae0; }

.ppd-arrows { display: inline-flex; align-items: center; gap: 0.35rem; margin-left: 0.35rem; }
.ppd-arrow {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(239, 234, 224, 0.28);
  border-radius: 50%;
  color: inherit;
  text-decoration: none;
  font-size: 0.85rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.ppd-arrow:hover { background: #efeae0; color: #14120f; }
.ppd-count {
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  opacity: 0.65;
}

/* ---------- Fictional-demo footer strip ---------- */
.ppd-foot {
  padding: 1.3rem clamp(0.9rem, 3vw, 1.6rem) 1.5rem;
  background: #14120f;
  color: rgba(239, 234, 224, 0.75);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.78rem;
  line-height: 1.6;
  text-align: center;
}
.ppd-foot p { margin: 0 auto; max-width: 46rem; }
.ppd-foot a { color: #efeae0; text-decoration: underline; text-underline-offset: 3px; }
.ppd-foot a:hover { text-decoration: none; }
.ppd-foot-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  margin-top: 0.7rem;
}
.ppd-foot-links a { text-decoration: none; }
.ppd-foot-links a:hover { text-decoration: underline; }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  /* Static on phones: the bar wraps to two rows, so pinning it would
     swallow too much of the demo itself. */
  .ppd-bar { position: static; justify-content: center; text-align: center; padding-block: 0.45rem; }
  .ppd-links { justify-content: center; }
  .ppd-lang-menu {
    right: 50%;
    transform: translate(50%, -0.3rem) scale(0.98);
    transform-origin: top center;
  }
  .ppd-lang[data-open="true"] .ppd-lang-menu { transform: translate(50%, 0) scale(1); }
  .ppd-count { display: none; }
  .ppd-hide-s { display: none; }   /* trims "website" + "Back to" wording on phones */
  body:has(.demo-mobile-cta) { padding-bottom: 4.25rem; }
  .demo-mobile-cta {
    position: fixed;
    z-index: 85;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    padding: 0.65rem max(0.8rem, env(safe-area-inset-right)) calc(0.65rem + env(safe-area-inset-bottom)) max(0.8rem, env(safe-area-inset-left));
    background: rgba(18, 17, 15, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    font-family: "Inter", system-ui, sans-serif;
  }
  .demo-mobile-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    border-radius: 0.35rem;
    background: #efeae0;
    color: #14120f;
    font-weight: 700;
    text-decoration: none;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
