/* LKE Institute — base styles and primitives (design v2).
   Tokens: ecosystem-tokens.css. Page components: lke-site-kit/assets/lke-site.css. */

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  font-family: var(--font-body); color: var(--text); background: var(--white);
  font-size: 16.5px; line-height: 1.65; font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5 {
  font-family: var(--font-head); color: var(--brand-primary); font-weight: 600;
  line-height: 1.18; letter-spacing: -0.012em; text-wrap: balance; font-optical-sizing: auto;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.3; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: inherit; }
p { text-wrap: pretty; }
a { color: var(--brand-secondary); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color .2s var(--ease); }
a:hover { color: var(--brand-primary); }
img { max-width: 100%; height: auto; }
::selection { background: var(--accent-soft); color: var(--brand-ink); }
:focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 3px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--border); }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.lke-skip { position: absolute; left: 12px; top: -60px; z-index: 1000; padding: 10px 16px; border-radius: var(--radius); background: var(--brand-ink); color: #fff; }
.lke-skip:focus { top: 12px; color: #fff; }

.lke-ico { flex: none; vertical-align: middle; }
.lke-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font: 600 12.5px/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--brand-secondary);
}
.lke-eyebrow::before { content: ''; width: 24px; height: 1.5px; background: currentColor; opacity: .7; }
.lke-eyebrow a { color: inherit; text-decoration: none; }
.lke-lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--text-muted); max-width: 62ch; }
.lke-muted { color: var(--text-muted); }
.lke-small { font-size: var(--fs-small); }

/* ---------- Buttons ---------- */
.lke-btn, a.lke-btn, button.lke-btn, .bricks-button.lke-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--brand-primary); background: var(--brand-primary); color: var(--white);
  font: 600 15px/1.2 var(--font-body); letter-spacing: .005em; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.lke-btn:hover { background: var(--brand-ink); border-color: var(--brand-ink); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.lke-btn:active { transform: translateY(0); }
.lke-btn.lke-btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.lke-btn.lke-btn--block { width: 100%; }
/* Variants use two classes so they win over Bricks' .bricks-button defaults. */
.lke-btn.lke-btn--accent { background: var(--brand-accent); border-color: var(--brand-accent); color: var(--brand-ink); }
.lke-btn.lke-btn--accent:hover { background: #E7B356; border-color: #E7B356; color: var(--brand-ink); }
.lke-btn.lke-btn--ghost { background: transparent; color: var(--brand-primary); border-color: color-mix(in srgb, var(--brand-primary) 30%, transparent); }
.lke-btn.lke-btn--ghost:hover { background: var(--brand-primary); color: var(--white); border-color: var(--brand-primary); }
.lke-btn.lke-btn--ghost-light { background: transparent; border-color: rgba(255,255,255,.45); color: var(--white); }
.lke-btn.lke-btn--ghost-light:hover { background: rgba(255,255,255,.1); border-color: var(--white); color: var(--white); }
.lke-btn.lke-btn--wa { background: var(--brand-wa); border-color: var(--brand-wa); color: var(--white); }
.lke-btn.lke-btn--wa:hover { background: #0E7A40; border-color: #0E7A40; color: var(--white); }

.btn-shopee, a.btn-shopee, a.button.btn-shopee, .woocommerce a.button.btn-shopee {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: var(--radius-pill);
  background: var(--brand-shopee) !important; border: 1.5px solid var(--brand-shopee) !important; color: var(--white) !important;
  font: 600 15px/1.2 var(--font-body); text-decoration: none; transition: filter .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn-shopee:hover { filter: brightness(.94); transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(238, 77, 45, .55); color: var(--white) !important; }
.btn-shopee.lke-btn.lke-btn--sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; }

.lke-arrowlink {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px;
  color: var(--brand-secondary); text-decoration: none;
}
.lke-arrowlink .lke-ico { transition: transform .25s var(--ease); }
.lke-arrowlink:hover { color: var(--brand-primary); }
.lke-arrowlink:hover .lke-ico { transform: translateX(4px); }

/* ---------- Badges & chips ---------- */
.lke-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px; border-radius: var(--radius-pill);
  font: 500 12.5px/20px var(--font-body); background: var(--surface); color: var(--text); border: 1px solid var(--border); text-decoration: none;
}
.lke-badge--open   { background: var(--teal-soft); color: var(--brand-secondary); border-color: transparent; }
.lke-badge--closed { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.lke-badge--done   { background: var(--surface); color: var(--text-muted); }
.lke-badge--index  { background: var(--white); color: var(--brand-primary); font-weight: 600; }
a.lke-badge--index:hover { border-color: var(--brand-primary); }

/* ---------- Tables ---------- */
.lke-specs { width: 100%; border-collapse: collapse; font-size: 15px; }
.lke-specs th, .lke-specs td { padding: 11px 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.lke-specs th { width: 38%; color: var(--text-muted); font-weight: 500; }
.lke-specs td { font-weight: 500; }
.lke-agenda { width: 100%; border-collapse: collapse; font-size: 15px; }
.lke-agenda th, .lke-agenda td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.lke-agenda th { background: var(--surface); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.lke-agenda td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--brand-primary); }
.lke-agenda-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.lke-agenda tr:last-child td { border-bottom: 0; }

/* ---------- Mobile sticky buy bar (book pages) ---------- */
.lke-sticky-buy { display: none; }
@media (max-width: 767px) {
  .lke-sticky-buy {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--border);
    box-shadow: 0 -8px 24px -12px rgba(14,34,64,.2);
    transform: translateY(110%); transition: transform .3s var(--ease);
  }
  .lke-sticky-buy.is-visible { transform: none; }
  .lke-sticky-buy span { font-weight: 700; color: var(--brand-primary); }
  body.single-product { padding-bottom: 76px; }
  body.single-product .lke-float { bottom: 84px; }
}

/* ---------- Scroll reveal (progressive: only when JS adds .lke-js) ---------- */
.lke-js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.lke-js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .lke-js [data-reveal] { opacity: 1; transform: none; }
}
