/* ════════════════════════════════════════════════════════════════
   LJ Web Management -- site styles, built on the Apple Liquid Glass
   token system (see tokens.css). Component classes only; no raw
   values that a token already names.
   ════════════════════════════════════════════════════════════════ */

* { box-sizing: border-box; }

html { font-optical-sizing: auto; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); }

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }

.font-num { font-variant-numeric: tabular-nums; }

.wrap-grid { max-width: var(--max-grid); margin: 0 auto; padding: 0 var(--pad-x); }
.wrap-read { max-width: var(--max-read); margin: 0 auto; padding: 0 var(--pad-x); }

.section { padding: clamp(34px, 6vw, 56px) 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: pulse-dot 2.2s infinite; }
.eyebrow.is-accent { color: var(--accent-link); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.nav.scrolled {
  border-bottom-color: var(--hairline);
  box-shadow: 0 1px 12px rgba(0,0,0,0.04);
}
.nav-inner {
  max-width: var(--max-grid); margin: 0 auto; padding: 0 var(--pad-x);
  height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); flex-shrink: 0; }
.nav-logo img { height: 26px; width: auto; }
.nav-logo span { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex; align-items: center; height: 34px; padding: 0 13px;
  border-radius: var(--r-pill); color: var(--text-2); text-decoration: none;
  font-size: 13.5px; font-weight: 550; transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(0,0,0,0.05); color: var(--text); }
.nav-link.active { color: var(--text); background: rgba(0,0,0,0.05); }
.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-cta { display: inline-flex; }
.nav-toggle {
  display: none; width: 36px; height: 36px; border-radius: var(--r-pill); border: none;
  background: rgba(0,0,0,0.05); cursor: pointer; align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
}
.nav-toggle span { display: block; width: 16px; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform .25s var(--ease-out-quart), opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-menu {
  display: none; flex-direction: column; gap: 2px; padding: 8px var(--pad-x) 18px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(245,245,247,0.94);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 12px 10px; border-radius: 12px; color: var(--text); text-decoration: none;
  font-size: 15px; font-weight: 550;
}
.mobile-menu a:hover { background: rgba(0,0,0,0.05); }
.mobile-menu .btn { margin-top: 8px; justify-content: center; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-actions .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: var(--r-pill);
  font-size: 14.5px; font-weight: 600; text-decoration: none; border: none; cursor: pointer;
  transition: transform .2s var(--ease-out-quart), box-shadow .25s, background .2s, color .2s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-link); color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0,113,227,0.24); }
.btn-secondary {
  background: rgba(255,255,255,0.8); border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05); color: var(--text);
}
.btn-secondary:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); color: var(--text); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13px; border-radius: var(--r-pill); }
.btn-glass {
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff;
}
.btn-glass:hover { background: rgba(255,255,255,0.26); color: #fff; transform: translateY(-1px); }

/* ---------- Hero ---------- */
.hero { padding: clamp(48px,8vw,88px) 0 clamp(32px,5vw,56px); text-align: center; }
.hero h1 { font-size: clamp(32px,6vw,54px); line-height: 1.08; }
.hero p.lede { margin: 18px auto 0; font-size: clamp(16px,2.4vw,18.5px); color: var(--text-2); line-height: 1.6; max-width: 600px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; justify-content: center; }
.stat-row { display: flex; gap: clamp(20px,4vw,40px); flex-wrap: wrap; margin-top: 40px; justify-content: center; }
.stat { border-left: 2px solid var(--accent); padding-left: 14px; text-align: left; }
.stat b { display: block; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; }
.stat span { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 3px; }

/* ---------- Unified panel list ---------- */
.panel { background: var(--surface); border-radius: var(--r-panel); box-shadow: var(--sh-panel); overflow: hidden; }
.panel-row { display: block; padding: 18px clamp(18px,3vw,26px); color: var(--text); text-decoration: none; }
.panel-row + .panel-row { border-top: 1px solid var(--hairline); }
.panel-row:hover { background: var(--hover); }
.panel-row h3 { font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; }
.panel-row p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-2); line-height: 1.55; }

/* ---------- Card grid ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px,1fr)); gap: 16px; }
/* Fixed-count grid (e.g. exactly 4 feature tiles): balances 2x2 instead of
   letting auto-fill orphan a lone card in row 2 at in-between widths. */
