@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&display=swap');

:root {
  color-scheme: dark;
  --bg: #131117;
  --surface: #1c1922;
  --surface-strong: #262130;
  --line: #37313f;
  --text: #f6f0f6;
  --muted: #bcb4c5;
  --accent: #e0cbff;
  --accent-ink: #211331;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body-font: -apple-system, BlinkMacSystemFont, "Avenir Next", system-ui, sans-serif;
  --shell-width: 1248px;
  --page-gutter: clamp(16px, 3.5vw, 52px);
  --glass-border: #f7edff3e;
  --glass-highlight: inset 0 1px 0 #fff2, inset 0 -1px 0 #fff1;
  --glass-background: linear-gradient(165deg, #eee1ff27, #a585c517 62%, #c9aee227), #211929da;
  --glass-elevation: 0 5px 10px #07050b40, 0 18px 42px #07050b60;
  --ease-out: cubic-bezier(.2, 0, 0, 1);
  font-family: var(--body-font);
  font-synthesis: none;
  background: var(--bg);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  background: radial-gradient(ellipse 70% 28rem at 70% -12rem, #30243c, transparent);
}
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, video:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
a { color: var(--accent); }
img { max-width: 100%; }
svg { flex: none; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { color: var(--text); }

.skip-link {
  position: fixed;
  z-index: 20;
  left: 12px;
  top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-ink);
}
.skip-link:not(:focus) { clip-path: inset(50%); padding: 0; width: 1px; height: 1px; overflow: hidden; }

.app-header {
  position: sticky;
  z-index: 4;
  top: 0;
  background: #141018de;
  border-block-end: 1px solid #f5e8ff12;
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
}
.header-inner, .app-main {
  width: min(calc(100% - var(--page-gutter) * 2), var(--shell-width));
  margin-inline: auto;
}
.header-inner {
  min-height: 88px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  text-align: start;
  background: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 43px;
  height: 43px;
  border: 1px solid #f7eaffb0;
  border-radius: 15px;
  background: radial-gradient(ellipse at 22% 0%, #fff0ff, transparent 73%), linear-gradient(143deg, #ead4ff, #b291e8);
  box-shadow: inset 0 1px 1px #fff9, inset 0 -3px 8px #7c4abe60, 0 4px 14px #09041445;
  color: #281735;
}
.brand-mark svg { transform: translateX(1px); }
.brand-name { display: grid; gap: 1px; white-space: nowrap; }
.brand-name > span { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .005em; }
.brand-name > strong { font: 720 22px/1 var(--display); letter-spacing: -.045em; }

.desktop-nav, .mobile-nav, .header-sign-in.button, .avatar-button {
  background: var(--glass-background);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-highlight), var(--glass-elevation);
}
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 32px;
}
.mobile-nav { display: none; }
.nav-item {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 26px;
  background: none;
  color: #ded4e8;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition: color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}
.nav-item.is-active {
  color: #f9eeff;
  background: linear-gradient(165deg, #e8d9ff38, #e4cfff15), #a47ada25;
  border-color: #f0dbff33;
  box-shadow: inset 0 1px 1px #fff2, 0 2px 5px #08050e32;
}
.nav-item.is-active svg { color: var(--accent); }
.header-account { justify-self: end; }
.header-sign-in.button {
  min-height: 44px;
  padding-inline: 15px;
  border-radius: 999px;
  white-space: nowrap;
}
.header-sign-in svg { color: var(--accent); }
.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #ead4ff42;
  border-radius: 50%;
  background: linear-gradient(145deg, #543c67, #352742);
  color: #faecff;
  font-size: 13px;
  font-weight: 700;
}
.avatar-button { background: radial-gradient(ellipse at 20% 10%, #8565a35c, transparent 65%), #2d2137; }

.app-main {
  padding-block: 29px 62px;
  outline: none;
}
.page-heading { margin: 28px 0 31px; }
.page-heading h1 {
  font: 730 clamp(42px, 6vw, 76px)/.98 var(--display);
  letter-spacing: -.049em;
  overflow-wrap: anywhere;
}
.page-heading p { margin-top: 12px; color: var(--muted); line-height: 1.5; }

.button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 680;
  line-height: 1.22;
  text-decoration: none;
  transition: color 150ms var(--ease-out), border-color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}
.button--primary {
  background: linear-gradient(140deg, #f5e6ff, var(--accent) 72%);
  color: var(--accent-ink);
  border-color: #fff8;
  box-shadow: inset 0 1px 0 #fff8;
}
.button--secondary { background: var(--surface-strong); color: var(--text); border-color: #4a3d55; }
.button--ghost { color: var(--muted); }
.icon-button { width: 44px; padding: 0; border-color: var(--line); color: var(--muted); }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 700; }
.section-title { font: 690 clamp(28px, 4vw, 40px)/1.05 var(--display); letter-spacing: -.047em; }

.learning-grid { display: grid; gap: 20px; }
.feature {
  isolation: isolate;
  position: relative;
  display: flex;
  align-items: end;
  min-height: clamp(450px, 41vw, 574px);
  overflow: hidden;
  border-radius: 35px;
  outline: 1px solid #fff2;
  outline-offset: -1px;
  background: #23172b;
}
.feature-art, .feature::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}
.feature-art { object-fit: cover; object-position: center 14%; }
.feature::after {
  content: "";
  z-index: -1;
  background:
    linear-gradient(90deg, #100a15ed 0%, #160c1bd7 24%, #180f1d6b 49%, #150b1b12 71%),
    linear-gradient(0deg, #130b1aa0, transparent 45%);
}
.feature-copy { min-width: 0; max-width: min(58%, 650px); padding: clamp(34px, 4.6vw, 68px); }
.feature-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 7px 12px;
  border: 1px solid #f6dfff38;
  border-radius: 999px;
  background: #48324a61;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #f7e1ff;
  font-size: 12px;
  font-weight: 650;
}
.feature-state svg { color: #f0cfff; }
.feature h1 {
  margin-top: 16px;
  font: 760 clamp(62px, 7.5vw, 110px)/.86 var(--display);
  letter-spacing: -.058em;
  word-spacing: .034em;
  max-width: 11ch;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.feature-description {
  max-width: 38ch;
  margin-top: 22px;
  color: #e8dbe8;
  font-size: clamp(15px, 1.55vw, 17px);
  line-height: 1.52;
  overflow-wrap: anywhere;
}
.feature-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 17px;
  margin-top: 18px;
  color: #e5d9e7;
  font-size: 13px;
}
.feature-meta span { display: inline-flex; align-items: center; gap: 6px; }
.feature-meta svg { color: var(--accent); }
.feature .button { margin-top: 24px; min-height: 50px; padding-inline: 18px; }
.hero-action { gap: 13px; }
.feature--empty { align-items: center; min-height: 340px; background: linear-gradient(145deg, #2e1e36, #151119); }
.feature--empty .feature-copy { max-width: 95%; }

.overview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}
.overview-copy { min-width: 0; }
.overview-copy h2 { font: 690 21px/1.13 var(--display); letter-spacing: -.036em; }
.overview-copy p { color: var(--muted); font-size: 14px; line-height: 1.42; margin-top: 4px; }
.overview-icon, .progress-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: #392d49;
  color: var(--accent);
}
.progress-ring {
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--percent), #493b54 0);
  isolation: isolate;
}
.progress-ring::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 4px;
  border-radius: 50%;
  background: var(--surface);
}
.progress-ring > span { font-size: 12px; font-weight: 730; font-variant-numeric: tabular-nums; }
.overview-link, .text-button {
  display: inline-flex;
  align-items: center;
  justify-content: end;
  gap: 9px;
  min-height: 44px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  text-align: end;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 680;
}

.catalog-preview { margin-top: 40px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.course-grid--single { grid-template-columns: minmax(0, 525px); }
.course-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  text-align: start;
  background: var(--surface);
  transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out);
}
.course-cover { position: relative; display: block; width: 100%; aspect-ratio: 1.76; background: var(--surface-strong); }
.course-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.course-cover::after, .player-cover::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px #fff1;
}
.course-price {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 5px 9px;
  border: 1px solid #f9e7ff42;
  border-radius: 999px;
  background: #1e1225cf;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff2ff;
  font-size: 12px;
  font-weight: 700;
}
.course-card-info { display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 10px; width: 100%; padding: 15px 16px; }
.course-card-copy { min-width: 0; display: grid; gap: 5px; }
.course-card-title { font: 690 clamp(18px, 2.1vw, 24px)/1.1 var(--display); letter-spacing: -.034em; overflow-wrap: anywhere; }
.course-card-meta { color: var(--muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.course-card-meta span { margin-inline: 3px; opacity: .75; }
.course-open { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 1px solid #e7c9ff33; border-radius: 50%; background: #3b2d4a; color: var(--accent); }

.progress-list { display: grid; gap: 12px; max-width: 850px; }
.progress-course {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
  text-align: start;
}
.progress-course > img { width: 105px; height: 76px; object-fit: cover; border-radius: 12px; }
.progress-course-text { display: grid; gap: 6px; flex: 1; min-width: 0; color: var(--muted); font-size: 13px; }
.progress-course-text strong { color: var(--text); font: 690 23px/1.12 var(--display); overflow-wrap: anywhere; }
.progress-track { display: block; height: 6px; max-width: 420px; border-radius: 999px; overflow: hidden; background: #463951; }
.progress-track > span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.progress-course-percent { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.progress-course > svg { color: var(--muted); }
.empty-state { max-width: 650px; padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--muted); }
.empty-state p { line-height: 1.5; }
.empty-state .button { margin-top: 16px; }

.account-dialog {
  width: min(100% - 36px, 449px);
  max-height: min(720px, 100% - 36px);
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--glass-border);
  border-radius: 29px;
  background: var(--glass-background);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  backdrop-filter: blur(28px) saturate(140%);
  color: var(--text);
  box-shadow: var(--glass-highlight), var(--glass-elevation);
}
.account-dialog::backdrop { background: #0b0711a8; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.account-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 14px; margin-bottom: 20px; }
.account-heading h2 { font: 710 clamp(30px, 7.5vw, 39px)/.98 var(--display); letter-spacing: -.053em; text-wrap: balance; }
.account-heading p { grid-column: 1/-1; color: var(--muted); font-size: 14px; line-height: 1.45; }
.account-heading .icon-button { background: #463851; border-color: #a68fb654; color: #f3e4ff; }
.account-form, .account-fields { display: grid; gap: 13px; }
.account-fields { padding: 0; margin: 0; border: 0; min-width: 0; }
.account-fields label { display: grid; gap: 6px; font-size: 13px; font-weight: 680; }
.account-fields input, .account-fields select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid #797184;
  border-radius: 13px;
  background: #17121e;
  color: var(--text);
  font-size: 16px;
}
.account-hint { margin-top: -6px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.account-error { color: #ffc0ce; font-size: 13px; line-height: 1.45; }
.account-toggle { display: flex; align-items: center; flex-wrap: wrap; gap: 0 8px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.account-toggle .text-button { padding: 0; }
.account-profile { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding-block: 15px; border-block: 1px solid var(--line); overflow-wrap: anywhere; }
.account-profile > div { display: grid; gap: 4px; }
.account-profile strong { font-size: 16px; }
.account-profile div span { color: var(--muted); font-size: 13px; }
.account-notice { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; padding: 17px; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.account-notice p { margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.4; }

.toast {
  position: fixed;
  z-index: 6;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100% - 48px);
  padding: 12px 16px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background: var(--glass-background);
  color: #faebff;
  box-shadow: var(--glass-elevation);
  opacity: 0;
  visibility: hidden;
  transition: opacity .16s, visibility .16s;
}
.toast.visible { opacity: 1; visibility: visible; }

@media (hover: hover) {
  .nav-item:not(.is-active):hover { color: #fff5ff; background: #ebd4ff15; }
  .button--primary:hover:not(:disabled) { background: #f6e9ff; }
  .button--secondary:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: #3b2e49; color: var(--text); }
  .button--ghost:hover:not(:disabled), .overview-link:hover, .text-button:hover { background: #f2d9ff13; color: var(--text); }
  .avatar-button:hover, .header-sign-in.button:hover { border-color: #f2dfff85; }
  .course-card:hover, .progress-course:hover { background: var(--surface-strong); border-color: #7b678c; }
}

@media (max-width: 880px) {
  .header-inner { min-height: 76px; }
  .nav-item { padding-inline: 10px; }
  .course-grid:not(.course-grid--single) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 740px) {
  html { scroll-padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .header-inner { min-height: 73px; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .desktop-nav { display: none; }
  .header-sign-in.button { min-height: 44px; padding-inline: 12px; font-size: 13px; }
  .brand-mark { width: 40px; height: 40px; border-radius: 13px; }
  .brand-name > strong { font-size: 21px; }
  .app-main { padding-block: 13px calc(99px + env(safe-area-inset-bottom)); }
  .mobile-nav {
    position: fixed;
    z-index: 5;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 50%;
    translate: -50%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 3px;
    width: min(calc(100% - 32px), 434px);
    padding: 5px;
    border-radius: 29px;
    -webkit-backdrop-filter: blur(25px) saturate(155%);
    backdrop-filter: blur(25px) saturate(155%);
  }
  .mobile-nav .nav-item { flex-direction: column; gap: 4px; min-height: 48px; padding: 3px 1px; border-radius: 23px; font-size: 10px; }
  .mobile-nav .nav-item svg { width: 20px; height: 20px; }
  .page-heading { margin: 20px 0 22px; }
  .page-heading h1 { font-size: clamp(40px, 10vw, 58px); }
  .page-heading p { margin-top: 7px; font-size: 14px; }
  .learning-grid { gap: 14px; }
  .feature {
    min-height: clamp(484px, 120vw, 620px);
    border-radius: 27px;
  }
  .feature-art { height: 100%; object-position: 70% top; }
  .feature::after {
    background:
      linear-gradient(0deg, #170e1ded 0%, #1a1021df 22%, #1b1121a8 43%, #24162b29 72%, #1a121b0f 100%),
      linear-gradient(90deg, #1c12233d, transparent 58%);
  }
  .feature-copy { max-width: 100%; padding: 22px; }
  .feature-state { padding: 6px 9px; font-size: 11px; }
  .feature h1 { margin-top: 11px; font-size: clamp(46px, 12.1vw, 72px); }
  .feature-description { margin-top: 13px; font-size: 14px; line-height: 1.47; }
  .feature-meta { margin-top: 14px; font-size: 12px; }
  .feature .button { margin-top: 19px; min-height: 46px; }
  .feature--empty { min-height: 270px; }
  .overview { gap: 11px; padding: 12px; border-radius: 19px; }
  .overview-icon, .progress-ring { width: 42px; height: 42px; }
  .overview-icon { border-radius: 13px; }
  .overview-copy h2 { font-size: 18px; }
  .overview-copy p { margin-top: 3px; font-size: 12px; }
  .overview-link { gap: 5px; padding-inline: 3px; font-size: 12px; }
  .overview-link svg { width: 14px; }
  .catalog-preview { margin-top: 30px; }
  .section-heading { margin-bottom: 12px; }
  .course-grid { gap: 11px; }
  .course-card { border-radius: 18px; }
  .course-card-info { align-items: start; padding: 11px 10px; }
  .course-card-title { font-size: 18px; }
  .course-card-meta { font-size: 11px; }
  .course-card-meta span { margin-inline: 1px; }
  .course-open { display: none; }
  .course-grid--single .course-open { display: grid; }
  .course-price { bottom: 8px; left: 8px; font-size: 11px; }
  .progress-course { gap: 10px; padding: 8px; }
  .progress-course > img { width: 68px; height: 59px; }
  .progress-course-text strong { font-size: 17px; }
  .progress-course-text { font-size: 12px; }
  .account-dialog { margin: auto auto max(12px, env(safe-area-inset-bottom)); padding: 20px; }
  .toast { bottom: calc(82px + env(safe-area-inset-bottom)); right: 12px; max-width: calc(100% - 24px); }
}

@media (max-width: 345px) {
  .feature { min-height: 455px; }
  .feature-copy { padding: 17px; }
  .overview-link { white-space: normal; }
  .overview-link svg { display: none; }
  .course-grid { grid-template-columns: 1fr !important; }
}

@media (prefers-reduced-motion: no-preference) {
  .button, .icon-button, .nav-item { transition-property: color, border-color, background-color, scale; }
  :is(.button, .icon-button, .nav-item):active:not(:disabled) { scale: .96; }
}

@media (prefers-reduced-transparency: reduce) {
  .app-header, .desktop-nav, .mobile-nav, .account-dialog { background: #25202d; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
