/* 覺瑜伽 — shared component classes (lifted from the original design's
   inline <style> block). Layout primitives + buttons + animations. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--neutral-50); padding-top: 68px; }

.jy-container { max-width: 1200px; margin: 0 auto; width: 100%; }

/* Buttons */
.jy-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-sans-cjk); font-weight: 500; font-size: 14px;
  padding: 10px 20px; border-radius: var(--r-pill); border: 1px solid transparent;
  cursor: pointer; transition: all 120ms var(--ease-out);
  text-decoration: none; white-space: nowrap;
  letter-spacing: 0.04em;
}
.jy-btn--primary    { background: var(--brand-teal-700); color: #fff; }
.jy-btn--primary:hover { background: var(--brand-teal-800); transform: translateY(-1px); }
.jy-btn--primary:active { transform: translateY(0); box-shadow: var(--shadow-inner); }
.jy-btn--secondary  { background: transparent; color: var(--brand-teal-700); border-color: var(--brand-teal-500); }
.jy-btn--secondary:hover { background: var(--brand-teal-100); }
.jy-btn--ghost      { background: transparent; color: var(--fg-2); }
.jy-btn--ghost:hover{ color: var(--fg-1); background: var(--bg-muted); }

/* Focus / selection */
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--brand-teal-500); outline-offset: 2px; border-radius: 4px;
}
::selection { background: var(--brand-teal-400); color: var(--neutral-900); }

/* Section anchor offset (sticky nav 68px) */
section { scroll-margin-top: 80px; }

/* Entry animations: soft fade + upward translate */
@keyframes jyFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
section > .jy-container > * { animation: jyFadeUp 420ms var(--ease-out) both; }

/* Hero responsive */
.jy-hero { min-height: min(88vh, 760px); position: relative; overflow: hidden; background: var(--brand-teal-400); }
.jy-hero-grid {
  display: grid;
  grid-template-columns: 1fr minmax(360px, 440px);
  gap: 24px;
  align-items: end;
  position: relative;
  padding: 72px 32px 120px;
  min-height: min(88vh, 760px);
}
.jy-hero-card {
  background: rgba(255,255,255,0.90);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-radius: var(--r-xl);
  padding: 32px 36px 30px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.6);
}

