/* ===== Yogala — warm, cozy wellness design system ===== */

:root {
  /* warm neutrals */
  --bg:          #F6F1E8;
  --bg-soft:     #FBF8F2;
  --surface:     #FFFFFF;
  --surface-warm:#FBF6EE;
  --ink:         #34302A;
  --ink-soft:    #6E675D;
  --ink-faint:   #A39A8D;
  --line:        #EAE1D3;
  --line-soft:   #F0E9DD;

  /* accents — shared L/C, varied hue (oklch) */
  --clay:        oklch(0.66 0.085 52);   /* terracotta / primary */
  --clay-deep:   oklch(0.52 0.085 52);
  --clay-soft:   oklch(0.93 0.035 60);
  --clay-tint:   oklch(0.96 0.020 62);

  --sage:        oklch(0.66 0.055 150);  /* soft green / secondary */
  --sage-deep:   oklch(0.50 0.055 150);
  --sage-soft:   oklch(0.93 0.028 150);
  --sage-tint:   oklch(0.96 0.016 150);

  --lilac-soft:  oklch(0.93 0.028 300);
  --lilac-deep:  oklch(0.52 0.060 300);

  /* type */
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans:  "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* radii */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* shadows — soft, warm-tinted */
  --sh-sm: 0 2px 8px rgba(72,58,42,0.05);
  --sh-md: 0 10px 30px rgba(72,58,42,0.07);
  --sh-lg: 0 24px 60px rgba(72,58,42,0.10);

  --sidebar-w: 256px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
::selection { background: var(--clay-soft); }

h1,h2,h3,h4 { font-family: var(--serif); font-weight: 500; color: var(--ink); margin: 0; line-height: 1.12; letter-spacing: -0.01em; }

.serif { font-family: var(--serif); }
.mono  { font-family: var(--mono); }

/* ---------- App shell ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--surface-warm);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 28px 18px 20px;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 4px 10px 26px;
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--clay);
  display: grid; place-items: center;
  flex: none;
}
.brand-name { font-family: var(--serif); font-size: 24px; letter-spacing: 0.01em; color: var(--ink); }
.brand-name b { font-weight: 600; }

.nav { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; }
.nav-label {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-faint); padding: 12px 12px 6px; font-weight: 700;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: var(--r-md);
  color: var(--ink-soft); background: none; border: none;
  font-size: 15px; font-weight: 600; text-align: left; width: 100%;
  transition: background .18s, color .18s;
}
.nav-item:hover { background: var(--clay-tint); color: var(--ink); }
.nav-item.active { background: var(--surface); color: var(--ink); box-shadow: var(--sh-sm); }
.nav-item.active .nav-ico { color: var(--clay); }
.nav-ico { color: var(--ink-faint); flex: none; transition: color .18s; }
.nav-item.active .nav-ico, .nav-item:hover .nav-ico { color: var(--clay); }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.sub-mini {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 14px 15px; box-shadow: var(--sh-sm);
}
.sub-mini .row { display: flex; align-items: center; justify-content: space-between; }
.sub-mini-title { font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.sub-mini-plan { font-family: var(--serif); font-size: 17px; margin-top: 2px; }
.progress-track { height: 6px; border-radius: 999px; background: var(--line); margin-top: 11px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: var(--clay); }
.sub-mini-meta { font-size: 12px; color: var(--ink-faint); margin-top: 8px; }

/* ---------- Top bar ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 18px 40px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.search {
  flex: 1; max-width: 420px;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 10px 16px;
  color: var(--ink-faint);
}
.search input { border: none; background: none; outline: none; flex: 1; font-size: 14px; color: var(--ink); }
.topbar-spacer { flex: 1; }

.lang-toggle { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px; }
.lang-toggle button {
  border: none; background: none; padding: 6px 13px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 700; color: var(--ink-faint); letter-spacing: .03em;
}
.lang-toggle button.active { background: var(--clay); color: #fff; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface);
  display: grid; place-items: center; color: var(--ink-soft);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--clay-tint); color: var(--clay); }

.avatar { border-radius: 50%; object-fit: cover; background: var(--sage-soft); flex: none; }
.avatar-btn { border: 2px solid var(--surface); box-shadow: var(--sh-sm); border-radius: 50%; padding: 0; background: none; line-height: 0; }
.avatar-fallback { display: grid; place-items: center; font-family: var(--serif); color: var(--sage-deep); background: var(--sage-soft); border-radius: 50%; font-weight: 600; }

/* ---------- Content ---------- */
.content { padding: 30px 40px 64px; max-width: var(--maxw); width: 100%; }
.page-head { margin-bottom: 26px; }
.eyebrow { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--clay); font-weight: 700; }
.page-title { font-size: 40px; margin-top: 8px; }
.page-sub { color: var(--ink-soft); font-size: 16px; margin-top: 10px; max-width: 60ch; }