.card-grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 900px) { .card-grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .card-grid-4 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card);
  padding: 24px; text-decoration: none; color: inherit; display: block;
  transition: transform .2s var(--ease-out-quart), box-shadow .2s;
}
.card:hover { color: inherit; transform: translateY(-3px); box-shadow: var(--sh-lift); }
.card-icon {
  width: 40px; height: 40px; border-radius: var(--r-thumb); background: rgba(0,113,227,0.08);
  color: var(--accent-link); display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.card-icon svg { width: 20px; height: 20px; }
.card h3 { font-size: 16px; margin-bottom: 6px; }
.card p { color: var(--text-2); font-size: 13.5px; line-height: 1.55; margin: 0; }

/* ---------- Tags / chips ---------- */
.tag {
  display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600;
  color: var(--text-2); background: rgba(0,0,0,0.05); padding: 4px 11px; border-radius: var(--r-pill);
}
.tag.is-accent { color: var(--accent-link); background: rgba(0,113,227,0.08); }
.tag.is-level-beginner { color: #1a7f37; background: rgba(26,127,55,0.09); }
.tag.is-level-intermediate { color: var(--accent-link); background: rgba(0,113,227,0.08); }
.tag.is-level-advanced { color: var(--heat); background: var(--heat-bg); }

/* ---------- Segmented control ---------- */
.seg { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.seg button {
  border: 1.5px solid var(--faint); cursor: pointer; font-size: 14px; font-weight: 600; padding: 10px 20px;
  border-radius: var(--r-pill); background: var(--surface); color: var(--text);
  transition: background .25s var(--ease-out-quart), color .25s, border-color .25s, box-shadow .25s;
}
.seg button:hover:not(.active) { border-color: var(--text-4); }
.seg button.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 6px 16px rgba(0,113,227,0.22); }

/* ---------- Colored CTA with orbs ---------- */
.cta-block {
  position: relative; overflow: hidden; border-radius: var(--r-hero);
  padding: clamp(32px,5vw,56px); background: var(--grad-cta); box-shadow: var(--sh-cta);
  text-align: center;
}
.cta-block::before {
  content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255,255,255,0.16); filter: blur(50px); top: -120px; right: -80px;
}
.cta-block::after {
  content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%;
  background: rgba(94,92,230,0.55); filter: blur(52px); bottom: -100px; left: 8%;
}
.cta-block .cta-inner { position: relative; max-width: 560px; margin: 0 auto; }
.cta-block h2 { color: #fff; font-size: clamp(22px,3.4vw,30px); }
.cta-block p { color: rgba(255,255,255,0.85); font-size: 15.5px; line-height: 1.6; margin: 12px 0 0; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--text); color: rgba(255,255,255,0.7); }
.footer-top { padding: 56px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; }
.footer-brand img { height: 32px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: 13.5px; line-height: 1.65; color: rgba(255,255,255,0.55); max-width: 300px; margin: 0; }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; color: #fff; transition: background .2s, transform .2s; }
.footer-social a:hover { background: var(--accent); transform: translateY(-2px); }
.footer-social svg { width: 16px; height: 16px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { color: #fff; font-size: 12px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 4px; }
.footer-col a, .footer-col span { color: rgba(255,255,255,0.62); font-size: 13.5px; text-decoration: none; line-height: 1.5; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); }
.footer-bottom-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 20px 0; max-width: var(--max-grid); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }
.footer-bottom-row > span { font-size: 12.5px; color: rgba(255,255,255,0.5); }
.footer-legal { display: flex; gap: 18px; }
.footer-legal a { color: rgba(255,255,255,0.5); font-size: 12.5px; text-decoration: none; }
.footer-legal a:hover { color: #fff; }

@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; row-gap: 32px; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom-row { flex-direction: column; align-items: flex-start; padding-bottom: 64px; }
  .footer-bottom-row > span { max-width: calc(100% - 64px); }
}

/* ---------- Course catalog ---------- */
.catalog-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.catalog-search {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; min-width: 240px;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-pill); box-shadow: var(--sh-card);
}
.catalog-search svg { width: 16px; height: 16px; color: var(--text-3); flex-shrink: 0; }
.catalog-search input { border: none; outline: none; background: none; font-size: 14px; color: var(--text); width: 100%; font-family: var(--font); }
.catalog-search input::placeholder { color: var(--text-4); }
.catalog-count { font-size: 13px; color: var(--text-2); margin-bottom: 18px; }