@media (max-width: 900px) {
  .jy-hero-grid { grid-template-columns: 1fr; align-items: start; padding-top: 48px; padding-bottom: 80px; }
  .jy-hero-card { max-width: 100%; }
  .jy-promo { grid-template-columns: 1fr !important; padding: 24px 24px !important; }
  .jy-promo-deals { justify-content: center; }
  [data-jy-twocol] { grid-template-columns: 1fr !important; gap: 32px !important; }
  .jy-value-row { grid-template-columns: 60px 1fr !important; gap: 16px !important; }
  .jy-value-row > :nth-child(3) { grid-column: 1 / -1 !important; }
  /* Mobile pricing tabs: keep them sticky so the user can hop between tiers
     without scrolling back up — but COMPACT them down to a single thin row
     (3 columns) so they don't eat the viewport. The long description on each
     tab is hidden; only the small "01 — Single / 單堂" labels remain. */
  .jy-pricing-tabs {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    padding: 8px 0 !important;
    margin-bottom: 16px !important;
    box-shadow: 0 8px 8px -8px rgba(31, 106, 135, 0.1) !important;
  }
  .jy-pricing-tab {
    padding: 8px 6px !important;
    box-shadow: none !important;
    text-align: center;
  }
  .jy-pricing-tab > div:nth-child(1) { font-size: 10px !important; line-height: 1.1 !important; letter-spacing: 0.04em !important; }
  .jy-pricing-tab > div:nth-child(2) { font-size: 13px !important; line-height: 1.1 !important; margin-top: 2px; }
  .jy-pricing-tab > div:nth-child(3) { display: none !important; }   /* hide description on mobile */

  /* Tier sections need extra top margin so their headers aren't hidden
     under the (now ~50px-tall) sticky bar. Nav 68 + sticky 50 + buffer = 130 */
  #pricing-single, #pricing-term, #pricing-points {
    scroll-margin-top: 130px !important;
  }
  .jy-drop-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .jy-term-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .jy-pts-grid { grid-template-columns: 1fr !important; }
  .jy-pts-deduct { grid-template-columns: 1fr 1fr !important; }
}
@media (max-width: 900px) {
  /* Schedule on tablet/mobile: sticky day-tab bar at top, show only the
     active day's column (lets the user jump straight to Sat without scrolling) */
  .jy-sched-day-tabs {
    display: flex !important;
    position: sticky;
    top: 68px;            /* under the fixed nav */
    z-index: 25;
    box-shadow: 0 8px 8px -8px rgba(31, 106, 135, 0.08);
  }
  .jy-sched-grid {
    grid-template-columns: 1fr !important;
  }
  .jy-sched-grid > [data-jy-day][data-jy-day-active="false"] {
    display: none !important;
  }
  .jy-sched-grid > [data-jy-day] .jy-sched-day-header {
    display: none;        /* day name already shown in sticky tab */
  }
}
@media (max-width: 900px) {
  .jy-news-card { grid-template-columns: 1fr !important; }
  .jy-news-card > :first-child { border-right: none !important; padding-right: 0 !important; }
  .jy-gallery-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .jy-visit-grid { grid-template-columns: 1fr !important; }
  .jy-floor-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
}
@media (max-width: 520px) {
  .jy-gallery-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* In English mode, hide the secondary EN overline since the title is already English. */
html[lang="en"] .jy-value-en { display: none; }

/* Section h2 titles in EN: switch to sans-latin (Jost) and shrink — Latin
   serif at the CJK clamp size looks oversized. */
html[lang="en"] .jy-section-h2 {
  font-family: var(--font-sans-latin) !important;
  font-weight: 500 !important;
  font-size: clamp(24px, 2.6vw, 36px) !important;
  letter-spacing: 0.02em !important;
  line-height: 1.25 !important;
  text-wrap: balance;
}

/* About 3-row value cards: title text in EN should also be sans-latin
   (not CJK serif) and smaller. Also auto-size the title column so long
   English words don't overflow into the description column. */
html[lang="en"] .jy-value-title {
  font-family: var(--font-sans-latin) !important;
  font-weight: 500 !important;
  font-size: 22px !important;
  letter-spacing: 0.04em !important;
}
html[lang="en"] .jy-value-row {
  grid-template-columns: 80px auto 1fr !important;
}

/* Generic: any display-CJK title that holds bilingual content (Promo
   headline, About studio title, News gallery title, Visit address,
   Visit floor title, etc.) — switch to sans-latin in EN. */
html[lang="en"] .jy-cjk-title {
  font-family: var(--font-sans-latin) !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em !important;
}

/* ── Sticky tier-tabs in Pricing section ────────────────────────────
   The 3 plan-overview cards stick under the fixed nav (68px tall) so the
   user can jump to a different tier without scrolling back up. */
.jy-pricing-tabs {
  position: sticky;
  top: 68px;
  z-index: 30;
  background: var(--neutral-50);
  padding: 14px 0 18px;
  margin-bottom: 28px !important;
  /* Soft fade so card content scrolling beneath doesn't snap behind the bar */
  box-shadow: 0 12px 12px -10px rgba(31, 106, 135, 0.06);
}
@media (max-width: 700px) {
  .jy-nav-links { display: none !important; }
  .jy-nav-menu-btn { display: inline-flex !important; }
  .jy-nav-cta { display: none !important; }
  section { padding-left: 20px !important; padding-right: 20px !important; }
  /* Mobile hero: pan the watercolour fully right (object-position 0%) so
     the storefront building fills the viewport; the right-hand wordmark
     + QR overlay drops off-frame. */
  #hero-bg-img { object-position: 0% 35% !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