.section { margin-top: 44px; }
.section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-title { font-size: 26px; display: flex; align-items: center; gap: 12px; }
.section-sub { color: var(--ink-soft); font-size: 14px; margin-top: 4px; }
.link-btn { background: none; border: none; color: var(--clay-deep); font-weight: 700; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.link-btn:hover { gap: 9px; transition: gap .15s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: var(--r-pill); border: 1px solid transparent;
  padding: 12px 22px; font-size: 15px; font-weight: 700; letter-spacing: .01em;
  transition: transform .12s, box-shadow .15s, background .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--clay); color: #fff; box-shadow: var(--sh-sm); }
.btn-primary:hover { background: var(--clay-deep); box-shadow: var(--sh-md); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--clay); color: var(--clay-deep); }
.btn-sage { background: var(--sage); color: #fff; }
.btn-sage:hover { background: var(--sage-deep); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  padding: 5px 11px; border-radius: var(--r-pill);
}
.badge-free { background: var(--sage-soft); color: var(--sage-deep); }
.badge-paid { background: var(--clay-soft); color: var(--clay-deep); }
.badge-live { background: oklch(0.93 0.04 25); color: oklch(0.52 0.14 25); }
.badge-soft { background: var(--surface); color: var(--ink-soft); border: 1px solid var(--line); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.dot-pulse { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.lesson-card { cursor: pointer; }
.lesson-card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.thumb { position: relative; aspect-ratio: 16/10; }
.thumb-badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 7px; }
.thumb-dur { position: absolute; bottom: 12px; right: 12px; background: rgba(40,34,28,.7); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: var(--r-pill); backdrop-filter: blur(4px); }
.thumb-lock {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: color-mix(in srgb, var(--clay-deep) 30%, transparent);
  backdrop-filter: blur(2px); color: #fff;
}
.thumb-lock .lock-pill { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.92); color: var(--clay-deep); padding: 9px 16px; border-radius: var(--r-pill); font-weight: 700; font-size: 13px; box-shadow: var(--sh-md); }
.play-orb {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(.9);
  width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.92);
  display: grid; place-items: center; color: var(--clay); box-shadow: var(--sh-md);
  opacity: 0; transition: opacity .2s, transform .2s;
}
.lesson-card:hover .play-orb { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-faint); font-weight: 600; }
.card-title { font-family: var(--serif); font-size: 20px; line-height: 1.2; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 4px; }
.card-instr { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.price { font-family: var(--serif); font-size: 18px; color: var(--ink); }
.price-free { color: var(--sage-deep); }

/* ---------- Placeholder imagery ---------- */
.ph {
  width: 100%; height: 100%;
  background-image: repeating-linear-gradient(135deg, var(--ph-a, #EFE6D8) 0 14px, var(--ph-b, #E7DBC8) 14px 28px);
  display: grid; place-items: center; position: relative;
}
.ph-label { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); letter-spacing: .04em; background: rgba(255,255,255,.6); padding: 3px 9px; border-radius: 6px; }
.ph.sage { --ph-a:#E4EADD; --ph-b:#D8E1CF; }
.ph.clay { --ph-a:#F0E1D2; --ph-b:#EAD4BF; }
.ph.lilac{ --ph-a:#E8E4EF; --ph-b:#DED8EB; }

/* ---------- Dashboard bits ---------- */
.hero {
  background: linear-gradient(120deg, var(--clay-soft), var(--sage-soft));
  border-radius: var(--r-xl); padding: 38px 40px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
}
.hero-blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; }
.continue-card {
  display: grid; grid-template-columns: 280px 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  overflow: hidden; box-shadow: var(--sh-sm);
}
.continue-body { padding: 26px 30px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }

.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--sh-sm); }
.stat-num { font-family: var(--serif); font-size: 34px; line-height: 1; }
.stat-lbl { font-size: 13px; color: var(--ink-soft); margin-top: 7px; font-weight: 600; }

.list-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.list-row:last-child { border-bottom: none; }
.row-thumb { width: 88px; height: 60px; border-radius: var(--r-sm); overflow: hidden; flex: none; }
.row-grow { flex: 1; min-width: 0; }
.row-title { font-family: var(--serif); font-size: 17px; }
.row-meta { font-size: 13px; color: var(--ink-faint); font-weight: 600; margin-top: 2px; }

/* ---------- Filter pills ---------- */
.filters { display: flex; gap: 9px; flex-wrap: wrap; }
.pill {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
  border-radius: var(--r-pill); padding: 8px 16px; font-size: 13.5px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 7px; transition: all .15s;
}
.pill:hover { border-color: var(--clay); color: var(--clay-deep); }
.pill.active { background: var(--ink); color: var(--bg-soft); border-color: var(--ink); }

/* ---------- Player ---------- */
.player-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.player {
  background: #2a2521; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16/9;
  position: relative; box-shadow: var(--sh-md);
}
.player .ph { --ph-a:#3a342d; --ph-b:#332e28; }
.player-controls { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px; background: linear-gradient(transparent, rgba(20,16,12,.75)); display: flex; align-items: center; gap: 14px; }
.player-bar { flex: 1; height: 5px; border-radius: 999px; background: rgba(255,255,255,.25); overflow: hidden; }
.player-bar > div { height: 100%; background: var(--clay); border-radius: 999px; }
.player-time { color: rgba(255,255,255,.85); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pbtn { width: 40px; height: 40px; border-radius: 50%; border: none; background: rgba(255,255,255,.16); color:#fff; display: grid; place-items: center; }
.pbtn.big { width: 46px; height: 46px; background: #fff; color: var(--clay-deep); }

.locked-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  background: linear-gradient(160deg, color-mix(in srgb, var(--clay-deep) 88%, #000), color-mix(in srgb, var(--sage-deep) 80%, #000));
  color: #fff; padding: 30px;
}
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 28px; }
.tab { border: none; background: none; padding: 12px 18px; font-size: 15px; font-weight: 700; color: var(--ink-faint); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab.active { color: var(--ink); border-bottom-color: var(--clay); }

.playlist { display: flex; flex-direction: column; gap: 4px; }
.pl-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-md); transition: background .15s; }
.pl-item:hover { background: var(--surface-warm); }
.pl-item.active { background: var(--clay-tint); }
.pl-idx { width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ink-soft); flex: none; }
.pl-item.active .pl-idx { background: var(--clay); color: #fff; border-color: var(--clay); }
.pl-grow { flex: 1; min-width: 0; }
.pl-title { font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.pl-meta { font-size: 12px; color: var(--ink-faint); margin-top: 2px; }

/* ---------- Plans / subscription ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.plan {
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-xl);
  padding: 26px 26px 24px; display: flex; flex-direction: column; gap: 14px; position: relative; transition: border-color .18s, box-shadow .18s, transform .18s;
}
.plan:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }
.plan.featured { border-color: var(--clay); box-shadow: var(--sh-md); }
.plan-flag { position: absolute; top: -12px; right: 24px; background: var(--clay); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 5px 13px; border-radius: var(--r-pill); }
.plan-name { font-family: var(--serif); font-size: 22px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.plan-price b { font-family: var(--serif); font-size: 40px; font-weight: 600; white-space: nowrap; }
.plan-price span { color: var(--ink-faint); font-weight: 600; }
.plan-feats { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 10px; }
.plan-feats li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--ink-soft); }
.plan-feats .tick { color: var(--sage-deep); margin-top: 2px; flex: none; }

/* ---------- Profile / forms ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--sh-sm); }
.panel-head { padding: 22px 28px; border-bottom: 1px solid var(--line-soft); }
.panel-body { padding: 26px 28px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-soft); letter-spacing: .01em; }
.input {
  border: 1px solid var(--line); background: var(--bg-soft); border-radius: var(--r-md);
  padding: 12px 15px; font-size: 15px; color: var(--ink); outline: none; transition: border-color .15s, background .15s;
}
.input:focus { border-color: var(--clay); background: var(--surface); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.avatar-edit { display: flex; align-items: center; gap: 22px; }
.avatar-big { width: 96px; height: 96px; border-radius: 50%; }
.hint { font-size: 12.5px; color: var(--ink-faint); }

.divider { height: 1px; background: var(--line-soft); margin: 26px 0; }

/* ---------- Modal ---------- */
.modal-scrim { position: fixed; inset: 0; background: rgba(40,32,24,.42); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 60; padding: 24px; animation: fade .2s; }
.modal { background: var(--surface); border-radius: var(--r-xl); width: 100%; max-width: 460px; box-shadow: var(--sh-lg); overflow: hidden; animation: pop .22s; }
@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98) } }

.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg-soft); padding: 13px 22px; border-radius: var(--r-pill); box-shadow: var(--sh-lg); font-weight: 700; font-size: 14px; z-index: 80; display: flex; align-items: center; gap: 10px; animation: pop .25s; }

/* entrance */
.fade-up { animation: fadeUp .45s ease; }
@keyframes fadeUp { from { transform: translateY(12px) } to { transform: none } }

/* ---------- Bottom nav (mobile app) ---------- */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  background: var(--surface-warm);
  border-top: 1px solid var(--line);
  height: 62px;
  box-shadow: 0 -4px 16px rgba(72,58,42,.06);
}
.bn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; border: none; background: none;
  color: var(--ink-faint); padding: 6px 4px; transition: color .15s;
}
.bn-item.active { color: var(--clay); }
.bn-lbl { font-size: 10px; font-weight: 700; letter-spacing: .02em; }

@media (max-width: 1080px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .player-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .bottom-nav { display: flex; }
  .main { padding-bottom: 70px; }

  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }

  .content { padding: 20px 16px 30px; }
  .topbar { padding: 12px 16px; gap: 10px; }
  .search { display: none; }
  .topbar-spacer { display: none; }

  .page-title { font-size: 28px; }
  .section-title { font-size: 20px; }

  .hero { padding: 26px 20px; flex-wrap: wrap; }

  .continue-card { grid-template-columns: 1fr; }
  .continue-body { padding: 18px 20px; }

  .field-row { grid-template-columns: 1fr; }

  .avatar-edit { flex-wrap: wrap; }
}
