/* web61: the game's promo line — "ทุกอาชีพที่คุณเลือก คือความสุขของคุณ" — gold-foil headline + sub line, on the website
   hero (/ = site.js, /<lang>/ = server/web2.js), the /occupations hub header and the job-quiz result (server/occ42.js,
   public/js/occ42.js). Only opacity / transform / background-position animate (no layout shift: the text takes its
   place from the first frame); still with prefers-reduced-motion. */
.p61, .p61-quiz {
  --p61-foil: linear-gradient(100deg, #fff1c6 0%, #ffd66a 18%, #d39226 34%, #fff7dc 46%, #ffe08a 52%, #c98a22 66%, #ffe7a0 84%, #b4771a 100%);
  --p61-ink: #e9e2f2; --p61-orn: rgba(255, 214, 120, .75); --p61-glow: rgba(245, 190, 90, .32);
  position: relative; margin: 0; max-width: 100%; text-wrap: balance;
}
:root[data-theme="light"] .p61, :root[data-theme="light"] .p61-quiz {
  --p61-foil: linear-gradient(100deg, #6e3f00 0%, #a8700e 22%, #d9a63a 40%, #8a5200 52%, #b8801a 70%, #6e3f00 100%);
  --p61-ink: #2a2f52; --p61-orn: rgba(168, 112, 14, .7); --p61-glow: rgba(170, 110, 20, .22);
}
.p61-h { display: block; margin: 0; font-weight: 700; line-height: 1.22; letter-spacing: .01em;
  font-size: clamp(23px, 3.2vw, 40px); font-family: var(--w12-serif, inherit);
  background: var(--p61-foil); background-size: 240% 100%; -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent; filter: drop-shadow(0 2px 14px var(--p61-glow));
  animation: p61-rise .9s cubic-bezier(.2, .7, .2, 1) .35s both, p61-foil 9s ease-in-out 1.3s infinite; }
:root[data-theme="light"] .p61-h { filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .95)) drop-shadow(0 0 14px rgba(255, 255, 255, .85)); }
/* the little ornament: a diamond between two hairlines, drawn in */
.p61-orn { display: flex; align-items: center; gap: 8px; height: 10px; margin: 8px 0 6px; width: min(220px, 70%); }
.p61-orn::before, .p61-orn::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--p61-orn)); transform-origin: right; animation: p61-line .8s ease .75s both; }
.p61-orn::after { background: linear-gradient(270deg, transparent, var(--p61-orn)); transform-origin: left; }
.p61-orn i { width: 7px; height: 7px; transform: rotate(45deg); background: var(--p61-foil); box-shadow: 0 0 10px var(--p61-glow); animation: p61-gem .6s ease .7s both; }
.p61-sub { display: block; margin: 0; max-width: 52ch; font-size: clamp(14px, 1.2vw, 16.5px); line-height: 1.6; color: var(--p61-ink); text-wrap: pretty;
  animation: p61-rise .9s cubic-bezier(.2, .7, .2, 1) .6s both; }
:root:not([data-theme="light"]) .p61-sub { text-shadow: 0 1px 8px rgba(0, 0, 0, .65); }
.p61.center { margin-inline: auto; text-align: center; }
.p61.center .p61-orn { margin-inline: auto; }

@keyframes p61-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes p61-foil { 0%, 30% { background-position: 100% 0; } 70%, 100% { background-position: 0 0; } }
@keyframes p61-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes p61-gem { from { opacity: 0; transform: rotate(45deg) scale(0); } to { opacity: 1; transform: rotate(45deg) scale(1); } }

/* ---------- the game page / (site.js): the promo line is the headline; the old tagline becomes its kicker */
.site-hero .p61-h { font-size: clamp(26px, 3.5vw, 46px); }
.site-hero .p61-sub { max-width: 48ch; }
.site.w12 .hero-copy:has(.p61) .hero-tag { font-size: clamp(14px, 1.3vw, 17px); letter-spacing: .14em; font-weight: 600; opacity: .92; }
/* ---------- /<lang>/ (web2.js): the same, the h1 (what search engines read) shown as the line under it */
body.w2 .w12-hero .p61 { margin: 6px auto 14px; text-align: center; }
body.w2 .w12-hero .p61-h { font-size: clamp(30px, 4.8vw, 58px); }
body.w2 .w12-hero .p61-orn, body.w2 .w12-hero .p61-sub { margin-inline: auto; }
body.w2 .w12-hero .p61 ~ h1 { font-size: clamp(19px, 2.3vw, 28px); }
/* ---------- /occupations hub header */
.o47-hero .p61 { margin: 2px 0 10px; }
.o47-hero .p61-h { font-size: clamp(20px, 2.3vw, 30px); }
/* ---------- the quiz result */
.o42-quiz .p61-quiz { display: block; margin: 6px 0 0; text-align: start; font-weight: 700; font-size: clamp(17px, 2.2vw, 22px); line-height: 1.3;
  background: var(--p61-foil); background-size: 240% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px var(--p61-glow)); animation: p61-rise .7s cubic-bezier(.2, .7, .2, 1) .15s both, p61-foil 9s ease-in-out 1s infinite; }
.o42-quiz .p61-quiz::before { content: "✦"; -webkit-text-fill-color: var(--p61-orn); margin-inline-end: .45em; font-size: .7em; vertical-align: .15em; }

@media (max-width: 720px) {
  .p61-orn { margin: 6px 0 4px; }
  .site-hero .p61 { margin-inline: auto; text-align: center; }
  .site-hero .p61-orn { margin-inline: auto; }
  .o47-hero .p61 { margin-inline: auto; text-align: center; }
  .o47-hero .p61-orn { margin-inline: auto; }
}
/* phone landscape: short screens keep only the headline */
@media (max-height: 480px) and (orientation: landscape) {
  .site-hero .p61-sub, .site-hero .p61-orn { display: none; }
  .site-hero .p61-h { font-size: clamp(18px, 3.2vh, 24px); }
}
@media (prefers-reduced-motion: reduce) {
  .p61-h, .p61-sub, .p61-orn::before, .p61-orn::after, .p61-orn i, .o42-quiz .p61-quiz { animation: none !important; }
}