.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px,1fr)); gap: 18px; }
.course-card {
  background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card);
  padding: 22px; text-align: left; border: none; cursor: pointer; color: inherit; font-family: var(--font);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .2s var(--ease-out-quart), box-shadow .2s;
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lift); }
.course-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.course-card h3 { font-size: 16px; line-height: 1.35; letter-spacing: -0.01em; }
.course-card .course-meta { font-size: 12.5px; color: var(--text-3); display: flex; gap: 8px; align-items: center; }
.course-card p.summary { font-size: 13.5px; color: var(--text-2); line-height: 1.55; margin: 0; flex-grow: 1; }
.course-card-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--hairline); }
.course-price { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.course-empty { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--text-2); }

/* ---------- Modal (course detail) ---------- */
.modal-scrim {
  position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: background .3s, opacity .3s;
}
.modal-scrim.open { background: rgba(0,0,0,0.4); opacity: 1; pointer-events: auto; }
.modal-sheet {
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  background: rgba(245,245,247,0.86);
  backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-radius: var(--r-hero) var(--r-hero) 0 0;
  box-shadow: var(--sh-overlay);
  padding: clamp(24px,4vw,36px);
  transform: translateY(3%) scale(0.98); opacity: 0;
  transition: transform .4s var(--ease-spring), opacity .3s;
}
.modal-scrim.open .modal-sheet { transform: translateY(0) scale(1); opacity: 1; }
@media (min-width: 640px) {
  .modal-scrim { align-items: center; padding: 24px; }
  .modal-sheet { border-radius: var(--r-hero); }
}
.modal-close {
  width: 32px; height: 32px; border-radius: 50%; border: none; background: rgba(0,0,0,0.06);
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-2);
  float: right;
}
.modal-close:hover { background: rgba(0,0,0,0.1); }
.modal-sheet h2 { font-size: clamp(20px,3vw,26px); line-height: 1.2; clear: both; padding-top: 4px; }
.modal-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 16px; }
.modal-sheet p.desc { font-size: 15px; color: var(--text-body); line-height: 1.7; margin: 0 0 20px; }
.modal-sheet h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin: 0 0 12px; }
.outcome-list { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.outcome-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-body); line-height: 1.5; }
.outcome-list svg { width: 18px; height: 18px; color: var(--live); flex-shrink: 0; margin-top: 1px; }
.modal-buy {
  background: var(--surface); border-radius: var(--r-sheet); padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; box-shadow: var(--sh-card);
}
.modal-buy-price { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.modal-buy-note { font-size: 11.5px; color: var(--text-3); margin-top: 12px; text-align: center; min-height: 14px; }

/* ---------- Enroll CTA (inside course modal) ---------- */
.modal-enroll {
  background: var(--surface); border-radius: var(--r-sheet); padding: 20px;
  box-shadow: var(--sh-card); display: flex; flex-direction: column; gap: 14px;
}
.modal-enroll h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .modal-sheet, .modal-scrim, .nav-toggle span, .course-card, .btn { transition: none !important; }
}

/* ---------- Prose (legal / reading pages) ---------- */
.prose { font-size: 15px; color: var(--text-body); line-height: 1.85; }
.prose h2 { font-size: clamp(19px,3vw,22px); margin: 40px 0 14px; letter-spacing: -0.015em; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 16px; padding-left: 20px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); }
.updated-note { font-size: 13px; color: var(--text-3); margin-bottom: 8px; }

/* ---------- FAQ accordion ---------- */
.faq-group + .faq-group { margin-top: 40px; }
.faq-group-label { display: block; margin: 0 0 14px 4px; }
.faq-item { padding: 20px clamp(18px,3vw,26px); }
.faq-item + .faq-item { border-top: 1px solid var(--hairline); }
.faq-item summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { flex-shrink: 0; width: 20px; height: 20px; color: var(--text-3); transition: transform .25s var(--ease-out-quart); }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item p { margin: 14px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.7; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--sh-card); padding: 24px; }
.contact-card h3 { font-size: 15px; margin-bottom: 6px; }
.contact-card p, .contact-card a { font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.contact-card a { text-decoration: none; }
.contact-card a:hover { color: var(--accent-link); }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.section-head { max-width: 620px; margin: 0 auto 40px; text-align: center; }
.section-head h2 { font-size: clamp(24px,3.6vw,34px); line-height: 1.2; margin-top: 6px; }
.section-head p { margin-top: 12px; font-size: 15.5px; color: var(--text-2); line-height: 1.6; }
.hide-sm { display: initial; }
@media (max-width: 680px) { .hide-sm { display: none; } }
