/* QuantCorner Wix site: additions on top of assets/styles.css (the white landing page build of
   2026-11-30, Lucid Current tokens 2026-12-03). Same tokens, same flat cards, same nav tiles.
   Covers: the multi-page nav, inner-page headers, and the cards that show live Wix content
   (bookable courses, events, posts). */

/* ── Nav: brand tile left, links pill + action right ───────────────────── */
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-links {
  display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 8px;
  background: var(--surface); box-shadow: 0 0 0 1px var(--rule);
}
.nav-links a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 6px;
  font: 500 15px/1.2 var(--font); color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: background-color var(--duration-quick) var(--ease-out), color var(--duration-quick) var(--ease-out);
}
.nav-links a:hover { color: var(--ink); background: var(--tint); }
.nav-links a[aria-current="page"] { color: var(--surface); background: var(--ink); }
.nav-menu { position: relative; display: none; }
.nav-menu > summary {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 8px; cursor: pointer;
  list-style: none; background: var(--surface); box-shadow: 0 0 0 1px var(--rule); font: 700 16px/1.2 var(--display);
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu-panel {
  position: absolute; right: 0; top: 52px; width: min(280px, calc(100vw - 28px)); padding: 6px; border-radius: 8px;
  background: var(--surface); box-shadow: 0 0 0 1px var(--rule), 0 8px 24px rgba(6, 24, 28, 0.14);
  display: grid; gap: 2px;
}
.nav-menu-panel a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 6px; text-decoration: none; color: var(--ink); }
.nav-menu-panel a:hover, .nav-menu-panel a[aria-current="page"] { background: var(--tint); }
@media (max-width: 860px) {
  .nav-links, .nav-right > .btn { display: none; }
  .nav-menu { display: block; }
}

/* ── Inner pages: clear the fixed nav, white canvas, same type scale ───── */
.page { padding: 112px 0 clamp(80px, 12vh, 140px); }
.page-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 5vw, 56px); max-width: 760px; }
.page-kicker { font: 500 14px/1.4 var(--font); color: var(--teal-ink); }
.page-head .lede { max-width: 60ch; }
.page-body { min-width: 0; }

/* ── Live Wix content on the home page ─────────────────────────────────── */
.live-head { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: end; justify-content: space-between; margin-bottom: clamp(28px, 4vw, 48px); }
.live-head > div { display: grid; gap: 12px; max-width: 720px; }
.live-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .live-grid { grid-template-columns: minmax(0, 1fr); } }

.lcard {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  border-radius: 8px; background: var(--surface); box-shadow: 0 0 0 1px var(--rule);
  transition: box-shadow var(--duration-fast) var(--ease-smooth-out);
}
.lcard:hover, .lcard:focus-within { box-shadow: 0 0 0 2px var(--primary); }
.lcard-media { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; background: var(--tint-2); }
.lcard-media--empty { display: grid; place-items: center; color: var(--teal-ink); }
.lcard-media--empty svg { width: 56px; height: 56px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lcard-body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 20px 20px 22px; }
.lcard-kicker { font: 500 13px/1.4 var(--mono); color: var(--teal-ink); }
.lcard h3 { font: 700 22px/1.2 var(--display); letter-spacing: 0; text-wrap: balance; }
.lcard h3 a { color: var(--ink); text-decoration: none; }
.lcard h3 a::after { content: ""; position: absolute; inset: 0; }
.lcard h3 a:focus-visible { outline: none; }
.lcard:has(h3 a:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.lcard p.lcard-text { font-size: 15px; line-height: 1.55; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lcard-meta { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 6px 16px; font: 400 14px/1.4 var(--mono); color: var(--ink); }
.lcard--dark { background: var(--dark); box-shadow: none; }
.lcard--dark h3 a, .lcard--dark .lcard-meta { color: var(--surface); }
.lcard--dark .lcard-kicker { color: var(--teal-accent); }
.lcard--dark p.lcard-text { color: var(--on-dark-2); }
.lcard--dark:hover, .lcard--dark:focus-within { box-shadow: 0 0 0 2px var(--teal-accent); }

.live-empty { border-radius: 8px; padding: 24px; background: var(--tint); color: var(--ink-2); }
.live-empty a { color: var(--teal-ink); }

/* Section on a tinted band */
.section--tint { background: var(--tint); }

/* Footer navigation added to the landing footer */
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.footer-nav a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.footer-nav a:hover { text-decoration-thickness: 2px; }
.footer-col { display: grid; gap: 18px; }

/* ── Top bar after cosmos.so: links left, logo centre, two actions right. No box, no rule. ── */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 300; height: 68px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 clamp(16px, 2.4vw, 36px); background: transparent;
  transition: background-color var(--duration-fast) var(--ease-out);
}
.hdr.is-stuck { background: var(--surface); }
.hdr-links { display: flex; align-items: center; gap: 4px; }
.hdr-links a, .hdr-text {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px;
  font: 500 16px/1.2 var(--font); color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: color var(--duration-quick) var(--ease-out);
}
.hdr-links a:hover, .hdr-text:hover, .hdr-links a[aria-current="page"], .hdr-text[aria-current="page"] { color: var(--ink); }
.hdr-logo { display: flex; align-items: center; justify-content: center; min-height: 44px; }
.hdr-logo img { height: 26px; width: auto; }
.hdr-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.hdr-join {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 22px; border-radius: 999px;
  background: var(--dark); color: var(--surface); font: 700 16px/1.2 var(--display); text-decoration: none; white-space: nowrap;
  transition: background-color var(--duration-quick) var(--ease-out);
}
.hdr-join:hover { background: var(--dark-raised); color: var(--surface); }
.hdr .nav-menu > summary { box-shadow: none; background: transparent; padding: 0 10px; font: 500 16px/1.2 var(--font); color: var(--ink-2); }
/* Sound toggle (home only, assets/sfx.js): icon button, Toggle variant, 44px square with a 24px icon. */
.hdr-sound {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-2); cursor: pointer;
  transition: color var(--duration-quick) var(--ease-out), background-color var(--duration-quick) var(--ease-out);
}
.hdr-sound[hidden] { display: none; }
.hdr-sound:hover { color: var(--ink); background: var(--k06); }
.hdr-sound svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.hdr-sound[aria-pressed="true"] .hdr-sound-off, .hdr-sound[aria-pressed="false"] .hdr-sound-on { display: none; }
/* Background music button (home only, assets/sfx.js): bottom left, clear of the chat mascot at the bottom right.
   White surface with a ring so it shows on the dark sections too. States: music off = music-off icon; on = music icon;
   playing = moving bars; still blocked by the browser (.is-blocked) = a pill with "แตะเพื่อเปิดเสียง" and a soft pulse. */
.music-btn {
  position: fixed; left: clamp(16px, 2.4vw, 36px); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 310;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 44px; height: 44px; padding: 0 11px;
  border: 0; border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer;
  font: 500 14px/1.2 var(--font); white-space: nowrap;
  box-shadow: 0 0 0 1px var(--rule), 0 4px 12px var(--k12);
  transition: background-color var(--duration-quick) var(--ease-out);
}
.music-btn[hidden] { display: none; }
.music-btn:hover { background: var(--tint-2); }
.music-btn svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.music-bars, .music-off, .music-label { display: none; }
.music-btn[aria-pressed="false"] .music-on { display: none; }
.music-btn[aria-pressed="false"] .music-off { display: block; }
.music-btn.is-playing .music-on { display: none; }
.music-btn.is-playing .music-bars { display: flex; }
/* Lagoon Deep with white text (4.9:1): it shows on the white sections and on the dark ones. */
.music-btn.is-blocked { padding: 0 16px 0 12px; background: var(--primary); color: var(--on-primary); box-shadow: 0 4px 12px var(--k18); }
.music-btn.is-blocked:hover { background: var(--primary-hover); }
.music-btn.is-blocked .music-label { display: inline; }
.music-bars { align-items: flex-end; gap: 3px; height: 18px; }
.music-bars i { width: 3px; height: 30%; border-radius: 2px; background: var(--primary); }
.music-btn.is-playing .music-bars i { animation: music-bar 0.9s ease-in-out infinite alternate; }
.music-btn.is-playing .music-bars i:nth-child(2) { animation-duration: 0.62s; animation-delay: -0.3s; }
.music-btn.is-playing .music-bars i:nth-child(3) { animation-duration: 0.78s; animation-delay: -0.5s; }
.music-btn.is-playing .music-bars i:nth-child(4) { animation-duration: 0.55s; animation-delay: -0.2s; }
@media (prefers-reduced-motion: no-preference) {
  .music-btn.is-blocked { animation: music-pulse 2.4s var(--ease-out) infinite; }
}
@keyframes music-pulse {
  0% { box-shadow: 0 0 0 0 rgb(11 166 173 / 0.55), 0 4px 12px var(--k18); }
  70%, 100% { box-shadow: 0 0 0 12px rgb(11 166 173 / 0), 0 4px 12px var(--k18); }
}
@keyframes music-bar { from { height: 25%; } to { height: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .music-btn.is-playing .music-bars i { animation: none; }
  .music-btn.is-playing .music-bars i:nth-child(odd) { height: 100%; }
  .music-btn.is-playing .music-bars i:nth-child(even) { height: 60%; }
}
@media (max-width: 860px) {
  .hdr { grid-template-columns: auto 1fr; }
  .hdr-left, .hdr-right > .hdr-text { display: none; }
  .hdr-logo { justify-content: flex-start; }
  .hdr .nav-menu { display: block; }
}
